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