Interface: StateSyncEventData
Defined in: shared/types/events.ts:160
Payload for state synchronization events.
Remarksโ
Used to notify frontend about state changes that occurred in the backend. Supports various sync actions including bulk updates, deletions, and individual updates.
Examplesโ
const event: StateSyncEventData = {
    action: "bulk-sync",
    sites: updatedSites,
    source: "database",
    timestamp: Date.now(),
};
const event: StateSyncEventData = {
    action: "delete",
    siteIdentifier: "site_123",
    sites: [],
    source: "database",
    timestamp: Date.now(),
};
Extendsโ
Propertiesโ
timestampโ
readonlytimestamp:number
Defined in: shared/types/events.ts:74
The time (in milliseconds since epoch) when the event occurred.
Inherited fromโ
_meta?โ
readonlyoptional_meta:EventMetadata
Defined in: shared/types/events.ts:76
Runtime metadata describing the emission context.
Inherited fromโ
_originalMeta?โ
readonlyoptional_originalMeta:EventMetadata
Defined in: shared/types/events.ts:78
Preserves previously attached metadata when re-emitting events.
Inherited fromโ
actionโ
readonlyaction:"bulk-sync"|"delete"|"update"
Defined in: shared/types/events.ts:162
The synchronization action being performed
delta?โ
readonlyoptionaldelta:SiteSyncDelta
Defined in: shared/types/events.ts:164
Structured delta describing how the site collection changed
siteIdentifier?โ
readonlyoptionalsiteIdentifier:string
Defined in: shared/types/events.ts:166
Site identifier for targeted operations (delete, update)
sitesโ
readonlysites:Site[]
Defined in: shared/types/events.ts:168
Complete site dataset after the sync operation
sourceโ
readonlysource:"cache"|"database"|"frontend"
Defined in: shared/types/events.ts:170
Source system that triggered the sync