Interface: BaseStateSyncEventData
Defined in: shared/types/events.ts:193
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(),
};
Hierarchyโ
Extendsโ
Extended byโ
Indexableโ
[key: string]: unknown
[key: number]: unknown
[key: symbol]: unknown
Propertiesโ
timestampโ
readonlytimestamp:number
Defined in: shared/types/events.ts:107
The time (in milliseconds since epoch) when the event occurred.
Inherited fromโ
_meta?โ
readonlyoptional_meta:EventMetadata
Defined in: shared/types/events.ts:109
Runtime metadata describing the emission context.
Inherited fromโ
BaseStateSyncEventData._meta
_originalMeta?โ
readonlyoptional_originalMeta:EventMetadata
Defined in: shared/types/events.ts:111
Preserves previously attached metadata when re-emitting events.
Inherited fromโ
BaseStateSyncEventData._originalMeta
actionโ
readonlyaction:"bulk-sync"|"delete"|"update"
Defined in: shared/types/events.ts:195
The synchronization action being performed
revisionโ
readonlyrevision:number
Defined in: shared/types/events.ts:200
Monotonic revision counter incremented by the backend for each emitted state sync event.
siteIdentifier?โ
readonlyoptionalsiteIdentifier:string
Defined in: shared/types/events.ts:202
Site identifier for targeted operations (delete, update)
sourceโ
readonlysource:"cache"|"database"|"frontend"|"import"|"monitor-update"
Defined in: shared/types/events.ts:204
Source system that triggered the sync
truncated?โ
readonlyoptionaltruncated:boolean
Defined in: shared/types/events.ts:206
Indicates the backend omitted the payload due to a size budget.