@lazycatcloud/sdk 0.1.295 → 0.1.296
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 +115 -112
- 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 +195 -162
- 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/extentions/app_common.d.ts.map +1 -1
- package/dist/extentions/app_common.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 +7 -3
- package/dist/localdevice/device.d.ts.map +1 -1
- package/dist/localdevice/device.js +46 -46
- 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/localdevice/remote-input-method.d.ts +2 -3
- package/dist/localdevice/remote-input-method.d.ts.map +1 -1
- package/dist/localdevice/remote-input-method.js +52 -69
- package/dist/localdevice/remote-input-method.js.map +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 +358 -270
- 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/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
package/dist/common/filetrans.js
CHANGED
|
@@ -276,19 +276,19 @@ exports.FileLocation = {
|
|
|
276
276
|
const tag = reader.uint32();
|
|
277
277
|
switch (tag >>> 3) {
|
|
278
278
|
case 1:
|
|
279
|
-
if (tag
|
|
279
|
+
if (tag !== 8) {
|
|
280
280
|
break;
|
|
281
281
|
}
|
|
282
282
|
message.locationType = reader.int32();
|
|
283
283
|
continue;
|
|
284
284
|
case 2:
|
|
285
|
-
if (tag
|
|
285
|
+
if (tag !== 18) {
|
|
286
286
|
break;
|
|
287
287
|
}
|
|
288
288
|
message.value = reader.string();
|
|
289
289
|
continue;
|
|
290
290
|
}
|
|
291
|
-
if ((tag & 7)
|
|
291
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
292
292
|
break;
|
|
293
293
|
}
|
|
294
294
|
reader.skipType(tag & 7);
|
|
@@ -298,14 +298,17 @@ exports.FileLocation = {
|
|
|
298
298
|
fromJSON(object) {
|
|
299
299
|
return {
|
|
300
300
|
locationType: isSet(object.locationType) ? fileLocation_FileLocationTypeFromJSON(object.locationType) : 0,
|
|
301
|
-
value: isSet(object.value) ? String(object.value) : "",
|
|
301
|
+
value: isSet(object.value) ? globalThis.String(object.value) : "",
|
|
302
302
|
};
|
|
303
303
|
},
|
|
304
304
|
toJSON(message) {
|
|
305
305
|
const obj = {};
|
|
306
|
-
message.locationType !==
|
|
307
|
-
|
|
308
|
-
|
|
306
|
+
if (message.locationType !== 0) {
|
|
307
|
+
obj.locationType = fileLocation_FileLocationTypeToJSON(message.locationType);
|
|
308
|
+
}
|
|
309
|
+
if (message.value !== "") {
|
|
310
|
+
obj.value = message.value;
|
|
311
|
+
}
|
|
309
312
|
return obj;
|
|
310
313
|
},
|
|
311
314
|
create(base) {
|
|
@@ -337,13 +340,13 @@ exports.MetaInfo = {
|
|
|
337
340
|
const tag = reader.uint32();
|
|
338
341
|
switch (tag >>> 3) {
|
|
339
342
|
case 1:
|
|
340
|
-
if (tag
|
|
343
|
+
if (tag !== 10) {
|
|
341
344
|
break;
|
|
342
345
|
}
|
|
343
346
|
message.metaInfo = reader.string();
|
|
344
347
|
continue;
|
|
345
348
|
}
|
|
346
|
-
if ((tag & 7)
|
|
349
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
347
350
|
break;
|
|
348
351
|
}
|
|
349
352
|
reader.skipType(tag & 7);
|
|
@@ -351,11 +354,13 @@ exports.MetaInfo = {
|
|
|
351
354
|
return message;
|
|
352
355
|
},
|
|
353
356
|
fromJSON(object) {
|
|
354
|
-
return { metaInfo: isSet(object.metaInfo) ? String(object.metaInfo) : "" };
|
|
357
|
+
return { metaInfo: isSet(object.metaInfo) ? globalThis.String(object.metaInfo) : "" };
|
|
355
358
|
},
|
|
356
359
|
toJSON(message) {
|
|
357
360
|
const obj = {};
|
|
358
|
-
message.metaInfo !==
|
|
361
|
+
if (message.metaInfo !== "") {
|
|
362
|
+
obj.metaInfo = message.metaInfo;
|
|
363
|
+
}
|
|
359
364
|
return obj;
|
|
360
365
|
},
|
|
361
366
|
create(base) {
|
|
@@ -416,55 +421,55 @@ exports.TaskCreateRequest = {
|
|
|
416
421
|
const tag = reader.uint32();
|
|
417
422
|
switch (tag >>> 3) {
|
|
418
423
|
case 1:
|
|
419
|
-
if (tag
|
|
424
|
+
if (tag !== 10) {
|
|
420
425
|
break;
|
|
421
426
|
}
|
|
422
427
|
message.src = exports.FileLocation.decode(reader, reader.uint32());
|
|
423
428
|
continue;
|
|
424
429
|
case 2:
|
|
425
|
-
if (tag
|
|
430
|
+
if (tag !== 18) {
|
|
426
431
|
break;
|
|
427
432
|
}
|
|
428
433
|
message.dst = exports.FileLocation.decode(reader, reader.uint32());
|
|
429
434
|
continue;
|
|
430
435
|
case 3:
|
|
431
|
-
if (tag
|
|
436
|
+
if (tag !== 26) {
|
|
432
437
|
break;
|
|
433
438
|
}
|
|
434
439
|
message.name = reader.string();
|
|
435
440
|
continue;
|
|
436
441
|
case 4:
|
|
437
|
-
if (tag
|
|
442
|
+
if (tag !== 34) {
|
|
438
443
|
break;
|
|
439
444
|
}
|
|
440
445
|
message.queueId = exports.TaskQueueID.decode(reader, reader.uint32());
|
|
441
446
|
continue;
|
|
442
447
|
case 5:
|
|
443
|
-
if (tag
|
|
448
|
+
if (tag !== 40) {
|
|
444
449
|
break;
|
|
445
450
|
}
|
|
446
451
|
message.status = reader.int32();
|
|
447
452
|
continue;
|
|
448
453
|
case 6:
|
|
449
|
-
if (tag
|
|
454
|
+
if (tag !== 50) {
|
|
450
455
|
break;
|
|
451
456
|
}
|
|
452
457
|
message.metaInfo = exports.MetaInfo.decode(reader, reader.uint32());
|
|
453
458
|
continue;
|
|
454
459
|
case 7:
|
|
455
|
-
if (tag
|
|
460
|
+
if (tag !== 58) {
|
|
456
461
|
break;
|
|
457
462
|
}
|
|
458
463
|
message.uid = reader.string();
|
|
459
464
|
continue;
|
|
460
465
|
case 8:
|
|
461
|
-
if (tag
|
|
466
|
+
if (tag !== 66) {
|
|
462
467
|
break;
|
|
463
468
|
}
|
|
464
469
|
message.uidSrc = reader.string();
|
|
465
470
|
continue;
|
|
466
471
|
}
|
|
467
|
-
if ((tag & 7)
|
|
472
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
468
473
|
break;
|
|
469
474
|
}
|
|
470
475
|
reader.skipType(tag & 7);
|
|
@@ -475,25 +480,40 @@ exports.TaskCreateRequest = {
|
|
|
475
480
|
return {
|
|
476
481
|
src: isSet(object.src) ? exports.FileLocation.fromJSON(object.src) : undefined,
|
|
477
482
|
dst: isSet(object.dst) ? exports.FileLocation.fromJSON(object.dst) : undefined,
|
|
478
|
-
name: isSet(object.name) ? String(object.name) : "",
|
|
483
|
+
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
479
484
|
queueId: isSet(object.queueId) ? exports.TaskQueueID.fromJSON(object.queueId) : undefined,
|
|
480
485
|
status: isSet(object.status) ? taskStatusFromJSON(object.status) : undefined,
|
|
481
486
|
metaInfo: isSet(object.metaInfo) ? exports.MetaInfo.fromJSON(object.metaInfo) : undefined,
|
|
482
|
-
uid: isSet(object.uid) ? String(object.uid) : undefined,
|
|
483
|
-
uidSrc: isSet(object.uidSrc) ? String(object.uidSrc) : undefined,
|
|
487
|
+
uid: isSet(object.uid) ? globalThis.String(object.uid) : undefined,
|
|
488
|
+
uidSrc: isSet(object.uidSrc) ? globalThis.String(object.uidSrc) : undefined,
|
|
484
489
|
};
|
|
485
490
|
},
|
|
486
491
|
toJSON(message) {
|
|
487
492
|
const obj = {};
|
|
488
|
-
message.src !== undefined
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
message.
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
493
|
+
if (message.src !== undefined) {
|
|
494
|
+
obj.src = exports.FileLocation.toJSON(message.src);
|
|
495
|
+
}
|
|
496
|
+
if (message.dst !== undefined) {
|
|
497
|
+
obj.dst = exports.FileLocation.toJSON(message.dst);
|
|
498
|
+
}
|
|
499
|
+
if (message.name !== "") {
|
|
500
|
+
obj.name = message.name;
|
|
501
|
+
}
|
|
502
|
+
if (message.queueId !== undefined) {
|
|
503
|
+
obj.queueId = exports.TaskQueueID.toJSON(message.queueId);
|
|
504
|
+
}
|
|
505
|
+
if (message.status !== undefined) {
|
|
506
|
+
obj.status = taskStatusToJSON(message.status);
|
|
507
|
+
}
|
|
508
|
+
if (message.metaInfo !== undefined) {
|
|
509
|
+
obj.metaInfo = exports.MetaInfo.toJSON(message.metaInfo);
|
|
510
|
+
}
|
|
511
|
+
if (message.uid !== undefined) {
|
|
512
|
+
obj.uid = message.uid;
|
|
513
|
+
}
|
|
514
|
+
if (message.uidSrc !== undefined) {
|
|
515
|
+
obj.uidSrc = message.uidSrc;
|
|
516
|
+
}
|
|
497
517
|
return obj;
|
|
498
518
|
},
|
|
499
519
|
create(base) {
|
|
@@ -535,13 +555,13 @@ exports.TaskCreateRequests = {
|
|
|
535
555
|
const tag = reader.uint32();
|
|
536
556
|
switch (tag >>> 3) {
|
|
537
557
|
case 1:
|
|
538
|
-
if (tag
|
|
558
|
+
if (tag !== 10) {
|
|
539
559
|
break;
|
|
540
560
|
}
|
|
541
561
|
message.Requests.push(exports.TaskCreateRequest.decode(reader, reader.uint32()));
|
|
542
562
|
continue;
|
|
543
563
|
}
|
|
544
|
-
if ((tag & 7)
|
|
564
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
545
565
|
break;
|
|
546
566
|
}
|
|
547
567
|
reader.skipType(tag & 7);
|
|
@@ -550,16 +570,16 @@ exports.TaskCreateRequests = {
|
|
|
550
570
|
},
|
|
551
571
|
fromJSON(object) {
|
|
552
572
|
return {
|
|
553
|
-
Requests: Array.isArray(object === null || object === void 0 ? void 0 : object.Requests)
|
|
573
|
+
Requests: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.Requests)
|
|
574
|
+
? object.Requests.map((e) => exports.TaskCreateRequest.fromJSON(e))
|
|
575
|
+
: [],
|
|
554
576
|
};
|
|
555
577
|
},
|
|
556
578
|
toJSON(message) {
|
|
579
|
+
var _a;
|
|
557
580
|
const obj = {};
|
|
558
|
-
if (message.Requests) {
|
|
559
|
-
obj.Requests = message.Requests.map((e) =>
|
|
560
|
-
}
|
|
561
|
-
else {
|
|
562
|
-
obj.Requests = [];
|
|
581
|
+
if ((_a = message.Requests) === null || _a === void 0 ? void 0 : _a.length) {
|
|
582
|
+
obj.Requests = message.Requests.map((e) => exports.TaskCreateRequest.toJSON(e));
|
|
563
583
|
}
|
|
564
584
|
return obj;
|
|
565
585
|
},
|
|
@@ -591,13 +611,13 @@ exports.TaskID = {
|
|
|
591
611
|
const tag = reader.uint32();
|
|
592
612
|
switch (tag >>> 3) {
|
|
593
613
|
case 1:
|
|
594
|
-
if (tag
|
|
614
|
+
if (tag !== 10) {
|
|
595
615
|
break;
|
|
596
616
|
}
|
|
597
617
|
message.id = reader.string();
|
|
598
618
|
continue;
|
|
599
619
|
}
|
|
600
|
-
if ((tag & 7)
|
|
620
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
601
621
|
break;
|
|
602
622
|
}
|
|
603
623
|
reader.skipType(tag & 7);
|
|
@@ -605,11 +625,13 @@ exports.TaskID = {
|
|
|
605
625
|
return message;
|
|
606
626
|
},
|
|
607
627
|
fromJSON(object) {
|
|
608
|
-
return { id: isSet(object.id) ? String(object.id) : "" };
|
|
628
|
+
return { id: isSet(object.id) ? globalThis.String(object.id) : "" };
|
|
609
629
|
},
|
|
610
630
|
toJSON(message) {
|
|
611
631
|
const obj = {};
|
|
612
|
-
message.id !==
|
|
632
|
+
if (message.id !== "") {
|
|
633
|
+
obj.id = message.id;
|
|
634
|
+
}
|
|
613
635
|
return obj;
|
|
614
636
|
},
|
|
615
637
|
create(base) {
|
|
@@ -646,25 +668,25 @@ exports.TransmitInfo = {
|
|
|
646
668
|
const tag = reader.uint32();
|
|
647
669
|
switch (tag >>> 3) {
|
|
648
670
|
case 1:
|
|
649
|
-
if (tag
|
|
671
|
+
if (tag !== 8) {
|
|
650
672
|
break;
|
|
651
673
|
}
|
|
652
674
|
message.total = longToNumber(reader.int64());
|
|
653
675
|
continue;
|
|
654
676
|
case 2:
|
|
655
|
-
if (tag
|
|
677
|
+
if (tag !== 16) {
|
|
656
678
|
break;
|
|
657
679
|
}
|
|
658
680
|
message.transmitted = longToNumber(reader.int64());
|
|
659
681
|
continue;
|
|
660
682
|
case 3:
|
|
661
|
-
if (tag
|
|
683
|
+
if (tag !== 24) {
|
|
662
684
|
break;
|
|
663
685
|
}
|
|
664
686
|
message.speed = longToNumber(reader.int64());
|
|
665
687
|
continue;
|
|
666
688
|
}
|
|
667
|
-
if ((tag & 7)
|
|
689
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
668
690
|
break;
|
|
669
691
|
}
|
|
670
692
|
reader.skipType(tag & 7);
|
|
@@ -673,16 +695,22 @@ exports.TransmitInfo = {
|
|
|
673
695
|
},
|
|
674
696
|
fromJSON(object) {
|
|
675
697
|
return {
|
|
676
|
-
total: isSet(object.total) ? Number(object.total) : 0,
|
|
677
|
-
transmitted: isSet(object.transmitted) ? Number(object.transmitted) : 0,
|
|
678
|
-
speed: isSet(object.speed) ? Number(object.speed) : 0,
|
|
698
|
+
total: isSet(object.total) ? globalThis.Number(object.total) : 0,
|
|
699
|
+
transmitted: isSet(object.transmitted) ? globalThis.Number(object.transmitted) : 0,
|
|
700
|
+
speed: isSet(object.speed) ? globalThis.Number(object.speed) : 0,
|
|
679
701
|
};
|
|
680
702
|
},
|
|
681
703
|
toJSON(message) {
|
|
682
704
|
const obj = {};
|
|
683
|
-
message.total !==
|
|
684
|
-
|
|
685
|
-
|
|
705
|
+
if (message.total !== 0) {
|
|
706
|
+
obj.total = Math.round(message.total);
|
|
707
|
+
}
|
|
708
|
+
if (message.transmitted !== 0) {
|
|
709
|
+
obj.transmitted = Math.round(message.transmitted);
|
|
710
|
+
}
|
|
711
|
+
if (message.speed !== 0) {
|
|
712
|
+
obj.speed = Math.round(message.speed);
|
|
713
|
+
}
|
|
686
714
|
return obj;
|
|
687
715
|
},
|
|
688
716
|
create(base) {
|
|
@@ -757,73 +785,73 @@ exports.Task = {
|
|
|
757
785
|
const tag = reader.uint32();
|
|
758
786
|
switch (tag >>> 3) {
|
|
759
787
|
case 1:
|
|
760
|
-
if (tag
|
|
788
|
+
if (tag !== 10) {
|
|
761
789
|
break;
|
|
762
790
|
}
|
|
763
791
|
message.id = exports.TaskID.decode(reader, reader.uint32());
|
|
764
792
|
continue;
|
|
765
793
|
case 2:
|
|
766
|
-
if (tag
|
|
794
|
+
if (tag !== 18) {
|
|
767
795
|
break;
|
|
768
796
|
}
|
|
769
797
|
message.src = exports.FileLocation.decode(reader, reader.uint32());
|
|
770
798
|
continue;
|
|
771
799
|
case 3:
|
|
772
|
-
if (tag
|
|
800
|
+
if (tag !== 26) {
|
|
773
801
|
break;
|
|
774
802
|
}
|
|
775
803
|
message.dst = exports.FileLocation.decode(reader, reader.uint32());
|
|
776
804
|
continue;
|
|
777
805
|
case 4:
|
|
778
|
-
if (tag
|
|
806
|
+
if (tag !== 34) {
|
|
779
807
|
break;
|
|
780
808
|
}
|
|
781
809
|
message.fileName = reader.string();
|
|
782
810
|
continue;
|
|
783
811
|
case 5:
|
|
784
|
-
if (tag
|
|
812
|
+
if (tag !== 42) {
|
|
785
813
|
break;
|
|
786
814
|
}
|
|
787
815
|
message.mimeType = reader.string();
|
|
788
816
|
continue;
|
|
789
817
|
case 6:
|
|
790
|
-
if (tag
|
|
818
|
+
if (tag !== 48) {
|
|
791
819
|
break;
|
|
792
820
|
}
|
|
793
821
|
message.status = reader.int32();
|
|
794
822
|
continue;
|
|
795
823
|
case 7:
|
|
796
|
-
if (tag
|
|
824
|
+
if (tag !== 56) {
|
|
797
825
|
break;
|
|
798
826
|
}
|
|
799
827
|
message.size = longToNumber(reader.int64());
|
|
800
828
|
continue;
|
|
801
829
|
case 8:
|
|
802
|
-
if (tag
|
|
830
|
+
if (tag !== 66) {
|
|
803
831
|
break;
|
|
804
832
|
}
|
|
805
833
|
message.info = exports.TransmitInfo.decode(reader, reader.uint32());
|
|
806
834
|
continue;
|
|
807
835
|
case 9:
|
|
808
|
-
if (tag
|
|
836
|
+
if (tag !== 74) {
|
|
809
837
|
break;
|
|
810
838
|
}
|
|
811
839
|
message.createdAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
812
840
|
continue;
|
|
813
841
|
case 10:
|
|
814
|
-
if (tag
|
|
842
|
+
if (tag !== 82) {
|
|
815
843
|
break;
|
|
816
844
|
}
|
|
817
845
|
message.updatedAt = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
818
846
|
continue;
|
|
819
847
|
case 11:
|
|
820
|
-
if (tag
|
|
848
|
+
if (tag !== 90) {
|
|
821
849
|
break;
|
|
822
850
|
}
|
|
823
851
|
message.metaInfo = exports.MetaInfo.decode(reader, reader.uint32());
|
|
824
852
|
continue;
|
|
825
853
|
}
|
|
826
|
-
if ((tag & 7)
|
|
854
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
827
855
|
break;
|
|
828
856
|
}
|
|
829
857
|
reader.skipType(tag & 7);
|
|
@@ -835,10 +863,10 @@ exports.Task = {
|
|
|
835
863
|
id: isSet(object.id) ? exports.TaskID.fromJSON(object.id) : undefined,
|
|
836
864
|
src: isSet(object.src) ? exports.FileLocation.fromJSON(object.src) : undefined,
|
|
837
865
|
dst: isSet(object.dst) ? exports.FileLocation.fromJSON(object.dst) : undefined,
|
|
838
|
-
fileName: isSet(object.fileName) ? String(object.fileName) : "",
|
|
839
|
-
mimeType: isSet(object.mimeType) ? String(object.mimeType) : "",
|
|
866
|
+
fileName: isSet(object.fileName) ? globalThis.String(object.fileName) : "",
|
|
867
|
+
mimeType: isSet(object.mimeType) ? globalThis.String(object.mimeType) : "",
|
|
840
868
|
status: isSet(object.status) ? taskStatusFromJSON(object.status) : 0,
|
|
841
|
-
size: isSet(object.size) ? Number(object.size) : undefined,
|
|
869
|
+
size: isSet(object.size) ? globalThis.Number(object.size) : undefined,
|
|
842
870
|
info: isSet(object.info) ? exports.TransmitInfo.fromJSON(object.info) : undefined,
|
|
843
871
|
createdAt: isSet(object.createdAt) ? fromJsonTimestamp(object.createdAt) : undefined,
|
|
844
872
|
updatedAt: isSet(object.updatedAt) ? fromJsonTimestamp(object.updatedAt) : undefined,
|
|
@@ -847,17 +875,39 @@ exports.Task = {
|
|
|
847
875
|
},
|
|
848
876
|
toJSON(message) {
|
|
849
877
|
const obj = {};
|
|
850
|
-
message.id !== undefined
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
message.
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
message.
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
message.
|
|
860
|
-
|
|
878
|
+
if (message.id !== undefined) {
|
|
879
|
+
obj.id = exports.TaskID.toJSON(message.id);
|
|
880
|
+
}
|
|
881
|
+
if (message.src !== undefined) {
|
|
882
|
+
obj.src = exports.FileLocation.toJSON(message.src);
|
|
883
|
+
}
|
|
884
|
+
if (message.dst !== undefined) {
|
|
885
|
+
obj.dst = exports.FileLocation.toJSON(message.dst);
|
|
886
|
+
}
|
|
887
|
+
if (message.fileName !== "") {
|
|
888
|
+
obj.fileName = message.fileName;
|
|
889
|
+
}
|
|
890
|
+
if (message.mimeType !== "") {
|
|
891
|
+
obj.mimeType = message.mimeType;
|
|
892
|
+
}
|
|
893
|
+
if (message.status !== 0) {
|
|
894
|
+
obj.status = taskStatusToJSON(message.status);
|
|
895
|
+
}
|
|
896
|
+
if (message.size !== undefined) {
|
|
897
|
+
obj.size = Math.round(message.size);
|
|
898
|
+
}
|
|
899
|
+
if (message.info !== undefined) {
|
|
900
|
+
obj.info = exports.TransmitInfo.toJSON(message.info);
|
|
901
|
+
}
|
|
902
|
+
if (message.createdAt !== undefined) {
|
|
903
|
+
obj.createdAt = message.createdAt.toISOString();
|
|
904
|
+
}
|
|
905
|
+
if (message.updatedAt !== undefined) {
|
|
906
|
+
obj.updatedAt = message.updatedAt.toISOString();
|
|
907
|
+
}
|
|
908
|
+
if (message.metaInfo !== undefined) {
|
|
909
|
+
obj.metaInfo = exports.MetaInfo.toJSON(message.metaInfo);
|
|
910
|
+
}
|
|
861
911
|
return obj;
|
|
862
912
|
},
|
|
863
913
|
create(base) {
|
|
@@ -908,25 +958,25 @@ exports.TaskQueueConfig = {
|
|
|
908
958
|
const tag = reader.uint32();
|
|
909
959
|
switch (tag >>> 3) {
|
|
910
960
|
case 1:
|
|
911
|
-
if (tag
|
|
961
|
+
if (tag !== 8) {
|
|
912
962
|
break;
|
|
913
963
|
}
|
|
914
964
|
message.maxParallel = longToNumber(reader.int64());
|
|
915
965
|
continue;
|
|
916
966
|
case 2:
|
|
917
|
-
if (tag
|
|
967
|
+
if (tag !== 16) {
|
|
918
968
|
break;
|
|
919
969
|
}
|
|
920
970
|
message.maxRatePerFile = longToNumber(reader.int64());
|
|
921
971
|
continue;
|
|
922
972
|
case 3:
|
|
923
|
-
if (tag
|
|
973
|
+
if (tag !== 24) {
|
|
924
974
|
break;
|
|
925
975
|
}
|
|
926
976
|
message.maxRate = longToNumber(reader.int64());
|
|
927
977
|
continue;
|
|
928
978
|
}
|
|
929
|
-
if ((tag & 7)
|
|
979
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
930
980
|
break;
|
|
931
981
|
}
|
|
932
982
|
reader.skipType(tag & 7);
|
|
@@ -935,16 +985,22 @@ exports.TaskQueueConfig = {
|
|
|
935
985
|
},
|
|
936
986
|
fromJSON(object) {
|
|
937
987
|
return {
|
|
938
|
-
maxParallel: isSet(object.maxParallel) ? Number(object.maxParallel) : 0,
|
|
939
|
-
maxRatePerFile: isSet(object.maxRatePerFile) ? Number(object.maxRatePerFile) : 0,
|
|
940
|
-
maxRate: isSet(object.maxRate) ? Number(object.maxRate) : 0,
|
|
988
|
+
maxParallel: isSet(object.maxParallel) ? globalThis.Number(object.maxParallel) : 0,
|
|
989
|
+
maxRatePerFile: isSet(object.maxRatePerFile) ? globalThis.Number(object.maxRatePerFile) : 0,
|
|
990
|
+
maxRate: isSet(object.maxRate) ? globalThis.Number(object.maxRate) : 0,
|
|
941
991
|
};
|
|
942
992
|
},
|
|
943
993
|
toJSON(message) {
|
|
944
994
|
const obj = {};
|
|
945
|
-
message.maxParallel !==
|
|
946
|
-
|
|
947
|
-
|
|
995
|
+
if (message.maxParallel !== 0) {
|
|
996
|
+
obj.maxParallel = Math.round(message.maxParallel);
|
|
997
|
+
}
|
|
998
|
+
if (message.maxRatePerFile !== 0) {
|
|
999
|
+
obj.maxRatePerFile = Math.round(message.maxRatePerFile);
|
|
1000
|
+
}
|
|
1001
|
+
if (message.maxRate !== 0) {
|
|
1002
|
+
obj.maxRate = Math.round(message.maxRate);
|
|
1003
|
+
}
|
|
948
1004
|
return obj;
|
|
949
1005
|
},
|
|
950
1006
|
create(base) {
|
|
@@ -980,19 +1036,19 @@ exports.TaskQueueID = {
|
|
|
980
1036
|
const tag = reader.uint32();
|
|
981
1037
|
switch (tag >>> 3) {
|
|
982
1038
|
case 1:
|
|
983
|
-
if (tag
|
|
1039
|
+
if (tag !== 10) {
|
|
984
1040
|
break;
|
|
985
1041
|
}
|
|
986
1042
|
message.id = reader.string();
|
|
987
1043
|
continue;
|
|
988
1044
|
case 2:
|
|
989
|
-
if (tag
|
|
1045
|
+
if (tag !== 18) {
|
|
990
1046
|
break;
|
|
991
1047
|
}
|
|
992
1048
|
message.uid = reader.string();
|
|
993
1049
|
continue;
|
|
994
1050
|
}
|
|
995
|
-
if ((tag & 7)
|
|
1051
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
996
1052
|
break;
|
|
997
1053
|
}
|
|
998
1054
|
reader.skipType(tag & 7);
|
|
@@ -1000,12 +1056,19 @@ exports.TaskQueueID = {
|
|
|
1000
1056
|
return message;
|
|
1001
1057
|
},
|
|
1002
1058
|
fromJSON(object) {
|
|
1003
|
-
return {
|
|
1059
|
+
return {
|
|
1060
|
+
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
1061
|
+
uid: isSet(object.uid) ? globalThis.String(object.uid) : undefined,
|
|
1062
|
+
};
|
|
1004
1063
|
},
|
|
1005
1064
|
toJSON(message) {
|
|
1006
1065
|
const obj = {};
|
|
1007
|
-
message.id !==
|
|
1008
|
-
|
|
1066
|
+
if (message.id !== "") {
|
|
1067
|
+
obj.id = message.id;
|
|
1068
|
+
}
|
|
1069
|
+
if (message.uid !== undefined) {
|
|
1070
|
+
obj.uid = message.uid;
|
|
1071
|
+
}
|
|
1009
1072
|
return obj;
|
|
1010
1073
|
},
|
|
1011
1074
|
create(base) {
|
|
@@ -1040,19 +1103,19 @@ exports.TaskQueueConfigReq = {
|
|
|
1040
1103
|
const tag = reader.uint32();
|
|
1041
1104
|
switch (tag >>> 3) {
|
|
1042
1105
|
case 1:
|
|
1043
|
-
if (tag
|
|
1106
|
+
if (tag !== 10) {
|
|
1044
1107
|
break;
|
|
1045
1108
|
}
|
|
1046
1109
|
message.id = exports.TaskQueueID.decode(reader, reader.uint32());
|
|
1047
1110
|
continue;
|
|
1048
1111
|
case 2:
|
|
1049
|
-
if (tag
|
|
1112
|
+
if (tag !== 18) {
|
|
1050
1113
|
break;
|
|
1051
1114
|
}
|
|
1052
1115
|
message.config = exports.TaskQueueConfig.decode(reader, reader.uint32());
|
|
1053
1116
|
continue;
|
|
1054
1117
|
}
|
|
1055
|
-
if ((tag & 7)
|
|
1118
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1056
1119
|
break;
|
|
1057
1120
|
}
|
|
1058
1121
|
reader.skipType(tag & 7);
|
|
@@ -1067,8 +1130,12 @@ exports.TaskQueueConfigReq = {
|
|
|
1067
1130
|
},
|
|
1068
1131
|
toJSON(message) {
|
|
1069
1132
|
const obj = {};
|
|
1070
|
-
message.id !== undefined
|
|
1071
|
-
|
|
1133
|
+
if (message.id !== undefined) {
|
|
1134
|
+
obj.id = exports.TaskQueueID.toJSON(message.id);
|
|
1135
|
+
}
|
|
1136
|
+
if (message.config !== undefined) {
|
|
1137
|
+
obj.config = exports.TaskQueueConfig.toJSON(message.config);
|
|
1138
|
+
}
|
|
1072
1139
|
return obj;
|
|
1073
1140
|
},
|
|
1074
1141
|
create(base) {
|
|
@@ -1107,25 +1174,25 @@ exports.TaskQueue = {
|
|
|
1107
1174
|
const tag = reader.uint32();
|
|
1108
1175
|
switch (tag >>> 3) {
|
|
1109
1176
|
case 1:
|
|
1110
|
-
if (tag
|
|
1177
|
+
if (tag !== 10) {
|
|
1111
1178
|
break;
|
|
1112
1179
|
}
|
|
1113
1180
|
message.id = exports.TaskQueueID.decode(reader, reader.uint32());
|
|
1114
1181
|
continue;
|
|
1115
1182
|
case 2:
|
|
1116
|
-
if (tag
|
|
1183
|
+
if (tag !== 16) {
|
|
1117
1184
|
break;
|
|
1118
1185
|
}
|
|
1119
1186
|
message.status = reader.int32();
|
|
1120
1187
|
continue;
|
|
1121
1188
|
case 3:
|
|
1122
|
-
if (tag
|
|
1189
|
+
if (tag !== 26) {
|
|
1123
1190
|
break;
|
|
1124
1191
|
}
|
|
1125
1192
|
message.tasks.push(exports.Task.decode(reader, reader.uint32()));
|
|
1126
1193
|
continue;
|
|
1127
1194
|
}
|
|
1128
|
-
if ((tag & 7)
|
|
1195
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1129
1196
|
break;
|
|
1130
1197
|
}
|
|
1131
1198
|
reader.skipType(tag & 7);
|
|
@@ -1136,18 +1203,20 @@ exports.TaskQueue = {
|
|
|
1136
1203
|
return {
|
|
1137
1204
|
id: isSet(object.id) ? exports.TaskQueueID.fromJSON(object.id) : undefined,
|
|
1138
1205
|
status: isSet(object.status) ? queueStatusFromJSON(object.status) : 0,
|
|
1139
|
-
tasks: Array.isArray(object === null || object === void 0 ? void 0 : object.tasks) ? object.tasks.map((e) => exports.Task.fromJSON(e)) : [],
|
|
1206
|
+
tasks: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.tasks) ? object.tasks.map((e) => exports.Task.fromJSON(e)) : [],
|
|
1140
1207
|
};
|
|
1141
1208
|
},
|
|
1142
1209
|
toJSON(message) {
|
|
1210
|
+
var _a;
|
|
1143
1211
|
const obj = {};
|
|
1144
|
-
message.id !== undefined
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1212
|
+
if (message.id !== undefined) {
|
|
1213
|
+
obj.id = exports.TaskQueueID.toJSON(message.id);
|
|
1214
|
+
}
|
|
1215
|
+
if (message.status !== 0) {
|
|
1216
|
+
obj.status = queueStatusToJSON(message.status);
|
|
1148
1217
|
}
|
|
1149
|
-
|
|
1150
|
-
obj.tasks =
|
|
1218
|
+
if ((_a = message.tasks) === null || _a === void 0 ? void 0 : _a.length) {
|
|
1219
|
+
obj.tasks = message.tasks.map((e) => exports.Task.toJSON(e));
|
|
1151
1220
|
}
|
|
1152
1221
|
return obj;
|
|
1153
1222
|
},
|
|
@@ -1187,25 +1256,25 @@ exports.FileTaskQueueResp = {
|
|
|
1187
1256
|
const tag = reader.uint32();
|
|
1188
1257
|
switch (tag >>> 3) {
|
|
1189
1258
|
case 1:
|
|
1190
|
-
if (tag
|
|
1259
|
+
if (tag !== 10) {
|
|
1191
1260
|
break;
|
|
1192
1261
|
}
|
|
1193
1262
|
message.id = exports.TaskQueueID.decode(reader, reader.uint32());
|
|
1194
1263
|
continue;
|
|
1195
1264
|
case 2:
|
|
1196
|
-
if (tag
|
|
1265
|
+
if (tag !== 16) {
|
|
1197
1266
|
break;
|
|
1198
1267
|
}
|
|
1199
1268
|
message.status = reader.int32();
|
|
1200
1269
|
continue;
|
|
1201
1270
|
case 3:
|
|
1202
|
-
if (tag
|
|
1271
|
+
if (tag !== 26) {
|
|
1203
1272
|
break;
|
|
1204
1273
|
}
|
|
1205
1274
|
message.tasks.push(exports.Task.decode(reader, reader.uint32()));
|
|
1206
1275
|
continue;
|
|
1207
1276
|
}
|
|
1208
|
-
if ((tag & 7)
|
|
1277
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1209
1278
|
break;
|
|
1210
1279
|
}
|
|
1211
1280
|
reader.skipType(tag & 7);
|
|
@@ -1216,18 +1285,20 @@ exports.FileTaskQueueResp = {
|
|
|
1216
1285
|
return {
|
|
1217
1286
|
id: isSet(object.id) ? exports.TaskQueueID.fromJSON(object.id) : undefined,
|
|
1218
1287
|
status: isSet(object.status) ? queueStatusFromJSON(object.status) : 0,
|
|
1219
|
-
tasks: Array.isArray(object === null || object === void 0 ? void 0 : object.tasks) ? object.tasks.map((e) => exports.Task.fromJSON(e)) : [],
|
|
1288
|
+
tasks: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.tasks) ? object.tasks.map((e) => exports.Task.fromJSON(e)) : [],
|
|
1220
1289
|
};
|
|
1221
1290
|
},
|
|
1222
1291
|
toJSON(message) {
|
|
1292
|
+
var _a;
|
|
1223
1293
|
const obj = {};
|
|
1224
|
-
message.id !== undefined
|
|
1225
|
-
|
|
1226
|
-
if (message.tasks) {
|
|
1227
|
-
obj.tasks = message.tasks.map((e) => e ? exports.Task.toJSON(e) : undefined);
|
|
1294
|
+
if (message.id !== undefined) {
|
|
1295
|
+
obj.id = exports.TaskQueueID.toJSON(message.id);
|
|
1228
1296
|
}
|
|
1229
|
-
|
|
1230
|
-
obj.
|
|
1297
|
+
if (message.status !== 0) {
|
|
1298
|
+
obj.status = queueStatusToJSON(message.status);
|
|
1299
|
+
}
|
|
1300
|
+
if ((_a = message.tasks) === null || _a === void 0 ? void 0 : _a.length) {
|
|
1301
|
+
obj.tasks = message.tasks.map((e) => exports.Task.toJSON(e));
|
|
1231
1302
|
}
|
|
1232
1303
|
return obj;
|
|
1233
1304
|
},
|
|
@@ -1269,17 +1340,17 @@ exports.TaskQueueQueryReq = {
|
|
|
1269
1340
|
const tag = reader.uint32();
|
|
1270
1341
|
switch (tag >>> 3) {
|
|
1271
1342
|
case 1:
|
|
1272
|
-
if (tag
|
|
1343
|
+
if (tag !== 10) {
|
|
1273
1344
|
break;
|
|
1274
1345
|
}
|
|
1275
1346
|
message.id = exports.TaskQueueID.decode(reader, reader.uint32());
|
|
1276
1347
|
continue;
|
|
1277
1348
|
case 2:
|
|
1278
|
-
if (tag
|
|
1349
|
+
if (tag === 16) {
|
|
1279
1350
|
message.status.push(reader.int32());
|
|
1280
1351
|
continue;
|
|
1281
1352
|
}
|
|
1282
|
-
if (tag
|
|
1353
|
+
if (tag === 18) {
|
|
1283
1354
|
const end2 = reader.uint32() + reader.pos;
|
|
1284
1355
|
while (reader.pos < end2) {
|
|
1285
1356
|
message.status.push(reader.int32());
|
|
@@ -1288,13 +1359,13 @@ exports.TaskQueueQueryReq = {
|
|
|
1288
1359
|
}
|
|
1289
1360
|
break;
|
|
1290
1361
|
case 3:
|
|
1291
|
-
if (tag
|
|
1362
|
+
if (tag !== 24) {
|
|
1292
1363
|
break;
|
|
1293
1364
|
}
|
|
1294
1365
|
message.order = reader.int32();
|
|
1295
1366
|
continue;
|
|
1296
1367
|
}
|
|
1297
|
-
if ((tag & 7)
|
|
1368
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1298
1369
|
break;
|
|
1299
1370
|
}
|
|
1300
1371
|
reader.skipType(tag & 7);
|
|
@@ -1304,20 +1375,22 @@ exports.TaskQueueQueryReq = {
|
|
|
1304
1375
|
fromJSON(object) {
|
|
1305
1376
|
return {
|
|
1306
1377
|
id: isSet(object.id) ? exports.TaskQueueID.fromJSON(object.id) : undefined,
|
|
1307
|
-
status: Array.isArray(object === null || object === void 0 ? void 0 : object.status) ? object.status.map((e) => taskStatusFromJSON(e)) : [],
|
|
1378
|
+
status: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.status) ? object.status.map((e) => taskStatusFromJSON(e)) : [],
|
|
1308
1379
|
order: isSet(object.order) ? orderFromJSON(object.order) : undefined,
|
|
1309
1380
|
};
|
|
1310
1381
|
},
|
|
1311
1382
|
toJSON(message) {
|
|
1383
|
+
var _a;
|
|
1312
1384
|
const obj = {};
|
|
1313
|
-
message.id !== undefined
|
|
1314
|
-
|
|
1385
|
+
if (message.id !== undefined) {
|
|
1386
|
+
obj.id = exports.TaskQueueID.toJSON(message.id);
|
|
1387
|
+
}
|
|
1388
|
+
if ((_a = message.status) === null || _a === void 0 ? void 0 : _a.length) {
|
|
1315
1389
|
obj.status = message.status.map((e) => taskStatusToJSON(e));
|
|
1316
1390
|
}
|
|
1317
|
-
|
|
1318
|
-
obj.
|
|
1391
|
+
if (message.order !== undefined) {
|
|
1392
|
+
obj.order = orderToJSON(message.order);
|
|
1319
1393
|
}
|
|
1320
|
-
message.order !== undefined && (obj.order = message.order !== undefined ? orderToJSON(message.order) : undefined);
|
|
1321
1394
|
return obj;
|
|
1322
1395
|
},
|
|
1323
1396
|
create(base) {
|
|
@@ -1350,13 +1423,13 @@ exports.TaskQueueStatisticsReq = {
|
|
|
1350
1423
|
const tag = reader.uint32();
|
|
1351
1424
|
switch (tag >>> 3) {
|
|
1352
1425
|
case 1:
|
|
1353
|
-
if (tag
|
|
1426
|
+
if (tag !== 10) {
|
|
1354
1427
|
break;
|
|
1355
1428
|
}
|
|
1356
1429
|
message.id.push(exports.TaskQueueID.decode(reader, reader.uint32()));
|
|
1357
1430
|
continue;
|
|
1358
1431
|
}
|
|
1359
|
-
if ((tag & 7)
|
|
1432
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1360
1433
|
break;
|
|
1361
1434
|
}
|
|
1362
1435
|
reader.skipType(tag & 7);
|
|
@@ -1364,15 +1437,13 @@ exports.TaskQueueStatisticsReq = {
|
|
|
1364
1437
|
return message;
|
|
1365
1438
|
},
|
|
1366
1439
|
fromJSON(object) {
|
|
1367
|
-
return { id: Array.isArray(object === null || object === void 0 ? void 0 : object.id) ? object.id.map((e) => exports.TaskQueueID.fromJSON(e)) : [] };
|
|
1440
|
+
return { id: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.id) ? object.id.map((e) => exports.TaskQueueID.fromJSON(e)) : [] };
|
|
1368
1441
|
},
|
|
1369
1442
|
toJSON(message) {
|
|
1443
|
+
var _a;
|
|
1370
1444
|
const obj = {};
|
|
1371
|
-
if (message.id) {
|
|
1372
|
-
obj.id = message.id.map((e) =>
|
|
1373
|
-
}
|
|
1374
|
-
else {
|
|
1375
|
-
obj.id = [];
|
|
1445
|
+
if ((_a = message.id) === null || _a === void 0 ? void 0 : _a.length) {
|
|
1446
|
+
obj.id = message.id.map((e) => exports.TaskQueueID.toJSON(e));
|
|
1376
1447
|
}
|
|
1377
1448
|
return obj;
|
|
1378
1449
|
},
|
|
@@ -1416,37 +1487,37 @@ exports.TaskQueueStatistics = {
|
|
|
1416
1487
|
const tag = reader.uint32();
|
|
1417
1488
|
switch (tag >>> 3) {
|
|
1418
1489
|
case 1:
|
|
1419
|
-
if (tag
|
|
1490
|
+
if (tag !== 8) {
|
|
1420
1491
|
break;
|
|
1421
1492
|
}
|
|
1422
1493
|
message.pending = longToNumber(reader.int64());
|
|
1423
1494
|
continue;
|
|
1424
1495
|
case 2:
|
|
1425
|
-
if (tag
|
|
1496
|
+
if (tag !== 16) {
|
|
1426
1497
|
break;
|
|
1427
1498
|
}
|
|
1428
1499
|
message.transmitting = longToNumber(reader.int64());
|
|
1429
1500
|
continue;
|
|
1430
1501
|
case 3:
|
|
1431
|
-
if (tag
|
|
1502
|
+
if (tag !== 24) {
|
|
1432
1503
|
break;
|
|
1433
1504
|
}
|
|
1434
1505
|
message.paused = longToNumber(reader.int64());
|
|
1435
1506
|
continue;
|
|
1436
1507
|
case 4:
|
|
1437
|
-
if (tag
|
|
1508
|
+
if (tag !== 32) {
|
|
1438
1509
|
break;
|
|
1439
1510
|
}
|
|
1440
1511
|
message.finished = longToNumber(reader.int64());
|
|
1441
1512
|
continue;
|
|
1442
1513
|
case 5:
|
|
1443
|
-
if (tag
|
|
1514
|
+
if (tag !== 40) {
|
|
1444
1515
|
break;
|
|
1445
1516
|
}
|
|
1446
1517
|
message.failed = longToNumber(reader.int64());
|
|
1447
1518
|
continue;
|
|
1448
1519
|
}
|
|
1449
|
-
if ((tag & 7)
|
|
1520
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1450
1521
|
break;
|
|
1451
1522
|
}
|
|
1452
1523
|
reader.skipType(tag & 7);
|
|
@@ -1455,20 +1526,30 @@ exports.TaskQueueStatistics = {
|
|
|
1455
1526
|
},
|
|
1456
1527
|
fromJSON(object) {
|
|
1457
1528
|
return {
|
|
1458
|
-
pending: isSet(object.pending) ? Number(object.pending) : 0,
|
|
1459
|
-
transmitting: isSet(object.transmitting) ? Number(object.transmitting) : 0,
|
|
1460
|
-
paused: isSet(object.paused) ? Number(object.paused) : 0,
|
|
1461
|
-
finished: isSet(object.finished) ? Number(object.finished) : 0,
|
|
1462
|
-
failed: isSet(object.failed) ? Number(object.failed) : 0,
|
|
1529
|
+
pending: isSet(object.pending) ? globalThis.Number(object.pending) : 0,
|
|
1530
|
+
transmitting: isSet(object.transmitting) ? globalThis.Number(object.transmitting) : 0,
|
|
1531
|
+
paused: isSet(object.paused) ? globalThis.Number(object.paused) : 0,
|
|
1532
|
+
finished: isSet(object.finished) ? globalThis.Number(object.finished) : 0,
|
|
1533
|
+
failed: isSet(object.failed) ? globalThis.Number(object.failed) : 0,
|
|
1463
1534
|
};
|
|
1464
1535
|
},
|
|
1465
1536
|
toJSON(message) {
|
|
1466
1537
|
const obj = {};
|
|
1467
|
-
message.pending !==
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
message.
|
|
1471
|
-
|
|
1538
|
+
if (message.pending !== 0) {
|
|
1539
|
+
obj.pending = Math.round(message.pending);
|
|
1540
|
+
}
|
|
1541
|
+
if (message.transmitting !== 0) {
|
|
1542
|
+
obj.transmitting = Math.round(message.transmitting);
|
|
1543
|
+
}
|
|
1544
|
+
if (message.paused !== 0) {
|
|
1545
|
+
obj.paused = Math.round(message.paused);
|
|
1546
|
+
}
|
|
1547
|
+
if (message.finished !== 0) {
|
|
1548
|
+
obj.finished = Math.round(message.finished);
|
|
1549
|
+
}
|
|
1550
|
+
if (message.failed !== 0) {
|
|
1551
|
+
obj.failed = Math.round(message.failed);
|
|
1552
|
+
}
|
|
1472
1553
|
return obj;
|
|
1473
1554
|
},
|
|
1474
1555
|
create(base) {
|
|
@@ -1503,13 +1584,13 @@ exports.TaskQueueStatisticsResp = {
|
|
|
1503
1584
|
const tag = reader.uint32();
|
|
1504
1585
|
switch (tag >>> 3) {
|
|
1505
1586
|
case 1:
|
|
1506
|
-
if (tag
|
|
1587
|
+
if (tag !== 10) {
|
|
1507
1588
|
break;
|
|
1508
1589
|
}
|
|
1509
1590
|
message.statistics.push(exports.TaskQueueStatistics.decode(reader, reader.uint32()));
|
|
1510
1591
|
continue;
|
|
1511
1592
|
}
|
|
1512
|
-
if ((tag & 7)
|
|
1593
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1513
1594
|
break;
|
|
1514
1595
|
}
|
|
1515
1596
|
reader.skipType(tag & 7);
|
|
@@ -1518,18 +1599,16 @@ exports.TaskQueueStatisticsResp = {
|
|
|
1518
1599
|
},
|
|
1519
1600
|
fromJSON(object) {
|
|
1520
1601
|
return {
|
|
1521
|
-
statistics: Array.isArray(object === null || object === void 0 ? void 0 : object.statistics)
|
|
1602
|
+
statistics: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.statistics)
|
|
1522
1603
|
? object.statistics.map((e) => exports.TaskQueueStatistics.fromJSON(e))
|
|
1523
1604
|
: [],
|
|
1524
1605
|
};
|
|
1525
1606
|
},
|
|
1526
1607
|
toJSON(message) {
|
|
1608
|
+
var _a;
|
|
1527
1609
|
const obj = {};
|
|
1528
|
-
if (message.statistics) {
|
|
1529
|
-
obj.statistics = message.statistics.map((e) =>
|
|
1530
|
-
}
|
|
1531
|
-
else {
|
|
1532
|
-
obj.statistics = [];
|
|
1610
|
+
if ((_a = message.statistics) === null || _a === void 0 ? void 0 : _a.length) {
|
|
1611
|
+
obj.statistics = message.statistics.map((e) => exports.TaskQueueStatistics.toJSON(e));
|
|
1533
1612
|
}
|
|
1534
1613
|
return obj;
|
|
1535
1614
|
},
|
|
@@ -1573,37 +1652,37 @@ exports.QueueMessageResp = {
|
|
|
1573
1652
|
const tag = reader.uint32();
|
|
1574
1653
|
switch (tag >>> 3) {
|
|
1575
1654
|
case 1:
|
|
1576
|
-
if (tag
|
|
1655
|
+
if (tag !== 10) {
|
|
1577
1656
|
break;
|
|
1578
1657
|
}
|
|
1579
1658
|
message.id = exports.TaskID.decode(reader, reader.uint32());
|
|
1580
1659
|
continue;
|
|
1581
1660
|
case 2:
|
|
1582
|
-
if (tag
|
|
1661
|
+
if (tag !== 18) {
|
|
1583
1662
|
break;
|
|
1584
1663
|
}
|
|
1585
1664
|
message.task = exports.Task.decode(reader, reader.uint32());
|
|
1586
1665
|
continue;
|
|
1587
1666
|
case 3:
|
|
1588
|
-
if (tag
|
|
1667
|
+
if (tag !== 24) {
|
|
1589
1668
|
break;
|
|
1590
1669
|
}
|
|
1591
1670
|
message.action = reader.int32();
|
|
1592
1671
|
continue;
|
|
1593
1672
|
case 4:
|
|
1594
|
-
if (tag
|
|
1673
|
+
if (tag !== 32) {
|
|
1595
1674
|
break;
|
|
1596
1675
|
}
|
|
1597
1676
|
message.status = reader.int32();
|
|
1598
1677
|
continue;
|
|
1599
1678
|
case 5:
|
|
1600
|
-
if (tag
|
|
1679
|
+
if (tag !== 42) {
|
|
1601
1680
|
break;
|
|
1602
1681
|
}
|
|
1603
1682
|
message.errorMessage = reader.string();
|
|
1604
1683
|
continue;
|
|
1605
1684
|
}
|
|
1606
|
-
if ((tag & 7)
|
|
1685
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1607
1686
|
break;
|
|
1608
1687
|
}
|
|
1609
1688
|
reader.skipType(tag & 7);
|
|
@@ -1616,16 +1695,26 @@ exports.QueueMessageResp = {
|
|
|
1616
1695
|
task: isSet(object.task) ? exports.Task.fromJSON(object.task) : undefined,
|
|
1617
1696
|
action: isSet(object.action) ? msgActionFromJSON(object.action) : 0,
|
|
1618
1697
|
status: isSet(object.status) ? taskStatusFromJSON(object.status) : 0,
|
|
1619
|
-
errorMessage: isSet(object.errorMessage) ? String(object.errorMessage) : undefined,
|
|
1698
|
+
errorMessage: isSet(object.errorMessage) ? globalThis.String(object.errorMessage) : undefined,
|
|
1620
1699
|
};
|
|
1621
1700
|
},
|
|
1622
1701
|
toJSON(message) {
|
|
1623
1702
|
const obj = {};
|
|
1624
|
-
message.id !== undefined
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
message.
|
|
1628
|
-
|
|
1703
|
+
if (message.id !== undefined) {
|
|
1704
|
+
obj.id = exports.TaskID.toJSON(message.id);
|
|
1705
|
+
}
|
|
1706
|
+
if (message.task !== undefined) {
|
|
1707
|
+
obj.task = exports.Task.toJSON(message.task);
|
|
1708
|
+
}
|
|
1709
|
+
if (message.action !== 0) {
|
|
1710
|
+
obj.action = msgActionToJSON(message.action);
|
|
1711
|
+
}
|
|
1712
|
+
if (message.status !== 0) {
|
|
1713
|
+
obj.status = taskStatusToJSON(message.status);
|
|
1714
|
+
}
|
|
1715
|
+
if (message.errorMessage !== undefined) {
|
|
1716
|
+
obj.errorMessage = message.errorMessage;
|
|
1717
|
+
}
|
|
1629
1718
|
return obj;
|
|
1630
1719
|
},
|
|
1631
1720
|
create(base) {
|
|
@@ -1675,43 +1764,43 @@ exports.MiniMessageResp = {
|
|
|
1675
1764
|
const tag = reader.uint32();
|
|
1676
1765
|
switch (tag >>> 3) {
|
|
1677
1766
|
case 1:
|
|
1678
|
-
if (tag
|
|
1767
|
+
if (tag !== 10) {
|
|
1679
1768
|
break;
|
|
1680
1769
|
}
|
|
1681
1770
|
message.id = exports.TaskID.decode(reader, reader.uint32());
|
|
1682
1771
|
continue;
|
|
1683
1772
|
case 2:
|
|
1684
|
-
if (tag
|
|
1773
|
+
if (tag !== 16) {
|
|
1685
1774
|
break;
|
|
1686
1775
|
}
|
|
1687
1776
|
message.action = reader.int32();
|
|
1688
1777
|
continue;
|
|
1689
1778
|
case 3:
|
|
1690
|
-
if (tag
|
|
1779
|
+
if (tag !== 24) {
|
|
1691
1780
|
break;
|
|
1692
1781
|
}
|
|
1693
1782
|
message.status = reader.int32();
|
|
1694
1783
|
continue;
|
|
1695
1784
|
case 4:
|
|
1696
|
-
if (tag
|
|
1785
|
+
if (tag !== 34) {
|
|
1697
1786
|
break;
|
|
1698
1787
|
}
|
|
1699
1788
|
message.info = exports.TransmitInfo.decode(reader, reader.uint32());
|
|
1700
1789
|
continue;
|
|
1701
1790
|
case 5:
|
|
1702
|
-
if (tag
|
|
1791
|
+
if (tag !== 42) {
|
|
1703
1792
|
break;
|
|
1704
1793
|
}
|
|
1705
1794
|
message.task = exports.Task.decode(reader, reader.uint32());
|
|
1706
1795
|
continue;
|
|
1707
1796
|
case 6:
|
|
1708
|
-
if (tag
|
|
1797
|
+
if (tag !== 50) {
|
|
1709
1798
|
break;
|
|
1710
1799
|
}
|
|
1711
1800
|
message.errorMessage = reader.string();
|
|
1712
1801
|
continue;
|
|
1713
1802
|
}
|
|
1714
|
-
if ((tag & 7)
|
|
1803
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1715
1804
|
break;
|
|
1716
1805
|
}
|
|
1717
1806
|
reader.skipType(tag & 7);
|
|
@@ -1725,17 +1814,29 @@ exports.MiniMessageResp = {
|
|
|
1725
1814
|
status: isSet(object.status) ? taskStatusFromJSON(object.status) : 0,
|
|
1726
1815
|
info: isSet(object.info) ? exports.TransmitInfo.fromJSON(object.info) : undefined,
|
|
1727
1816
|
task: isSet(object.task) ? exports.Task.fromJSON(object.task) : undefined,
|
|
1728
|
-
errorMessage: isSet(object.errorMessage) ? String(object.errorMessage) : undefined,
|
|
1817
|
+
errorMessage: isSet(object.errorMessage) ? globalThis.String(object.errorMessage) : undefined,
|
|
1729
1818
|
};
|
|
1730
1819
|
},
|
|
1731
1820
|
toJSON(message) {
|
|
1732
1821
|
const obj = {};
|
|
1733
|
-
message.id !== undefined
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1822
|
+
if (message.id !== undefined) {
|
|
1823
|
+
obj.id = exports.TaskID.toJSON(message.id);
|
|
1824
|
+
}
|
|
1825
|
+
if (message.action !== 0) {
|
|
1826
|
+
obj.action = msgActionToJSON(message.action);
|
|
1827
|
+
}
|
|
1828
|
+
if (message.status !== 0) {
|
|
1829
|
+
obj.status = taskStatusToJSON(message.status);
|
|
1830
|
+
}
|
|
1831
|
+
if (message.info !== undefined) {
|
|
1832
|
+
obj.info = exports.TransmitInfo.toJSON(message.info);
|
|
1833
|
+
}
|
|
1834
|
+
if (message.task !== undefined) {
|
|
1835
|
+
obj.task = exports.Task.toJSON(message.task);
|
|
1836
|
+
}
|
|
1837
|
+
if (message.errorMessage !== undefined) {
|
|
1838
|
+
obj.errorMessage = message.errorMessage;
|
|
1839
|
+
}
|
|
1739
1840
|
return obj;
|
|
1740
1841
|
},
|
|
1741
1842
|
create(base) {
|
|
@@ -1773,13 +1874,13 @@ exports.TaskQueueListResp = {
|
|
|
1773
1874
|
const tag = reader.uint32();
|
|
1774
1875
|
switch (tag >>> 3) {
|
|
1775
1876
|
case 1:
|
|
1776
|
-
if (tag
|
|
1877
|
+
if (tag !== 10) {
|
|
1777
1878
|
break;
|
|
1778
1879
|
}
|
|
1779
1880
|
message.ids.push(exports.TaskQueueID.decode(reader, reader.uint32()));
|
|
1780
1881
|
continue;
|
|
1781
1882
|
}
|
|
1782
|
-
if ((tag & 7)
|
|
1883
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1783
1884
|
break;
|
|
1784
1885
|
}
|
|
1785
1886
|
reader.skipType(tag & 7);
|
|
@@ -1787,15 +1888,13 @@ exports.TaskQueueListResp = {
|
|
|
1787
1888
|
return message;
|
|
1788
1889
|
},
|
|
1789
1890
|
fromJSON(object) {
|
|
1790
|
-
return { ids: Array.isArray(object === null || object === void 0 ? void 0 : object.ids) ? object.ids.map((e) => exports.TaskQueueID.fromJSON(e)) : [] };
|
|
1891
|
+
return { ids: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.ids) ? object.ids.map((e) => exports.TaskQueueID.fromJSON(e)) : [] };
|
|
1791
1892
|
},
|
|
1792
1893
|
toJSON(message) {
|
|
1894
|
+
var _a;
|
|
1793
1895
|
const obj = {};
|
|
1794
|
-
if (message.ids) {
|
|
1795
|
-
obj.ids = message.ids.map((e) =>
|
|
1796
|
-
}
|
|
1797
|
-
else {
|
|
1798
|
-
obj.ids = [];
|
|
1896
|
+
if ((_a = message.ids) === null || _a === void 0 ? void 0 : _a.length) {
|
|
1897
|
+
obj.ids = message.ids.map((e) => exports.TaskQueueID.toJSON(e));
|
|
1799
1898
|
}
|
|
1800
1899
|
return obj;
|
|
1801
1900
|
},
|
|
@@ -1833,25 +1932,25 @@ exports.TaskFolderReq = {
|
|
|
1833
1932
|
const tag = reader.uint32();
|
|
1834
1933
|
switch (tag >>> 3) {
|
|
1835
1934
|
case 1:
|
|
1836
|
-
if (tag
|
|
1935
|
+
if (tag !== 10) {
|
|
1837
1936
|
break;
|
|
1838
1937
|
}
|
|
1839
1938
|
message.id = exports.TaskQueueID.decode(reader, reader.uint32());
|
|
1840
1939
|
continue;
|
|
1841
1940
|
case 2:
|
|
1842
|
-
if (tag
|
|
1941
|
+
if (tag !== 18) {
|
|
1843
1942
|
break;
|
|
1844
1943
|
}
|
|
1845
1944
|
message.src = reader.string();
|
|
1846
1945
|
continue;
|
|
1847
1946
|
case 3:
|
|
1848
|
-
if (tag
|
|
1947
|
+
if (tag !== 26) {
|
|
1849
1948
|
break;
|
|
1850
1949
|
}
|
|
1851
1950
|
message.dst = reader.string();
|
|
1852
1951
|
continue;
|
|
1853
1952
|
}
|
|
1854
|
-
if ((tag & 7)
|
|
1953
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
1855
1954
|
break;
|
|
1856
1955
|
}
|
|
1857
1956
|
reader.skipType(tag & 7);
|
|
@@ -1861,15 +1960,21 @@ exports.TaskFolderReq = {
|
|
|
1861
1960
|
fromJSON(object) {
|
|
1862
1961
|
return {
|
|
1863
1962
|
id: isSet(object.id) ? exports.TaskQueueID.fromJSON(object.id) : undefined,
|
|
1864
|
-
src: isSet(object.src) ? String(object.src) : "",
|
|
1865
|
-
dst: isSet(object.dst) ? String(object.dst) : "",
|
|
1963
|
+
src: isSet(object.src) ? globalThis.String(object.src) : "",
|
|
1964
|
+
dst: isSet(object.dst) ? globalThis.String(object.dst) : "",
|
|
1866
1965
|
};
|
|
1867
1966
|
},
|
|
1868
1967
|
toJSON(message) {
|
|
1869
1968
|
const obj = {};
|
|
1870
|
-
message.id !== undefined
|
|
1871
|
-
|
|
1872
|
-
|
|
1969
|
+
if (message.id !== undefined) {
|
|
1970
|
+
obj.id = exports.TaskQueueID.toJSON(message.id);
|
|
1971
|
+
}
|
|
1972
|
+
if (message.src !== "") {
|
|
1973
|
+
obj.src = message.src;
|
|
1974
|
+
}
|
|
1975
|
+
if (message.dst !== "") {
|
|
1976
|
+
obj.dst = message.dst;
|
|
1977
|
+
}
|
|
1873
1978
|
return obj;
|
|
1874
1979
|
},
|
|
1875
1980
|
create(base) {
|
|
@@ -2338,15 +2443,10 @@ class GrpcWebImpl {
|
|
|
2338
2443
|
const request = Object.assign(Object.assign({}, _request), methodDesc.requestType);
|
|
2339
2444
|
const maybeCombinedMetadata = metadata && this.options.metadata
|
|
2340
2445
|
? 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))
|
|
2341
|
-
: metadata
|
|
2446
|
+
: metadata !== null && metadata !== void 0 ? metadata : this.options.metadata;
|
|
2342
2447
|
return new Promise((resolve, reject) => {
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
host: this.host,
|
|
2346
|
-
metadata: maybeCombinedMetadata,
|
|
2347
|
-
transport: this.options.transport,
|
|
2348
|
-
debug: this.options.debug,
|
|
2349
|
-
onEnd: function (response) {
|
|
2448
|
+
var _a;
|
|
2449
|
+
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) {
|
|
2350
2450
|
if (response.status === grpc_web_1.grpc.Code.OK) {
|
|
2351
2451
|
resolve(response.message.toObject());
|
|
2352
2452
|
}
|
|
@@ -2354,35 +2454,28 @@ class GrpcWebImpl {
|
|
|
2354
2454
|
const err = new GrpcWebError(response.statusMessage, response.status, response.trailers);
|
|
2355
2455
|
reject(err);
|
|
2356
2456
|
}
|
|
2357
|
-
}
|
|
2358
|
-
});
|
|
2359
|
-
const abortHandler = () => {
|
|
2360
|
-
client.close();
|
|
2361
|
-
reject(new Error("Aborted"));
|
|
2362
|
-
};
|
|
2457
|
+
} }));
|
|
2363
2458
|
if (abortSignal) {
|
|
2364
|
-
abortSignal.addEventListener("abort",
|
|
2459
|
+
abortSignal.addEventListener("abort", () => {
|
|
2460
|
+
client.close();
|
|
2461
|
+
reject(abortSignal.reason);
|
|
2462
|
+
});
|
|
2365
2463
|
}
|
|
2366
2464
|
});
|
|
2367
2465
|
}
|
|
2368
2466
|
invoke(methodDesc, _request, metadata, abortSignal) {
|
|
2369
|
-
var _a;
|
|
2370
|
-
const upStreamCodes = this.options.upStreamRetryCodes
|
|
2467
|
+
var _a, _b, _c;
|
|
2468
|
+
const upStreamCodes = (_a = this.options.upStreamRetryCodes) !== null && _a !== void 0 ? _a : [];
|
|
2371
2469
|
const DEFAULT_TIMEOUT_TIME = 3000;
|
|
2372
2470
|
const request = Object.assign(Object.assign({}, _request), methodDesc.requestType);
|
|
2471
|
+
const transport = (_b = this.options.streamingTransport) !== null && _b !== void 0 ? _b : this.options.transport;
|
|
2373
2472
|
const maybeCombinedMetadata = metadata && this.options.metadata
|
|
2374
|
-
? new browser_headers_1.BrowserHeaders(Object.assign(Object.assign({}, (
|
|
2375
|
-
: metadata
|
|
2473
|
+
? 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))
|
|
2474
|
+
: metadata !== null && metadata !== void 0 ? metadata : this.options.metadata;
|
|
2376
2475
|
return new rxjs_1.Observable((observer) => {
|
|
2377
|
-
const upStream = (
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
request,
|
|
2381
|
-
transport: this.options.streamingTransport || this.options.transport,
|
|
2382
|
-
metadata: maybeCombinedMetadata,
|
|
2383
|
-
debug: this.options.debug,
|
|
2384
|
-
onMessage: (next) => observer.next(next),
|
|
2385
|
-
onEnd: (code, message, trailers) => {
|
|
2476
|
+
const upStream = () => {
|
|
2477
|
+
var _a;
|
|
2478
|
+
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) => {
|
|
2386
2479
|
if (code === 0) {
|
|
2387
2480
|
observer.complete();
|
|
2388
2481
|
}
|
|
@@ -2395,65 +2488,54 @@ class GrpcWebImpl {
|
|
|
2395
2488
|
err.metadata = trailers;
|
|
2396
2489
|
observer.error(err);
|
|
2397
2490
|
}
|
|
2398
|
-
}
|
|
2399
|
-
});
|
|
2400
|
-
observer.add(() => {
|
|
2401
|
-
if (!observer.closed) {
|
|
2402
|
-
return client.close();
|
|
2403
|
-
}
|
|
2404
|
-
});
|
|
2405
|
-
const abortHandler = () => {
|
|
2406
|
-
observer.error("Aborted");
|
|
2407
|
-
client.close();
|
|
2408
|
-
};
|
|
2491
|
+
} }));
|
|
2409
2492
|
if (abortSignal) {
|
|
2410
|
-
|
|
2493
|
+
const abort = () => {
|
|
2494
|
+
observer.error(abortSignal.reason);
|
|
2495
|
+
client.close();
|
|
2496
|
+
};
|
|
2497
|
+
abortSignal.addEventListener("abort", abort);
|
|
2498
|
+
observer.add(() => {
|
|
2499
|
+
if (abortSignal.aborted) {
|
|
2500
|
+
return;
|
|
2501
|
+
}
|
|
2502
|
+
abortSignal.removeEventListener("abort", abort);
|
|
2503
|
+
client.close();
|
|
2504
|
+
});
|
|
2411
2505
|
}
|
|
2412
|
-
|
|
2506
|
+
else {
|
|
2507
|
+
observer.add(() => client.close());
|
|
2508
|
+
}
|
|
2509
|
+
};
|
|
2413
2510
|
upStream();
|
|
2414
2511
|
}).pipe((0, operators_1.share)());
|
|
2415
2512
|
}
|
|
2416
2513
|
}
|
|
2417
2514
|
exports.GrpcWebImpl = GrpcWebImpl;
|
|
2418
|
-
var tsProtoGlobalThis = (() => {
|
|
2419
|
-
if (typeof globalThis !== "undefined") {
|
|
2420
|
-
return globalThis;
|
|
2421
|
-
}
|
|
2422
|
-
if (typeof self !== "undefined") {
|
|
2423
|
-
return self;
|
|
2424
|
-
}
|
|
2425
|
-
if (typeof window !== "undefined") {
|
|
2426
|
-
return window;
|
|
2427
|
-
}
|
|
2428
|
-
if (typeof global !== "undefined") {
|
|
2429
|
-
return global;
|
|
2430
|
-
}
|
|
2431
|
-
throw "Unable to locate global object";
|
|
2432
|
-
})();
|
|
2433
2515
|
function toTimestamp(date) {
|
|
2434
2516
|
const seconds = date.getTime() / 1000;
|
|
2435
2517
|
const nanos = (date.getTime() % 1000) * 1000000;
|
|
2436
2518
|
return { seconds, nanos };
|
|
2437
2519
|
}
|
|
2438
2520
|
function fromTimestamp(t) {
|
|
2439
|
-
let millis = t.seconds * 1000;
|
|
2440
|
-
millis += t.nanos / 1000000;
|
|
2441
|
-
return new Date(millis);
|
|
2521
|
+
let millis = (t.seconds || 0) * 1000;
|
|
2522
|
+
millis += (t.nanos || 0) / 1000000;
|
|
2523
|
+
return new globalThis.Date(millis);
|
|
2442
2524
|
}
|
|
2443
2525
|
function fromJsonTimestamp(o) {
|
|
2444
|
-
if (o instanceof Date) {
|
|
2526
|
+
if (o instanceof globalThis.Date) {
|
|
2445
2527
|
return o;
|
|
2446
2528
|
}
|
|
2447
2529
|
else if (typeof o === "string") {
|
|
2448
|
-
return new Date(o);
|
|
2530
|
+
return new globalThis.Date(o);
|
|
2449
2531
|
}
|
|
2450
2532
|
else {
|
|
2451
2533
|
return fromTimestamp(timestamp_1.Timestamp.fromJSON(o));
|
|
2452
2534
|
}
|
|
2453
2535
|
}
|
|
2454
2536
|
function longToNumber(long) {
|
|
2455
|
-
if (long.gt(Number.MAX_SAFE_INTEGER)) {
|
|
2456
|
-
throw new
|
|
2537
|
+
if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
|
|
2538
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
2457
2539
|
}
|
|
2458
2540
|
return long.toNumber();
|
|
2459
2541
|
}
|
|
@@ -2464,7 +2546,7 @@ if (minimal_1.default.util.Long !== long_1.default) {
|
|
|
2464
2546
|
function isSet(value) {
|
|
2465
2547
|
return value !== null && value !== undefined;
|
|
2466
2548
|
}
|
|
2467
|
-
class GrpcWebError extends
|
|
2549
|
+
class GrpcWebError extends globalThis.Error {
|
|
2468
2550
|
constructor(message, code, metadata) {
|
|
2469
2551
|
super(message);
|
|
2470
2552
|
this.code = code;
|