Skip to main content

@idpass/data-collect-core / FormSubmission

Interface: FormSubmission

Defined in: interfaces/types.ts:204

Form submission representing a command/event in the event sourcing system.

Every change to entities is captured as a FormSubmission, enabling complete audit trails and data synchronization.

Example

const createForm: FormSubmission = {
guid: "form-123",
entityGuid: "person-456",
type: "create-individual",
data: { name: "John Doe", age: 30 },
timestamp: "2024-01-01T12:00:00Z",
userId: "user-789",
syncLevel: SyncLevel.LOCAL
};

Properties

guid

guid: string

Defined in: interfaces/types.ts:206

Unique identifier for this form submission/event


entityGuid

entityGuid: string

Defined in: interfaces/types.ts:208

GUID of the entity this form submission targets


type

type: string

Defined in: interfaces/types.ts:210

Event type (e.g., 'create-individual', 'add-member')


data

data: Record<string, any>

Defined in: interfaces/types.ts:213

Event payload containing the actual data changes


timestamp

timestamp: string

Defined in: interfaces/types.ts:215

ISO timestamp when this event was created


userId

userId: string

Defined in: interfaces/types.ts:217

User who created this event


syncLevel

syncLevel: SyncLevel

Defined in: interfaces/types.ts:219

Current synchronization level of this event