@lazycatcloud/sdk 0.1.293 → 0.1.295

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 (190) hide show
  1. package/dist/common/apk_shell.d.ts +3 -2
  2. package/dist/common/apk_shell.d.ts.map +1 -1
  3. package/dist/common/apk_shell.js +67 -54
  4. package/dist/common/apk_shell.js.map +1 -1
  5. package/dist/common/box.d.ts +3 -2
  6. package/dist/common/box.d.ts.map +1 -1
  7. package/dist/common/box.js +113 -134
  8. package/dist/common/box.js.map +1 -1
  9. package/dist/common/browseronly.d.ts +3 -2
  10. package/dist/common/browseronly.d.ts.map +1 -1
  11. package/dist/common/browseronly.js +91 -86
  12. package/dist/common/browseronly.js.map +1 -1
  13. package/dist/common/end_device.d.ts +19 -2
  14. package/dist/common/end_device.d.ts.map +1 -1
  15. package/dist/common/end_device.js +123 -111
  16. package/dist/common/end_device.js.map +1 -1
  17. package/dist/common/file_handler.d.ts +3 -2
  18. package/dist/common/file_handler.d.ts.map +1 -1
  19. package/dist/common/file_handler.js +162 -195
  20. package/dist/common/file_handler.js.map +1 -1
  21. package/dist/common/filetrans.d.ts +3 -2
  22. package/dist/common/filetrans.d.ts.map +1 -1
  23. package/dist/common/filetrans.js +273 -355
  24. package/dist/common/filetrans.js.map +1 -1
  25. package/dist/common/gateway.d.ts +3 -2
  26. package/dist/common/gateway.d.ts.map +1 -1
  27. package/dist/common/gateway.js +79 -87
  28. package/dist/common/gateway.js.map +1 -1
  29. package/dist/common/media_meta.d.ts +3 -2
  30. package/dist/common/media_meta.d.ts.map +1 -1
  31. package/dist/common/media_meta.js +90 -81
  32. package/dist/common/media_meta.js.map +1 -1
  33. package/dist/common/message.d.ts +3 -2
  34. package/dist/common/message.d.ts.map +1 -1
  35. package/dist/common/message.js +128 -141
  36. package/dist/common/message.js.map +1 -1
  37. package/dist/common/peripheral_device.d.ts +3 -2
  38. package/dist/common/peripheral_device.d.ts.map +1 -1
  39. package/dist/common/peripheral_device.js +124 -128
  40. package/dist/common/peripheral_device.js.map +1 -1
  41. package/dist/common/security_context.d.ts +3 -2
  42. package/dist/common/security_context.d.ts.map +1 -1
  43. package/dist/common/security_context.js +75 -69
  44. package/dist/common/security_context.js.map +1 -1
  45. package/dist/common/users.d.ts +3 -2
  46. package/dist/common/users.d.ts.map +1 -1
  47. package/dist/common/users.js +117 -133
  48. package/dist/common/users.js.map +1 -1
  49. package/dist/dlna/dlna.d.ts +3 -2
  50. package/dist/dlna/dlna.d.ts.map +1 -1
  51. package/dist/dlna/dlna.js +129 -144
  52. package/dist/dlna/dlna.js.map +1 -1
  53. package/dist/extentions/app_common.d.ts +12 -0
  54. package/dist/extentions/app_common.d.ts.map +1 -1
  55. package/dist/extentions/app_common.js +45 -0
  56. package/dist/extentions/app_common.js.map +1 -1
  57. package/dist/extentions/base.d.ts.map +1 -1
  58. package/dist/extentions/base.js +1 -0
  59. package/dist/extentions/base.js.map +1 -1
  60. package/dist/google/protobuf/descriptor.d.ts.map +1 -1
  61. package/dist/google/protobuf/descriptor.js +607 -724
  62. package/dist/google/protobuf/descriptor.js.map +1 -1
  63. package/dist/google/protobuf/empty.d.ts.map +1 -1
  64. package/dist/google/protobuf/empty.js +1 -1
  65. package/dist/google/protobuf/empty.js.map +1 -1
  66. package/dist/google/protobuf/timestamp.d.ts.map +1 -1
  67. package/dist/google/protobuf/timestamp.js +24 -13
  68. package/dist/google/protobuf/timestamp.js.map +1 -1
  69. package/dist/index.d.ts.map +1 -1
  70. package/dist/index.js +0 -1
  71. package/dist/index.js.map +1 -1
  72. package/dist/lanforward/lanforward.d.ts +99 -0
  73. package/dist/lanforward/lanforward.d.ts.map +1 -0
  74. package/dist/lanforward/lanforward.js +254 -0
  75. package/dist/lanforward/lanforward.js.map +1 -0
  76. package/dist/localdevice/client.d.ts +3 -2
  77. package/dist/localdevice/client.d.ts.map +1 -1
  78. package/dist/localdevice/client.js +40 -22
  79. package/dist/localdevice/client.js.map +1 -1
  80. package/dist/localdevice/clipboard.d.ts +3 -2
  81. package/dist/localdevice/clipboard.d.ts.map +1 -1
  82. package/dist/localdevice/clipboard.js +89 -74
  83. package/dist/localdevice/clipboard.js.map +1 -1
  84. package/dist/localdevice/config.d.ts +3 -2
  85. package/dist/localdevice/config.d.ts.map +1 -1
  86. package/dist/localdevice/config.js +65 -63
  87. package/dist/localdevice/config.js.map +1 -1
  88. package/dist/localdevice/device.d.ts +3 -2
  89. package/dist/localdevice/device.d.ts.map +1 -1
  90. package/dist/localdevice/device.js +44 -30
  91. package/dist/localdevice/device.js.map +1 -1
  92. package/dist/localdevice/dialog.d.ts +3 -2
  93. package/dist/localdevice/dialog.d.ts.map +1 -1
  94. package/dist/localdevice/dialog.js +83 -85
  95. package/dist/localdevice/dialog.js.map +1 -1
  96. package/dist/localdevice/local-launch.d.ts +3 -2
  97. package/dist/localdevice/local-launch.d.ts.map +1 -1
  98. package/dist/localdevice/local-launch.js +90 -96
  99. package/dist/localdevice/local-launch.js.map +1 -1
  100. package/dist/localdevice/network.d.ts +3 -2
  101. package/dist/localdevice/network.d.ts.map +1 -1
  102. package/dist/localdevice/network.js +37 -19
  103. package/dist/localdevice/network.js.map +1 -1
  104. package/dist/localdevice/permission.d.ts +3 -2
  105. package/dist/localdevice/permission.d.ts.map +1 -1
  106. package/dist/localdevice/permission.js +88 -84
  107. package/dist/localdevice/permission.js.map +1 -1
  108. package/dist/localdevice/photo.d.ts +3 -2
  109. package/dist/localdevice/photo.d.ts.map +1 -1
  110. package/dist/localdevice/photo.js +280 -348
  111. package/dist/localdevice/photo.js.map +1 -1
  112. package/dist/localdevice/remote-input-method.d.ts +3 -2
  113. package/dist/localdevice/remote-input-method.d.ts.map +1 -1
  114. package/dist/localdevice/remote-input-method.js +69 -52
  115. package/dist/localdevice/remote-input-method.js.map +1 -1
  116. package/dist/package.json +1 -1
  117. package/dist/ssdp/ssdp.d.ts +113 -0
  118. package/dist/ssdp/ssdp.d.ts.map +1 -0
  119. package/dist/ssdp/ssdp.js +292 -0
  120. package/dist/ssdp/ssdp.js.map +1 -0
  121. package/dist/sys/OS_daemon.d.ts +111 -0
  122. package/dist/sys/OS_daemon.d.ts.map +1 -0
  123. package/dist/sys/OS_daemon.js +281 -0
  124. package/dist/sys/OS_daemon.js.map +1 -0
  125. package/dist/sys/OS_snapshot.d.ts +3 -2
  126. package/dist/sys/OS_snapshot.d.ts.map +1 -1
  127. package/dist/sys/OS_snapshot.js +147 -177
  128. package/dist/sys/OS_snapshot.js.map +1 -1
  129. package/dist/sys/OS_upgrader.d.ts +3 -2
  130. package/dist/sys/OS_upgrader.d.ts.map +1 -1
  131. package/dist/sys/OS_upgrader.js +70 -66
  132. package/dist/sys/OS_upgrader.js.map +1 -1
  133. package/dist/sys/box-status.d.ts +572 -0
  134. package/dist/sys/box-status.d.ts.map +1 -0
  135. package/dist/sys/box-status.js +911 -0
  136. package/dist/sys/box-status.js.map +1 -0
  137. package/dist/sys/btled.d.ts +3 -2
  138. package/dist/sys/btled.d.ts.map +1 -1
  139. package/dist/sys/btled.js +80 -70
  140. package/dist/sys/btled.js.map +1 -1
  141. package/dist/sys/btrfs.d.ts +3 -2
  142. package/dist/sys/btrfs.d.ts.map +1 -1
  143. package/dist/sys/btrfs.js +76 -80
  144. package/dist/sys/btrfs.js.map +1 -1
  145. package/dist/sys/devopt.d.ts +3 -2
  146. package/dist/sys/devopt.d.ts.map +1 -1
  147. package/dist/sys/devopt.js +58 -52
  148. package/dist/sys/devopt.js.map +1 -1
  149. package/dist/sys/dirmon.d.ts +3 -2
  150. package/dist/sys/dirmon.d.ts.map +1 -1
  151. package/dist/sys/dirmon.js +61 -41
  152. package/dist/sys/dirmon.js.map +1 -1
  153. package/dist/sys/event.d.ts +3 -2
  154. package/dist/sys/event.d.ts.map +1 -1
  155. package/dist/sys/event.js +87 -82
  156. package/dist/sys/event.js.map +1 -1
  157. package/dist/sys/hc-core/hc-core.d.ts +3 -2
  158. package/dist/sys/hc-core/hc-core.d.ts.map +1 -1
  159. package/dist/sys/hc-core/hc-core.js +134 -155
  160. package/dist/sys/hc-core/hc-core.js.map +1 -1
  161. package/dist/sys/ingress.d.ts +3 -2
  162. package/dist/sys/ingress.d.ts.map +1 -1
  163. package/dist/sys/ingress.js +58 -44
  164. package/dist/sys/ingress.js.map +1 -1
  165. package/dist/sys/installer.d.ts +3 -2
  166. package/dist/sys/installer.d.ts.map +1 -1
  167. package/dist/sys/installer.js +101 -99
  168. package/dist/sys/installer.js.map +1 -1
  169. package/dist/sys/network_manager.d.ts +3 -2
  170. package/dist/sys/network_manager.d.ts.map +1 -1
  171. package/dist/sys/network_manager.js +117 -144
  172. package/dist/sys/network_manager.js.map +1 -1
  173. package/dist/sys/package_manager.d.ts +3 -2
  174. package/dist/sys/package_manager.d.ts.map +1 -1
  175. package/dist/sys/package_manager.js +230 -313
  176. package/dist/sys/package_manager.js.map +1 -1
  177. package/dist/sys/portal-server/portal-server.d.ts +73 -2
  178. package/dist/sys/portal-server/portal-server.d.ts.map +1 -1
  179. package/dist/sys/portal-server/portal-server.js +464 -337
  180. package/dist/sys/portal-server/portal-server.js.map +1 -1
  181. package/dist/sys/snapd.d.ts +3 -2
  182. package/dist/sys/snapd.d.ts.map +1 -1
  183. package/dist/sys/snapd.js +88 -88
  184. package/dist/sys/snapd.js.map +1 -1
  185. package/dist/sys/version.d.ts +3 -2
  186. package/dist/sys/version.d.ts.map +1 -1
  187. package/dist/sys/version.js +35 -15
  188. package/dist/sys/version.js.map +1 -1
  189. package/dist/tsconfig.tsbuildinfo +1 -1
  190. package/package.json +1 -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);
@@ -116,13 +116,11 @@ exports.SnapshotBackupPoolRequest = {
116
116
  return message;
117
117
  },
118
118
  fromJSON(object) {
119
- return { PoolName: isSet(object.PoolName) ? globalThis.String(object.PoolName) : "" };
119
+ return { PoolName: isSet(object.PoolName) ? String(object.PoolName) : "" };
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);
@@ -167,17 +165,15 @@ exports.SnapshotBackupPoolListResponse = {
167
165
  return message;
168
166
  },
169
167
  fromJSON(object) {
170
- return {
171
- PoolNameList: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.PoolNameList)
172
- ? object.PoolNameList.map((e) => globalThis.String(e))
173
- : [],
174
- };
168
+ return { PoolNameList: Array.isArray(object === null || object === void 0 ? void 0 : object.PoolNameList) ? object.PoolNameList.map((e) => String(e)) : [] };
175
169
  },
176
170
  toJSON(message) {
177
- var _a;
178
171
  const obj = {};
179
- if ((_a = message.PoolNameList) === null || _a === void 0 ? void 0 : _a.length) {
180
- obj.PoolNameList = message.PoolNameList;
172
+ if (message.PoolNameList) {
173
+ obj.PoolNameList = message.PoolNameList.map((e) => e);
174
+ }
175
+ else {
176
+ obj.PoolNameList = [];
181
177
  }
182
178
  return obj;
183
179
  },
@@ -209,13 +205,13 @@ exports.SnapshotDatasetRequest = {
209
205
  const tag = reader.uint32();
210
206
  switch (tag >>> 3) {
211
207
  case 1:
212
- if (tag !== 10) {
208
+ if (tag != 10) {
213
209
  break;
214
210
  }
215
211
  message.DatasetPath = reader.string();
216
212
  continue;
217
213
  }
218
- if ((tag & 7) === 4 || tag === 0) {
214
+ if ((tag & 7) == 4 || tag == 0) {
219
215
  break;
220
216
  }
221
217
  reader.skipType(tag & 7);
@@ -223,13 +219,11 @@ exports.SnapshotDatasetRequest = {
223
219
  return message;
224
220
  },
225
221
  fromJSON(object) {
226
- return { DatasetPath: isSet(object.DatasetPath) ? globalThis.String(object.DatasetPath) : "" };
222
+ return { DatasetPath: isSet(object.DatasetPath) ? String(object.DatasetPath) : "" };
227
223
  },
228
224
  toJSON(message) {
229
225
  const obj = {};
230
- if (message.DatasetPath !== "") {
231
- obj.DatasetPath = message.DatasetPath;
232
- }
226
+ message.DatasetPath !== undefined && (obj.DatasetPath = message.DatasetPath);
233
227
  return obj;
234
228
  },
235
229
  create(base) {
@@ -263,19 +257,19 @@ exports.SnapshotDatasetBackupRequest = {
263
257
  const tag = reader.uint32();
264
258
  switch (tag >>> 3) {
265
259
  case 1:
266
- if (tag !== 10) {
260
+ if (tag != 10) {
267
261
  break;
268
262
  }
269
263
  message.PoolName = reader.string();
270
264
  continue;
271
265
  case 2:
272
- if (tag !== 18) {
266
+ if (tag != 18) {
273
267
  break;
274
268
  }
275
269
  message.DatasetPath = reader.string();
276
270
  continue;
277
271
  }
278
- if ((tag & 7) === 4 || tag === 0) {
272
+ if ((tag & 7) == 4 || tag == 0) {
279
273
  break;
280
274
  }
281
275
  reader.skipType(tag & 7);
@@ -284,18 +278,14 @@ exports.SnapshotDatasetBackupRequest = {
284
278
  },
285
279
  fromJSON(object) {
286
280
  return {
287
- PoolName: isSet(object.PoolName) ? globalThis.String(object.PoolName) : "",
288
- DatasetPath: isSet(object.DatasetPath) ? globalThis.String(object.DatasetPath) : "",
281
+ PoolName: isSet(object.PoolName) ? String(object.PoolName) : "",
282
+ DatasetPath: isSet(object.DatasetPath) ? String(object.DatasetPath) : "",
289
283
  };
290
284
  },
291
285
  toJSON(message) {
292
286
  const obj = {};
293
- if (message.PoolName !== "") {
294
- obj.PoolName = message.PoolName;
295
- }
296
- if (message.DatasetPath !== "") {
297
- obj.DatasetPath = message.DatasetPath;
298
- }
287
+ message.PoolName !== undefined && (obj.PoolName = message.PoolName);
288
+ message.DatasetPath !== undefined && (obj.DatasetPath = message.DatasetPath);
299
289
  return obj;
300
290
  },
301
291
  create(base) {
@@ -336,31 +326,31 @@ exports.SnapshotDatasetDesc = {
336
326
  const tag = reader.uint32();
337
327
  switch (tag >>> 3) {
338
328
  case 1:
339
- if (tag !== 10) {
329
+ if (tag != 10) {
340
330
  break;
341
331
  }
342
332
  message.Path = reader.string();
343
333
  continue;
344
334
  case 2:
345
- if (tag !== 16) {
335
+ if (tag != 16) {
346
336
  break;
347
337
  }
348
338
  message.BytesUsed = longToNumber(reader.uint64());
349
339
  continue;
350
340
  case 3:
351
- if (tag !== 24) {
341
+ if (tag != 24) {
352
342
  break;
353
343
  }
354
344
  message.SnapshotBytesUsed = longToNumber(reader.uint64());
355
345
  continue;
356
346
  case 4:
357
- if (tag !== 32) {
347
+ if (tag != 32) {
358
348
  break;
359
349
  }
360
350
  message.CreatedAt = longToNumber(reader.uint64());
361
351
  continue;
362
352
  }
363
- if ((tag & 7) === 4 || tag === 0) {
353
+ if ((tag & 7) == 4 || tag == 0) {
364
354
  break;
365
355
  }
366
356
  reader.skipType(tag & 7);
@@ -369,26 +359,18 @@ exports.SnapshotDatasetDesc = {
369
359
  },
370
360
  fromJSON(object) {
371
361
  return {
372
- Path: isSet(object.Path) ? globalThis.String(object.Path) : "",
373
- BytesUsed: isSet(object.BytesUsed) ? globalThis.Number(object.BytesUsed) : 0,
374
- SnapshotBytesUsed: isSet(object.SnapshotBytesUsed) ? globalThis.Number(object.SnapshotBytesUsed) : 0,
375
- CreatedAt: isSet(object.CreatedAt) ? globalThis.Number(object.CreatedAt) : 0,
362
+ Path: isSet(object.Path) ? String(object.Path) : "",
363
+ BytesUsed: isSet(object.BytesUsed) ? Number(object.BytesUsed) : 0,
364
+ SnapshotBytesUsed: isSet(object.SnapshotBytesUsed) ? Number(object.SnapshotBytesUsed) : 0,
365
+ CreatedAt: isSet(object.CreatedAt) ? Number(object.CreatedAt) : 0,
376
366
  };
377
367
  },
378
368
  toJSON(message) {
379
369
  const obj = {};
380
- if (message.Path !== "") {
381
- obj.Path = message.Path;
382
- }
383
- if (message.BytesUsed !== 0) {
384
- obj.BytesUsed = Math.round(message.BytesUsed);
385
- }
386
- if (message.SnapshotBytesUsed !== 0) {
387
- obj.SnapshotBytesUsed = Math.round(message.SnapshotBytesUsed);
388
- }
389
- if (message.CreatedAt !== 0) {
390
- obj.CreatedAt = Math.round(message.CreatedAt);
391
- }
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));
392
374
  return obj;
393
375
  },
394
376
  create(base) {
@@ -422,13 +404,13 @@ exports.SnapshotDatasetListResponse = {
422
404
  const tag = reader.uint32();
423
405
  switch (tag >>> 3) {
424
406
  case 1:
425
- if (tag !== 10) {
407
+ if (tag != 10) {
426
408
  break;
427
409
  }
428
410
  message.DatasetList.push(exports.SnapshotDatasetDesc.decode(reader, reader.uint32()));
429
411
  continue;
430
412
  }
431
- if ((tag & 7) === 4 || tag === 0) {
413
+ if ((tag & 7) == 4 || tag == 0) {
432
414
  break;
433
415
  }
434
416
  reader.skipType(tag & 7);
@@ -437,16 +419,18 @@ exports.SnapshotDatasetListResponse = {
437
419
  },
438
420
  fromJSON(object) {
439
421
  return {
440
- DatasetList: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.DatasetList)
422
+ DatasetList: Array.isArray(object === null || object === void 0 ? void 0 : object.DatasetList)
441
423
  ? object.DatasetList.map((e) => exports.SnapshotDatasetDesc.fromJSON(e))
442
424
  : [],
443
425
  };
444
426
  },
445
427
  toJSON(message) {
446
- var _a;
447
428
  const obj = {};
448
- if ((_a = message.DatasetList) === null || _a === void 0 ? void 0 : _a.length) {
449
- 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 = [];
450
434
  }
451
435
  return obj;
452
436
  },
@@ -481,19 +465,19 @@ exports.SnapshotRequest = {
481
465
  const tag = reader.uint32();
482
466
  switch (tag >>> 3) {
483
467
  case 1:
484
- if (tag !== 10) {
468
+ if (tag != 10) {
485
469
  break;
486
470
  }
487
471
  message.DatasetPath = reader.string();
488
472
  continue;
489
473
  case 2:
490
- if (tag !== 18) {
474
+ if (tag != 18) {
491
475
  break;
492
476
  }
493
477
  message.SnapshotName = reader.string();
494
478
  continue;
495
479
  }
496
- if ((tag & 7) === 4 || tag === 0) {
480
+ if ((tag & 7) == 4 || tag == 0) {
497
481
  break;
498
482
  }
499
483
  reader.skipType(tag & 7);
@@ -502,18 +486,14 @@ exports.SnapshotRequest = {
502
486
  },
503
487
  fromJSON(object) {
504
488
  return {
505
- DatasetPath: isSet(object.DatasetPath) ? globalThis.String(object.DatasetPath) : "",
506
- SnapshotName: isSet(object.SnapshotName) ? globalThis.String(object.SnapshotName) : "",
489
+ DatasetPath: isSet(object.DatasetPath) ? String(object.DatasetPath) : "",
490
+ SnapshotName: isSet(object.SnapshotName) ? String(object.SnapshotName) : "",
507
491
  };
508
492
  },
509
493
  toJSON(message) {
510
494
  const obj = {};
511
- if (message.DatasetPath !== "") {
512
- obj.DatasetPath = message.DatasetPath;
513
- }
514
- if (message.SnapshotName !== "") {
515
- obj.SnapshotName = message.SnapshotName;
516
- }
495
+ message.DatasetPath !== undefined && (obj.DatasetPath = message.DatasetPath);
496
+ message.SnapshotName !== undefined && (obj.SnapshotName = message.SnapshotName);
517
497
  return obj;
518
498
  },
519
499
  create(base) {
@@ -551,25 +531,25 @@ exports.SnapshotDesc = {
551
531
  const tag = reader.uint32();
552
532
  switch (tag >>> 3) {
553
533
  case 1:
554
- if (tag !== 10) {
534
+ if (tag != 10) {
555
535
  break;
556
536
  }
557
537
  message.Name = reader.string();
558
538
  continue;
559
539
  case 2:
560
- if (tag !== 16) {
540
+ if (tag != 16) {
561
541
  break;
562
542
  }
563
543
  message.BytesUsed = longToNumber(reader.uint64());
564
544
  continue;
565
545
  case 3:
566
- if (tag !== 24) {
546
+ if (tag != 24) {
567
547
  break;
568
548
  }
569
549
  message.CreatedAt = longToNumber(reader.uint64());
570
550
  continue;
571
551
  }
572
- if ((tag & 7) === 4 || tag === 0) {
552
+ if ((tag & 7) == 4 || tag == 0) {
573
553
  break;
574
554
  }
575
555
  reader.skipType(tag & 7);
@@ -578,22 +558,16 @@ exports.SnapshotDesc = {
578
558
  },
579
559
  fromJSON(object) {
580
560
  return {
581
- Name: isSet(object.Name) ? globalThis.String(object.Name) : "",
582
- BytesUsed: isSet(object.BytesUsed) ? globalThis.Number(object.BytesUsed) : 0,
583
- CreatedAt: isSet(object.CreatedAt) ? globalThis.Number(object.CreatedAt) : 0,
561
+ Name: isSet(object.Name) ? String(object.Name) : "",
562
+ BytesUsed: isSet(object.BytesUsed) ? Number(object.BytesUsed) : 0,
563
+ CreatedAt: isSet(object.CreatedAt) ? Number(object.CreatedAt) : 0,
584
564
  };
585
565
  },
586
566
  toJSON(message) {
587
567
  const obj = {};
588
- if (message.Name !== "") {
589
- obj.Name = message.Name;
590
- }
591
- if (message.BytesUsed !== 0) {
592
- obj.BytesUsed = Math.round(message.BytesUsed);
593
- }
594
- if (message.CreatedAt !== 0) {
595
- obj.CreatedAt = Math.round(message.CreatedAt);
596
- }
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));
597
571
  return obj;
598
572
  },
599
573
  create(base) {
@@ -626,13 +600,13 @@ exports.SnapshotListResponse = {
626
600
  const tag = reader.uint32();
627
601
  switch (tag >>> 3) {
628
602
  case 1:
629
- if (tag !== 10) {
603
+ if (tag != 10) {
630
604
  break;
631
605
  }
632
606
  message.SnapshotList.push(exports.SnapshotDesc.decode(reader, reader.uint32()));
633
607
  continue;
634
608
  }
635
- if ((tag & 7) === 4 || tag === 0) {
609
+ if ((tag & 7) == 4 || tag == 0) {
636
610
  break;
637
611
  }
638
612
  reader.skipType(tag & 7);
@@ -641,16 +615,18 @@ exports.SnapshotListResponse = {
641
615
  },
642
616
  fromJSON(object) {
643
617
  return {
644
- SnapshotList: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.SnapshotList)
618
+ SnapshotList: Array.isArray(object === null || object === void 0 ? void 0 : object.SnapshotList)
645
619
  ? object.SnapshotList.map((e) => exports.SnapshotDesc.fromJSON(e))
646
620
  : [],
647
621
  };
648
622
  },
649
623
  toJSON(message) {
650
- var _a;
651
624
  const obj = {};
652
- if ((_a = message.SnapshotList) === null || _a === void 0 ? void 0 : _a.length) {
653
- 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 = [];
654
630
  }
655
631
  return obj;
656
632
  },
@@ -688,25 +664,25 @@ exports.SnapshotBackupRequest = {
688
664
  const tag = reader.uint32();
689
665
  switch (tag >>> 3) {
690
666
  case 1:
691
- if (tag !== 10) {
667
+ if (tag != 10) {
692
668
  break;
693
669
  }
694
670
  message.PoolName = reader.string();
695
671
  continue;
696
672
  case 2:
697
- if (tag !== 18) {
673
+ if (tag != 18) {
698
674
  break;
699
675
  }
700
676
  message.DatasetPath = reader.string();
701
677
  continue;
702
678
  case 3:
703
- if (tag !== 26) {
679
+ if (tag != 26) {
704
680
  break;
705
681
  }
706
682
  message.SnapshotName = reader.string();
707
683
  continue;
708
684
  }
709
- if ((tag & 7) === 4 || tag === 0) {
685
+ if ((tag & 7) == 4 || tag == 0) {
710
686
  break;
711
687
  }
712
688
  reader.skipType(tag & 7);
@@ -715,22 +691,16 @@ exports.SnapshotBackupRequest = {
715
691
  },
716
692
  fromJSON(object) {
717
693
  return {
718
- PoolName: isSet(object.PoolName) ? globalThis.String(object.PoolName) : "",
719
- DatasetPath: isSet(object.DatasetPath) ? globalThis.String(object.DatasetPath) : "",
720
- SnapshotName: isSet(object.SnapshotName) ? globalThis.String(object.SnapshotName) : "",
694
+ PoolName: isSet(object.PoolName) ? String(object.PoolName) : "",
695
+ DatasetPath: isSet(object.DatasetPath) ? String(object.DatasetPath) : "",
696
+ SnapshotName: isSet(object.SnapshotName) ? String(object.SnapshotName) : "",
721
697
  };
722
698
  },
723
699
  toJSON(message) {
724
700
  const obj = {};
725
- if (message.PoolName !== "") {
726
- obj.PoolName = message.PoolName;
727
- }
728
- if (message.DatasetPath !== "") {
729
- obj.DatasetPath = message.DatasetPath;
730
- }
731
- if (message.SnapshotName !== "") {
732
- obj.SnapshotName = message.SnapshotName;
733
- }
701
+ message.PoolName !== undefined && (obj.PoolName = message.PoolName);
702
+ message.DatasetPath !== undefined && (obj.DatasetPath = message.DatasetPath);
703
+ message.SnapshotName !== undefined && (obj.SnapshotName = message.SnapshotName);
734
704
  return obj;
735
705
  },
736
706
  create(base) {
@@ -772,31 +742,31 @@ exports.SnapshotBackupTransferRequest = {
772
742
  const tag = reader.uint32();
773
743
  switch (tag >>> 3) {
774
744
  case 1:
775
- if (tag !== 10) {
745
+ if (tag != 10) {
776
746
  break;
777
747
  }
778
748
  message.PoolName = reader.string();
779
749
  continue;
780
750
  case 2:
781
- if (tag !== 18) {
751
+ if (tag != 18) {
782
752
  break;
783
753
  }
784
754
  message.DatasetPath = reader.string();
785
755
  continue;
786
756
  case 3:
787
- if (tag !== 26) {
757
+ if (tag != 26) {
788
758
  break;
789
759
  }
790
760
  message.SnapshotName = reader.string();
791
761
  continue;
792
762
  case 4:
793
- if (tag !== 32) {
763
+ if (tag != 32) {
794
764
  break;
795
765
  }
796
766
  message.TransferMode = reader.int32();
797
767
  continue;
798
768
  }
799
- if ((tag & 7) === 4 || tag === 0) {
769
+ if ((tag & 7) == 4 || tag == 0) {
800
770
  break;
801
771
  }
802
772
  reader.skipType(tag & 7);
@@ -805,26 +775,18 @@ exports.SnapshotBackupTransferRequest = {
805
775
  },
806
776
  fromJSON(object) {
807
777
  return {
808
- PoolName: isSet(object.PoolName) ? globalThis.String(object.PoolName) : "",
809
- DatasetPath: isSet(object.DatasetPath) ? globalThis.String(object.DatasetPath) : "",
810
- SnapshotName: isSet(object.SnapshotName) ? globalThis.String(object.SnapshotName) : "",
778
+ PoolName: isSet(object.PoolName) ? String(object.PoolName) : "",
779
+ DatasetPath: isSet(object.DatasetPath) ? String(object.DatasetPath) : "",
780
+ SnapshotName: isSet(object.SnapshotName) ? String(object.SnapshotName) : "",
811
781
  TransferMode: isSet(object.TransferMode) ? snapshotTransferModeFromJSON(object.TransferMode) : 0,
812
782
  };
813
783
  },
814
784
  toJSON(message) {
815
785
  const obj = {};
816
- if (message.PoolName !== "") {
817
- obj.PoolName = message.PoolName;
818
- }
819
- if (message.DatasetPath !== "") {
820
- obj.DatasetPath = message.DatasetPath;
821
- }
822
- if (message.SnapshotName !== "") {
823
- obj.SnapshotName = message.SnapshotName;
824
- }
825
- if (message.TransferMode !== 0) {
826
- obj.TransferMode = snapshotTransferModeToJSON(message.TransferMode);
827
- }
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));
828
790
  return obj;
829
791
  },
830
792
  create(base) {
@@ -861,19 +823,19 @@ exports.SnapshotBackupTransferResponse = {
861
823
  const tag = reader.uint32();
862
824
  switch (tag >>> 3) {
863
825
  case 1:
864
- if (tag !== 8) {
826
+ if (tag != 8) {
865
827
  break;
866
828
  }
867
829
  message.BytesSent = longToNumber(reader.uint64());
868
830
  continue;
869
831
  case 2:
870
- if (tag !== 16) {
832
+ if (tag != 16) {
871
833
  break;
872
834
  }
873
835
  message.BytesTotal = longToNumber(reader.uint64());
874
836
  continue;
875
837
  }
876
- if ((tag & 7) === 4 || tag === 0) {
838
+ if ((tag & 7) == 4 || tag == 0) {
877
839
  break;
878
840
  }
879
841
  reader.skipType(tag & 7);
@@ -882,18 +844,14 @@ exports.SnapshotBackupTransferResponse = {
882
844
  },
883
845
  fromJSON(object) {
884
846
  return {
885
- BytesSent: isSet(object.BytesSent) ? globalThis.Number(object.BytesSent) : 0,
886
- BytesTotal: isSet(object.BytesTotal) ? globalThis.Number(object.BytesTotal) : 0,
847
+ BytesSent: isSet(object.BytesSent) ? Number(object.BytesSent) : 0,
848
+ BytesTotal: isSet(object.BytesTotal) ? Number(object.BytesTotal) : 0,
887
849
  };
888
850
  },
889
851
  toJSON(message) {
890
852
  const obj = {};
891
- if (message.BytesSent !== 0) {
892
- obj.BytesSent = Math.round(message.BytesSent);
893
- }
894
- if (message.BytesTotal !== 0) {
895
- obj.BytesTotal = Math.round(message.BytesTotal);
896
- }
853
+ message.BytesSent !== undefined && (obj.BytesSent = Math.round(message.BytesSent));
854
+ message.BytesTotal !== undefined && (obj.BytesTotal = Math.round(message.BytesTotal));
897
855
  return obj;
898
856
  },
899
857
  create(base) {
@@ -928,19 +886,19 @@ exports.SnapshotBackupListRequest = {
928
886
  const tag = reader.uint32();
929
887
  switch (tag >>> 3) {
930
888
  case 1:
931
- if (tag !== 10) {
889
+ if (tag != 10) {
932
890
  break;
933
891
  }
934
892
  message.PoolName = reader.string();
935
893
  continue;
936
894
  case 2:
937
- if (tag !== 18) {
895
+ if (tag != 18) {
938
896
  break;
939
897
  }
940
898
  message.DatasetPath = reader.string();
941
899
  continue;
942
900
  }
943
- if ((tag & 7) === 4 || tag === 0) {
901
+ if ((tag & 7) == 4 || tag == 0) {
944
902
  break;
945
903
  }
946
904
  reader.skipType(tag & 7);
@@ -949,18 +907,14 @@ exports.SnapshotBackupListRequest = {
949
907
  },
950
908
  fromJSON(object) {
951
909
  return {
952
- PoolName: isSet(object.PoolName) ? globalThis.String(object.PoolName) : "",
953
- DatasetPath: isSet(object.DatasetPath) ? globalThis.String(object.DatasetPath) : "",
910
+ PoolName: isSet(object.PoolName) ? String(object.PoolName) : "",
911
+ DatasetPath: isSet(object.DatasetPath) ? String(object.DatasetPath) : "",
954
912
  };
955
913
  },
956
914
  toJSON(message) {
957
915
  const obj = {};
958
- if (message.PoolName !== "") {
959
- obj.PoolName = message.PoolName;
960
- }
961
- if (message.DatasetPath !== "") {
962
- obj.DatasetPath = message.DatasetPath;
963
- }
916
+ message.PoolName !== undefined && (obj.PoolName = message.PoolName);
917
+ message.DatasetPath !== undefined && (obj.DatasetPath = message.DatasetPath);
964
918
  return obj;
965
919
  },
966
920
  create(base) {
@@ -998,25 +952,25 @@ exports.SnapshotStatusResponse = {
998
952
  const tag = reader.uint32();
999
953
  switch (tag >>> 3) {
1000
954
  case 1:
1001
- if (tag !== 8) {
955
+ if (tag != 8) {
1002
956
  break;
1003
957
  }
1004
958
  message.Status = reader.int32();
1005
959
  continue;
1006
960
  case 2:
1007
- if (tag !== 16) {
961
+ if (tag != 16) {
1008
962
  break;
1009
963
  }
1010
964
  message.BytesSent = longToNumber(reader.uint64());
1011
965
  continue;
1012
966
  case 3:
1013
- if (tag !== 24) {
967
+ if (tag != 24) {
1014
968
  break;
1015
969
  }
1016
970
  message.BytesTotal = longToNumber(reader.uint64());
1017
971
  continue;
1018
972
  }
1019
- if ((tag & 7) === 4 || tag === 0) {
973
+ if ((tag & 7) == 4 || tag == 0) {
1020
974
  break;
1021
975
  }
1022
976
  reader.skipType(tag & 7);
@@ -1026,21 +980,15 @@ exports.SnapshotStatusResponse = {
1026
980
  fromJSON(object) {
1027
981
  return {
1028
982
  Status: isSet(object.Status) ? snapshotManagerStatusFromJSON(object.Status) : 0,
1029
- BytesSent: isSet(object.BytesSent) ? globalThis.Number(object.BytesSent) : 0,
1030
- BytesTotal: isSet(object.BytesTotal) ? globalThis.Number(object.BytesTotal) : 0,
983
+ BytesSent: isSet(object.BytesSent) ? Number(object.BytesSent) : 0,
984
+ BytesTotal: isSet(object.BytesTotal) ? Number(object.BytesTotal) : 0,
1031
985
  };
1032
986
  },
1033
987
  toJSON(message) {
1034
988
  const obj = {};
1035
- if (message.Status !== 0) {
1036
- obj.Status = snapshotManagerStatusToJSON(message.Status);
1037
- }
1038
- if (message.BytesSent !== 0) {
1039
- obj.BytesSent = Math.round(message.BytesSent);
1040
- }
1041
- if (message.BytesTotal !== 0) {
1042
- obj.BytesTotal = Math.round(message.BytesTotal);
1043
- }
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));
1044
992
  return obj;
1045
993
  },
1046
994
  create(base) {
@@ -1486,10 +1434,15 @@ class GrpcWebImpl {
1486
1434
  const request = Object.assign(Object.assign({}, _request), methodDesc.requestType);
1487
1435
  const maybeCombinedMetadata = metadata && this.options.metadata
1488
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))
1489
- : metadata !== null && metadata !== void 0 ? metadata : this.options.metadata;
1437
+ : metadata || this.options.metadata;
1490
1438
  return new Promise((resolve, reject) => {
1491
- var _a;
1492
- 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) {
1493
1446
  if (response.status === grpc_web_1.grpc.Code.OK) {
1494
1447
  resolve(response.message.toObject());
1495
1448
  }
@@ -1497,20 +1450,37 @@ class GrpcWebImpl {
1497
1450
  const err = new GrpcWebError(response.statusMessage, response.status, response.trailers);
1498
1451
  reject(err);
1499
1452
  }
1500
- } }));
1453
+ },
1454
+ });
1455
+ const abortHandler = () => {
1456
+ client.close();
1457
+ reject(new Error("Aborted"));
1458
+ };
1501
1459
  if (abortSignal) {
1502
- abortSignal.addEventListener("abort", () => {
1503
- client.close();
1504
- reject(abortSignal.reason);
1505
- });
1460
+ abortSignal.addEventListener("abort", abortHandler);
1506
1461
  }
1507
1462
  });
1508
1463
  }
1509
1464
  }
1510
1465
  exports.GrpcWebImpl = GrpcWebImpl;
1466
+ var tsProtoGlobalThis = (() => {
1467
+ if (typeof globalThis !== "undefined") {
1468
+ return globalThis;
1469
+ }
1470
+ if (typeof self !== "undefined") {
1471
+ return self;
1472
+ }
1473
+ if (typeof window !== "undefined") {
1474
+ return window;
1475
+ }
1476
+ if (typeof global !== "undefined") {
1477
+ return global;
1478
+ }
1479
+ throw "Unable to locate global object";
1480
+ })();
1511
1481
  function longToNumber(long) {
1512
- if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
1513
- throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
1482
+ if (long.gt(Number.MAX_SAFE_INTEGER)) {
1483
+ throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
1514
1484
  }
1515
1485
  return long.toNumber();
1516
1486
  }
@@ -1521,7 +1491,7 @@ if (minimal_1.default.util.Long !== long_1.default) {
1521
1491
  function isSet(value) {
1522
1492
  return value !== null && value !== undefined;
1523
1493
  }
1524
- class GrpcWebError extends globalThis.Error {
1494
+ class GrpcWebError extends tsProtoGlobalThis.Error {
1525
1495
  constructor(message, code, metadata) {
1526
1496
  super(message);
1527
1497
  this.code = code;