@juzi/wechaty-grpc 1.0.100 → 1.0.102
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/cjs/out/wechaty/puppet/base_pb.d.ts +3 -0
- package/dist/cjs/out/wechaty/puppet/base_pb.js +4 -1
- package/dist/cjs/out/wechaty/puppet/call_pb.d.ts +361 -0
- package/dist/cjs/out/wechaty/puppet/call_pb.js +2869 -79
- package/dist/cjs/out/wechaty/puppet/event_pb.d.ts +1 -0
- package/dist/cjs/out/wechaty/puppet/event_pb.js +2 -1
- package/dist/cjs/out/wechaty/puppet/message_pb.d.ts +790 -0
- package/dist/cjs/out/wechaty/puppet/message_pb.js +8111 -1783
- package/dist/cjs/out/wechaty/puppet.openapi.yaml +783 -25
- package/dist/cjs/out/wechaty/puppet.swagger.json +1158 -18
- package/dist/cjs/out/wechaty/puppet_grpc_pb.d.ts +290 -0
- package/dist/cjs/out/wechaty/puppet_grpc_pb.js +563 -0
- package/dist/cjs/out/wechaty/puppet_pb.d.ts +1 -0
- package/dist/cjs/out/wechaty/puppet_pb.js +2 -0
- package/dist/cjs/out/wechaty/puppet_pb_service.d.ts +324 -0
- package/dist/cjs/out/wechaty/puppet_pb_service.js +693 -12
- package/dist/cjs/proto/wechaty/puppet/base.proto +4 -0
- package/dist/cjs/proto/wechaty/puppet/call.proto +101 -1
- package/dist/cjs/proto/wechaty/puppet/event.proto +1 -0
- package/dist/cjs/proto/wechaty/puppet/message.proto +127 -0
- package/dist/cjs/proto/wechaty/puppet.proto +103 -0
- package/dist/cjs/src/package-json.js +1 -1
- package/dist/cjs/tests/puppet-server-impl.d.ts.map +1 -1
- package/dist/cjs/tests/puppet-server-impl.js +85 -0
- package/dist/cjs/tests/puppet-server-impl.js.map +1 -1
- package/dist/esm/out/wechaty/puppet/base_pb.d.ts +3 -0
- package/dist/esm/out/wechaty/puppet/base_pb.js +4 -1
- package/dist/esm/out/wechaty/puppet/call_pb.d.ts +361 -0
- package/dist/esm/out/wechaty/puppet/call_pb.js +2869 -79
- package/dist/esm/out/wechaty/puppet/event_pb.d.ts +1 -0
- package/dist/esm/out/wechaty/puppet/event_pb.js +2 -1
- package/dist/esm/out/wechaty/puppet/message_pb.d.ts +790 -0
- package/dist/esm/out/wechaty/puppet/message_pb.js +8111 -1783
- package/dist/esm/out/wechaty/puppet.openapi.yaml +783 -25
- package/dist/esm/out/wechaty/puppet.swagger.json +1158 -18
- package/dist/esm/out/wechaty/puppet_grpc_pb.d.ts +290 -0
- package/dist/esm/out/wechaty/puppet_grpc_pb.js +563 -0
- package/dist/esm/out/wechaty/puppet_pb.d.ts +1 -0
- package/dist/esm/out/wechaty/puppet_pb.js +2 -0
- package/dist/esm/out/wechaty/puppet_pb_service.d.ts +324 -0
- package/dist/esm/out/wechaty/puppet_pb_service.js +693 -12
- package/dist/esm/proto/wechaty/puppet/base.proto +4 -0
- package/dist/esm/proto/wechaty/puppet/call.proto +101 -1
- package/dist/esm/proto/wechaty/puppet/event.proto +1 -0
- package/dist/esm/proto/wechaty/puppet/message.proto +127 -0
- package/dist/esm/proto/wechaty/puppet.proto +103 -0
- package/dist/esm/src/package-json.js +1 -1
- package/dist/esm/tests/puppet-server-impl.d.ts.map +1 -1
- package/dist/esm/tests/puppet-server-impl.js +85 -0
- package/dist/esm/tests/puppet-server-impl.js.map +1 -1
- package/out/wechaty/puppet/base_pb.d.ts +3 -0
- package/out/wechaty/puppet/base_pb.js +4 -1
- package/out/wechaty/puppet/call_pb.d.ts +361 -0
- package/out/wechaty/puppet/call_pb.js +2869 -79
- package/out/wechaty/puppet/event_pb.d.ts +1 -0
- package/out/wechaty/puppet/event_pb.js +2 -1
- package/out/wechaty/puppet/message_pb.d.ts +790 -0
- package/out/wechaty/puppet/message_pb.js +8111 -1783
- package/out/wechaty/puppet.openapi.yaml +783 -25
- package/out/wechaty/puppet.swagger.json +1158 -18
- package/out/wechaty/puppet_grpc_pb.d.ts +290 -0
- package/out/wechaty/puppet_grpc_pb.js +563 -0
- package/out/wechaty/puppet_pb.d.ts +1 -0
- package/out/wechaty/puppet_pb.js +2 -0
- package/out/wechaty/puppet_pb_service.d.ts +324 -0
- package/out/wechaty/puppet_pb_service.js +693 -12
- package/package.json +1 -1
- package/src/package-json.ts +1 -1
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
var wechaty_puppet_pb = require("../wechaty/puppet_pb");
|
|
5
5
|
var wechaty_puppet_base_pb = require("../wechaty/puppet/base_pb");
|
|
6
|
+
var wechaty_puppet_call_pb = require("../wechaty/puppet/call_pb");
|
|
6
7
|
var wechaty_puppet_contact_pb = require("../wechaty/puppet/contact_pb");
|
|
7
8
|
var wechaty_puppet_download_upload_pb = require("../wechaty/puppet/download-upload_pb");
|
|
8
9
|
var wechaty_puppet_event_pb = require("../wechaty/puppet/event_pb");
|
|
@@ -421,6 +422,78 @@ Puppet.MessageCallRecord = {
|
|
|
421
422
|
responseType: wechaty_puppet_message_pb.MessageCallRecordResponse
|
|
422
423
|
};
|
|
423
424
|
|
|
425
|
+
Puppet.CallInvite = {
|
|
426
|
+
methodName: "CallInvite",
|
|
427
|
+
service: Puppet,
|
|
428
|
+
requestStream: false,
|
|
429
|
+
responseStream: false,
|
|
430
|
+
requestType: wechaty_puppet_call_pb.CallInviteRequest,
|
|
431
|
+
responseType: wechaty_puppet_call_pb.CallInviteResponse
|
|
432
|
+
};
|
|
433
|
+
|
|
434
|
+
Puppet.CallAdd = {
|
|
435
|
+
methodName: "CallAdd",
|
|
436
|
+
service: Puppet,
|
|
437
|
+
requestStream: false,
|
|
438
|
+
responseStream: false,
|
|
439
|
+
requestType: wechaty_puppet_call_pb.CallAddRequest,
|
|
440
|
+
responseType: wechaty_puppet_call_pb.CallAddResponse
|
|
441
|
+
};
|
|
442
|
+
|
|
443
|
+
Puppet.CallAccept = {
|
|
444
|
+
methodName: "CallAccept",
|
|
445
|
+
service: Puppet,
|
|
446
|
+
requestStream: false,
|
|
447
|
+
responseStream: false,
|
|
448
|
+
requestType: wechaty_puppet_call_pb.CallAcceptRequest,
|
|
449
|
+
responseType: wechaty_puppet_call_pb.CallAcceptResponse
|
|
450
|
+
};
|
|
451
|
+
|
|
452
|
+
Puppet.CallReject = {
|
|
453
|
+
methodName: "CallReject",
|
|
454
|
+
service: Puppet,
|
|
455
|
+
requestStream: false,
|
|
456
|
+
responseStream: false,
|
|
457
|
+
requestType: wechaty_puppet_call_pb.CallRejectRequest,
|
|
458
|
+
responseType: wechaty_puppet_call_pb.CallRejectResponse
|
|
459
|
+
};
|
|
460
|
+
|
|
461
|
+
Puppet.CallCancel = {
|
|
462
|
+
methodName: "CallCancel",
|
|
463
|
+
service: Puppet,
|
|
464
|
+
requestStream: false,
|
|
465
|
+
responseStream: false,
|
|
466
|
+
requestType: wechaty_puppet_call_pb.CallCancelRequest,
|
|
467
|
+
responseType: wechaty_puppet_call_pb.CallCancelResponse
|
|
468
|
+
};
|
|
469
|
+
|
|
470
|
+
Puppet.CallHangup = {
|
|
471
|
+
methodName: "CallHangup",
|
|
472
|
+
service: Puppet,
|
|
473
|
+
requestStream: false,
|
|
474
|
+
responseStream: false,
|
|
475
|
+
requestType: wechaty_puppet_call_pb.CallHangupRequest,
|
|
476
|
+
responseType: wechaty_puppet_call_pb.CallHangupResponse
|
|
477
|
+
};
|
|
478
|
+
|
|
479
|
+
Puppet.CallMediaEndpoint = {
|
|
480
|
+
methodName: "CallMediaEndpoint",
|
|
481
|
+
service: Puppet,
|
|
482
|
+
requestStream: false,
|
|
483
|
+
responseStream: false,
|
|
484
|
+
requestType: wechaty_puppet_call_pb.CallMediaEndpointRequest,
|
|
485
|
+
responseType: wechaty_puppet_call_pb.CallMediaEndpointResponse
|
|
486
|
+
};
|
|
487
|
+
|
|
488
|
+
Puppet.CallPayload = {
|
|
489
|
+
methodName: "CallPayload",
|
|
490
|
+
service: Puppet,
|
|
491
|
+
requestStream: false,
|
|
492
|
+
responseStream: false,
|
|
493
|
+
requestType: wechaty_puppet_call_pb.CallPayloadRequest,
|
|
494
|
+
responseType: wechaty_puppet_call_pb.CallPayloadResponse
|
|
495
|
+
};
|
|
496
|
+
|
|
424
497
|
Puppet.MessageChatHistory = {
|
|
425
498
|
methodName: "MessageChatHistory",
|
|
426
499
|
service: Puppet,
|
|
@@ -475,6 +548,87 @@ Puppet.MessageSendText = {
|
|
|
475
548
|
responseType: wechaty_puppet_message_pb.MessageSendTextResponse
|
|
476
549
|
};
|
|
477
550
|
|
|
551
|
+
Puppet.MessageBatchSendText = {
|
|
552
|
+
methodName: "MessageBatchSendText",
|
|
553
|
+
service: Puppet,
|
|
554
|
+
requestStream: false,
|
|
555
|
+
responseStream: false,
|
|
556
|
+
requestType: wechaty_puppet_message_pb.MessageBatchSendTextRequest,
|
|
557
|
+
responseType: wechaty_puppet_message_pb.MessageBatchSendTextResponse
|
|
558
|
+
};
|
|
559
|
+
|
|
560
|
+
Puppet.MessageBatchSendFile = {
|
|
561
|
+
methodName: "MessageBatchSendFile",
|
|
562
|
+
service: Puppet,
|
|
563
|
+
requestStream: false,
|
|
564
|
+
responseStream: false,
|
|
565
|
+
requestType: wechaty_puppet_message_pb.MessageBatchSendFileRequest,
|
|
566
|
+
responseType: wechaty_puppet_message_pb.MessageBatchSendFileResponse
|
|
567
|
+
};
|
|
568
|
+
|
|
569
|
+
Puppet.MessageBatchForward = {
|
|
570
|
+
methodName: "MessageBatchForward",
|
|
571
|
+
service: Puppet,
|
|
572
|
+
requestStream: false,
|
|
573
|
+
responseStream: false,
|
|
574
|
+
requestType: wechaty_puppet_message_pb.MessageBatchForwardRequest,
|
|
575
|
+
responseType: wechaty_puppet_message_pb.MessageBatchForwardResponse
|
|
576
|
+
};
|
|
577
|
+
|
|
578
|
+
Puppet.MessageBatchSendContact = {
|
|
579
|
+
methodName: "MessageBatchSendContact",
|
|
580
|
+
service: Puppet,
|
|
581
|
+
requestStream: false,
|
|
582
|
+
responseStream: false,
|
|
583
|
+
requestType: wechaty_puppet_message_pb.MessageBatchSendContactRequest,
|
|
584
|
+
responseType: wechaty_puppet_message_pb.MessageBatchSendContactResponse
|
|
585
|
+
};
|
|
586
|
+
|
|
587
|
+
Puppet.MessageBatchSendUrl = {
|
|
588
|
+
methodName: "MessageBatchSendUrl",
|
|
589
|
+
service: Puppet,
|
|
590
|
+
requestStream: false,
|
|
591
|
+
responseStream: false,
|
|
592
|
+
requestType: wechaty_puppet_message_pb.MessageBatchSendUrlRequest,
|
|
593
|
+
responseType: wechaty_puppet_message_pb.MessageBatchSendUrlResponse
|
|
594
|
+
};
|
|
595
|
+
|
|
596
|
+
Puppet.MessageBatchSendMiniProgram = {
|
|
597
|
+
methodName: "MessageBatchSendMiniProgram",
|
|
598
|
+
service: Puppet,
|
|
599
|
+
requestStream: false,
|
|
600
|
+
responseStream: false,
|
|
601
|
+
requestType: wechaty_puppet_message_pb.MessageBatchSendMiniProgramRequest,
|
|
602
|
+
responseType: wechaty_puppet_message_pb.MessageBatchSendMiniProgramResponse
|
|
603
|
+
};
|
|
604
|
+
|
|
605
|
+
Puppet.MessageBatchSendLocation = {
|
|
606
|
+
methodName: "MessageBatchSendLocation",
|
|
607
|
+
service: Puppet,
|
|
608
|
+
requestStream: false,
|
|
609
|
+
responseStream: false,
|
|
610
|
+
requestType: wechaty_puppet_message_pb.MessageBatchSendLocationRequest,
|
|
611
|
+
responseType: wechaty_puppet_message_pb.MessageBatchSendLocationResponse
|
|
612
|
+
};
|
|
613
|
+
|
|
614
|
+
Puppet.MessageBatchSendChannel = {
|
|
615
|
+
methodName: "MessageBatchSendChannel",
|
|
616
|
+
service: Puppet,
|
|
617
|
+
requestStream: false,
|
|
618
|
+
responseStream: false,
|
|
619
|
+
requestType: wechaty_puppet_message_pb.MessageBatchSendChannelRequest,
|
|
620
|
+
responseType: wechaty_puppet_message_pb.MessageBatchSendChannelResponse
|
|
621
|
+
};
|
|
622
|
+
|
|
623
|
+
Puppet.MessageBatchSendChannelCard = {
|
|
624
|
+
methodName: "MessageBatchSendChannelCard",
|
|
625
|
+
service: Puppet,
|
|
626
|
+
requestStream: false,
|
|
627
|
+
responseStream: false,
|
|
628
|
+
requestType: wechaty_puppet_message_pb.MessageBatchSendChannelCardRequest,
|
|
629
|
+
responseType: wechaty_puppet_message_pb.MessageBatchSendChannelCardResponse
|
|
630
|
+
};
|
|
631
|
+
|
|
478
632
|
Puppet.MessageSendMiniProgram = {
|
|
479
633
|
methodName: "MessageSendMiniProgram",
|
|
480
634
|
service: Puppet,
|
|
@@ -2430,11 +2584,11 @@ PuppetClient.prototype.messageCallRecord = function messageCallRecord(requestMes
|
|
|
2430
2584
|
};
|
|
2431
2585
|
};
|
|
2432
2586
|
|
|
2433
|
-
PuppetClient.prototype.
|
|
2587
|
+
PuppetClient.prototype.callInvite = function callInvite(requestMessage, metadata, callback) {
|
|
2434
2588
|
if (arguments.length === 2) {
|
|
2435
2589
|
callback = arguments[1];
|
|
2436
2590
|
}
|
|
2437
|
-
var client = grpc.unary(Puppet.
|
|
2591
|
+
var client = grpc.unary(Puppet.CallInvite, {
|
|
2438
2592
|
request: requestMessage,
|
|
2439
2593
|
host: this.serviceHost,
|
|
2440
2594
|
metadata: metadata,
|
|
@@ -2461,11 +2615,11 @@ PuppetClient.prototype.messageChatHistory = function messageChatHistory(requestM
|
|
|
2461
2615
|
};
|
|
2462
2616
|
};
|
|
2463
2617
|
|
|
2464
|
-
PuppetClient.prototype.
|
|
2618
|
+
PuppetClient.prototype.callAdd = function callAdd(requestMessage, metadata, callback) {
|
|
2465
2619
|
if (arguments.length === 2) {
|
|
2466
2620
|
callback = arguments[1];
|
|
2467
2621
|
}
|
|
2468
|
-
var client = grpc.unary(Puppet.
|
|
2622
|
+
var client = grpc.unary(Puppet.CallAdd, {
|
|
2469
2623
|
request: requestMessage,
|
|
2470
2624
|
host: this.serviceHost,
|
|
2471
2625
|
metadata: metadata,
|
|
@@ -2492,11 +2646,11 @@ PuppetClient.prototype.messageRecall = function messageRecall(requestMessage, me
|
|
|
2492
2646
|
};
|
|
2493
2647
|
};
|
|
2494
2648
|
|
|
2495
|
-
PuppetClient.prototype.
|
|
2649
|
+
PuppetClient.prototype.callAccept = function callAccept(requestMessage, metadata, callback) {
|
|
2496
2650
|
if (arguments.length === 2) {
|
|
2497
2651
|
callback = arguments[1];
|
|
2498
2652
|
}
|
|
2499
|
-
var client = grpc.unary(Puppet.
|
|
2653
|
+
var client = grpc.unary(Puppet.CallAccept, {
|
|
2500
2654
|
request: requestMessage,
|
|
2501
2655
|
host: this.serviceHost,
|
|
2502
2656
|
metadata: metadata,
|
|
@@ -2523,11 +2677,11 @@ PuppetClient.prototype.messageForward = function messageForward(requestMessage,
|
|
|
2523
2677
|
};
|
|
2524
2678
|
};
|
|
2525
2679
|
|
|
2526
|
-
PuppetClient.prototype.
|
|
2680
|
+
PuppetClient.prototype.callReject = function callReject(requestMessage, metadata, callback) {
|
|
2527
2681
|
if (arguments.length === 2) {
|
|
2528
2682
|
callback = arguments[1];
|
|
2529
2683
|
}
|
|
2530
|
-
var client = grpc.unary(Puppet.
|
|
2684
|
+
var client = grpc.unary(Puppet.CallReject, {
|
|
2531
2685
|
request: requestMessage,
|
|
2532
2686
|
host: this.serviceHost,
|
|
2533
2687
|
metadata: metadata,
|
|
@@ -2554,11 +2708,11 @@ PuppetClient.prototype.messageLocation = function messageLocation(requestMessage
|
|
|
2554
2708
|
};
|
|
2555
2709
|
};
|
|
2556
2710
|
|
|
2557
|
-
PuppetClient.prototype.
|
|
2711
|
+
PuppetClient.prototype.callCancel = function callCancel(requestMessage, metadata, callback) {
|
|
2558
2712
|
if (arguments.length === 2) {
|
|
2559
2713
|
callback = arguments[1];
|
|
2560
2714
|
}
|
|
2561
|
-
var client = grpc.unary(Puppet.
|
|
2715
|
+
var client = grpc.unary(Puppet.CallCancel, {
|
|
2562
2716
|
request: requestMessage,
|
|
2563
2717
|
host: this.serviceHost,
|
|
2564
2718
|
metadata: metadata,
|
|
@@ -2585,11 +2739,538 @@ PuppetClient.prototype.messageSendContact = function messageSendContact(requestM
|
|
|
2585
2739
|
};
|
|
2586
2740
|
};
|
|
2587
2741
|
|
|
2588
|
-
PuppetClient.prototype.
|
|
2742
|
+
PuppetClient.prototype.callHangup = function callHangup(requestMessage, metadata, callback) {
|
|
2589
2743
|
if (arguments.length === 2) {
|
|
2590
2744
|
callback = arguments[1];
|
|
2591
2745
|
}
|
|
2592
|
-
var client = grpc.unary(Puppet.
|
|
2746
|
+
var client = grpc.unary(Puppet.CallHangup, {
|
|
2747
|
+
request: requestMessage,
|
|
2748
|
+
host: this.serviceHost,
|
|
2749
|
+
metadata: metadata,
|
|
2750
|
+
transport: this.options.transport,
|
|
2751
|
+
debug: this.options.debug,
|
|
2752
|
+
onEnd: function (response) {
|
|
2753
|
+
if (callback) {
|
|
2754
|
+
if (response.status !== grpc.Code.OK) {
|
|
2755
|
+
var err = new Error(response.statusMessage);
|
|
2756
|
+
err.code = response.status;
|
|
2757
|
+
err.metadata = response.trailers;
|
|
2758
|
+
callback(err, null);
|
|
2759
|
+
} else {
|
|
2760
|
+
callback(null, response.message);
|
|
2761
|
+
}
|
|
2762
|
+
}
|
|
2763
|
+
}
|
|
2764
|
+
});
|
|
2765
|
+
return {
|
|
2766
|
+
cancel: function () {
|
|
2767
|
+
callback = null;
|
|
2768
|
+
client.close();
|
|
2769
|
+
}
|
|
2770
|
+
};
|
|
2771
|
+
};
|
|
2772
|
+
|
|
2773
|
+
PuppetClient.prototype.callMediaEndpoint = function callMediaEndpoint(requestMessage, metadata, callback) {
|
|
2774
|
+
if (arguments.length === 2) {
|
|
2775
|
+
callback = arguments[1];
|
|
2776
|
+
}
|
|
2777
|
+
var client = grpc.unary(Puppet.CallMediaEndpoint, {
|
|
2778
|
+
request: requestMessage,
|
|
2779
|
+
host: this.serviceHost,
|
|
2780
|
+
metadata: metadata,
|
|
2781
|
+
transport: this.options.transport,
|
|
2782
|
+
debug: this.options.debug,
|
|
2783
|
+
onEnd: function (response) {
|
|
2784
|
+
if (callback) {
|
|
2785
|
+
if (response.status !== grpc.Code.OK) {
|
|
2786
|
+
var err = new Error(response.statusMessage);
|
|
2787
|
+
err.code = response.status;
|
|
2788
|
+
err.metadata = response.trailers;
|
|
2789
|
+
callback(err, null);
|
|
2790
|
+
} else {
|
|
2791
|
+
callback(null, response.message);
|
|
2792
|
+
}
|
|
2793
|
+
}
|
|
2794
|
+
}
|
|
2795
|
+
});
|
|
2796
|
+
return {
|
|
2797
|
+
cancel: function () {
|
|
2798
|
+
callback = null;
|
|
2799
|
+
client.close();
|
|
2800
|
+
}
|
|
2801
|
+
};
|
|
2802
|
+
};
|
|
2803
|
+
|
|
2804
|
+
PuppetClient.prototype.callPayload = function callPayload(requestMessage, metadata, callback) {
|
|
2805
|
+
if (arguments.length === 2) {
|
|
2806
|
+
callback = arguments[1];
|
|
2807
|
+
}
|
|
2808
|
+
var client = grpc.unary(Puppet.CallPayload, {
|
|
2809
|
+
request: requestMessage,
|
|
2810
|
+
host: this.serviceHost,
|
|
2811
|
+
metadata: metadata,
|
|
2812
|
+
transport: this.options.transport,
|
|
2813
|
+
debug: this.options.debug,
|
|
2814
|
+
onEnd: function (response) {
|
|
2815
|
+
if (callback) {
|
|
2816
|
+
if (response.status !== grpc.Code.OK) {
|
|
2817
|
+
var err = new Error(response.statusMessage);
|
|
2818
|
+
err.code = response.status;
|
|
2819
|
+
err.metadata = response.trailers;
|
|
2820
|
+
callback(err, null);
|
|
2821
|
+
} else {
|
|
2822
|
+
callback(null, response.message);
|
|
2823
|
+
}
|
|
2824
|
+
}
|
|
2825
|
+
}
|
|
2826
|
+
});
|
|
2827
|
+
return {
|
|
2828
|
+
cancel: function () {
|
|
2829
|
+
callback = null;
|
|
2830
|
+
client.close();
|
|
2831
|
+
}
|
|
2832
|
+
};
|
|
2833
|
+
};
|
|
2834
|
+
|
|
2835
|
+
PuppetClient.prototype.messageChatHistory = function messageChatHistory(requestMessage, metadata, callback) {
|
|
2836
|
+
if (arguments.length === 2) {
|
|
2837
|
+
callback = arguments[1];
|
|
2838
|
+
}
|
|
2839
|
+
var client = grpc.unary(Puppet.MessageChatHistory, {
|
|
2840
|
+
request: requestMessage,
|
|
2841
|
+
host: this.serviceHost,
|
|
2842
|
+
metadata: metadata,
|
|
2843
|
+
transport: this.options.transport,
|
|
2844
|
+
debug: this.options.debug,
|
|
2845
|
+
onEnd: function (response) {
|
|
2846
|
+
if (callback) {
|
|
2847
|
+
if (response.status !== grpc.Code.OK) {
|
|
2848
|
+
var err = new Error(response.statusMessage);
|
|
2849
|
+
err.code = response.status;
|
|
2850
|
+
err.metadata = response.trailers;
|
|
2851
|
+
callback(err, null);
|
|
2852
|
+
} else {
|
|
2853
|
+
callback(null, response.message);
|
|
2854
|
+
}
|
|
2855
|
+
}
|
|
2856
|
+
}
|
|
2857
|
+
});
|
|
2858
|
+
return {
|
|
2859
|
+
cancel: function () {
|
|
2860
|
+
callback = null;
|
|
2861
|
+
client.close();
|
|
2862
|
+
}
|
|
2863
|
+
};
|
|
2864
|
+
};
|
|
2865
|
+
|
|
2866
|
+
PuppetClient.prototype.messageRecall = function messageRecall(requestMessage, metadata, callback) {
|
|
2867
|
+
if (arguments.length === 2) {
|
|
2868
|
+
callback = arguments[1];
|
|
2869
|
+
}
|
|
2870
|
+
var client = grpc.unary(Puppet.MessageRecall, {
|
|
2871
|
+
request: requestMessage,
|
|
2872
|
+
host: this.serviceHost,
|
|
2873
|
+
metadata: metadata,
|
|
2874
|
+
transport: this.options.transport,
|
|
2875
|
+
debug: this.options.debug,
|
|
2876
|
+
onEnd: function (response) {
|
|
2877
|
+
if (callback) {
|
|
2878
|
+
if (response.status !== grpc.Code.OK) {
|
|
2879
|
+
var err = new Error(response.statusMessage);
|
|
2880
|
+
err.code = response.status;
|
|
2881
|
+
err.metadata = response.trailers;
|
|
2882
|
+
callback(err, null);
|
|
2883
|
+
} else {
|
|
2884
|
+
callback(null, response.message);
|
|
2885
|
+
}
|
|
2886
|
+
}
|
|
2887
|
+
}
|
|
2888
|
+
});
|
|
2889
|
+
return {
|
|
2890
|
+
cancel: function () {
|
|
2891
|
+
callback = null;
|
|
2892
|
+
client.close();
|
|
2893
|
+
}
|
|
2894
|
+
};
|
|
2895
|
+
};
|
|
2896
|
+
|
|
2897
|
+
PuppetClient.prototype.messageForward = function messageForward(requestMessage, metadata, callback) {
|
|
2898
|
+
if (arguments.length === 2) {
|
|
2899
|
+
callback = arguments[1];
|
|
2900
|
+
}
|
|
2901
|
+
var client = grpc.unary(Puppet.MessageForward, {
|
|
2902
|
+
request: requestMessage,
|
|
2903
|
+
host: this.serviceHost,
|
|
2904
|
+
metadata: metadata,
|
|
2905
|
+
transport: this.options.transport,
|
|
2906
|
+
debug: this.options.debug,
|
|
2907
|
+
onEnd: function (response) {
|
|
2908
|
+
if (callback) {
|
|
2909
|
+
if (response.status !== grpc.Code.OK) {
|
|
2910
|
+
var err = new Error(response.statusMessage);
|
|
2911
|
+
err.code = response.status;
|
|
2912
|
+
err.metadata = response.trailers;
|
|
2913
|
+
callback(err, null);
|
|
2914
|
+
} else {
|
|
2915
|
+
callback(null, response.message);
|
|
2916
|
+
}
|
|
2917
|
+
}
|
|
2918
|
+
}
|
|
2919
|
+
});
|
|
2920
|
+
return {
|
|
2921
|
+
cancel: function () {
|
|
2922
|
+
callback = null;
|
|
2923
|
+
client.close();
|
|
2924
|
+
}
|
|
2925
|
+
};
|
|
2926
|
+
};
|
|
2927
|
+
|
|
2928
|
+
PuppetClient.prototype.messageLocation = function messageLocation(requestMessage, metadata, callback) {
|
|
2929
|
+
if (arguments.length === 2) {
|
|
2930
|
+
callback = arguments[1];
|
|
2931
|
+
}
|
|
2932
|
+
var client = grpc.unary(Puppet.MessageLocation, {
|
|
2933
|
+
request: requestMessage,
|
|
2934
|
+
host: this.serviceHost,
|
|
2935
|
+
metadata: metadata,
|
|
2936
|
+
transport: this.options.transport,
|
|
2937
|
+
debug: this.options.debug,
|
|
2938
|
+
onEnd: function (response) {
|
|
2939
|
+
if (callback) {
|
|
2940
|
+
if (response.status !== grpc.Code.OK) {
|
|
2941
|
+
var err = new Error(response.statusMessage);
|
|
2942
|
+
err.code = response.status;
|
|
2943
|
+
err.metadata = response.trailers;
|
|
2944
|
+
callback(err, null);
|
|
2945
|
+
} else {
|
|
2946
|
+
callback(null, response.message);
|
|
2947
|
+
}
|
|
2948
|
+
}
|
|
2949
|
+
}
|
|
2950
|
+
});
|
|
2951
|
+
return {
|
|
2952
|
+
cancel: function () {
|
|
2953
|
+
callback = null;
|
|
2954
|
+
client.close();
|
|
2955
|
+
}
|
|
2956
|
+
};
|
|
2957
|
+
};
|
|
2958
|
+
|
|
2959
|
+
PuppetClient.prototype.messageSendContact = function messageSendContact(requestMessage, metadata, callback) {
|
|
2960
|
+
if (arguments.length === 2) {
|
|
2961
|
+
callback = arguments[1];
|
|
2962
|
+
}
|
|
2963
|
+
var client = grpc.unary(Puppet.MessageSendContact, {
|
|
2964
|
+
request: requestMessage,
|
|
2965
|
+
host: this.serviceHost,
|
|
2966
|
+
metadata: metadata,
|
|
2967
|
+
transport: this.options.transport,
|
|
2968
|
+
debug: this.options.debug,
|
|
2969
|
+
onEnd: function (response) {
|
|
2970
|
+
if (callback) {
|
|
2971
|
+
if (response.status !== grpc.Code.OK) {
|
|
2972
|
+
var err = new Error(response.statusMessage);
|
|
2973
|
+
err.code = response.status;
|
|
2974
|
+
err.metadata = response.trailers;
|
|
2975
|
+
callback(err, null);
|
|
2976
|
+
} else {
|
|
2977
|
+
callback(null, response.message);
|
|
2978
|
+
}
|
|
2979
|
+
}
|
|
2980
|
+
}
|
|
2981
|
+
});
|
|
2982
|
+
return {
|
|
2983
|
+
cancel: function () {
|
|
2984
|
+
callback = null;
|
|
2985
|
+
client.close();
|
|
2986
|
+
}
|
|
2987
|
+
};
|
|
2988
|
+
};
|
|
2989
|
+
|
|
2990
|
+
PuppetClient.prototype.messageSendText = function messageSendText(requestMessage, metadata, callback) {
|
|
2991
|
+
if (arguments.length === 2) {
|
|
2992
|
+
callback = arguments[1];
|
|
2993
|
+
}
|
|
2994
|
+
var client = grpc.unary(Puppet.MessageSendText, {
|
|
2995
|
+
request: requestMessage,
|
|
2996
|
+
host: this.serviceHost,
|
|
2997
|
+
metadata: metadata,
|
|
2998
|
+
transport: this.options.transport,
|
|
2999
|
+
debug: this.options.debug,
|
|
3000
|
+
onEnd: function (response) {
|
|
3001
|
+
if (callback) {
|
|
3002
|
+
if (response.status !== grpc.Code.OK) {
|
|
3003
|
+
var err = new Error(response.statusMessage);
|
|
3004
|
+
err.code = response.status;
|
|
3005
|
+
err.metadata = response.trailers;
|
|
3006
|
+
callback(err, null);
|
|
3007
|
+
} else {
|
|
3008
|
+
callback(null, response.message);
|
|
3009
|
+
}
|
|
3010
|
+
}
|
|
3011
|
+
}
|
|
3012
|
+
});
|
|
3013
|
+
return {
|
|
3014
|
+
cancel: function () {
|
|
3015
|
+
callback = null;
|
|
3016
|
+
client.close();
|
|
3017
|
+
}
|
|
3018
|
+
};
|
|
3019
|
+
};
|
|
3020
|
+
|
|
3021
|
+
PuppetClient.prototype.messageBatchSendText = function messageBatchSendText(requestMessage, metadata, callback) {
|
|
3022
|
+
if (arguments.length === 2) {
|
|
3023
|
+
callback = arguments[1];
|
|
3024
|
+
}
|
|
3025
|
+
var client = grpc.unary(Puppet.MessageBatchSendText, {
|
|
3026
|
+
request: requestMessage,
|
|
3027
|
+
host: this.serviceHost,
|
|
3028
|
+
metadata: metadata,
|
|
3029
|
+
transport: this.options.transport,
|
|
3030
|
+
debug: this.options.debug,
|
|
3031
|
+
onEnd: function (response) {
|
|
3032
|
+
if (callback) {
|
|
3033
|
+
if (response.status !== grpc.Code.OK) {
|
|
3034
|
+
var err = new Error(response.statusMessage);
|
|
3035
|
+
err.code = response.status;
|
|
3036
|
+
err.metadata = response.trailers;
|
|
3037
|
+
callback(err, null);
|
|
3038
|
+
} else {
|
|
3039
|
+
callback(null, response.message);
|
|
3040
|
+
}
|
|
3041
|
+
}
|
|
3042
|
+
}
|
|
3043
|
+
});
|
|
3044
|
+
return {
|
|
3045
|
+
cancel: function () {
|
|
3046
|
+
callback = null;
|
|
3047
|
+
client.close();
|
|
3048
|
+
}
|
|
3049
|
+
};
|
|
3050
|
+
};
|
|
3051
|
+
|
|
3052
|
+
PuppetClient.prototype.messageBatchSendFile = function messageBatchSendFile(requestMessage, metadata, callback) {
|
|
3053
|
+
if (arguments.length === 2) {
|
|
3054
|
+
callback = arguments[1];
|
|
3055
|
+
}
|
|
3056
|
+
var client = grpc.unary(Puppet.MessageBatchSendFile, {
|
|
3057
|
+
request: requestMessage,
|
|
3058
|
+
host: this.serviceHost,
|
|
3059
|
+
metadata: metadata,
|
|
3060
|
+
transport: this.options.transport,
|
|
3061
|
+
debug: this.options.debug,
|
|
3062
|
+
onEnd: function (response) {
|
|
3063
|
+
if (callback) {
|
|
3064
|
+
if (response.status !== grpc.Code.OK) {
|
|
3065
|
+
var err = new Error(response.statusMessage);
|
|
3066
|
+
err.code = response.status;
|
|
3067
|
+
err.metadata = response.trailers;
|
|
3068
|
+
callback(err, null);
|
|
3069
|
+
} else {
|
|
3070
|
+
callback(null, response.message);
|
|
3071
|
+
}
|
|
3072
|
+
}
|
|
3073
|
+
}
|
|
3074
|
+
});
|
|
3075
|
+
return {
|
|
3076
|
+
cancel: function () {
|
|
3077
|
+
callback = null;
|
|
3078
|
+
client.close();
|
|
3079
|
+
}
|
|
3080
|
+
};
|
|
3081
|
+
};
|
|
3082
|
+
|
|
3083
|
+
PuppetClient.prototype.messageBatchForward = function messageBatchForward(requestMessage, metadata, callback) {
|
|
3084
|
+
if (arguments.length === 2) {
|
|
3085
|
+
callback = arguments[1];
|
|
3086
|
+
}
|
|
3087
|
+
var client = grpc.unary(Puppet.MessageBatchForward, {
|
|
3088
|
+
request: requestMessage,
|
|
3089
|
+
host: this.serviceHost,
|
|
3090
|
+
metadata: metadata,
|
|
3091
|
+
transport: this.options.transport,
|
|
3092
|
+
debug: this.options.debug,
|
|
3093
|
+
onEnd: function (response) {
|
|
3094
|
+
if (callback) {
|
|
3095
|
+
if (response.status !== grpc.Code.OK) {
|
|
3096
|
+
var err = new Error(response.statusMessage);
|
|
3097
|
+
err.code = response.status;
|
|
3098
|
+
err.metadata = response.trailers;
|
|
3099
|
+
callback(err, null);
|
|
3100
|
+
} else {
|
|
3101
|
+
callback(null, response.message);
|
|
3102
|
+
}
|
|
3103
|
+
}
|
|
3104
|
+
}
|
|
3105
|
+
});
|
|
3106
|
+
return {
|
|
3107
|
+
cancel: function () {
|
|
3108
|
+
callback = null;
|
|
3109
|
+
client.close();
|
|
3110
|
+
}
|
|
3111
|
+
};
|
|
3112
|
+
};
|
|
3113
|
+
|
|
3114
|
+
PuppetClient.prototype.messageBatchSendContact = function messageBatchSendContact(requestMessage, metadata, callback) {
|
|
3115
|
+
if (arguments.length === 2) {
|
|
3116
|
+
callback = arguments[1];
|
|
3117
|
+
}
|
|
3118
|
+
var client = grpc.unary(Puppet.MessageBatchSendContact, {
|
|
3119
|
+
request: requestMessage,
|
|
3120
|
+
host: this.serviceHost,
|
|
3121
|
+
metadata: metadata,
|
|
3122
|
+
transport: this.options.transport,
|
|
3123
|
+
debug: this.options.debug,
|
|
3124
|
+
onEnd: function (response) {
|
|
3125
|
+
if (callback) {
|
|
3126
|
+
if (response.status !== grpc.Code.OK) {
|
|
3127
|
+
var err = new Error(response.statusMessage);
|
|
3128
|
+
err.code = response.status;
|
|
3129
|
+
err.metadata = response.trailers;
|
|
3130
|
+
callback(err, null);
|
|
3131
|
+
} else {
|
|
3132
|
+
callback(null, response.message);
|
|
3133
|
+
}
|
|
3134
|
+
}
|
|
3135
|
+
}
|
|
3136
|
+
});
|
|
3137
|
+
return {
|
|
3138
|
+
cancel: function () {
|
|
3139
|
+
callback = null;
|
|
3140
|
+
client.close();
|
|
3141
|
+
}
|
|
3142
|
+
};
|
|
3143
|
+
};
|
|
3144
|
+
|
|
3145
|
+
PuppetClient.prototype.messageBatchSendUrl = function messageBatchSendUrl(requestMessage, metadata, callback) {
|
|
3146
|
+
if (arguments.length === 2) {
|
|
3147
|
+
callback = arguments[1];
|
|
3148
|
+
}
|
|
3149
|
+
var client = grpc.unary(Puppet.MessageBatchSendUrl, {
|
|
3150
|
+
request: requestMessage,
|
|
3151
|
+
host: this.serviceHost,
|
|
3152
|
+
metadata: metadata,
|
|
3153
|
+
transport: this.options.transport,
|
|
3154
|
+
debug: this.options.debug,
|
|
3155
|
+
onEnd: function (response) {
|
|
3156
|
+
if (callback) {
|
|
3157
|
+
if (response.status !== grpc.Code.OK) {
|
|
3158
|
+
var err = new Error(response.statusMessage);
|
|
3159
|
+
err.code = response.status;
|
|
3160
|
+
err.metadata = response.trailers;
|
|
3161
|
+
callback(err, null);
|
|
3162
|
+
} else {
|
|
3163
|
+
callback(null, response.message);
|
|
3164
|
+
}
|
|
3165
|
+
}
|
|
3166
|
+
}
|
|
3167
|
+
});
|
|
3168
|
+
return {
|
|
3169
|
+
cancel: function () {
|
|
3170
|
+
callback = null;
|
|
3171
|
+
client.close();
|
|
3172
|
+
}
|
|
3173
|
+
};
|
|
3174
|
+
};
|
|
3175
|
+
|
|
3176
|
+
PuppetClient.prototype.messageBatchSendMiniProgram = function messageBatchSendMiniProgram(requestMessage, metadata, callback) {
|
|
3177
|
+
if (arguments.length === 2) {
|
|
3178
|
+
callback = arguments[1];
|
|
3179
|
+
}
|
|
3180
|
+
var client = grpc.unary(Puppet.MessageBatchSendMiniProgram, {
|
|
3181
|
+
request: requestMessage,
|
|
3182
|
+
host: this.serviceHost,
|
|
3183
|
+
metadata: metadata,
|
|
3184
|
+
transport: this.options.transport,
|
|
3185
|
+
debug: this.options.debug,
|
|
3186
|
+
onEnd: function (response) {
|
|
3187
|
+
if (callback) {
|
|
3188
|
+
if (response.status !== grpc.Code.OK) {
|
|
3189
|
+
var err = new Error(response.statusMessage);
|
|
3190
|
+
err.code = response.status;
|
|
3191
|
+
err.metadata = response.trailers;
|
|
3192
|
+
callback(err, null);
|
|
3193
|
+
} else {
|
|
3194
|
+
callback(null, response.message);
|
|
3195
|
+
}
|
|
3196
|
+
}
|
|
3197
|
+
}
|
|
3198
|
+
});
|
|
3199
|
+
return {
|
|
3200
|
+
cancel: function () {
|
|
3201
|
+
callback = null;
|
|
3202
|
+
client.close();
|
|
3203
|
+
}
|
|
3204
|
+
};
|
|
3205
|
+
};
|
|
3206
|
+
|
|
3207
|
+
PuppetClient.prototype.messageBatchSendLocation = function messageBatchSendLocation(requestMessage, metadata, callback) {
|
|
3208
|
+
if (arguments.length === 2) {
|
|
3209
|
+
callback = arguments[1];
|
|
3210
|
+
}
|
|
3211
|
+
var client = grpc.unary(Puppet.MessageBatchSendLocation, {
|
|
3212
|
+
request: requestMessage,
|
|
3213
|
+
host: this.serviceHost,
|
|
3214
|
+
metadata: metadata,
|
|
3215
|
+
transport: this.options.transport,
|
|
3216
|
+
debug: this.options.debug,
|
|
3217
|
+
onEnd: function (response) {
|
|
3218
|
+
if (callback) {
|
|
3219
|
+
if (response.status !== grpc.Code.OK) {
|
|
3220
|
+
var err = new Error(response.statusMessage);
|
|
3221
|
+
err.code = response.status;
|
|
3222
|
+
err.metadata = response.trailers;
|
|
3223
|
+
callback(err, null);
|
|
3224
|
+
} else {
|
|
3225
|
+
callback(null, response.message);
|
|
3226
|
+
}
|
|
3227
|
+
}
|
|
3228
|
+
}
|
|
3229
|
+
});
|
|
3230
|
+
return {
|
|
3231
|
+
cancel: function () {
|
|
3232
|
+
callback = null;
|
|
3233
|
+
client.close();
|
|
3234
|
+
}
|
|
3235
|
+
};
|
|
3236
|
+
};
|
|
3237
|
+
|
|
3238
|
+
PuppetClient.prototype.messageBatchSendChannel = function messageBatchSendChannel(requestMessage, metadata, callback) {
|
|
3239
|
+
if (arguments.length === 2) {
|
|
3240
|
+
callback = arguments[1];
|
|
3241
|
+
}
|
|
3242
|
+
var client = grpc.unary(Puppet.MessageBatchSendChannel, {
|
|
3243
|
+
request: requestMessage,
|
|
3244
|
+
host: this.serviceHost,
|
|
3245
|
+
metadata: metadata,
|
|
3246
|
+
transport: this.options.transport,
|
|
3247
|
+
debug: this.options.debug,
|
|
3248
|
+
onEnd: function (response) {
|
|
3249
|
+
if (callback) {
|
|
3250
|
+
if (response.status !== grpc.Code.OK) {
|
|
3251
|
+
var err = new Error(response.statusMessage);
|
|
3252
|
+
err.code = response.status;
|
|
3253
|
+
err.metadata = response.trailers;
|
|
3254
|
+
callback(err, null);
|
|
3255
|
+
} else {
|
|
3256
|
+
callback(null, response.message);
|
|
3257
|
+
}
|
|
3258
|
+
}
|
|
3259
|
+
}
|
|
3260
|
+
});
|
|
3261
|
+
return {
|
|
3262
|
+
cancel: function () {
|
|
3263
|
+
callback = null;
|
|
3264
|
+
client.close();
|
|
3265
|
+
}
|
|
3266
|
+
};
|
|
3267
|
+
};
|
|
3268
|
+
|
|
3269
|
+
PuppetClient.prototype.messageBatchSendChannelCard = function messageBatchSendChannelCard(requestMessage, metadata, callback) {
|
|
3270
|
+
if (arguments.length === 2) {
|
|
3271
|
+
callback = arguments[1];
|
|
3272
|
+
}
|
|
3273
|
+
var client = grpc.unary(Puppet.MessageBatchSendChannelCard, {
|
|
2593
3274
|
request: requestMessage,
|
|
2594
3275
|
host: this.serviceHost,
|
|
2595
3276
|
metadata: metadata,
|