@comapeo/core 3.0.0 → 3.1.1
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/dist/errors.d.ts +16 -0
- package/dist/errors.d.ts.map +1 -1
- package/dist/generated/rpc.d.ts +47 -0
- package/dist/generated/rpc.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/invite/invite-api.d.ts +4 -5
- package/dist/invite/invite-api.d.ts.map +1 -1
- package/dist/local-peers.d.ts +31 -0
- package/dist/local-peers.d.ts.map +1 -1
- package/dist/mapeo-manager.d.ts +30 -22
- package/dist/mapeo-manager.d.ts.map +1 -1
- package/dist/mapeo-project.d.ts +40 -2
- package/dist/mapeo-project.d.ts.map +1 -1
- package/dist/member-api.d.ts +15 -1
- package/dist/member-api.d.ts.map +1 -1
- package/dist/roles.d.ts +4 -3
- package/dist/roles.d.ts.map +1 -1
- package/dist/schema/client.d.ts +26 -3
- package/dist/schema/client.d.ts.map +1 -1
- package/dist/sync/sync-api.d.ts +4 -1
- package/dist/sync/sync-api.d.ts.map +1 -1
- package/drizzle/client/0002_brief_demogoblin.sql +2 -0
- package/drizzle/client/meta/0002_snapshot.json +220 -0
- package/drizzle/client/meta/_journal.json +7 -0
- package/package.json +3 -3
- package/src/errors.js +32 -0
- package/src/generated/rpc.d.ts +47 -0
- package/src/generated/rpc.js +241 -3
- package/src/generated/rpc.ts +280 -1
- package/src/invite/invite-api.js +15 -3
- package/src/local-peers.js +199 -1
- package/src/mapeo-manager.js +60 -20
- package/src/mapeo-project.js +21 -3
- package/src/member-api.js +94 -14
- package/src/roles.js +37 -0
- package/src/schema/client.js +3 -2
- package/src/sync/sync-api.js +6 -2
package/dist/schema/client.d.ts
CHANGED
|
@@ -110,6 +110,30 @@ export const projectSettingsTable: import("drizzle-orm/sqlite-core").SQLiteTable
|
|
|
110
110
|
enumValues: [string, ...string[]];
|
|
111
111
|
baseColumn: never;
|
|
112
112
|
}, object>;
|
|
113
|
+
readonly projectDescription: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
114
|
+
name: "projectDescription";
|
|
115
|
+
tableName: "projectSettings";
|
|
116
|
+
dataType: "string";
|
|
117
|
+
columnType: "SQLiteText";
|
|
118
|
+
data: string;
|
|
119
|
+
driverParam: string;
|
|
120
|
+
notNull: false;
|
|
121
|
+
hasDefault: false;
|
|
122
|
+
enumValues: [string, ...string[]];
|
|
123
|
+
baseColumn: never;
|
|
124
|
+
}, object>;
|
|
125
|
+
readonly projectColor: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
126
|
+
name: "projectColor";
|
|
127
|
+
tableName: "projectSettings";
|
|
128
|
+
dataType: "string";
|
|
129
|
+
columnType: "SQLiteText";
|
|
130
|
+
data: string;
|
|
131
|
+
driverParam: string;
|
|
132
|
+
notNull: false;
|
|
133
|
+
hasDefault: false;
|
|
134
|
+
enumValues: [string, ...string[]];
|
|
135
|
+
baseColumn: never;
|
|
136
|
+
}, object>;
|
|
113
137
|
readonly defaultPresets: import("drizzle-orm/sqlite-core").SQLiteColumn<{
|
|
114
138
|
name: "defaultPresets";
|
|
115
139
|
tableName: "projectSettings";
|
|
@@ -289,8 +313,7 @@ export const deviceSettingsTable: import("drizzle-orm/sqlite-core").SQLiteTableW
|
|
|
289
313
|
};
|
|
290
314
|
dialect: "sqlite";
|
|
291
315
|
}>;
|
|
292
|
-
export type ProjectInfo =
|
|
293
|
-
name?: string | undefined;
|
|
294
|
-
};
|
|
316
|
+
export type ProjectInfo = Pick<ProjectSettings, "name" | "projectColor" | "projectDescription">;
|
|
295
317
|
export type DeviceInfoParam = Omit<import("@comapeo/schema").DeviceInfoValue, "schemaName">;
|
|
318
|
+
import type { ProjectSettings } from '@comapeo/schema';
|
|
296
319
|
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/schema/client.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/schema/client.js"],"names":[],"mappings":"AAuBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAGC;AACD;;;;;;;;;;;;;;;;;;GAAuE;AACvE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAYE;AAYF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAIE;0BA5CW,IAAI,CAAC,eAAe,EAAE,MAAM,GAAG,cAAc,GAAG,oBAAoB,CAAC;8BA+BrE,IAAI,CAAC,OAAO,iBAAiB,EAAE,eAAe,EAAE,YAAY,CAAC;qCAlCtC,iBAAiB"}
|
package/dist/sync/sync-api.d.ts
CHANGED
|
@@ -54,16 +54,18 @@ export class SyncApi extends TypedEmitter<SyncEvents> {
|
|
|
54
54
|
* @param {import('../core-manager/index.js').CoreManager} opts.coreManager
|
|
55
55
|
* @param {CoreOwnership} opts.coreOwnership
|
|
56
56
|
* @param {import('../roles.js').Roles} opts.roles
|
|
57
|
+
* @param {(url: string) => WebSocket} [opts.makeWebsocket]
|
|
57
58
|
* @param {() => Promise<Iterable<string>>} opts.getServerWebsocketUrls
|
|
58
59
|
* @param {() => ReplicationStream} opts.getReplicationStream
|
|
59
60
|
* @param {import('../blob-store/index.js').BlobStore} opts.blobStore
|
|
60
61
|
* @param {number} [opts.throttleMs]
|
|
61
62
|
* @param {Logger} [opts.logger]
|
|
62
63
|
*/
|
|
63
|
-
constructor({ coreManager, throttleMs, roles, getServerWebsocketUrls, getReplicationStream, logger, coreOwnership, blobStore, }: {
|
|
64
|
+
constructor({ coreManager, throttleMs, roles, makeWebsocket, getServerWebsocketUrls, getReplicationStream, logger, coreOwnership, blobStore, }: {
|
|
64
65
|
coreManager: import("../core-manager/index.js").CoreManager;
|
|
65
66
|
coreOwnership: CoreOwnership;
|
|
66
67
|
roles: import("../roles.js").Roles;
|
|
68
|
+
makeWebsocket?: ((url: string) => WebSocket) | undefined;
|
|
67
69
|
getServerWebsocketUrls: () => Promise<Iterable<string>>;
|
|
68
70
|
getReplicationStream: () => ReplicationStream;
|
|
69
71
|
blobStore: import("../blob-store/index.js").BlobStore;
|
|
@@ -190,6 +192,7 @@ export type SyncEvents = {
|
|
|
190
192
|
import { TypedEmitter } from 'tiny-typed-emitter';
|
|
191
193
|
import { SyncState } from './sync-state.js';
|
|
192
194
|
import type { CoreOwnership } from '../core-ownership.js';
|
|
195
|
+
import WebSocket from 'ws';
|
|
193
196
|
import type { ReplicationStream } from '../types.js';
|
|
194
197
|
import { Logger } from '../logger.js';
|
|
195
198
|
//# sourceMappingURL=sync-api.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync-api.d.ts","sourceRoot":"","sources":["../../src/sync/sync-api.js"],"names":[],"mappings":"AAcA,2EAA2E;AAC3E,yCAAyC;AACzC,4DAA4D;AAC5D,iFAAiF;AACjF,mEAAmE;AAEnE,gDAAiE;AACjE,uCAA8C;AAC9C,6CAAoD;AACpD,oDAA2D;AAC3D,wDAEC;AAED;;GAEG;AAEH;;GAEG;AAEH;;;;;;;GAOG;AAEH;;;;;;GAMG;AAEH;;;;;GAKG;AAEH;;;;;GAKG;AAEH;;;GAGG;AAEH;;GAEG;AACH;
|
|
1
|
+
{"version":3,"file":"sync-api.d.ts","sourceRoot":"","sources":["../../src/sync/sync-api.js"],"names":[],"mappings":"AAcA,2EAA2E;AAC3E,yCAAyC;AACzC,4DAA4D;AAC5D,iFAAiF;AACjF,mEAAmE;AAEnE,gDAAiE;AACjE,uCAA8C;AAC9C,6CAAoD;AACpD,oDAA2D;AAC3D,wDAEC;AAED;;GAEG;AAEH;;GAEG;AAEH;;;;;;;GAOG;AAEH;;;;;;GAMG;AAEH;;;;;GAKG;AAEH;;;;;GAKG;AAEH;;;GAGG;AAEH;;GAEG;AACH;IA4BE;;;;;;;;;;;OAWG;IACH,gJAVG;QAA6D,WAAW,EAAhE,OAAO,0BAA0B,EAAE,WAAW;QAC1B,aAAa,EAAjC,aAAa;QACqB,KAAK,EAAvC,OAAO,aAAa,EAAE,KAAK;QACO,aAAa,UAAzC,MAAM,KAAK,SAAS;QACY,sBAAsB,EAA5D,MAAM,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QACD,oBAAoB,EAAlD,MAAM,iBAAiB;QAC0B,SAAS,EAA1D,OAAO,wBAAwB,EAAE,SAAS;QAC5B,UAAU;QACV,MAAM;KAAC,EAkD/B;IA8BD;;;OAGG;IACH,YAFa,KAAK,CAIjB;IAqHD;;OAEG;IACH,kBAFa,IAAI,CAsDhB;IAED;;OAEG;IACH,qBAFa,IAAI,CAQhB;IAED;;;;;;;;;;OAUG;IACH;;yBAOC;IAED;;;;OAIG;IACH,aAGC;IAkBD;;;OAGG;IACH,kDAHW,IAAI,GAAG,MAAM,GACX,IAAI,CAOhB;IAED;;;OAGG;IACH,kBAHW,QAAQ,GACN,OAAO,CAAC,IAAI,CAAC,CAazB;oFAPa,2BACE;IApChB;;OAEG;IACH,2BAGC;IAED;;OAEG;IACH,kCAGC;IA8BD;;;;OAIG;IACH,wCAJW,MAAM,eACN,WAAW,GACT,OAAO,CAAC,IAAI,CAAC,CA6BzB;IApWC,wBAME;;CA6eL;uBA5lBY,SAAS,GAAG,MAAM;+BAIlB,MAAM,GAAG,SAAS,GAAG,KAAK;;WAMzB,MAAM;YACN,MAAM;gBACN,MAAM;YACN,MAAM;;;;;;mBAMN,OAAO;;;;UACP,MAAM;;;;YACN,MAAM;;;;;;;;;aAMN,mCAAmC;;;;UACnC,mCAAmC;;;;;;aAKnC;QAAE,aAAa,EAAE,OAAO,CAAA;KAAE;;;;UAC1B;QAAE,aAAa,EAAE,OAAO,CAAA;KAAE;;;;2BAC1B,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC;;;kBAKrC,CAAC,SAAS,EAAE,KAAK,KAAK,IAAI;;6BArEX,oBAAoB;0BAEvB,iBAAiB;mCAcR,sBAAsB;sBAfnC,IAAI;uCAiByB,aAAa;uBAdzC,cAAc"}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "5",
|
|
3
|
+
"dialect": "sqlite",
|
|
4
|
+
"id": "facbbc92-fe5b-4ce0-9bcd-189143af55f9",
|
|
5
|
+
"prevId": "a80440f2-1097-40a6-ab81-3295f0a8c5c1",
|
|
6
|
+
"tables": {
|
|
7
|
+
"deviceSettings": {
|
|
8
|
+
"name": "deviceSettings",
|
|
9
|
+
"columns": {
|
|
10
|
+
"deviceId": {
|
|
11
|
+
"name": "deviceId",
|
|
12
|
+
"type": "text",
|
|
13
|
+
"primaryKey": false,
|
|
14
|
+
"notNull": true,
|
|
15
|
+
"autoincrement": false
|
|
16
|
+
},
|
|
17
|
+
"deviceInfo": {
|
|
18
|
+
"name": "deviceInfo",
|
|
19
|
+
"type": "text",
|
|
20
|
+
"primaryKey": false,
|
|
21
|
+
"notNull": false,
|
|
22
|
+
"autoincrement": false
|
|
23
|
+
},
|
|
24
|
+
"isArchiveDevice": {
|
|
25
|
+
"name": "isArchiveDevice",
|
|
26
|
+
"type": "integer",
|
|
27
|
+
"primaryKey": false,
|
|
28
|
+
"notNull": false,
|
|
29
|
+
"autoincrement": false
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"indexes": {
|
|
33
|
+
"deviceSettings_deviceId_unique": {
|
|
34
|
+
"name": "deviceSettings_deviceId_unique",
|
|
35
|
+
"columns": [
|
|
36
|
+
"deviceId"
|
|
37
|
+
],
|
|
38
|
+
"isUnique": true
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"foreignKeys": {},
|
|
42
|
+
"compositePrimaryKeys": {},
|
|
43
|
+
"uniqueConstraints": {}
|
|
44
|
+
},
|
|
45
|
+
"projectSettings_backlink": {
|
|
46
|
+
"name": "projectSettings_backlink",
|
|
47
|
+
"columns": {
|
|
48
|
+
"versionId": {
|
|
49
|
+
"name": "versionId",
|
|
50
|
+
"type": "text",
|
|
51
|
+
"primaryKey": true,
|
|
52
|
+
"notNull": true,
|
|
53
|
+
"autoincrement": false
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"indexes": {},
|
|
57
|
+
"foreignKeys": {},
|
|
58
|
+
"compositePrimaryKeys": {},
|
|
59
|
+
"uniqueConstraints": {}
|
|
60
|
+
},
|
|
61
|
+
"projectKeys": {
|
|
62
|
+
"name": "projectKeys",
|
|
63
|
+
"columns": {
|
|
64
|
+
"projectId": {
|
|
65
|
+
"name": "projectId",
|
|
66
|
+
"type": "text",
|
|
67
|
+
"primaryKey": true,
|
|
68
|
+
"notNull": true,
|
|
69
|
+
"autoincrement": false
|
|
70
|
+
},
|
|
71
|
+
"projectPublicId": {
|
|
72
|
+
"name": "projectPublicId",
|
|
73
|
+
"type": "text",
|
|
74
|
+
"primaryKey": false,
|
|
75
|
+
"notNull": true,
|
|
76
|
+
"autoincrement": false
|
|
77
|
+
},
|
|
78
|
+
"projectInviteId": {
|
|
79
|
+
"name": "projectInviteId",
|
|
80
|
+
"type": "blob",
|
|
81
|
+
"primaryKey": false,
|
|
82
|
+
"notNull": true,
|
|
83
|
+
"autoincrement": false
|
|
84
|
+
},
|
|
85
|
+
"keysCipher": {
|
|
86
|
+
"name": "keysCipher",
|
|
87
|
+
"type": "blob",
|
|
88
|
+
"primaryKey": false,
|
|
89
|
+
"notNull": true,
|
|
90
|
+
"autoincrement": false
|
|
91
|
+
},
|
|
92
|
+
"projectInfo": {
|
|
93
|
+
"name": "projectInfo",
|
|
94
|
+
"type": "text",
|
|
95
|
+
"primaryKey": false,
|
|
96
|
+
"notNull": true,
|
|
97
|
+
"autoincrement": false,
|
|
98
|
+
"default": "'{}'"
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"indexes": {},
|
|
102
|
+
"foreignKeys": {},
|
|
103
|
+
"compositePrimaryKeys": {},
|
|
104
|
+
"uniqueConstraints": {}
|
|
105
|
+
},
|
|
106
|
+
"projectSettings": {
|
|
107
|
+
"name": "projectSettings",
|
|
108
|
+
"columns": {
|
|
109
|
+
"docId": {
|
|
110
|
+
"name": "docId",
|
|
111
|
+
"type": "text",
|
|
112
|
+
"primaryKey": true,
|
|
113
|
+
"notNull": true,
|
|
114
|
+
"autoincrement": false
|
|
115
|
+
},
|
|
116
|
+
"versionId": {
|
|
117
|
+
"name": "versionId",
|
|
118
|
+
"type": "text",
|
|
119
|
+
"primaryKey": false,
|
|
120
|
+
"notNull": true,
|
|
121
|
+
"autoincrement": false
|
|
122
|
+
},
|
|
123
|
+
"originalVersionId": {
|
|
124
|
+
"name": "originalVersionId",
|
|
125
|
+
"type": "text",
|
|
126
|
+
"primaryKey": false,
|
|
127
|
+
"notNull": true,
|
|
128
|
+
"autoincrement": false
|
|
129
|
+
},
|
|
130
|
+
"schemaName": {
|
|
131
|
+
"name": "schemaName",
|
|
132
|
+
"type": "text",
|
|
133
|
+
"primaryKey": false,
|
|
134
|
+
"notNull": true,
|
|
135
|
+
"autoincrement": false
|
|
136
|
+
},
|
|
137
|
+
"createdAt": {
|
|
138
|
+
"name": "createdAt",
|
|
139
|
+
"type": "text",
|
|
140
|
+
"primaryKey": false,
|
|
141
|
+
"notNull": true,
|
|
142
|
+
"autoincrement": false
|
|
143
|
+
},
|
|
144
|
+
"updatedAt": {
|
|
145
|
+
"name": "updatedAt",
|
|
146
|
+
"type": "text",
|
|
147
|
+
"primaryKey": false,
|
|
148
|
+
"notNull": true,
|
|
149
|
+
"autoincrement": false
|
|
150
|
+
},
|
|
151
|
+
"links": {
|
|
152
|
+
"name": "links",
|
|
153
|
+
"type": "text",
|
|
154
|
+
"primaryKey": false,
|
|
155
|
+
"notNull": true,
|
|
156
|
+
"autoincrement": false
|
|
157
|
+
},
|
|
158
|
+
"deleted": {
|
|
159
|
+
"name": "deleted",
|
|
160
|
+
"type": "integer",
|
|
161
|
+
"primaryKey": false,
|
|
162
|
+
"notNull": true,
|
|
163
|
+
"autoincrement": false
|
|
164
|
+
},
|
|
165
|
+
"name": {
|
|
166
|
+
"name": "name",
|
|
167
|
+
"type": "text",
|
|
168
|
+
"primaryKey": false,
|
|
169
|
+
"notNull": false,
|
|
170
|
+
"autoincrement": false
|
|
171
|
+
},
|
|
172
|
+
"projectDescription": {
|
|
173
|
+
"name": "projectDescription",
|
|
174
|
+
"type": "text",
|
|
175
|
+
"primaryKey": false,
|
|
176
|
+
"notNull": false,
|
|
177
|
+
"autoincrement": false
|
|
178
|
+
},
|
|
179
|
+
"projectColor": {
|
|
180
|
+
"name": "projectColor",
|
|
181
|
+
"type": "text",
|
|
182
|
+
"primaryKey": false,
|
|
183
|
+
"notNull": false,
|
|
184
|
+
"autoincrement": false
|
|
185
|
+
},
|
|
186
|
+
"defaultPresets": {
|
|
187
|
+
"name": "defaultPresets",
|
|
188
|
+
"type": "text",
|
|
189
|
+
"primaryKey": false,
|
|
190
|
+
"notNull": false,
|
|
191
|
+
"autoincrement": false
|
|
192
|
+
},
|
|
193
|
+
"configMetadata": {
|
|
194
|
+
"name": "configMetadata",
|
|
195
|
+
"type": "text",
|
|
196
|
+
"primaryKey": false,
|
|
197
|
+
"notNull": false,
|
|
198
|
+
"autoincrement": false
|
|
199
|
+
},
|
|
200
|
+
"forks": {
|
|
201
|
+
"name": "forks",
|
|
202
|
+
"type": "text",
|
|
203
|
+
"primaryKey": false,
|
|
204
|
+
"notNull": true,
|
|
205
|
+
"autoincrement": false
|
|
206
|
+
}
|
|
207
|
+
},
|
|
208
|
+
"indexes": {},
|
|
209
|
+
"foreignKeys": {},
|
|
210
|
+
"compositePrimaryKeys": {},
|
|
211
|
+
"uniqueConstraints": {}
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
"enums": {},
|
|
215
|
+
"_meta": {
|
|
216
|
+
"schemas": {},
|
|
217
|
+
"tables": {},
|
|
218
|
+
"columns": {}
|
|
219
|
+
}
|
|
220
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@comapeo/core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.1",
|
|
4
4
|
"description": "Offline p2p mapping library",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"@comapeo/core2.0.1": "npm:@comapeo/core@2.0.1",
|
|
113
113
|
"@comapeo/ipc": "^2.1.0",
|
|
114
114
|
"@mapeo/default-config": "5.0.0",
|
|
115
|
-
"@mapeo/mock-data": "^2.1.
|
|
115
|
+
"@mapeo/mock-data": "^2.1.5",
|
|
116
116
|
"@sinonjs/fake-timers": "^10.0.2",
|
|
117
117
|
"@types/b4a": "^1.6.0",
|
|
118
118
|
"@types/bogon": "^1.0.2",
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
},
|
|
160
160
|
"dependencies": {
|
|
161
161
|
"@comapeo/fallback-smp": "^1.0.0",
|
|
162
|
-
"@comapeo/schema": "1.
|
|
162
|
+
"@comapeo/schema": "1.5.0",
|
|
163
163
|
"@digidem/types": "^2.3.0",
|
|
164
164
|
"@fastify/error": "^3.4.1",
|
|
165
165
|
"@fastify/type-provider-typebox": "^4.1.0",
|
package/src/errors.js
CHANGED
|
@@ -29,6 +29,38 @@ export class InviteAbortedError extends Error {
|
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
export class ProjectDetailsSendFailError extends Error {
|
|
33
|
+
/** @param {string} [message] */
|
|
34
|
+
constructor(message = 'Project details failed to send') {
|
|
35
|
+
super(message)
|
|
36
|
+
this.name = 'ProjectDetailsSendFailError'
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export class InviteInitialSyncFailError extends Error {
|
|
41
|
+
/** @param {string} [message] */
|
|
42
|
+
constructor(message = 'Failed to sync config for invite') {
|
|
43
|
+
super(message)
|
|
44
|
+
this.name = 'InviteInitialSyncFailError'
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export class RPCDisconnectBeforeSendingError extends Error {
|
|
49
|
+
/** @param {string} [message] */
|
|
50
|
+
constructor(message = 'RPC disconnected before sending') {
|
|
51
|
+
super(message)
|
|
52
|
+
this.name = 'RPCDisconnectBeforeSendingError'
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export class RPCDisconnectBeforeAckError extends Error {
|
|
57
|
+
/** @param {string} [message] */
|
|
58
|
+
constructor(message = 'RPC disconnected before receiving acknowledgement') {
|
|
59
|
+
super(message)
|
|
60
|
+
this.name = 'RPCDisconnectBeforeAckError'
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
32
64
|
export class TimeoutError extends Error {
|
|
33
65
|
/** @param {string} [message] */
|
|
34
66
|
constructor(message = 'TimeoutError') {
|
package/src/generated/rpc.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export interface Invite {
|
|
|
7
7
|
roleName?: string | undefined;
|
|
8
8
|
roleDescription?: string | undefined;
|
|
9
9
|
invitorName: string;
|
|
10
|
+
projectColor?: string | undefined;
|
|
11
|
+
projectDescription?: string | undefined;
|
|
10
12
|
}
|
|
11
13
|
export interface InviteCancel {
|
|
12
14
|
inviteId: Buffer;
|
|
@@ -33,6 +35,7 @@ export interface ProjectJoinDetails {
|
|
|
33
35
|
export interface DeviceInfo {
|
|
34
36
|
name: string;
|
|
35
37
|
deviceType?: DeviceInfo_DeviceType | undefined;
|
|
38
|
+
features: DeviceInfo_RPCFeatures[];
|
|
36
39
|
}
|
|
37
40
|
export declare const DeviceInfo_DeviceType: {
|
|
38
41
|
readonly device_type_unspecified: "device_type_unspecified";
|
|
@@ -44,6 +47,26 @@ export declare const DeviceInfo_DeviceType: {
|
|
|
44
47
|
export type DeviceInfo_DeviceType = typeof DeviceInfo_DeviceType[keyof typeof DeviceInfo_DeviceType];
|
|
45
48
|
export declare function deviceInfo_DeviceTypeFromJSON(object: any): DeviceInfo_DeviceType;
|
|
46
49
|
export declare function deviceInfo_DeviceTypeToNumber(object: DeviceInfo_DeviceType): number;
|
|
50
|
+
export declare const DeviceInfo_RPCFeatures: {
|
|
51
|
+
readonly features_unspecified: "features_unspecified";
|
|
52
|
+
readonly ack: "ack";
|
|
53
|
+
readonly UNRECOGNIZED: "UNRECOGNIZED";
|
|
54
|
+
};
|
|
55
|
+
export type DeviceInfo_RPCFeatures = typeof DeviceInfo_RPCFeatures[keyof typeof DeviceInfo_RPCFeatures];
|
|
56
|
+
export declare function deviceInfo_RPCFeaturesFromJSON(object: any): DeviceInfo_RPCFeatures;
|
|
57
|
+
export declare function deviceInfo_RPCFeaturesToNumber(object: DeviceInfo_RPCFeatures): number;
|
|
58
|
+
export interface InviteAck {
|
|
59
|
+
inviteId: Buffer;
|
|
60
|
+
}
|
|
61
|
+
export interface InviteCancelAck {
|
|
62
|
+
inviteId: Buffer;
|
|
63
|
+
}
|
|
64
|
+
export interface InviteResponseAck {
|
|
65
|
+
inviteId: Buffer;
|
|
66
|
+
}
|
|
67
|
+
export interface ProjectJoinDetailsAck {
|
|
68
|
+
inviteId: Buffer;
|
|
69
|
+
}
|
|
47
70
|
export declare const Invite: {
|
|
48
71
|
encode(message: Invite, writer?: _m0.Writer): _m0.Writer;
|
|
49
72
|
decode(input: _m0.Reader | Uint8Array, length?: number): Invite;
|
|
@@ -74,6 +97,30 @@ export declare const DeviceInfo: {
|
|
|
74
97
|
create<I extends Exact<DeepPartial<DeviceInfo>, I>>(base?: I): DeviceInfo;
|
|
75
98
|
fromPartial<I extends Exact<DeepPartial<DeviceInfo>, I>>(object: I): DeviceInfo;
|
|
76
99
|
};
|
|
100
|
+
export declare const InviteAck: {
|
|
101
|
+
encode(message: InviteAck, writer?: _m0.Writer): _m0.Writer;
|
|
102
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): InviteAck;
|
|
103
|
+
create<I extends Exact<DeepPartial<InviteAck>, I>>(base?: I): InviteAck;
|
|
104
|
+
fromPartial<I extends Exact<DeepPartial<InviteAck>, I>>(object: I): InviteAck;
|
|
105
|
+
};
|
|
106
|
+
export declare const InviteCancelAck: {
|
|
107
|
+
encode(message: InviteCancelAck, writer?: _m0.Writer): _m0.Writer;
|
|
108
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): InviteCancelAck;
|
|
109
|
+
create<I extends Exact<DeepPartial<InviteCancelAck>, I>>(base?: I): InviteCancelAck;
|
|
110
|
+
fromPartial<I extends Exact<DeepPartial<InviteCancelAck>, I>>(object: I): InviteCancelAck;
|
|
111
|
+
};
|
|
112
|
+
export declare const InviteResponseAck: {
|
|
113
|
+
encode(message: InviteResponseAck, writer?: _m0.Writer): _m0.Writer;
|
|
114
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): InviteResponseAck;
|
|
115
|
+
create<I extends Exact<DeepPartial<InviteResponseAck>, I>>(base?: I): InviteResponseAck;
|
|
116
|
+
fromPartial<I extends Exact<DeepPartial<InviteResponseAck>, I>>(object: I): InviteResponseAck;
|
|
117
|
+
};
|
|
118
|
+
export declare const ProjectJoinDetailsAck: {
|
|
119
|
+
encode(message: ProjectJoinDetailsAck, writer?: _m0.Writer): _m0.Writer;
|
|
120
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): ProjectJoinDetailsAck;
|
|
121
|
+
create<I extends Exact<DeepPartial<ProjectJoinDetailsAck>, I>>(base?: I): ProjectJoinDetailsAck;
|
|
122
|
+
fromPartial<I extends Exact<DeepPartial<ProjectJoinDetailsAck>, I>>(object: I): ProjectJoinDetailsAck;
|
|
123
|
+
};
|
|
77
124
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
78
125
|
type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
79
126
|
[K in keyof T]?: DeepPartial<T[K]>;
|