@wireapp/api-client 27.91.0 → 27.93.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/lib/cells/CellsAPI.schema.d.ts +759 -39
- package/lib/cells/CellsAPI.schema.d.ts.map +1 -1
- package/lib/cells/CellsAPI.schema.js +171 -19
- package/lib/tcp/ReconnectingWebsocket.d.ts +7 -0
- package/lib/tcp/ReconnectingWebsocket.d.ts.map +1 -1
- package/lib/tcp/ReconnectingWebsocket.js +47 -13
- package/lib/tcp/WebSocketClient.d.ts +8 -0
- package/lib/tcp/WebSocketClient.d.ts.map +1 -1
- package/lib/tcp/WebSocketClient.js +10 -0
- package/package.json +10 -10
|
@@ -2,55 +2,775 @@ import { z } from 'zod';
|
|
|
2
2
|
/**
|
|
3
3
|
* Zod schema for REST node
|
|
4
4
|
* Used for validating API responses from getNode and similar endpoints
|
|
5
|
-
* Fields are optional to handle various response scenarios
|
|
6
5
|
*/
|
|
7
6
|
export declare const RestNodeSchema: z.ZodObject<{
|
|
8
|
-
/**
|
|
9
|
-
|
|
7
|
+
/** Activities */
|
|
8
|
+
Activities: z.ZodOptional<z.ZodArray<z.ZodType<any, z.ZodTypeDef, any>, "many">>;
|
|
9
|
+
/** Content hash */
|
|
10
|
+
ContentHash: z.ZodOptional<z.ZodString>;
|
|
11
|
+
/** Content lock information */
|
|
12
|
+
ContentLock: z.ZodOptional<z.ZodObject<{
|
|
13
|
+
IsLocked: z.ZodOptional<z.ZodBoolean>;
|
|
14
|
+
Owner: z.ZodOptional<z.ZodString>;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
Owner?: string | undefined;
|
|
17
|
+
IsLocked?: boolean | undefined;
|
|
18
|
+
}, {
|
|
19
|
+
Owner?: string | undefined;
|
|
20
|
+
IsLocked?: boolean | undefined;
|
|
21
|
+
}>>;
|
|
22
|
+
/** Content type */
|
|
23
|
+
ContentType: z.ZodOptional<z.ZodString>;
|
|
24
|
+
/** Context workspace */
|
|
25
|
+
ContextWorkspace: z.ZodOptional<z.ZodObject<{
|
|
26
|
+
Description: z.ZodOptional<z.ZodString>;
|
|
27
|
+
IsRoot: z.ZodOptional<z.ZodBoolean>;
|
|
28
|
+
IsVirtualRoot: z.ZodOptional<z.ZodBoolean>;
|
|
29
|
+
Label: z.ZodOptional<z.ZodString>;
|
|
30
|
+
Permissions: z.ZodOptional<z.ZodString>;
|
|
31
|
+
Quota: z.ZodOptional<z.ZodString>;
|
|
32
|
+
QuotaUsage: z.ZodOptional<z.ZodString>;
|
|
33
|
+
Scope: z.ZodOptional<z.ZodString>;
|
|
34
|
+
SkipRecycle: z.ZodOptional<z.ZodBoolean>;
|
|
35
|
+
Slug: z.ZodString;
|
|
36
|
+
Syncable: z.ZodOptional<z.ZodBoolean>;
|
|
37
|
+
Uuid: z.ZodString;
|
|
38
|
+
}, "strip", z.ZodTypeAny, {
|
|
39
|
+
Slug: string;
|
|
40
|
+
Uuid: string;
|
|
41
|
+
Description?: string | undefined;
|
|
42
|
+
IsRoot?: boolean | undefined;
|
|
43
|
+
IsVirtualRoot?: boolean | undefined;
|
|
44
|
+
Label?: string | undefined;
|
|
45
|
+
Permissions?: string | undefined;
|
|
46
|
+
Quota?: string | undefined;
|
|
47
|
+
QuotaUsage?: string | undefined;
|
|
48
|
+
Scope?: string | undefined;
|
|
49
|
+
SkipRecycle?: boolean | undefined;
|
|
50
|
+
Syncable?: boolean | undefined;
|
|
51
|
+
}, {
|
|
52
|
+
Slug: string;
|
|
53
|
+
Uuid: string;
|
|
54
|
+
Description?: string | undefined;
|
|
55
|
+
IsRoot?: boolean | undefined;
|
|
56
|
+
IsVirtualRoot?: boolean | undefined;
|
|
57
|
+
Label?: string | undefined;
|
|
58
|
+
Permissions?: string | undefined;
|
|
59
|
+
Quota?: string | undefined;
|
|
60
|
+
QuotaUsage?: string | undefined;
|
|
61
|
+
Scope?: string | undefined;
|
|
62
|
+
SkipRecycle?: boolean | undefined;
|
|
63
|
+
Syncable?: boolean | undefined;
|
|
64
|
+
}>>;
|
|
65
|
+
/** Data source features */
|
|
66
|
+
DataSourceFeatures: z.ZodOptional<z.ZodObject<{
|
|
67
|
+
Encrypted: z.ZodOptional<z.ZodBoolean>;
|
|
68
|
+
Versioned: z.ZodOptional<z.ZodBoolean>;
|
|
69
|
+
}, "strip", z.ZodTypeAny, {
|
|
70
|
+
Encrypted?: boolean | undefined;
|
|
71
|
+
Versioned?: boolean | undefined;
|
|
72
|
+
}, {
|
|
73
|
+
Encrypted?: boolean | undefined;
|
|
74
|
+
Versioned?: boolean | undefined;
|
|
75
|
+
}>>;
|
|
76
|
+
/** Editor URLs */
|
|
77
|
+
EditorURLs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
78
|
+
ExpiresAt: z.ZodOptional<z.ZodString>;
|
|
79
|
+
Url: z.ZodOptional<z.ZodString>;
|
|
80
|
+
}, "strip", z.ZodTypeAny, {
|
|
81
|
+
ExpiresAt?: string | undefined;
|
|
82
|
+
Url?: string | undefined;
|
|
83
|
+
}, {
|
|
84
|
+
ExpiresAt?: string | undefined;
|
|
85
|
+
Url?: string | undefined;
|
|
86
|
+
}>>>;
|
|
87
|
+
/** Editor URLs keys */
|
|
88
|
+
EditorURLsKeys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
89
|
+
/** Folder metadata */
|
|
90
|
+
FolderMeta: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
91
|
+
Namespace: z.ZodString;
|
|
92
|
+
Value: z.ZodNumber;
|
|
93
|
+
}, "strip", z.ZodTypeAny, {
|
|
94
|
+
Namespace: string;
|
|
95
|
+
Value: number;
|
|
96
|
+
}, {
|
|
97
|
+
Namespace: string;
|
|
98
|
+
Value: number;
|
|
99
|
+
}>, "many">>;
|
|
100
|
+
/** Hashing method */
|
|
101
|
+
HashingMethod: z.ZodOptional<z.ZodString>;
|
|
102
|
+
/** Image metadata */
|
|
103
|
+
ImageMeta: z.ZodOptional<z.ZodObject<{
|
|
104
|
+
Height: z.ZodOptional<z.ZodNumber>;
|
|
105
|
+
JsonEXIF: z.ZodOptional<z.ZodString>;
|
|
106
|
+
Orientation: z.ZodOptional<z.ZodNumber>;
|
|
107
|
+
Width: z.ZodOptional<z.ZodNumber>;
|
|
108
|
+
}, "strip", z.ZodTypeAny, {
|
|
109
|
+
Height?: number | undefined;
|
|
110
|
+
JsonEXIF?: string | undefined;
|
|
111
|
+
Orientation?: number | undefined;
|
|
112
|
+
Width?: number | undefined;
|
|
113
|
+
}, {
|
|
114
|
+
Height?: number | undefined;
|
|
115
|
+
JsonEXIF?: string | undefined;
|
|
116
|
+
Orientation?: number | undefined;
|
|
117
|
+
Width?: number | undefined;
|
|
118
|
+
}>>;
|
|
119
|
+
/** Is bookmarked flag */
|
|
120
|
+
IsBookmarked: z.ZodOptional<z.ZodBoolean>;
|
|
121
|
+
/** Is draft flag */
|
|
122
|
+
IsDraft: z.ZodOptional<z.ZodBoolean>;
|
|
123
|
+
/** Is recycle bin flag */
|
|
124
|
+
IsRecycleBin: z.ZodOptional<z.ZodBoolean>;
|
|
125
|
+
/** Is recycled flag */
|
|
126
|
+
IsRecycled: z.ZodOptional<z.ZodBoolean>;
|
|
127
|
+
/** Metadata */
|
|
128
|
+
Metadata: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
129
|
+
Namespace: z.ZodString;
|
|
130
|
+
Value: z.ZodString;
|
|
131
|
+
}, "strip", z.ZodTypeAny, {
|
|
132
|
+
Namespace: string;
|
|
133
|
+
Value: string;
|
|
134
|
+
}, {
|
|
135
|
+
Namespace: string;
|
|
136
|
+
Value: string;
|
|
137
|
+
}>, "many">>;
|
|
138
|
+
/** Node mode/permissions */
|
|
139
|
+
Mode: z.ZodOptional<z.ZodEnum<["Default", "NodeReadOnly", "NodeWriteOnly", "LevelReadOnly"]>>;
|
|
140
|
+
/** Modification timestamp */
|
|
141
|
+
Modified: z.ZodOptional<z.ZodString>;
|
|
10
142
|
/** Node path */
|
|
11
|
-
Path: z.
|
|
12
|
-
/**
|
|
13
|
-
|
|
143
|
+
Path: z.ZodString;
|
|
144
|
+
/** Pre-signed GET URL */
|
|
145
|
+
PreSignedGET: z.ZodOptional<z.ZodObject<{
|
|
146
|
+
ExpiresAt: z.ZodOptional<z.ZodString>;
|
|
147
|
+
Url: z.ZodOptional<z.ZodString>;
|
|
148
|
+
}, "strip", z.ZodTypeAny, {
|
|
149
|
+
ExpiresAt?: string | undefined;
|
|
150
|
+
Url?: string | undefined;
|
|
151
|
+
}, {
|
|
152
|
+
ExpiresAt?: string | undefined;
|
|
153
|
+
Url?: string | undefined;
|
|
154
|
+
}>>;
|
|
155
|
+
/** File previews */
|
|
156
|
+
Previews: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
157
|
+
Bucket: z.ZodOptional<z.ZodString>;
|
|
158
|
+
ContentType: z.ZodOptional<z.ZodString>;
|
|
159
|
+
Dimension: z.ZodOptional<z.ZodNumber>;
|
|
160
|
+
Error: z.ZodOptional<z.ZodBoolean>;
|
|
161
|
+
Key: z.ZodOptional<z.ZodString>;
|
|
162
|
+
PreSignedURL: z.ZodOptional<z.ZodObject<{
|
|
163
|
+
ExpiresAt: z.ZodOptional<z.ZodString>;
|
|
164
|
+
Url: z.ZodOptional<z.ZodString>;
|
|
165
|
+
}, "strip", z.ZodTypeAny, {
|
|
166
|
+
ExpiresAt?: string | undefined;
|
|
167
|
+
Url?: string | undefined;
|
|
168
|
+
}, {
|
|
169
|
+
ExpiresAt?: string | undefined;
|
|
170
|
+
Url?: string | undefined;
|
|
171
|
+
}>>;
|
|
172
|
+
PreSignedGET: z.ZodOptional<z.ZodObject<{
|
|
173
|
+
ExpiresAt: z.ZodOptional<z.ZodString>;
|
|
174
|
+
Url: z.ZodOptional<z.ZodString>;
|
|
175
|
+
}, "strip", z.ZodTypeAny, {
|
|
176
|
+
ExpiresAt?: string | undefined;
|
|
177
|
+
Url?: string | undefined;
|
|
178
|
+
}, {
|
|
179
|
+
ExpiresAt?: string | undefined;
|
|
180
|
+
Url?: string | undefined;
|
|
181
|
+
}>>;
|
|
182
|
+
Processing: z.ZodOptional<z.ZodBoolean>;
|
|
183
|
+
}, "strip", z.ZodTypeAny, {
|
|
184
|
+
Processing?: boolean | undefined;
|
|
185
|
+
Error?: boolean | undefined;
|
|
186
|
+
Bucket?: string | undefined;
|
|
187
|
+
ContentType?: string | undefined;
|
|
188
|
+
Dimension?: number | undefined;
|
|
189
|
+
Key?: string | undefined;
|
|
190
|
+
PreSignedURL?: {
|
|
191
|
+
ExpiresAt?: string | undefined;
|
|
192
|
+
Url?: string | undefined;
|
|
193
|
+
} | undefined;
|
|
194
|
+
PreSignedGET?: {
|
|
195
|
+
ExpiresAt?: string | undefined;
|
|
196
|
+
Url?: string | undefined;
|
|
197
|
+
} | undefined;
|
|
198
|
+
}, {
|
|
199
|
+
Processing?: boolean | undefined;
|
|
200
|
+
Error?: boolean | undefined;
|
|
201
|
+
Bucket?: string | undefined;
|
|
202
|
+
ContentType?: string | undefined;
|
|
203
|
+
Dimension?: number | undefined;
|
|
204
|
+
Key?: string | undefined;
|
|
205
|
+
PreSignedURL?: {
|
|
206
|
+
ExpiresAt?: string | undefined;
|
|
207
|
+
Url?: string | undefined;
|
|
208
|
+
} | undefined;
|
|
209
|
+
PreSignedGET?: {
|
|
210
|
+
ExpiresAt?: string | undefined;
|
|
211
|
+
Url?: string | undefined;
|
|
212
|
+
} | undefined;
|
|
213
|
+
}>, "many">>;
|
|
214
|
+
/** Share links */
|
|
215
|
+
Shares: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
216
|
+
AccessEnd: z.ZodOptional<z.ZodString>;
|
|
217
|
+
AccessStart: z.ZodOptional<z.ZodString>;
|
|
218
|
+
CurrentDownloads: z.ZodOptional<z.ZodString>;
|
|
219
|
+
Description: z.ZodOptional<z.ZodString>;
|
|
220
|
+
Label: z.ZodOptional<z.ZodString>;
|
|
221
|
+
LinkHash: z.ZodOptional<z.ZodString>;
|
|
222
|
+
LinkUrl: z.ZodOptional<z.ZodString>;
|
|
223
|
+
MaxDownloads: z.ZodOptional<z.ZodString>;
|
|
224
|
+
PasswordRequired: z.ZodOptional<z.ZodBoolean>;
|
|
225
|
+
Permissions: z.ZodOptional<z.ZodArray<z.ZodEnum<["NoAccess", "Preview", "Download", "Upload"]>, "many">>;
|
|
226
|
+
Policies: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
227
|
+
PoliciesContextEditable: z.ZodOptional<z.ZodBoolean>;
|
|
228
|
+
}, "strip", z.ZodTypeAny, {
|
|
229
|
+
Description?: string | undefined;
|
|
230
|
+
Label?: string | undefined;
|
|
231
|
+
Permissions?: ("NoAccess" | "Preview" | "Download" | "Upload")[] | undefined;
|
|
232
|
+
AccessEnd?: string | undefined;
|
|
233
|
+
AccessStart?: string | undefined;
|
|
234
|
+
CurrentDownloads?: string | undefined;
|
|
235
|
+
LinkHash?: string | undefined;
|
|
236
|
+
LinkUrl?: string | undefined;
|
|
237
|
+
MaxDownloads?: string | undefined;
|
|
238
|
+
PasswordRequired?: boolean | undefined;
|
|
239
|
+
Policies?: unknown[] | undefined;
|
|
240
|
+
PoliciesContextEditable?: boolean | undefined;
|
|
241
|
+
}, {
|
|
242
|
+
Description?: string | undefined;
|
|
243
|
+
Label?: string | undefined;
|
|
244
|
+
Permissions?: ("NoAccess" | "Preview" | "Download" | "Upload")[] | undefined;
|
|
245
|
+
AccessEnd?: string | undefined;
|
|
246
|
+
AccessStart?: string | undefined;
|
|
247
|
+
CurrentDownloads?: string | undefined;
|
|
248
|
+
LinkHash?: string | undefined;
|
|
249
|
+
LinkUrl?: string | undefined;
|
|
250
|
+
MaxDownloads?: string | undefined;
|
|
251
|
+
PasswordRequired?: boolean | undefined;
|
|
252
|
+
Policies?: unknown[] | undefined;
|
|
253
|
+
PoliciesContextEditable?: boolean | undefined;
|
|
254
|
+
}>, "many">>;
|
|
14
255
|
/** Node size in bytes */
|
|
15
256
|
Size: z.ZodOptional<z.ZodString>;
|
|
16
|
-
/**
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
257
|
+
/** Storage ETag */
|
|
258
|
+
StorageETag: z.ZodOptional<z.ZodString>;
|
|
259
|
+
/** Subscriptions */
|
|
260
|
+
Subscriptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
261
|
+
Events: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
262
|
+
ObjectId: z.ZodOptional<z.ZodString>;
|
|
263
|
+
ObjectType: z.ZodOptional<z.ZodString>;
|
|
264
|
+
UserId: z.ZodOptional<z.ZodString>;
|
|
265
|
+
}, "strip", z.ZodTypeAny, {
|
|
266
|
+
Events?: string[] | undefined;
|
|
267
|
+
ObjectId?: string | undefined;
|
|
268
|
+
ObjectType?: string | undefined;
|
|
269
|
+
UserId?: string | undefined;
|
|
270
|
+
}, {
|
|
271
|
+
Events?: string[] | undefined;
|
|
272
|
+
ObjectId?: string | undefined;
|
|
273
|
+
ObjectType?: string | undefined;
|
|
274
|
+
UserId?: string | undefined;
|
|
275
|
+
}>, "many">>;
|
|
276
|
+
Type: z.ZodOptional<z.ZodEnum<["UNKNOWN", "LEAF", "COLLECTION"]>>;
|
|
22
277
|
/** User metadata */
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
278
|
+
UserMetadata: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
279
|
+
Editable: z.ZodOptional<z.ZodBoolean>;
|
|
280
|
+
JsonValue: z.ZodString;
|
|
281
|
+
Namespace: z.ZodString;
|
|
282
|
+
NodeUuid: z.ZodOptional<z.ZodString>;
|
|
283
|
+
}, "strip", z.ZodTypeAny, {
|
|
284
|
+
Namespace: string;
|
|
285
|
+
JsonValue: string;
|
|
286
|
+
Editable?: boolean | undefined;
|
|
287
|
+
NodeUuid?: string | undefined;
|
|
288
|
+
}, {
|
|
289
|
+
Namespace: string;
|
|
290
|
+
JsonValue: string;
|
|
291
|
+
Editable?: boolean | undefined;
|
|
292
|
+
NodeUuid?: string | undefined;
|
|
293
|
+
}>, "many">>;
|
|
294
|
+
/** Node UUID */
|
|
295
|
+
Uuid: z.ZodString;
|
|
296
|
+
/** Version metadata */
|
|
297
|
+
VersionMeta: z.ZodOptional<z.ZodObject<{
|
|
298
|
+
Description: z.ZodOptional<z.ZodString>;
|
|
299
|
+
IsDraft: z.ZodOptional<z.ZodBoolean>;
|
|
300
|
+
IsHead: z.ZodOptional<z.ZodBoolean>;
|
|
301
|
+
OwnerUuid: z.ZodOptional<z.ZodString>;
|
|
302
|
+
VersionId: z.ZodString;
|
|
303
|
+
}, "strip", z.ZodTypeAny, {
|
|
304
|
+
VersionId: string;
|
|
305
|
+
Description?: string | undefined;
|
|
306
|
+
IsDraft?: boolean | undefined;
|
|
307
|
+
IsHead?: boolean | undefined;
|
|
308
|
+
OwnerUuid?: string | undefined;
|
|
309
|
+
}, {
|
|
310
|
+
VersionId: string;
|
|
311
|
+
Description?: string | undefined;
|
|
312
|
+
IsDraft?: boolean | undefined;
|
|
313
|
+
IsHead?: boolean | undefined;
|
|
314
|
+
OwnerUuid?: string | undefined;
|
|
315
|
+
}>>;
|
|
316
|
+
/** Versions */
|
|
317
|
+
Versions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
318
|
+
ContentHash: z.ZodOptional<z.ZodString>;
|
|
319
|
+
Description: z.ZodOptional<z.ZodString>;
|
|
320
|
+
Draft: z.ZodOptional<z.ZodBoolean>;
|
|
321
|
+
ETag: z.ZodOptional<z.ZodString>;
|
|
322
|
+
EditorURLs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
323
|
+
ExpiresAt: z.ZodOptional<z.ZodString>;
|
|
324
|
+
Url: z.ZodOptional<z.ZodString>;
|
|
325
|
+
}, "strip", z.ZodTypeAny, {
|
|
326
|
+
ExpiresAt?: string | undefined;
|
|
327
|
+
Url?: string | undefined;
|
|
328
|
+
}, {
|
|
329
|
+
ExpiresAt?: string | undefined;
|
|
330
|
+
Url?: string | undefined;
|
|
331
|
+
}>>>;
|
|
332
|
+
EditorURLsKeys: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
333
|
+
FilePreviews: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
334
|
+
Bucket: z.ZodOptional<z.ZodString>;
|
|
335
|
+
ContentType: z.ZodOptional<z.ZodString>;
|
|
336
|
+
Dimension: z.ZodOptional<z.ZodNumber>;
|
|
337
|
+
Error: z.ZodOptional<z.ZodBoolean>;
|
|
338
|
+
Key: z.ZodOptional<z.ZodString>;
|
|
339
|
+
PreSignedURL: z.ZodOptional<z.ZodObject<{
|
|
340
|
+
ExpiresAt: z.ZodOptional<z.ZodString>;
|
|
341
|
+
Url: z.ZodOptional<z.ZodString>;
|
|
342
|
+
}, "strip", z.ZodTypeAny, {
|
|
343
|
+
ExpiresAt?: string | undefined;
|
|
344
|
+
Url?: string | undefined;
|
|
345
|
+
}, {
|
|
346
|
+
ExpiresAt?: string | undefined;
|
|
347
|
+
Url?: string | undefined;
|
|
348
|
+
}>>;
|
|
349
|
+
PreSignedGET: z.ZodOptional<z.ZodObject<{
|
|
350
|
+
ExpiresAt: z.ZodOptional<z.ZodString>;
|
|
351
|
+
Url: z.ZodOptional<z.ZodString>;
|
|
352
|
+
}, "strip", z.ZodTypeAny, {
|
|
353
|
+
ExpiresAt?: string | undefined;
|
|
354
|
+
Url?: string | undefined;
|
|
355
|
+
}, {
|
|
356
|
+
ExpiresAt?: string | undefined;
|
|
357
|
+
Url?: string | undefined;
|
|
358
|
+
}>>;
|
|
359
|
+
Processing: z.ZodOptional<z.ZodBoolean>;
|
|
360
|
+
}, "strip", z.ZodTypeAny, {
|
|
361
|
+
Processing?: boolean | undefined;
|
|
362
|
+
Error?: boolean | undefined;
|
|
363
|
+
Bucket?: string | undefined;
|
|
364
|
+
ContentType?: string | undefined;
|
|
365
|
+
Dimension?: number | undefined;
|
|
366
|
+
Key?: string | undefined;
|
|
367
|
+
PreSignedURL?: {
|
|
368
|
+
ExpiresAt?: string | undefined;
|
|
369
|
+
Url?: string | undefined;
|
|
370
|
+
} | undefined;
|
|
371
|
+
PreSignedGET?: {
|
|
372
|
+
ExpiresAt?: string | undefined;
|
|
373
|
+
Url?: string | undefined;
|
|
374
|
+
} | undefined;
|
|
375
|
+
}, {
|
|
376
|
+
Processing?: boolean | undefined;
|
|
377
|
+
Error?: boolean | undefined;
|
|
378
|
+
Bucket?: string | undefined;
|
|
379
|
+
ContentType?: string | undefined;
|
|
380
|
+
Dimension?: number | undefined;
|
|
381
|
+
Key?: string | undefined;
|
|
382
|
+
PreSignedURL?: {
|
|
383
|
+
ExpiresAt?: string | undefined;
|
|
384
|
+
Url?: string | undefined;
|
|
385
|
+
} | undefined;
|
|
386
|
+
PreSignedGET?: {
|
|
387
|
+
ExpiresAt?: string | undefined;
|
|
388
|
+
Url?: string | undefined;
|
|
389
|
+
} | undefined;
|
|
390
|
+
}>, "many">>;
|
|
391
|
+
IsHead: z.ZodOptional<z.ZodBoolean>;
|
|
392
|
+
MTime: z.ZodOptional<z.ZodString>;
|
|
393
|
+
OwnerName: z.ZodOptional<z.ZodString>;
|
|
394
|
+
OwnerUuid: z.ZodOptional<z.ZodString>;
|
|
395
|
+
PreSignedGET: z.ZodOptional<z.ZodObject<{
|
|
396
|
+
ExpiresAt: z.ZodOptional<z.ZodString>;
|
|
397
|
+
Url: z.ZodOptional<z.ZodString>;
|
|
398
|
+
}, "strip", z.ZodTypeAny, {
|
|
399
|
+
ExpiresAt?: string | undefined;
|
|
400
|
+
Url?: string | undefined;
|
|
401
|
+
}, {
|
|
402
|
+
ExpiresAt?: string | undefined;
|
|
403
|
+
Url?: string | undefined;
|
|
404
|
+
}>>;
|
|
405
|
+
Size: z.ZodOptional<z.ZodString>;
|
|
406
|
+
VersionId: z.ZodString;
|
|
407
|
+
}, "strip", z.ZodTypeAny, {
|
|
408
|
+
VersionId: string;
|
|
409
|
+
Description?: string | undefined;
|
|
410
|
+
PreSignedGET?: {
|
|
411
|
+
ExpiresAt?: string | undefined;
|
|
412
|
+
Url?: string | undefined;
|
|
413
|
+
} | undefined;
|
|
414
|
+
IsHead?: boolean | undefined;
|
|
415
|
+
OwnerUuid?: string | undefined;
|
|
416
|
+
ContentHash?: string | undefined;
|
|
417
|
+
Draft?: boolean | undefined;
|
|
418
|
+
ETag?: string | undefined;
|
|
419
|
+
EditorURLs?: Record<string, {
|
|
420
|
+
ExpiresAt?: string | undefined;
|
|
421
|
+
Url?: string | undefined;
|
|
422
|
+
}> | undefined;
|
|
423
|
+
EditorURLsKeys?: string[] | undefined;
|
|
424
|
+
FilePreviews?: {
|
|
425
|
+
Processing?: boolean | undefined;
|
|
426
|
+
Error?: boolean | undefined;
|
|
427
|
+
Bucket?: string | undefined;
|
|
428
|
+
ContentType?: string | undefined;
|
|
429
|
+
Dimension?: number | undefined;
|
|
430
|
+
Key?: string | undefined;
|
|
431
|
+
PreSignedURL?: {
|
|
432
|
+
ExpiresAt?: string | undefined;
|
|
433
|
+
Url?: string | undefined;
|
|
434
|
+
} | undefined;
|
|
435
|
+
PreSignedGET?: {
|
|
436
|
+
ExpiresAt?: string | undefined;
|
|
437
|
+
Url?: string | undefined;
|
|
438
|
+
} | undefined;
|
|
439
|
+
}[] | undefined;
|
|
440
|
+
MTime?: string | undefined;
|
|
441
|
+
OwnerName?: string | undefined;
|
|
442
|
+
Size?: string | undefined;
|
|
443
|
+
}, {
|
|
444
|
+
VersionId: string;
|
|
445
|
+
Description?: string | undefined;
|
|
446
|
+
PreSignedGET?: {
|
|
447
|
+
ExpiresAt?: string | undefined;
|
|
448
|
+
Url?: string | undefined;
|
|
449
|
+
} | undefined;
|
|
450
|
+
IsHead?: boolean | undefined;
|
|
451
|
+
OwnerUuid?: string | undefined;
|
|
452
|
+
ContentHash?: string | undefined;
|
|
453
|
+
Draft?: boolean | undefined;
|
|
454
|
+
ETag?: string | undefined;
|
|
455
|
+
EditorURLs?: Record<string, {
|
|
456
|
+
ExpiresAt?: string | undefined;
|
|
457
|
+
Url?: string | undefined;
|
|
458
|
+
}> | undefined;
|
|
459
|
+
EditorURLsKeys?: string[] | undefined;
|
|
460
|
+
FilePreviews?: {
|
|
461
|
+
Processing?: boolean | undefined;
|
|
462
|
+
Error?: boolean | undefined;
|
|
463
|
+
Bucket?: string | undefined;
|
|
464
|
+
ContentType?: string | undefined;
|
|
465
|
+
Dimension?: number | undefined;
|
|
466
|
+
Key?: string | undefined;
|
|
467
|
+
PreSignedURL?: {
|
|
468
|
+
ExpiresAt?: string | undefined;
|
|
469
|
+
Url?: string | undefined;
|
|
470
|
+
} | undefined;
|
|
471
|
+
PreSignedGET?: {
|
|
472
|
+
ExpiresAt?: string | undefined;
|
|
473
|
+
Url?: string | undefined;
|
|
474
|
+
} | undefined;
|
|
475
|
+
}[] | undefined;
|
|
476
|
+
MTime?: string | undefined;
|
|
477
|
+
OwnerName?: string | undefined;
|
|
478
|
+
Size?: string | undefined;
|
|
479
|
+
}>, "many">>;
|
|
30
480
|
}, "strip", z.ZodTypeAny, {
|
|
31
|
-
Uuid
|
|
32
|
-
Path
|
|
33
|
-
|
|
481
|
+
Uuid: string;
|
|
482
|
+
Path: string;
|
|
483
|
+
ContentType?: string | undefined;
|
|
484
|
+
PreSignedGET?: {
|
|
485
|
+
ExpiresAt?: string | undefined;
|
|
486
|
+
Url?: string | undefined;
|
|
487
|
+
} | undefined;
|
|
488
|
+
IsDraft?: boolean | undefined;
|
|
489
|
+
ContentHash?: string | undefined;
|
|
490
|
+
EditorURLs?: Record<string, {
|
|
491
|
+
ExpiresAt?: string | undefined;
|
|
492
|
+
Url?: string | undefined;
|
|
493
|
+
}> | undefined;
|
|
494
|
+
EditorURLsKeys?: string[] | undefined;
|
|
34
495
|
Size?: string | undefined;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
496
|
+
Activities?: any[] | undefined;
|
|
497
|
+
ContentLock?: {
|
|
498
|
+
Owner?: string | undefined;
|
|
499
|
+
IsLocked?: boolean | undefined;
|
|
500
|
+
} | undefined;
|
|
501
|
+
ContextWorkspace?: {
|
|
502
|
+
Slug: string;
|
|
503
|
+
Uuid: string;
|
|
504
|
+
Description?: string | undefined;
|
|
505
|
+
IsRoot?: boolean | undefined;
|
|
506
|
+
IsVirtualRoot?: boolean | undefined;
|
|
507
|
+
Label?: string | undefined;
|
|
508
|
+
Permissions?: string | undefined;
|
|
509
|
+
Quota?: string | undefined;
|
|
510
|
+
QuotaUsage?: string | undefined;
|
|
511
|
+
Scope?: string | undefined;
|
|
512
|
+
SkipRecycle?: boolean | undefined;
|
|
513
|
+
Syncable?: boolean | undefined;
|
|
514
|
+
} | undefined;
|
|
515
|
+
DataSourceFeatures?: {
|
|
516
|
+
Encrypted?: boolean | undefined;
|
|
517
|
+
Versioned?: boolean | undefined;
|
|
518
|
+
} | undefined;
|
|
519
|
+
FolderMeta?: {
|
|
520
|
+
Namespace: string;
|
|
521
|
+
Value: number;
|
|
522
|
+
}[] | undefined;
|
|
523
|
+
HashingMethod?: string | undefined;
|
|
524
|
+
ImageMeta?: {
|
|
525
|
+
Height?: number | undefined;
|
|
526
|
+
JsonEXIF?: string | undefined;
|
|
527
|
+
Orientation?: number | undefined;
|
|
528
|
+
Width?: number | undefined;
|
|
529
|
+
} | undefined;
|
|
530
|
+
IsBookmarked?: boolean | undefined;
|
|
531
|
+
IsRecycleBin?: boolean | undefined;
|
|
532
|
+
IsRecycled?: boolean | undefined;
|
|
533
|
+
Metadata?: {
|
|
534
|
+
Namespace: string;
|
|
535
|
+
Value: string;
|
|
536
|
+
}[] | undefined;
|
|
537
|
+
Mode?: "Default" | "NodeReadOnly" | "NodeWriteOnly" | "LevelReadOnly" | undefined;
|
|
538
|
+
Modified?: string | undefined;
|
|
539
|
+
Previews?: {
|
|
540
|
+
Processing?: boolean | undefined;
|
|
541
|
+
Error?: boolean | undefined;
|
|
542
|
+
Bucket?: string | undefined;
|
|
543
|
+
ContentType?: string | undefined;
|
|
544
|
+
Dimension?: number | undefined;
|
|
545
|
+
Key?: string | undefined;
|
|
546
|
+
PreSignedURL?: {
|
|
547
|
+
ExpiresAt?: string | undefined;
|
|
548
|
+
Url?: string | undefined;
|
|
549
|
+
} | undefined;
|
|
550
|
+
PreSignedGET?: {
|
|
551
|
+
ExpiresAt?: string | undefined;
|
|
552
|
+
Url?: string | undefined;
|
|
553
|
+
} | undefined;
|
|
554
|
+
}[] | undefined;
|
|
555
|
+
Shares?: {
|
|
556
|
+
Description?: string | undefined;
|
|
557
|
+
Label?: string | undefined;
|
|
558
|
+
Permissions?: ("NoAccess" | "Preview" | "Download" | "Upload")[] | undefined;
|
|
559
|
+
AccessEnd?: string | undefined;
|
|
560
|
+
AccessStart?: string | undefined;
|
|
561
|
+
CurrentDownloads?: string | undefined;
|
|
562
|
+
LinkHash?: string | undefined;
|
|
563
|
+
LinkUrl?: string | undefined;
|
|
564
|
+
MaxDownloads?: string | undefined;
|
|
565
|
+
PasswordRequired?: boolean | undefined;
|
|
566
|
+
Policies?: unknown[] | undefined;
|
|
567
|
+
PoliciesContextEditable?: boolean | undefined;
|
|
568
|
+
}[] | undefined;
|
|
569
|
+
StorageETag?: string | undefined;
|
|
570
|
+
Subscriptions?: {
|
|
571
|
+
Events?: string[] | undefined;
|
|
572
|
+
ObjectId?: string | undefined;
|
|
573
|
+
ObjectType?: string | undefined;
|
|
574
|
+
UserId?: string | undefined;
|
|
575
|
+
}[] | undefined;
|
|
576
|
+
Type?: "UNKNOWN" | "LEAF" | "COLLECTION" | undefined;
|
|
577
|
+
UserMetadata?: {
|
|
578
|
+
Namespace: string;
|
|
579
|
+
JsonValue: string;
|
|
580
|
+
Editable?: boolean | undefined;
|
|
581
|
+
NodeUuid?: string | undefined;
|
|
582
|
+
}[] | undefined;
|
|
583
|
+
VersionMeta?: {
|
|
584
|
+
VersionId: string;
|
|
585
|
+
Description?: string | undefined;
|
|
586
|
+
IsDraft?: boolean | undefined;
|
|
587
|
+
IsHead?: boolean | undefined;
|
|
588
|
+
OwnerUuid?: string | undefined;
|
|
589
|
+
} | undefined;
|
|
590
|
+
Versions?: {
|
|
591
|
+
VersionId: string;
|
|
592
|
+
Description?: string | undefined;
|
|
593
|
+
PreSignedGET?: {
|
|
594
|
+
ExpiresAt?: string | undefined;
|
|
595
|
+
Url?: string | undefined;
|
|
596
|
+
} | undefined;
|
|
597
|
+
IsHead?: boolean | undefined;
|
|
598
|
+
OwnerUuid?: string | undefined;
|
|
599
|
+
ContentHash?: string | undefined;
|
|
600
|
+
Draft?: boolean | undefined;
|
|
601
|
+
ETag?: string | undefined;
|
|
602
|
+
EditorURLs?: Record<string, {
|
|
603
|
+
ExpiresAt?: string | undefined;
|
|
604
|
+
Url?: string | undefined;
|
|
605
|
+
}> | undefined;
|
|
606
|
+
EditorURLsKeys?: string[] | undefined;
|
|
607
|
+
FilePreviews?: {
|
|
608
|
+
Processing?: boolean | undefined;
|
|
609
|
+
Error?: boolean | undefined;
|
|
610
|
+
Bucket?: string | undefined;
|
|
611
|
+
ContentType?: string | undefined;
|
|
612
|
+
Dimension?: number | undefined;
|
|
613
|
+
Key?: string | undefined;
|
|
614
|
+
PreSignedURL?: {
|
|
615
|
+
ExpiresAt?: string | undefined;
|
|
616
|
+
Url?: string | undefined;
|
|
617
|
+
} | undefined;
|
|
618
|
+
PreSignedGET?: {
|
|
619
|
+
ExpiresAt?: string | undefined;
|
|
620
|
+
Url?: string | undefined;
|
|
621
|
+
} | undefined;
|
|
622
|
+
}[] | undefined;
|
|
623
|
+
MTime?: string | undefined;
|
|
624
|
+
OwnerName?: string | undefined;
|
|
625
|
+
Size?: string | undefined;
|
|
626
|
+
}[] | undefined;
|
|
42
627
|
}, {
|
|
43
|
-
Uuid
|
|
44
|
-
Path
|
|
45
|
-
|
|
628
|
+
Uuid: string;
|
|
629
|
+
Path: string;
|
|
630
|
+
ContentType?: string | undefined;
|
|
631
|
+
PreSignedGET?: {
|
|
632
|
+
ExpiresAt?: string | undefined;
|
|
633
|
+
Url?: string | undefined;
|
|
634
|
+
} | undefined;
|
|
635
|
+
IsDraft?: boolean | undefined;
|
|
636
|
+
ContentHash?: string | undefined;
|
|
637
|
+
EditorURLs?: Record<string, {
|
|
638
|
+
ExpiresAt?: string | undefined;
|
|
639
|
+
Url?: string | undefined;
|
|
640
|
+
}> | undefined;
|
|
641
|
+
EditorURLsKeys?: string[] | undefined;
|
|
46
642
|
Size?: string | undefined;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
643
|
+
Activities?: any[] | undefined;
|
|
644
|
+
ContentLock?: {
|
|
645
|
+
Owner?: string | undefined;
|
|
646
|
+
IsLocked?: boolean | undefined;
|
|
647
|
+
} | undefined;
|
|
648
|
+
ContextWorkspace?: {
|
|
649
|
+
Slug: string;
|
|
650
|
+
Uuid: string;
|
|
651
|
+
Description?: string | undefined;
|
|
652
|
+
IsRoot?: boolean | undefined;
|
|
653
|
+
IsVirtualRoot?: boolean | undefined;
|
|
654
|
+
Label?: string | undefined;
|
|
655
|
+
Permissions?: string | undefined;
|
|
656
|
+
Quota?: string | undefined;
|
|
657
|
+
QuotaUsage?: string | undefined;
|
|
658
|
+
Scope?: string | undefined;
|
|
659
|
+
SkipRecycle?: boolean | undefined;
|
|
660
|
+
Syncable?: boolean | undefined;
|
|
661
|
+
} | undefined;
|
|
662
|
+
DataSourceFeatures?: {
|
|
663
|
+
Encrypted?: boolean | undefined;
|
|
664
|
+
Versioned?: boolean | undefined;
|
|
665
|
+
} | undefined;
|
|
666
|
+
FolderMeta?: {
|
|
667
|
+
Namespace: string;
|
|
668
|
+
Value: number;
|
|
669
|
+
}[] | undefined;
|
|
670
|
+
HashingMethod?: string | undefined;
|
|
671
|
+
ImageMeta?: {
|
|
672
|
+
Height?: number | undefined;
|
|
673
|
+
JsonEXIF?: string | undefined;
|
|
674
|
+
Orientation?: number | undefined;
|
|
675
|
+
Width?: number | undefined;
|
|
676
|
+
} | undefined;
|
|
677
|
+
IsBookmarked?: boolean | undefined;
|
|
678
|
+
IsRecycleBin?: boolean | undefined;
|
|
679
|
+
IsRecycled?: boolean | undefined;
|
|
680
|
+
Metadata?: {
|
|
681
|
+
Namespace: string;
|
|
682
|
+
Value: string;
|
|
683
|
+
}[] | undefined;
|
|
684
|
+
Mode?: "Default" | "NodeReadOnly" | "NodeWriteOnly" | "LevelReadOnly" | undefined;
|
|
685
|
+
Modified?: string | undefined;
|
|
686
|
+
Previews?: {
|
|
687
|
+
Processing?: boolean | undefined;
|
|
688
|
+
Error?: boolean | undefined;
|
|
689
|
+
Bucket?: string | undefined;
|
|
690
|
+
ContentType?: string | undefined;
|
|
691
|
+
Dimension?: number | undefined;
|
|
692
|
+
Key?: string | undefined;
|
|
693
|
+
PreSignedURL?: {
|
|
694
|
+
ExpiresAt?: string | undefined;
|
|
695
|
+
Url?: string | undefined;
|
|
696
|
+
} | undefined;
|
|
697
|
+
PreSignedGET?: {
|
|
698
|
+
ExpiresAt?: string | undefined;
|
|
699
|
+
Url?: string | undefined;
|
|
700
|
+
} | undefined;
|
|
701
|
+
}[] | undefined;
|
|
702
|
+
Shares?: {
|
|
703
|
+
Description?: string | undefined;
|
|
704
|
+
Label?: string | undefined;
|
|
705
|
+
Permissions?: ("NoAccess" | "Preview" | "Download" | "Upload")[] | undefined;
|
|
706
|
+
AccessEnd?: string | undefined;
|
|
707
|
+
AccessStart?: string | undefined;
|
|
708
|
+
CurrentDownloads?: string | undefined;
|
|
709
|
+
LinkHash?: string | undefined;
|
|
710
|
+
LinkUrl?: string | undefined;
|
|
711
|
+
MaxDownloads?: string | undefined;
|
|
712
|
+
PasswordRequired?: boolean | undefined;
|
|
713
|
+
Policies?: unknown[] | undefined;
|
|
714
|
+
PoliciesContextEditable?: boolean | undefined;
|
|
715
|
+
}[] | undefined;
|
|
716
|
+
StorageETag?: string | undefined;
|
|
717
|
+
Subscriptions?: {
|
|
718
|
+
Events?: string[] | undefined;
|
|
719
|
+
ObjectId?: string | undefined;
|
|
720
|
+
ObjectType?: string | undefined;
|
|
721
|
+
UserId?: string | undefined;
|
|
722
|
+
}[] | undefined;
|
|
723
|
+
Type?: "UNKNOWN" | "LEAF" | "COLLECTION" | undefined;
|
|
724
|
+
UserMetadata?: {
|
|
725
|
+
Namespace: string;
|
|
726
|
+
JsonValue: string;
|
|
727
|
+
Editable?: boolean | undefined;
|
|
728
|
+
NodeUuid?: string | undefined;
|
|
729
|
+
}[] | undefined;
|
|
730
|
+
VersionMeta?: {
|
|
731
|
+
VersionId: string;
|
|
732
|
+
Description?: string | undefined;
|
|
733
|
+
IsDraft?: boolean | undefined;
|
|
734
|
+
IsHead?: boolean | undefined;
|
|
735
|
+
OwnerUuid?: string | undefined;
|
|
736
|
+
} | undefined;
|
|
737
|
+
Versions?: {
|
|
738
|
+
VersionId: string;
|
|
739
|
+
Description?: string | undefined;
|
|
740
|
+
PreSignedGET?: {
|
|
741
|
+
ExpiresAt?: string | undefined;
|
|
742
|
+
Url?: string | undefined;
|
|
743
|
+
} | undefined;
|
|
744
|
+
IsHead?: boolean | undefined;
|
|
745
|
+
OwnerUuid?: string | undefined;
|
|
746
|
+
ContentHash?: string | undefined;
|
|
747
|
+
Draft?: boolean | undefined;
|
|
748
|
+
ETag?: string | undefined;
|
|
749
|
+
EditorURLs?: Record<string, {
|
|
750
|
+
ExpiresAt?: string | undefined;
|
|
751
|
+
Url?: string | undefined;
|
|
752
|
+
}> | undefined;
|
|
753
|
+
EditorURLsKeys?: string[] | undefined;
|
|
754
|
+
FilePreviews?: {
|
|
755
|
+
Processing?: boolean | undefined;
|
|
756
|
+
Error?: boolean | undefined;
|
|
757
|
+
Bucket?: string | undefined;
|
|
758
|
+
ContentType?: string | undefined;
|
|
759
|
+
Dimension?: number | undefined;
|
|
760
|
+
Key?: string | undefined;
|
|
761
|
+
PreSignedURL?: {
|
|
762
|
+
ExpiresAt?: string | undefined;
|
|
763
|
+
Url?: string | undefined;
|
|
764
|
+
} | undefined;
|
|
765
|
+
PreSignedGET?: {
|
|
766
|
+
ExpiresAt?: string | undefined;
|
|
767
|
+
Url?: string | undefined;
|
|
768
|
+
} | undefined;
|
|
769
|
+
}[] | undefined;
|
|
770
|
+
MTime?: string | undefined;
|
|
771
|
+
OwnerName?: string | undefined;
|
|
772
|
+
Size?: string | undefined;
|
|
773
|
+
}[] | undefined;
|
|
54
774
|
}>;
|
|
55
775
|
export type Node = z.infer<typeof RestNodeSchema>;
|
|
56
776
|
//# sourceMappingURL=CellsAPI.schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CellsAPI.schema.d.ts","sourceRoot":"","sources":["../../src/cells/CellsAPI.schema.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"CellsAPI.schema.d.ts","sourceRoot":"","sources":["../../src/cells/CellsAPI.schema.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AAyItB;;;GAGG;AACH,eAAO,MAAM,cAAc;IACzB,iBAAiB;;IAEjB,mBAAmB;;IAEnB,+BAA+B;;;;;;;;;;;IAE/B,mBAAmB;;IAEnB,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAExB,2BAA2B;;;;;;;;;;;IAE3B,kBAAkB;;;;;;;;;;;IAElB,uBAAuB;;IAEvB,sBAAsB;;;;;;;;;;;IAEtB,qBAAqB;;IAErB,qBAAqB;;;;;;;;;;;;;;;;;IAErB,yBAAyB;;IAEzB,oBAAoB;;IAEpB,0BAA0B;;IAE1B,uBAAuB;;IAEvB,eAAe;;;;;;;;;;;IAEf,4BAA4B;;IAE5B,6BAA6B;;IAE7B,gBAAgB;;IAEhB,yBAAyB;;;;;;;;;;;IAEzB,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEpB,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAElB,yBAAyB;;IAEzB,mBAAmB;;IAEnB,oBAAoB;;;;;;;;;;;;;;;;;;IAGpB,oBAAoB;;;;;;;;;;;;;;;;;IAEpB,gBAAgB;;IAEhB,uBAAuB;;;;;;;;;;;;;;;;;;;;IAEvB,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEf,CAAC;AAEH,MAAM,MAAM,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC"}
|
|
@@ -20,32 +20,184 @@
|
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
21
|
exports.RestNodeSchema = void 0;
|
|
22
22
|
const zod_1 = require("zod");
|
|
23
|
+
const ActivityObjectSchema = zod_1.z.lazy(() => zod_1.z.object({
|
|
24
|
+
'@context': zod_1.z.string().optional(),
|
|
25
|
+
accuracy: zod_1.z.number().optional(),
|
|
26
|
+
actor: ActivityObjectSchema.optional(),
|
|
27
|
+
altitude: zod_1.z.number().optional(),
|
|
28
|
+
anyOf: ActivityObjectSchema.optional(),
|
|
29
|
+
attachment: ActivityObjectSchema.optional(),
|
|
30
|
+
attributedTo: ActivityObjectSchema.optional(),
|
|
31
|
+
audience: ActivityObjectSchema.optional(),
|
|
32
|
+
bcc: ActivityObjectSchema.optional(),
|
|
33
|
+
bto: ActivityObjectSchema.optional(),
|
|
34
|
+
cc: ActivityObjectSchema.optional(),
|
|
35
|
+
closed: zod_1.z.string().optional(),
|
|
36
|
+
}));
|
|
37
|
+
const RestLockInfoSchema = zod_1.z.object({
|
|
38
|
+
IsLocked: zod_1.z.boolean().optional(),
|
|
39
|
+
Owner: zod_1.z.string().optional(),
|
|
40
|
+
});
|
|
41
|
+
const RestContextWorkspaceSchema = zod_1.z.object({
|
|
42
|
+
Description: zod_1.z.string().optional(),
|
|
43
|
+
IsRoot: zod_1.z.boolean().optional(),
|
|
44
|
+
IsVirtualRoot: zod_1.z.boolean().optional(),
|
|
45
|
+
Label: zod_1.z.string().optional(),
|
|
46
|
+
Permissions: zod_1.z.string().optional(),
|
|
47
|
+
Quota: zod_1.z.string().optional(),
|
|
48
|
+
QuotaUsage: zod_1.z.string().optional(),
|
|
49
|
+
Scope: zod_1.z.string().optional(),
|
|
50
|
+
SkipRecycle: zod_1.z.boolean().optional(),
|
|
51
|
+
Slug: zod_1.z.string(),
|
|
52
|
+
Syncable: zod_1.z.boolean().optional(),
|
|
53
|
+
Uuid: zod_1.z.string(),
|
|
54
|
+
});
|
|
55
|
+
const RestDataSourceFeaturesSchema = zod_1.z.object({
|
|
56
|
+
Encrypted: zod_1.z.boolean().optional(),
|
|
57
|
+
Versioned: zod_1.z.boolean().optional(),
|
|
58
|
+
});
|
|
59
|
+
const RestPreSignedURLSchema = zod_1.z.object({
|
|
60
|
+
ExpiresAt: zod_1.z.string().optional(),
|
|
61
|
+
Url: zod_1.z.string().optional(),
|
|
62
|
+
});
|
|
63
|
+
const RestCountMetaSchema = zod_1.z.object({
|
|
64
|
+
Namespace: zod_1.z.string(),
|
|
65
|
+
Value: zod_1.z.number(),
|
|
66
|
+
});
|
|
67
|
+
const RestImageMetaSchema = zod_1.z.object({
|
|
68
|
+
Height: zod_1.z.number().optional(),
|
|
69
|
+
JsonEXIF: zod_1.z.string().optional(),
|
|
70
|
+
Orientation: zod_1.z.number().optional(),
|
|
71
|
+
Width: zod_1.z.number().optional(),
|
|
72
|
+
});
|
|
73
|
+
const RestJsonMetaSchema = zod_1.z.object({
|
|
74
|
+
Namespace: zod_1.z.string(),
|
|
75
|
+
Value: zod_1.z.string(),
|
|
76
|
+
});
|
|
77
|
+
const RestModeSchema = zod_1.z.enum(['Default', 'NodeReadOnly', 'NodeWriteOnly', 'LevelReadOnly']);
|
|
78
|
+
const RestFilePreviewSchema = zod_1.z.object({
|
|
79
|
+
Bucket: zod_1.z.string().optional(),
|
|
80
|
+
ContentType: zod_1.z.string().optional(),
|
|
81
|
+
Dimension: zod_1.z.number().optional(),
|
|
82
|
+
Error: zod_1.z.boolean().optional(),
|
|
83
|
+
Key: zod_1.z.string().optional(),
|
|
84
|
+
PreSignedURL: RestPreSignedURLSchema.optional(),
|
|
85
|
+
PreSignedGET: RestPreSignedURLSchema.optional(),
|
|
86
|
+
Processing: zod_1.z.boolean().optional(),
|
|
87
|
+
});
|
|
88
|
+
const RestShareLinkAccessTypeSchema = zod_1.z.enum(['NoAccess', 'Preview', 'Download', 'Upload']);
|
|
89
|
+
const RestShareLinkSchema = zod_1.z.object({
|
|
90
|
+
AccessEnd: zod_1.z.string().optional(),
|
|
91
|
+
AccessStart: zod_1.z.string().optional(),
|
|
92
|
+
CurrentDownloads: zod_1.z.string().optional(),
|
|
93
|
+
Description: zod_1.z.string().optional(),
|
|
94
|
+
Label: zod_1.z.string().optional(),
|
|
95
|
+
LinkHash: zod_1.z.string().optional(),
|
|
96
|
+
LinkUrl: zod_1.z.string().optional(),
|
|
97
|
+
MaxDownloads: zod_1.z.string().optional(),
|
|
98
|
+
PasswordRequired: zod_1.z.boolean().optional(),
|
|
99
|
+
Permissions: zod_1.z.array(RestShareLinkAccessTypeSchema).optional(),
|
|
100
|
+
Policies: zod_1.z.array(zod_1.z.unknown()).optional(),
|
|
101
|
+
PoliciesContextEditable: zod_1.z.boolean().optional(),
|
|
102
|
+
});
|
|
103
|
+
const ActivitySubscriptionSchema = zod_1.z.object({
|
|
104
|
+
Events: zod_1.z.array(zod_1.z.string()).optional(),
|
|
105
|
+
ObjectId: zod_1.z.string().optional(),
|
|
106
|
+
ObjectType: zod_1.z.string().optional(),
|
|
107
|
+
UserId: zod_1.z.string().optional(),
|
|
108
|
+
});
|
|
109
|
+
const TreeNodeTypeSchema = zod_1.z.enum(['UNKNOWN', 'LEAF', 'COLLECTION']);
|
|
110
|
+
const RestUserMetaSchema = zod_1.z.object({
|
|
111
|
+
Editable: zod_1.z.boolean().optional(),
|
|
112
|
+
JsonValue: zod_1.z.string(),
|
|
113
|
+
Namespace: zod_1.z.string(),
|
|
114
|
+
NodeUuid: zod_1.z.string().optional(),
|
|
115
|
+
});
|
|
116
|
+
const RestVersionMetaSchema = zod_1.z.object({
|
|
117
|
+
Description: zod_1.z.string().optional(),
|
|
118
|
+
IsDraft: zod_1.z.boolean().optional(),
|
|
119
|
+
IsHead: zod_1.z.boolean().optional(),
|
|
120
|
+
OwnerUuid: zod_1.z.string().optional(),
|
|
121
|
+
VersionId: zod_1.z.string(),
|
|
122
|
+
});
|
|
123
|
+
const RestVersionSchema = zod_1.z.object({
|
|
124
|
+
ContentHash: zod_1.z.string().optional(),
|
|
125
|
+
Description: zod_1.z.string().optional(),
|
|
126
|
+
Draft: zod_1.z.boolean().optional(),
|
|
127
|
+
ETag: zod_1.z.string().optional(),
|
|
128
|
+
EditorURLs: zod_1.z.record(zod_1.z.string(), RestPreSignedURLSchema).optional(),
|
|
129
|
+
EditorURLsKeys: zod_1.z.array(zod_1.z.string()).optional(),
|
|
130
|
+
FilePreviews: zod_1.z.array(RestFilePreviewSchema).optional(),
|
|
131
|
+
IsHead: zod_1.z.boolean().optional(),
|
|
132
|
+
MTime: zod_1.z.string().optional(),
|
|
133
|
+
OwnerName: zod_1.z.string().optional(),
|
|
134
|
+
OwnerUuid: zod_1.z.string().optional(),
|
|
135
|
+
PreSignedGET: RestPreSignedURLSchema.optional(),
|
|
136
|
+
Size: zod_1.z.string().optional(),
|
|
137
|
+
VersionId: zod_1.z.string(),
|
|
138
|
+
});
|
|
23
139
|
/**
|
|
24
140
|
* Zod schema for REST node
|
|
25
141
|
* Used for validating API responses from getNode and similar endpoints
|
|
26
|
-
* Fields are optional to handle various response scenarios
|
|
27
142
|
*/
|
|
28
143
|
exports.RestNodeSchema = zod_1.z.object({
|
|
29
|
-
/**
|
|
30
|
-
|
|
144
|
+
/** Activities */
|
|
145
|
+
Activities: zod_1.z.array(ActivityObjectSchema).optional(),
|
|
146
|
+
/** Content hash */
|
|
147
|
+
ContentHash: zod_1.z.string().optional(),
|
|
148
|
+
/** Content lock information */
|
|
149
|
+
ContentLock: RestLockInfoSchema.optional(),
|
|
150
|
+
/** Content type */
|
|
151
|
+
ContentType: zod_1.z.string().optional(),
|
|
152
|
+
/** Context workspace */
|
|
153
|
+
ContextWorkspace: RestContextWorkspaceSchema.optional(),
|
|
154
|
+
/** Data source features */
|
|
155
|
+
DataSourceFeatures: RestDataSourceFeaturesSchema.optional(),
|
|
156
|
+
/** Editor URLs */
|
|
157
|
+
EditorURLs: zod_1.z.record(zod_1.z.string(), RestPreSignedURLSchema).optional(),
|
|
158
|
+
/** Editor URLs keys */
|
|
159
|
+
EditorURLsKeys: zod_1.z.array(zod_1.z.string()).optional(),
|
|
160
|
+
/** Folder metadata */
|
|
161
|
+
FolderMeta: zod_1.z.array(RestCountMetaSchema).optional(),
|
|
162
|
+
/** Hashing method */
|
|
163
|
+
HashingMethod: zod_1.z.string().optional(),
|
|
164
|
+
/** Image metadata */
|
|
165
|
+
ImageMeta: RestImageMetaSchema.optional(),
|
|
166
|
+
/** Is bookmarked flag */
|
|
167
|
+
IsBookmarked: zod_1.z.boolean().optional(),
|
|
168
|
+
/** Is draft flag */
|
|
169
|
+
IsDraft: zod_1.z.boolean().optional(),
|
|
170
|
+
/** Is recycle bin flag */
|
|
171
|
+
IsRecycleBin: zod_1.z.boolean().optional(),
|
|
172
|
+
/** Is recycled flag */
|
|
173
|
+
IsRecycled: zod_1.z.boolean().optional(),
|
|
174
|
+
/** Metadata */
|
|
175
|
+
Metadata: zod_1.z.array(RestJsonMetaSchema).optional(),
|
|
176
|
+
/** Node mode/permissions */
|
|
177
|
+
Mode: RestModeSchema.optional(),
|
|
178
|
+
/** Modification timestamp */
|
|
179
|
+
Modified: zod_1.z.string().optional(),
|
|
31
180
|
/** Node path */
|
|
32
|
-
Path: zod_1.z.string()
|
|
33
|
-
/**
|
|
34
|
-
|
|
181
|
+
Path: zod_1.z.string(),
|
|
182
|
+
/** Pre-signed GET URL */
|
|
183
|
+
PreSignedGET: RestPreSignedURLSchema.optional(),
|
|
184
|
+
/** File previews */
|
|
185
|
+
Previews: zod_1.z.array(RestFilePreviewSchema).optional(),
|
|
186
|
+
/** Share links */
|
|
187
|
+
Shares: zod_1.z.array(RestShareLinkSchema).optional(),
|
|
35
188
|
/** Node size in bytes */
|
|
36
189
|
Size: zod_1.z.string().optional(),
|
|
37
|
-
/**
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
Etag: zod_1.z.string().optional(),
|
|
190
|
+
/** Storage ETag */
|
|
191
|
+
StorageETag: zod_1.z.string().optional(),
|
|
192
|
+
/** Subscriptions */
|
|
193
|
+
Subscriptions: zod_1.z.array(ActivitySubscriptionSchema).optional(),
|
|
194
|
+
Type: TreeNodeTypeSchema.optional(),
|
|
43
195
|
/** User metadata */
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
|
|
196
|
+
UserMetadata: zod_1.z.array(RestUserMetaSchema).optional(),
|
|
197
|
+
/** Node UUID */
|
|
198
|
+
Uuid: zod_1.z.string(),
|
|
199
|
+
/** Version metadata */
|
|
200
|
+
VersionMeta: RestVersionMetaSchema.optional(),
|
|
201
|
+
/** Versions */
|
|
202
|
+
Versions: zod_1.z.array(RestVersionSchema).optional(),
|
|
51
203
|
});
|
|
@@ -33,6 +33,7 @@ export declare class ReconnectingWebsocket {
|
|
|
33
33
|
*/
|
|
34
34
|
private readonly stopBackFromSleepHandler?;
|
|
35
35
|
private isPingingEnabled;
|
|
36
|
+
private readonly pendingHealthChecks;
|
|
36
37
|
constructor(onReconnect: () => Promise<string>, options?: {
|
|
37
38
|
pingInterval?: number;
|
|
38
39
|
});
|
|
@@ -47,6 +48,11 @@ export declare class ReconnectingWebsocket {
|
|
|
47
48
|
connect(): void;
|
|
48
49
|
send(message: any): void;
|
|
49
50
|
getState(): WEBSOCKET_STATE;
|
|
51
|
+
/**
|
|
52
|
+
* Lightweight health probe that sends a single ping and resolves with whether a pong was received in time.
|
|
53
|
+
* Does not close or reconnect the socket; callers can decide how to react to failures.
|
|
54
|
+
*/
|
|
55
|
+
checkHealth(timeoutMs?: number): Promise<boolean>;
|
|
50
56
|
disconnect(reason?: string): void;
|
|
51
57
|
/**
|
|
52
58
|
* Cleans up all active intervals and timers to prevent memory leaks.
|
|
@@ -58,6 +64,7 @@ export declare class ReconnectingWebsocket {
|
|
|
58
64
|
*/
|
|
59
65
|
private cleanup;
|
|
60
66
|
private getReconnectingWebsocket;
|
|
67
|
+
private resolvePendingHealthChecks;
|
|
61
68
|
setOnOpen(onOpen: (event: Event) => void): void;
|
|
62
69
|
setOnMessage(onMessage: (data: string) => void): void;
|
|
63
70
|
setOnError(onError: (error: ErrorEvent) => void): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReconnectingWebsocket.d.ts","sourceRoot":"","sources":["../../src/tcp/ReconnectingWebsocket.ts"],"names":[],"mappings":"AAoBA,OAAY,EAAC,UAAU,EAAE,UAAU,EAAE,KAAK,EAAU,MAAM,wBAAwB,CAAC;AAQnF,oBAAY,cAAc;IACxB,cAAc,OAAO;IACrB,UAAU,OAAO;IACjB,cAAc,OAAO;IACrB,gBAAgB,OAAO;CACxB;AAED,oBAAY,eAAe;IACzB,UAAU,IAAI;IACd,IAAI,IAAI;IACR,OAAO,IAAI;IACX,MAAM,IAAI;CACX;AAED,oBAAY,WAAW;IACrB,IAAI,SAAS;IACb,IAAI,SAAS;CACd;AAED,qBAAa,qBAAqB;
|
|
1
|
+
{"version":3,"file":"ReconnectingWebsocket.d.ts","sourceRoot":"","sources":["../../src/tcp/ReconnectingWebsocket.ts"],"names":[],"mappings":"AAoBA,OAAY,EAAC,UAAU,EAAE,UAAU,EAAE,KAAK,EAAU,MAAM,wBAAwB,CAAC;AAQnF,oBAAY,cAAc;IACxB,cAAc,OAAO;IACrB,UAAU,OAAO;IACjB,cAAc,OAAO;IACrB,gBAAgB,OAAO;CACxB;AAED,oBAAY,eAAe;IACzB,UAAU,IAAI;IACd,IAAI,IAAI;IACR,OAAO,IAAI;IACX,MAAM,IAAI;CACX;AAED,oBAAY,WAAW;IACrB,IAAI,SAAS;IACb,IAAI,SAAS;CACd;AAED,qBAAa,qBAAqB;IA8B9B,OAAO,CAAC,QAAQ,CAAC,WAAW;IA7B9B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,oBAAoB,CAQ1C;IAEF,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAiB;IACxC,OAAO,CAAC,MAAM,CAAC,CAAM;IACrB,OAAO,CAAC,QAAQ,CAAC,CAAiB;IAClC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAqC;IACnE,OAAO,CAAC,iBAAiB,CAAU;IACnC,OAAO,CAAC,MAAM,CAAC,CAAyB;IACxC,OAAO,CAAC,SAAS,CAAC,CAAyB;IAC3C,OAAO,CAAC,OAA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K,EAAE,UAAU,KAAK,IAAI,GAAG,IAAI;IAItD,cAAc,IAAI,IAAI;CAI9B"}
|
|
@@ -95,6 +95,7 @@ class ReconnectingWebsocket {
|
|
|
95
95
|
*/
|
|
96
96
|
stopBackFromSleepHandler;
|
|
97
97
|
isPingingEnabled = true;
|
|
98
|
+
pendingHealthChecks = new Set();
|
|
98
99
|
constructor(onReconnect, options = {}) {
|
|
99
100
|
this.onReconnect = onReconnect;
|
|
100
101
|
this.logger = commons_1.LogFactory.getLogger('@wireapp/api-client/tcp/ReconnectingWebsocket');
|
|
@@ -113,12 +114,14 @@ class ReconnectingWebsocket {
|
|
|
113
114
|
* **/
|
|
114
115
|
this.stopBackFromSleepHandler = (0, BackFromSleepHandler_1.onBackFromSleep)({
|
|
115
116
|
callback: () => {
|
|
116
|
-
if (this.socket) {
|
|
117
|
-
this.logger.debug('
|
|
118
|
-
|
|
117
|
+
if (!this.socket) {
|
|
118
|
+
this.logger.debug('WebSocket instance does not exist, skipping reconnect after sleep');
|
|
119
|
+
return;
|
|
119
120
|
}
|
|
121
|
+
this.logger.debug('Back from sleep, reconnecting WebSocket');
|
|
122
|
+
// Force reconnect even if the browser keeps the socket in OPEN state after sleep.
|
|
123
|
+
this.socket.reconnect();
|
|
120
124
|
},
|
|
121
|
-
isDisconnected: () => this.getState() === WEBSOCKET_STATE.CLOSED,
|
|
122
125
|
});
|
|
123
126
|
}
|
|
124
127
|
internalOnError = (error) => {
|
|
@@ -133,6 +136,7 @@ class ReconnectingWebsocket {
|
|
|
133
136
|
if (data === PingMessage.PONG) {
|
|
134
137
|
this.logger.debug('Received pong from WebSocket');
|
|
135
138
|
this.hasUnansweredPing = false;
|
|
139
|
+
this.resolvePendingHealthChecks(true);
|
|
136
140
|
return;
|
|
137
141
|
}
|
|
138
142
|
this.onMessage?.(data);
|
|
@@ -158,6 +162,7 @@ class ReconnectingWebsocket {
|
|
|
158
162
|
internalOnClose = (event) => {
|
|
159
163
|
this.logger.debug(`WebSocket closed with code: ${event?.code}${event?.reason ? `Reason: ${event?.reason}` : ''}`);
|
|
160
164
|
this.stopPinging();
|
|
165
|
+
this.resolvePendingHealthChecks(false);
|
|
161
166
|
if (this.onClose) {
|
|
162
167
|
this.onClose(event);
|
|
163
168
|
}
|
|
@@ -173,16 +178,20 @@ class ReconnectingWebsocket {
|
|
|
173
178
|
}
|
|
174
179
|
}
|
|
175
180
|
sendPing = () => {
|
|
176
|
-
if (this.socket) {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
181
|
+
if (!this.socket) {
|
|
182
|
+
this.logger.debug('WebSocket instance does not exist, skipping ping');
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
if (this.hasUnansweredPing) {
|
|
186
|
+
this.logger.warn('Ping interval check failed');
|
|
187
|
+
this.stopPinging();
|
|
188
|
+
// Closing here intentionally triggers reconnecting-websocket's retry loop; it will call
|
|
189
|
+
// internalOnReconnect to build a fresh URL and re-open the socket.
|
|
190
|
+
this.socket.close(CloseEventCode.NORMAL_CLOSURE, 'Ping timeout');
|
|
191
|
+
return;
|
|
185
192
|
}
|
|
193
|
+
this.hasUnansweredPing = true;
|
|
194
|
+
this.send(PingMessage.PING);
|
|
186
195
|
};
|
|
187
196
|
connect() {
|
|
188
197
|
this.socket = this.getReconnectingWebsocket();
|
|
@@ -197,6 +206,27 @@ class ReconnectingWebsocket {
|
|
|
197
206
|
getState() {
|
|
198
207
|
return this.socket ? this.socket.readyState : WEBSOCKET_STATE.CLOSED;
|
|
199
208
|
}
|
|
209
|
+
/**
|
|
210
|
+
* Lightweight health probe that sends a single ping and resolves with whether a pong was received in time.
|
|
211
|
+
* Does not close or reconnect the socket; callers can decide how to react to failures.
|
|
212
|
+
*/
|
|
213
|
+
checkHealth(timeoutMs = commons_1.TimeUtil.TimeInMillis.SECOND * 5) {
|
|
214
|
+
if (!this.socket || this.getState() !== WEBSOCKET_STATE.OPEN) {
|
|
215
|
+
return Promise.resolve(false);
|
|
216
|
+
}
|
|
217
|
+
return new Promise(resolve => {
|
|
218
|
+
const timeoutId = setTimeout(() => {
|
|
219
|
+
this.pendingHealthChecks.delete(resolveHealthCheck);
|
|
220
|
+
resolve(false);
|
|
221
|
+
}, timeoutMs);
|
|
222
|
+
const resolveHealthCheck = (isHealthy) => {
|
|
223
|
+
clearTimeout(timeoutId);
|
|
224
|
+
resolve(isHealthy);
|
|
225
|
+
};
|
|
226
|
+
this.pendingHealthChecks.add(resolveHealthCheck);
|
|
227
|
+
this.send(PingMessage.PING);
|
|
228
|
+
});
|
|
229
|
+
}
|
|
200
230
|
disconnect(reason = 'Closed by client') {
|
|
201
231
|
if (this.socket) {
|
|
202
232
|
this.logger.info(`Disconnecting from WebSocket (reason: "${reason}")`);
|
|
@@ -221,6 +251,10 @@ class ReconnectingWebsocket {
|
|
|
221
251
|
getReconnectingWebsocket() {
|
|
222
252
|
return new reconnecting_websocket_1.default(this.internalOnReconnect, undefined, ReconnectingWebsocket.RECONNECTING_OPTIONS);
|
|
223
253
|
}
|
|
254
|
+
resolvePendingHealthChecks(isHealthy) {
|
|
255
|
+
this.pendingHealthChecks.forEach(resolve => resolve(isHealthy));
|
|
256
|
+
this.pendingHealthChecks.clear();
|
|
257
|
+
}
|
|
224
258
|
setOnOpen(onOpen) {
|
|
225
259
|
this.onOpen = onOpen;
|
|
226
260
|
}
|
|
@@ -74,6 +74,14 @@ export declare class WebSocketClient extends EventEmitter {
|
|
|
74
74
|
acknowledgeMissedNotification(): void;
|
|
75
75
|
acknowledgeConsumableNotificationSynchronization(notification: ConsumableNotificationSynchronization): void;
|
|
76
76
|
acknowledgeNotification(notification: ConsumableNotificationEvent): void;
|
|
77
|
+
/**
|
|
78
|
+
* Performs a lightweight health check on the WebSocket connection.
|
|
79
|
+
* Sends a ping and waits for a pong response without closing or reconnecting the socket.
|
|
80
|
+
* The default timeout is 5 seconds; this may be configurable depending on the socket implementation.
|
|
81
|
+
* This method does not disrupt the existing connection.
|
|
82
|
+
* @returns A promise that resolves to true if a pong is received within the timeout, false otherwise.
|
|
83
|
+
*/
|
|
84
|
+
checkHealth(): Promise<boolean>;
|
|
77
85
|
}
|
|
78
86
|
export {};
|
|
79
87
|
//# sourceMappingURL=WebSocketClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebSocketClient.d.ts","sourceRoot":"","sources":["../../src/tcp/WebSocketClient.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAC,UAAU,EAAC,MAAM,wBAAwB,CAAC;AAElD,OAAO,EAAC,YAAY,EAAC,MAAM,QAAQ,CAAC;AAKpC,OAAO,EAAwB,eAAe,EAAC,MAAM,yBAAyB,CAAC;AAE/E,OAAO,EAAC,iBAAiB,EAA8B,kBAAkB,EAAC,MAAM,UAAU,CAAC;AAE3F,OAAO,EAAC,UAAU,EAAe,MAAM,UAAU,CAAC;AAClD,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EACL,sBAAsB,EACtB,2BAA2B,EAE3B,qCAAqC,EACtC,MAAM,wCAAwC,CAAC;AAEhD,aAAK,KAAK;IACR,QAAQ,mCAAmC;IAC3C,gBAAgB,2CAA2C;IAC3D,UAAU,qCAAqC;IAC/C,eAAe,0CAA0C;CAC1D;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,QAAQ,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,GAAG,UAAU,KAAK,IAAI,GAAG,IAAI,CAAC;IAC/E,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,gBAAgB,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,iBAAiB,GAAG,kBAAkB,KAAK,IAAI,GAAG,IAAI,CAAC;IAC3G,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,EAAE,QAAQ,EAAE,CAAC,YAAY,EAAE,YAAY,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AAS,GAAG,eAAe;YAmB3D,kBAAkB;IA8BzB,UAAU,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI;IAMxC;;;;OAIG;IACH,SAAgB,MAAM,aAOpB;IAEF;;;;;OAKG;IACH,SAAgB,IAAI,aAGlB;IAEK,QAAQ,IAAI,OAAO;IAInB,iBAAiB,IAAI,MAAM;IA0C3B,2BAA2B;IAM3B,6BAA6B;IAQ7B,gDAAgD,CAAC,YAAY,EAAE,qCAAqC;IAYpG,uBAAuB,CAAC,YAAY,EAAE,2BAA2B;IAiBxE;;;;;;OAMG;IACI,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;CAGvC"}
|
|
@@ -257,5 +257,15 @@ class WebSocketClient extends events_1.EventEmitter {
|
|
|
257
257
|
});
|
|
258
258
|
this.socket.send(jsonEvent);
|
|
259
259
|
}
|
|
260
|
+
/**
|
|
261
|
+
* Performs a lightweight health check on the WebSocket connection.
|
|
262
|
+
* Sends a ping and waits for a pong response without closing or reconnecting the socket.
|
|
263
|
+
* The default timeout is 5 seconds; this may be configurable depending on the socket implementation.
|
|
264
|
+
* This method does not disrupt the existing connection.
|
|
265
|
+
* @returns A promise that resolves to true if a pong is received within the timeout, false otherwise.
|
|
266
|
+
*/
|
|
267
|
+
checkHealth() {
|
|
268
|
+
return this.socket.checkHealth();
|
|
269
|
+
}
|
|
260
270
|
}
|
|
261
271
|
exports.WebSocketClient = WebSocketClient;
|
package/package.json
CHANGED
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
"./lib/shims/node/websocket": "./lib/shims/browser/websocket.js"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@aws-sdk/client-s3": "3.
|
|
17
|
-
"@aws-sdk/lib-storage": "3.
|
|
18
|
-
"@wireapp/commons": "^5.4.
|
|
19
|
-
"@wireapp/priority-queue": "^2.1.
|
|
16
|
+
"@aws-sdk/client-s3": "3.940.0",
|
|
17
|
+
"@aws-sdk/lib-storage": "3.940.0",
|
|
18
|
+
"@wireapp/commons": "^5.4.10",
|
|
19
|
+
"@wireapp/priority-queue": "^2.1.17",
|
|
20
20
|
"@wireapp/protocol-messaging": "1.53.0",
|
|
21
|
-
"axios": "1.
|
|
21
|
+
"axios": "1.13.2",
|
|
22
22
|
"axios-retry": "4.5.0",
|
|
23
23
|
"cells-sdk-ts": "0.1.1-alpha17",
|
|
24
24
|
"http-status-codes": "2.3.0",
|
|
@@ -41,8 +41,8 @@
|
|
|
41
41
|
"@types/spark-md5": "3.0.5",
|
|
42
42
|
"@types/tough-cookie": "4.0.5",
|
|
43
43
|
"@types/ws": "8.5.14",
|
|
44
|
-
"@wireapp/store-engine": "^5.1.
|
|
45
|
-
"@wireapp/store-engine-fs": "^3.1.
|
|
44
|
+
"@wireapp/store-engine": "^5.1.17",
|
|
45
|
+
"@wireapp/store-engine-fs": "^3.1.19",
|
|
46
46
|
"browser-sync": "3.0.4",
|
|
47
47
|
"concurrently": "9.2.1",
|
|
48
48
|
"cross-env": "10.1.0",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"nock": "14.0.10",
|
|
52
52
|
"react": "18.3.1",
|
|
53
53
|
"react-dom": "18.3.1",
|
|
54
|
-
"rimraf": "6.
|
|
54
|
+
"rimraf": "6.1.2",
|
|
55
55
|
"ts-node": "^10.9.1",
|
|
56
56
|
"typescript": "^5.0.4",
|
|
57
57
|
"webpack": "^5.74.0",
|
|
@@ -70,6 +70,6 @@
|
|
|
70
70
|
"watch": "webpack serve --config webpack.browser.js",
|
|
71
71
|
"prepare": "yarn dist"
|
|
72
72
|
},
|
|
73
|
-
"version": "27.
|
|
74
|
-
"gitHead": "
|
|
73
|
+
"version": "27.93.0",
|
|
74
|
+
"gitHead": "49bdcf1005332d40148e4bcd2e76bacdd8447150"
|
|
75
75
|
}
|