@eloxiv/client 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +6 -2
- package/dist/Account.d.ts +131 -0
- package/dist/Account.d.ts.map +1 -0
- package/dist/Account.js +169 -0
- package/dist/Account.js.map +1 -0
- package/dist/Agent.d.ts +496 -0
- package/dist/Agent.d.ts.map +1 -0
- package/dist/Agent.js +228 -0
- package/dist/Agent.js.map +1 -0
- package/dist/AgentSync.d.ts +990 -0
- package/dist/AgentSync.d.ts.map +1 -0
- package/dist/AgentSync.js +46 -0
- package/dist/AgentSync.js.map +1 -0
- package/dist/AppState.d.ts +127 -0
- package/dist/AppState.d.ts.map +1 -0
- package/dist/AppState.js +145 -0
- package/dist/AppState.js.map +1 -0
- package/dist/AppStateSync.d.ts +193 -0
- package/dist/AppStateSync.d.ts.map +1 -0
- package/dist/AppStateSync.js +23 -0
- package/dist/AppStateSync.js.map +1 -0
- package/dist/Auth.d.ts +95 -0
- package/dist/Auth.d.ts.map +1 -0
- package/dist/Auth.js +139 -0
- package/dist/Auth.js.map +1 -0
- package/dist/Avatars.d.ts +53 -0
- package/dist/Avatars.d.ts.map +1 -0
- package/dist/Avatars.js +121 -0
- package/dist/Avatars.js.map +1 -0
- package/dist/BrowserAnalytics.d.ts +56 -0
- package/dist/BrowserAnalytics.d.ts.map +1 -0
- package/dist/BrowserAnalytics.js +94 -0
- package/dist/BrowserAnalytics.js.map +1 -0
- package/dist/Chat.d.ts +712 -0
- package/dist/Chat.d.ts.map +1 -0
- package/dist/Chat.js +883 -0
- package/dist/Chat.js.map +1 -0
- package/dist/ChatIntegrity.d.ts +63 -0
- package/dist/ChatIntegrity.d.ts.map +1 -0
- package/dist/ChatIntegrity.js +89 -0
- package/dist/ChatIntegrity.js.map +1 -0
- package/dist/ChatSends.d.ts +103 -0
- package/dist/ChatSends.d.ts.map +1 -0
- package/dist/ChatSends.js +157 -0
- package/dist/ChatSends.js.map +1 -0
- package/dist/Client.d.ts +113 -0
- package/dist/Client.d.ts.map +1 -0
- package/dist/Client.js +189 -0
- package/dist/Client.js.map +1 -0
- package/dist/Collab.d.ts +138 -0
- package/dist/Collab.d.ts.map +1 -0
- package/dist/Collab.js +454 -0
- package/dist/Collab.js.map +1 -0
- package/dist/CollabTools.d.ts +129 -0
- package/dist/CollabTools.d.ts.map +1 -0
- package/dist/CollabTools.js +277 -0
- package/dist/CollabTools.js.map +1 -0
- package/dist/Connections.d.ts +288 -0
- package/dist/Connections.d.ts.map +1 -0
- package/dist/Connections.js +316 -0
- package/dist/Connections.js.map +1 -0
- package/dist/Consent.d.ts +338 -0
- package/dist/Consent.d.ts.map +1 -0
- package/dist/Consent.js +142 -0
- package/dist/Consent.js.map +1 -0
- package/dist/Desktop.d.ts +61 -0
- package/dist/Desktop.d.ts.map +1 -0
- package/dist/Desktop.js +101 -0
- package/dist/Desktop.js.map +1 -0
- package/dist/Directory.d.ts +36 -0
- package/dist/Directory.d.ts.map +1 -0
- package/dist/Directory.js +42 -0
- package/dist/Directory.js.map +1 -0
- package/dist/ErrorReporter.d.ts +48 -0
- package/dist/ErrorReporter.d.ts.map +1 -0
- package/dist/ErrorReporter.js +70 -0
- package/dist/ErrorReporter.js.map +1 -0
- package/dist/ExpoSqlite.d.ts +7 -0
- package/dist/ExpoSqlite.d.ts.map +1 -0
- package/dist/ExpoSqlite.js +7 -0
- package/dist/ExpoSqlite.js.map +1 -0
- package/dist/FileSync.d.ts +265 -0
- package/dist/FileSync.d.ts.map +1 -0
- package/dist/FileSync.js +29 -0
- package/dist/FileSync.js.map +1 -0
- package/dist/FileTables.gen.d.ts +109 -0
- package/dist/FileTables.gen.d.ts.map +1 -0
- package/dist/FileTables.gen.js +23 -0
- package/dist/FileTables.gen.js.map +1 -0
- package/dist/Foldkit.d.ts +487 -0
- package/dist/Foldkit.d.ts.map +1 -0
- package/dist/Foldkit.js +617 -0
- package/dist/Foldkit.js.map +1 -0
- package/dist/History.d.ts +133 -0
- package/dist/History.d.ts.map +1 -0
- package/dist/History.js +210 -0
- package/dist/History.js.map +1 -0
- package/dist/InboxSync.d.ts +428 -0
- package/dist/InboxSync.d.ts.map +1 -0
- package/dist/InboxSync.js +37 -0
- package/dist/InboxSync.js.map +1 -0
- package/dist/KernelTables.gen.d.ts +1522 -0
- package/dist/KernelTables.gen.d.ts.map +1 -0
- package/dist/KernelTables.gen.js +307 -0
- package/dist/KernelTables.gen.js.map +1 -0
- package/dist/Make.d.ts +75 -0
- package/dist/Make.d.ts.map +1 -0
- package/dist/Make.js +70 -0
- package/dist/Make.js.map +1 -0
- package/dist/Models.d.ts +88 -0
- package/dist/Models.d.ts.map +1 -0
- package/dist/Models.js +80 -0
- package/dist/Models.js.map +1 -0
- package/dist/Optimistic.d.ts +120 -0
- package/dist/Optimistic.d.ts.map +1 -0
- package/dist/Optimistic.js +231 -0
- package/dist/Optimistic.js.map +1 -0
- package/dist/PlatformSync.d.ts +273 -0
- package/dist/PlatformSync.d.ts.map +1 -0
- package/dist/PlatformSync.js +92 -0
- package/dist/PlatformSync.js.map +1 -0
- package/dist/Poll.d.ts +113 -0
- package/dist/Poll.d.ts.map +1 -0
- package/dist/Poll.js +179 -0
- package/dist/Poll.js.map +1 -0
- package/dist/Preferences.d.ts +18 -0
- package/dist/Preferences.d.ts.map +1 -0
- package/dist/Preferences.js +22 -0
- package/dist/Preferences.js.map +1 -0
- package/dist/Proposals.d.ts +29 -0
- package/dist/Proposals.d.ts.map +1 -0
- package/dist/Proposals.js +41 -0
- package/dist/Proposals.js.map +1 -0
- package/dist/React.d.ts +17 -0
- package/dist/React.d.ts.map +1 -0
- package/dist/React.js +17 -0
- package/dist/React.js.map +1 -0
- package/dist/Reader.d.ts +35 -0
- package/dist/Reader.d.ts.map +1 -0
- package/dist/Reader.js +136 -0
- package/dist/Reader.js.map +1 -0
- package/dist/Resources.d.ts +98 -0
- package/dist/Resources.d.ts.map +1 -0
- package/dist/Resources.js +161 -0
- package/dist/Resources.js.map +1 -0
- package/dist/Rows.d.ts +4 -0
- package/dist/Rows.d.ts.map +1 -0
- package/dist/Rows.js +16 -0
- package/dist/Rows.js.map +1 -0
- package/dist/Runtime.d.ts +254 -0
- package/dist/Runtime.d.ts.map +1 -0
- package/dist/Runtime.js +1249 -0
- package/dist/Runtime.js.map +1 -0
- package/dist/RuntimeRuns.d.ts +74 -0
- package/dist/RuntimeRuns.d.ts.map +1 -0
- package/dist/RuntimeRuns.js +118 -0
- package/dist/RuntimeRuns.js.map +1 -0
- package/dist/ServicesSync.d.ts +286 -0
- package/dist/ServicesSync.d.ts.map +1 -0
- package/dist/ServicesSync.js +40 -0
- package/dist/ServicesSync.js.map +1 -0
- package/dist/Session.d.ts +226 -0
- package/dist/Session.d.ts.map +1 -0
- package/dist/Session.js +763 -0
- package/dist/Session.js.map +1 -0
- package/dist/ShareGrant.d.ts +47 -0
- package/dist/ShareGrant.d.ts.map +1 -0
- package/dist/ShareGrant.js +20 -0
- package/dist/ShareGrant.js.map +1 -0
- package/dist/Sharing.d.ts +203 -0
- package/dist/Sharing.d.ts.map +1 -0
- package/dist/Sharing.js +520 -0
- package/dist/Sharing.js.map +1 -0
- package/dist/Skew.d.ts +52 -0
- package/dist/Skew.d.ts.map +1 -0
- package/dist/Skew.js +77 -0
- package/dist/Skew.js.map +1 -0
- package/dist/SpacesSync.d.ts +247 -0
- package/dist/SpacesSync.d.ts.map +1 -0
- package/dist/SpacesSync.js +30 -0
- package/dist/SpacesSync.js.map +1 -0
- package/dist/Storage.d.ts +51 -0
- package/dist/Storage.d.ts.map +1 -0
- package/dist/Storage.js +107 -0
- package/dist/Storage.js.map +1 -0
- package/dist/Sync.d.ts +48 -0
- package/dist/Sync.d.ts.map +1 -0
- package/dist/Sync.js +48 -0
- package/dist/Sync.js.map +1 -0
- package/dist/SyncTables.d.ts +13 -0
- package/dist/SyncTables.d.ts.map +1 -0
- package/dist/SyncTables.js +13 -0
- package/dist/SyncTables.js.map +1 -0
- package/dist/Tab.d.ts +36 -0
- package/dist/Tab.d.ts.map +1 -0
- package/dist/Tab.js +44 -0
- package/dist/Tab.js.map +1 -0
- package/dist/Transport.d.ts +139 -0
- package/dist/Transport.d.ts.map +1 -0
- package/dist/Transport.js +232 -0
- package/dist/Transport.js.map +1 -0
- package/dist/Upload.d.ts +41 -0
- package/dist/Upload.d.ts.map +1 -0
- package/dist/Upload.js +93 -0
- package/dist/Upload.js.map +1 -0
- package/dist/WebMcp.d.ts +78 -0
- package/dist/WebMcp.d.ts.map +1 -0
- package/dist/WebMcp.js +204 -0
- package/dist/WebMcp.js.map +1 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -0
- package/package.json +97 -3
- package/src/Account.ts +249 -0
- package/src/Agent.ts +387 -0
- package/src/AgentSync.ts +59 -0
- package/src/AppState.ts +222 -0
- package/src/AppStateSync.ts +26 -0
- package/src/Auth.ts +225 -0
- package/src/Avatars.ts +144 -0
- package/src/BrowserAnalytics.ts +133 -0
- package/src/Chat.ts +1150 -0
- package/src/ChatIntegrity.ts +130 -0
- package/src/ChatSends.ts +209 -0
- package/src/Client.ts +319 -0
- package/src/Collab.ts +524 -0
- package/src/CollabTools.ts +381 -0
- package/src/Connections.ts +517 -0
- package/src/Consent.ts +176 -0
- package/src/Desktop.ts +139 -0
- package/src/Directory.ts +71 -0
- package/src/ErrorReporter.ts +112 -0
- package/src/ExpoSqlite.ts +6 -0
- package/src/FileSync.ts +34 -0
- package/src/FileTables.gen.ts +23 -0
- package/src/Foldkit.ts +960 -0
- package/src/History.ts +337 -0
- package/src/InboxSync.ts +47 -0
- package/src/KernelTables.gen.ts +329 -0
- package/src/Make.ts +120 -0
- package/src/Models.ts +134 -0
- package/src/Optimistic.ts +364 -0
- package/src/PlatformSync.ts +156 -0
- package/src/Poll.ts +227 -0
- package/src/Preferences.ts +42 -0
- package/src/Proposals.ts +57 -0
- package/src/React.ts +26 -0
- package/src/Reader.ts +180 -0
- package/src/Resources.ts +257 -0
- package/src/Rows.ts +16 -0
- package/src/Runtime.ts +1409 -0
- package/src/RuntimeRuns.ts +180 -0
- package/src/ServicesSync.ts +58 -0
- package/src/Session.ts +814 -0
- package/src/ShareGrant.ts +20 -0
- package/src/Sharing.ts +696 -0
- package/src/Skew.ts +97 -0
- package/src/SpacesSync.ts +61 -0
- package/src/Storage.ts +167 -0
- package/src/Sync.ts +125 -0
- package/src/SyncTables.ts +12 -0
- package/src/Tab.ts +59 -0
- package/src/Transport.ts +321 -0
- package/src/Upload.ts +125 -0
- package/src/WebMcp.ts +279 -0
- package/src/index.ts +26 -0
- package/src/web-globals.d.ts +103 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
export declare const eloxivFileTable: import("@rocicorp/zero").TableBuilderWithColumns<{
|
|
2
|
+
name: "eloxivFile";
|
|
3
|
+
columns: {
|
|
4
|
+
readonly id: {
|
|
5
|
+
type: "string";
|
|
6
|
+
optional: false;
|
|
7
|
+
customType: string;
|
|
8
|
+
};
|
|
9
|
+
readonly orgId: {
|
|
10
|
+
type: "string";
|
|
11
|
+
optional: false;
|
|
12
|
+
customType: string;
|
|
13
|
+
} & {
|
|
14
|
+
serverName: string;
|
|
15
|
+
};
|
|
16
|
+
readonly ownerType: Omit<{
|
|
17
|
+
type: "string";
|
|
18
|
+
optional: false;
|
|
19
|
+
customType: string;
|
|
20
|
+
} & {
|
|
21
|
+
serverName: string;
|
|
22
|
+
}, "optional"> & {
|
|
23
|
+
optional: true;
|
|
24
|
+
};
|
|
25
|
+
readonly ownerId: Omit<{
|
|
26
|
+
type: "string";
|
|
27
|
+
optional: false;
|
|
28
|
+
customType: string;
|
|
29
|
+
} & {
|
|
30
|
+
serverName: string;
|
|
31
|
+
}, "optional"> & {
|
|
32
|
+
optional: true;
|
|
33
|
+
};
|
|
34
|
+
readonly name: {
|
|
35
|
+
type: "string";
|
|
36
|
+
optional: false;
|
|
37
|
+
customType: string;
|
|
38
|
+
};
|
|
39
|
+
readonly declaredType: {
|
|
40
|
+
type: "string";
|
|
41
|
+
optional: false;
|
|
42
|
+
customType: string;
|
|
43
|
+
} & {
|
|
44
|
+
serverName: string;
|
|
45
|
+
};
|
|
46
|
+
readonly contentType: Omit<{
|
|
47
|
+
type: "string";
|
|
48
|
+
optional: false;
|
|
49
|
+
customType: string;
|
|
50
|
+
} & {
|
|
51
|
+
serverName: string;
|
|
52
|
+
}, "optional"> & {
|
|
53
|
+
optional: true;
|
|
54
|
+
};
|
|
55
|
+
readonly size: {
|
|
56
|
+
type: "number";
|
|
57
|
+
optional: false;
|
|
58
|
+
customType: number;
|
|
59
|
+
};
|
|
60
|
+
readonly sha256: Omit<{
|
|
61
|
+
type: "string";
|
|
62
|
+
optional: false;
|
|
63
|
+
customType: string;
|
|
64
|
+
}, "optional"> & {
|
|
65
|
+
optional: true;
|
|
66
|
+
};
|
|
67
|
+
readonly state: {
|
|
68
|
+
type: "string";
|
|
69
|
+
optional: false;
|
|
70
|
+
customType: "available" | "deleted" | "processing" | "quarantined" | "rejected" | "uploading";
|
|
71
|
+
};
|
|
72
|
+
readonly stateReason: Omit<{
|
|
73
|
+
type: "string";
|
|
74
|
+
optional: false;
|
|
75
|
+
customType: string;
|
|
76
|
+
} & {
|
|
77
|
+
serverName: string;
|
|
78
|
+
}, "optional"> & {
|
|
79
|
+
optional: true;
|
|
80
|
+
};
|
|
81
|
+
readonly uploadedBy: {
|
|
82
|
+
type: "string";
|
|
83
|
+
optional: false;
|
|
84
|
+
customType: string;
|
|
85
|
+
} & {
|
|
86
|
+
serverName: string;
|
|
87
|
+
};
|
|
88
|
+
readonly createdAt: {
|
|
89
|
+
type: "number";
|
|
90
|
+
optional: false;
|
|
91
|
+
customType: number;
|
|
92
|
+
} & {
|
|
93
|
+
serverName: string;
|
|
94
|
+
};
|
|
95
|
+
readonly completedAt: Omit<{
|
|
96
|
+
type: "number";
|
|
97
|
+
optional: false;
|
|
98
|
+
customType: number;
|
|
99
|
+
} & {
|
|
100
|
+
serverName: string;
|
|
101
|
+
}, "optional"> & {
|
|
102
|
+
optional: true;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
primaryKey: readonly [string, ...string[]];
|
|
106
|
+
} & {
|
|
107
|
+
primaryKey: ["id"];
|
|
108
|
+
}>;
|
|
109
|
+
//# sourceMappingURL=FileTables.gen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileTables.gen.d.ts","sourceRoot":"","sources":["../src/FileTables.gen.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkBT,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Generated from the kernel's file metadata Drizzle tables and entities by packages/testing/scripts/sync-tables.ts (the CLI's
|
|
2
|
+
// sync generator, through drizzle-zero 0.21.0). Do not edit: run `pnpm --filter @eloxiv/testing generate`.
|
|
3
|
+
import { enumeration, number, string, table } from "@rocicorp/zero";
|
|
4
|
+
export const eloxivFileTable = table("eloxivFile")
|
|
5
|
+
.from("eloxiv.file")
|
|
6
|
+
.columns({
|
|
7
|
+
id: string(),
|
|
8
|
+
orgId: string().from("org_id"),
|
|
9
|
+
ownerType: string().from("owner_type").optional(),
|
|
10
|
+
ownerId: string().from("owner_id").optional(),
|
|
11
|
+
name: string(),
|
|
12
|
+
declaredType: string().from("declared_type"),
|
|
13
|
+
contentType: string().from("content_type").optional(),
|
|
14
|
+
size: number(),
|
|
15
|
+
sha256: string().optional(),
|
|
16
|
+
state: enumeration(),
|
|
17
|
+
stateReason: string().from("state_reason").optional(),
|
|
18
|
+
uploadedBy: string().from("uploaded_by"),
|
|
19
|
+
createdAt: number().from("created_at"),
|
|
20
|
+
completedAt: number().from("completed_at").optional(),
|
|
21
|
+
})
|
|
22
|
+
.primaryKey("id");
|
|
23
|
+
//# sourceMappingURL=FileTables.gen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileTables.gen.js","sourceRoot":"","sources":["../src/FileTables.gen.ts"],"names":[],"mappings":"AAAA,8HAA8H;AAC9H,2GAA2G;AAC3G,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAEnE,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAC,YAAY,CAAC;KAC/C,IAAI,CAAC,aAAa,CAAC;KACnB,OAAO,CAAC;IACP,EAAE,EAAE,MAAM,EAAE;IACZ,KAAK,EAAE,MAAM,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC;IAC9B,SAAS,EAAE,MAAM,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,QAAQ,EAAE;IACjD,OAAO,EAAE,MAAM,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,QAAQ,EAAE;IAC7C,IAAI,EAAE,MAAM,EAAE;IACd,YAAY,EAAE,MAAM,EAAE,CAAC,IAAI,CAAC,eAAe,CAAC;IAC5C,WAAW,EAAE,MAAM,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,QAAQ,EAAE;IACrD,IAAI,EAAE,MAAM,EAAE;IACd,MAAM,EAAE,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC3B,KAAK,EAAE,WAAW,EAAqF;IACvG,WAAW,EAAE,MAAM,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,QAAQ,EAAE;IACrD,UAAU,EAAE,MAAM,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC;IACxC,SAAS,EAAE,MAAM,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC;IACtC,WAAW,EAAE,MAAM,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,QAAQ,EAAE;CACtD,CAAC;KACD,UAAU,CAAC,IAAI,CAAC,CAAA"}
|
|
@@ -0,0 +1,487 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Foldkit bindings for the replica and the action client (`@eloxiv/client/foldkit`, decision 10), so a Foldkit
|
|
3
|
+
* shell reaches sync only through Eloxiv's client (decision 9). The headless SDK (`@eloxiv/client`) does not load
|
|
4
|
+
* Foldkit; this entry needs `foldkit` in the app.
|
|
5
|
+
*
|
|
6
|
+
* Zero keeps replication, local storage, queued optimistic writes and reconciliation. These bindings put its
|
|
7
|
+
* lifetimes and results into The Elm Architecture, with no second entity cache:
|
|
8
|
+
*
|
|
9
|
+
* - **Credentials stay out of the Elm state** (`Credentials`): the Model, Messages and Command arguments name a
|
|
10
|
+
* session by an opaque handle; the bearer token lives in a store outside the program, read by Commands and the
|
|
11
|
+
* replica's resource when they run, so DevTools, traces and diagnostics never see it.
|
|
12
|
+
* - **The replica is a ManagedResource** (`replicaResources`): the Model says whose replica should be open, in which
|
|
13
|
+
* organisation and under which session (`ReplicaRequirements`, the session's handle); the runtime opens it when that
|
|
14
|
+
* becomes known,
|
|
15
|
+
* closes it (its WebSocket included) when it changes or ends, and reports each transition as a Message
|
|
16
|
+
* (`onOpened` with the replica's `ReplicaKey`, `onClosed`, `onFailed`). A switch closes one replica before the
|
|
17
|
+
* next opens.
|
|
18
|
+
* - **Live queries are Subscriptions** (`liveQuery`): while the Model holds an open replica's key, a named query's
|
|
19
|
+
* results arrive as Messages carrying that key, copied out of Zero's view (rows typed by the entity's row
|
|
20
|
+
* schema, never a second declaration of its fields). Update keeps only snapshots of the replica the Model holds
|
|
21
|
+
* (`receive`), so a snapshot from a closed replica is dropped, never rendered.
|
|
22
|
+
* - **Connection state is a Subscription** (`connectionState`): `needs-auth`, `error` and the rest arrive as Messages.
|
|
23
|
+
* - **Writes are Effects for Commands.** `writeOptimistic` applies an action's prediction to the replica the Command
|
|
24
|
+
* names (refusing any other: `ReplicaUnavailable`) and waits for the server: it fails with the invocation's typed
|
|
25
|
+
* error (`Forbidden`, `InvalidInput`, ...) once the replica has dropped the prediction, or `WriteNotConfirmed`
|
|
26
|
+
* when the replica closes first. `callAction` calls an action through the typed client in the Command's own
|
|
27
|
+
* fiber. Cancellation is explicit: interrupting a Command abandons its wait and aborts an action call's request;
|
|
28
|
+
* it never takes back a write the replica has already queued, which the server still runs once (or refuses) and
|
|
29
|
+
* the replica still reconciles.
|
|
30
|
+
* - **Collaborative documents are Subscriptions** (`collabDocument`): while the Model names a record and a session,
|
|
31
|
+
* its document is open and every change arrives as a snapshot Message (text, status, presence); Commands edit it
|
|
32
|
+
* (`editCollabText`, `setCollabPresence`). The Y.Doc stays in the runtime, never in the Model.
|
|
33
|
+
*/
|
|
34
|
+
import { InvocationError, type AnyModuleContract } from "@eloxiv/contracts";
|
|
35
|
+
import type { MutateRequest, QueryRequest } from "@rocicorp/zero";
|
|
36
|
+
import { Deferred, Effect, Option, Schema, Stream } from "effect";
|
|
37
|
+
import { ManagedResource } from "foldkit";
|
|
38
|
+
import type { ActionInput, ActionName, ActionOutput, EloxivClient } from "./Client.ts";
|
|
39
|
+
import { type CollabTextEdit } from "./Collab.ts";
|
|
40
|
+
import type { ClientRuntime, RuntimeEvent } from "./Runtime.ts";
|
|
41
|
+
import type { RevocationStatus } from "./Session.ts";
|
|
42
|
+
import { type SyncClient, type SyncSchema, type SyncStorage } from "./Sync.ts";
|
|
43
|
+
/**
|
|
44
|
+
* Bearer tokens held outside the Elm state, each named by an opaque handle that the Model, Messages and Command
|
|
45
|
+
* arguments carry instead. A handle reveals nothing about its token; `forget` drops a token for good.
|
|
46
|
+
*/
|
|
47
|
+
export interface Credentials {
|
|
48
|
+
/** Holds a token and returns the handle that names it. */
|
|
49
|
+
readonly keep: (token: string) => string;
|
|
50
|
+
/** The token a handle names, while it is held. */
|
|
51
|
+
readonly token: (handle: string) => string | undefined;
|
|
52
|
+
readonly forget: (handle: string) => void;
|
|
53
|
+
}
|
|
54
|
+
export declare const makeCredentials: () => Credentials;
|
|
55
|
+
/** Whose replica should be open: one user, in one organisation, under one session (its handle, never its token). */
|
|
56
|
+
export declare const ReplicaRequirements: Schema.Struct<{
|
|
57
|
+
readonly userId: Schema.String;
|
|
58
|
+
readonly orgId: Schema.String;
|
|
59
|
+
readonly session: Schema.String;
|
|
60
|
+
}>;
|
|
61
|
+
export type ReplicaRequirements = typeof ReplicaRequirements.Type;
|
|
62
|
+
/**
|
|
63
|
+
* An opened replica's identity: its user and organisation, and which opening it is (each opening gets a new
|
|
64
|
+
* number, so a replica reopened for the same user and organisation is a different one). It never holds the token.
|
|
65
|
+
*/
|
|
66
|
+
export declare const ReplicaKey: Schema.Struct<{
|
|
67
|
+
readonly userId: Schema.String;
|
|
68
|
+
readonly orgId: Schema.String;
|
|
69
|
+
readonly opening: Schema.Number;
|
|
70
|
+
}>;
|
|
71
|
+
export type ReplicaKey = typeof ReplicaKey.Type;
|
|
72
|
+
export declare const sameReplica: (a: ReplicaKey, b: ReplicaKey) => boolean;
|
|
73
|
+
/** The replica as the Model records it: none, being opened for an organisation, open, or failed to open. */
|
|
74
|
+
export declare const ReplicaState: Schema.Union<readonly [Schema.TaggedStruct<"Closed", {}>, Schema.TaggedStruct<"Opening", {
|
|
75
|
+
readonly orgId: Schema.String;
|
|
76
|
+
}>, Schema.TaggedStruct<"Open", {
|
|
77
|
+
readonly key: Schema.Struct<{
|
|
78
|
+
readonly userId: Schema.String;
|
|
79
|
+
readonly orgId: Schema.String;
|
|
80
|
+
readonly opening: Schema.Number;
|
|
81
|
+
}>;
|
|
82
|
+
}>, Schema.TaggedStruct<"Failed", {
|
|
83
|
+
readonly orgId: Schema.String;
|
|
84
|
+
readonly message: Schema.String;
|
|
85
|
+
}>]>;
|
|
86
|
+
export type ReplicaState = typeof ReplicaState.Type;
|
|
87
|
+
export declare const ReplicaClosed: ReplicaState;
|
|
88
|
+
export declare const ReplicaOpening: (orgId: string) => ReplicaState;
|
|
89
|
+
/** The key of the replica the Model holds open, if any. */
|
|
90
|
+
export declare const openReplica: (state: ReplicaState) => Option.Option<ReplicaKey>;
|
|
91
|
+
/**
|
|
92
|
+
* A replica this adapter opened itself (`replicaResources`, deprecated): its key and the Zero client, typed by the
|
|
93
|
+
* app's schema.
|
|
94
|
+
*/
|
|
95
|
+
export interface OpenReplica<S extends SyncSchema = SyncSchema> {
|
|
96
|
+
readonly key: ReplicaKey;
|
|
97
|
+
readonly zero: SyncClient<S>;
|
|
98
|
+
/** Completed when the replica is closed: waits on its writes stop waiting. */
|
|
99
|
+
readonly closed: Deferred.Deferred<void>;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* The ClientRuntime's replica of one generation (`runtimeReplica`): the runtime owns it (opening, closing, live
|
|
103
|
+
* queries, writes); this names which context a Command or Subscription acts in. `key.opening` is the generation.
|
|
104
|
+
*/
|
|
105
|
+
export interface RuntimeReplica {
|
|
106
|
+
readonly key: ReplicaKey;
|
|
107
|
+
readonly runtime: ClientRuntime;
|
|
108
|
+
/** The runtime client its subscriptions and writes are made as. */
|
|
109
|
+
readonly owner: string;
|
|
110
|
+
/** Completed when the Model let go of this generation: waits on its writes stop waiting. */
|
|
111
|
+
readonly closed: Deferred.Deferred<void>;
|
|
112
|
+
}
|
|
113
|
+
/** The replica's ManagedResource identity: Commands and Subscriptions reach the open replica through it. */
|
|
114
|
+
export declare const Replica: ManagedResource.ManagedResource<OpenReplica<any>, ManagedResource.ManagedResourceService<"@eloxiv/client/Replica">>;
|
|
115
|
+
export type ReplicaService = ManagedResource.ServiceOf<typeof Replica>;
|
|
116
|
+
declare const ReplicaOpenFailed_base: Schema.Class<ReplicaOpenFailed, Schema.TaggedStruct<"ReplicaOpenFailed", {
|
|
117
|
+
readonly orgId: Schema.String;
|
|
118
|
+
readonly message: Schema.String;
|
|
119
|
+
}>, import("effect/Cause").YieldableError>;
|
|
120
|
+
/** Opening the replica failed (for the organisation it was opened for). */
|
|
121
|
+
export declare class ReplicaOpenFailed extends ReplicaOpenFailed_base {
|
|
122
|
+
}
|
|
123
|
+
export interface ReplicaOptions<Model, Message, S extends SyncSchema> {
|
|
124
|
+
/** zero-cache's URL. */
|
|
125
|
+
readonly server: string;
|
|
126
|
+
/** The app's generated sync schema (`schema` from `eloxiv.sync.ts`). */
|
|
127
|
+
readonly schema: S;
|
|
128
|
+
/** The app's mutators (`mutators` from `eloxiv.sync.ts`), for `writeOptimistic`. */
|
|
129
|
+
readonly mutators?: unknown;
|
|
130
|
+
/** Replica storage: `"idb"` in browsers and webviews (the default here), `"mem"`, or a store provider. */
|
|
131
|
+
readonly storage?: SyncStorage | undefined;
|
|
132
|
+
/** This build's version, sent with each pushed write. */
|
|
133
|
+
readonly clientVersion?: string | undefined;
|
|
134
|
+
/** Which replica the Model wants open: `Option.none()` while there is no session or no organisation yet. */
|
|
135
|
+
readonly requirements: (model: Model) => Option.Option<ReplicaRequirements>;
|
|
136
|
+
/** Where the requirements' session handle is resolved to its token, when the replica opens. */
|
|
137
|
+
readonly credentials: Credentials;
|
|
138
|
+
readonly onOpened: (key: ReplicaKey) => Message;
|
|
139
|
+
readonly onClosed: () => Message;
|
|
140
|
+
readonly onFailed: (failure: {
|
|
141
|
+
readonly orgId: string;
|
|
142
|
+
readonly message: string;
|
|
143
|
+
}) => Message;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* The replica as a Foldkit ManagedResource record, for `makeApplication({ managedResources })` (combine it with an
|
|
147
|
+
* app's own through `ManagedResource.aggregate`). Opening it connects to zero-cache; releasing it closes Zero,
|
|
148
|
+
* which closes its WebSocket, and ends every wait on its writes.
|
|
149
|
+
*
|
|
150
|
+
* @deprecated A second implementation of the replica's lifetime beside the client core's: use `runtimeReplica` over
|
|
151
|
+
* one `makeClientRuntime` (`@eloxiv/client/runtime`), which owns the session, the organisation's generation, the
|
|
152
|
+
* replica, live queries and writes for every client. `liveQuery`, `writeOptimistic` and `connectionState` work
|
|
153
|
+
* over either.
|
|
154
|
+
*/
|
|
155
|
+
export declare const replicaResources: <Model, Message, const S extends SyncSchema>(options: ReplicaOptions<Model, Message, S>) => {
|
|
156
|
+
eloxivReplica: ManagedResource.Entry<Model, Message, Option.Option<{
|
|
157
|
+
readonly userId: string;
|
|
158
|
+
readonly orgId: string;
|
|
159
|
+
readonly session: string;
|
|
160
|
+
}>, OpenReplica<any>, ManagedResource.ManagedResourceService<"@eloxiv/client/Replica">, (replica: OpenReplica<S>) => Message>;
|
|
161
|
+
};
|
|
162
|
+
/** Which generation of the runtime's context the Model wants to act in: one person, one organisation. */
|
|
163
|
+
export declare const RuntimeReplicaRequirements: Schema.Struct<{
|
|
164
|
+
readonly userId: Schema.String;
|
|
165
|
+
readonly orgId: Schema.String;
|
|
166
|
+
readonly generation: Schema.Number;
|
|
167
|
+
}>;
|
|
168
|
+
export type RuntimeReplicaRequirements = typeof RuntimeReplicaRequirements.Type;
|
|
169
|
+
export interface RuntimeReplicaOptions<Model, Message> {
|
|
170
|
+
/** The program's one client core: it opens and closes the replica itself, on its context changes. */
|
|
171
|
+
readonly runtime: ClientRuntime;
|
|
172
|
+
/** The runtime client this program's subscriptions and writes are made as (default `foldkit`). */
|
|
173
|
+
readonly owner?: string | undefined;
|
|
174
|
+
/** The generation the Model acts in, once the runtime has announced it (`Option.none()` before, and between). */
|
|
175
|
+
readonly requirements: (model: Model) => Option.Option<RuntimeReplicaRequirements>;
|
|
176
|
+
readonly onOpened: (key: ReplicaKey) => Message;
|
|
177
|
+
readonly onClosed: () => Message;
|
|
178
|
+
readonly onFailed: (failure: {
|
|
179
|
+
readonly orgId: string;
|
|
180
|
+
readonly message: string;
|
|
181
|
+
}) => Message;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* The ClientRuntime's replica as a Foldkit ManagedResource record (`makeApplication({ managedResources })`): the
|
|
185
|
+
* runtime owns the replica's lifetime (an organisation change, a sign-out or `needs-auth` destroys its views and closes
|
|
186
|
+
* it before anything of the next context is emitted), and this resource names the generation the Model acts in, so
|
|
187
|
+
* Commands and Subscriptions reach it through `ReplicaService` as before: `liveQuery` runs a named query through
|
|
188
|
+
* `runtime.subscribe`, `writeOptimistic` writes through `runtime.write`, both refused for another generation. The key's
|
|
189
|
+
* `opening` is the generation; `onOpened` reports it once the Model's requirements are taken, `onClosed` when they go.
|
|
190
|
+
*/
|
|
191
|
+
export declare const runtimeReplica: <Model, Message>(options: RuntimeReplicaOptions<Model, Message>) => {
|
|
192
|
+
eloxivReplica: ManagedResource.Entry<Model, Message, Option.Option<{
|
|
193
|
+
readonly userId: string;
|
|
194
|
+
readonly orgId: string;
|
|
195
|
+
readonly generation: number;
|
|
196
|
+
}>, RuntimeReplica, ManagedResource.ManagedResourceService<"@eloxiv/client/Replica">, (replica: RuntimeReplica) => Message>;
|
|
197
|
+
};
|
|
198
|
+
/**
|
|
199
|
+
* The runtime's events as a Foldkit Subscription entry, for a `Subscription.make` record: while it runs, `toMessage`
|
|
200
|
+
* turns each event (and, first, the runtime's current state, `initial`) into Messages; `rows` and `write` events are
|
|
201
|
+
* left to `liveQuery` and `writeOptimistic`. The adapter's one way the runtime's session, context and connection reach
|
|
202
|
+
* a Model.
|
|
203
|
+
*/
|
|
204
|
+
export declare const runtimeEvents: <Message>(options: {
|
|
205
|
+
readonly runtime: ClientRuntime;
|
|
206
|
+
/** What the Model should hear when the Subscription starts (the session as it stands, say). */
|
|
207
|
+
readonly initial: () => ReadonlyArray<Message>;
|
|
208
|
+
readonly toMessage: (event: RuntimeEvent) => Message | undefined;
|
|
209
|
+
/** Revocation changes of a durable sign-out, when the Model shows them. */
|
|
210
|
+
readonly onRevocation?: ((status: RevocationStatus) => Message) | undefined;
|
|
211
|
+
}) => {
|
|
212
|
+
dependenciesSchema: Schema.Struct<{}>;
|
|
213
|
+
modelToDependencies: (_model: unknown) => {};
|
|
214
|
+
dependenciesToStream: () => Stream.Stream<Message>;
|
|
215
|
+
};
|
|
216
|
+
/**
|
|
217
|
+
* The runtime's session behind an opaque handle in `credentials`, for Models, Messages and Command arguments: the
|
|
218
|
+
* same handle while the token is the same, a new one when it changes (a new sign-in, a rotated session), and the old
|
|
219
|
+
* handle forgotten then, or when nobody is signed in, so a Command still holding it reads no token.
|
|
220
|
+
*/
|
|
221
|
+
export declare const runtimeSessionHandle: (runtime: ClientRuntime, credentials: Credentials) => () => string | undefined;
|
|
222
|
+
declare const ReplicaUnavailable_base: Schema.Class<ReplicaUnavailable, Schema.TaggedStruct<"ReplicaUnavailable", {
|
|
223
|
+
readonly message: Schema.String;
|
|
224
|
+
}>, import("effect/Cause").YieldableError>;
|
|
225
|
+
/** The open replica, if it is the one `key` names; `ReplicaUnavailable` otherwise. */
|
|
226
|
+
export declare class ReplicaUnavailable extends ReplicaUnavailable_base {
|
|
227
|
+
}
|
|
228
|
+
export declare const replicaFor: (key: ReplicaKey) => Effect.Effect<OpenReplica | RuntimeReplica, ReplicaUnavailable, ReplicaService>;
|
|
229
|
+
/** Where a query's result stands, as Zero reports it. */
|
|
230
|
+
export declare const ResultStatus: Schema.Literals<readonly ["unknown", "cached", "complete", "error"]>;
|
|
231
|
+
export type ResultStatus = typeof ResultStatus.Type;
|
|
232
|
+
/** One result of a live query: the rows (copied out of Zero's view), from which replica, and how settled. */
|
|
233
|
+
export interface Snapshot<Row> {
|
|
234
|
+
readonly key: ReplicaKey;
|
|
235
|
+
readonly rows: ReadonlyArray<Row>;
|
|
236
|
+
readonly status: ResultStatus;
|
|
237
|
+
readonly error: Option.Option<string>;
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* The schema of a snapshot of rows of type `Row`, checked by `row`: the entity's row schema (`entity.row`) checks
|
|
241
|
+
* each row as it arrives, and `Row` (the generated sync table's row type, `Row<typeof greetingTable>`) types it,
|
|
242
|
+
* both derived from the module's one Drizzle table.
|
|
243
|
+
*/
|
|
244
|
+
export declare const Snapshot: <Row>(row: Schema.Top) => Schema.Codec<Snapshot<Row>, unknown>;
|
|
245
|
+
/**
|
|
246
|
+
* A query's place in the Model: waiting for the replica's first result, or the latest result of the replica the
|
|
247
|
+
* Model holds. Interaction state only: the rows are what the replica delivered, as delivered.
|
|
248
|
+
*/
|
|
249
|
+
export declare const QueryState: <Row>(row: Schema.Top) => Schema.Codec<QueryState<Row>, unknown>;
|
|
250
|
+
export type QueryState<Row> = {
|
|
251
|
+
readonly _tag: "Waiting";
|
|
252
|
+
} | {
|
|
253
|
+
readonly _tag: "Received";
|
|
254
|
+
readonly snapshot: Snapshot<Row>;
|
|
255
|
+
};
|
|
256
|
+
export declare const QueryWaiting: QueryState<never>;
|
|
257
|
+
/**
|
|
258
|
+
* The query state after a snapshot arrives: kept only when it comes from the replica the Model holds open, so a
|
|
259
|
+
* snapshot that left a closed replica before it closed is never shown.
|
|
260
|
+
*/
|
|
261
|
+
export declare const receive: <Row>(state: QueryState<Row>, replica: ReplicaState, snapshot: Snapshot<Row>) => QueryState<Row>;
|
|
262
|
+
/**
|
|
263
|
+
* A snapshot's rows when it comes from `replica` (the replica a screen was made for: its user, organisation and
|
|
264
|
+
* opening), none otherwise: a snapshot that left another replica (the previous organisation's, a closed one's)
|
|
265
|
+
* before its view was destroyed is never taken. For a handler that keeps rows rather than a `QueryState`.
|
|
266
|
+
*/
|
|
267
|
+
export declare const rowsFrom: <Row>(replica: ReplicaKey, snapshot: Snapshot<Row>) => Option.Option<ReadonlyArray<Row>>;
|
|
268
|
+
/**
|
|
269
|
+
* `rowsFrom`, once the server has answered: none for a snapshot of another replica, and none while the replica has
|
|
270
|
+
* only what it held before asking (`unknown`), which a screen must not show as the query's answer (an empty list on
|
|
271
|
+
* a slow first sync reads as "nothing there"). For a handler that keeps rows and says it is ready once it has some.
|
|
272
|
+
*/
|
|
273
|
+
export declare const settledRowsFrom: <Row>(replica: ReplicaKey, snapshot: Snapshot<Row>) => Option.Option<ReadonlyArray<Row>>;
|
|
274
|
+
/** The rows to render: the received snapshot's, or none while waiting. */
|
|
275
|
+
export declare const rowsOf: <Row>(state: QueryState<Row>) => ReadonlyArray<Row>;
|
|
276
|
+
/** Whether the server has confirmed the result (this session or a cached earlier one). */
|
|
277
|
+
export declare const isSettled: (state: QueryState<unknown>) => boolean;
|
|
278
|
+
/** A named query to run: what `queries.<module>.<name>(args)` from `eloxiv.sync.ts` returns. */
|
|
279
|
+
type NamedQuery = Pick<QueryRequest<any, any, any, any, any, any>, "args" | "~"> & {
|
|
280
|
+
readonly query: unknown;
|
|
281
|
+
};
|
|
282
|
+
/**
|
|
283
|
+
* A live query as a Foldkit Subscription entry, for a `Subscription.make` record. While `replica(model)` names an
|
|
284
|
+
* open replica, the query runs there and every change arrives as `toMessage(snapshot, scope)`; when the Model's
|
|
285
|
+
* replica changes or closes, the view is destroyed and a new one opens on the next replica.
|
|
286
|
+
*
|
|
287
|
+
* A record-scoped query (one thread, one person) takes `scope(model)`, the argument it is run with
|
|
288
|
+
* (`query(scope)`): when it changes, the view on the old one is destroyed and one on the new one opens, and each
|
|
289
|
+
* snapshot names the scope it is of.
|
|
290
|
+
*/
|
|
291
|
+
export declare const liveQuery: <Model, Message, Row>(options: {
|
|
292
|
+
readonly replica: (model: Model) => Option.Option<ReplicaKey>;
|
|
293
|
+
readonly scope?: (model: Model) => string;
|
|
294
|
+
readonly query: (scope: string) => NamedQuery;
|
|
295
|
+
readonly toMessage: (snapshot: Snapshot<Row>, scope: string) => Message;
|
|
296
|
+
}) => {
|
|
297
|
+
dependenciesSchema: Schema.Struct<{
|
|
298
|
+
readonly replica: Schema.Option<Schema.Struct<{
|
|
299
|
+
readonly userId: Schema.String;
|
|
300
|
+
readonly orgId: Schema.String;
|
|
301
|
+
readonly opening: Schema.Number;
|
|
302
|
+
}>>;
|
|
303
|
+
readonly scope: Schema.String;
|
|
304
|
+
}>;
|
|
305
|
+
modelToDependencies: (model: Model) => {
|
|
306
|
+
replica: Option.Option<{
|
|
307
|
+
readonly userId: string;
|
|
308
|
+
readonly orgId: string;
|
|
309
|
+
readonly opening: number;
|
|
310
|
+
}>;
|
|
311
|
+
scope: string;
|
|
312
|
+
};
|
|
313
|
+
dependenciesToStream: ({ replica, scope, }: {
|
|
314
|
+
readonly replica: Option.Option<ReplicaKey>;
|
|
315
|
+
readonly scope?: string;
|
|
316
|
+
}) => Stream.Stream<Message, never, ReplicaService>;
|
|
317
|
+
};
|
|
318
|
+
/** Zero's connection state, as Messages carry it. */
|
|
319
|
+
export declare const ConnectionState: Schema.Struct<{
|
|
320
|
+
readonly key: Schema.Struct<{
|
|
321
|
+
readonly userId: Schema.String;
|
|
322
|
+
readonly orgId: Schema.String;
|
|
323
|
+
readonly opening: Schema.Number;
|
|
324
|
+
}>;
|
|
325
|
+
readonly state: Schema.Literals<readonly ["initializing", "connecting", "disconnected", "connected", "needs-auth", "error", "closed"]>;
|
|
326
|
+
readonly reason: Schema.Option<Schema.String>;
|
|
327
|
+
}>;
|
|
328
|
+
export type ConnectionState = typeof ConnectionState.Type;
|
|
329
|
+
/** The open replica's connection state as a Subscription entry: every change (and the current state) as a Message. */
|
|
330
|
+
export declare const connectionState: <Model, Message>(options: {
|
|
331
|
+
readonly replica: (model: Model) => Option.Option<ReplicaKey>;
|
|
332
|
+
readonly toMessage: (state: ConnectionState) => Message;
|
|
333
|
+
}) => {
|
|
334
|
+
dependenciesSchema: Schema.Struct<{
|
|
335
|
+
readonly replica: Schema.Option<Schema.Struct<{
|
|
336
|
+
readonly userId: Schema.String;
|
|
337
|
+
readonly orgId: Schema.String;
|
|
338
|
+
readonly opening: Schema.Number;
|
|
339
|
+
}>>;
|
|
340
|
+
}>;
|
|
341
|
+
modelToDependencies: (model: Model) => {
|
|
342
|
+
replica: Option.Option<{
|
|
343
|
+
readonly userId: string;
|
|
344
|
+
readonly orgId: string;
|
|
345
|
+
readonly opening: number;
|
|
346
|
+
}>;
|
|
347
|
+
};
|
|
348
|
+
dependenciesToStream: ({ replica, }: {
|
|
349
|
+
readonly replica: Option.Option<ReplicaKey>;
|
|
350
|
+
}) => Stream.Stream<Message, never, ReplicaService>;
|
|
351
|
+
};
|
|
352
|
+
declare const WriteNotConfirmed_base: Schema.Class<WriteNotConfirmed, Schema.TaggedStruct<"WriteNotConfirmed", {
|
|
353
|
+
readonly message: Schema.String;
|
|
354
|
+
}>, import("effect/Cause").YieldableError>;
|
|
355
|
+
/** The server did not confirm a write: the replica closed or went offline before it answered. It may still run. */
|
|
356
|
+
export declare class WriteNotConfirmed extends WriteNotConfirmed_base {
|
|
357
|
+
}
|
|
358
|
+
/** Why a write did not land, as a Message carries it: the invocation's typed error, or no confirmation. */
|
|
359
|
+
export declare const WriteError: Schema.Union<readonly [Schema.Union<readonly [typeof import("@eloxiv/contracts").Unauthenticated, typeof import("@eloxiv/contracts").Forbidden, typeof import("@eloxiv/contracts").ApprovalRequired, typeof import("@eloxiv/contracts").ConsentRequired, typeof import("@eloxiv/contracts").IdempotencyConflict, typeof import("@eloxiv/contracts").InvalidInput, typeof import("@eloxiv/contracts").UnknownAction, typeof import("@eloxiv/contracts").ActionFailed, typeof import("@eloxiv/contracts").ClientOutdated]>, typeof WriteNotConfirmed, typeof ReplicaUnavailable]>;
|
|
360
|
+
export type WriteError = typeof WriteError.Type;
|
|
361
|
+
/**
|
|
362
|
+
* Write optimistically on the replica `key` names: `writeOptimistic(key, mutators.hello.greet({ message }))`. The
|
|
363
|
+
* prediction is applied at once (the live queries show it); the Effect succeeds once the server ran the action and
|
|
364
|
+
* the replica holds its rows, and fails with the invocation's typed error once the replica has dropped the
|
|
365
|
+
* prediction, `WriteNotConfirmed` if the replica closes first, or `ReplicaUnavailable` if `key` is not the open
|
|
366
|
+
* replica (nothing is written then). Interrupting it stops the wait, not the write.
|
|
367
|
+
*/
|
|
368
|
+
export declare const writeOptimistic: (key: ReplicaKey, request: MutateRequest<any, any, any, any>) => Effect.Effect<void, WriteError, ReplicaService>;
|
|
369
|
+
/** The session and organisation an action call acts in, given by the Command (update decides them, not a closure). */
|
|
370
|
+
export interface ActingAs {
|
|
371
|
+
readonly token: string;
|
|
372
|
+
readonly orgId: string;
|
|
373
|
+
readonly idempotencyKey?: string | undefined;
|
|
374
|
+
}
|
|
375
|
+
declare const ActionCallFailed_base: Schema.Class<ActionCallFailed, Schema.TaggedStruct<"ActionCallFailed", {
|
|
376
|
+
readonly action: Schema.String;
|
|
377
|
+
readonly message: Schema.String;
|
|
378
|
+
}>, import("effect/Cause").YieldableError>;
|
|
379
|
+
/** A call that did not reach a typed answer (the network, the protocol). */
|
|
380
|
+
export declare class ActionCallFailed extends ActionCallFailed_base {
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* Call an action through the typed client, in the calling fiber: the Command that runs it owns the request, so
|
|
384
|
+
* interrupting the Command aborts it (a call that already reached the kernel may still run, once with an
|
|
385
|
+
* idempotency key). Fails with the action's typed error, or `ActionCallFailed`.
|
|
386
|
+
*/
|
|
387
|
+
export declare const callAction: <const Modules extends ReadonlyArray<AnyModuleContract>, const Tag extends ActionName<Modules>>(client: EloxivClient<Modules>, action: Tag, input: ActionInput<Modules, Tag>, acting: ActingAs) => Effect.Effect<ActionOutput<Modules, Tag>, InvocationError | ActionCallFailed>;
|
|
388
|
+
/** Which record's collaborative document the Model wants open, under which session (its handle, never its token). */
|
|
389
|
+
export declare const CollabTarget: Schema.Struct<{
|
|
390
|
+
readonly entity: Schema.String;
|
|
391
|
+
readonly id: Schema.String;
|
|
392
|
+
readonly orgId: Schema.String;
|
|
393
|
+
readonly session: Schema.String;
|
|
394
|
+
}>;
|
|
395
|
+
export type CollabTarget = typeof CollabTarget.Type;
|
|
396
|
+
/** A peer's presence, as Messages carry it. */
|
|
397
|
+
export declare const CollabPeerState: Schema.Struct<{
|
|
398
|
+
readonly clientId: Schema.Number;
|
|
399
|
+
readonly userId: Schema.String;
|
|
400
|
+
readonly state: Schema.Unknown;
|
|
401
|
+
}>;
|
|
402
|
+
/**
|
|
403
|
+
* One state of an open collaborative document, as a Message carries it: the text root's text (a copy), whether the
|
|
404
|
+
* caller may change it, the connection's status, others' presence, and why the kernel closed it, if it did.
|
|
405
|
+
*/
|
|
406
|
+
export declare const CollabSnapshot: Schema.Struct<{
|
|
407
|
+
readonly entity: Schema.String;
|
|
408
|
+
readonly id: Schema.String;
|
|
409
|
+
readonly orgId: Schema.String;
|
|
410
|
+
readonly text: Schema.String;
|
|
411
|
+
readonly seq: Schema.Number;
|
|
412
|
+
readonly canWrite: Schema.Boolean;
|
|
413
|
+
readonly status: Schema.Literals<readonly ["connecting", "synced", "offline", "closed"]>;
|
|
414
|
+
readonly peers: Schema.$Array<Schema.Struct<{
|
|
415
|
+
readonly clientId: Schema.Number;
|
|
416
|
+
readonly userId: Schema.String;
|
|
417
|
+
readonly state: Schema.Unknown;
|
|
418
|
+
}>>;
|
|
419
|
+
readonly closedWith: Schema.Option<Schema.String>;
|
|
420
|
+
}>;
|
|
421
|
+
export type CollabSnapshot = typeof CollabSnapshot.Type;
|
|
422
|
+
declare const CollabUnavailable_base: Schema.Class<CollabUnavailable, Schema.TaggedStruct<"CollabUnavailable", {
|
|
423
|
+
readonly message: Schema.String;
|
|
424
|
+
}>, import("effect/Cause").YieldableError>;
|
|
425
|
+
/** No collaborative document is open for that record (the Model no longer wants it, or it has not opened yet). */
|
|
426
|
+
export declare class CollabUnavailable extends CollabUnavailable_base {
|
|
427
|
+
}
|
|
428
|
+
declare const CollabEditRefused_base: Schema.Class<CollabEditRefused, Schema.TaggedStruct<"CollabEditRefused", {
|
|
429
|
+
readonly message: Schema.String;
|
|
430
|
+
}>, import("effect/Cause").YieldableError>;
|
|
431
|
+
/** A text edit whose passage is not in the document: nothing was applied. */
|
|
432
|
+
export declare class CollabEditRefused extends CollabEditRefused_base {
|
|
433
|
+
}
|
|
434
|
+
/** A record whose document a Command addresses. */
|
|
435
|
+
export interface CollabRecord {
|
|
436
|
+
readonly entity: string;
|
|
437
|
+
readonly id: string;
|
|
438
|
+
readonly orgId: string;
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* A record's collaborative document as a Foldkit Subscription entry. While `document(model)` names a record and a
|
|
442
|
+
* session, the document is open (its WebSocket included) and every change (a local or remote edit, presence, the
|
|
443
|
+
* connection's status) arrives as `toMessage(snapshot)`; when the Model names another record, organisation or
|
|
444
|
+
* session, or none, the connection closes and its presence is withdrawn. The Y.Doc stays inside the runtime: the
|
|
445
|
+
* Model holds snapshots, never the document. Edit it with `editCollabText` and `setCollabPresence` Commands.
|
|
446
|
+
*/
|
|
447
|
+
export declare const collabDocument: <Model, Message>(options: {
|
|
448
|
+
/** The kernel's base URL. */
|
|
449
|
+
readonly baseUrl: string;
|
|
450
|
+
readonly credentials: Credentials;
|
|
451
|
+
readonly document: (model: Model) => Option.Option<CollabTarget>;
|
|
452
|
+
/** The text root the snapshots carry (default `content`). */
|
|
453
|
+
readonly text?: string | undefined;
|
|
454
|
+
readonly toMessage: (snapshot: CollabSnapshot) => Message;
|
|
455
|
+
/** A WebSocket constructor (default the global one). */
|
|
456
|
+
readonly WebSocket?: typeof WebSocket | undefined;
|
|
457
|
+
}) => {
|
|
458
|
+
dependenciesSchema: Schema.Struct<{
|
|
459
|
+
readonly document: Schema.Option<Schema.Struct<{
|
|
460
|
+
readonly entity: Schema.String;
|
|
461
|
+
readonly id: Schema.String;
|
|
462
|
+
readonly orgId: Schema.String;
|
|
463
|
+
readonly session: Schema.String;
|
|
464
|
+
}>>;
|
|
465
|
+
}>;
|
|
466
|
+
modelToDependencies: (model: Model) => {
|
|
467
|
+
document: Option.Option<{
|
|
468
|
+
readonly entity: string;
|
|
469
|
+
readonly id: string;
|
|
470
|
+
readonly orgId: string;
|
|
471
|
+
readonly session: string;
|
|
472
|
+
}>;
|
|
473
|
+
};
|
|
474
|
+
dependenciesToStream: ({ document }: {
|
|
475
|
+
readonly document: Option.Option<CollabTarget>;
|
|
476
|
+
}) => Stream.Stream<Message>;
|
|
477
|
+
};
|
|
478
|
+
/**
|
|
479
|
+
* Edit the open document's text root (the kinds `collab.editText` takes), as one Yjs transaction that the document
|
|
480
|
+
* sends to the kernel: for Commands. Succeeds with the text after the edits; nothing is applied when a passage is
|
|
481
|
+
* not there (`CollabEditRefused`) or the document is not open (`CollabUnavailable`).
|
|
482
|
+
*/
|
|
483
|
+
export declare const editCollabText: (target: CollabRecord, edits: ReadonlyArray<CollabTextEdit>) => Effect.Effect<string, CollabUnavailable | CollabEditRefused>;
|
|
484
|
+
/** Publish (or withdraw, with null) this client's presence on the open document: for Commands. */
|
|
485
|
+
export declare const setCollabPresence: (target: CollabRecord, state: unknown) => Effect.Effect<void, CollabUnavailable>;
|
|
486
|
+
export {};
|
|
487
|
+
//# sourceMappingURL=Foldkit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Foldkit.d.ts","sourceRoot":"","sources":["../src/Foldkit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,EAAE,eAAe,EAAE,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAC3E,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAS,MAAM,EAAc,MAAM,EAAE,MAAM,QAAQ,CAAA;AACpF,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AACtF,OAAO,EAAwD,KAAK,cAAc,EAAE,MAAM,aAAa,CAAA;AAGvG,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,EAAe,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,KAAK,WAAW,EAAE,MAAM,WAAW,CAAA;AAK3F;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,0DAA0D;IAC1D,QAAQ,CAAC,IAAI,EA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