@lazycatcloud/sdk 0.1.363 → 0.1.364

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.
Files changed (79) hide show
  1. package/dist/common/browseronly.js +2 -2
  2. package/dist/common/browseronly.js.map +1 -1
  3. package/dist/common/end_device.js +2 -2
  4. package/dist/common/end_device.js.map +1 -1
  5. package/dist/common/file_handler.js +2 -2
  6. package/dist/common/file_handler.js.map +1 -1
  7. package/dist/common/filetrans.js +2 -2
  8. package/dist/common/filetrans.js.map +1 -1
  9. package/dist/common/media_meta.js +2 -2
  10. package/dist/common/media_meta.js.map +1 -1
  11. package/dist/common/message.js +2 -2
  12. package/dist/common/message.js.map +1 -1
  13. package/dist/common/peripheral_device.d.ts +97 -28
  14. package/dist/common/peripheral_device.d.ts.map +1 -1
  15. package/dist/common/peripheral_device.js +165 -83
  16. package/dist/common/peripheral_device.js.map +1 -1
  17. package/dist/extentions/app_common.d.ts +5 -19
  18. package/dist/extentions/app_common.d.ts.map +1 -1
  19. package/dist/extentions/app_common.js +38 -108
  20. package/dist/extentions/app_common.js.map +1 -1
  21. package/dist/index.d.ts +0 -2
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +0 -2
  24. package/dist/index.js.map +1 -1
  25. package/dist/lanforward/lanforward.d.ts +99 -0
  26. package/dist/lanforward/lanforward.d.ts.map +1 -0
  27. package/dist/lanforward/lanforward.js +254 -0
  28. package/dist/lanforward/lanforward.js.map +1 -0
  29. package/dist/localdevice/remote-control.d.ts +0 -206
  30. package/dist/localdevice/remote-control.d.ts.map +1 -1
  31. package/dist/localdevice/remote-control.js +2 -665
  32. package/dist/localdevice/remote-control.js.map +1 -1
  33. package/dist/package.json +1 -1
  34. package/dist/ssdp/ssdp.d.ts +113 -0
  35. package/dist/ssdp/ssdp.d.ts.map +1 -0
  36. package/dist/ssdp/ssdp.js +292 -0
  37. package/dist/ssdp/ssdp.js.map +1 -0
  38. package/dist/sys/OS_daemon.d.ts +111 -0
  39. package/dist/sys/OS_daemon.d.ts.map +1 -0
  40. package/dist/sys/OS_daemon.js +281 -0
  41. package/dist/sys/OS_daemon.js.map +1 -0
  42. package/dist/sys/OS_snapshot.d.ts +1 -1
  43. package/dist/sys/OS_snapshot.d.ts.map +1 -1
  44. package/dist/sys/OS_snapshot.js +102 -143
  45. package/dist/sys/OS_snapshot.js.map +1 -1
  46. package/dist/sys/OS_upgrader.d.ts +1 -1
  47. package/dist/sys/OS_upgrader.d.ts.map +1 -1
  48. package/dist/sys/OS_upgrader.js +44 -53
  49. package/dist/sys/OS_upgrader.js.map +1 -1
  50. package/dist/sys/box-status.d.ts +572 -0
  51. package/dist/sys/box-status.d.ts.map +1 -0
  52. package/dist/sys/box-status.js +911 -0
  53. package/dist/sys/box-status.js.map +1 -0
  54. package/dist/sys/btled.js +2 -2
  55. package/dist/sys/btled.js.map +1 -1
  56. package/dist/sys/event.js +2 -2
  57. package/dist/sys/event.js.map +1 -1
  58. package/dist/sys/installer.d.ts +1 -1
  59. package/dist/sys/installer.d.ts.map +1 -1
  60. package/dist/sys/installer.js +74 -81
  61. package/dist/sys/installer.js.map +1 -1
  62. package/dist/sys/portal-server/portal-server.d.ts +1 -29
  63. package/dist/sys/portal-server/portal-server.d.ts.map +1 -1
  64. package/dist/sys/portal-server/portal-server.js +200 -383
  65. package/dist/sys/portal-server/portal-server.js.map +1 -1
  66. package/dist/sys/snapd.d.ts +1 -1
  67. package/dist/sys/snapd.d.ts.map +1 -1
  68. package/dist/sys/snapd.js +60 -75
  69. package/dist/sys/snapd.js.map +1 -1
  70. package/dist/tsconfig.tsbuildinfo +1 -1
  71. package/package.json +1 -1
  72. package/dist/sys/osupgrader.d.ts +0 -256
  73. package/dist/sys/osupgrader.d.ts.map +0 -1
  74. package/dist/sys/osupgrader.js +0 -536
  75. package/dist/sys/osupgrader.js.map +0 -1
  76. package/dist/sys/tvos.d.ts +0 -480
  77. package/dist/sys/tvos.d.ts.map +0 -1
  78. package/dist/sys/tvos.js +0 -916
  79. package/dist/sys/tvos.js.map +0 -1
@@ -102,13 +102,13 @@ exports.SnapshotBackupPoolRequest = {
102
102
  const tag = reader.uint32();
103
103
  switch (tag >>> 3) {
104
104
  case 1:
105
- if (tag !== 10) {
105
+ if (tag != 10) {
106
106
  break;
107
107
  }
108
108
  message.PoolName = reader.string();
109
109
  continue;
110
110
  }
111
- if ((tag & 7) === 4 || tag === 0) {
111
+ if ((tag & 7) == 4 || tag == 0) {
112
112
  break;
113
113
  }
114
114
  reader.skipType(tag & 7);
@@ -120,9 +120,7 @@ exports.SnapshotBackupPoolRequest = {
120
120
  },
121
121
  toJSON(message) {
122
122
  const obj = {};
123
- if (message.PoolName !== "") {
124
- obj.PoolName = message.PoolName;
125
- }
123
+ message.PoolName !== undefined && (obj.PoolName = message.PoolName);
126
124
  return obj;
127
125
  },
128
126
  create(base) {
@@ -153,13 +151,13 @@ exports.SnapshotBackupPoolListResponse = {
153
151
  const tag = reader.uint32();
154
152
  switch (tag >>> 3) {
155
153
  case 1:
156
- if (tag !== 10) {
154
+ if (tag != 10) {
157
155
  break;
158
156
  }
159
157
  message.PoolNameList.push(reader.string());
160
158
  continue;
161
159
  }
162
- if ((tag & 7) === 4 || tag === 0) {
160
+ if ((tag & 7) == 4 || tag == 0) {
163
161
  break;
164
162
  }
165
163
  reader.skipType(tag & 7);
@@ -170,10 +168,12 @@ exports.SnapshotBackupPoolListResponse = {
170
168
  return { PoolNameList: Array.isArray(object === null || object === void 0 ? void 0 : object.PoolNameList) ? object.PoolNameList.map((e) => String(e)) : [] };
171
169
  },
172
170
  toJSON(message) {
173
- var _a;
174
171
  const obj = {};
175
- if ((_a = message.PoolNameList) === null || _a === void 0 ? void 0 : _a.length) {
176
- obj.PoolNameList = message.PoolNameList;
172
+ if (message.PoolNameList) {
173
+ obj.PoolNameList = message.PoolNameList.map((e) => e);
174
+ }
175
+ else {
176
+ obj.PoolNameList = [];
177
177
  }
178
178
  return obj;
179
179
  },
@@ -205,13 +205,13 @@ exports.SnapshotDatasetRequest = {
205
205
  const tag = reader.uint32();
206
206
  switch (tag >>> 3) {
207
207
  case 1:
208
- if (tag !== 10) {
208
+ if (tag != 10) {
209
209
  break;
210
210
  }
211
211
  message.DatasetPath = reader.string();
212
212
  continue;
213
213
  }
214
- if ((tag & 7) === 4 || tag === 0) {
214
+ if ((tag & 7) == 4 || tag == 0) {
215
215
  break;
216
216
  }
217
217
  reader.skipType(tag & 7);
@@ -223,9 +223,7 @@ exports.SnapshotDatasetRequest = {
223
223
  },
224
224
  toJSON(message) {
225
225
  const obj = {};
226
- if (message.DatasetPath !== "") {
227
- obj.DatasetPath = message.DatasetPath;
228
- }
226
+ message.DatasetPath !== undefined && (obj.DatasetPath = message.DatasetPath);
229
227
  return obj;
230
228
  },
231
229
  create(base) {
@@ -259,19 +257,19 @@ exports.SnapshotDatasetBackupRequest = {
259
257
  const tag = reader.uint32();
260
258
  switch (tag >>> 3) {
261
259
  case 1:
262
- if (tag !== 10) {
260
+ if (tag != 10) {
263
261
  break;
264
262
  }
265
263
  message.PoolName = reader.string();
266
264
  continue;
267
265
  case 2:
268
- if (tag !== 18) {
266
+ if (tag != 18) {
269
267
  break;
270
268
  }
271
269
  message.DatasetPath = reader.string();
272
270
  continue;
273
271
  }
274
- if ((tag & 7) === 4 || tag === 0) {
272
+ if ((tag & 7) == 4 || tag == 0) {
275
273
  break;
276
274
  }
277
275
  reader.skipType(tag & 7);
@@ -286,12 +284,8 @@ exports.SnapshotDatasetBackupRequest = {
286
284
  },
287
285
  toJSON(message) {
288
286
  const obj = {};
289
- if (message.PoolName !== "") {
290
- obj.PoolName = message.PoolName;
291
- }
292
- if (message.DatasetPath !== "") {
293
- obj.DatasetPath = message.DatasetPath;
294
- }
287
+ message.PoolName !== undefined && (obj.PoolName = message.PoolName);
288
+ message.DatasetPath !== undefined && (obj.DatasetPath = message.DatasetPath);
295
289
  return obj;
296
290
  },
297
291
  create(base) {
@@ -332,31 +326,31 @@ exports.SnapshotDatasetDesc = {
332
326
  const tag = reader.uint32();
333
327
  switch (tag >>> 3) {
334
328
  case 1:
335
- if (tag !== 10) {
329
+ if (tag != 10) {
336
330
  break;
337
331
  }
338
332
  message.Path = reader.string();
339
333
  continue;
340
334
  case 2:
341
- if (tag !== 16) {
335
+ if (tag != 16) {
342
336
  break;
343
337
  }
344
338
  message.BytesUsed = longToNumber(reader.uint64());
345
339
  continue;
346
340
  case 3:
347
- if (tag !== 24) {
341
+ if (tag != 24) {
348
342
  break;
349
343
  }
350
344
  message.SnapshotBytesUsed = longToNumber(reader.uint64());
351
345
  continue;
352
346
  case 4:
353
- if (tag !== 32) {
347
+ if (tag != 32) {
354
348
  break;
355
349
  }
356
350
  message.CreatedAt = longToNumber(reader.uint64());
357
351
  continue;
358
352
  }
359
- if ((tag & 7) === 4 || tag === 0) {
353
+ if ((tag & 7) == 4 || tag == 0) {
360
354
  break;
361
355
  }
362
356
  reader.skipType(tag & 7);
@@ -373,18 +367,10 @@ exports.SnapshotDatasetDesc = {
373
367
  },
374
368
  toJSON(message) {
375
369
  const obj = {};
376
- if (message.Path !== "") {
377
- obj.Path = message.Path;
378
- }
379
- if (message.BytesUsed !== 0) {
380
- obj.BytesUsed = Math.round(message.BytesUsed);
381
- }
382
- if (message.SnapshotBytesUsed !== 0) {
383
- obj.SnapshotBytesUsed = Math.round(message.SnapshotBytesUsed);
384
- }
385
- if (message.CreatedAt !== 0) {
386
- obj.CreatedAt = Math.round(message.CreatedAt);
387
- }
370
+ message.Path !== undefined && (obj.Path = message.Path);
371
+ message.BytesUsed !== undefined && (obj.BytesUsed = Math.round(message.BytesUsed));
372
+ message.SnapshotBytesUsed !== undefined && (obj.SnapshotBytesUsed = Math.round(message.SnapshotBytesUsed));
373
+ message.CreatedAt !== undefined && (obj.CreatedAt = Math.round(message.CreatedAt));
388
374
  return obj;
389
375
  },
390
376
  create(base) {
@@ -418,13 +404,13 @@ exports.SnapshotDatasetListResponse = {
418
404
  const tag = reader.uint32();
419
405
  switch (tag >>> 3) {
420
406
  case 1:
421
- if (tag !== 10) {
407
+ if (tag != 10) {
422
408
  break;
423
409
  }
424
410
  message.DatasetList.push(exports.SnapshotDatasetDesc.decode(reader, reader.uint32()));
425
411
  continue;
426
412
  }
427
- if ((tag & 7) === 4 || tag === 0) {
413
+ if ((tag & 7) == 4 || tag == 0) {
428
414
  break;
429
415
  }
430
416
  reader.skipType(tag & 7);
@@ -439,10 +425,12 @@ exports.SnapshotDatasetListResponse = {
439
425
  };
440
426
  },
441
427
  toJSON(message) {
442
- var _a;
443
428
  const obj = {};
444
- if ((_a = message.DatasetList) === null || _a === void 0 ? void 0 : _a.length) {
445
- obj.DatasetList = message.DatasetList.map((e) => exports.SnapshotDatasetDesc.toJSON(e));
429
+ if (message.DatasetList) {
430
+ obj.DatasetList = message.DatasetList.map((e) => e ? exports.SnapshotDatasetDesc.toJSON(e) : undefined);
431
+ }
432
+ else {
433
+ obj.DatasetList = [];
446
434
  }
447
435
  return obj;
448
436
  },
@@ -477,19 +465,19 @@ exports.SnapshotRequest = {
477
465
  const tag = reader.uint32();
478
466
  switch (tag >>> 3) {
479
467
  case 1:
480
- if (tag !== 10) {
468
+ if (tag != 10) {
481
469
  break;
482
470
  }
483
471
  message.DatasetPath = reader.string();
484
472
  continue;
485
473
  case 2:
486
- if (tag !== 18) {
474
+ if (tag != 18) {
487
475
  break;
488
476
  }
489
477
  message.SnapshotName = reader.string();
490
478
  continue;
491
479
  }
492
- if ((tag & 7) === 4 || tag === 0) {
480
+ if ((tag & 7) == 4 || tag == 0) {
493
481
  break;
494
482
  }
495
483
  reader.skipType(tag & 7);
@@ -504,12 +492,8 @@ exports.SnapshotRequest = {
504
492
  },
505
493
  toJSON(message) {
506
494
  const obj = {};
507
- if (message.DatasetPath !== "") {
508
- obj.DatasetPath = message.DatasetPath;
509
- }
510
- if (message.SnapshotName !== "") {
511
- obj.SnapshotName = message.SnapshotName;
512
- }
495
+ message.DatasetPath !== undefined && (obj.DatasetPath = message.DatasetPath);
496
+ message.SnapshotName !== undefined && (obj.SnapshotName = message.SnapshotName);
513
497
  return obj;
514
498
  },
515
499
  create(base) {
@@ -547,25 +531,25 @@ exports.SnapshotDesc = {
547
531
  const tag = reader.uint32();
548
532
  switch (tag >>> 3) {
549
533
  case 1:
550
- if (tag !== 10) {
534
+ if (tag != 10) {
551
535
  break;
552
536
  }
553
537
  message.Name = reader.string();
554
538
  continue;
555
539
  case 2:
556
- if (tag !== 16) {
540
+ if (tag != 16) {
557
541
  break;
558
542
  }
559
543
  message.BytesUsed = longToNumber(reader.uint64());
560
544
  continue;
561
545
  case 3:
562
- if (tag !== 24) {
546
+ if (tag != 24) {
563
547
  break;
564
548
  }
565
549
  message.CreatedAt = longToNumber(reader.uint64());
566
550
  continue;
567
551
  }
568
- if ((tag & 7) === 4 || tag === 0) {
552
+ if ((tag & 7) == 4 || tag == 0) {
569
553
  break;
570
554
  }
571
555
  reader.skipType(tag & 7);
@@ -581,15 +565,9 @@ exports.SnapshotDesc = {
581
565
  },
582
566
  toJSON(message) {
583
567
  const obj = {};
584
- if (message.Name !== "") {
585
- obj.Name = message.Name;
586
- }
587
- if (message.BytesUsed !== 0) {
588
- obj.BytesUsed = Math.round(message.BytesUsed);
589
- }
590
- if (message.CreatedAt !== 0) {
591
- obj.CreatedAt = Math.round(message.CreatedAt);
592
- }
568
+ message.Name !== undefined && (obj.Name = message.Name);
569
+ message.BytesUsed !== undefined && (obj.BytesUsed = Math.round(message.BytesUsed));
570
+ message.CreatedAt !== undefined && (obj.CreatedAt = Math.round(message.CreatedAt));
593
571
  return obj;
594
572
  },
595
573
  create(base) {
@@ -622,13 +600,13 @@ exports.SnapshotListResponse = {
622
600
  const tag = reader.uint32();
623
601
  switch (tag >>> 3) {
624
602
  case 1:
625
- if (tag !== 10) {
603
+ if (tag != 10) {
626
604
  break;
627
605
  }
628
606
  message.SnapshotList.push(exports.SnapshotDesc.decode(reader, reader.uint32()));
629
607
  continue;
630
608
  }
631
- if ((tag & 7) === 4 || tag === 0) {
609
+ if ((tag & 7) == 4 || tag == 0) {
632
610
  break;
633
611
  }
634
612
  reader.skipType(tag & 7);
@@ -643,10 +621,12 @@ exports.SnapshotListResponse = {
643
621
  };
644
622
  },
645
623
  toJSON(message) {
646
- var _a;
647
624
  const obj = {};
648
- if ((_a = message.SnapshotList) === null || _a === void 0 ? void 0 : _a.length) {
649
- obj.SnapshotList = message.SnapshotList.map((e) => exports.SnapshotDesc.toJSON(e));
625
+ if (message.SnapshotList) {
626
+ obj.SnapshotList = message.SnapshotList.map((e) => e ? exports.SnapshotDesc.toJSON(e) : undefined);
627
+ }
628
+ else {
629
+ obj.SnapshotList = [];
650
630
  }
651
631
  return obj;
652
632
  },
@@ -684,25 +664,25 @@ exports.SnapshotBackupRequest = {
684
664
  const tag = reader.uint32();
685
665
  switch (tag >>> 3) {
686
666
  case 1:
687
- if (tag !== 10) {
667
+ if (tag != 10) {
688
668
  break;
689
669
  }
690
670
  message.PoolName = reader.string();
691
671
  continue;
692
672
  case 2:
693
- if (tag !== 18) {
673
+ if (tag != 18) {
694
674
  break;
695
675
  }
696
676
  message.DatasetPath = reader.string();
697
677
  continue;
698
678
  case 3:
699
- if (tag !== 26) {
679
+ if (tag != 26) {
700
680
  break;
701
681
  }
702
682
  message.SnapshotName = reader.string();
703
683
  continue;
704
684
  }
705
- if ((tag & 7) === 4 || tag === 0) {
685
+ if ((tag & 7) == 4 || tag == 0) {
706
686
  break;
707
687
  }
708
688
  reader.skipType(tag & 7);
@@ -718,15 +698,9 @@ exports.SnapshotBackupRequest = {
718
698
  },
719
699
  toJSON(message) {
720
700
  const obj = {};
721
- if (message.PoolName !== "") {
722
- obj.PoolName = message.PoolName;
723
- }
724
- if (message.DatasetPath !== "") {
725
- obj.DatasetPath = message.DatasetPath;
726
- }
727
- if (message.SnapshotName !== "") {
728
- obj.SnapshotName = message.SnapshotName;
729
- }
701
+ message.PoolName !== undefined && (obj.PoolName = message.PoolName);
702
+ message.DatasetPath !== undefined && (obj.DatasetPath = message.DatasetPath);
703
+ message.SnapshotName !== undefined && (obj.SnapshotName = message.SnapshotName);
730
704
  return obj;
731
705
  },
732
706
  create(base) {
@@ -768,31 +742,31 @@ exports.SnapshotBackupTransferRequest = {
768
742
  const tag = reader.uint32();
769
743
  switch (tag >>> 3) {
770
744
  case 1:
771
- if (tag !== 10) {
745
+ if (tag != 10) {
772
746
  break;
773
747
  }
774
748
  message.PoolName = reader.string();
775
749
  continue;
776
750
  case 2:
777
- if (tag !== 18) {
751
+ if (tag != 18) {
778
752
  break;
779
753
  }
780
754
  message.DatasetPath = reader.string();
781
755
  continue;
782
756
  case 3:
783
- if (tag !== 26) {
757
+ if (tag != 26) {
784
758
  break;
785
759
  }
786
760
  message.SnapshotName = reader.string();
787
761
  continue;
788
762
  case 4:
789
- if (tag !== 32) {
763
+ if (tag != 32) {
790
764
  break;
791
765
  }
792
766
  message.TransferMode = reader.int32();
793
767
  continue;
794
768
  }
795
- if ((tag & 7) === 4 || tag === 0) {
769
+ if ((tag & 7) == 4 || tag == 0) {
796
770
  break;
797
771
  }
798
772
  reader.skipType(tag & 7);
@@ -809,18 +783,10 @@ exports.SnapshotBackupTransferRequest = {
809
783
  },
810
784
  toJSON(message) {
811
785
  const obj = {};
812
- if (message.PoolName !== "") {
813
- obj.PoolName = message.PoolName;
814
- }
815
- if (message.DatasetPath !== "") {
816
- obj.DatasetPath = message.DatasetPath;
817
- }
818
- if (message.SnapshotName !== "") {
819
- obj.SnapshotName = message.SnapshotName;
820
- }
821
- if (message.TransferMode !== 0) {
822
- obj.TransferMode = snapshotTransferModeToJSON(message.TransferMode);
823
- }
786
+ message.PoolName !== undefined && (obj.PoolName = message.PoolName);
787
+ message.DatasetPath !== undefined && (obj.DatasetPath = message.DatasetPath);
788
+ message.SnapshotName !== undefined && (obj.SnapshotName = message.SnapshotName);
789
+ message.TransferMode !== undefined && (obj.TransferMode = snapshotTransferModeToJSON(message.TransferMode));
824
790
  return obj;
825
791
  },
826
792
  create(base) {
@@ -857,19 +823,19 @@ exports.SnapshotBackupTransferResponse = {
857
823
  const tag = reader.uint32();
858
824
  switch (tag >>> 3) {
859
825
  case 1:
860
- if (tag !== 8) {
826
+ if (tag != 8) {
861
827
  break;
862
828
  }
863
829
  message.BytesSent = longToNumber(reader.uint64());
864
830
  continue;
865
831
  case 2:
866
- if (tag !== 16) {
832
+ if (tag != 16) {
867
833
  break;
868
834
  }
869
835
  message.BytesTotal = longToNumber(reader.uint64());
870
836
  continue;
871
837
  }
872
- if ((tag & 7) === 4 || tag === 0) {
838
+ if ((tag & 7) == 4 || tag == 0) {
873
839
  break;
874
840
  }
875
841
  reader.skipType(tag & 7);
@@ -884,12 +850,8 @@ exports.SnapshotBackupTransferResponse = {
884
850
  },
885
851
  toJSON(message) {
886
852
  const obj = {};
887
- if (message.BytesSent !== 0) {
888
- obj.BytesSent = Math.round(message.BytesSent);
889
- }
890
- if (message.BytesTotal !== 0) {
891
- obj.BytesTotal = Math.round(message.BytesTotal);
892
- }
853
+ message.BytesSent !== undefined && (obj.BytesSent = Math.round(message.BytesSent));
854
+ message.BytesTotal !== undefined && (obj.BytesTotal = Math.round(message.BytesTotal));
893
855
  return obj;
894
856
  },
895
857
  create(base) {
@@ -924,19 +886,19 @@ exports.SnapshotBackupListRequest = {
924
886
  const tag = reader.uint32();
925
887
  switch (tag >>> 3) {
926
888
  case 1:
927
- if (tag !== 10) {
889
+ if (tag != 10) {
928
890
  break;
929
891
  }
930
892
  message.PoolName = reader.string();
931
893
  continue;
932
894
  case 2:
933
- if (tag !== 18) {
895
+ if (tag != 18) {
934
896
  break;
935
897
  }
936
898
  message.DatasetPath = reader.string();
937
899
  continue;
938
900
  }
939
- if ((tag & 7) === 4 || tag === 0) {
901
+ if ((tag & 7) == 4 || tag == 0) {
940
902
  break;
941
903
  }
942
904
  reader.skipType(tag & 7);
@@ -951,12 +913,8 @@ exports.SnapshotBackupListRequest = {
951
913
  },
952
914
  toJSON(message) {
953
915
  const obj = {};
954
- if (message.PoolName !== "") {
955
- obj.PoolName = message.PoolName;
956
- }
957
- if (message.DatasetPath !== "") {
958
- obj.DatasetPath = message.DatasetPath;
959
- }
916
+ message.PoolName !== undefined && (obj.PoolName = message.PoolName);
917
+ message.DatasetPath !== undefined && (obj.DatasetPath = message.DatasetPath);
960
918
  return obj;
961
919
  },
962
920
  create(base) {
@@ -994,25 +952,25 @@ exports.SnapshotStatusResponse = {
994
952
  const tag = reader.uint32();
995
953
  switch (tag >>> 3) {
996
954
  case 1:
997
- if (tag !== 8) {
955
+ if (tag != 8) {
998
956
  break;
999
957
  }
1000
958
  message.Status = reader.int32();
1001
959
  continue;
1002
960
  case 2:
1003
- if (tag !== 16) {
961
+ if (tag != 16) {
1004
962
  break;
1005
963
  }
1006
964
  message.BytesSent = longToNumber(reader.uint64());
1007
965
  continue;
1008
966
  case 3:
1009
- if (tag !== 24) {
967
+ if (tag != 24) {
1010
968
  break;
1011
969
  }
1012
970
  message.BytesTotal = longToNumber(reader.uint64());
1013
971
  continue;
1014
972
  }
1015
- if ((tag & 7) === 4 || tag === 0) {
973
+ if ((tag & 7) == 4 || tag == 0) {
1016
974
  break;
1017
975
  }
1018
976
  reader.skipType(tag & 7);
@@ -1028,15 +986,9 @@ exports.SnapshotStatusResponse = {
1028
986
  },
1029
987
  toJSON(message) {
1030
988
  const obj = {};
1031
- if (message.Status !== 0) {
1032
- obj.Status = snapshotManagerStatusToJSON(message.Status);
1033
- }
1034
- if (message.BytesSent !== 0) {
1035
- obj.BytesSent = Math.round(message.BytesSent);
1036
- }
1037
- if (message.BytesTotal !== 0) {
1038
- obj.BytesTotal = Math.round(message.BytesTotal);
1039
- }
989
+ message.Status !== undefined && (obj.Status = snapshotManagerStatusToJSON(message.Status));
990
+ message.BytesSent !== undefined && (obj.BytesSent = Math.round(message.BytesSent));
991
+ message.BytesTotal !== undefined && (obj.BytesTotal = Math.round(message.BytesTotal));
1040
992
  return obj;
1041
993
  },
1042
994
  create(base) {
@@ -1482,10 +1434,15 @@ class GrpcWebImpl {
1482
1434
  const request = Object.assign(Object.assign({}, _request), methodDesc.requestType);
1483
1435
  const maybeCombinedMetadata = metadata && this.options.metadata
1484
1436
  ? 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))
1485
- : metadata !== null && metadata !== void 0 ? metadata : this.options.metadata;
1437
+ : metadata || this.options.metadata;
1486
1438
  return new Promise((resolve, reject) => {
1487
- var _a;
1488
- 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) {
1439
+ const client = grpc_web_1.grpc.unary(methodDesc, {
1440
+ request,
1441
+ host: this.host,
1442
+ metadata: maybeCombinedMetadata,
1443
+ transport: this.options.transport,
1444
+ debug: this.options.debug,
1445
+ onEnd: function (response) {
1489
1446
  if (response.status === grpc_web_1.grpc.Code.OK) {
1490
1447
  resolve(response.message.toObject());
1491
1448
  }
@@ -1493,18 +1450,20 @@ class GrpcWebImpl {
1493
1450
  const err = new GrpcWebError(response.statusMessage, response.status, response.trailers);
1494
1451
  reject(err);
1495
1452
  }
1496
- } }));
1453
+ },
1454
+ });
1455
+ const abortHandler = () => {
1456
+ client.close();
1457
+ reject(new Error("Aborted"));
1458
+ };
1497
1459
  if (abortSignal) {
1498
- abortSignal.addEventListener("abort", () => {
1499
- client.close();
1500
- reject(abortSignal.reason);
1501
- });
1460
+ abortSignal.addEventListener("abort", abortHandler);
1502
1461
  }
1503
1462
  });
1504
1463
  }
1505
1464
  }
1506
1465
  exports.GrpcWebImpl = GrpcWebImpl;
1507
- const tsProtoGlobalThis = (() => {
1466
+ var tsProtoGlobalThis = (() => {
1508
1467
  if (typeof globalThis !== "undefined") {
1509
1468
  return globalThis;
1510
1469
  }