@lazycatcloud/sdk 0.1.284 → 0.1.285
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/common/apk_shell.d.ts +2 -3
- package/dist/common/apk_shell.d.ts.map +1 -1
- package/dist/common/apk_shell.js +54 -67
- package/dist/common/apk_shell.js.map +1 -1
- package/dist/common/box.d.ts +2 -3
- package/dist/common/box.d.ts.map +1 -1
- package/dist/common/box.js +134 -113
- package/dist/common/box.js.map +1 -1
- package/dist/common/browseronly.d.ts +2 -3
- package/dist/common/browseronly.d.ts.map +1 -1
- package/dist/common/browseronly.js +86 -91
- package/dist/common/browseronly.js.map +1 -1
- package/dist/common/end_device.d.ts +2 -3
- package/dist/common/end_device.d.ts.map +1 -1
- package/dist/common/end_device.js +110 -109
- package/dist/common/end_device.js.map +1 -1
- package/dist/common/file_handler.d.ts +2 -3
- package/dist/common/file_handler.d.ts.map +1 -1
- package/dist/common/file_handler.js +190 -159
- package/dist/common/file_handler.js.map +1 -1
- package/dist/common/filetrans.d.ts +2 -3
- package/dist/common/filetrans.d.ts.map +1 -1
- package/dist/common/filetrans.js +355 -273
- package/dist/common/filetrans.js.map +1 -1
- package/dist/common/gateway.d.ts +2 -3
- package/dist/common/gateway.d.ts.map +1 -1
- package/dist/common/gateway.js +87 -79
- package/dist/common/gateway.js.map +1 -1
- package/dist/common/media_meta.d.ts +2 -3
- package/dist/common/media_meta.d.ts.map +1 -1
- package/dist/common/media_meta.js +81 -90
- package/dist/common/media_meta.js.map +1 -1
- package/dist/common/message.d.ts +2 -3
- package/dist/common/message.d.ts.map +1 -1
- package/dist/common/message.js +141 -128
- package/dist/common/message.js.map +1 -1
- package/dist/common/peripheral_device.d.ts +2 -3
- package/dist/common/peripheral_device.d.ts.map +1 -1
- package/dist/common/peripheral_device.js +128 -124
- package/dist/common/peripheral_device.js.map +1 -1
- package/dist/common/security_context.d.ts +2 -3
- package/dist/common/security_context.d.ts.map +1 -1
- package/dist/common/security_context.js +69 -75
- package/dist/common/security_context.js.map +1 -1
- package/dist/common/users.d.ts +2 -3
- package/dist/common/users.d.ts.map +1 -1
- package/dist/common/users.js +133 -117
- package/dist/common/users.js.map +1 -1
- package/dist/dlna/dlna.d.ts +2 -3
- package/dist/dlna/dlna.d.ts.map +1 -1
- package/dist/dlna/dlna.js +144 -129
- package/dist/dlna/dlna.js.map +1 -1
- package/dist/google/protobuf/descriptor.d.ts.map +1 -1
- package/dist/google/protobuf/descriptor.js +724 -607
- package/dist/google/protobuf/descriptor.js.map +1 -1
- package/dist/google/protobuf/empty.d.ts.map +1 -1
- package/dist/google/protobuf/empty.js +1 -1
- package/dist/google/protobuf/empty.js.map +1 -1
- package/dist/google/protobuf/timestamp.d.ts.map +1 -1
- package/dist/google/protobuf/timestamp.js +13 -24
- package/dist/google/protobuf/timestamp.js.map +1 -1
- package/dist/localdevice/client.d.ts +2 -3
- package/dist/localdevice/client.d.ts.map +1 -1
- package/dist/localdevice/client.js +22 -40
- package/dist/localdevice/client.js.map +1 -1
- package/dist/localdevice/clipboard.d.ts +2 -3
- package/dist/localdevice/clipboard.d.ts.map +1 -1
- package/dist/localdevice/clipboard.js +74 -89
- package/dist/localdevice/clipboard.js.map +1 -1
- package/dist/localdevice/config.d.ts +2 -3
- package/dist/localdevice/config.d.ts.map +1 -1
- package/dist/localdevice/config.js +63 -65
- package/dist/localdevice/config.js.map +1 -1
- package/dist/localdevice/device.d.ts +2 -3
- package/dist/localdevice/device.d.ts.map +1 -1
- package/dist/localdevice/device.js +30 -44
- package/dist/localdevice/device.js.map +1 -1
- package/dist/localdevice/dialog.d.ts +2 -3
- package/dist/localdevice/dialog.d.ts.map +1 -1
- package/dist/localdevice/dialog.js +85 -83
- package/dist/localdevice/dialog.js.map +1 -1
- package/dist/localdevice/local-launch.d.ts +2 -3
- package/dist/localdevice/local-launch.d.ts.map +1 -1
- package/dist/localdevice/local-launch.js +96 -90
- package/dist/localdevice/local-launch.js.map +1 -1
- package/dist/localdevice/network.d.ts +2 -3
- package/dist/localdevice/network.d.ts.map +1 -1
- package/dist/localdevice/network.js +19 -37
- package/dist/localdevice/network.js.map +1 -1
- package/dist/localdevice/permission.d.ts +2 -3
- package/dist/localdevice/permission.d.ts.map +1 -1
- package/dist/localdevice/permission.js +84 -88
- package/dist/localdevice/permission.js.map +1 -1
- package/dist/localdevice/photo.d.ts +2 -3
- package/dist/localdevice/photo.d.ts.map +1 -1
- package/dist/localdevice/photo.js +348 -280
- package/dist/localdevice/photo.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/sys/OS_snapshot.d.ts +2 -3
- package/dist/sys/OS_snapshot.d.ts.map +1 -1
- package/dist/sys/OS_snapshot.js +177 -147
- package/dist/sys/OS_snapshot.js.map +1 -1
- package/dist/sys/OS_upgrader.d.ts +2 -3
- package/dist/sys/OS_upgrader.d.ts.map +1 -1
- package/dist/sys/OS_upgrader.js +66 -70
- package/dist/sys/OS_upgrader.js.map +1 -1
- package/dist/sys/btled.d.ts +2 -3
- package/dist/sys/btled.d.ts.map +1 -1
- package/dist/sys/btled.js +70 -80
- package/dist/sys/btled.js.map +1 -1
- package/dist/sys/btrfs.d.ts +2 -3
- package/dist/sys/btrfs.d.ts.map +1 -1
- package/dist/sys/btrfs.js +80 -76
- package/dist/sys/btrfs.js.map +1 -1
- package/dist/sys/devopt.d.ts +2 -3
- package/dist/sys/devopt.d.ts.map +1 -1
- package/dist/sys/devopt.js +52 -58
- package/dist/sys/devopt.js.map +1 -1
- package/dist/sys/dirmon.d.ts +2 -3
- package/dist/sys/dirmon.d.ts.map +1 -1
- package/dist/sys/dirmon.js +41 -61
- package/dist/sys/dirmon.js.map +1 -1
- package/dist/sys/event.d.ts +2 -3
- package/dist/sys/event.d.ts.map +1 -1
- package/dist/sys/event.js +82 -87
- package/dist/sys/event.js.map +1 -1
- package/dist/sys/hc-core/hc-core.d.ts +2 -3
- package/dist/sys/hc-core/hc-core.d.ts.map +1 -1
- package/dist/sys/hc-core/hc-core.js +155 -134
- package/dist/sys/hc-core/hc-core.js.map +1 -1
- package/dist/sys/ingress.d.ts +2 -3
- package/dist/sys/ingress.d.ts.map +1 -1
- package/dist/sys/ingress.js +44 -58
- package/dist/sys/ingress.js.map +1 -1
- package/dist/sys/installer.d.ts +2 -3
- package/dist/sys/installer.d.ts.map +1 -1
- package/dist/sys/installer.js +99 -101
- package/dist/sys/installer.js.map +1 -1
- package/dist/sys/network_manager.d.ts +2 -3
- package/dist/sys/network_manager.d.ts.map +1 -1
- package/dist/sys/network_manager.js +144 -117
- package/dist/sys/network_manager.js.map +1 -1
- package/dist/sys/package_manager.d.ts +2 -3
- package/dist/sys/package_manager.d.ts.map +1 -1
- package/dist/sys/package_manager.js +313 -230
- package/dist/sys/package_manager.js.map +1 -1
- package/dist/sys/portal-server/portal-server.d.ts +2 -3
- package/dist/sys/portal-server/portal-server.d.ts.map +1 -1
- package/dist/sys/portal-server/portal-server.js +335 -255
- package/dist/sys/portal-server/portal-server.js.map +1 -1
- package/dist/sys/snapd.d.ts +2 -3
- package/dist/sys/snapd.d.ts.map +1 -1
- package/dist/sys/snapd.js +88 -88
- package/dist/sys/snapd.js.map +1 -1
- package/dist/sys/version.d.ts +2 -3
- package/dist/sys/version.d.ts.map +1 -1
- package/dist/sys/version.js +15 -35
- package/dist/sys/version.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/extentions/mediasession/definitions.d.ts +0 -55
- package/dist/extentions/mediasession/definitions.d.ts.map +0 -1
- package/dist/extentions/mediasession/definitions.js +0 -3
- package/dist/extentions/mediasession/definitions.js.map +0 -1
- package/dist/extentions/mediasession/index.d.ts +0 -8
- package/dist/extentions/mediasession/index.d.ts.map +0 -1
- package/dist/extentions/mediasession/index.js +0 -26
- package/dist/extentions/mediasession/index.js.map +0 -1
- package/dist/extentions/mediasession/web.d.ts +0 -8
- package/dist/extentions/mediasession/web.d.ts.map +0 -1
- package/dist/extentions/mediasession/web.js +0 -89
- package/dist/extentions/mediasession/web.js.map +0 -1
- package/dist/lanforward/lanforward.d.ts +0 -99
- package/dist/lanforward/lanforward.d.ts.map +0 -1
- package/dist/lanforward/lanforward.js +0 -254
- package/dist/lanforward/lanforward.js.map +0 -1
- package/dist/ssdp/ssdp.d.ts +0 -113
- package/dist/ssdp/ssdp.d.ts.map +0 -1
- package/dist/ssdp/ssdp.js +0 -292
- package/dist/ssdp/ssdp.js.map +0 -1
- package/dist/sys/OS_daemon.d.ts +0 -111
- package/dist/sys/OS_daemon.d.ts.map +0 -1
- package/dist/sys/OS_daemon.js +0 -281
- package/dist/sys/OS_daemon.js.map +0 -1
- package/dist/sys/box-status.d.ts +0 -572
- package/dist/sys/box-status.d.ts.map +0 -1
- package/dist/sys/box-status.js +0 -911
- package/dist/sys/box-status.js.map +0 -1
|
@@ -159,13 +159,13 @@ exports.QueryPhotoHashRequest = {
|
|
|
159
159
|
const tag = reader.uint32();
|
|
160
160
|
switch (tag >>> 3) {
|
|
161
161
|
case 1:
|
|
162
|
-
if (tag
|
|
162
|
+
if (tag !== 10) {
|
|
163
163
|
break;
|
|
164
164
|
}
|
|
165
165
|
message.changedAfter = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
166
166
|
continue;
|
|
167
167
|
}
|
|
168
|
-
if ((tag & 7)
|
|
168
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
169
169
|
break;
|
|
170
170
|
}
|
|
171
171
|
reader.skipType(tag & 7);
|
|
@@ -177,7 +177,9 @@ exports.QueryPhotoHashRequest = {
|
|
|
177
177
|
},
|
|
178
178
|
toJSON(message) {
|
|
179
179
|
const obj = {};
|
|
180
|
-
message.changedAfter !== undefined
|
|
180
|
+
if (message.changedAfter !== undefined) {
|
|
181
|
+
obj.changedAfter = message.changedAfter.toISOString();
|
|
182
|
+
}
|
|
181
183
|
return obj;
|
|
182
184
|
},
|
|
183
185
|
create(base) {
|
|
@@ -208,13 +210,13 @@ exports.QueryPhotoRequest = {
|
|
|
208
210
|
const tag = reader.uint32();
|
|
209
211
|
switch (tag >>> 3) {
|
|
210
212
|
case 1:
|
|
211
|
-
if (tag
|
|
213
|
+
if (tag !== 10) {
|
|
212
214
|
break;
|
|
213
215
|
}
|
|
214
216
|
message.id = reader.string();
|
|
215
217
|
continue;
|
|
216
218
|
}
|
|
217
|
-
if ((tag & 7)
|
|
219
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
218
220
|
break;
|
|
219
221
|
}
|
|
220
222
|
reader.skipType(tag & 7);
|
|
@@ -222,11 +224,13 @@ exports.QueryPhotoRequest = {
|
|
|
222
224
|
return message;
|
|
223
225
|
},
|
|
224
226
|
fromJSON(object) {
|
|
225
|
-
return { id: isSet(object.id) ? String(object.id) : "" };
|
|
227
|
+
return { id: isSet(object.id) ? globalThis.String(object.id) : "" };
|
|
226
228
|
},
|
|
227
229
|
toJSON(message) {
|
|
228
230
|
const obj = {};
|
|
229
|
-
message.id !==
|
|
231
|
+
if (message.id !== "") {
|
|
232
|
+
obj.id = message.id;
|
|
233
|
+
}
|
|
230
234
|
return obj;
|
|
231
235
|
},
|
|
232
236
|
create(base) {
|
|
@@ -257,13 +261,13 @@ exports.MakeAlbumRequest = {
|
|
|
257
261
|
const tag = reader.uint32();
|
|
258
262
|
switch (tag >>> 3) {
|
|
259
263
|
case 1:
|
|
260
|
-
if (tag
|
|
264
|
+
if (tag !== 10) {
|
|
261
265
|
break;
|
|
262
266
|
}
|
|
263
267
|
message.title = reader.string();
|
|
264
268
|
continue;
|
|
265
269
|
}
|
|
266
|
-
if ((tag & 7)
|
|
270
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
267
271
|
break;
|
|
268
272
|
}
|
|
269
273
|
reader.skipType(tag & 7);
|
|
@@ -271,11 +275,13 @@ exports.MakeAlbumRequest = {
|
|
|
271
275
|
return message;
|
|
272
276
|
},
|
|
273
277
|
fromJSON(object) {
|
|
274
|
-
return { title: isSet(object.title) ? String(object.title) : "" };
|
|
278
|
+
return { title: isSet(object.title) ? globalThis.String(object.title) : "" };
|
|
275
279
|
},
|
|
276
280
|
toJSON(message) {
|
|
277
281
|
const obj = {};
|
|
278
|
-
message.title !==
|
|
282
|
+
if (message.title !== "") {
|
|
283
|
+
obj.title = message.title;
|
|
284
|
+
}
|
|
279
285
|
return obj;
|
|
280
286
|
},
|
|
281
287
|
create(base) {
|
|
@@ -312,25 +318,25 @@ exports.PutPhotoRequest = {
|
|
|
312
318
|
const tag = reader.uint32();
|
|
313
319
|
switch (tag >>> 3) {
|
|
314
320
|
case 1:
|
|
315
|
-
if (tag
|
|
321
|
+
if (tag !== 10) {
|
|
316
322
|
break;
|
|
317
323
|
}
|
|
318
324
|
message.albumId = reader.string();
|
|
319
325
|
continue;
|
|
320
326
|
case 2:
|
|
321
|
-
if (tag
|
|
327
|
+
if (tag !== 18) {
|
|
322
328
|
break;
|
|
323
329
|
}
|
|
324
330
|
message.url = reader.string();
|
|
325
331
|
continue;
|
|
326
332
|
case 3:
|
|
327
|
-
if (tag
|
|
333
|
+
if (tag !== 26) {
|
|
328
334
|
break;
|
|
329
335
|
}
|
|
330
336
|
message.fileName = reader.string();
|
|
331
337
|
continue;
|
|
332
338
|
}
|
|
333
|
-
if ((tag & 7)
|
|
339
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
334
340
|
break;
|
|
335
341
|
}
|
|
336
342
|
reader.skipType(tag & 7);
|
|
@@ -339,16 +345,22 @@ exports.PutPhotoRequest = {
|
|
|
339
345
|
},
|
|
340
346
|
fromJSON(object) {
|
|
341
347
|
return {
|
|
342
|
-
albumId: isSet(object.albumId) ? String(object.albumId) : "",
|
|
343
|
-
url: isSet(object.url) ? String(object.url) : "",
|
|
344
|
-
fileName: isSet(object.fileName) ? String(object.fileName) : undefined,
|
|
348
|
+
albumId: isSet(object.albumId) ? globalThis.String(object.albumId) : "",
|
|
349
|
+
url: isSet(object.url) ? globalThis.String(object.url) : "",
|
|
350
|
+
fileName: isSet(object.fileName) ? globalThis.String(object.fileName) : undefined,
|
|
345
351
|
};
|
|
346
352
|
},
|
|
347
353
|
toJSON(message) {
|
|
348
354
|
const obj = {};
|
|
349
|
-
message.albumId !==
|
|
350
|
-
|
|
351
|
-
|
|
355
|
+
if (message.albumId !== "") {
|
|
356
|
+
obj.albumId = message.albumId;
|
|
357
|
+
}
|
|
358
|
+
if (message.url !== "") {
|
|
359
|
+
obj.url = message.url;
|
|
360
|
+
}
|
|
361
|
+
if (message.fileName !== undefined) {
|
|
362
|
+
obj.fileName = message.fileName;
|
|
363
|
+
}
|
|
352
364
|
return obj;
|
|
353
365
|
},
|
|
354
366
|
create(base) {
|
|
@@ -390,31 +402,31 @@ exports.PutPhotoReply = {
|
|
|
390
402
|
const tag = reader.uint32();
|
|
391
403
|
switch (tag >>> 3) {
|
|
392
404
|
case 1:
|
|
393
|
-
if (tag
|
|
405
|
+
if (tag !== 8) {
|
|
394
406
|
break;
|
|
395
407
|
}
|
|
396
408
|
message.done = reader.bool();
|
|
397
409
|
continue;
|
|
398
410
|
case 2:
|
|
399
|
-
if (tag
|
|
411
|
+
if (tag !== 16) {
|
|
400
412
|
break;
|
|
401
413
|
}
|
|
402
414
|
message.totalSize = longToNumber(reader.int64());
|
|
403
415
|
continue;
|
|
404
416
|
case 3:
|
|
405
|
-
if (tag
|
|
417
|
+
if (tag !== 24) {
|
|
406
418
|
break;
|
|
407
419
|
}
|
|
408
420
|
message.fetchedSize = longToNumber(reader.int64());
|
|
409
421
|
continue;
|
|
410
422
|
case 4:
|
|
411
|
-
if (tag
|
|
423
|
+
if (tag !== 34) {
|
|
412
424
|
break;
|
|
413
425
|
}
|
|
414
426
|
message.photoId = reader.string();
|
|
415
427
|
continue;
|
|
416
428
|
}
|
|
417
|
-
if ((tag & 7)
|
|
429
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
418
430
|
break;
|
|
419
431
|
}
|
|
420
432
|
reader.skipType(tag & 7);
|
|
@@ -423,18 +435,26 @@ exports.PutPhotoReply = {
|
|
|
423
435
|
},
|
|
424
436
|
fromJSON(object) {
|
|
425
437
|
return {
|
|
426
|
-
done: isSet(object.done) ? Boolean(object.done) : false,
|
|
427
|
-
totalSize: isSet(object.totalSize) ? Number(object.totalSize) : undefined,
|
|
428
|
-
fetchedSize: isSet(object.fetchedSize) ? Number(object.fetchedSize) : undefined,
|
|
429
|
-
photoId: isSet(object.photoId) ? String(object.photoId) : undefined,
|
|
438
|
+
done: isSet(object.done) ? globalThis.Boolean(object.done) : false,
|
|
439
|
+
totalSize: isSet(object.totalSize) ? globalThis.Number(object.totalSize) : undefined,
|
|
440
|
+
fetchedSize: isSet(object.fetchedSize) ? globalThis.Number(object.fetchedSize) : undefined,
|
|
441
|
+
photoId: isSet(object.photoId) ? globalThis.String(object.photoId) : undefined,
|
|
430
442
|
};
|
|
431
443
|
},
|
|
432
444
|
toJSON(message) {
|
|
433
445
|
const obj = {};
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
message.
|
|
446
|
+
if (message.done === true) {
|
|
447
|
+
obj.done = message.done;
|
|
448
|
+
}
|
|
449
|
+
if (message.totalSize !== undefined) {
|
|
450
|
+
obj.totalSize = Math.round(message.totalSize);
|
|
451
|
+
}
|
|
452
|
+
if (message.fetchedSize !== undefined) {
|
|
453
|
+
obj.fetchedSize = Math.round(message.fetchedSize);
|
|
454
|
+
}
|
|
455
|
+
if (message.photoId !== undefined) {
|
|
456
|
+
obj.photoId = message.photoId;
|
|
457
|
+
}
|
|
438
458
|
return obj;
|
|
439
459
|
},
|
|
440
460
|
create(base) {
|
|
@@ -468,13 +488,13 @@ exports.DeletePhotoReply = {
|
|
|
468
488
|
const tag = reader.uint32();
|
|
469
489
|
switch (tag >>> 3) {
|
|
470
490
|
case 1:
|
|
471
|
-
if (tag
|
|
491
|
+
if (tag !== 10) {
|
|
472
492
|
break;
|
|
473
493
|
}
|
|
474
494
|
message.failedId.push(reader.string());
|
|
475
495
|
continue;
|
|
476
496
|
}
|
|
477
|
-
if ((tag & 7)
|
|
497
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
478
498
|
break;
|
|
479
499
|
}
|
|
480
500
|
reader.skipType(tag & 7);
|
|
@@ -482,15 +502,15 @@ exports.DeletePhotoReply = {
|
|
|
482
502
|
return message;
|
|
483
503
|
},
|
|
484
504
|
fromJSON(object) {
|
|
485
|
-
return {
|
|
505
|
+
return {
|
|
506
|
+
failedId: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.failedId) ? object.failedId.map((e) => globalThis.String(e)) : [],
|
|
507
|
+
};
|
|
486
508
|
},
|
|
487
509
|
toJSON(message) {
|
|
510
|
+
var _a;
|
|
488
511
|
const obj = {};
|
|
489
|
-
if (message.failedId) {
|
|
490
|
-
obj.failedId = message.failedId
|
|
491
|
-
}
|
|
492
|
-
else {
|
|
493
|
-
obj.failedId = [];
|
|
512
|
+
if ((_a = message.failedId) === null || _a === void 0 ? void 0 : _a.length) {
|
|
513
|
+
obj.failedId = message.failedId;
|
|
494
514
|
}
|
|
495
515
|
return obj;
|
|
496
516
|
},
|
|
@@ -522,13 +542,13 @@ exports.DeletePhotoRequest = {
|
|
|
522
542
|
const tag = reader.uint32();
|
|
523
543
|
switch (tag >>> 3) {
|
|
524
544
|
case 1:
|
|
525
|
-
if (tag
|
|
545
|
+
if (tag !== 10) {
|
|
526
546
|
break;
|
|
527
547
|
}
|
|
528
548
|
message.id.push(reader.string());
|
|
529
549
|
continue;
|
|
530
550
|
}
|
|
531
|
-
if ((tag & 7)
|
|
551
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
532
552
|
break;
|
|
533
553
|
}
|
|
534
554
|
reader.skipType(tag & 7);
|
|
@@ -536,15 +556,13 @@ exports.DeletePhotoRequest = {
|
|
|
536
556
|
return message;
|
|
537
557
|
},
|
|
538
558
|
fromJSON(object) {
|
|
539
|
-
return { id: Array.isArray(object === null || object === void 0 ? void 0 : object.id) ? object.id.map((e) => String(e)) : [] };
|
|
559
|
+
return { id: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.id) ? object.id.map((e) => globalThis.String(e)) : [] };
|
|
540
560
|
},
|
|
541
561
|
toJSON(message) {
|
|
562
|
+
var _a;
|
|
542
563
|
const obj = {};
|
|
543
|
-
if (message.id) {
|
|
544
|
-
obj.id = message.id
|
|
545
|
-
}
|
|
546
|
-
else {
|
|
547
|
-
obj.id = [];
|
|
564
|
+
if ((_a = message.id) === null || _a === void 0 ? void 0 : _a.length) {
|
|
565
|
+
obj.id = message.id;
|
|
548
566
|
}
|
|
549
567
|
return obj;
|
|
550
568
|
},
|
|
@@ -614,67 +632,67 @@ exports.ListPhotoMetasRequest = {
|
|
|
614
632
|
const tag = reader.uint32();
|
|
615
633
|
switch (tag >>> 3) {
|
|
616
634
|
case 1:
|
|
617
|
-
if (tag
|
|
635
|
+
if (tag !== 10) {
|
|
618
636
|
break;
|
|
619
637
|
}
|
|
620
638
|
message.albumIds.push(reader.string());
|
|
621
639
|
continue;
|
|
622
640
|
case 2:
|
|
623
|
-
if (tag
|
|
641
|
+
if (tag !== 16) {
|
|
624
642
|
break;
|
|
625
643
|
}
|
|
626
644
|
message.thumbnailWidth = reader.int32();
|
|
627
645
|
continue;
|
|
628
646
|
case 3:
|
|
629
|
-
if (tag
|
|
647
|
+
if (tag !== 24) {
|
|
630
648
|
break;
|
|
631
649
|
}
|
|
632
650
|
message.thumbnailHeight = reader.int32();
|
|
633
651
|
continue;
|
|
634
652
|
case 4:
|
|
635
|
-
if (tag
|
|
653
|
+
if (tag !== 32) {
|
|
636
654
|
break;
|
|
637
655
|
}
|
|
638
656
|
message.needFileName = reader.bool();
|
|
639
657
|
continue;
|
|
640
658
|
case 5:
|
|
641
|
-
if (tag
|
|
659
|
+
if (tag !== 40) {
|
|
642
660
|
break;
|
|
643
661
|
}
|
|
644
662
|
message.needAlbumIds = reader.bool();
|
|
645
663
|
continue;
|
|
646
664
|
case 6:
|
|
647
|
-
if (tag
|
|
665
|
+
if (tag !== 48) {
|
|
648
666
|
break;
|
|
649
667
|
}
|
|
650
668
|
message.stype = reader.int32();
|
|
651
669
|
continue;
|
|
652
670
|
case 7:
|
|
653
|
-
if (tag
|
|
671
|
+
if (tag !== 56) {
|
|
654
672
|
break;
|
|
655
673
|
}
|
|
656
674
|
message.pageNum = reader.uint32();
|
|
657
675
|
continue;
|
|
658
676
|
case 8:
|
|
659
|
-
if (tag
|
|
677
|
+
if (tag !== 64) {
|
|
660
678
|
break;
|
|
661
679
|
}
|
|
662
680
|
message.pageSize = reader.uint32();
|
|
663
681
|
continue;
|
|
664
682
|
case 9:
|
|
665
|
-
if (tag
|
|
683
|
+
if (tag !== 72) {
|
|
666
684
|
break;
|
|
667
685
|
}
|
|
668
686
|
message.isFilterVideo = reader.bool();
|
|
669
687
|
continue;
|
|
670
688
|
case 10:
|
|
671
|
-
if (tag
|
|
689
|
+
if (tag !== 82) {
|
|
672
690
|
break;
|
|
673
691
|
}
|
|
674
692
|
message.filterByModifiedDate = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
675
693
|
continue;
|
|
676
694
|
}
|
|
677
|
-
if ((tag & 7)
|
|
695
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
678
696
|
break;
|
|
679
697
|
}
|
|
680
698
|
reader.skipType(tag & 7);
|
|
@@ -683,39 +701,53 @@ exports.ListPhotoMetasRequest = {
|
|
|
683
701
|
},
|
|
684
702
|
fromJSON(object) {
|
|
685
703
|
return {
|
|
686
|
-
albumIds: Array.isArray(object === null || object === void 0 ? void 0 : object.albumIds) ? object.albumIds.map((e) => String(e)) : [],
|
|
687
|
-
thumbnailWidth: isSet(object.thumbnailWidth) ? Number(object.thumbnailWidth) : 0,
|
|
688
|
-
thumbnailHeight: isSet(object.thumbnailHeight) ? Number(object.thumbnailHeight) : 0,
|
|
689
|
-
needFileName: isSet(object.needFileName) ? Boolean(object.needFileName) : false,
|
|
690
|
-
needAlbumIds: isSet(object.needAlbumIds) ? Boolean(object.needAlbumIds) : false,
|
|
704
|
+
albumIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.albumIds) ? object.albumIds.map((e) => globalThis.String(e)) : [],
|
|
705
|
+
thumbnailWidth: isSet(object.thumbnailWidth) ? globalThis.Number(object.thumbnailWidth) : 0,
|
|
706
|
+
thumbnailHeight: isSet(object.thumbnailHeight) ? globalThis.Number(object.thumbnailHeight) : 0,
|
|
707
|
+
needFileName: isSet(object.needFileName) ? globalThis.Boolean(object.needFileName) : false,
|
|
708
|
+
needAlbumIds: isSet(object.needAlbumIds) ? globalThis.Boolean(object.needAlbumIds) : false,
|
|
691
709
|
stype: isSet(object.stype) ? photoMetasSortTypeFromJSON(object.stype) : undefined,
|
|
692
|
-
pageNum: isSet(object.pageNum) ? Number(object.pageNum) : undefined,
|
|
693
|
-
pageSize: isSet(object.pageSize) ? Number(object.pageSize) : undefined,
|
|
694
|
-
isFilterVideo: isSet(object.isFilterVideo) ? Boolean(object.isFilterVideo) : undefined,
|
|
710
|
+
pageNum: isSet(object.pageNum) ? globalThis.Number(object.pageNum) : undefined,
|
|
711
|
+
pageSize: isSet(object.pageSize) ? globalThis.Number(object.pageSize) : undefined,
|
|
712
|
+
isFilterVideo: isSet(object.isFilterVideo) ? globalThis.Boolean(object.isFilterVideo) : undefined,
|
|
695
713
|
filterByModifiedDate: isSet(object.filterByModifiedDate)
|
|
696
714
|
? fromJsonTimestamp(object.filterByModifiedDate)
|
|
697
715
|
: undefined,
|
|
698
716
|
};
|
|
699
717
|
},
|
|
700
718
|
toJSON(message) {
|
|
719
|
+
var _a;
|
|
701
720
|
const obj = {};
|
|
702
|
-
if (message.albumIds) {
|
|
703
|
-
obj.albumIds = message.albumIds
|
|
704
|
-
}
|
|
705
|
-
|
|
706
|
-
obj.
|
|
707
|
-
}
|
|
708
|
-
message.
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
message.
|
|
718
|
-
|
|
721
|
+
if ((_a = message.albumIds) === null || _a === void 0 ? void 0 : _a.length) {
|
|
722
|
+
obj.albumIds = message.albumIds;
|
|
723
|
+
}
|
|
724
|
+
if (message.thumbnailWidth !== 0) {
|
|
725
|
+
obj.thumbnailWidth = Math.round(message.thumbnailWidth);
|
|
726
|
+
}
|
|
727
|
+
if (message.thumbnailHeight !== 0) {
|
|
728
|
+
obj.thumbnailHeight = Math.round(message.thumbnailHeight);
|
|
729
|
+
}
|
|
730
|
+
if (message.needFileName === true) {
|
|
731
|
+
obj.needFileName = message.needFileName;
|
|
732
|
+
}
|
|
733
|
+
if (message.needAlbumIds === true) {
|
|
734
|
+
obj.needAlbumIds = message.needAlbumIds;
|
|
735
|
+
}
|
|
736
|
+
if (message.stype !== undefined) {
|
|
737
|
+
obj.stype = photoMetasSortTypeToJSON(message.stype);
|
|
738
|
+
}
|
|
739
|
+
if (message.pageNum !== undefined) {
|
|
740
|
+
obj.pageNum = Math.round(message.pageNum);
|
|
741
|
+
}
|
|
742
|
+
if (message.pageSize !== undefined) {
|
|
743
|
+
obj.pageSize = Math.round(message.pageSize);
|
|
744
|
+
}
|
|
745
|
+
if (message.isFilterVideo !== undefined) {
|
|
746
|
+
obj.isFilterVideo = message.isFilterVideo;
|
|
747
|
+
}
|
|
748
|
+
if (message.filterByModifiedDate !== undefined) {
|
|
749
|
+
obj.filterByModifiedDate = message.filterByModifiedDate.toISOString();
|
|
750
|
+
}
|
|
719
751
|
return obj;
|
|
720
752
|
},
|
|
721
753
|
create(base) {
|
|
@@ -764,31 +796,31 @@ exports.ListAssetsRequest = {
|
|
|
764
796
|
const tag = reader.uint32();
|
|
765
797
|
switch (tag >>> 3) {
|
|
766
798
|
case 1:
|
|
767
|
-
if (tag
|
|
799
|
+
if (tag !== 10) {
|
|
768
800
|
break;
|
|
769
801
|
}
|
|
770
802
|
message.albumIds.push(reader.string());
|
|
771
803
|
continue;
|
|
772
804
|
case 2:
|
|
773
|
-
if (tag
|
|
805
|
+
if (tag !== 16) {
|
|
774
806
|
break;
|
|
775
807
|
}
|
|
776
808
|
message.isFilterVideo = reader.bool();
|
|
777
809
|
continue;
|
|
778
810
|
case 3:
|
|
779
|
-
if (tag
|
|
811
|
+
if (tag !== 24) {
|
|
780
812
|
break;
|
|
781
813
|
}
|
|
782
814
|
message.sortBy = reader.int32();
|
|
783
815
|
continue;
|
|
784
816
|
case 4:
|
|
785
|
-
if (tag
|
|
817
|
+
if (tag !== 34) {
|
|
786
818
|
break;
|
|
787
819
|
}
|
|
788
820
|
message.startDate = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
789
821
|
continue;
|
|
790
822
|
}
|
|
791
|
-
if ((tag & 7)
|
|
823
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
792
824
|
break;
|
|
793
825
|
}
|
|
794
826
|
reader.skipType(tag & 7);
|
|
@@ -797,24 +829,27 @@ exports.ListAssetsRequest = {
|
|
|
797
829
|
},
|
|
798
830
|
fromJSON(object) {
|
|
799
831
|
return {
|
|
800
|
-
albumIds: Array.isArray(object === null || object === void 0 ? void 0 : object.albumIds) ? object.albumIds.map((e) => String(e)) : [],
|
|
801
|
-
isFilterVideo: isSet(object.isFilterVideo) ? Boolean(object.isFilterVideo) : undefined,
|
|
832
|
+
albumIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.albumIds) ? object.albumIds.map((e) => globalThis.String(e)) : [],
|
|
833
|
+
isFilterVideo: isSet(object.isFilterVideo) ? globalThis.Boolean(object.isFilterVideo) : undefined,
|
|
802
834
|
sortBy: isSet(object.sortBy) ? listAssetsSortTypeFromJSON(object.sortBy) : undefined,
|
|
803
835
|
startDate: isSet(object.startDate) ? fromJsonTimestamp(object.startDate) : undefined,
|
|
804
836
|
};
|
|
805
837
|
},
|
|
806
838
|
toJSON(message) {
|
|
839
|
+
var _a;
|
|
807
840
|
const obj = {};
|
|
808
|
-
if (message.albumIds) {
|
|
809
|
-
obj.albumIds = message.albumIds
|
|
841
|
+
if ((_a = message.albumIds) === null || _a === void 0 ? void 0 : _a.length) {
|
|
842
|
+
obj.albumIds = message.albumIds;
|
|
843
|
+
}
|
|
844
|
+
if (message.isFilterVideo !== undefined) {
|
|
845
|
+
obj.isFilterVideo = message.isFilterVideo;
|
|
846
|
+
}
|
|
847
|
+
if (message.sortBy !== undefined) {
|
|
848
|
+
obj.sortBy = listAssetsSortTypeToJSON(message.sortBy);
|
|
810
849
|
}
|
|
811
|
-
|
|
812
|
-
obj.
|
|
850
|
+
if (message.startDate !== undefined) {
|
|
851
|
+
obj.startDate = message.startDate.toISOString();
|
|
813
852
|
}
|
|
814
|
-
message.isFilterVideo !== undefined && (obj.isFilterVideo = message.isFilterVideo);
|
|
815
|
-
message.sortBy !== undefined &&
|
|
816
|
-
(obj.sortBy = message.sortBy !== undefined ? listAssetsSortTypeToJSON(message.sortBy) : undefined);
|
|
817
|
-
message.startDate !== undefined && (obj.startDate = message.startDate.toISOString());
|
|
818
853
|
return obj;
|
|
819
854
|
},
|
|
820
855
|
create(base) {
|
|
@@ -902,91 +937,91 @@ exports.PhotoMeta = {
|
|
|
902
937
|
const tag = reader.uint32();
|
|
903
938
|
switch (tag >>> 3) {
|
|
904
939
|
case 1:
|
|
905
|
-
if (tag
|
|
940
|
+
if (tag !== 10) {
|
|
906
941
|
break;
|
|
907
942
|
}
|
|
908
943
|
message.id = reader.string();
|
|
909
944
|
continue;
|
|
910
945
|
case 2:
|
|
911
|
-
if (tag
|
|
946
|
+
if (tag !== 18) {
|
|
912
947
|
break;
|
|
913
948
|
}
|
|
914
949
|
message.photoUrl = reader.string();
|
|
915
950
|
continue;
|
|
916
951
|
case 3:
|
|
917
|
-
if (tag
|
|
952
|
+
if (tag !== 26) {
|
|
918
953
|
break;
|
|
919
954
|
}
|
|
920
955
|
message.thumbnailUrl = reader.string();
|
|
921
956
|
continue;
|
|
922
957
|
case 4:
|
|
923
|
-
if (tag
|
|
958
|
+
if (tag !== 34) {
|
|
924
959
|
break;
|
|
925
960
|
}
|
|
926
961
|
message.width = reader.string();
|
|
927
962
|
continue;
|
|
928
963
|
case 5:
|
|
929
|
-
if (tag
|
|
964
|
+
if (tag !== 42) {
|
|
930
965
|
break;
|
|
931
966
|
}
|
|
932
967
|
message.height = reader.string();
|
|
933
968
|
continue;
|
|
934
969
|
case 6:
|
|
935
|
-
if (tag
|
|
970
|
+
if (tag !== 50) {
|
|
936
971
|
break;
|
|
937
972
|
}
|
|
938
973
|
message.albumIds.push(reader.string());
|
|
939
974
|
continue;
|
|
940
975
|
case 7:
|
|
941
|
-
if (tag
|
|
976
|
+
if (tag !== 56) {
|
|
942
977
|
break;
|
|
943
978
|
}
|
|
944
979
|
message.size = longToNumber(reader.int64());
|
|
945
980
|
continue;
|
|
946
981
|
case 8:
|
|
947
|
-
if (tag
|
|
982
|
+
if (tag !== 66) {
|
|
948
983
|
break;
|
|
949
984
|
}
|
|
950
985
|
message.mime = reader.string();
|
|
951
986
|
continue;
|
|
952
987
|
case 10:
|
|
953
|
-
if (tag
|
|
988
|
+
if (tag !== 82) {
|
|
954
989
|
break;
|
|
955
990
|
}
|
|
956
991
|
message.fileName = reader.string();
|
|
957
992
|
continue;
|
|
958
993
|
case 11:
|
|
959
|
-
if (tag
|
|
994
|
+
if (tag !== 90) {
|
|
960
995
|
break;
|
|
961
996
|
}
|
|
962
997
|
message.creationDate = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
963
998
|
continue;
|
|
964
999
|
case 12:
|
|
965
|
-
if (tag
|
|
1000
|
+
if (tag !== 101) {
|
|
966
1001
|
break;
|
|
967
1002
|
}
|
|
968
1003
|
message.latitude = reader.float();
|
|
969
1004
|
continue;
|
|
970
1005
|
case 13:
|
|
971
|
-
if (tag
|
|
1006
|
+
if (tag !== 109) {
|
|
972
1007
|
break;
|
|
973
1008
|
}
|
|
974
1009
|
message.longitude = reader.float();
|
|
975
1010
|
continue;
|
|
976
1011
|
case 14:
|
|
977
|
-
if (tag
|
|
1012
|
+
if (tag !== 114) {
|
|
978
1013
|
break;
|
|
979
1014
|
}
|
|
980
1015
|
message.takenDate = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
981
1016
|
continue;
|
|
982
1017
|
case 15:
|
|
983
|
-
if (tag
|
|
1018
|
+
if (tag !== 122) {
|
|
984
1019
|
break;
|
|
985
1020
|
}
|
|
986
1021
|
message.modifiedDate = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
987
1022
|
continue;
|
|
988
1023
|
}
|
|
989
|
-
if ((tag & 7)
|
|
1024
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
990
1025
|
break;
|
|
991
1026
|
}
|
|
992
1027
|
reader.skipType(tag & 7);
|
|
@@ -995,43 +1030,67 @@ exports.PhotoMeta = {
|
|
|
995
1030
|
},
|
|
996
1031
|
fromJSON(object) {
|
|
997
1032
|
return {
|
|
998
|
-
id: isSet(object.id) ? String(object.id) : "",
|
|
999
|
-
photoUrl: isSet(object.photoUrl) ? String(object.photoUrl) : "",
|
|
1000
|
-
thumbnailUrl: isSet(object.thumbnailUrl) ? String(object.thumbnailUrl) : "",
|
|
1001
|
-
width: isSet(object.width) ? String(object.width) : "",
|
|
1002
|
-
height: isSet(object.height) ? String(object.height) : "",
|
|
1003
|
-
albumIds: Array.isArray(object === null || object === void 0 ? void 0 : object.albumIds) ? object.albumIds.map((e) => String(e)) : [],
|
|
1004
|
-
size: isSet(object.size) ? Number(object.size) : 0,
|
|
1005
|
-
mime: isSet(object.mime) ? String(object.mime) : "",
|
|
1006
|
-
fileName: isSet(object.fileName) ? String(object.fileName) : undefined,
|
|
1033
|
+
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
1034
|
+
photoUrl: isSet(object.photoUrl) ? globalThis.String(object.photoUrl) : "",
|
|
1035
|
+
thumbnailUrl: isSet(object.thumbnailUrl) ? globalThis.String(object.thumbnailUrl) : "",
|
|
1036
|
+
width: isSet(object.width) ? globalThis.String(object.width) : "",
|
|
1037
|
+
height: isSet(object.height) ? globalThis.String(object.height) : "",
|
|
1038
|
+
albumIds: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.albumIds) ? object.albumIds.map((e) => globalThis.String(e)) : [],
|
|
1039
|
+
size: isSet(object.size) ? globalThis.Number(object.size) : 0,
|
|
1040
|
+
mime: isSet(object.mime) ? globalThis.String(object.mime) : "",
|
|
1041
|
+
fileName: isSet(object.fileName) ? globalThis.String(object.fileName) : undefined,
|
|
1007
1042
|
creationDate: isSet(object.creationDate) ? fromJsonTimestamp(object.creationDate) : undefined,
|
|
1008
|
-
latitude: isSet(object.latitude) ? Number(object.latitude) : undefined,
|
|
1009
|
-
longitude: isSet(object.longitude) ? Number(object.longitude) : undefined,
|
|
1043
|
+
latitude: isSet(object.latitude) ? globalThis.Number(object.latitude) : undefined,
|
|
1044
|
+
longitude: isSet(object.longitude) ? globalThis.Number(object.longitude) : undefined,
|
|
1010
1045
|
takenDate: isSet(object.takenDate) ? fromJsonTimestamp(object.takenDate) : undefined,
|
|
1011
1046
|
modifiedDate: isSet(object.modifiedDate) ? fromJsonTimestamp(object.modifiedDate) : undefined,
|
|
1012
1047
|
};
|
|
1013
1048
|
},
|
|
1014
1049
|
toJSON(message) {
|
|
1050
|
+
var _a;
|
|
1015
1051
|
const obj = {};
|
|
1016
|
-
message.id !==
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
message.
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
message.
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
message.
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
message.
|
|
1052
|
+
if (message.id !== "") {
|
|
1053
|
+
obj.id = message.id;
|
|
1054
|
+
}
|
|
1055
|
+
if (message.photoUrl !== "") {
|
|
1056
|
+
obj.photoUrl = message.photoUrl;
|
|
1057
|
+
}
|
|
1058
|
+
if (message.thumbnailUrl !== "") {
|
|
1059
|
+
obj.thumbnailUrl = message.thumbnailUrl;
|
|
1060
|
+
}
|
|
1061
|
+
if (message.width !== "") {
|
|
1062
|
+
obj.width = message.width;
|
|
1063
|
+
}
|
|
1064
|
+
if (message.height !== "") {
|
|
1065
|
+
obj.height = message.height;
|
|
1066
|
+
}
|
|
1067
|
+
if ((_a = message.albumIds) === null || _a === void 0 ? void 0 : _a.length) {
|
|
1068
|
+
obj.albumIds = message.albumIds;
|
|
1069
|
+
}
|
|
1070
|
+
if (message.size !== 0) {
|
|
1071
|
+
obj.size = Math.round(message.size);
|
|
1072
|
+
}
|
|
1073
|
+
if (message.mime !== "") {
|
|
1074
|
+
obj.mime = message.mime;
|
|
1075
|
+
}
|
|
1076
|
+
if (message.fileName !== undefined) {
|
|
1077
|
+
obj.fileName = message.fileName;
|
|
1078
|
+
}
|
|
1079
|
+
if (message.creationDate !== undefined) {
|
|
1080
|
+
obj.creationDate = message.creationDate.toISOString();
|
|
1081
|
+
}
|
|
1082
|
+
if (message.latitude !== undefined) {
|
|
1083
|
+
obj.latitude = message.latitude;
|
|
1084
|
+
}
|
|
1085
|
+
if (message.longitude !== undefined) {
|
|
1086
|
+
obj.longitude = message.longitude;
|
|
1087
|
+
}
|
|
1088
|
+
if (message.takenDate !== undefined) {
|
|
1089
|
+
obj.takenDate = message.takenDate.toISOString();
|
|
1090
|
+
}
|
|
1091
|
+
if (message.modifiedDate !== undefined) {
|
|
1092
|
+
obj.modifiedDate = message.modifiedDate.toISOString();
|
|
1093
|
+
}
|
|
1035
1094
|
return obj;
|
|
1036
1095
|
},
|
|
1037
1096
|
create(base) {
|
|
@@ -1090,43 +1149,43 @@ exports.Album = {
|
|
|
1090
1149
|
const tag = reader.uint32();
|
|
1091
1150
|
switch (tag >>> 3) {
|
|
1092
1151
|
case 1:
|
|
1093
|
-
if (tag
|
|
1152
|
+
if (tag !== 10) {
|
|
1094
1153
|
break;
|
|
1095
1154
|
}
|
|
1096
1155
|
message.id = reader.string();
|
|
1097
1156
|
continue;
|
|
1098
1157
|
case 2:
|
|
1099
|
-
if (tag
|
|
1158
|
+
if (tag !== 18) {
|
|
1100
1159
|
break;
|
|
1101
1160
|
}
|
|
1102
1161
|
message.title = reader.string();
|
|
1103
1162
|
continue;
|
|
1104
1163
|
case 3:
|
|
1105
|
-
if (tag
|
|
1164
|
+
if (tag !== 24) {
|
|
1106
1165
|
break;
|
|
1107
1166
|
}
|
|
1108
1167
|
message.imageCount = reader.int32();
|
|
1109
1168
|
continue;
|
|
1110
1169
|
case 4:
|
|
1111
|
-
if (tag
|
|
1170
|
+
if (tag !== 32) {
|
|
1112
1171
|
break;
|
|
1113
1172
|
}
|
|
1114
1173
|
message.videoCount = reader.int32();
|
|
1115
1174
|
continue;
|
|
1116
1175
|
case 5:
|
|
1117
|
-
if (tag
|
|
1176
|
+
if (tag !== 42) {
|
|
1118
1177
|
break;
|
|
1119
1178
|
}
|
|
1120
1179
|
message.coverImageUrl = reader.string();
|
|
1121
1180
|
continue;
|
|
1122
1181
|
case 6:
|
|
1123
|
-
if (tag
|
|
1182
|
+
if (tag !== 50) {
|
|
1124
1183
|
break;
|
|
1125
1184
|
}
|
|
1126
1185
|
message.coverImageId = reader.string();
|
|
1127
1186
|
continue;
|
|
1128
1187
|
}
|
|
1129
|
-
if ((tag & 7)
|
|
1188
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1130
1189
|
break;
|
|
1131
1190
|
}
|
|
1132
1191
|
reader.skipType(tag & 7);
|
|
@@ -1135,22 +1194,34 @@ exports.Album = {
|
|
|
1135
1194
|
},
|
|
1136
1195
|
fromJSON(object) {
|
|
1137
1196
|
return {
|
|
1138
|
-
id: isSet(object.id) ? String(object.id) : "",
|
|
1139
|
-
title: isSet(object.title) ? String(object.title) : "",
|
|
1140
|
-
imageCount: isSet(object.imageCount) ? Number(object.imageCount) : 0,
|
|
1141
|
-
videoCount: isSet(object.videoCount) ? Number(object.videoCount) : 0,
|
|
1142
|
-
coverImageUrl: isSet(object.coverImageUrl) ? String(object.coverImageUrl) : "",
|
|
1143
|
-
coverImageId: isSet(object.coverImageId) ? String(object.coverImageId) : "",
|
|
1197
|
+
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
1198
|
+
title: isSet(object.title) ? globalThis.String(object.title) : "",
|
|
1199
|
+
imageCount: isSet(object.imageCount) ? globalThis.Number(object.imageCount) : 0,
|
|
1200
|
+
videoCount: isSet(object.videoCount) ? globalThis.Number(object.videoCount) : 0,
|
|
1201
|
+
coverImageUrl: isSet(object.coverImageUrl) ? globalThis.String(object.coverImageUrl) : "",
|
|
1202
|
+
coverImageId: isSet(object.coverImageId) ? globalThis.String(object.coverImageId) : "",
|
|
1144
1203
|
};
|
|
1145
1204
|
},
|
|
1146
1205
|
toJSON(message) {
|
|
1147
1206
|
const obj = {};
|
|
1148
|
-
message.id !==
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
message.
|
|
1152
|
-
|
|
1153
|
-
|
|
1207
|
+
if (message.id !== "") {
|
|
1208
|
+
obj.id = message.id;
|
|
1209
|
+
}
|
|
1210
|
+
if (message.title !== "") {
|
|
1211
|
+
obj.title = message.title;
|
|
1212
|
+
}
|
|
1213
|
+
if (message.imageCount !== 0) {
|
|
1214
|
+
obj.imageCount = Math.round(message.imageCount);
|
|
1215
|
+
}
|
|
1216
|
+
if (message.videoCount !== 0) {
|
|
1217
|
+
obj.videoCount = Math.round(message.videoCount);
|
|
1218
|
+
}
|
|
1219
|
+
if (message.coverImageUrl !== "") {
|
|
1220
|
+
obj.coverImageUrl = message.coverImageUrl;
|
|
1221
|
+
}
|
|
1222
|
+
if (message.coverImageId !== "") {
|
|
1223
|
+
obj.coverImageId = message.coverImageId;
|
|
1224
|
+
}
|
|
1154
1225
|
return obj;
|
|
1155
1226
|
},
|
|
1156
1227
|
create(base) {
|
|
@@ -1192,25 +1263,25 @@ exports.ListAlbumsRequest = {
|
|
|
1192
1263
|
const tag = reader.uint32();
|
|
1193
1264
|
switch (tag >>> 3) {
|
|
1194
1265
|
case 1:
|
|
1195
|
-
if (tag
|
|
1266
|
+
if (tag !== 8) {
|
|
1196
1267
|
break;
|
|
1197
1268
|
}
|
|
1198
1269
|
message.thumbnailWidth = reader.int32();
|
|
1199
1270
|
continue;
|
|
1200
1271
|
case 2:
|
|
1201
|
-
if (tag
|
|
1272
|
+
if (tag !== 16) {
|
|
1202
1273
|
break;
|
|
1203
1274
|
}
|
|
1204
1275
|
message.thumbnailHeight = reader.int32();
|
|
1205
1276
|
continue;
|
|
1206
1277
|
case 3:
|
|
1207
|
-
if (tag
|
|
1278
|
+
if (tag !== 24) {
|
|
1208
1279
|
break;
|
|
1209
1280
|
}
|
|
1210
1281
|
message.thumbnailChooseWay = reader.int32();
|
|
1211
1282
|
continue;
|
|
1212
1283
|
}
|
|
1213
|
-
if ((tag & 7)
|
|
1284
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1214
1285
|
break;
|
|
1215
1286
|
}
|
|
1216
1287
|
reader.skipType(tag & 7);
|
|
@@ -1219,16 +1290,22 @@ exports.ListAlbumsRequest = {
|
|
|
1219
1290
|
},
|
|
1220
1291
|
fromJSON(object) {
|
|
1221
1292
|
return {
|
|
1222
|
-
thumbnailWidth: isSet(object.thumbnailWidth) ? Number(object.thumbnailWidth) : undefined,
|
|
1223
|
-
thumbnailHeight: isSet(object.thumbnailHeight) ? Number(object.thumbnailHeight) : undefined,
|
|
1224
|
-
thumbnailChooseWay: isSet(object.thumbnailChooseWay) ? Number(object.thumbnailChooseWay) : undefined,
|
|
1293
|
+
thumbnailWidth: isSet(object.thumbnailWidth) ? globalThis.Number(object.thumbnailWidth) : undefined,
|
|
1294
|
+
thumbnailHeight: isSet(object.thumbnailHeight) ? globalThis.Number(object.thumbnailHeight) : undefined,
|
|
1295
|
+
thumbnailChooseWay: isSet(object.thumbnailChooseWay) ? globalThis.Number(object.thumbnailChooseWay) : undefined,
|
|
1225
1296
|
};
|
|
1226
1297
|
},
|
|
1227
1298
|
toJSON(message) {
|
|
1228
1299
|
const obj = {};
|
|
1229
|
-
message.thumbnailWidth !== undefined
|
|
1230
|
-
|
|
1231
|
-
|
|
1300
|
+
if (message.thumbnailWidth !== undefined) {
|
|
1301
|
+
obj.thumbnailWidth = Math.round(message.thumbnailWidth);
|
|
1302
|
+
}
|
|
1303
|
+
if (message.thumbnailHeight !== undefined) {
|
|
1304
|
+
obj.thumbnailHeight = Math.round(message.thumbnailHeight);
|
|
1305
|
+
}
|
|
1306
|
+
if (message.thumbnailChooseWay !== undefined) {
|
|
1307
|
+
obj.thumbnailChooseWay = Math.round(message.thumbnailChooseWay);
|
|
1308
|
+
}
|
|
1232
1309
|
return obj;
|
|
1233
1310
|
},
|
|
1234
1311
|
create(base) {
|
|
@@ -1261,13 +1338,13 @@ exports.ListAlbumsReply = {
|
|
|
1261
1338
|
const tag = reader.uint32();
|
|
1262
1339
|
switch (tag >>> 3) {
|
|
1263
1340
|
case 1:
|
|
1264
|
-
if (tag
|
|
1341
|
+
if (tag !== 10) {
|
|
1265
1342
|
break;
|
|
1266
1343
|
}
|
|
1267
1344
|
message.albums.push(exports.Album.decode(reader, reader.uint32()));
|
|
1268
1345
|
continue;
|
|
1269
1346
|
}
|
|
1270
|
-
if ((tag & 7)
|
|
1347
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1271
1348
|
break;
|
|
1272
1349
|
}
|
|
1273
1350
|
reader.skipType(tag & 7);
|
|
@@ -1275,15 +1352,13 @@ exports.ListAlbumsReply = {
|
|
|
1275
1352
|
return message;
|
|
1276
1353
|
},
|
|
1277
1354
|
fromJSON(object) {
|
|
1278
|
-
return { albums: Array.isArray(object === null || object === void 0 ? void 0 : object.albums) ? object.albums.map((e) => exports.Album.fromJSON(e)) : [] };
|
|
1355
|
+
return { albums: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.albums) ? object.albums.map((e) => exports.Album.fromJSON(e)) : [] };
|
|
1279
1356
|
},
|
|
1280
1357
|
toJSON(message) {
|
|
1358
|
+
var _a;
|
|
1281
1359
|
const obj = {};
|
|
1282
|
-
if (message.albums) {
|
|
1283
|
-
obj.albums = message.albums.map((e) =>
|
|
1284
|
-
}
|
|
1285
|
-
else {
|
|
1286
|
-
obj.albums = [];
|
|
1360
|
+
if ((_a = message.albums) === null || _a === void 0 ? void 0 : _a.length) {
|
|
1361
|
+
obj.albums = message.albums.map((e) => exports.Album.toJSON(e));
|
|
1287
1362
|
}
|
|
1288
1363
|
return obj;
|
|
1289
1364
|
},
|
|
@@ -1321,25 +1396,25 @@ exports.ListAssetStatsRequest = {
|
|
|
1321
1396
|
const tag = reader.uint32();
|
|
1322
1397
|
switch (tag >>> 3) {
|
|
1323
1398
|
case 1:
|
|
1324
|
-
if (tag
|
|
1399
|
+
if (tag !== 8) {
|
|
1325
1400
|
break;
|
|
1326
1401
|
}
|
|
1327
1402
|
message.isFilterVideo = reader.bool();
|
|
1328
1403
|
continue;
|
|
1329
1404
|
case 2:
|
|
1330
|
-
if (tag
|
|
1405
|
+
if (tag !== 16) {
|
|
1331
1406
|
break;
|
|
1332
1407
|
}
|
|
1333
1408
|
message.sortBy = reader.int32();
|
|
1334
1409
|
continue;
|
|
1335
1410
|
case 3:
|
|
1336
|
-
if (tag
|
|
1411
|
+
if (tag !== 26) {
|
|
1337
1412
|
break;
|
|
1338
1413
|
}
|
|
1339
1414
|
message.startDate = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
1340
1415
|
continue;
|
|
1341
1416
|
}
|
|
1342
|
-
if ((tag & 7)
|
|
1417
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1343
1418
|
break;
|
|
1344
1419
|
}
|
|
1345
1420
|
reader.skipType(tag & 7);
|
|
@@ -1348,16 +1423,22 @@ exports.ListAssetStatsRequest = {
|
|
|
1348
1423
|
},
|
|
1349
1424
|
fromJSON(object) {
|
|
1350
1425
|
return {
|
|
1351
|
-
isFilterVideo: isSet(object.isFilterVideo) ? Boolean(object.isFilterVideo) : false,
|
|
1426
|
+
isFilterVideo: isSet(object.isFilterVideo) ? globalThis.Boolean(object.isFilterVideo) : false,
|
|
1352
1427
|
sortBy: isSet(object.sortBy) ? listAssetsSortTypeFromJSON(object.sortBy) : 0,
|
|
1353
1428
|
startDate: isSet(object.startDate) ? fromJsonTimestamp(object.startDate) : undefined,
|
|
1354
1429
|
};
|
|
1355
1430
|
},
|
|
1356
1431
|
toJSON(message) {
|
|
1357
1432
|
const obj = {};
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1433
|
+
if (message.isFilterVideo === true) {
|
|
1434
|
+
obj.isFilterVideo = message.isFilterVideo;
|
|
1435
|
+
}
|
|
1436
|
+
if (message.sortBy !== 0) {
|
|
1437
|
+
obj.sortBy = listAssetsSortTypeToJSON(message.sortBy);
|
|
1438
|
+
}
|
|
1439
|
+
if (message.startDate !== undefined) {
|
|
1440
|
+
obj.startDate = message.startDate.toISOString();
|
|
1441
|
+
}
|
|
1361
1442
|
return obj;
|
|
1362
1443
|
},
|
|
1363
1444
|
create(base) {
|
|
@@ -1396,25 +1477,25 @@ exports.ListAssetStatsReply = {
|
|
|
1396
1477
|
const tag = reader.uint32();
|
|
1397
1478
|
switch (tag >>> 3) {
|
|
1398
1479
|
case 1:
|
|
1399
|
-
if (tag
|
|
1480
|
+
if (tag !== 10) {
|
|
1400
1481
|
break;
|
|
1401
1482
|
}
|
|
1402
1483
|
message.id = reader.string();
|
|
1403
1484
|
continue;
|
|
1404
1485
|
case 2:
|
|
1405
|
-
if (tag
|
|
1486
|
+
if (tag !== 18) {
|
|
1406
1487
|
break;
|
|
1407
1488
|
}
|
|
1408
1489
|
message.date = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
1409
1490
|
continue;
|
|
1410
1491
|
case 3:
|
|
1411
|
-
if (tag
|
|
1492
|
+
if (tag !== 26) {
|
|
1412
1493
|
break;
|
|
1413
1494
|
}
|
|
1414
1495
|
message.mime = reader.string();
|
|
1415
1496
|
continue;
|
|
1416
1497
|
}
|
|
1417
|
-
if ((tag & 7)
|
|
1498
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1418
1499
|
break;
|
|
1419
1500
|
}
|
|
1420
1501
|
reader.skipType(tag & 7);
|
|
@@ -1423,16 +1504,22 @@ exports.ListAssetStatsReply = {
|
|
|
1423
1504
|
},
|
|
1424
1505
|
fromJSON(object) {
|
|
1425
1506
|
return {
|
|
1426
|
-
id: isSet(object.id) ? String(object.id) : "",
|
|
1507
|
+
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
1427
1508
|
date: isSet(object.date) ? fromJsonTimestamp(object.date) : undefined,
|
|
1428
|
-
mime: isSet(object.mime) ? String(object.mime) : undefined,
|
|
1509
|
+
mime: isSet(object.mime) ? globalThis.String(object.mime) : undefined,
|
|
1429
1510
|
};
|
|
1430
1511
|
},
|
|
1431
1512
|
toJSON(message) {
|
|
1432
1513
|
const obj = {};
|
|
1433
|
-
message.id !==
|
|
1434
|
-
|
|
1435
|
-
|
|
1514
|
+
if (message.id !== "") {
|
|
1515
|
+
obj.id = message.id;
|
|
1516
|
+
}
|
|
1517
|
+
if (message.date !== undefined) {
|
|
1518
|
+
obj.date = message.date.toISOString();
|
|
1519
|
+
}
|
|
1520
|
+
if (message.mime !== undefined) {
|
|
1521
|
+
obj.mime = message.mime;
|
|
1522
|
+
}
|
|
1436
1523
|
return obj;
|
|
1437
1524
|
},
|
|
1438
1525
|
create(base) {
|
|
@@ -1468,19 +1555,19 @@ exports.ListAssetsByIdsRequest = {
|
|
|
1468
1555
|
const tag = reader.uint32();
|
|
1469
1556
|
switch (tag >>> 3) {
|
|
1470
1557
|
case 1:
|
|
1471
|
-
if (tag
|
|
1558
|
+
if (tag !== 10) {
|
|
1472
1559
|
break;
|
|
1473
1560
|
}
|
|
1474
1561
|
message.ids.push(reader.string());
|
|
1475
1562
|
continue;
|
|
1476
1563
|
case 2:
|
|
1477
|
-
if (tag
|
|
1564
|
+
if (tag !== 16) {
|
|
1478
1565
|
break;
|
|
1479
1566
|
}
|
|
1480
1567
|
message.sortBy = reader.int32();
|
|
1481
1568
|
continue;
|
|
1482
1569
|
}
|
|
1483
|
-
if ((tag & 7)
|
|
1570
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1484
1571
|
break;
|
|
1485
1572
|
}
|
|
1486
1573
|
reader.skipType(tag & 7);
|
|
@@ -1489,19 +1576,19 @@ exports.ListAssetsByIdsRequest = {
|
|
|
1489
1576
|
},
|
|
1490
1577
|
fromJSON(object) {
|
|
1491
1578
|
return {
|
|
1492
|
-
ids: Array.isArray(object === null || object === void 0 ? void 0 : object.ids) ? object.ids.map((e) => String(e)) : [],
|
|
1579
|
+
ids: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.ids) ? object.ids.map((e) => globalThis.String(e)) : [],
|
|
1493
1580
|
sortBy: isSet(object.sortBy) ? listAssetsSortTypeFromJSON(object.sortBy) : 0,
|
|
1494
1581
|
};
|
|
1495
1582
|
},
|
|
1496
1583
|
toJSON(message) {
|
|
1584
|
+
var _a;
|
|
1497
1585
|
const obj = {};
|
|
1498
|
-
if (message.ids) {
|
|
1499
|
-
obj.ids = message.ids
|
|
1586
|
+
if ((_a = message.ids) === null || _a === void 0 ? void 0 : _a.length) {
|
|
1587
|
+
obj.ids = message.ids;
|
|
1500
1588
|
}
|
|
1501
|
-
|
|
1502
|
-
obj.
|
|
1589
|
+
if (message.sortBy !== 0) {
|
|
1590
|
+
obj.sortBy = listAssetsSortTypeToJSON(message.sortBy);
|
|
1503
1591
|
}
|
|
1504
|
-
message.sortBy !== undefined && (obj.sortBy = listAssetsSortTypeToJSON(message.sortBy));
|
|
1505
1592
|
return obj;
|
|
1506
1593
|
},
|
|
1507
1594
|
create(base) {
|
|
@@ -1536,19 +1623,19 @@ exports.QueryAssetUrlPathReply = {
|
|
|
1536
1623
|
const tag = reader.uint32();
|
|
1537
1624
|
switch (tag >>> 3) {
|
|
1538
1625
|
case 1:
|
|
1539
|
-
if (tag
|
|
1626
|
+
if (tag !== 10) {
|
|
1540
1627
|
break;
|
|
1541
1628
|
}
|
|
1542
1629
|
message.assetUrl = reader.string();
|
|
1543
1630
|
continue;
|
|
1544
1631
|
case 2:
|
|
1545
|
-
if (tag
|
|
1632
|
+
if (tag !== 18) {
|
|
1546
1633
|
break;
|
|
1547
1634
|
}
|
|
1548
1635
|
message.thumbnailUrl = reader.string();
|
|
1549
1636
|
continue;
|
|
1550
1637
|
}
|
|
1551
|
-
if ((tag & 7)
|
|
1638
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1552
1639
|
break;
|
|
1553
1640
|
}
|
|
1554
1641
|
reader.skipType(tag & 7);
|
|
@@ -1557,14 +1644,18 @@ exports.QueryAssetUrlPathReply = {
|
|
|
1557
1644
|
},
|
|
1558
1645
|
fromJSON(object) {
|
|
1559
1646
|
return {
|
|
1560
|
-
assetUrl: isSet(object.assetUrl) ? String(object.assetUrl) : "",
|
|
1561
|
-
thumbnailUrl: isSet(object.thumbnailUrl) ? String(object.thumbnailUrl) : "",
|
|
1647
|
+
assetUrl: isSet(object.assetUrl) ? globalThis.String(object.assetUrl) : "",
|
|
1648
|
+
thumbnailUrl: isSet(object.thumbnailUrl) ? globalThis.String(object.thumbnailUrl) : "",
|
|
1562
1649
|
};
|
|
1563
1650
|
},
|
|
1564
1651
|
toJSON(message) {
|
|
1565
1652
|
const obj = {};
|
|
1566
|
-
message.assetUrl !==
|
|
1567
|
-
|
|
1653
|
+
if (message.assetUrl !== "") {
|
|
1654
|
+
obj.assetUrl = message.assetUrl;
|
|
1655
|
+
}
|
|
1656
|
+
if (message.thumbnailUrl !== "") {
|
|
1657
|
+
obj.thumbnailUrl = message.thumbnailUrl;
|
|
1658
|
+
}
|
|
1568
1659
|
return obj;
|
|
1569
1660
|
},
|
|
1570
1661
|
create(base) {
|
|
@@ -1825,15 +1916,10 @@ class GrpcWebImpl {
|
|
|
1825
1916
|
const request = Object.assign(Object.assign({}, _request), methodDesc.requestType);
|
|
1826
1917
|
const maybeCombinedMetadata = metadata && this.options.metadata
|
|
1827
1918
|
? new browser_headers_1.BrowserHeaders(Object.assign(Object.assign({}, (_a = this.options) === null || _a === void 0 ? void 0 : _a.metadata.headersMap), metadata === null || metadata === void 0 ? void 0 : metadata.headersMap))
|
|
1828
|
-
: metadata
|
|
1919
|
+
: metadata !== null && metadata !== void 0 ? metadata : this.options.metadata;
|
|
1829
1920
|
return new Promise((resolve, reject) => {
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
host: this.host,
|
|
1833
|
-
metadata: maybeCombinedMetadata,
|
|
1834
|
-
transport: this.options.transport,
|
|
1835
|
-
debug: this.options.debug,
|
|
1836
|
-
onEnd: function (response) {
|
|
1921
|
+
var _a;
|
|
1922
|
+
const client = grpc_web_1.grpc.unary(methodDesc, Object.assign(Object.assign({ request, host: this.host, metadata: maybeCombinedMetadata !== null && maybeCombinedMetadata !== void 0 ? maybeCombinedMetadata : {} }, (this.options.transport !== undefined ? { transport: this.options.transport } : {})), { debug: (_a = this.options.debug) !== null && _a !== void 0 ? _a : false, onEnd: function (response) {
|
|
1837
1923
|
if (response.status === grpc_web_1.grpc.Code.OK) {
|
|
1838
1924
|
resolve(response.message.toObject());
|
|
1839
1925
|
}
|
|
@@ -1841,35 +1927,28 @@ class GrpcWebImpl {
|
|
|
1841
1927
|
const err = new GrpcWebError(response.statusMessage, response.status, response.trailers);
|
|
1842
1928
|
reject(err);
|
|
1843
1929
|
}
|
|
1844
|
-
}
|
|
1845
|
-
});
|
|
1846
|
-
const abortHandler = () => {
|
|
1847
|
-
client.close();
|
|
1848
|
-
reject(new Error("Aborted"));
|
|
1849
|
-
};
|
|
1930
|
+
} }));
|
|
1850
1931
|
if (abortSignal) {
|
|
1851
|
-
abortSignal.addEventListener("abort",
|
|
1932
|
+
abortSignal.addEventListener("abort", () => {
|
|
1933
|
+
client.close();
|
|
1934
|
+
reject(abortSignal.reason);
|
|
1935
|
+
});
|
|
1852
1936
|
}
|
|
1853
1937
|
});
|
|
1854
1938
|
}
|
|
1855
1939
|
invoke(methodDesc, _request, metadata, abortSignal) {
|
|
1856
|
-
var _a;
|
|
1857
|
-
const upStreamCodes = this.options.upStreamRetryCodes
|
|
1940
|
+
var _a, _b, _c;
|
|
1941
|
+
const upStreamCodes = (_a = this.options.upStreamRetryCodes) !== null && _a !== void 0 ? _a : [];
|
|
1858
1942
|
const DEFAULT_TIMEOUT_TIME = 3000;
|
|
1859
1943
|
const request = Object.assign(Object.assign({}, _request), methodDesc.requestType);
|
|
1944
|
+
const transport = (_b = this.options.streamingTransport) !== null && _b !== void 0 ? _b : this.options.transport;
|
|
1860
1945
|
const maybeCombinedMetadata = metadata && this.options.metadata
|
|
1861
|
-
? new browser_headers_1.BrowserHeaders(Object.assign(Object.assign({}, (
|
|
1862
|
-
: metadata
|
|
1946
|
+
? new browser_headers_1.BrowserHeaders(Object.assign(Object.assign({}, (_c = this.options) === null || _c === void 0 ? void 0 : _c.metadata.headersMap), metadata === null || metadata === void 0 ? void 0 : metadata.headersMap))
|
|
1947
|
+
: metadata !== null && metadata !== void 0 ? metadata : this.options.metadata;
|
|
1863
1948
|
return new rxjs_1.Observable((observer) => {
|
|
1864
|
-
const upStream = (
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
request,
|
|
1868
|
-
transport: this.options.streamingTransport || this.options.transport,
|
|
1869
|
-
metadata: maybeCombinedMetadata,
|
|
1870
|
-
debug: this.options.debug,
|
|
1871
|
-
onMessage: (next) => observer.next(next),
|
|
1872
|
-
onEnd: (code, message, trailers) => {
|
|
1949
|
+
const upStream = () => {
|
|
1950
|
+
var _a;
|
|
1951
|
+
const client = grpc_web_1.grpc.invoke(methodDesc, Object.assign(Object.assign({ host: this.host, request }, (transport !== undefined ? { transport } : {})), { metadata: maybeCombinedMetadata !== null && maybeCombinedMetadata !== void 0 ? maybeCombinedMetadata : {}, debug: (_a = this.options.debug) !== null && _a !== void 0 ? _a : false, onMessage: (next) => observer.next(next), onEnd: (code, message, trailers) => {
|
|
1873
1952
|
if (code === 0) {
|
|
1874
1953
|
observer.complete();
|
|
1875
1954
|
}
|
|
@@ -1882,65 +1961,54 @@ class GrpcWebImpl {
|
|
|
1882
1961
|
err.metadata = trailers;
|
|
1883
1962
|
observer.error(err);
|
|
1884
1963
|
}
|
|
1885
|
-
}
|
|
1886
|
-
});
|
|
1887
|
-
observer.add(() => {
|
|
1888
|
-
if (!observer.closed) {
|
|
1889
|
-
return client.close();
|
|
1890
|
-
}
|
|
1891
|
-
});
|
|
1892
|
-
const abortHandler = () => {
|
|
1893
|
-
observer.error("Aborted");
|
|
1894
|
-
client.close();
|
|
1895
|
-
};
|
|
1964
|
+
} }));
|
|
1896
1965
|
if (abortSignal) {
|
|
1897
|
-
|
|
1966
|
+
const abort = () => {
|
|
1967
|
+
observer.error(abortSignal.reason);
|
|
1968
|
+
client.close();
|
|
1969
|
+
};
|
|
1970
|
+
abortSignal.addEventListener("abort", abort);
|
|
1971
|
+
observer.add(() => {
|
|
1972
|
+
if (abortSignal.aborted) {
|
|
1973
|
+
return;
|
|
1974
|
+
}
|
|
1975
|
+
abortSignal.removeEventListener("abort", abort);
|
|
1976
|
+
client.close();
|
|
1977
|
+
});
|
|
1898
1978
|
}
|
|
1899
|
-
|
|
1979
|
+
else {
|
|
1980
|
+
observer.add(() => client.close());
|
|
1981
|
+
}
|
|
1982
|
+
};
|
|
1900
1983
|
upStream();
|
|
1901
1984
|
}).pipe((0, operators_1.share)());
|
|
1902
1985
|
}
|
|
1903
1986
|
}
|
|
1904
1987
|
exports.GrpcWebImpl = GrpcWebImpl;
|
|
1905
|
-
var tsProtoGlobalThis = (() => {
|
|
1906
|
-
if (typeof globalThis !== "undefined") {
|
|
1907
|
-
return globalThis;
|
|
1908
|
-
}
|
|
1909
|
-
if (typeof self !== "undefined") {
|
|
1910
|
-
return self;
|
|
1911
|
-
}
|
|
1912
|
-
if (typeof window !== "undefined") {
|
|
1913
|
-
return window;
|
|
1914
|
-
}
|
|
1915
|
-
if (typeof global !== "undefined") {
|
|
1916
|
-
return global;
|
|
1917
|
-
}
|
|
1918
|
-
throw "Unable to locate global object";
|
|
1919
|
-
})();
|
|
1920
1988
|
function toTimestamp(date) {
|
|
1921
1989
|
const seconds = date.getTime() / 1000;
|
|
1922
1990
|
const nanos = (date.getTime() % 1000) * 1000000;
|
|
1923
1991
|
return { seconds, nanos };
|
|
1924
1992
|
}
|
|
1925
1993
|
function fromTimestamp(t) {
|
|
1926
|
-
let millis = t.seconds * 1000;
|
|
1927
|
-
millis += t.nanos / 1000000;
|
|
1928
|
-
return new Date(millis);
|
|
1994
|
+
let millis = (t.seconds || 0) * 1000;
|
|
1995
|
+
millis += (t.nanos || 0) / 1000000;
|
|
1996
|
+
return new globalThis.Date(millis);
|
|
1929
1997
|
}
|
|
1930
1998
|
function fromJsonTimestamp(o) {
|
|
1931
|
-
if (o instanceof Date) {
|
|
1999
|
+
if (o instanceof globalThis.Date) {
|
|
1932
2000
|
return o;
|
|
1933
2001
|
}
|
|
1934
2002
|
else if (typeof o === "string") {
|
|
1935
|
-
return new Date(o);
|
|
2003
|
+
return new globalThis.Date(o);
|
|
1936
2004
|
}
|
|
1937
2005
|
else {
|
|
1938
2006
|
return fromTimestamp(timestamp_1.Timestamp.fromJSON(o));
|
|
1939
2007
|
}
|
|
1940
2008
|
}
|
|
1941
2009
|
function longToNumber(long) {
|
|
1942
|
-
if (long.gt(Number.MAX_SAFE_INTEGER)) {
|
|
1943
|
-
throw new
|
|
2010
|
+
if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
|
|
2011
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
1944
2012
|
}
|
|
1945
2013
|
return long.toNumber();
|
|
1946
2014
|
}
|
|
@@ -1951,7 +2019,7 @@ if (minimal_1.default.util.Long !== long_1.default) {
|
|
|
1951
2019
|
function isSet(value) {
|
|
1952
2020
|
return value !== null && value !== undefined;
|
|
1953
2021
|
}
|
|
1954
|
-
class GrpcWebError extends
|
|
2022
|
+
class GrpcWebError extends globalThis.Error {
|
|
1955
2023
|
constructor(message, code, metadata) {
|
|
1956
2024
|
super(message);
|
|
1957
2025
|
this.code = code;
|