Skip to main content

Interface: InternalDocFilterOptions

Defined in: packages/client/src/core/sync/internal-docs.ts:93

Options controlling which of DocStack's own documents stay on this device.

Example

// Replicate the patch ledger too, and keep an app-specific draft class local.
const filter = createReplicationFilter({
replicatePatchLedger: true,
extraClasses: ["Draft"],
});

Properties

PropertyTypeDescriptionDefined in
ephemeralClasses?string[]Class names declared ephemeral, whose documents describe one run of one client. See ClassModel.ephemeral. ClientStack.sync fills this in from the stack's own class models, so a class declared ephemeral is excluded structurally rather than by the filter recognising a payload shape.packages/client/src/core/sync/internal-docs.ts:114
extraClasses?string[]Additional ~class values to keep device-local.packages/client/src/core/sync/internal-docs.ts:130
extraDocIds?string[]Additional exact document ids to keep device-local.packages/client/src/core/sync/internal-docs.ts:126
extraIdPrefixes?string[]Additional id prefixes to keep device-local.packages/client/src/core/sync/internal-docs.ts:128
extraSeededDocIds?string[]Document ids an application's own patches seed, treated like the system-seeded ones. Consumer patches are applied on every client too, so the documents they seed are reconstructible everywhere and need not travel. ClientStack.sync fills this in from the stack's configured patches.packages/client/src/core/sync/internal-docs.ts:122
replicatePatchLedger?booleanReplicate the local patch ledger. Defaults to false.packages/client/src/core/sync/internal-docs.ts:124
replicateSessions?booleanReplicate ~UserSession documents. Defaults to false.packages/client/src/core/sync/internal-docs.ts:95
replicateSystemDocuments?booleanReplicate the documents the system patches seed - the ~* class models, Group-Admin, Policy-Admin, AuthMod-Classic, the bootstrap class and domain, the system user. Defaults to false, because every client applies those patches for itself and so already holds them. This does not govern documents of DocStack's classes that an application created - an account, a group, a policy written at runtime. Those bind the synchronised group together and always replicate.packages/client/src/core/sync/internal-docs.ts:106