@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.
- package/dist/common/browseronly.js +2 -2
- package/dist/common/browseronly.js.map +1 -1
- package/dist/common/end_device.js +2 -2
- package/dist/common/end_device.js.map +1 -1
- package/dist/common/file_handler.js +2 -2
- package/dist/common/file_handler.js.map +1 -1
- package/dist/common/filetrans.js +2 -2
- package/dist/common/filetrans.js.map +1 -1
- package/dist/common/media_meta.js +2 -2
- package/dist/common/media_meta.js.map +1 -1
- package/dist/common/message.js +2 -2
- package/dist/common/message.js.map +1 -1
- package/dist/common/peripheral_device.d.ts +97 -28
- package/dist/common/peripheral_device.d.ts.map +1 -1
- package/dist/common/peripheral_device.js +165 -83
- package/dist/common/peripheral_device.js.map +1 -1
- package/dist/extentions/app_common.d.ts +5 -19
- package/dist/extentions/app_common.d.ts.map +1 -1
- package/dist/extentions/app_common.js +38 -108
- package/dist/extentions/app_common.js.map +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -2
- package/dist/index.js.map +1 -1
- package/dist/lanforward/lanforward.d.ts +99 -0
- package/dist/lanforward/lanforward.d.ts.map +1 -0
- package/dist/lanforward/lanforward.js +254 -0
- package/dist/lanforward/lanforward.js.map +1 -0
- package/dist/localdevice/remote-control.d.ts +0 -206
- package/dist/localdevice/remote-control.d.ts.map +1 -1
- package/dist/localdevice/remote-control.js +2 -665
- package/dist/localdevice/remote-control.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/ssdp/ssdp.d.ts +113 -0
- package/dist/ssdp/ssdp.d.ts.map +1 -0
- package/dist/ssdp/ssdp.js +292 -0
- package/dist/ssdp/ssdp.js.map +1 -0
- package/dist/sys/OS_daemon.d.ts +111 -0
- package/dist/sys/OS_daemon.d.ts.map +1 -0
- package/dist/sys/OS_daemon.js +281 -0
- package/dist/sys/OS_daemon.js.map +1 -0
- package/dist/sys/OS_snapshot.d.ts +1 -1
- package/dist/sys/OS_snapshot.d.ts.map +1 -1
- package/dist/sys/OS_snapshot.js +102 -143
- package/dist/sys/OS_snapshot.js.map +1 -1
- package/dist/sys/OS_upgrader.d.ts +1 -1
- package/dist/sys/OS_upgrader.d.ts.map +1 -1
- package/dist/sys/OS_upgrader.js +44 -53
- package/dist/sys/OS_upgrader.js.map +1 -1
- package/dist/sys/box-status.d.ts +572 -0
- package/dist/sys/box-status.d.ts.map +1 -0
- package/dist/sys/box-status.js +911 -0
- package/dist/sys/box-status.js.map +1 -0
- package/dist/sys/btled.js +2 -2
- package/dist/sys/btled.js.map +1 -1
- package/dist/sys/event.js +2 -2
- package/dist/sys/event.js.map +1 -1
- package/dist/sys/installer.d.ts +1 -1
- package/dist/sys/installer.d.ts.map +1 -1
- package/dist/sys/installer.js +74 -81
- package/dist/sys/installer.js.map +1 -1
- package/dist/sys/portal-server/portal-server.d.ts +1 -29
- package/dist/sys/portal-server/portal-server.d.ts.map +1 -1
- package/dist/sys/portal-server/portal-server.js +200 -383
- package/dist/sys/portal-server/portal-server.js.map +1 -1
- package/dist/sys/snapd.d.ts +1 -1
- package/dist/sys/snapd.d.ts.map +1 -1
- package/dist/sys/snapd.js +60 -75
- package/dist/sys/snapd.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/sys/osupgrader.d.ts +0 -256
- package/dist/sys/osupgrader.d.ts.map +0 -1
- package/dist/sys/osupgrader.js +0 -536
- package/dist/sys/osupgrader.js.map +0 -1
- package/dist/sys/tvos.d.ts +0 -480
- package/dist/sys/tvos.d.ts.map +0 -1
- package/dist/sys/tvos.js +0 -916
- package/dist/sys/tvos.js.map +0 -1
|
@@ -3,8 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.HPortalSysCheckPasswordDesc = exports.HPortalSysResetPasswordDesc = exports.HPortalSysDeleteUserDesc = exports.HPortalSysCreateUserDesc = exports.HPortalSysListUsersDesc = exports.HPortalSysQueryHServerInfoDesc = exports.HPortalSysDesc = exports.HPortalSysClientImpl = exports.
|
|
7
|
-
exports.GrpcWebError = exports.GrpcWebImpl = exports.HPortalSysDumpPeersDesc = exports.
|
|
6
|
+
exports.HPortalSysGetPasswordHashDesc = exports.HPortalSysCheckPasswordDesc = exports.HPortalSysResetPasswordDesc = exports.HPortalSysDeleteUserDesc = exports.HPortalSysCreateUserDesc = exports.HPortalSysListUsersDesc = exports.HPortalSysQueryHServerInfoDesc = exports.HPortalSysDesc = exports.HPortalSysClientImpl = exports.SetPasswordHashRequest = exports.GetPasswordHashResponse = exports.GetPasswordHashRequest = exports.PeersInfo = exports.ResetHServerReply = exports.ResetHServerRequest = exports.SetupHServerReply = exports.SetupHServerRequest = exports.ChangeTrustEndDeviceReply = exports.ChangeTrustEndDeviceRequest = exports.CheckPasswordRequest = exports.CreateUserRequest = exports.DeleteUserRequest = exports.ResetPasswordRequest = exports.QueryRoleReply = exports.ChangeRoleReqeust = exports.UserID = exports.ListEndDeviceReply = exports.ListEndDeviceRequest = exports.Device = exports.HServerInfo = exports.ListUsersReply = exports.RemoteSocksReply = exports.RemoteSocksRequest = exports.QueryBoxServicePeerCredResponse = exports.QueryBoxServicePeerCredRequest = exports.EmitBoxServiceChangedRequest = exports.RegisterBoxServiceReply = exports.RegisterBoxServiceRequest = exports.changeTrustEndDeviceRequest_ActionToJSON = exports.changeTrustEndDeviceRequest_ActionFromJSON = exports.ChangeTrustEndDeviceRequest_Action = exports.remoteSocksRequest_LocationTypeToJSON = exports.remoteSocksRequest_LocationTypeFromJSON = exports.RemoteSocksRequest_LocationType = exports.roleToJSON = exports.roleFromJSON = exports.Role = exports.dialerRoleToJSON = exports.dialerRoleFromJSON = exports.DialerRole = void 0;
|
|
7
|
+
exports.GrpcWebError = exports.GrpcWebImpl = exports.HPortalSysDumpPeersDesc = exports.HPortalSysQueryBoxServicePeerCredDesc = exports.HPortalSysEmitBoxServiceChangedDesc = exports.HPortalSysRegisterBoxServiceDesc = exports.HPortalSysResetHServerDesc = exports.HPortalSysSetupHServerDesc = exports.HPortalSysRemoteSocksDesc = exports.HPortalSysListEndDevicesDesc = exports.HPortalSysChangeTrustEndDeviceDesc = exports.HPortalSysChangeRoleDesc = exports.HPortalSysQueryRoleDesc = exports.HPortalSysSetPasswordHashDesc = void 0;
|
|
8
8
|
/* eslint-disable */
|
|
9
9
|
const grpc_web_1 = require("@improbable-eng/grpc-web");
|
|
10
10
|
const browser_headers_1 = require("browser-headers");
|
|
@@ -206,49 +206,49 @@ exports.RegisterBoxServiceRequest = {
|
|
|
206
206
|
const tag = reader.uint32();
|
|
207
207
|
switch (tag >>> 3) {
|
|
208
208
|
case 1:
|
|
209
|
-
if (tag
|
|
209
|
+
if (tag != 10) {
|
|
210
210
|
break;
|
|
211
211
|
}
|
|
212
212
|
message.serviceName = reader.string();
|
|
213
213
|
continue;
|
|
214
214
|
case 2:
|
|
215
|
-
if (tag
|
|
215
|
+
if (tag != 18) {
|
|
216
216
|
break;
|
|
217
217
|
}
|
|
218
218
|
message.serviceNetwork = reader.string();
|
|
219
219
|
continue;
|
|
220
220
|
case 3:
|
|
221
|
-
if (tag
|
|
221
|
+
if (tag != 26) {
|
|
222
222
|
break;
|
|
223
223
|
}
|
|
224
224
|
message.serviceAddress = reader.string();
|
|
225
225
|
continue;
|
|
226
226
|
case 4:
|
|
227
|
-
if (tag
|
|
227
|
+
if (tag != 34) {
|
|
228
228
|
break;
|
|
229
229
|
}
|
|
230
230
|
message.description = reader.string();
|
|
231
231
|
continue;
|
|
232
232
|
case 6:
|
|
233
|
-
if (tag
|
|
233
|
+
if (tag != 50) {
|
|
234
234
|
break;
|
|
235
235
|
}
|
|
236
236
|
message.extraInfo = reader.string();
|
|
237
237
|
continue;
|
|
238
238
|
case 7:
|
|
239
|
-
if (tag
|
|
239
|
+
if (tag != 56) {
|
|
240
240
|
break;
|
|
241
241
|
}
|
|
242
242
|
message.requireDialerRole = reader.int32();
|
|
243
243
|
continue;
|
|
244
244
|
case 8:
|
|
245
|
-
if (tag
|
|
245
|
+
if (tag != 64) {
|
|
246
246
|
break;
|
|
247
247
|
}
|
|
248
248
|
message.requireTrustDev = reader.bool();
|
|
249
249
|
continue;
|
|
250
250
|
}
|
|
251
|
-
if ((tag & 7)
|
|
251
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
252
252
|
break;
|
|
253
253
|
}
|
|
254
254
|
reader.skipType(tag & 7);
|
|
@@ -268,27 +268,13 @@ exports.RegisterBoxServiceRequest = {
|
|
|
268
268
|
},
|
|
269
269
|
toJSON(message) {
|
|
270
270
|
const obj = {};
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
obj.serviceAddress = message.serviceAddress;
|
|
279
|
-
}
|
|
280
|
-
if (message.description !== "") {
|
|
281
|
-
obj.description = message.description;
|
|
282
|
-
}
|
|
283
|
-
if (message.extraInfo !== "") {
|
|
284
|
-
obj.extraInfo = message.extraInfo;
|
|
285
|
-
}
|
|
286
|
-
if (message.requireDialerRole !== 0) {
|
|
287
|
-
obj.requireDialerRole = dialerRoleToJSON(message.requireDialerRole);
|
|
288
|
-
}
|
|
289
|
-
if (message.requireTrustDev === true) {
|
|
290
|
-
obj.requireTrustDev = message.requireTrustDev;
|
|
291
|
-
}
|
|
271
|
+
message.serviceName !== undefined && (obj.serviceName = message.serviceName);
|
|
272
|
+
message.serviceNetwork !== undefined && (obj.serviceNetwork = message.serviceNetwork);
|
|
273
|
+
message.serviceAddress !== undefined && (obj.serviceAddress = message.serviceAddress);
|
|
274
|
+
message.description !== undefined && (obj.description = message.description);
|
|
275
|
+
message.extraInfo !== undefined && (obj.extraInfo = message.extraInfo);
|
|
276
|
+
message.requireDialerRole !== undefined && (obj.requireDialerRole = dialerRoleToJSON(message.requireDialerRole));
|
|
277
|
+
message.requireTrustDev !== undefined && (obj.requireTrustDev = message.requireTrustDev);
|
|
292
278
|
return obj;
|
|
293
279
|
},
|
|
294
280
|
create(base) {
|
|
@@ -322,7 +308,7 @@ exports.RegisterBoxServiceReply = {
|
|
|
322
308
|
const tag = reader.uint32();
|
|
323
309
|
switch (tag >>> 3) {
|
|
324
310
|
}
|
|
325
|
-
if ((tag & 7)
|
|
311
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
326
312
|
break;
|
|
327
313
|
}
|
|
328
314
|
reader.skipType(tag & 7);
|
|
@@ -362,13 +348,13 @@ exports.EmitBoxServiceChangedRequest = {
|
|
|
362
348
|
const tag = reader.uint32();
|
|
363
349
|
switch (tag >>> 3) {
|
|
364
350
|
case 1:
|
|
365
|
-
if (tag
|
|
351
|
+
if (tag != 10) {
|
|
366
352
|
break;
|
|
367
353
|
}
|
|
368
354
|
message.serviceName = reader.string();
|
|
369
355
|
continue;
|
|
370
356
|
}
|
|
371
|
-
if ((tag & 7)
|
|
357
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
372
358
|
break;
|
|
373
359
|
}
|
|
374
360
|
reader.skipType(tag & 7);
|
|
@@ -380,9 +366,7 @@ exports.EmitBoxServiceChangedRequest = {
|
|
|
380
366
|
},
|
|
381
367
|
toJSON(message) {
|
|
382
368
|
const obj = {};
|
|
383
|
-
|
|
384
|
-
obj.serviceName = message.serviceName;
|
|
385
|
-
}
|
|
369
|
+
message.serviceName !== undefined && (obj.serviceName = message.serviceName);
|
|
386
370
|
return obj;
|
|
387
371
|
},
|
|
388
372
|
create(base) {
|
|
@@ -419,25 +403,25 @@ exports.QueryBoxServicePeerCredRequest = {
|
|
|
419
403
|
const tag = reader.uint32();
|
|
420
404
|
switch (tag >>> 3) {
|
|
421
405
|
case 1:
|
|
422
|
-
if (tag
|
|
406
|
+
if (tag != 10) {
|
|
423
407
|
break;
|
|
424
408
|
}
|
|
425
409
|
message.remoteAddr = reader.string();
|
|
426
410
|
continue;
|
|
427
411
|
case 2:
|
|
428
|
-
if (tag
|
|
412
|
+
if (tag != 18) {
|
|
429
413
|
break;
|
|
430
414
|
}
|
|
431
415
|
message.localAddr = reader.string();
|
|
432
416
|
continue;
|
|
433
417
|
case 3:
|
|
434
|
-
if (tag
|
|
418
|
+
if (tag != 26) {
|
|
435
419
|
break;
|
|
436
420
|
}
|
|
437
421
|
message.protocol = reader.string();
|
|
438
422
|
continue;
|
|
439
423
|
}
|
|
440
|
-
if ((tag & 7)
|
|
424
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
441
425
|
break;
|
|
442
426
|
}
|
|
443
427
|
reader.skipType(tag & 7);
|
|
@@ -453,15 +437,9 @@ exports.QueryBoxServicePeerCredRequest = {
|
|
|
453
437
|
},
|
|
454
438
|
toJSON(message) {
|
|
455
439
|
const obj = {};
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
if (message.localAddr !== "") {
|
|
460
|
-
obj.localAddr = message.localAddr;
|
|
461
|
-
}
|
|
462
|
-
if (message.protocol !== "") {
|
|
463
|
-
obj.protocol = message.protocol;
|
|
464
|
-
}
|
|
440
|
+
message.remoteAddr !== undefined && (obj.remoteAddr = message.remoteAddr);
|
|
441
|
+
message.localAddr !== undefined && (obj.localAddr = message.localAddr);
|
|
442
|
+
message.protocol !== undefined && (obj.protocol = message.protocol);
|
|
465
443
|
return obj;
|
|
466
444
|
},
|
|
467
445
|
create(base) {
|
|
@@ -509,43 +487,43 @@ exports.QueryBoxServicePeerCredResponse = {
|
|
|
509
487
|
const tag = reader.uint32();
|
|
510
488
|
switch (tag >>> 3) {
|
|
511
489
|
case 1:
|
|
512
|
-
if (tag
|
|
490
|
+
if (tag != 10) {
|
|
513
491
|
break;
|
|
514
492
|
}
|
|
515
493
|
message.uid = reader.string();
|
|
516
494
|
continue;
|
|
517
495
|
case 3:
|
|
518
|
-
if (tag
|
|
496
|
+
if (tag != 26) {
|
|
519
497
|
break;
|
|
520
498
|
}
|
|
521
499
|
message.deviceVersion = reader.string();
|
|
522
500
|
continue;
|
|
523
501
|
case 4:
|
|
524
|
-
if (tag
|
|
502
|
+
if (tag != 34) {
|
|
525
503
|
break;
|
|
526
504
|
}
|
|
527
505
|
message.virtualIp = reader.string();
|
|
528
506
|
continue;
|
|
529
507
|
case 5:
|
|
530
|
-
if (tag
|
|
508
|
+
if (tag != 42) {
|
|
531
509
|
break;
|
|
532
510
|
}
|
|
533
511
|
message.peerId = reader.string();
|
|
534
512
|
continue;
|
|
535
513
|
case 6:
|
|
536
|
-
if (tag
|
|
514
|
+
if (tag != 48) {
|
|
537
515
|
break;
|
|
538
516
|
}
|
|
539
517
|
message.isLogined = reader.bool();
|
|
540
518
|
continue;
|
|
541
519
|
case 7:
|
|
542
|
-
if (tag
|
|
520
|
+
if (tag != 56) {
|
|
543
521
|
break;
|
|
544
522
|
}
|
|
545
523
|
message.isTrustDev = reader.bool();
|
|
546
524
|
continue;
|
|
547
525
|
}
|
|
548
|
-
if ((tag & 7)
|
|
526
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
549
527
|
break;
|
|
550
528
|
}
|
|
551
529
|
reader.skipType(tag & 7);
|
|
@@ -564,24 +542,12 @@ exports.QueryBoxServicePeerCredResponse = {
|
|
|
564
542
|
},
|
|
565
543
|
toJSON(message) {
|
|
566
544
|
const obj = {};
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
if (message.virtualIp !== "") {
|
|
574
|
-
obj.virtualIp = message.virtualIp;
|
|
575
|
-
}
|
|
576
|
-
if (message.peerId !== "") {
|
|
577
|
-
obj.peerId = message.peerId;
|
|
578
|
-
}
|
|
579
|
-
if (message.isLogined === true) {
|
|
580
|
-
obj.isLogined = message.isLogined;
|
|
581
|
-
}
|
|
582
|
-
if (message.isTrustDev === true) {
|
|
583
|
-
obj.isTrustDev = message.isTrustDev;
|
|
584
|
-
}
|
|
545
|
+
message.uid !== undefined && (obj.uid = message.uid);
|
|
546
|
+
message.deviceVersion !== undefined && (obj.deviceVersion = message.deviceVersion);
|
|
547
|
+
message.virtualIp !== undefined && (obj.virtualIp = message.virtualIp);
|
|
548
|
+
message.peerId !== undefined && (obj.peerId = message.peerId);
|
|
549
|
+
message.isLogined !== undefined && (obj.isLogined = message.isLogined);
|
|
550
|
+
message.isTrustDev !== undefined && (obj.isTrustDev = message.isTrustDev);
|
|
585
551
|
return obj;
|
|
586
552
|
},
|
|
587
553
|
create(base) {
|
|
@@ -620,19 +586,19 @@ exports.RemoteSocksRequest = {
|
|
|
620
586
|
const tag = reader.uint32();
|
|
621
587
|
switch (tag >>> 3) {
|
|
622
588
|
case 1:
|
|
623
|
-
if (tag
|
|
589
|
+
if (tag != 8) {
|
|
624
590
|
break;
|
|
625
591
|
}
|
|
626
592
|
message.locationType = reader.int32();
|
|
627
593
|
continue;
|
|
628
594
|
case 2:
|
|
629
|
-
if (tag
|
|
595
|
+
if (tag != 18) {
|
|
630
596
|
break;
|
|
631
597
|
}
|
|
632
598
|
message.target = reader.string();
|
|
633
599
|
continue;
|
|
634
600
|
}
|
|
635
|
-
if ((tag & 7)
|
|
601
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
636
602
|
break;
|
|
637
603
|
}
|
|
638
604
|
reader.skipType(tag & 7);
|
|
@@ -647,12 +613,9 @@ exports.RemoteSocksRequest = {
|
|
|
647
613
|
},
|
|
648
614
|
toJSON(message) {
|
|
649
615
|
const obj = {};
|
|
650
|
-
|
|
651
|
-
obj.locationType = remoteSocksRequest_LocationTypeToJSON(message.locationType);
|
|
652
|
-
|
|
653
|
-
if (message.target !== "") {
|
|
654
|
-
obj.target = message.target;
|
|
655
|
-
}
|
|
616
|
+
message.locationType !== undefined &&
|
|
617
|
+
(obj.locationType = remoteSocksRequest_LocationTypeToJSON(message.locationType));
|
|
618
|
+
message.target !== undefined && (obj.target = message.target);
|
|
656
619
|
return obj;
|
|
657
620
|
},
|
|
658
621
|
create(base) {
|
|
@@ -684,13 +647,13 @@ exports.RemoteSocksReply = {
|
|
|
684
647
|
const tag = reader.uint32();
|
|
685
648
|
switch (tag >>> 3) {
|
|
686
649
|
case 1:
|
|
687
|
-
if (tag
|
|
650
|
+
if (tag != 10) {
|
|
688
651
|
break;
|
|
689
652
|
}
|
|
690
653
|
message.serverUrl = reader.string();
|
|
691
654
|
continue;
|
|
692
655
|
}
|
|
693
|
-
if ((tag & 7)
|
|
656
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
694
657
|
break;
|
|
695
658
|
}
|
|
696
659
|
reader.skipType(tag & 7);
|
|
@@ -702,9 +665,7 @@ exports.RemoteSocksReply = {
|
|
|
702
665
|
},
|
|
703
666
|
toJSON(message) {
|
|
704
667
|
const obj = {};
|
|
705
|
-
|
|
706
|
-
obj.serverUrl = message.serverUrl;
|
|
707
|
-
}
|
|
668
|
+
message.serverUrl !== undefined && (obj.serverUrl = message.serverUrl);
|
|
708
669
|
return obj;
|
|
709
670
|
},
|
|
710
671
|
create(base) {
|
|
@@ -735,13 +696,13 @@ exports.ListUsersReply = {
|
|
|
735
696
|
const tag = reader.uint32();
|
|
736
697
|
switch (tag >>> 3) {
|
|
737
698
|
case 1:
|
|
738
|
-
if (tag
|
|
699
|
+
if (tag != 10) {
|
|
739
700
|
break;
|
|
740
701
|
}
|
|
741
702
|
message.uids.push(reader.string());
|
|
742
703
|
continue;
|
|
743
704
|
}
|
|
744
|
-
if ((tag & 7)
|
|
705
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
745
706
|
break;
|
|
746
707
|
}
|
|
747
708
|
reader.skipType(tag & 7);
|
|
@@ -752,10 +713,12 @@ exports.ListUsersReply = {
|
|
|
752
713
|
return { uids: Array.isArray(object === null || object === void 0 ? void 0 : object.uids) ? object.uids.map((e) => String(e)) : [] };
|
|
753
714
|
},
|
|
754
715
|
toJSON(message) {
|
|
755
|
-
var _a;
|
|
756
716
|
const obj = {};
|
|
757
|
-
if (
|
|
758
|
-
obj.uids = message.uids;
|
|
717
|
+
if (message.uids) {
|
|
718
|
+
obj.uids = message.uids.map((e) => e);
|
|
719
|
+
}
|
|
720
|
+
else {
|
|
721
|
+
obj.uids = [];
|
|
759
722
|
}
|
|
760
723
|
return obj;
|
|
761
724
|
},
|
|
@@ -770,7 +733,7 @@ exports.ListUsersReply = {
|
|
|
770
733
|
},
|
|
771
734
|
};
|
|
772
735
|
function createBaseHServerInfo() {
|
|
773
|
-
return { originServer: "", virtualIp: "", boxId: "", boxName: "", boxDomain: ""
|
|
736
|
+
return { originServer: "", virtualIp: "", boxId: "", boxName: "", boxDomain: "" };
|
|
774
737
|
}
|
|
775
738
|
exports.HServerInfo = {
|
|
776
739
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
@@ -789,9 +752,6 @@ exports.HServerInfo = {
|
|
|
789
752
|
if (message.boxDomain !== "") {
|
|
790
753
|
writer.uint32(42).string(message.boxDomain);
|
|
791
754
|
}
|
|
792
|
-
if (message.relayServer !== "") {
|
|
793
|
-
writer.uint32(50).string(message.relayServer);
|
|
794
|
-
}
|
|
795
755
|
return writer;
|
|
796
756
|
},
|
|
797
757
|
decode(input, length) {
|
|
@@ -802,43 +762,37 @@ exports.HServerInfo = {
|
|
|
802
762
|
const tag = reader.uint32();
|
|
803
763
|
switch (tag >>> 3) {
|
|
804
764
|
case 1:
|
|
805
|
-
if (tag
|
|
765
|
+
if (tag != 10) {
|
|
806
766
|
break;
|
|
807
767
|
}
|
|
808
768
|
message.originServer = reader.string();
|
|
809
769
|
continue;
|
|
810
770
|
case 2:
|
|
811
|
-
if (tag
|
|
771
|
+
if (tag != 18) {
|
|
812
772
|
break;
|
|
813
773
|
}
|
|
814
774
|
message.virtualIp = reader.string();
|
|
815
775
|
continue;
|
|
816
776
|
case 3:
|
|
817
|
-
if (tag
|
|
777
|
+
if (tag != 26) {
|
|
818
778
|
break;
|
|
819
779
|
}
|
|
820
780
|
message.boxId = reader.string();
|
|
821
781
|
continue;
|
|
822
782
|
case 4:
|
|
823
|
-
if (tag
|
|
783
|
+
if (tag != 34) {
|
|
824
784
|
break;
|
|
825
785
|
}
|
|
826
786
|
message.boxName = reader.string();
|
|
827
787
|
continue;
|
|
828
788
|
case 5:
|
|
829
|
-
if (tag
|
|
789
|
+
if (tag != 42) {
|
|
830
790
|
break;
|
|
831
791
|
}
|
|
832
792
|
message.boxDomain = reader.string();
|
|
833
793
|
continue;
|
|
834
|
-
case 6:
|
|
835
|
-
if (tag !== 50) {
|
|
836
|
-
break;
|
|
837
|
-
}
|
|
838
|
-
message.relayServer = reader.string();
|
|
839
|
-
continue;
|
|
840
794
|
}
|
|
841
|
-
if ((tag & 7)
|
|
795
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
842
796
|
break;
|
|
843
797
|
}
|
|
844
798
|
reader.skipType(tag & 7);
|
|
@@ -852,43 +806,28 @@ exports.HServerInfo = {
|
|
|
852
806
|
boxId: isSet(object.boxId) ? String(object.boxId) : "",
|
|
853
807
|
boxName: isSet(object.boxName) ? String(object.boxName) : "",
|
|
854
808
|
boxDomain: isSet(object.boxDomain) ? String(object.boxDomain) : "",
|
|
855
|
-
relayServer: isSet(object.relayServer) ? String(object.relayServer) : "",
|
|
856
809
|
};
|
|
857
810
|
},
|
|
858
811
|
toJSON(message) {
|
|
859
812
|
const obj = {};
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
}
|
|
866
|
-
if (message.boxId !== "") {
|
|
867
|
-
obj.boxId = message.boxId;
|
|
868
|
-
}
|
|
869
|
-
if (message.boxName !== "") {
|
|
870
|
-
obj.boxName = message.boxName;
|
|
871
|
-
}
|
|
872
|
-
if (message.boxDomain !== "") {
|
|
873
|
-
obj.boxDomain = message.boxDomain;
|
|
874
|
-
}
|
|
875
|
-
if (message.relayServer !== "") {
|
|
876
|
-
obj.relayServer = message.relayServer;
|
|
877
|
-
}
|
|
813
|
+
message.originServer !== undefined && (obj.originServer = message.originServer);
|
|
814
|
+
message.virtualIp !== undefined && (obj.virtualIp = message.virtualIp);
|
|
815
|
+
message.boxId !== undefined && (obj.boxId = message.boxId);
|
|
816
|
+
message.boxName !== undefined && (obj.boxName = message.boxName);
|
|
817
|
+
message.boxDomain !== undefined && (obj.boxDomain = message.boxDomain);
|
|
878
818
|
return obj;
|
|
879
819
|
},
|
|
880
820
|
create(base) {
|
|
881
821
|
return exports.HServerInfo.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
882
822
|
},
|
|
883
823
|
fromPartial(object) {
|
|
884
|
-
var _a, _b, _c, _d, _e
|
|
824
|
+
var _a, _b, _c, _d, _e;
|
|
885
825
|
const message = createBaseHServerInfo();
|
|
886
826
|
message.originServer = (_a = object.originServer) !== null && _a !== void 0 ? _a : "";
|
|
887
827
|
message.virtualIp = (_b = object.virtualIp) !== null && _b !== void 0 ? _b : "";
|
|
888
828
|
message.boxId = (_c = object.boxId) !== null && _c !== void 0 ? _c : "";
|
|
889
829
|
message.boxName = (_d = object.boxName) !== null && _d !== void 0 ? _d : "";
|
|
890
830
|
message.boxDomain = (_e = object.boxDomain) !== null && _e !== void 0 ? _e : "";
|
|
891
|
-
message.relayServer = (_f = object.relayServer) !== null && _f !== void 0 ? _f : "";
|
|
892
831
|
return message;
|
|
893
832
|
},
|
|
894
833
|
};
|
|
@@ -916,25 +855,25 @@ exports.Device = {
|
|
|
916
855
|
const tag = reader.uint32();
|
|
917
856
|
switch (tag >>> 3) {
|
|
918
857
|
case 1:
|
|
919
|
-
if (tag
|
|
858
|
+
if (tag != 10) {
|
|
920
859
|
break;
|
|
921
860
|
}
|
|
922
861
|
message.peerId = reader.string();
|
|
923
862
|
continue;
|
|
924
863
|
case 2:
|
|
925
|
-
if (tag
|
|
864
|
+
if (tag != 16) {
|
|
926
865
|
break;
|
|
927
866
|
}
|
|
928
867
|
message.isOnline = reader.bool();
|
|
929
868
|
continue;
|
|
930
869
|
case 6:
|
|
931
|
-
if (tag
|
|
870
|
+
if (tag != 50) {
|
|
932
871
|
break;
|
|
933
872
|
}
|
|
934
873
|
message.bindingTime = fromTimestamp(timestamp_1.Timestamp.decode(reader, reader.uint32()));
|
|
935
874
|
continue;
|
|
936
875
|
}
|
|
937
|
-
if ((tag & 7)
|
|
876
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
938
877
|
break;
|
|
939
878
|
}
|
|
940
879
|
reader.skipType(tag & 7);
|
|
@@ -950,15 +889,9 @@ exports.Device = {
|
|
|
950
889
|
},
|
|
951
890
|
toJSON(message) {
|
|
952
891
|
const obj = {};
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
if (message.isOnline === true) {
|
|
957
|
-
obj.isOnline = message.isOnline;
|
|
958
|
-
}
|
|
959
|
-
if (message.bindingTime !== undefined) {
|
|
960
|
-
obj.bindingTime = message.bindingTime.toISOString();
|
|
961
|
-
}
|
|
892
|
+
message.peerId !== undefined && (obj.peerId = message.peerId);
|
|
893
|
+
message.isOnline !== undefined && (obj.isOnline = message.isOnline);
|
|
894
|
+
message.bindingTime !== undefined && (obj.bindingTime = message.bindingTime.toISOString());
|
|
962
895
|
return obj;
|
|
963
896
|
},
|
|
964
897
|
create(base) {
|
|
@@ -991,13 +924,13 @@ exports.ListEndDeviceRequest = {
|
|
|
991
924
|
const tag = reader.uint32();
|
|
992
925
|
switch (tag >>> 3) {
|
|
993
926
|
case 1:
|
|
994
|
-
if (tag
|
|
927
|
+
if (tag != 10) {
|
|
995
928
|
break;
|
|
996
929
|
}
|
|
997
930
|
message.uid = reader.string();
|
|
998
931
|
continue;
|
|
999
932
|
}
|
|
1000
|
-
if ((tag & 7)
|
|
933
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
1001
934
|
break;
|
|
1002
935
|
}
|
|
1003
936
|
reader.skipType(tag & 7);
|
|
@@ -1009,9 +942,7 @@ exports.ListEndDeviceRequest = {
|
|
|
1009
942
|
},
|
|
1010
943
|
toJSON(message) {
|
|
1011
944
|
const obj = {};
|
|
1012
|
-
|
|
1013
|
-
obj.uid = message.uid;
|
|
1014
|
-
}
|
|
945
|
+
message.uid !== undefined && (obj.uid = message.uid);
|
|
1015
946
|
return obj;
|
|
1016
947
|
},
|
|
1017
948
|
create(base) {
|
|
@@ -1042,13 +973,13 @@ exports.ListEndDeviceReply = {
|
|
|
1042
973
|
const tag = reader.uint32();
|
|
1043
974
|
switch (tag >>> 3) {
|
|
1044
975
|
case 1:
|
|
1045
|
-
if (tag
|
|
976
|
+
if (tag != 10) {
|
|
1046
977
|
break;
|
|
1047
978
|
}
|
|
1048
979
|
message.devices.push(exports.Device.decode(reader, reader.uint32()));
|
|
1049
980
|
continue;
|
|
1050
981
|
}
|
|
1051
|
-
if ((tag & 7)
|
|
982
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
1052
983
|
break;
|
|
1053
984
|
}
|
|
1054
985
|
reader.skipType(tag & 7);
|
|
@@ -1059,10 +990,12 @@ exports.ListEndDeviceReply = {
|
|
|
1059
990
|
return { devices: Array.isArray(object === null || object === void 0 ? void 0 : object.devices) ? object.devices.map((e) => exports.Device.fromJSON(e)) : [] };
|
|
1060
991
|
},
|
|
1061
992
|
toJSON(message) {
|
|
1062
|
-
var _a;
|
|
1063
993
|
const obj = {};
|
|
1064
|
-
if (
|
|
1065
|
-
obj.devices = message.devices.map((e) => exports.Device.toJSON(e));
|
|
994
|
+
if (message.devices) {
|
|
995
|
+
obj.devices = message.devices.map((e) => e ? exports.Device.toJSON(e) : undefined);
|
|
996
|
+
}
|
|
997
|
+
else {
|
|
998
|
+
obj.devices = [];
|
|
1066
999
|
}
|
|
1067
1000
|
return obj;
|
|
1068
1001
|
},
|
|
@@ -1094,13 +1027,13 @@ exports.UserID = {
|
|
|
1094
1027
|
const tag = reader.uint32();
|
|
1095
1028
|
switch (tag >>> 3) {
|
|
1096
1029
|
case 1:
|
|
1097
|
-
if (tag
|
|
1030
|
+
if (tag != 10) {
|
|
1098
1031
|
break;
|
|
1099
1032
|
}
|
|
1100
1033
|
message.uid = reader.string();
|
|
1101
1034
|
continue;
|
|
1102
1035
|
}
|
|
1103
|
-
if ((tag & 7)
|
|
1036
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
1104
1037
|
break;
|
|
1105
1038
|
}
|
|
1106
1039
|
reader.skipType(tag & 7);
|
|
@@ -1112,9 +1045,7 @@ exports.UserID = {
|
|
|
1112
1045
|
},
|
|
1113
1046
|
toJSON(message) {
|
|
1114
1047
|
const obj = {};
|
|
1115
|
-
|
|
1116
|
-
obj.uid = message.uid;
|
|
1117
|
-
}
|
|
1048
|
+
message.uid !== undefined && (obj.uid = message.uid);
|
|
1118
1049
|
return obj;
|
|
1119
1050
|
},
|
|
1120
1051
|
create(base) {
|
|
@@ -1148,19 +1079,19 @@ exports.ChangeRoleReqeust = {
|
|
|
1148
1079
|
const tag = reader.uint32();
|
|
1149
1080
|
switch (tag >>> 3) {
|
|
1150
1081
|
case 1:
|
|
1151
|
-
if (tag
|
|
1082
|
+
if (tag != 10) {
|
|
1152
1083
|
break;
|
|
1153
1084
|
}
|
|
1154
1085
|
message.uid = reader.string();
|
|
1155
1086
|
continue;
|
|
1156
1087
|
case 2:
|
|
1157
|
-
if (tag
|
|
1088
|
+
if (tag != 16) {
|
|
1158
1089
|
break;
|
|
1159
1090
|
}
|
|
1160
1091
|
message.role = reader.int32();
|
|
1161
1092
|
continue;
|
|
1162
1093
|
}
|
|
1163
|
-
if ((tag & 7)
|
|
1094
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
1164
1095
|
break;
|
|
1165
1096
|
}
|
|
1166
1097
|
reader.skipType(tag & 7);
|
|
@@ -1175,12 +1106,8 @@ exports.ChangeRoleReqeust = {
|
|
|
1175
1106
|
},
|
|
1176
1107
|
toJSON(message) {
|
|
1177
1108
|
const obj = {};
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
}
|
|
1181
|
-
if (message.role !== 0) {
|
|
1182
|
-
obj.role = roleToJSON(message.role);
|
|
1183
|
-
}
|
|
1109
|
+
message.uid !== undefined && (obj.uid = message.uid);
|
|
1110
|
+
message.role !== undefined && (obj.role = roleToJSON(message.role));
|
|
1184
1111
|
return obj;
|
|
1185
1112
|
},
|
|
1186
1113
|
create(base) {
|
|
@@ -1215,19 +1142,19 @@ exports.QueryRoleReply = {
|
|
|
1215
1142
|
const tag = reader.uint32();
|
|
1216
1143
|
switch (tag >>> 3) {
|
|
1217
1144
|
case 1:
|
|
1218
|
-
if (tag
|
|
1145
|
+
if (tag != 10) {
|
|
1219
1146
|
break;
|
|
1220
1147
|
}
|
|
1221
1148
|
message.uid = reader.string();
|
|
1222
1149
|
continue;
|
|
1223
1150
|
case 2:
|
|
1224
|
-
if (tag
|
|
1151
|
+
if (tag != 16) {
|
|
1225
1152
|
break;
|
|
1226
1153
|
}
|
|
1227
1154
|
message.role = reader.int32();
|
|
1228
1155
|
continue;
|
|
1229
1156
|
}
|
|
1230
|
-
if ((tag & 7)
|
|
1157
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
1231
1158
|
break;
|
|
1232
1159
|
}
|
|
1233
1160
|
reader.skipType(tag & 7);
|
|
@@ -1242,12 +1169,8 @@ exports.QueryRoleReply = {
|
|
|
1242
1169
|
},
|
|
1243
1170
|
toJSON(message) {
|
|
1244
1171
|
const obj = {};
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
}
|
|
1248
|
-
if (message.role !== 0) {
|
|
1249
|
-
obj.role = roleToJSON(message.role);
|
|
1250
|
-
}
|
|
1172
|
+
message.uid !== undefined && (obj.uid = message.uid);
|
|
1173
|
+
message.role !== undefined && (obj.role = roleToJSON(message.role));
|
|
1251
1174
|
return obj;
|
|
1252
1175
|
},
|
|
1253
1176
|
create(base) {
|
|
@@ -1282,19 +1205,19 @@ exports.ResetPasswordRequest = {
|
|
|
1282
1205
|
const tag = reader.uint32();
|
|
1283
1206
|
switch (tag >>> 3) {
|
|
1284
1207
|
case 1:
|
|
1285
|
-
if (tag
|
|
1208
|
+
if (tag != 10) {
|
|
1286
1209
|
break;
|
|
1287
1210
|
}
|
|
1288
1211
|
message.uid = reader.string();
|
|
1289
1212
|
continue;
|
|
1290
1213
|
case 3:
|
|
1291
|
-
if (tag
|
|
1214
|
+
if (tag != 26) {
|
|
1292
1215
|
break;
|
|
1293
1216
|
}
|
|
1294
1217
|
message.newPassword = reader.string();
|
|
1295
1218
|
continue;
|
|
1296
1219
|
}
|
|
1297
|
-
if ((tag & 7)
|
|
1220
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
1298
1221
|
break;
|
|
1299
1222
|
}
|
|
1300
1223
|
reader.skipType(tag & 7);
|
|
@@ -1309,12 +1232,8 @@ exports.ResetPasswordRequest = {
|
|
|
1309
1232
|
},
|
|
1310
1233
|
toJSON(message) {
|
|
1311
1234
|
const obj = {};
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
}
|
|
1315
|
-
if (message.newPassword !== "") {
|
|
1316
|
-
obj.newPassword = message.newPassword;
|
|
1317
|
-
}
|
|
1235
|
+
message.uid !== undefined && (obj.uid = message.uid);
|
|
1236
|
+
message.newPassword !== undefined && (obj.newPassword = message.newPassword);
|
|
1318
1237
|
return obj;
|
|
1319
1238
|
},
|
|
1320
1239
|
create(base) {
|
|
@@ -1346,13 +1265,13 @@ exports.DeleteUserRequest = {
|
|
|
1346
1265
|
const tag = reader.uint32();
|
|
1347
1266
|
switch (tag >>> 3) {
|
|
1348
1267
|
case 1:
|
|
1349
|
-
if (tag
|
|
1268
|
+
if (tag != 10) {
|
|
1350
1269
|
break;
|
|
1351
1270
|
}
|
|
1352
1271
|
message.uid = reader.string();
|
|
1353
1272
|
continue;
|
|
1354
1273
|
}
|
|
1355
|
-
if ((tag & 7)
|
|
1274
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
1356
1275
|
break;
|
|
1357
1276
|
}
|
|
1358
1277
|
reader.skipType(tag & 7);
|
|
@@ -1364,9 +1283,7 @@ exports.DeleteUserRequest = {
|
|
|
1364
1283
|
},
|
|
1365
1284
|
toJSON(message) {
|
|
1366
1285
|
const obj = {};
|
|
1367
|
-
|
|
1368
|
-
obj.uid = message.uid;
|
|
1369
|
-
}
|
|
1286
|
+
message.uid !== undefined && (obj.uid = message.uid);
|
|
1370
1287
|
return obj;
|
|
1371
1288
|
},
|
|
1372
1289
|
create(base) {
|
|
@@ -1403,25 +1320,25 @@ exports.CreateUserRequest = {
|
|
|
1403
1320
|
const tag = reader.uint32();
|
|
1404
1321
|
switch (tag >>> 3) {
|
|
1405
1322
|
case 1:
|
|
1406
|
-
if (tag
|
|
1323
|
+
if (tag != 10) {
|
|
1407
1324
|
break;
|
|
1408
1325
|
}
|
|
1409
1326
|
message.uid = reader.string();
|
|
1410
1327
|
continue;
|
|
1411
1328
|
case 2:
|
|
1412
|
-
if (tag
|
|
1329
|
+
if (tag != 18) {
|
|
1413
1330
|
break;
|
|
1414
1331
|
}
|
|
1415
1332
|
message.password = reader.string();
|
|
1416
1333
|
continue;
|
|
1417
1334
|
case 3:
|
|
1418
|
-
if (tag
|
|
1335
|
+
if (tag != 24) {
|
|
1419
1336
|
break;
|
|
1420
1337
|
}
|
|
1421
1338
|
message.role = reader.int32();
|
|
1422
1339
|
continue;
|
|
1423
1340
|
}
|
|
1424
|
-
if ((tag & 7)
|
|
1341
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
1425
1342
|
break;
|
|
1426
1343
|
}
|
|
1427
1344
|
reader.skipType(tag & 7);
|
|
@@ -1437,15 +1354,9 @@ exports.CreateUserRequest = {
|
|
|
1437
1354
|
},
|
|
1438
1355
|
toJSON(message) {
|
|
1439
1356
|
const obj = {};
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
if (message.password !== "") {
|
|
1444
|
-
obj.password = message.password;
|
|
1445
|
-
}
|
|
1446
|
-
if (message.role !== 0) {
|
|
1447
|
-
obj.role = roleToJSON(message.role);
|
|
1448
|
-
}
|
|
1357
|
+
message.uid !== undefined && (obj.uid = message.uid);
|
|
1358
|
+
message.password !== undefined && (obj.password = message.password);
|
|
1359
|
+
message.role !== undefined && (obj.role = roleToJSON(message.role));
|
|
1449
1360
|
return obj;
|
|
1450
1361
|
},
|
|
1451
1362
|
create(base) {
|
|
@@ -1481,19 +1392,19 @@ exports.CheckPasswordRequest = {
|
|
|
1481
1392
|
const tag = reader.uint32();
|
|
1482
1393
|
switch (tag >>> 3) {
|
|
1483
1394
|
case 1:
|
|
1484
|
-
if (tag
|
|
1395
|
+
if (tag != 10) {
|
|
1485
1396
|
break;
|
|
1486
1397
|
}
|
|
1487
1398
|
message.uid = reader.string();
|
|
1488
1399
|
continue;
|
|
1489
1400
|
case 2:
|
|
1490
|
-
if (tag
|
|
1401
|
+
if (tag != 18) {
|
|
1491
1402
|
break;
|
|
1492
1403
|
}
|
|
1493
1404
|
message.password = reader.string();
|
|
1494
1405
|
continue;
|
|
1495
1406
|
}
|
|
1496
|
-
if ((tag & 7)
|
|
1407
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
1497
1408
|
break;
|
|
1498
1409
|
}
|
|
1499
1410
|
reader.skipType(tag & 7);
|
|
@@ -1508,12 +1419,8 @@ exports.CheckPasswordRequest = {
|
|
|
1508
1419
|
},
|
|
1509
1420
|
toJSON(message) {
|
|
1510
1421
|
const obj = {};
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
}
|
|
1514
|
-
if (message.password !== "") {
|
|
1515
|
-
obj.password = message.password;
|
|
1516
|
-
}
|
|
1422
|
+
message.uid !== undefined && (obj.uid = message.uid);
|
|
1423
|
+
message.password !== undefined && (obj.password = message.password);
|
|
1517
1424
|
return obj;
|
|
1518
1425
|
},
|
|
1519
1426
|
create(base) {
|
|
@@ -1551,25 +1458,25 @@ exports.ChangeTrustEndDeviceRequest = {
|
|
|
1551
1458
|
const tag = reader.uint32();
|
|
1552
1459
|
switch (tag >>> 3) {
|
|
1553
1460
|
case 1:
|
|
1554
|
-
if (tag
|
|
1461
|
+
if (tag != 10) {
|
|
1555
1462
|
break;
|
|
1556
1463
|
}
|
|
1557
1464
|
message.uid = reader.string();
|
|
1558
1465
|
continue;
|
|
1559
1466
|
case 2:
|
|
1560
|
-
if (tag
|
|
1467
|
+
if (tag != 18) {
|
|
1561
1468
|
break;
|
|
1562
1469
|
}
|
|
1563
1470
|
message.cid = reader.string();
|
|
1564
1471
|
continue;
|
|
1565
1472
|
case 3:
|
|
1566
|
-
if (tag
|
|
1473
|
+
if (tag != 24) {
|
|
1567
1474
|
break;
|
|
1568
1475
|
}
|
|
1569
1476
|
message.action = reader.int32();
|
|
1570
1477
|
continue;
|
|
1571
1478
|
}
|
|
1572
|
-
if ((tag & 7)
|
|
1479
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
1573
1480
|
break;
|
|
1574
1481
|
}
|
|
1575
1482
|
reader.skipType(tag & 7);
|
|
@@ -1585,15 +1492,9 @@ exports.ChangeTrustEndDeviceRequest = {
|
|
|
1585
1492
|
},
|
|
1586
1493
|
toJSON(message) {
|
|
1587
1494
|
const obj = {};
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
if (message.cid !== "") {
|
|
1592
|
-
obj.cid = message.cid;
|
|
1593
|
-
}
|
|
1594
|
-
if (message.action !== 0) {
|
|
1595
|
-
obj.action = changeTrustEndDeviceRequest_ActionToJSON(message.action);
|
|
1596
|
-
}
|
|
1495
|
+
message.uid !== undefined && (obj.uid = message.uid);
|
|
1496
|
+
message.cid !== undefined && (obj.cid = message.cid);
|
|
1497
|
+
message.action !== undefined && (obj.action = changeTrustEndDeviceRequest_ActionToJSON(message.action));
|
|
1597
1498
|
return obj;
|
|
1598
1499
|
},
|
|
1599
1500
|
create(base) {
|
|
@@ -1623,7 +1524,7 @@ exports.ChangeTrustEndDeviceReply = {
|
|
|
1623
1524
|
const tag = reader.uint32();
|
|
1624
1525
|
switch (tag >>> 3) {
|
|
1625
1526
|
}
|
|
1626
|
-
if ((tag & 7)
|
|
1527
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
1627
1528
|
break;
|
|
1628
1529
|
}
|
|
1629
1530
|
reader.skipType(tag & 7);
|
|
@@ -1672,31 +1573,31 @@ exports.SetupHServerRequest = {
|
|
|
1672
1573
|
const tag = reader.uint32();
|
|
1673
1574
|
switch (tag >>> 3) {
|
|
1674
1575
|
case 1:
|
|
1675
|
-
if (tag
|
|
1576
|
+
if (tag != 10) {
|
|
1676
1577
|
break;
|
|
1677
1578
|
}
|
|
1678
1579
|
message.originServer = reader.string();
|
|
1679
1580
|
continue;
|
|
1680
1581
|
case 2:
|
|
1681
|
-
if (tag
|
|
1582
|
+
if (tag != 18) {
|
|
1682
1583
|
break;
|
|
1683
1584
|
}
|
|
1684
1585
|
message.boxName = reader.string();
|
|
1685
1586
|
continue;
|
|
1686
1587
|
case 3:
|
|
1687
|
-
if (tag
|
|
1588
|
+
if (tag != 26) {
|
|
1688
1589
|
break;
|
|
1689
1590
|
}
|
|
1690
1591
|
message.username = reader.string();
|
|
1691
1592
|
continue;
|
|
1692
1593
|
case 4:
|
|
1693
|
-
if (tag
|
|
1594
|
+
if (tag != 34) {
|
|
1694
1595
|
break;
|
|
1695
1596
|
}
|
|
1696
1597
|
message.password = reader.string();
|
|
1697
1598
|
continue;
|
|
1698
1599
|
}
|
|
1699
|
-
if ((tag & 7)
|
|
1600
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
1700
1601
|
break;
|
|
1701
1602
|
}
|
|
1702
1603
|
reader.skipType(tag & 7);
|
|
@@ -1713,18 +1614,10 @@ exports.SetupHServerRequest = {
|
|
|
1713
1614
|
},
|
|
1714
1615
|
toJSON(message) {
|
|
1715
1616
|
const obj = {};
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
obj.boxName = message.boxName;
|
|
1721
|
-
}
|
|
1722
|
-
if (message.username !== "") {
|
|
1723
|
-
obj.username = message.username;
|
|
1724
|
-
}
|
|
1725
|
-
if (message.password !== "") {
|
|
1726
|
-
obj.password = message.password;
|
|
1727
|
-
}
|
|
1617
|
+
message.originServer !== undefined && (obj.originServer = message.originServer);
|
|
1618
|
+
message.boxName !== undefined && (obj.boxName = message.boxName);
|
|
1619
|
+
message.username !== undefined && (obj.username = message.username);
|
|
1620
|
+
message.password !== undefined && (obj.password = message.password);
|
|
1728
1621
|
return obj;
|
|
1729
1622
|
},
|
|
1730
1623
|
create(base) {
|
|
@@ -1761,19 +1654,19 @@ exports.SetupHServerReply = {
|
|
|
1761
1654
|
const tag = reader.uint32();
|
|
1762
1655
|
switch (tag >>> 3) {
|
|
1763
1656
|
case 1:
|
|
1764
|
-
if (tag
|
|
1657
|
+
if (tag != 8) {
|
|
1765
1658
|
break;
|
|
1766
1659
|
}
|
|
1767
1660
|
message.ok = reader.bool();
|
|
1768
1661
|
continue;
|
|
1769
1662
|
case 2:
|
|
1770
|
-
if (tag
|
|
1663
|
+
if (tag != 18) {
|
|
1771
1664
|
break;
|
|
1772
1665
|
}
|
|
1773
1666
|
message.reason = reader.string();
|
|
1774
1667
|
continue;
|
|
1775
1668
|
}
|
|
1776
|
-
if ((tag & 7)
|
|
1669
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
1777
1670
|
break;
|
|
1778
1671
|
}
|
|
1779
1672
|
reader.skipType(tag & 7);
|
|
@@ -1788,12 +1681,8 @@ exports.SetupHServerReply = {
|
|
|
1788
1681
|
},
|
|
1789
1682
|
toJSON(message) {
|
|
1790
1683
|
const obj = {};
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
}
|
|
1794
|
-
if (message.reason !== "") {
|
|
1795
|
-
obj.reason = message.reason;
|
|
1796
|
-
}
|
|
1684
|
+
message.ok !== undefined && (obj.ok = message.ok);
|
|
1685
|
+
message.reason !== undefined && (obj.reason = message.reason);
|
|
1797
1686
|
return obj;
|
|
1798
1687
|
},
|
|
1799
1688
|
create(base) {
|
|
@@ -1825,13 +1714,13 @@ exports.ResetHServerRequest = {
|
|
|
1825
1714
|
const tag = reader.uint32();
|
|
1826
1715
|
switch (tag >>> 3) {
|
|
1827
1716
|
case 1:
|
|
1828
|
-
if (tag
|
|
1717
|
+
if (tag != 10) {
|
|
1829
1718
|
break;
|
|
1830
1719
|
}
|
|
1831
1720
|
message.originServer = reader.string();
|
|
1832
1721
|
continue;
|
|
1833
1722
|
}
|
|
1834
|
-
if ((tag & 7)
|
|
1723
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
1835
1724
|
break;
|
|
1836
1725
|
}
|
|
1837
1726
|
reader.skipType(tag & 7);
|
|
@@ -1843,9 +1732,7 @@ exports.ResetHServerRequest = {
|
|
|
1843
1732
|
},
|
|
1844
1733
|
toJSON(message) {
|
|
1845
1734
|
const obj = {};
|
|
1846
|
-
|
|
1847
|
-
obj.originServer = message.originServer;
|
|
1848
|
-
}
|
|
1735
|
+
message.originServer !== undefined && (obj.originServer = message.originServer);
|
|
1849
1736
|
return obj;
|
|
1850
1737
|
},
|
|
1851
1738
|
create(base) {
|
|
@@ -1873,7 +1760,7 @@ exports.ResetHServerReply = {
|
|
|
1873
1760
|
const tag = reader.uint32();
|
|
1874
1761
|
switch (tag >>> 3) {
|
|
1875
1762
|
}
|
|
1876
|
-
if ((tag & 7)
|
|
1763
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
1877
1764
|
break;
|
|
1878
1765
|
}
|
|
1879
1766
|
reader.skipType(tag & 7);
|
|
@@ -1913,13 +1800,13 @@ exports.PeersInfo = {
|
|
|
1913
1800
|
const tag = reader.uint32();
|
|
1914
1801
|
switch (tag >>> 3) {
|
|
1915
1802
|
case 1:
|
|
1916
|
-
if (tag
|
|
1803
|
+
if (tag != 10) {
|
|
1917
1804
|
break;
|
|
1918
1805
|
}
|
|
1919
1806
|
message.peerInfo = reader.string();
|
|
1920
1807
|
continue;
|
|
1921
1808
|
}
|
|
1922
|
-
if ((tag & 7)
|
|
1809
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
1923
1810
|
break;
|
|
1924
1811
|
}
|
|
1925
1812
|
reader.skipType(tag & 7);
|
|
@@ -1931,9 +1818,7 @@ exports.PeersInfo = {
|
|
|
1931
1818
|
},
|
|
1932
1819
|
toJSON(message) {
|
|
1933
1820
|
const obj = {};
|
|
1934
|
-
|
|
1935
|
-
obj.peerInfo = message.peerInfo;
|
|
1936
|
-
}
|
|
1821
|
+
message.peerInfo !== undefined && (obj.peerInfo = message.peerInfo);
|
|
1937
1822
|
return obj;
|
|
1938
1823
|
},
|
|
1939
1824
|
create(base) {
|
|
@@ -1964,13 +1849,13 @@ exports.GetPasswordHashRequest = {
|
|
|
1964
1849
|
const tag = reader.uint32();
|
|
1965
1850
|
switch (tag >>> 3) {
|
|
1966
1851
|
case 1:
|
|
1967
|
-
if (tag
|
|
1852
|
+
if (tag != 10) {
|
|
1968
1853
|
break;
|
|
1969
1854
|
}
|
|
1970
1855
|
message.uid = reader.string();
|
|
1971
1856
|
continue;
|
|
1972
1857
|
}
|
|
1973
|
-
if ((tag & 7)
|
|
1858
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
1974
1859
|
break;
|
|
1975
1860
|
}
|
|
1976
1861
|
reader.skipType(tag & 7);
|
|
@@ -1982,9 +1867,7 @@ exports.GetPasswordHashRequest = {
|
|
|
1982
1867
|
},
|
|
1983
1868
|
toJSON(message) {
|
|
1984
1869
|
const obj = {};
|
|
1985
|
-
|
|
1986
|
-
obj.uid = message.uid;
|
|
1987
|
-
}
|
|
1870
|
+
message.uid !== undefined && (obj.uid = message.uid);
|
|
1988
1871
|
return obj;
|
|
1989
1872
|
},
|
|
1990
1873
|
create(base) {
|
|
@@ -2015,13 +1898,13 @@ exports.GetPasswordHashResponse = {
|
|
|
2015
1898
|
const tag = reader.uint32();
|
|
2016
1899
|
switch (tag >>> 3) {
|
|
2017
1900
|
case 1:
|
|
2018
|
-
if (tag
|
|
1901
|
+
if (tag != 10) {
|
|
2019
1902
|
break;
|
|
2020
1903
|
}
|
|
2021
1904
|
message.passwordHash = reader.string();
|
|
2022
1905
|
continue;
|
|
2023
1906
|
}
|
|
2024
|
-
if ((tag & 7)
|
|
1907
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
2025
1908
|
break;
|
|
2026
1909
|
}
|
|
2027
1910
|
reader.skipType(tag & 7);
|
|
@@ -2033,9 +1916,7 @@ exports.GetPasswordHashResponse = {
|
|
|
2033
1916
|
},
|
|
2034
1917
|
toJSON(message) {
|
|
2035
1918
|
const obj = {};
|
|
2036
|
-
|
|
2037
|
-
obj.passwordHash = message.passwordHash;
|
|
2038
|
-
}
|
|
1919
|
+
message.passwordHash !== undefined && (obj.passwordHash = message.passwordHash);
|
|
2039
1920
|
return obj;
|
|
2040
1921
|
},
|
|
2041
1922
|
create(base) {
|
|
@@ -2069,19 +1950,19 @@ exports.SetPasswordHashRequest = {
|
|
|
2069
1950
|
const tag = reader.uint32();
|
|
2070
1951
|
switch (tag >>> 3) {
|
|
2071
1952
|
case 1:
|
|
2072
|
-
if (tag
|
|
1953
|
+
if (tag != 10) {
|
|
2073
1954
|
break;
|
|
2074
1955
|
}
|
|
2075
1956
|
message.uid = reader.string();
|
|
2076
1957
|
continue;
|
|
2077
1958
|
case 2:
|
|
2078
|
-
if (tag
|
|
1959
|
+
if (tag != 18) {
|
|
2079
1960
|
break;
|
|
2080
1961
|
}
|
|
2081
1962
|
message.passwordHash = reader.string();
|
|
2082
1963
|
continue;
|
|
2083
1964
|
}
|
|
2084
|
-
if ((tag & 7)
|
|
1965
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
2085
1966
|
break;
|
|
2086
1967
|
}
|
|
2087
1968
|
reader.skipType(tag & 7);
|
|
@@ -2096,12 +1977,8 @@ exports.SetPasswordHashRequest = {
|
|
|
2096
1977
|
},
|
|
2097
1978
|
toJSON(message) {
|
|
2098
1979
|
const obj = {};
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
}
|
|
2102
|
-
if (message.passwordHash !== "") {
|
|
2103
|
-
obj.passwordHash = message.passwordHash;
|
|
2104
|
-
}
|
|
1980
|
+
message.uid !== undefined && (obj.uid = message.uid);
|
|
1981
|
+
message.passwordHash !== undefined && (obj.passwordHash = message.passwordHash);
|
|
2105
1982
|
return obj;
|
|
2106
1983
|
},
|
|
2107
1984
|
create(base) {
|
|
@@ -2115,57 +1992,6 @@ exports.SetPasswordHashRequest = {
|
|
|
2115
1992
|
return message;
|
|
2116
1993
|
},
|
|
2117
1994
|
};
|
|
2118
|
-
function createBaseSetRelayRequest() {
|
|
2119
|
-
return { relayAddress: "" };
|
|
2120
|
-
}
|
|
2121
|
-
exports.SetRelayRequest = {
|
|
2122
|
-
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
2123
|
-
if (message.relayAddress !== "") {
|
|
2124
|
-
writer.uint32(10).string(message.relayAddress);
|
|
2125
|
-
}
|
|
2126
|
-
return writer;
|
|
2127
|
-
},
|
|
2128
|
-
decode(input, length) {
|
|
2129
|
-
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
2130
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
2131
|
-
const message = createBaseSetRelayRequest();
|
|
2132
|
-
while (reader.pos < end) {
|
|
2133
|
-
const tag = reader.uint32();
|
|
2134
|
-
switch (tag >>> 3) {
|
|
2135
|
-
case 1:
|
|
2136
|
-
if (tag !== 10) {
|
|
2137
|
-
break;
|
|
2138
|
-
}
|
|
2139
|
-
message.relayAddress = reader.string();
|
|
2140
|
-
continue;
|
|
2141
|
-
}
|
|
2142
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2143
|
-
break;
|
|
2144
|
-
}
|
|
2145
|
-
reader.skipType(tag & 7);
|
|
2146
|
-
}
|
|
2147
|
-
return message;
|
|
2148
|
-
},
|
|
2149
|
-
fromJSON(object) {
|
|
2150
|
-
return { relayAddress: isSet(object.relayAddress) ? String(object.relayAddress) : "" };
|
|
2151
|
-
},
|
|
2152
|
-
toJSON(message) {
|
|
2153
|
-
const obj = {};
|
|
2154
|
-
if (message.relayAddress !== "") {
|
|
2155
|
-
obj.relayAddress = message.relayAddress;
|
|
2156
|
-
}
|
|
2157
|
-
return obj;
|
|
2158
|
-
},
|
|
2159
|
-
create(base) {
|
|
2160
|
-
return exports.SetRelayRequest.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
2161
|
-
},
|
|
2162
|
-
fromPartial(object) {
|
|
2163
|
-
var _a;
|
|
2164
|
-
const message = createBaseSetRelayRequest();
|
|
2165
|
-
message.relayAddress = (_a = object.relayAddress) !== null && _a !== void 0 ? _a : "";
|
|
2166
|
-
return message;
|
|
2167
|
-
},
|
|
2168
|
-
};
|
|
2169
1995
|
class HPortalSysClientImpl {
|
|
2170
1996
|
constructor(rpc) {
|
|
2171
1997
|
this.rpc = rpc;
|
|
@@ -2187,7 +2013,6 @@ class HPortalSysClientImpl {
|
|
|
2187
2013
|
this.RegisterBoxService = this.RegisterBoxService.bind(this);
|
|
2188
2014
|
this.EmitBoxServiceChanged = this.EmitBoxServiceChanged.bind(this);
|
|
2189
2015
|
this.QueryBoxServicePeerCred = this.QueryBoxServicePeerCred.bind(this);
|
|
2190
|
-
this.SetRelay = this.SetRelay.bind(this);
|
|
2191
2016
|
this.DumpPeers = this.DumpPeers.bind(this);
|
|
2192
2017
|
}
|
|
2193
2018
|
QueryHServerInfo(request, metadata, abortSignal) {
|
|
@@ -2244,9 +2069,6 @@ class HPortalSysClientImpl {
|
|
|
2244
2069
|
QueryBoxServicePeerCred(request, metadata, abortSignal) {
|
|
2245
2070
|
return this.rpc.unary(exports.HPortalSysQueryBoxServicePeerCredDesc, exports.QueryBoxServicePeerCredRequest.fromPartial(request), metadata, abortSignal);
|
|
2246
2071
|
}
|
|
2247
|
-
SetRelay(request, metadata, abortSignal) {
|
|
2248
|
-
return this.rpc.unary(exports.HPortalSysSetRelayDesc, exports.SetRelayRequest.fromPartial(request), metadata, abortSignal);
|
|
2249
|
-
}
|
|
2250
2072
|
DumpPeers(request, metadata, abortSignal) {
|
|
2251
2073
|
return this.rpc.unary(exports.HPortalSysDumpPeersDesc, empty_1.Empty.fromPartial(request), metadata, abortSignal);
|
|
2252
2074
|
}
|
|
@@ -2595,25 +2417,6 @@ exports.HPortalSysQueryBoxServicePeerCredDesc = {
|
|
|
2595
2417
|
},
|
|
2596
2418
|
},
|
|
2597
2419
|
};
|
|
2598
|
-
exports.HPortalSysSetRelayDesc = {
|
|
2599
|
-
methodName: "SetRelay",
|
|
2600
|
-
service: exports.HPortalSysDesc,
|
|
2601
|
-
requestStream: false,
|
|
2602
|
-
responseStream: false,
|
|
2603
|
-
requestType: {
|
|
2604
|
-
serializeBinary() {
|
|
2605
|
-
return exports.SetRelayRequest.encode(this).finish();
|
|
2606
|
-
},
|
|
2607
|
-
},
|
|
2608
|
-
responseType: {
|
|
2609
|
-
deserializeBinary(data) {
|
|
2610
|
-
const value = empty_1.Empty.decode(data);
|
|
2611
|
-
return Object.assign(Object.assign({}, value), { toObject() {
|
|
2612
|
-
return value;
|
|
2613
|
-
} });
|
|
2614
|
-
},
|
|
2615
|
-
},
|
|
2616
|
-
};
|
|
2617
2420
|
exports.HPortalSysDumpPeersDesc = {
|
|
2618
2421
|
methodName: "DumpPeers",
|
|
2619
2422
|
service: exports.HPortalSysDesc,
|
|
@@ -2643,10 +2446,15 @@ class GrpcWebImpl {
|
|
|
2643
2446
|
const request = Object.assign(Object.assign({}, _request), methodDesc.requestType);
|
|
2644
2447
|
const maybeCombinedMetadata = metadata && this.options.metadata
|
|
2645
2448
|
? 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))
|
|
2646
|
-
: metadata
|
|
2449
|
+
: metadata || this.options.metadata;
|
|
2647
2450
|
return new Promise((resolve, reject) => {
|
|
2648
|
-
|
|
2649
|
-
|
|
2451
|
+
const client = grpc_web_1.grpc.unary(methodDesc, {
|
|
2452
|
+
request,
|
|
2453
|
+
host: this.host,
|
|
2454
|
+
metadata: maybeCombinedMetadata,
|
|
2455
|
+
transport: this.options.transport,
|
|
2456
|
+
debug: this.options.debug,
|
|
2457
|
+
onEnd: function (response) {
|
|
2650
2458
|
if (response.status === grpc_web_1.grpc.Code.OK) {
|
|
2651
2459
|
resolve(response.message.toObject());
|
|
2652
2460
|
}
|
|
@@ -2654,28 +2462,35 @@ class GrpcWebImpl {
|
|
|
2654
2462
|
const err = new GrpcWebError(response.statusMessage, response.status, response.trailers);
|
|
2655
2463
|
reject(err);
|
|
2656
2464
|
}
|
|
2657
|
-
}
|
|
2465
|
+
},
|
|
2466
|
+
});
|
|
2467
|
+
const abortHandler = () => {
|
|
2468
|
+
client.close();
|
|
2469
|
+
reject(new Error("Aborted"));
|
|
2470
|
+
};
|
|
2658
2471
|
if (abortSignal) {
|
|
2659
|
-
abortSignal.addEventListener("abort",
|
|
2660
|
-
client.close();
|
|
2661
|
-
reject(abortSignal.reason);
|
|
2662
|
-
});
|
|
2472
|
+
abortSignal.addEventListener("abort", abortHandler);
|
|
2663
2473
|
}
|
|
2664
2474
|
});
|
|
2665
2475
|
}
|
|
2666
2476
|
invoke(methodDesc, _request, metadata, abortSignal) {
|
|
2667
|
-
var _a
|
|
2668
|
-
const upStreamCodes =
|
|
2477
|
+
var _a;
|
|
2478
|
+
const upStreamCodes = this.options.upStreamRetryCodes || [];
|
|
2669
2479
|
const DEFAULT_TIMEOUT_TIME = 3000;
|
|
2670
2480
|
const request = Object.assign(Object.assign({}, _request), methodDesc.requestType);
|
|
2671
|
-
const transport = (_b = this.options.streamingTransport) !== null && _b !== void 0 ? _b : this.options.transport;
|
|
2672
2481
|
const maybeCombinedMetadata = metadata && this.options.metadata
|
|
2673
|
-
? new browser_headers_1.BrowserHeaders(Object.assign(Object.assign({}, (
|
|
2674
|
-
: metadata
|
|
2482
|
+
? 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))
|
|
2483
|
+
: metadata || this.options.metadata;
|
|
2675
2484
|
return new rxjs_1.Observable((observer) => {
|
|
2676
|
-
const upStream = () => {
|
|
2677
|
-
|
|
2678
|
-
|
|
2485
|
+
const upStream = (() => {
|
|
2486
|
+
const client = grpc_web_1.grpc.invoke(methodDesc, {
|
|
2487
|
+
host: this.host,
|
|
2488
|
+
request,
|
|
2489
|
+
transport: this.options.streamingTransport || this.options.transport,
|
|
2490
|
+
metadata: maybeCombinedMetadata,
|
|
2491
|
+
debug: this.options.debug,
|
|
2492
|
+
onMessage: (next) => observer.next(next),
|
|
2493
|
+
onEnd: (code, message, trailers) => {
|
|
2679
2494
|
if (code === 0) {
|
|
2680
2495
|
observer.complete();
|
|
2681
2496
|
}
|
|
@@ -2688,25 +2503,27 @@ class GrpcWebImpl {
|
|
|
2688
2503
|
err.metadata = trailers;
|
|
2689
2504
|
observer.error(err);
|
|
2690
2505
|
}
|
|
2691
|
-
}
|
|
2506
|
+
},
|
|
2507
|
+
});
|
|
2692
2508
|
observer.add(() => {
|
|
2693
|
-
if (!
|
|
2509
|
+
if (!observer.closed) {
|
|
2694
2510
|
return client.close();
|
|
2695
2511
|
}
|
|
2696
2512
|
});
|
|
2513
|
+
const abortHandler = () => {
|
|
2514
|
+
observer.error("Aborted");
|
|
2515
|
+
client.close();
|
|
2516
|
+
};
|
|
2697
2517
|
if (abortSignal) {
|
|
2698
|
-
abortSignal.addEventListener("abort",
|
|
2699
|
-
observer.error(abortSignal.reason);
|
|
2700
|
-
client.close();
|
|
2701
|
-
});
|
|
2518
|
+
abortSignal.addEventListener("abort", abortHandler);
|
|
2702
2519
|
}
|
|
2703
|
-
};
|
|
2520
|
+
});
|
|
2704
2521
|
upStream();
|
|
2705
2522
|
}).pipe((0, operators_1.share)());
|
|
2706
2523
|
}
|
|
2707
2524
|
}
|
|
2708
2525
|
exports.GrpcWebImpl = GrpcWebImpl;
|
|
2709
|
-
|
|
2526
|
+
var tsProtoGlobalThis = (() => {
|
|
2710
2527
|
if (typeof globalThis !== "undefined") {
|
|
2711
2528
|
return globalThis;
|
|
2712
2529
|
}
|
|
@@ -2727,8 +2544,8 @@ function toTimestamp(date) {
|
|
|
2727
2544
|
return { seconds, nanos };
|
|
2728
2545
|
}
|
|
2729
2546
|
function fromTimestamp(t) {
|
|
2730
|
-
let millis =
|
|
2731
|
-
millis +=
|
|
2547
|
+
let millis = t.seconds * 1000;
|
|
2548
|
+
millis += t.nanos / 1000000;
|
|
2732
2549
|
return new Date(millis);
|
|
2733
2550
|
}
|
|
2734
2551
|
function fromJsonTimestamp(o) {
|