Skip to main content

@idpass/data-collect-core / FormSubmission

Interface: FormSubmission

Defined in: interfaces/types.ts:222

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:224

Unique identifier for this form submission/event


entityGuid

entityGuid: string

Defined in: interfaces/types.ts:226

GUID of the entity this form submission targets


type

type: string

Defined in: interfaces/types.ts:228

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


data

data: Record<string, any>

Defined in: interfaces/types.ts:231

Event payload containing the actual data changes


timestamp

timestamp: string

Defined in: interfaces/types.ts:233

ISO timestamp when this event was created


userId

userId: string

Defined in: interfaces/types.ts:235

User who created this event


syncLevel

syncLevel: SyncLevel

Defined in: interfaces/types.ts:237

Current synchronization level of this event


schemaVersion?

optional schemaVersion: number

Defined in: interfaces/types.ts:239

Schema version of the event data for upcasting support. Undefined treated as version 1.