@juzi/wechaty-grpc 1.0.6 → 1.0.9
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/commonjs/generated/puppet.cjs.d.ts +1 -0
- package/dist/cjs/out/wechaty/puppet/contact_pb.d.ts +4 -0
- package/dist/cjs/out/wechaty/puppet/contact_pb.js +31 -1
- package/dist/cjs/out/wechaty/puppet/corp-tag_grpc_pb.js +1 -0
- package/dist/cjs/out/wechaty/puppet/corp-tag_pb.d.ts +431 -0
- package/dist/cjs/out/wechaty/puppet/corp-tag_pb.js +3315 -0
- package/dist/cjs/out/wechaty/puppet/corp-tag_pb_service.d.ts +3 -0
- package/dist/cjs/out/wechaty/puppet/corp-tag_pb_service.js +3 -0
- package/dist/cjs/out/wechaty/puppet/room-member_pb.d.ts +4 -0
- package/dist/cjs/out/wechaty/puppet/room-member_pb.js +31 -1
- package/dist/cjs/out/wechaty/puppet/room_pb.d.ts +4 -0
- package/dist/cjs/out/wechaty/puppet/room_pb.js +31 -1
- package/dist/cjs/out/wechaty/puppet.openapi.yaml +263 -1
- package/dist/cjs/out/wechaty/puppet.swagger.json +393 -1
- package/dist/cjs/out/wechaty/puppet_grpc_pb.d.ts +154 -0
- package/dist/cjs/out/wechaty/puppet_grpc_pb.js +303 -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 +172 -0
- package/dist/cjs/out/wechaty/puppet_pb_service.js +361 -0
- package/dist/cjs/proto/wechaty/puppet/contact.proto +19 -18
- package/dist/cjs/proto/wechaty/puppet/corp-tag.proto +90 -0
- package/dist/cjs/proto/wechaty/puppet/room-member.proto +6 -5
- package/dist/cjs/proto/wechaty/puppet/room.proto +6 -5
- package/dist/cjs/proto/wechaty/puppet.proto +60 -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 +45 -0
- package/dist/cjs/tests/puppet-server-impl.js.map +1 -1
- package/dist/esm/commonjs/generated/puppet.cjs.d.ts +1 -0
- package/dist/esm/out/wechaty/puppet/contact_pb.d.ts +4 -0
- package/dist/esm/out/wechaty/puppet/contact_pb.js +31 -1
- package/dist/esm/out/wechaty/puppet/corp-tag_grpc_pb.js +1 -0
- package/dist/esm/out/wechaty/puppet/corp-tag_pb.d.ts +431 -0
- package/dist/esm/out/wechaty/puppet/corp-tag_pb.js +3315 -0
- package/dist/esm/out/wechaty/puppet/corp-tag_pb_service.d.ts +3 -0
- package/dist/esm/out/wechaty/puppet/corp-tag_pb_service.js +3 -0
- package/dist/esm/out/wechaty/puppet/room-member_pb.d.ts +4 -0
- package/dist/esm/out/wechaty/puppet/room-member_pb.js +31 -1
- package/dist/esm/out/wechaty/puppet/room_pb.d.ts +4 -0
- package/dist/esm/out/wechaty/puppet/room_pb.js +31 -1
- package/dist/esm/out/wechaty/puppet.openapi.yaml +263 -1
- package/dist/esm/out/wechaty/puppet.swagger.json +393 -1
- package/dist/esm/out/wechaty/puppet_grpc_pb.d.ts +154 -0
- package/dist/esm/out/wechaty/puppet_grpc_pb.js +303 -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 +172 -0
- package/dist/esm/out/wechaty/puppet_pb_service.js +361 -0
- package/dist/esm/proto/wechaty/puppet/contact.proto +19 -18
- package/dist/esm/proto/wechaty/puppet/corp-tag.proto +90 -0
- package/dist/esm/proto/wechaty/puppet/room-member.proto +6 -5
- package/dist/esm/proto/wechaty/puppet/room.proto +6 -5
- package/dist/esm/proto/wechaty/puppet.proto +60 -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 +45 -0
- package/dist/esm/tests/puppet-server-impl.js.map +1 -1
- package/out/wechaty/puppet/contact_pb.d.ts +4 -0
- package/out/wechaty/puppet/contact_pb.js +31 -1
- package/out/wechaty/puppet/corp-tag_grpc_pb.js +1 -0
- package/out/wechaty/puppet/corp-tag_pb.d.ts +431 -0
- package/out/wechaty/puppet/corp-tag_pb.js +3315 -0
- package/out/wechaty/puppet/corp-tag_pb_service.d.ts +3 -0
- package/out/wechaty/puppet/corp-tag_pb_service.js +3 -0
- package/out/wechaty/puppet/room-member_pb.d.ts +4 -0
- package/out/wechaty/puppet/room-member_pb.js +31 -1
- package/out/wechaty/puppet/room_pb.d.ts +4 -0
- package/out/wechaty/puppet/room_pb.js +31 -1
- package/out/wechaty/puppet.openapi.yaml +263 -1
- package/out/wechaty/puppet.swagger.json +393 -1
- package/out/wechaty/puppet_grpc_pb.d.ts +154 -0
- package/out/wechaty/puppet_grpc_pb.js +303 -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 +172 -0
- package/out/wechaty/puppet_pb_service.js +361 -0
- package/package.json +1 -1
- package/src/package-json.ts +1 -1
|
@@ -13,6 +13,7 @@ var wechaty_puppet_room_invitation_pb = require("../wechaty/puppet/room-invitati
|
|
|
13
13
|
var wechaty_puppet_room_member_pb = require("../wechaty/puppet/room-member_pb");
|
|
14
14
|
var wechaty_puppet_room_pb = require("../wechaty/puppet/room_pb");
|
|
15
15
|
var wechaty_puppet_tag_pb = require("../wechaty/puppet/tag_pb");
|
|
16
|
+
var wechaty_puppet_corp_tag_pb = require("../wechaty/puppet/corp-tag_pb");
|
|
16
17
|
var grpc = require("@improbable-eng/grpc-web").grpc;
|
|
17
18
|
|
|
18
19
|
var Puppet = (function () {
|
|
@@ -588,6 +589,87 @@ Puppet.TagContactList = {
|
|
|
588
589
|
responseType: wechaty_puppet_tag_pb.TagContactListResponse
|
|
589
590
|
};
|
|
590
591
|
|
|
592
|
+
Puppet.CorpTagContactTagAdd = {
|
|
593
|
+
methodName: "CorpTagContactTagAdd",
|
|
594
|
+
service: Puppet,
|
|
595
|
+
requestStream: false,
|
|
596
|
+
responseStream: false,
|
|
597
|
+
requestType: wechaty_puppet_corp_tag_pb.CorpTagContactTagAddRequest,
|
|
598
|
+
responseType: wechaty_puppet_corp_tag_pb.CorpTagContactTagAddResponse
|
|
599
|
+
};
|
|
600
|
+
|
|
601
|
+
Puppet.CorpTagContactTagRemove = {
|
|
602
|
+
methodName: "CorpTagContactTagRemove",
|
|
603
|
+
service: Puppet,
|
|
604
|
+
requestStream: false,
|
|
605
|
+
responseStream: false,
|
|
606
|
+
requestType: wechaty_puppet_corp_tag_pb.CorpTagContactTagRemoveRequest,
|
|
607
|
+
responseType: wechaty_puppet_corp_tag_pb.CorpTagContactTagRemoveResponse
|
|
608
|
+
};
|
|
609
|
+
|
|
610
|
+
Puppet.CorpTagGroupAdd = {
|
|
611
|
+
methodName: "CorpTagGroupAdd",
|
|
612
|
+
service: Puppet,
|
|
613
|
+
requestStream: false,
|
|
614
|
+
responseStream: false,
|
|
615
|
+
requestType: wechaty_puppet_corp_tag_pb.CorpTagGroupAddRequest,
|
|
616
|
+
responseType: wechaty_puppet_corp_tag_pb.CorpTagGroupAddResponse
|
|
617
|
+
};
|
|
618
|
+
|
|
619
|
+
Puppet.CorpTagGroupDelete = {
|
|
620
|
+
methodName: "CorpTagGroupDelete",
|
|
621
|
+
service: Puppet,
|
|
622
|
+
requestStream: false,
|
|
623
|
+
responseStream: false,
|
|
624
|
+
requestType: wechaty_puppet_corp_tag_pb.CorpTagGroupDeleteRequest,
|
|
625
|
+
responseType: wechaty_puppet_corp_tag_pb.CorpTagGroupDeleteResponse
|
|
626
|
+
};
|
|
627
|
+
|
|
628
|
+
Puppet.CorpTagTagAdd = {
|
|
629
|
+
methodName: "CorpTagTagAdd",
|
|
630
|
+
service: Puppet,
|
|
631
|
+
requestStream: false,
|
|
632
|
+
responseStream: false,
|
|
633
|
+
requestType: wechaty_puppet_corp_tag_pb.CorpTagTagAddRequest,
|
|
634
|
+
responseType: wechaty_puppet_corp_tag_pb.CorpTagTagAddResponse
|
|
635
|
+
};
|
|
636
|
+
|
|
637
|
+
Puppet.CorpTagTagDelete = {
|
|
638
|
+
methodName: "CorpTagTagDelete",
|
|
639
|
+
service: Puppet,
|
|
640
|
+
requestStream: false,
|
|
641
|
+
responseStream: false,
|
|
642
|
+
requestType: wechaty_puppet_corp_tag_pb.CorpTagTagDeleteRequest,
|
|
643
|
+
responseType: wechaty_puppet_corp_tag_pb.CorpTagTagDeleteResponse
|
|
644
|
+
};
|
|
645
|
+
|
|
646
|
+
Puppet.CorpTagGroupList = {
|
|
647
|
+
methodName: "CorpTagGroupList",
|
|
648
|
+
service: Puppet,
|
|
649
|
+
requestStream: false,
|
|
650
|
+
responseStream: false,
|
|
651
|
+
requestType: wechaty_puppet_corp_tag_pb.CorpTagGroupListRequest,
|
|
652
|
+
responseType: wechaty_puppet_corp_tag_pb.CorpTagGroupListResponse
|
|
653
|
+
};
|
|
654
|
+
|
|
655
|
+
Puppet.CorpTagTagList = {
|
|
656
|
+
methodName: "CorpTagTagList",
|
|
657
|
+
service: Puppet,
|
|
658
|
+
requestStream: false,
|
|
659
|
+
responseStream: false,
|
|
660
|
+
requestType: wechaty_puppet_corp_tag_pb.CorpTagTagListRequest,
|
|
661
|
+
responseType: wechaty_puppet_corp_tag_pb.CorpTagTagListResponse
|
|
662
|
+
};
|
|
663
|
+
|
|
664
|
+
Puppet.CorpTagContactTagList = {
|
|
665
|
+
methodName: "CorpTagContactTagList",
|
|
666
|
+
service: Puppet,
|
|
667
|
+
requestStream: false,
|
|
668
|
+
responseStream: false,
|
|
669
|
+
requestType: wechaty_puppet_corp_tag_pb.CorpTagContactTagListRequest,
|
|
670
|
+
responseType: wechaty_puppet_corp_tag_pb.CorpTagContactTagListResponse
|
|
671
|
+
};
|
|
672
|
+
|
|
591
673
|
Puppet.Download = {
|
|
592
674
|
methodName: "Download",
|
|
593
675
|
service: Puppet,
|
|
@@ -2600,6 +2682,285 @@ PuppetClient.prototype.tagContactList = function tagContactList(requestMessage,
|
|
|
2600
2682
|
};
|
|
2601
2683
|
};
|
|
2602
2684
|
|
|
2685
|
+
PuppetClient.prototype.corpTagContactTagAdd = function corpTagContactTagAdd(requestMessage, metadata, callback) {
|
|
2686
|
+
if (arguments.length === 2) {
|
|
2687
|
+
callback = arguments[1];
|
|
2688
|
+
}
|
|
2689
|
+
var client = grpc.unary(Puppet.CorpTagContactTagAdd, {
|
|
2690
|
+
request: requestMessage,
|
|
2691
|
+
host: this.serviceHost,
|
|
2692
|
+
metadata: metadata,
|
|
2693
|
+
transport: this.options.transport,
|
|
2694
|
+
debug: this.options.debug,
|
|
2695
|
+
onEnd: function (response) {
|
|
2696
|
+
if (callback) {
|
|
2697
|
+
if (response.status !== grpc.Code.OK) {
|
|
2698
|
+
var err = new Error(response.statusMessage);
|
|
2699
|
+
err.code = response.status;
|
|
2700
|
+
err.metadata = response.trailers;
|
|
2701
|
+
callback(err, null);
|
|
2702
|
+
} else {
|
|
2703
|
+
callback(null, response.message);
|
|
2704
|
+
}
|
|
2705
|
+
}
|
|
2706
|
+
}
|
|
2707
|
+
});
|
|
2708
|
+
return {
|
|
2709
|
+
cancel: function () {
|
|
2710
|
+
callback = null;
|
|
2711
|
+
client.close();
|
|
2712
|
+
}
|
|
2713
|
+
};
|
|
2714
|
+
};
|
|
2715
|
+
|
|
2716
|
+
PuppetClient.prototype.corpTagContactTagRemove = function corpTagContactTagRemove(requestMessage, metadata, callback) {
|
|
2717
|
+
if (arguments.length === 2) {
|
|
2718
|
+
callback = arguments[1];
|
|
2719
|
+
}
|
|
2720
|
+
var client = grpc.unary(Puppet.CorpTagContactTagRemove, {
|
|
2721
|
+
request: requestMessage,
|
|
2722
|
+
host: this.serviceHost,
|
|
2723
|
+
metadata: metadata,
|
|
2724
|
+
transport: this.options.transport,
|
|
2725
|
+
debug: this.options.debug,
|
|
2726
|
+
onEnd: function (response) {
|
|
2727
|
+
if (callback) {
|
|
2728
|
+
if (response.status !== grpc.Code.OK) {
|
|
2729
|
+
var err = new Error(response.statusMessage);
|
|
2730
|
+
err.code = response.status;
|
|
2731
|
+
err.metadata = response.trailers;
|
|
2732
|
+
callback(err, null);
|
|
2733
|
+
} else {
|
|
2734
|
+
callback(null, response.message);
|
|
2735
|
+
}
|
|
2736
|
+
}
|
|
2737
|
+
}
|
|
2738
|
+
});
|
|
2739
|
+
return {
|
|
2740
|
+
cancel: function () {
|
|
2741
|
+
callback = null;
|
|
2742
|
+
client.close();
|
|
2743
|
+
}
|
|
2744
|
+
};
|
|
2745
|
+
};
|
|
2746
|
+
|
|
2747
|
+
PuppetClient.prototype.corpTagGroupAdd = function corpTagGroupAdd(requestMessage, metadata, callback) {
|
|
2748
|
+
if (arguments.length === 2) {
|
|
2749
|
+
callback = arguments[1];
|
|
2750
|
+
}
|
|
2751
|
+
var client = grpc.unary(Puppet.CorpTagGroupAdd, {
|
|
2752
|
+
request: requestMessage,
|
|
2753
|
+
host: this.serviceHost,
|
|
2754
|
+
metadata: metadata,
|
|
2755
|
+
transport: this.options.transport,
|
|
2756
|
+
debug: this.options.debug,
|
|
2757
|
+
onEnd: function (response) {
|
|
2758
|
+
if (callback) {
|
|
2759
|
+
if (response.status !== grpc.Code.OK) {
|
|
2760
|
+
var err = new Error(response.statusMessage);
|
|
2761
|
+
err.code = response.status;
|
|
2762
|
+
err.metadata = response.trailers;
|
|
2763
|
+
callback(err, null);
|
|
2764
|
+
} else {
|
|
2765
|
+
callback(null, response.message);
|
|
2766
|
+
}
|
|
2767
|
+
}
|
|
2768
|
+
}
|
|
2769
|
+
});
|
|
2770
|
+
return {
|
|
2771
|
+
cancel: function () {
|
|
2772
|
+
callback = null;
|
|
2773
|
+
client.close();
|
|
2774
|
+
}
|
|
2775
|
+
};
|
|
2776
|
+
};
|
|
2777
|
+
|
|
2778
|
+
PuppetClient.prototype.corpTagGroupDelete = function corpTagGroupDelete(requestMessage, metadata, callback) {
|
|
2779
|
+
if (arguments.length === 2) {
|
|
2780
|
+
callback = arguments[1];
|
|
2781
|
+
}
|
|
2782
|
+
var client = grpc.unary(Puppet.CorpTagGroupDelete, {
|
|
2783
|
+
request: requestMessage,
|
|
2784
|
+
host: this.serviceHost,
|
|
2785
|
+
metadata: metadata,
|
|
2786
|
+
transport: this.options.transport,
|
|
2787
|
+
debug: this.options.debug,
|
|
2788
|
+
onEnd: function (response) {
|
|
2789
|
+
if (callback) {
|
|
2790
|
+
if (response.status !== grpc.Code.OK) {
|
|
2791
|
+
var err = new Error(response.statusMessage);
|
|
2792
|
+
err.code = response.status;
|
|
2793
|
+
err.metadata = response.trailers;
|
|
2794
|
+
callback(err, null);
|
|
2795
|
+
} else {
|
|
2796
|
+
callback(null, response.message);
|
|
2797
|
+
}
|
|
2798
|
+
}
|
|
2799
|
+
}
|
|
2800
|
+
});
|
|
2801
|
+
return {
|
|
2802
|
+
cancel: function () {
|
|
2803
|
+
callback = null;
|
|
2804
|
+
client.close();
|
|
2805
|
+
}
|
|
2806
|
+
};
|
|
2807
|
+
};
|
|
2808
|
+
|
|
2809
|
+
PuppetClient.prototype.corpTagTagAdd = function corpTagTagAdd(requestMessage, metadata, callback) {
|
|
2810
|
+
if (arguments.length === 2) {
|
|
2811
|
+
callback = arguments[1];
|
|
2812
|
+
}
|
|
2813
|
+
var client = grpc.unary(Puppet.CorpTagTagAdd, {
|
|
2814
|
+
request: requestMessage,
|
|
2815
|
+
host: this.serviceHost,
|
|
2816
|
+
metadata: metadata,
|
|
2817
|
+
transport: this.options.transport,
|
|
2818
|
+
debug: this.options.debug,
|
|
2819
|
+
onEnd: function (response) {
|
|
2820
|
+
if (callback) {
|
|
2821
|
+
if (response.status !== grpc.Code.OK) {
|
|
2822
|
+
var err = new Error(response.statusMessage);
|
|
2823
|
+
err.code = response.status;
|
|
2824
|
+
err.metadata = response.trailers;
|
|
2825
|
+
callback(err, null);
|
|
2826
|
+
} else {
|
|
2827
|
+
callback(null, response.message);
|
|
2828
|
+
}
|
|
2829
|
+
}
|
|
2830
|
+
}
|
|
2831
|
+
});
|
|
2832
|
+
return {
|
|
2833
|
+
cancel: function () {
|
|
2834
|
+
callback = null;
|
|
2835
|
+
client.close();
|
|
2836
|
+
}
|
|
2837
|
+
};
|
|
2838
|
+
};
|
|
2839
|
+
|
|
2840
|
+
PuppetClient.prototype.corpTagTagDelete = function corpTagTagDelete(requestMessage, metadata, callback) {
|
|
2841
|
+
if (arguments.length === 2) {
|
|
2842
|
+
callback = arguments[1];
|
|
2843
|
+
}
|
|
2844
|
+
var client = grpc.unary(Puppet.CorpTagTagDelete, {
|
|
2845
|
+
request: requestMessage,
|
|
2846
|
+
host: this.serviceHost,
|
|
2847
|
+
metadata: metadata,
|
|
2848
|
+
transport: this.options.transport,
|
|
2849
|
+
debug: this.options.debug,
|
|
2850
|
+
onEnd: function (response) {
|
|
2851
|
+
if (callback) {
|
|
2852
|
+
if (response.status !== grpc.Code.OK) {
|
|
2853
|
+
var err = new Error(response.statusMessage);
|
|
2854
|
+
err.code = response.status;
|
|
2855
|
+
err.metadata = response.trailers;
|
|
2856
|
+
callback(err, null);
|
|
2857
|
+
} else {
|
|
2858
|
+
callback(null, response.message);
|
|
2859
|
+
}
|
|
2860
|
+
}
|
|
2861
|
+
}
|
|
2862
|
+
});
|
|
2863
|
+
return {
|
|
2864
|
+
cancel: function () {
|
|
2865
|
+
callback = null;
|
|
2866
|
+
client.close();
|
|
2867
|
+
}
|
|
2868
|
+
};
|
|
2869
|
+
};
|
|
2870
|
+
|
|
2871
|
+
PuppetClient.prototype.corpTagGroupList = function corpTagGroupList(requestMessage, metadata, callback) {
|
|
2872
|
+
if (arguments.length === 2) {
|
|
2873
|
+
callback = arguments[1];
|
|
2874
|
+
}
|
|
2875
|
+
var client = grpc.unary(Puppet.CorpTagGroupList, {
|
|
2876
|
+
request: requestMessage,
|
|
2877
|
+
host: this.serviceHost,
|
|
2878
|
+
metadata: metadata,
|
|
2879
|
+
transport: this.options.transport,
|
|
2880
|
+
debug: this.options.debug,
|
|
2881
|
+
onEnd: function (response) {
|
|
2882
|
+
if (callback) {
|
|
2883
|
+
if (response.status !== grpc.Code.OK) {
|
|
2884
|
+
var err = new Error(response.statusMessage);
|
|
2885
|
+
err.code = response.status;
|
|
2886
|
+
err.metadata = response.trailers;
|
|
2887
|
+
callback(err, null);
|
|
2888
|
+
} else {
|
|
2889
|
+
callback(null, response.message);
|
|
2890
|
+
}
|
|
2891
|
+
}
|
|
2892
|
+
}
|
|
2893
|
+
});
|
|
2894
|
+
return {
|
|
2895
|
+
cancel: function () {
|
|
2896
|
+
callback = null;
|
|
2897
|
+
client.close();
|
|
2898
|
+
}
|
|
2899
|
+
};
|
|
2900
|
+
};
|
|
2901
|
+
|
|
2902
|
+
PuppetClient.prototype.corpTagTagList = function corpTagTagList(requestMessage, metadata, callback) {
|
|
2903
|
+
if (arguments.length === 2) {
|
|
2904
|
+
callback = arguments[1];
|
|
2905
|
+
}
|
|
2906
|
+
var client = grpc.unary(Puppet.CorpTagTagList, {
|
|
2907
|
+
request: requestMessage,
|
|
2908
|
+
host: this.serviceHost,
|
|
2909
|
+
metadata: metadata,
|
|
2910
|
+
transport: this.options.transport,
|
|
2911
|
+
debug: this.options.debug,
|
|
2912
|
+
onEnd: function (response) {
|
|
2913
|
+
if (callback) {
|
|
2914
|
+
if (response.status !== grpc.Code.OK) {
|
|
2915
|
+
var err = new Error(response.statusMessage);
|
|
2916
|
+
err.code = response.status;
|
|
2917
|
+
err.metadata = response.trailers;
|
|
2918
|
+
callback(err, null);
|
|
2919
|
+
} else {
|
|
2920
|
+
callback(null, response.message);
|
|
2921
|
+
}
|
|
2922
|
+
}
|
|
2923
|
+
}
|
|
2924
|
+
});
|
|
2925
|
+
return {
|
|
2926
|
+
cancel: function () {
|
|
2927
|
+
callback = null;
|
|
2928
|
+
client.close();
|
|
2929
|
+
}
|
|
2930
|
+
};
|
|
2931
|
+
};
|
|
2932
|
+
|
|
2933
|
+
PuppetClient.prototype.corpTagContactTagList = function corpTagContactTagList(requestMessage, metadata, callback) {
|
|
2934
|
+
if (arguments.length === 2) {
|
|
2935
|
+
callback = arguments[1];
|
|
2936
|
+
}
|
|
2937
|
+
var client = grpc.unary(Puppet.CorpTagContactTagList, {
|
|
2938
|
+
request: requestMessage,
|
|
2939
|
+
host: this.serviceHost,
|
|
2940
|
+
metadata: metadata,
|
|
2941
|
+
transport: this.options.transport,
|
|
2942
|
+
debug: this.options.debug,
|
|
2943
|
+
onEnd: function (response) {
|
|
2944
|
+
if (callback) {
|
|
2945
|
+
if (response.status !== grpc.Code.OK) {
|
|
2946
|
+
var err = new Error(response.statusMessage);
|
|
2947
|
+
err.code = response.status;
|
|
2948
|
+
err.metadata = response.trailers;
|
|
2949
|
+
callback(err, null);
|
|
2950
|
+
} else {
|
|
2951
|
+
callback(null, response.message);
|
|
2952
|
+
}
|
|
2953
|
+
}
|
|
2954
|
+
}
|
|
2955
|
+
});
|
|
2956
|
+
return {
|
|
2957
|
+
cancel: function () {
|
|
2958
|
+
callback = null;
|
|
2959
|
+
client.close();
|
|
2960
|
+
}
|
|
2961
|
+
};
|
|
2962
|
+
};
|
|
2963
|
+
|
|
2603
2964
|
PuppetClient.prototype.download = function download(requestMessage, metadata) {
|
|
2604
2965
|
var listeners = {
|
|
2605
2966
|
data: [],
|
|
@@ -29,18 +29,18 @@ message ContactPayloadRequest {
|
|
|
29
29
|
string id = 1;
|
|
30
30
|
}
|
|
31
31
|
message ContactPayloadResponse {
|
|
32
|
-
string
|
|
33
|
-
ContactGender
|
|
34
|
-
ContactType
|
|
35
|
-
string
|
|
36
|
-
string
|
|
37
|
-
string
|
|
38
|
-
string
|
|
39
|
-
string
|
|
40
|
-
bool
|
|
41
|
-
string
|
|
42
|
-
string
|
|
43
|
-
bool
|
|
32
|
+
string id = 1;
|
|
33
|
+
ContactGender gender = 2;
|
|
34
|
+
ContactType type = 3;
|
|
35
|
+
string name = 4;
|
|
36
|
+
string avatar = 5;
|
|
37
|
+
string address = 6;
|
|
38
|
+
string alias = 7;
|
|
39
|
+
string city = 8;
|
|
40
|
+
bool friend = 9;
|
|
41
|
+
string province = 10;
|
|
42
|
+
string signature = 11;
|
|
43
|
+
bool star = 12;
|
|
44
44
|
/**
|
|
45
45
|
* Huan(202203): in gRPC, we can freely rename the field name as long as the number keep consistent.
|
|
46
46
|
* so we can just rename `weixin` to `handle` here.
|
|
@@ -52,12 +52,13 @@ message ContactPayloadResponse {
|
|
|
52
52
|
*
|
|
53
53
|
* TODO: rename `weixin` to `handle` in v2.0.0
|
|
54
54
|
*/
|
|
55
|
-
string
|
|
56
|
-
string
|
|
57
|
-
string
|
|
58
|
-
string
|
|
59
|
-
bool
|
|
60
|
-
repeated string
|
|
55
|
+
string weixin = 13;
|
|
56
|
+
string corporation = 14;
|
|
57
|
+
string title = 15;
|
|
58
|
+
string description = 16;
|
|
59
|
+
bool coworker = 17;
|
|
60
|
+
repeated string phones = 18;
|
|
61
|
+
string additional_info = 19;
|
|
61
62
|
}
|
|
62
63
|
|
|
63
64
|
message ContactSelfQRCodeRequest {}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
package wechaty.puppet;
|
|
3
|
+
|
|
4
|
+
option go_package = "github.com/wechaty/go-grpc/wechaty/puppet";
|
|
5
|
+
option java_package = "io.github.wechaty.grpc.puppet";
|
|
6
|
+
option csharp_namespace = "github.wechaty.grpc.puppet";
|
|
7
|
+
|
|
8
|
+
message CorpTagPayload {
|
|
9
|
+
string id = 1;
|
|
10
|
+
string name = 2;
|
|
11
|
+
string group_id = 3;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
message CorpTagGroupPayload {
|
|
15
|
+
string id = 1;
|
|
16
|
+
string name = 2;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
message CorpTagContactTagAddRequest {
|
|
20
|
+
string corp_tag_group_id = 1;
|
|
21
|
+
string corp_tag_id = 2;
|
|
22
|
+
string contact_id = 3;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
message CorpTagContactTagAddResponse {
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
message CorpTagContactTagRemoveRequest {
|
|
29
|
+
string corp_tag_group_id = 1;
|
|
30
|
+
string corp_tag_id = 2;
|
|
31
|
+
string contact_id = 3;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
message CorpTagContactTagRemoveResponse {
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
message CorpTagGroupAddRequest {
|
|
38
|
+
string corp_tag_group_name = 1;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
message CorpTagGroupAddResponse {
|
|
42
|
+
CorpTagGroupPayload payload = 1;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
message CorpTagGroupDeleteRequest {
|
|
46
|
+
string corp_tag_group_id = 1;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
message CorpTagGroupDeleteResponse {
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
message CorpTagTagAddRequest {
|
|
53
|
+
string corp_tag_group_id = 1;
|
|
54
|
+
string corp_tag_name = 2;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
message CorpTagTagAddResponse {
|
|
58
|
+
CorpTagPayload payload = 1;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
message CorpTagTagDeleteRequest {
|
|
62
|
+
string corp_tag_group_id = 1;
|
|
63
|
+
string corp_tag_id = 2;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
message CorpTagTagDeleteResponse {
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
message CorpTagGroupListRequest {
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
message CorpTagGroupListResponse {
|
|
73
|
+
repeated CorpTagGroupPayload payloads = 1;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
message CorpTagTagListRequest {
|
|
77
|
+
string corp_tag_group_id = 1;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
message CorpTagTagListResponse {
|
|
81
|
+
repeated CorpTagPayload payloads = 1;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
message CorpTagContactTagListRequest {
|
|
85
|
+
string contact_id = 1;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
message CorpTagContactTagListResponse {
|
|
89
|
+
repeated CorpTagPayload payloads = 1;
|
|
90
|
+
}
|
|
@@ -10,11 +10,12 @@ message RoomMemberPayloadRequest {
|
|
|
10
10
|
string member_id = 2;
|
|
11
11
|
}
|
|
12
12
|
message RoomMemberPayloadResponse {
|
|
13
|
-
string id
|
|
14
|
-
string room_alias
|
|
15
|
-
string inviter_id
|
|
16
|
-
string avatar
|
|
17
|
-
string name
|
|
13
|
+
string id = 1;
|
|
14
|
+
string room_alias = 2;
|
|
15
|
+
string inviter_id = 3;
|
|
16
|
+
string avatar = 4;
|
|
17
|
+
string name = 5;
|
|
18
|
+
string additional_info = 6;
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
message RoomMemberListRequest {
|
|
@@ -16,13 +16,14 @@ message RoomPayloadRequest {
|
|
|
16
16
|
string id = 1;
|
|
17
17
|
}
|
|
18
18
|
message RoomPayloadResponse {
|
|
19
|
-
string id
|
|
20
|
-
string topic
|
|
21
|
-
string avatar
|
|
22
|
-
string owner_id
|
|
19
|
+
string id = 1;
|
|
20
|
+
string topic = 2;
|
|
21
|
+
string avatar = 3;
|
|
22
|
+
string owner_id = 4;
|
|
23
23
|
repeated string admin_ids = 5;
|
|
24
24
|
repeated string member_ids = 6;
|
|
25
|
-
string handle
|
|
25
|
+
string handle = 7;
|
|
26
|
+
string additional_info = 8;
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
message RoomAddRequest {
|
|
@@ -29,6 +29,7 @@ import "wechaty/puppet/room-member.proto";
|
|
|
29
29
|
import "wechaty/puppet/room.proto";
|
|
30
30
|
import "wechaty/puppet/tag.proto";
|
|
31
31
|
import "wechaty/puppet/channel.proto";
|
|
32
|
+
import "wechaty/puppet/corp-tag.proto";
|
|
32
33
|
|
|
33
34
|
|
|
34
35
|
option java_package="io.github.wechaty.grpc";
|
|
@@ -512,6 +513,65 @@ service Puppet {
|
|
|
512
513
|
};
|
|
513
514
|
}
|
|
514
515
|
|
|
516
|
+
/**
|
|
517
|
+
*
|
|
518
|
+
* Corp-Tag
|
|
519
|
+
*
|
|
520
|
+
*/
|
|
521
|
+
|
|
522
|
+
rpc CorpTagContactTagAdd (puppet.CorpTagContactTagAddRequest) returns (puppet.CorpTagContactTagAddResponse) {
|
|
523
|
+
option (google.api.http) = {
|
|
524
|
+
put: "/contacts/{contact_id}/corp-tag/tags/{corp_tag_id}"
|
|
525
|
+
};
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
rpc CorpTagContactTagRemove (puppet.CorpTagContactTagRemoveRequest) returns (puppet.CorpTagContactTagRemoveResponse) {
|
|
529
|
+
option (google.api.http) = {
|
|
530
|
+
delete: "/contacts/{contact_id}/corp-tag/tags/{corp_tag_id}"
|
|
531
|
+
};
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
rpc CorpTagGroupAdd (puppet.CorpTagGroupAddRequest) returns (puppet.CorpTagGroupAddResponse) {
|
|
535
|
+
option (google.api.http) = {
|
|
536
|
+
put: "/corp-tags/groups/{corp_tag_group_name}"
|
|
537
|
+
};
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
rpc CorpTagGroupDelete (puppet.CorpTagGroupDeleteRequest) returns (puppet.CorpTagGroupDeleteResponse) {
|
|
541
|
+
option (google.api.http) = {
|
|
542
|
+
delete: "/corp-tags/groups/{corp_tag_group_id}"
|
|
543
|
+
};
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
rpc CorpTagTagAdd (puppet.CorpTagTagAddRequest) returns (puppet.CorpTagTagAddResponse) {
|
|
547
|
+
option (google.api.http) = {
|
|
548
|
+
put: "/corp-tags/groups/{corp_tag_group_id}/tags/{corp_tag_name}"
|
|
549
|
+
};
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
rpc CorpTagTagDelete (puppet.CorpTagTagDeleteRequest) returns (puppet.CorpTagTagDeleteResponse) {
|
|
553
|
+
option (google.api.http) = {
|
|
554
|
+
delete: "/corp-tags/groups/{corp_tag_group_id}/tags/{corp_tag_id}"
|
|
555
|
+
};
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
rpc CorpTagGroupList (puppet.CorpTagGroupListRequest) returns (puppet.CorpTagGroupListResponse) {
|
|
559
|
+
option (google.api.http) = {
|
|
560
|
+
get: "/corp-tag/groups"
|
|
561
|
+
};
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
rpc CorpTagTagList (puppet.CorpTagTagListRequest) returns (puppet.CorpTagTagListResponse) {
|
|
565
|
+
option (google.api.http) = {
|
|
566
|
+
get: "/corp-tag/groups/{corp_tag_group_id}"
|
|
567
|
+
};
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
rpc CorpTagContactTagList (puppet.CorpTagContactTagListRequest) returns (puppet.CorpTagContactTagListResponse) {
|
|
571
|
+
option (google.api.http) = {
|
|
572
|
+
get: "/contacts/{contact_id}/corp-tag/tags"
|
|
573
|
+
};
|
|
574
|
+
}
|
|
515
575
|
/**
|
|
516
576
|
* File/Blob download & upload
|
|
517
577
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"puppet-server-impl.d.ts","sourceRoot":"","sources":["../../../tests/puppet-server-impl.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,MAAM,EACP,MAA4B,eAAe,CAAA;AAE5C,aAAK,aAAa,GAAG,MAAM,CAAC,aAAa,CAAA;AAEzC;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,
|
|
1
|
+
{"version":3,"file":"puppet-server-impl.d.ts","sourceRoot":"","sources":["../../../tests/puppet-server-impl.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,MAAM,EACP,MAA4B,eAAe,CAAA;AAE5C,aAAK,aAAa,GAAG,MAAM,CAAC,aAAa,CAAA;AAEzC;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,aA2b9B,CAAA"}
|
|
@@ -309,6 +309,51 @@ export const puppetServerImpl = {
|
|
|
309
309
|
void callback;
|
|
310
310
|
throw new Error('not implemented.');
|
|
311
311
|
},
|
|
312
|
+
corpTagContactTagAdd: (call, callback) => {
|
|
313
|
+
void call;
|
|
314
|
+
void callback;
|
|
315
|
+
throw new Error('not implemented.');
|
|
316
|
+
},
|
|
317
|
+
corpTagContactTagRemove: (call, callback) => {
|
|
318
|
+
void call;
|
|
319
|
+
void callback;
|
|
320
|
+
throw new Error('not implemented.');
|
|
321
|
+
},
|
|
322
|
+
corpTagGroupAdd: (call, callback) => {
|
|
323
|
+
void call;
|
|
324
|
+
void callback;
|
|
325
|
+
throw new Error('not implemented.');
|
|
326
|
+
},
|
|
327
|
+
corpTagGroupDelete: (call, callback) => {
|
|
328
|
+
void call;
|
|
329
|
+
void callback;
|
|
330
|
+
throw new Error('not implemented.');
|
|
331
|
+
},
|
|
332
|
+
corpTagTagAdd: (call, callback) => {
|
|
333
|
+
void call;
|
|
334
|
+
void callback;
|
|
335
|
+
throw new Error('not implemented.');
|
|
336
|
+
},
|
|
337
|
+
corpTagTagDelete: (call, callback) => {
|
|
338
|
+
void call;
|
|
339
|
+
void callback;
|
|
340
|
+
throw new Error('not implemented.');
|
|
341
|
+
},
|
|
342
|
+
corpTagGroupList: (call, callback) => {
|
|
343
|
+
void call;
|
|
344
|
+
void callback;
|
|
345
|
+
throw new Error('not implemented.');
|
|
346
|
+
},
|
|
347
|
+
corpTagTagList: (call, callback) => {
|
|
348
|
+
void call;
|
|
349
|
+
void callback;
|
|
350
|
+
throw new Error('not implemented.');
|
|
351
|
+
},
|
|
352
|
+
corpTagContactTagList: (call, callback) => {
|
|
353
|
+
void call;
|
|
354
|
+
void callback;
|
|
355
|
+
throw new Error('not implemented.');
|
|
356
|
+
},
|
|
312
357
|
version: (call, callback) => {
|
|
313
358
|
void call;
|
|
314
359
|
void callback;
|