@casual-simulation/aux-common 3.10.3 → 3.10.4-alpha.20934784018
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/common/ConnectionInfo.d.ts +8 -2
- package/common/ConnectionInfo.js +3 -2
- package/common/ConnectionInfo.js.map +1 -1
- package/common/PolicyPermissions.d.ts +738 -92
- package/common/PolicyPermissions.js +129 -133
- package/common/PolicyPermissions.js.map +1 -1
- package/common/RemoteActions.js +3 -3
- package/common/RemoteActions.js.map +1 -1
- package/package.json +5 -5
- package/websockets/WebsocketEvents.d.ts +563 -48
- package/websockets/WebsocketEvents.js +73 -77
- package/websockets/WebsocketEvents.js.map +1 -1
|
@@ -25,7 +25,9 @@ export declare enum WebsocketEventTypes {
|
|
|
25
25
|
DownloadRequest = 4,
|
|
26
26
|
Error = 5
|
|
27
27
|
}
|
|
28
|
-
export declare const websocketEventSchema: z.ZodTuple<[z.ZodEnum<typeof WebsocketEventTypes>, z.ZodNumber], z.ZodAny
|
|
28
|
+
export declare const websocketEventSchema: (() => z.ZodTuple<[z.ZodEnum<typeof WebsocketEventTypes>, z.ZodNumber], z.ZodAny>) & {
|
|
29
|
+
cache: import("es-toolkit").MemoizeCache<any, z.ZodTuple<[z.ZodEnum<typeof WebsocketEventTypes>, z.ZodNumber], z.ZodAny>>;
|
|
30
|
+
};
|
|
29
31
|
/**
|
|
30
32
|
* Defines a websocket event that contains a message.
|
|
31
33
|
*/
|
|
@@ -41,7 +43,9 @@ export type WebsocketUploadRequestEvent = [
|
|
|
41
43
|
type: WebsocketEventTypes.UploadRequest,
|
|
42
44
|
id: number
|
|
43
45
|
];
|
|
44
|
-
export declare const websocketUploadRequestEventSchema: z.ZodTuple<[z.ZodLiteral<WebsocketEventTypes.UploadRequest>, z.ZodNumber], null
|
|
46
|
+
export declare const websocketUploadRequestEventSchema: (() => z.ZodTuple<[z.ZodLiteral<WebsocketEventTypes.UploadRequest>, z.ZodNumber], null>) & {
|
|
47
|
+
cache: import("es-toolkit").MemoizeCache<any, z.ZodTuple<[z.ZodLiteral<WebsocketEventTypes.UploadRequest>, z.ZodNumber], null>>;
|
|
48
|
+
};
|
|
45
49
|
export interface UploadHttpHeaders {
|
|
46
50
|
[key: string]: string;
|
|
47
51
|
}
|
|
@@ -55,7 +59,9 @@ export type WebsocketUploadResponseEvent = [
|
|
|
55
59
|
uploadMethod: string,
|
|
56
60
|
uploadHeaders: UploadHttpHeaders
|
|
57
61
|
];
|
|
58
|
-
export declare const websocketUploadResponseEventSchema: z.ZodTuple<[z.ZodLiteral<WebsocketEventTypes.UploadResponse>, z.ZodNumber, z.ZodString, z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>], null
|
|
62
|
+
export declare const websocketUploadResponseEventSchema: (() => z.ZodTuple<[z.ZodLiteral<WebsocketEventTypes.UploadResponse>, z.ZodNumber, z.ZodString, z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>], null>) & {
|
|
63
|
+
cache: import("es-toolkit").MemoizeCache<any, z.ZodTuple<[z.ZodLiteral<WebsocketEventTypes.UploadResponse>, z.ZodNumber, z.ZodString, z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>], null>>;
|
|
64
|
+
};
|
|
59
65
|
export type WebsocketErrorCode = ServerError | NotSupportedError | KnownErrorCodes | 'invalid_record_key' | 'unacceptable_connection_token' | 'invalid_token' | 'session_expired' | 'user_is_banned' | 'unacceptable_connection_id' | 'message_not_found' | 'unacceptable_request' | 'record_not_found' | 'not_authorized' | 'action_not_supported' | 'not_logged_in' | 'subscription_limit_reached' | 'inst_not_found' | 'invalid_connection_state';
|
|
60
66
|
/**
|
|
61
67
|
* Defines an interface that contains information about an error that occurred.
|
|
@@ -91,12 +97,19 @@ export interface WebsocketErrorInfo {
|
|
|
91
97
|
*/
|
|
92
98
|
reason?: DenialReason;
|
|
93
99
|
}
|
|
94
|
-
export declare const websocketErrorInfoSchema: z.ZodObject<{
|
|
100
|
+
export declare const websocketErrorInfoSchema: (() => z.ZodObject<{
|
|
95
101
|
errorCode: z.ZodString;
|
|
96
102
|
errorMessage: z.ZodString;
|
|
97
103
|
issues: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
98
104
|
reason: z.ZodOptional<z.ZodAny>;
|
|
99
|
-
}, z.core.$strip
|
|
105
|
+
}, z.core.$strip>) & {
|
|
106
|
+
cache: import("es-toolkit").MemoizeCache<any, z.ZodObject<{
|
|
107
|
+
errorCode: z.ZodString;
|
|
108
|
+
errorMessage: z.ZodString;
|
|
109
|
+
issues: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
110
|
+
reason: z.ZodOptional<z.ZodAny>;
|
|
111
|
+
}, z.core.$strip>>;
|
|
112
|
+
};
|
|
100
113
|
/**
|
|
101
114
|
* Defines a websocket event that contains a response to an upload request.
|
|
102
115
|
*/
|
|
@@ -105,12 +118,19 @@ export type WebsocketErrorEvent = [
|
|
|
105
118
|
id: number,
|
|
106
119
|
info: WebsocketErrorInfo
|
|
107
120
|
];
|
|
108
|
-
export declare const websocketErrorEventSchema: z.ZodTuple<[z.ZodLiteral<WebsocketEventTypes.Error>, z.ZodNumber, z.ZodObject<{
|
|
121
|
+
export declare const websocketErrorEventSchema: (() => z.ZodTuple<[z.ZodLiteral<WebsocketEventTypes.Error>, z.ZodNumber, z.ZodObject<{
|
|
109
122
|
errorCode: z.ZodString;
|
|
110
123
|
errorMessage: z.ZodString;
|
|
111
124
|
issues: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
112
125
|
reason: z.ZodOptional<z.ZodAny>;
|
|
113
|
-
}, z.core.$strip>], null
|
|
126
|
+
}, z.core.$strip>], null>) & {
|
|
127
|
+
cache: import("es-toolkit").MemoizeCache<any, z.ZodTuple<[z.ZodLiteral<WebsocketEventTypes.Error>, z.ZodNumber, z.ZodObject<{
|
|
128
|
+
errorCode: z.ZodString;
|
|
129
|
+
errorMessage: z.ZodString;
|
|
130
|
+
issues: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
131
|
+
reason: z.ZodOptional<z.ZodAny>;
|
|
132
|
+
}, z.core.$strip>], null>>;
|
|
133
|
+
};
|
|
114
134
|
/**
|
|
115
135
|
* Defines a websocket event that contains a request to download a large message.
|
|
116
136
|
*/
|
|
@@ -121,7 +141,9 @@ export type WebsocketDownloadRequestEvent = [
|
|
|
121
141
|
downloadMethod: string,
|
|
122
142
|
downloadHeaders: UploadHttpHeaders
|
|
123
143
|
];
|
|
124
|
-
export declare const websocketDownloadRequestEventSchema: z.ZodTuple<[z.ZodLiteral<WebsocketEventTypes.DownloadRequest>, z.ZodNumber, z.ZodString, z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>], null
|
|
144
|
+
export declare const websocketDownloadRequestEventSchema: (() => z.ZodTuple<[z.ZodLiteral<WebsocketEventTypes.DownloadRequest>, z.ZodNumber, z.ZodString, z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>], null>) & {
|
|
145
|
+
cache: import("es-toolkit").MemoizeCache<any, z.ZodTuple<[z.ZodLiteral<WebsocketEventTypes.DownloadRequest>, z.ZodNumber, z.ZodString, z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>], null>>;
|
|
146
|
+
};
|
|
125
147
|
export type WebsocketResponseMessage = LoginResultMessage | WatchBranchResultMessage | TimeSyncResponseMessage | UpdatesReceivedMessage | ReceiveDeviceActionMessage | ConnectedToBranchMessage | DisconnectedFromBranchMessage | RateLimitExceededMessage | WebsocketHttpResponseMessage | WebsocketHttpPartialResponseMessage | RequestMissingPermissionResponseMessage;
|
|
126
148
|
export type WebsocketRequestMessage = LoginMessage | WatchBranchMessage | UnwatchBranchMessage | AddUpdatesMessage | SendActionMessage | WatchBranchDevicesMessage | UnwatchBranchDevicesMessage | ConnectionCountMessage | TimeSyncRequestMessage | GetUpdatesMessage | WebsocketHttpRequestMessage | RequestMissingPermissionMessage | RequestMissingPermissionResponseMessage;
|
|
127
149
|
export type WebsocketMessage = WebsocketRequestMessage | WebsocketResponseMessage;
|
|
@@ -140,11 +162,17 @@ export interface LoginMessage {
|
|
|
140
162
|
*/
|
|
141
163
|
connectionId?: string;
|
|
142
164
|
}
|
|
143
|
-
export declare const loginMessageSchema: z.ZodObject<{
|
|
165
|
+
export declare const loginMessageSchema: (() => z.ZodObject<{
|
|
144
166
|
type: z.ZodLiteral<"login">;
|
|
145
167
|
connectionToken: z.ZodOptional<z.ZodString>;
|
|
146
168
|
connectionId: z.ZodOptional<z.ZodString>;
|
|
147
|
-
}, z.core.$strip
|
|
169
|
+
}, z.core.$strip>) & {
|
|
170
|
+
cache: import("es-toolkit").MemoizeCache<any, z.ZodObject<{
|
|
171
|
+
type: z.ZodLiteral<"login">;
|
|
172
|
+
connectionToken: z.ZodOptional<z.ZodString>;
|
|
173
|
+
connectionId: z.ZodOptional<z.ZodString>;
|
|
174
|
+
}, z.core.$strip>>;
|
|
175
|
+
};
|
|
148
176
|
/**
|
|
149
177
|
* Defines a login result message.
|
|
150
178
|
*/
|
|
@@ -211,14 +239,23 @@ export interface WatchBranchMessage {
|
|
|
211
239
|
*/
|
|
212
240
|
markers?: string[];
|
|
213
241
|
}
|
|
214
|
-
export declare const watchBranchMessageSchema: z.ZodObject<{
|
|
242
|
+
export declare const watchBranchMessageSchema: (() => z.ZodObject<{
|
|
215
243
|
type: z.ZodLiteral<"repo/watch_branch">;
|
|
216
244
|
recordName: z.ZodNullable<z.ZodString>;
|
|
217
245
|
inst: z.ZodString;
|
|
218
246
|
branch: z.ZodString;
|
|
219
247
|
temporary: z.ZodOptional<z.ZodBoolean>;
|
|
220
248
|
markers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
221
|
-
}, z.core.$strip
|
|
249
|
+
}, z.core.$strip>) & {
|
|
250
|
+
cache: import("es-toolkit").MemoizeCache<any, z.ZodObject<{
|
|
251
|
+
type: z.ZodLiteral<"repo/watch_branch">;
|
|
252
|
+
recordName: z.ZodNullable<z.ZodString>;
|
|
253
|
+
inst: z.ZodString;
|
|
254
|
+
branch: z.ZodString;
|
|
255
|
+
temporary: z.ZodOptional<z.ZodBoolean>;
|
|
256
|
+
markers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
257
|
+
}, z.core.$strip>>;
|
|
258
|
+
};
|
|
222
259
|
export type WatchBranchResultMessage = WatchBranchResultSuccessMessage | WatchBranchResultFailureMessage;
|
|
223
260
|
export interface WatchBranchResultSuccessMessage {
|
|
224
261
|
type: 'repo/watch_branch_result';
|
|
@@ -285,12 +322,19 @@ export interface UnwatchBranchMessage {
|
|
|
285
322
|
*/
|
|
286
323
|
branch: string;
|
|
287
324
|
}
|
|
288
|
-
export declare const unwatchBranchMessageSchema: z.ZodObject<{
|
|
325
|
+
export declare const unwatchBranchMessageSchema: (() => z.ZodObject<{
|
|
289
326
|
type: z.ZodLiteral<"repo/unwatch_branch">;
|
|
290
327
|
recordName: z.ZodNullable<z.ZodString>;
|
|
291
328
|
inst: z.ZodString;
|
|
292
329
|
branch: z.ZodString;
|
|
293
|
-
}, z.core.$strip
|
|
330
|
+
}, z.core.$strip>) & {
|
|
331
|
+
cache: import("es-toolkit").MemoizeCache<any, z.ZodObject<{
|
|
332
|
+
type: z.ZodLiteral<"repo/unwatch_branch">;
|
|
333
|
+
recordName: z.ZodNullable<z.ZodString>;
|
|
334
|
+
inst: z.ZodString;
|
|
335
|
+
branch: z.ZodString;
|
|
336
|
+
}, z.core.$strip>>;
|
|
337
|
+
};
|
|
294
338
|
/**
|
|
295
339
|
* Defines an event which indicates that devices connected to a branch should be watched.
|
|
296
340
|
*/
|
|
@@ -310,12 +354,19 @@ export interface WatchBranchDevicesMessage {
|
|
|
310
354
|
*/
|
|
311
355
|
branch: string;
|
|
312
356
|
}
|
|
313
|
-
export declare const watchBranchDevicesMessageSchema: z.ZodObject<{
|
|
357
|
+
export declare const watchBranchDevicesMessageSchema: (() => z.ZodObject<{
|
|
314
358
|
type: z.ZodLiteral<"repo/watch_branch_devices">;
|
|
315
359
|
recordName: z.ZodNullable<z.ZodString>;
|
|
316
360
|
inst: z.ZodString;
|
|
317
361
|
branch: z.ZodString;
|
|
318
|
-
}, z.core.$strip
|
|
362
|
+
}, z.core.$strip>) & {
|
|
363
|
+
cache: import("es-toolkit").MemoizeCache<any, z.ZodObject<{
|
|
364
|
+
type: z.ZodLiteral<"repo/watch_branch_devices">;
|
|
365
|
+
recordName: z.ZodNullable<z.ZodString>;
|
|
366
|
+
inst: z.ZodString;
|
|
367
|
+
branch: z.ZodString;
|
|
368
|
+
}, z.core.$strip>>;
|
|
369
|
+
};
|
|
319
370
|
/**
|
|
320
371
|
* Defines an event which indicates that devices connected to a branch should be no longer be watched.
|
|
321
372
|
*/
|
|
@@ -335,12 +386,19 @@ export interface UnwatchBranchDevicesMessage {
|
|
|
335
386
|
*/
|
|
336
387
|
branch: string;
|
|
337
388
|
}
|
|
338
|
-
export declare const unwatchBranchDevicesMessageSchema: z.ZodObject<{
|
|
389
|
+
export declare const unwatchBranchDevicesMessageSchema: (() => z.ZodObject<{
|
|
339
390
|
type: z.ZodLiteral<"repo/unwatch_branch_devices">;
|
|
340
391
|
recordName: z.ZodNullable<z.ZodString>;
|
|
341
392
|
inst: z.ZodString;
|
|
342
393
|
branch: z.ZodString;
|
|
343
|
-
}, z.core.$strip
|
|
394
|
+
}, z.core.$strip>) & {
|
|
395
|
+
cache: import("es-toolkit").MemoizeCache<any, z.ZodObject<{
|
|
396
|
+
type: z.ZodLiteral<"repo/unwatch_branch_devices">;
|
|
397
|
+
recordName: z.ZodNullable<z.ZodString>;
|
|
398
|
+
inst: z.ZodString;
|
|
399
|
+
branch: z.ZodString;
|
|
400
|
+
}, z.core.$strip>>;
|
|
401
|
+
};
|
|
344
402
|
/**
|
|
345
403
|
* Defines an event which indicates that some arbitrary updates should be added for the given branch.
|
|
346
404
|
* Note that while all branches support both atoms and updates, they do not support mixed usage.
|
|
@@ -386,7 +444,7 @@ export interface AddUpdatesMessage {
|
|
|
386
444
|
*/
|
|
387
445
|
timestamps?: number[];
|
|
388
446
|
}
|
|
389
|
-
export declare const addUpdatesMessageSchema: z.ZodObject<{
|
|
447
|
+
export declare const addUpdatesMessageSchema: (() => z.ZodObject<{
|
|
390
448
|
type: z.ZodLiteral<"repo/add_updates">;
|
|
391
449
|
recordName: z.ZodNullable<z.ZodString>;
|
|
392
450
|
inst: z.ZodString;
|
|
@@ -395,7 +453,18 @@ export declare const addUpdatesMessageSchema: z.ZodObject<{
|
|
|
395
453
|
updateId: z.ZodOptional<z.ZodNumber>;
|
|
396
454
|
initial: z.ZodOptional<z.ZodBoolean>;
|
|
397
455
|
timestamps: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
398
|
-
}, z.core.$strip
|
|
456
|
+
}, z.core.$strip>) & {
|
|
457
|
+
cache: import("es-toolkit").MemoizeCache<any, z.ZodObject<{
|
|
458
|
+
type: z.ZodLiteral<"repo/add_updates">;
|
|
459
|
+
recordName: z.ZodNullable<z.ZodString>;
|
|
460
|
+
inst: z.ZodString;
|
|
461
|
+
branch: z.ZodString;
|
|
462
|
+
updates: z.ZodArray<z.ZodString>;
|
|
463
|
+
updateId: z.ZodOptional<z.ZodNumber>;
|
|
464
|
+
initial: z.ZodOptional<z.ZodBoolean>;
|
|
465
|
+
timestamps: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
466
|
+
}, z.core.$strip>>;
|
|
467
|
+
};
|
|
399
468
|
/**
|
|
400
469
|
* Defines an event which indicates that the updates for the given branch should be retrieved.
|
|
401
470
|
*/
|
|
@@ -415,12 +484,19 @@ export interface GetUpdatesMessage {
|
|
|
415
484
|
*/
|
|
416
485
|
branch: string;
|
|
417
486
|
}
|
|
418
|
-
export declare const getUpdatesMessageSchema: z.ZodObject<{
|
|
487
|
+
export declare const getUpdatesMessageSchema: (() => z.ZodObject<{
|
|
419
488
|
type: z.ZodLiteral<"repo/get_updates">;
|
|
420
489
|
recordName: z.ZodNullable<z.ZodString>;
|
|
421
490
|
inst: z.ZodString;
|
|
422
491
|
branch: z.ZodString;
|
|
423
|
-
}, z.core.$strip
|
|
492
|
+
}, z.core.$strip>) & {
|
|
493
|
+
cache: import("es-toolkit").MemoizeCache<any, z.ZodObject<{
|
|
494
|
+
type: z.ZodLiteral<"repo/get_updates">;
|
|
495
|
+
recordName: z.ZodNullable<z.ZodString>;
|
|
496
|
+
inst: z.ZodString;
|
|
497
|
+
branch: z.ZodString;
|
|
498
|
+
}, z.core.$strip>>;
|
|
499
|
+
};
|
|
424
500
|
/**
|
|
425
501
|
* Defines an event which indicates that an HTTP request should be made.
|
|
426
502
|
*/
|
|
@@ -435,7 +511,7 @@ export interface WebsocketHttpRequestMessage {
|
|
|
435
511
|
*/
|
|
436
512
|
request: Omit<GenericHttpRequest, 'ipAddress'>;
|
|
437
513
|
}
|
|
438
|
-
export declare const websocketHttpRequestMessageSchema: z.ZodObject<{
|
|
514
|
+
export declare const websocketHttpRequestMessageSchema: (() => z.ZodObject<{
|
|
439
515
|
type: z.ZodLiteral<"http_request">;
|
|
440
516
|
request: z.ZodObject<{
|
|
441
517
|
path: z.ZodString;
|
|
@@ -446,7 +522,20 @@ export declare const websocketHttpRequestMessageSchema: z.ZodObject<{
|
|
|
446
522
|
body: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
447
523
|
}, z.core.$strip>;
|
|
448
524
|
id: z.ZodNumber;
|
|
449
|
-
}, z.core.$strip
|
|
525
|
+
}, z.core.$strip>) & {
|
|
526
|
+
cache: import("es-toolkit").MemoizeCache<any, z.ZodObject<{
|
|
527
|
+
type: z.ZodLiteral<"http_request">;
|
|
528
|
+
request: z.ZodObject<{
|
|
529
|
+
path: z.ZodString;
|
|
530
|
+
pathParams: z.ZodObject<{}, z.core.$catchall<z.ZodString>>;
|
|
531
|
+
method: z.ZodUnion<readonly [z.ZodLiteral<"GET">, z.ZodLiteral<"POST">, z.ZodLiteral<"PUT">, z.ZodLiteral<"DELETE">, z.ZodLiteral<"HEAD">, z.ZodLiteral<"OPTIONS">]>;
|
|
532
|
+
query: z.ZodObject<{}, z.core.$catchall<z.ZodString>>;
|
|
533
|
+
headers: z.ZodObject<{}, z.core.$catchall<z.ZodString>>;
|
|
534
|
+
body: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
535
|
+
}, z.core.$strip>;
|
|
536
|
+
id: z.ZodNumber;
|
|
537
|
+
}, z.core.$strip>>;
|
|
538
|
+
};
|
|
450
539
|
export interface WebsocketHttpResponseMessage {
|
|
451
540
|
type: 'http_response';
|
|
452
541
|
/**
|
|
@@ -516,7 +605,7 @@ export interface UpdatesReceivedMessage {
|
|
|
516
605
|
*/
|
|
517
606
|
neededBranchSizeInBytes?: number;
|
|
518
607
|
}
|
|
519
|
-
export declare const updatesReceivedMessageSchema: z.ZodObject<{
|
|
608
|
+
export declare const updatesReceivedMessageSchema: (() => z.ZodObject<{
|
|
520
609
|
type: z.ZodLiteral<"repo/updates_received">;
|
|
521
610
|
recordName: z.ZodNullable<z.ZodString>;
|
|
522
611
|
inst: z.ZodString;
|
|
@@ -529,7 +618,22 @@ export declare const updatesReceivedMessageSchema: z.ZodObject<{
|
|
|
529
618
|
}>>;
|
|
530
619
|
maxBranchSizeInBytes: z.ZodOptional<z.ZodNumber>;
|
|
531
620
|
neededBranchSizeInBytes: z.ZodOptional<z.ZodNumber>;
|
|
532
|
-
}, z.core.$strip
|
|
621
|
+
}, z.core.$strip>) & {
|
|
622
|
+
cache: import("es-toolkit").MemoizeCache<any, z.ZodObject<{
|
|
623
|
+
type: z.ZodLiteral<"repo/updates_received">;
|
|
624
|
+
recordName: z.ZodNullable<z.ZodString>;
|
|
625
|
+
inst: z.ZodString;
|
|
626
|
+
branch: z.ZodString;
|
|
627
|
+
updateId: z.ZodNumber;
|
|
628
|
+
errorCode: z.ZodOptional<z.ZodEnum<{
|
|
629
|
+
record_not_found: "record_not_found";
|
|
630
|
+
inst_not_found: "inst_not_found";
|
|
631
|
+
max_size_reached: "max_size_reached";
|
|
632
|
+
}>>;
|
|
633
|
+
maxBranchSizeInBytes: z.ZodOptional<z.ZodNumber>;
|
|
634
|
+
neededBranchSizeInBytes: z.ZodOptional<z.ZodNumber>;
|
|
635
|
+
}, z.core.$strip>>;
|
|
636
|
+
};
|
|
533
637
|
/**
|
|
534
638
|
* Sends the given remote action to devices connected to the given branch.
|
|
535
639
|
*/
|
|
@@ -553,7 +657,7 @@ export interface SendActionMessage {
|
|
|
553
657
|
*/
|
|
554
658
|
action: RemoteAction | RemoteActionResult | RemoteActionError;
|
|
555
659
|
}
|
|
556
|
-
export declare const sendActionMessageSchema: z.ZodObject<{
|
|
660
|
+
export declare const sendActionMessageSchema: (() => z.ZodObject<{
|
|
557
661
|
type: z.ZodLiteral<"repo/send_action">;
|
|
558
662
|
recordName: z.ZodNullable<z.ZodString>;
|
|
559
663
|
inst: z.ZodString;
|
|
@@ -584,7 +688,40 @@ export declare const sendActionMessageSchema: z.ZodObject<{
|
|
|
584
688
|
error: z.ZodAny;
|
|
585
689
|
taskId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
586
690
|
}, z.core.$strip>], "type">;
|
|
587
|
-
}, z.core.$strip
|
|
691
|
+
}, z.core.$strip>) & {
|
|
692
|
+
cache: import("es-toolkit").MemoizeCache<any, z.ZodObject<{
|
|
693
|
+
type: z.ZodLiteral<"repo/send_action">;
|
|
694
|
+
recordName: z.ZodNullable<z.ZodString>;
|
|
695
|
+
inst: z.ZodString;
|
|
696
|
+
branch: z.ZodString;
|
|
697
|
+
action: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
698
|
+
connectionId: z.ZodOptional<z.ZodString>;
|
|
699
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
700
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
701
|
+
broadcast: z.ZodOptional<z.ZodBoolean>;
|
|
702
|
+
type: z.ZodLiteral<"remote">;
|
|
703
|
+
event: z.ZodAny;
|
|
704
|
+
allowBatching: z.ZodOptional<z.ZodBoolean>;
|
|
705
|
+
taskId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
706
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
707
|
+
connectionId: z.ZodOptional<z.ZodString>;
|
|
708
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
709
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
710
|
+
broadcast: z.ZodOptional<z.ZodBoolean>;
|
|
711
|
+
type: z.ZodLiteral<"remote_result">;
|
|
712
|
+
result: z.ZodOptional<z.ZodAny>;
|
|
713
|
+
taskId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
714
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
715
|
+
connectionId: z.ZodOptional<z.ZodString>;
|
|
716
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
717
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
718
|
+
broadcast: z.ZodOptional<z.ZodBoolean>;
|
|
719
|
+
type: z.ZodLiteral<"remote_error">;
|
|
720
|
+
error: z.ZodAny;
|
|
721
|
+
taskId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
722
|
+
}, z.core.$strip>], "type">;
|
|
723
|
+
}, z.core.$strip>>;
|
|
724
|
+
};
|
|
588
725
|
/**
|
|
589
726
|
* Sends the given device action to devices connected to the given branch.
|
|
590
727
|
*/
|
|
@@ -608,7 +745,7 @@ export interface ReceiveDeviceActionMessage {
|
|
|
608
745
|
*/
|
|
609
746
|
action: DeviceAction | DeviceActionResult | DeviceActionError;
|
|
610
747
|
}
|
|
611
|
-
export declare const receiveDeviceActionMessageSchema: z.ZodObject<{
|
|
748
|
+
export declare const receiveDeviceActionMessageSchema: (() => z.ZodObject<{
|
|
612
749
|
type: z.ZodLiteral<"repo/receive_action">;
|
|
613
750
|
recordName: z.ZodNullable<z.ZodString>;
|
|
614
751
|
inst: z.ZodString;
|
|
@@ -641,7 +778,42 @@ export declare const receiveDeviceActionMessageSchema: z.ZodObject<{
|
|
|
641
778
|
userId: z.ZodString;
|
|
642
779
|
}, z.core.$strip>;
|
|
643
780
|
}, z.core.$strip>], "type">;
|
|
644
|
-
}, z.core.$strip
|
|
781
|
+
}, z.core.$strip>) & {
|
|
782
|
+
cache: import("es-toolkit").MemoizeCache<any, z.ZodObject<{
|
|
783
|
+
type: z.ZodLiteral<"repo/receive_action">;
|
|
784
|
+
recordName: z.ZodNullable<z.ZodString>;
|
|
785
|
+
inst: z.ZodString;
|
|
786
|
+
branch: z.ZodString;
|
|
787
|
+
action: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
788
|
+
type: z.ZodLiteral<"device">;
|
|
789
|
+
connection: z.ZodObject<{
|
|
790
|
+
connectionId: z.ZodString;
|
|
791
|
+
sessionId: z.ZodString;
|
|
792
|
+
userId: z.ZodString;
|
|
793
|
+
}, z.core.$strip>;
|
|
794
|
+
event: z.ZodAny;
|
|
795
|
+
taskId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
796
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
797
|
+
type: z.ZodLiteral<"device_result">;
|
|
798
|
+
result: z.ZodAny;
|
|
799
|
+
taskId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
800
|
+
connection: z.ZodObject<{
|
|
801
|
+
connectionId: z.ZodString;
|
|
802
|
+
sessionId: z.ZodString;
|
|
803
|
+
userId: z.ZodString;
|
|
804
|
+
}, z.core.$strip>;
|
|
805
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
806
|
+
type: z.ZodLiteral<"device_error">;
|
|
807
|
+
error: z.ZodAny;
|
|
808
|
+
taskId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
809
|
+
connection: z.ZodObject<{
|
|
810
|
+
connectionId: z.ZodString;
|
|
811
|
+
sessionId: z.ZodString;
|
|
812
|
+
userId: z.ZodString;
|
|
813
|
+
}, z.core.$strip>;
|
|
814
|
+
}, z.core.$strip>], "type">;
|
|
815
|
+
}, z.core.$strip>>;
|
|
816
|
+
};
|
|
645
817
|
/**
|
|
646
818
|
* Defines an event which indicates that a connection has been made to a branch.
|
|
647
819
|
*/
|
|
@@ -661,7 +833,7 @@ export interface ConnectedToBranchMessage {
|
|
|
661
833
|
*/
|
|
662
834
|
connection: ConnectionInfo;
|
|
663
835
|
}
|
|
664
|
-
export declare const connectedToBranchMessageSchema: z.ZodObject<{
|
|
836
|
+
export declare const connectedToBranchMessageSchema: (() => z.ZodObject<{
|
|
665
837
|
type: z.ZodLiteral<"repo/connected_to_branch">;
|
|
666
838
|
broadcast: z.ZodBoolean;
|
|
667
839
|
branch: z.ZodObject<{
|
|
@@ -677,7 +849,25 @@ export declare const connectedToBranchMessageSchema: z.ZodObject<{
|
|
|
677
849
|
sessionId: z.ZodString;
|
|
678
850
|
userId: z.ZodString;
|
|
679
851
|
}, z.core.$strip>;
|
|
680
|
-
}, z.core.$strip
|
|
852
|
+
}, z.core.$strip>) & {
|
|
853
|
+
cache: import("es-toolkit").MemoizeCache<any, z.ZodObject<{
|
|
854
|
+
type: z.ZodLiteral<"repo/connected_to_branch">;
|
|
855
|
+
broadcast: z.ZodBoolean;
|
|
856
|
+
branch: z.ZodObject<{
|
|
857
|
+
type: z.ZodLiteral<"repo/watch_branch">;
|
|
858
|
+
recordName: z.ZodNullable<z.ZodString>;
|
|
859
|
+
inst: z.ZodString;
|
|
860
|
+
branch: z.ZodString;
|
|
861
|
+
temporary: z.ZodOptional<z.ZodBoolean>;
|
|
862
|
+
markers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
863
|
+
}, z.core.$strip>;
|
|
864
|
+
connection: z.ZodObject<{
|
|
865
|
+
connectionId: z.ZodString;
|
|
866
|
+
sessionId: z.ZodString;
|
|
867
|
+
userId: z.ZodString;
|
|
868
|
+
}, z.core.$strip>;
|
|
869
|
+
}, z.core.$strip>>;
|
|
870
|
+
};
|
|
681
871
|
/**
|
|
682
872
|
* Defines an event which indicates that a connection has been removed from a branch.
|
|
683
873
|
*/
|
|
@@ -706,7 +896,7 @@ export interface DisconnectedFromBranchMessage {
|
|
|
706
896
|
*/
|
|
707
897
|
connection: ConnectionInfo;
|
|
708
898
|
}
|
|
709
|
-
export declare const disconnectedFromBranchMessageSchema: z.ZodObject<{
|
|
899
|
+
export declare const disconnectedFromBranchMessageSchema: (() => z.ZodObject<{
|
|
710
900
|
type: z.ZodLiteral<"repo/disconnected_from_branch">;
|
|
711
901
|
broadcast: z.ZodBoolean;
|
|
712
902
|
recordName: z.ZodNullable<z.ZodString>;
|
|
@@ -717,7 +907,20 @@ export declare const disconnectedFromBranchMessageSchema: z.ZodObject<{
|
|
|
717
907
|
sessionId: z.ZodString;
|
|
718
908
|
userId: z.ZodString;
|
|
719
909
|
}, z.core.$strip>;
|
|
720
|
-
}, z.core.$strip
|
|
910
|
+
}, z.core.$strip>) & {
|
|
911
|
+
cache: import("es-toolkit").MemoizeCache<any, z.ZodObject<{
|
|
912
|
+
type: z.ZodLiteral<"repo/disconnected_from_branch">;
|
|
913
|
+
broadcast: z.ZodBoolean;
|
|
914
|
+
recordName: z.ZodNullable<z.ZodString>;
|
|
915
|
+
inst: z.ZodString;
|
|
916
|
+
branch: z.ZodString;
|
|
917
|
+
connection: z.ZodObject<{
|
|
918
|
+
connectionId: z.ZodString;
|
|
919
|
+
sessionId: z.ZodString;
|
|
920
|
+
userId: z.ZodString;
|
|
921
|
+
}, z.core.$strip>;
|
|
922
|
+
}, z.core.$strip>>;
|
|
923
|
+
};
|
|
721
924
|
export interface ConnectionCountMessage {
|
|
722
925
|
type: 'repo/connection_count';
|
|
723
926
|
/**
|
|
@@ -740,13 +943,21 @@ export interface ConnectionCountMessage {
|
|
|
740
943
|
*/
|
|
741
944
|
count?: number;
|
|
742
945
|
}
|
|
743
|
-
export declare const connectionCountMessageSchema: z.ZodObject<{
|
|
946
|
+
export declare const connectionCountMessageSchema: (() => z.ZodObject<{
|
|
744
947
|
type: z.ZodLiteral<"repo/connection_count">;
|
|
745
948
|
recordName: z.ZodNullable<z.ZodString>;
|
|
746
949
|
inst: z.ZodNullable<z.ZodString>;
|
|
747
950
|
branch: z.ZodNullable<z.ZodString>;
|
|
748
951
|
count: z.ZodOptional<z.ZodNumber>;
|
|
749
|
-
}, z.core.$strip
|
|
952
|
+
}, z.core.$strip>) & {
|
|
953
|
+
cache: import("es-toolkit").MemoizeCache<any, z.ZodObject<{
|
|
954
|
+
type: z.ZodLiteral<"repo/connection_count">;
|
|
955
|
+
recordName: z.ZodNullable<z.ZodString>;
|
|
956
|
+
inst: z.ZodNullable<z.ZodString>;
|
|
957
|
+
branch: z.ZodNullable<z.ZodString>;
|
|
958
|
+
count: z.ZodOptional<z.ZodNumber>;
|
|
959
|
+
}, z.core.$strip>>;
|
|
960
|
+
};
|
|
750
961
|
/**
|
|
751
962
|
* Defines an event which attempts to perform a time sync.
|
|
752
963
|
*/
|
|
@@ -761,11 +972,17 @@ export interface TimeSyncRequestMessage {
|
|
|
761
972
|
*/
|
|
762
973
|
clientRequestTime: number;
|
|
763
974
|
}
|
|
764
|
-
export declare const timeSyncRequestMessageSchema: z.ZodObject<{
|
|
975
|
+
export declare const timeSyncRequestMessageSchema: (() => z.ZodObject<{
|
|
765
976
|
type: z.ZodLiteral<"sync/time">;
|
|
766
977
|
id: z.ZodNumber;
|
|
767
978
|
clientRequestTime: z.ZodNumber;
|
|
768
|
-
}, z.core.$strip
|
|
979
|
+
}, z.core.$strip>) & {
|
|
980
|
+
cache: import("es-toolkit").MemoizeCache<any, z.ZodObject<{
|
|
981
|
+
type: z.ZodLiteral<"sync/time">;
|
|
982
|
+
id: z.ZodNumber;
|
|
983
|
+
clientRequestTime: z.ZodNumber;
|
|
984
|
+
}, z.core.$strip>>;
|
|
985
|
+
};
|
|
769
986
|
/**
|
|
770
987
|
* Defines an event which is the response for a time sync.
|
|
771
988
|
*/
|
|
@@ -788,13 +1005,21 @@ export interface TimeSyncResponseMessage {
|
|
|
788
1005
|
*/
|
|
789
1006
|
serverTransmitTime: number;
|
|
790
1007
|
}
|
|
791
|
-
export declare const timeSyncResponseMessageSchema: z.ZodObject<{
|
|
1008
|
+
export declare const timeSyncResponseMessageSchema: (() => z.ZodObject<{
|
|
792
1009
|
type: z.ZodLiteral<"sync/time/response">;
|
|
793
1010
|
id: z.ZodNumber;
|
|
794
1011
|
clientRequestTime: z.ZodNumber;
|
|
795
1012
|
serverReceiveTime: z.ZodNumber;
|
|
796
1013
|
serverTransmitTime: z.ZodNumber;
|
|
797
|
-
}, z.core.$strip
|
|
1014
|
+
}, z.core.$strip>) & {
|
|
1015
|
+
cache: import("es-toolkit").MemoizeCache<any, z.ZodObject<{
|
|
1016
|
+
type: z.ZodLiteral<"sync/time/response">;
|
|
1017
|
+
id: z.ZodNumber;
|
|
1018
|
+
clientRequestTime: z.ZodNumber;
|
|
1019
|
+
serverReceiveTime: z.ZodNumber;
|
|
1020
|
+
serverTransmitTime: z.ZodNumber;
|
|
1021
|
+
}, z.core.$strip>>;
|
|
1022
|
+
};
|
|
798
1023
|
export interface RequestMissingPermissionMessage {
|
|
799
1024
|
type: 'permission/request/missing';
|
|
800
1025
|
/**
|
|
@@ -810,7 +1035,7 @@ export interface RequestMissingPermissionMessage {
|
|
|
810
1035
|
*/
|
|
811
1036
|
user?: PublicUserInfo;
|
|
812
1037
|
}
|
|
813
|
-
export declare const requestMissingPermissionMessageSchema: z.ZodObject<{
|
|
1038
|
+
export declare const requestMissingPermissionMessageSchema: (() => z.ZodObject<{
|
|
814
1039
|
type: z.ZodLiteral<"permission/request/missing">;
|
|
815
1040
|
reason: z.ZodObject<{
|
|
816
1041
|
type: z.ZodLiteral<"missing_permission">;
|
|
@@ -869,7 +1094,68 @@ export declare const requestMissingPermissionMessageSchema: z.ZodObject<{
|
|
|
869
1094
|
}>;
|
|
870
1095
|
subjectId: z.ZodString;
|
|
871
1096
|
}, z.core.$strip>;
|
|
872
|
-
}, z.core.$strip
|
|
1097
|
+
}, z.core.$strip>) & {
|
|
1098
|
+
cache: import("es-toolkit").MemoizeCache<any, z.ZodObject<{
|
|
1099
|
+
type: z.ZodLiteral<"permission/request/missing">;
|
|
1100
|
+
reason: z.ZodObject<{
|
|
1101
|
+
type: z.ZodLiteral<"missing_permission">;
|
|
1102
|
+
recordName: z.ZodString;
|
|
1103
|
+
resourceKind: z.ZodEnum<{
|
|
1104
|
+
search: "search";
|
|
1105
|
+
inst: "inst";
|
|
1106
|
+
file: "file";
|
|
1107
|
+
event: "event";
|
|
1108
|
+
role: "role";
|
|
1109
|
+
data: "data";
|
|
1110
|
+
marker: "marker";
|
|
1111
|
+
loom: "loom";
|
|
1112
|
+
"ai.sloyd": "ai.sloyd";
|
|
1113
|
+
"ai.hume": "ai.hume";
|
|
1114
|
+
"ai.openai.realtime": "ai.openai.realtime";
|
|
1115
|
+
webhook: "webhook";
|
|
1116
|
+
notification: "notification";
|
|
1117
|
+
package: "package";
|
|
1118
|
+
"package.version": "package.version";
|
|
1119
|
+
database: "database";
|
|
1120
|
+
purchasableItem: "purchasableItem";
|
|
1121
|
+
contract: "contract";
|
|
1122
|
+
invoice: "invoice";
|
|
1123
|
+
}>;
|
|
1124
|
+
resourceId: z.ZodString;
|
|
1125
|
+
action: z.ZodEnum<{
|
|
1126
|
+
run: "run";
|
|
1127
|
+
read: "read";
|
|
1128
|
+
create: "create";
|
|
1129
|
+
update: "update";
|
|
1130
|
+
delete: "delete";
|
|
1131
|
+
assign: "assign";
|
|
1132
|
+
unassign: "unassign";
|
|
1133
|
+
increment: "increment";
|
|
1134
|
+
count: "count";
|
|
1135
|
+
list: "list";
|
|
1136
|
+
grantPermission: "grantPermission";
|
|
1137
|
+
revokePermission: "revokePermission";
|
|
1138
|
+
grant: "grant";
|
|
1139
|
+
revoke: "revoke";
|
|
1140
|
+
sendAction: "sendAction";
|
|
1141
|
+
updateData: "updateData";
|
|
1142
|
+
send: "send";
|
|
1143
|
+
subscribe: "subscribe";
|
|
1144
|
+
unsubscribe: "unsubscribe";
|
|
1145
|
+
listSubscriptions: "listSubscriptions";
|
|
1146
|
+
purchase: "purchase";
|
|
1147
|
+
approve: "approve";
|
|
1148
|
+
cancel: "cancel";
|
|
1149
|
+
}>;
|
|
1150
|
+
subjectType: z.ZodEnum<{
|
|
1151
|
+
inst: "inst";
|
|
1152
|
+
user: "user";
|
|
1153
|
+
role: "role";
|
|
1154
|
+
}>;
|
|
1155
|
+
subjectId: z.ZodString;
|
|
1156
|
+
}, z.core.$strip>;
|
|
1157
|
+
}, z.core.$strip>>;
|
|
1158
|
+
};
|
|
873
1159
|
export type RequestMissingPermissionResponseMessage = RequestMissingPermissionResponseSuccessMessage | RequestMissingPermissionResponseFailureMessage;
|
|
874
1160
|
export interface RequestMissingPermissionResponseSuccessMessage {
|
|
875
1161
|
type: 'permission/request/missing/response';
|
|
@@ -899,7 +1185,7 @@ export interface RequestMissingPermissionResponseFailureMessage {
|
|
|
899
1185
|
*/
|
|
900
1186
|
connection?: ConnectionInfo;
|
|
901
1187
|
}
|
|
902
|
-
export declare const requestMissingPermissionResponseMessageSchema: z.ZodObject<{
|
|
1188
|
+
export declare const requestMissingPermissionResponseMessageSchema: (() => z.ZodObject<{
|
|
903
1189
|
type: z.ZodLiteral<"permission/request/missing/response">;
|
|
904
1190
|
success: z.ZodBoolean;
|
|
905
1191
|
recordName: z.ZodString;
|
|
@@ -933,18 +1219,60 @@ export declare const requestMissingPermissionResponseMessageSchema: z.ZodObject<
|
|
|
933
1219
|
subjectId: z.ZodString;
|
|
934
1220
|
errorCode: z.ZodOptional<z.ZodString>;
|
|
935
1221
|
errorMessage: z.ZodOptional<z.ZodString>;
|
|
936
|
-
}, z.core.$strip
|
|
1222
|
+
}, z.core.$strip>) & {
|
|
1223
|
+
cache: import("es-toolkit").MemoizeCache<any, z.ZodObject<{
|
|
1224
|
+
type: z.ZodLiteral<"permission/request/missing/response">;
|
|
1225
|
+
success: z.ZodBoolean;
|
|
1226
|
+
recordName: z.ZodString;
|
|
1227
|
+
resourceKind: z.ZodEnum<{
|
|
1228
|
+
search: "search";
|
|
1229
|
+
inst: "inst";
|
|
1230
|
+
file: "file";
|
|
1231
|
+
event: "event";
|
|
1232
|
+
role: "role";
|
|
1233
|
+
data: "data";
|
|
1234
|
+
marker: "marker";
|
|
1235
|
+
loom: "loom";
|
|
1236
|
+
"ai.sloyd": "ai.sloyd";
|
|
1237
|
+
"ai.hume": "ai.hume";
|
|
1238
|
+
"ai.openai.realtime": "ai.openai.realtime";
|
|
1239
|
+
webhook: "webhook";
|
|
1240
|
+
notification: "notification";
|
|
1241
|
+
package: "package";
|
|
1242
|
+
"package.version": "package.version";
|
|
1243
|
+
database: "database";
|
|
1244
|
+
purchasableItem: "purchasableItem";
|
|
1245
|
+
contract: "contract";
|
|
1246
|
+
invoice: "invoice";
|
|
1247
|
+
}>;
|
|
1248
|
+
resourceId: z.ZodString;
|
|
1249
|
+
subjectType: z.ZodEnum<{
|
|
1250
|
+
inst: "inst";
|
|
1251
|
+
user: "user";
|
|
1252
|
+
role: "role";
|
|
1253
|
+
}>;
|
|
1254
|
+
subjectId: z.ZodString;
|
|
1255
|
+
errorCode: z.ZodOptional<z.ZodString>;
|
|
1256
|
+
errorMessage: z.ZodOptional<z.ZodString>;
|
|
1257
|
+
}, z.core.$strip>>;
|
|
1258
|
+
};
|
|
937
1259
|
export interface RateLimitExceededMessage {
|
|
938
1260
|
type: 'rate_limit_exceeded';
|
|
939
1261
|
retryAfter: number;
|
|
940
1262
|
totalHits: number;
|
|
941
1263
|
}
|
|
942
|
-
export declare const rateLimitExceededMessageSchema: z.ZodObject<{
|
|
1264
|
+
export declare const rateLimitExceededMessageSchema: (() => z.ZodObject<{
|
|
943
1265
|
type: z.ZodLiteral<"rate_limit_exceeded">;
|
|
944
1266
|
retryAfter: z.ZodNumber;
|
|
945
1267
|
totalHits: z.ZodNumber;
|
|
946
|
-
}, z.core.$strip
|
|
947
|
-
|
|
1268
|
+
}, z.core.$strip>) & {
|
|
1269
|
+
cache: import("es-toolkit").MemoizeCache<any, z.ZodObject<{
|
|
1270
|
+
type: z.ZodLiteral<"rate_limit_exceeded">;
|
|
1271
|
+
retryAfter: z.ZodNumber;
|
|
1272
|
+
totalHits: z.ZodNumber;
|
|
1273
|
+
}, z.core.$strip>>;
|
|
1274
|
+
};
|
|
1275
|
+
export declare const websocketRequestMessageSchema: (() => z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
948
1276
|
type: z.ZodLiteral<"login">;
|
|
949
1277
|
connectionToken: z.ZodOptional<z.ZodString>;
|
|
950
1278
|
connectionId: z.ZodOptional<z.ZodString>;
|
|
@@ -1129,5 +1457,192 @@ export declare const websocketRequestMessageSchema: z.ZodDiscriminatedUnion<[z.Z
|
|
|
1129
1457
|
subjectId: z.ZodString;
|
|
1130
1458
|
errorCode: z.ZodOptional<z.ZodString>;
|
|
1131
1459
|
errorMessage: z.ZodOptional<z.ZodString>;
|
|
1132
|
-
}, z.core.$strip>], "type"
|
|
1460
|
+
}, z.core.$strip>], "type">) & {
|
|
1461
|
+
cache: import("es-toolkit").MemoizeCache<any, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1462
|
+
type: z.ZodLiteral<"login">;
|
|
1463
|
+
connectionToken: z.ZodOptional<z.ZodString>;
|
|
1464
|
+
connectionId: z.ZodOptional<z.ZodString>;
|
|
1465
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1466
|
+
type: z.ZodLiteral<"repo/watch_branch">;
|
|
1467
|
+
recordName: z.ZodNullable<z.ZodString>;
|
|
1468
|
+
inst: z.ZodString;
|
|
1469
|
+
branch: z.ZodString;
|
|
1470
|
+
temporary: z.ZodOptional<z.ZodBoolean>;
|
|
1471
|
+
markers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1472
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1473
|
+
type: z.ZodLiteral<"repo/unwatch_branch">;
|
|
1474
|
+
recordName: z.ZodNullable<z.ZodString>;
|
|
1475
|
+
inst: z.ZodString;
|
|
1476
|
+
branch: z.ZodString;
|
|
1477
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1478
|
+
type: z.ZodLiteral<"repo/add_updates">;
|
|
1479
|
+
recordName: z.ZodNullable<z.ZodString>;
|
|
1480
|
+
inst: z.ZodString;
|
|
1481
|
+
branch: z.ZodString;
|
|
1482
|
+
updates: z.ZodArray<z.ZodString>;
|
|
1483
|
+
updateId: z.ZodOptional<z.ZodNumber>;
|
|
1484
|
+
initial: z.ZodOptional<z.ZodBoolean>;
|
|
1485
|
+
timestamps: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
1486
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1487
|
+
type: z.ZodLiteral<"repo/send_action">;
|
|
1488
|
+
recordName: z.ZodNullable<z.ZodString>;
|
|
1489
|
+
inst: z.ZodString;
|
|
1490
|
+
branch: z.ZodString;
|
|
1491
|
+
action: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1492
|
+
connectionId: z.ZodOptional<z.ZodString>;
|
|
1493
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
1494
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
1495
|
+
broadcast: z.ZodOptional<z.ZodBoolean>;
|
|
1496
|
+
type: z.ZodLiteral<"remote">;
|
|
1497
|
+
event: z.ZodAny;
|
|
1498
|
+
allowBatching: z.ZodOptional<z.ZodBoolean>;
|
|
1499
|
+
taskId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1500
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1501
|
+
connectionId: z.ZodOptional<z.ZodString>;
|
|
1502
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
1503
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
1504
|
+
broadcast: z.ZodOptional<z.ZodBoolean>;
|
|
1505
|
+
type: z.ZodLiteral<"remote_result">;
|
|
1506
|
+
result: z.ZodOptional<z.ZodAny>;
|
|
1507
|
+
taskId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1508
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1509
|
+
connectionId: z.ZodOptional<z.ZodString>;
|
|
1510
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
1511
|
+
userId: z.ZodOptional<z.ZodString>;
|
|
1512
|
+
broadcast: z.ZodOptional<z.ZodBoolean>;
|
|
1513
|
+
type: z.ZodLiteral<"remote_error">;
|
|
1514
|
+
error: z.ZodAny;
|
|
1515
|
+
taskId: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
1516
|
+
}, z.core.$strip>], "type">;
|
|
1517
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1518
|
+
type: z.ZodLiteral<"repo/watch_branch_devices">;
|
|
1519
|
+
recordName: z.ZodNullable<z.ZodString>;
|
|
1520
|
+
inst: z.ZodString;
|
|
1521
|
+
branch: z.ZodString;
|
|
1522
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1523
|
+
type: z.ZodLiteral<"repo/unwatch_branch_devices">;
|
|
1524
|
+
recordName: z.ZodNullable<z.ZodString>;
|
|
1525
|
+
inst: z.ZodString;
|
|
1526
|
+
branch: z.ZodString;
|
|
1527
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1528
|
+
type: z.ZodLiteral<"repo/connection_count">;
|
|
1529
|
+
recordName: z.ZodNullable<z.ZodString>;
|
|
1530
|
+
inst: z.ZodNullable<z.ZodString>;
|
|
1531
|
+
branch: z.ZodNullable<z.ZodString>;
|
|
1532
|
+
count: z.ZodOptional<z.ZodNumber>;
|
|
1533
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1534
|
+
type: z.ZodLiteral<"sync/time">;
|
|
1535
|
+
id: z.ZodNumber;
|
|
1536
|
+
clientRequestTime: z.ZodNumber;
|
|
1537
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1538
|
+
type: z.ZodLiteral<"repo/get_updates">;
|
|
1539
|
+
recordName: z.ZodNullable<z.ZodString>;
|
|
1540
|
+
inst: z.ZodString;
|
|
1541
|
+
branch: z.ZodString;
|
|
1542
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1543
|
+
type: z.ZodLiteral<"http_request">;
|
|
1544
|
+
request: z.ZodObject<{
|
|
1545
|
+
path: z.ZodString;
|
|
1546
|
+
pathParams: z.ZodObject<{}, z.core.$catchall<z.ZodString>>;
|
|
1547
|
+
method: z.ZodUnion<readonly [z.ZodLiteral<"GET">, z.ZodLiteral<"POST">, z.ZodLiteral<"PUT">, z.ZodLiteral<"DELETE">, z.ZodLiteral<"HEAD">, z.ZodLiteral<"OPTIONS">]>;
|
|
1548
|
+
query: z.ZodObject<{}, z.core.$catchall<z.ZodString>>;
|
|
1549
|
+
headers: z.ZodObject<{}, z.core.$catchall<z.ZodString>>;
|
|
1550
|
+
body: z.ZodUnion<readonly [z.ZodString, z.ZodNull]>;
|
|
1551
|
+
}, z.core.$strip>;
|
|
1552
|
+
id: z.ZodNumber;
|
|
1553
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1554
|
+
type: z.ZodLiteral<"permission/request/missing">;
|
|
1555
|
+
reason: z.ZodObject<{
|
|
1556
|
+
type: z.ZodLiteral<"missing_permission">;
|
|
1557
|
+
recordName: z.ZodString;
|
|
1558
|
+
resourceKind: z.ZodEnum<{
|
|
1559
|
+
search: "search";
|
|
1560
|
+
inst: "inst";
|
|
1561
|
+
file: "file";
|
|
1562
|
+
event: "event";
|
|
1563
|
+
role: "role";
|
|
1564
|
+
data: "data";
|
|
1565
|
+
marker: "marker";
|
|
1566
|
+
loom: "loom";
|
|
1567
|
+
"ai.sloyd": "ai.sloyd";
|
|
1568
|
+
"ai.hume": "ai.hume";
|
|
1569
|
+
"ai.openai.realtime": "ai.openai.realtime";
|
|
1570
|
+
webhook: "webhook";
|
|
1571
|
+
notification: "notification";
|
|
1572
|
+
package: "package";
|
|
1573
|
+
"package.version": "package.version";
|
|
1574
|
+
database: "database";
|
|
1575
|
+
purchasableItem: "purchasableItem";
|
|
1576
|
+
contract: "contract";
|
|
1577
|
+
invoice: "invoice";
|
|
1578
|
+
}>;
|
|
1579
|
+
resourceId: z.ZodString;
|
|
1580
|
+
action: z.ZodEnum<{
|
|
1581
|
+
run: "run";
|
|
1582
|
+
read: "read";
|
|
1583
|
+
create: "create";
|
|
1584
|
+
update: "update";
|
|
1585
|
+
delete: "delete";
|
|
1586
|
+
assign: "assign";
|
|
1587
|
+
unassign: "unassign";
|
|
1588
|
+
increment: "increment";
|
|
1589
|
+
count: "count";
|
|
1590
|
+
list: "list";
|
|
1591
|
+
grantPermission: "grantPermission";
|
|
1592
|
+
revokePermission: "revokePermission";
|
|
1593
|
+
grant: "grant";
|
|
1594
|
+
revoke: "revoke";
|
|
1595
|
+
sendAction: "sendAction";
|
|
1596
|
+
updateData: "updateData";
|
|
1597
|
+
send: "send";
|
|
1598
|
+
subscribe: "subscribe";
|
|
1599
|
+
unsubscribe: "unsubscribe";
|
|
1600
|
+
listSubscriptions: "listSubscriptions";
|
|
1601
|
+
purchase: "purchase";
|
|
1602
|
+
approve: "approve";
|
|
1603
|
+
cancel: "cancel";
|
|
1604
|
+
}>;
|
|
1605
|
+
subjectType: z.ZodEnum<{
|
|
1606
|
+
inst: "inst";
|
|
1607
|
+
user: "user";
|
|
1608
|
+
role: "role";
|
|
1609
|
+
}>;
|
|
1610
|
+
subjectId: z.ZodString;
|
|
1611
|
+
}, z.core.$strip>;
|
|
1612
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1613
|
+
type: z.ZodLiteral<"permission/request/missing/response">;
|
|
1614
|
+
success: z.ZodBoolean;
|
|
1615
|
+
recordName: z.ZodString;
|
|
1616
|
+
resourceKind: z.ZodEnum<{
|
|
1617
|
+
search: "search";
|
|
1618
|
+
inst: "inst";
|
|
1619
|
+
file: "file";
|
|
1620
|
+
event: "event";
|
|
1621
|
+
role: "role";
|
|
1622
|
+
data: "data";
|
|
1623
|
+
marker: "marker";
|
|
1624
|
+
loom: "loom";
|
|
1625
|
+
"ai.sloyd": "ai.sloyd";
|
|
1626
|
+
"ai.hume": "ai.hume";
|
|
1627
|
+
"ai.openai.realtime": "ai.openai.realtime";
|
|
1628
|
+
webhook: "webhook";
|
|
1629
|
+
notification: "notification";
|
|
1630
|
+
package: "package";
|
|
1631
|
+
"package.version": "package.version";
|
|
1632
|
+
database: "database";
|
|
1633
|
+
purchasableItem: "purchasableItem";
|
|
1634
|
+
contract: "contract";
|
|
1635
|
+
invoice: "invoice";
|
|
1636
|
+
}>;
|
|
1637
|
+
resourceId: z.ZodString;
|
|
1638
|
+
subjectType: z.ZodEnum<{
|
|
1639
|
+
inst: "inst";
|
|
1640
|
+
user: "user";
|
|
1641
|
+
role: "role";
|
|
1642
|
+
}>;
|
|
1643
|
+
subjectId: z.ZodString;
|
|
1644
|
+
errorCode: z.ZodOptional<z.ZodString>;
|
|
1645
|
+
errorMessage: z.ZodOptional<z.ZodString>;
|
|
1646
|
+
}, z.core.$strip>], "type">>;
|
|
1647
|
+
};
|
|
1133
1648
|
//# sourceMappingURL=WebsocketEvents.d.ts.map
|