Variables
offlineReplicaArguments
•Const offlineReplicaArguments: Object
Arguments of an application’s authorized per-collection offline feed.
Type declaration
Functions
offlineReplicaPopulationDigest
▸ offlineReplicaPopulationDigest<Row>(rows): string
Fingerprint the complete authorized population for a custom feed.
Type parameters
Parameters
Returns
string
offlineReplicaPage
▸ offlineReplicaPage<V>(row): VUnion<{ collection: string ; kind: "restart" | "denied" ; cursor: null | string ; since: null | string } | { collection: string ; kind: "snapshot" | "delta" ; cursor: null | string ; checkpoint: string ; expiresAtMs: number ; changes: (Expand<{ [Property in “value”]?: Exclude<Infer<Object[Property]>, undefined> } & { [Property in “kind” | “id” | “value”]: Infer<Object[Property]> }> | { kind: “delete”; id: string; })[] ; nextCursor: null | string ; since: null | string ; populationDigest: string }, [VObject<{ collection: string ; kind: "restart" | "denied" ; cursor: null | string ; since: null | string }, { collection: VString<string, "required"> ; since: VUnion<null | string, [VString<string, "required">, VNull<null, "required">], "required", never> = position; cursor: VUnion<null | string, [VString<string, "required">, VNull<null, "required">], "required", never> = position; kind: VUnion<"restart" | "denied", [VLiteral<"denied", "required">, VLiteral<"restart", "required">], "required", never> }, "required", "collection" | "kind" | "cursor" | "since">, VObject<{ collection: string ; kind: "snapshot" | "delta" ; cursor: null | string ; checkpoint: string ; expiresAtMs: number ; changes: (Expand<{ [Property in “value”]?: Exclude<Infer<Object[Property]>, undefined> } & { [Property in “kind” | “id” | “value”]: Infer<Object[Property]> }> | { kind: “delete”; id: string; })[] ; nextCursor: null | string ; since: null | string ; populationDigest: string }, { collection: VString<string, "required"> ; since: VUnion<null | string, [VString<string, "required">, VNull<null, "required">], "required", never> = position; cursor: VUnion<null | string, [VString<string, "required">, VNull<null, "required">], "required", never> = position; kind: VUnion<"snapshot" | "delta", [VLiteral<"snapshot", "required">, VLiteral<"delta", "required">], "required", never> ; checkpoint: VString<string, "required"> ; populationDigest: VString<string, "required"> ; nextCursor: VUnion<null | string, [VString<string, "required">, VNull<null, "required">], "required", never> = position; expiresAtMs: VFloat64<number, "required"> ; changes: VArray<(Expand<{ [Property in “value”]?: Exclude<Infer<Object[Property]>, undefined> } & { [Property in “kind” | “id” | “value”]: Infer<Object[Property]> }> | { kind: "delete" ; id: string })[], VUnion<Expand<{ [Property in “value”]?: Exclude<Infer<Object[Property]>, undefined> } & { [Property in “kind” | “id” | “value”]: Infer<Object[Property]> }> | { kind: "delete" ; id: string }, [VObject<Expand<{ [Property in “value”]?: Exclude<Infer<Object[Property]>, undefined> } & { [Property in “kind” | “id” | “value”]: Infer<Object[Property]> }>, { kind: VLiteral<"put", "required"> ; id: VString<string, "required"> ; value: V = row }, "required", "kind" | "id" | "value" | `value.\{V["fieldPaths"]}\`\>, [`VObject`](/api/classes/values.VObject)\<\{ `kind`: ``"delete"`` ; `id`: `string` \}, \{ `kind`: [`VLiteral`](/api/classes/values.VLiteral)\<``"delete"``, ``"required"``\> ; `id`: [`VString`](/api/classes/values.VString)\<`string`, ``"required"``\> \}, ``"required"``, ``"kind"`` \| ``"id"``\>], ``"required"``, ``"kind"`` \| ``"id"`` \| ``"value"`` \| \`value.{V[“fieldPaths”]}`>, "required"> }, "required", "collection" | "kind" | "cursor" | "checkpoint" | "expiresAtMs" | "changes" | "nextCursor" | "since" | "populationDigest">], "required", "collection" | "kind" | "cursor" | "checkpoint" | "expiresAtMs" | "changes" | "nextCursor" | "since" | "populationDigest">
Validate one page of an offline snapshot or a net change set.
Type parameters
Parameters
Returns
VUnion<{ collection: string ; kind: "restart" | "denied" ; cursor: null | string ; since: null | string } | { collection: string ; kind: "snapshot" | "delta" ; cursor: null | string ; checkpoint: string ; expiresAtMs: number ; changes: (Expand<{ [Property in “value”]?: Exclude<Infer<Object[Property]>, undefined> } & { [Property in “kind” | “id” | “value”]: Infer<Object[Property]> }> | { kind: “delete”; id: string; })[] ; nextCursor: null | string ; since: null | string ; populationDigest: string }, [VObject<{ collection: string ; kind: "restart" | "denied" ; cursor: null | string ; since: null | string }, { collection: VString<string, "required"> ; since: VUnion<null | string, [VString<string, "required">, VNull<null, "required">], "required", never> = position; cursor: VUnion<null | string, [VString<string, "required">, VNull<null, "required">], "required", never> = position; kind: VUnion<"restart" | "denied", [VLiteral<"denied", "required">, VLiteral<"restart", "required">], "required", never> }, "required", "collection" | "kind" | "cursor" | "since">, VObject<{ collection: string ; kind: "snapshot" | "delta" ; cursor: null | string ; checkpoint: string ; expiresAtMs: number ; changes: (Expand<{ [Property in “value”]?: Exclude<Infer<Object[Property]>, undefined> } & { [Property in “kind” | “id” | “value”]: Infer<Object[Property]> }> | { kind: “delete”; id: string; })[] ; nextCursor: null | string ; since: null | string ; populationDigest: string }, { collection: VString<string, "required"> ; since: VUnion<null | string, [VString<string, "required">, VNull<null, "required">], "required", never> = position; cursor: VUnion<null | string, [VString<string, "required">, VNull<null, "required">], "required", never> = position; kind: VUnion<"snapshot" | "delta", [VLiteral<"snapshot", "required">, VLiteral<"delta", "required">], "required", never> ; checkpoint: VString<string, "required"> ; populationDigest: VString<string, "required"> ; nextCursor: VUnion<null | string, [VString<string, "required">, VNull<null, "required">], "required", never> = position; expiresAtMs: VFloat64<number, "required"> ; changes: VArray<(Expand<{ [Property in “value”]?: Exclude<Infer<Object[Property]>, undefined> } & { [Property in “kind” | “id” | “value”]: Infer<Object[Property]> }> | { kind: "delete" ; id: string })[], VUnion<Expand<{ [Property in “value”]?: Exclude<Infer<Object[Property]>, undefined> } & { [Property in “kind” | “id” | “value”]: Infer<Object[Property]> }> | { kind: "delete" ; id: string }, [VObject<Expand<{ [Property in “value”]?: Exclude<Infer<Object[Property]>, undefined> } & { [Property in “kind” | “id” | “value”]: Infer<Object[Property]> }>, { kind: VLiteral<"put", "required"> ; id: VString<string, "required"> ; value: V = row }, "required", "kind" | "id" | "value" | `value.\{V["fieldPaths"]}\`\>, [`VObject`](/api/classes/values.VObject)\<\{ `kind`: ``"delete"`` ; `id`: `string` \}, \{ `kind`: [`VLiteral`](/api/classes/values.VLiteral)\<``"delete"``, ``"required"``\> ; `id`: [`VString`](/api/classes/values.VString)\<`string`, ``"required"``\> \}, ``"required"``, ``"kind"`` \| ``"id"``\>], ``"required"``, ``"kind"`` \| ``"id"`` \| ``"value"`` \| \`value.{V[“fieldPaths”]}`>, "required"> }, "required", "collection" | "kind" | "cursor" | "checkpoint" | "expiresAtMs" | "changes" | "nextCursor" | "since" | "populationDigest">], "required", "collection" | "kind" | "cursor" | "checkpoint" | "expiresAtMs" | "changes" | "nextCursor" | "since" | "populationDigest">
offlineCollectionFeed
▸ offlineCollectionFeed<Ctx, Row>(options): (ctx: Ctx, args: OfflineReplicaPageArgs) => Promise<OfflineReplicaPage<Row>>
Create a read-only feed handler for a collection’s authorized projection.
Return null to deny retention, or all rows the current caller may retain.
Bijection seals checkpoints and computes the net changes for each replica.
Type parameters
Parameters
Returns
fn
▸ (ctx, args): Promise<OfflineReplicaPage<Row>>
Parameters
Returns
Promise<OfflineReplicaPage<Row>>