Skip to main content

Interface: InternalDocFilterOptions

Defined in: client/lib/core/sync/internal-docs.d.ts:73

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.client/lib/core/sync/internal-docs.d.ts:94
extraClasses?string[]Additional ~class values to keep device-local.client/lib/core/sync/internal-docs.d.ts:110
extraDocIds?string[]Additional exact document ids to keep device-local.client/lib/core/sync/internal-docs.d.ts:106
extraIdPrefixes?string[]Additional id prefixes to keep device-local.client/lib/core/sync/internal-docs.d.ts:108
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.client/lib/core/sync/internal-docs.d.ts:102
replicatePatchLedger?booleanReplicate the local patch ledger. Defaults to false.client/lib/core/sync/internal-docs.d.ts:104
replicateSessions?booleanReplicate ~UserSession documents. Defaults to false.client/lib/core/sync/internal-docs.d.ts:75
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.client/lib/core/sync/internal-docs.d.ts:86