@juzi/wechaty-grpc 1.0.15 → 1.0.16

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.
@@ -9,7 +9,7 @@ info:
9
9
 
10
10
  Wechaty Puppet Service is the RESTful API for Wechaty API, which is build on
11
11
  top of the Wechaty Puppet Abstraction and the gRPC proto definition.
12
- version: 1.0.15
12
+ version: 1.0.16
13
13
  contact:
14
14
  name: Wechaty
15
15
  url: 'https://github.com/wechaty/openapi'
@@ -1577,7 +1577,7 @@ paths:
1577
1577
  $ref: '#/definitions/puppetTagContactTagRemoveRequest'
1578
1578
  tags:
1579
1579
  - Puppet
1580
- '/tag/{tag.groupId}/{tag.id}/contacts':
1580
+ '/tag/{tagId}/contacts':
1581
1581
  get:
1582
1582
  operationId: Puppet_TagTagContactList
1583
1583
  responses:
@@ -1590,11 +1590,7 @@ paths:
1590
1590
  schema:
1591
1591
  $ref: '#/definitions/rpcStatus'
1592
1592
  parameters:
1593
- - name: tag.groupId
1594
- in: path
1595
- required: true
1596
- type: string
1597
- - name: tag.id
1593
+ - name: tagId
1598
1594
  in: path
1599
1595
  required: true
1600
1596
  type: string
@@ -1996,10 +1992,10 @@ definitions:
1996
1992
  type: string
1997
1993
  additionalInfo:
1998
1994
  type: string
1999
- tags:
1995
+ tagIds:
2000
1996
  type: array
2001
1997
  items:
2002
- $ref: '#/definitions/puppetTagIdentifier'
1998
+ type: string
2003
1999
  puppetContactPhoneResponse:
2004
2000
  type: object
2005
2001
  properties:
@@ -2655,10 +2651,10 @@ definitions:
2655
2651
  puppetTagContactTagAddRequest:
2656
2652
  type: object
2657
2653
  properties:
2658
- tags:
2654
+ tagIds:
2659
2655
  type: array
2660
2656
  items:
2661
- $ref: '#/definitions/puppetTagIdentifier'
2657
+ type: string
2662
2658
  contactIds:
2663
2659
  type: array
2664
2660
  items:
@@ -2668,17 +2664,17 @@ definitions:
2668
2664
  puppetTagContactTagListResponse:
2669
2665
  type: object
2670
2666
  properties:
2671
- tags:
2667
+ tagIds:
2672
2668
  type: array
2673
2669
  items:
2674
- $ref: '#/definitions/puppetTagIdentifier'
2670
+ type: string
2675
2671
  puppetTagContactTagRemoveRequest:
2676
2672
  type: object
2677
2673
  properties:
2678
- tags:
2674
+ tagIds:
2679
2675
  type: array
2680
2676
  items:
2681
- $ref: '#/definitions/puppetTagIdentifier'
2677
+ type: string
2682
2678
  contactIds:
2683
2679
  type: array
2684
2680
  items:
@@ -2731,17 +2727,10 @@ definitions:
2731
2727
  puppetTagGroupTagListResponse:
2732
2728
  type: object
2733
2729
  properties:
2734
- tags:
2730
+ tagIds:
2735
2731
  type: array
2736
2732
  items:
2737
- $ref: '#/definitions/puppetTagIdentifier'
2738
- puppetTagIdentifier:
2739
- type: object
2740
- properties:
2741
- id:
2742
- type: string
2743
- groupId:
2744
- type: string
2733
+ type: string
2745
2734
  puppetTagPayload:
2746
2735
  type: object
2747
2736
  properties:
@@ -2756,8 +2745,8 @@ definitions:
2756
2745
  puppetTagPayloadRequest:
2757
2746
  type: object
2758
2747
  properties:
2759
- tag:
2760
- $ref: '#/definitions/puppetTagIdentifier'
2748
+ tagId:
2749
+ type: string
2761
2750
  puppetTagPayloadResponse:
2762
2751
  type: object
2763
2752
  properties:
@@ -2773,8 +2762,8 @@ definitions:
2773
2762
  puppetTagTagAddResponse:
2774
2763
  type: object
2775
2764
  properties:
2776
- tag:
2777
- $ref: '#/definitions/puppetTagIdentifier'
2765
+ tagId:
2766
+ type: string
2778
2767
  puppetTagTagContactListResponse:
2779
2768
  type: object
2780
2769
  properties:
@@ -2785,17 +2774,17 @@ definitions:
2785
2774
  puppetTagTagDeleteRequest:
2786
2775
  type: object
2787
2776
  properties:
2788
- tag:
2789
- $ref: '#/definitions/puppetTagIdentifier'
2777
+ tagId:
2778
+ type: string
2790
2779
  puppetTagTagDeleteResponse:
2791
2780
  type: object
2792
2781
  puppetTagTagListResponse:
2793
2782
  type: object
2794
2783
  properties:
2795
- tags:
2784
+ tagIds:
2796
2785
  type: array
2797
2786
  items:
2798
- $ref: '#/definitions/puppetTagIdentifier'
2787
+ type: string
2799
2788
  puppetTagType:
2800
2789
  type: string
2801
2790
  enum:
@@ -3,7 +3,7 @@
3
3
  "info": {
4
4
  "title": "Wechaty Puppet Service OpenAPI Specification",
5
5
  "description": "Wechaty is a Conversational RPA SDK for chatbot makers. With only 6 lines of code, you can create a bot on the most popular IMs like WeChat, Whatsapp, WeCom, Gitter, etc.\n\nWechaty Puppet Service is the RESTful API for Wechaty API, which is build on top of the Wechaty Puppet Abstraction and the gRPC proto definition.",
6
- "version": "1.0.15",
6
+ "version": "1.0.16",
7
7
  "contact": {
8
8
  "name": "Wechaty",
9
9
  "url": "https://github.com/wechaty/openapi",
@@ -2372,7 +2372,7 @@
2372
2372
  ]
2373
2373
  }
2374
2374
  },
2375
- "/tag/{tag.groupId}/{tag.id}/contacts": {
2375
+ "/tag/{tagId}/contacts": {
2376
2376
  "get": {
2377
2377
  "operationId": "Puppet_TagTagContactList",
2378
2378
  "responses": {
@@ -2391,13 +2391,7 @@
2391
2391
  },
2392
2392
  "parameters": [
2393
2393
  {
2394
- "name": "tag.groupId",
2395
- "in": "path",
2396
- "required": true,
2397
- "type": "string"
2398
- },
2399
- {
2400
- "name": "tag.id",
2394
+ "name": "tagId",
2401
2395
  "in": "path",
2402
2396
  "required": true,
2403
2397
  "type": "string"
@@ -2980,10 +2974,10 @@
2980
2974
  "additionalInfo": {
2981
2975
  "type": "string"
2982
2976
  },
2983
- "tags": {
2977
+ "tagIds": {
2984
2978
  "type": "array",
2985
2979
  "items": {
2986
- "$ref": "#/definitions/puppetTagIdentifier"
2980
+ "type": "string"
2987
2981
  }
2988
2982
  }
2989
2983
  }
@@ -3832,10 +3826,10 @@
3832
3826
  "puppetTagContactTagAddRequest": {
3833
3827
  "type": "object",
3834
3828
  "properties": {
3835
- "tags": {
3829
+ "tagIds": {
3836
3830
  "type": "array",
3837
3831
  "items": {
3838
- "$ref": "#/definitions/puppetTagIdentifier"
3832
+ "type": "string"
3839
3833
  }
3840
3834
  },
3841
3835
  "contactIds": {
@@ -3852,10 +3846,10 @@
3852
3846
  "puppetTagContactTagListResponse": {
3853
3847
  "type": "object",
3854
3848
  "properties": {
3855
- "tags": {
3849
+ "tagIds": {
3856
3850
  "type": "array",
3857
3851
  "items": {
3858
- "$ref": "#/definitions/puppetTagIdentifier"
3852
+ "type": "string"
3859
3853
  }
3860
3854
  }
3861
3855
  }
@@ -3863,10 +3857,10 @@
3863
3857
  "puppetTagContactTagRemoveRequest": {
3864
3858
  "type": "object",
3865
3859
  "properties": {
3866
- "tags": {
3860
+ "tagIds": {
3867
3861
  "type": "array",
3868
3862
  "items": {
3869
- "$ref": "#/definitions/puppetTagIdentifier"
3863
+ "type": "string"
3870
3864
  }
3871
3865
  },
3872
3866
  "contactIds": {
@@ -3951,25 +3945,14 @@
3951
3945
  "puppetTagGroupTagListResponse": {
3952
3946
  "type": "object",
3953
3947
  "properties": {
3954
- "tags": {
3948
+ "tagIds": {
3955
3949
  "type": "array",
3956
3950
  "items": {
3957
- "$ref": "#/definitions/puppetTagIdentifier"
3951
+ "type": "string"
3958
3952
  }
3959
3953
  }
3960
3954
  }
3961
3955
  },
3962
- "puppetTagIdentifier": {
3963
- "type": "object",
3964
- "properties": {
3965
- "id": {
3966
- "type": "string"
3967
- },
3968
- "groupId": {
3969
- "type": "string"
3970
- }
3971
- }
3972
- },
3973
3956
  "puppetTagPayload": {
3974
3957
  "type": "object",
3975
3958
  "properties": {
@@ -3990,8 +3973,8 @@
3990
3973
  "puppetTagPayloadRequest": {
3991
3974
  "type": "object",
3992
3975
  "properties": {
3993
- "tag": {
3994
- "$ref": "#/definitions/puppetTagIdentifier"
3976
+ "tagId": {
3977
+ "type": "string"
3995
3978
  }
3996
3979
  }
3997
3980
  },
@@ -4017,8 +4000,8 @@
4017
4000
  "puppetTagTagAddResponse": {
4018
4001
  "type": "object",
4019
4002
  "properties": {
4020
- "tag": {
4021
- "$ref": "#/definitions/puppetTagIdentifier"
4003
+ "tagId": {
4004
+ "type": "string"
4022
4005
  }
4023
4006
  }
4024
4007
  },
@@ -4036,8 +4019,8 @@
4036
4019
  "puppetTagTagDeleteRequest": {
4037
4020
  "type": "object",
4038
4021
  "properties": {
4039
- "tag": {
4040
- "$ref": "#/definitions/puppetTagIdentifier"
4022
+ "tagId": {
4023
+ "type": "string"
4041
4024
  }
4042
4025
  }
4043
4026
  },
@@ -4047,10 +4030,10 @@
4047
4030
  "puppetTagTagListResponse": {
4048
4031
  "type": "object",
4049
4032
  "properties": {
4050
- "tags": {
4033
+ "tagIds": {
4051
4034
  "type": "array",
4052
4035
  "items": {
4053
- "$ref": "#/definitions/puppetTagIdentifier"
4036
+ "type": "string"
4054
4037
  }
4055
4038
  }
4056
4039
  }
@@ -7,8 +7,6 @@ option csharp_namespace = "github.wechaty.grpc.puppet";
7
7
 
8
8
  import "google/protobuf/wrappers.proto";
9
9
 
10
- import "wechaty/puppet/tag.proto";
11
-
12
10
  enum ContactGender {
13
11
  CONTACT_GENDER_UNSPECIFIED = 0;
14
12
  CONTACT_GENDER_MALE = 1;
@@ -62,7 +60,7 @@ message ContactPayloadResponse {
62
60
  repeated string phones = 18;
63
61
  string additional_info = 19;
64
62
 
65
- repeated TagIdentifier tags = 20;
63
+ repeated string tag_ids = 20;
66
64
  }
67
65
 
68
66
  message ContactSelfQRCodeRequest {}
@@ -17,11 +17,6 @@ message TagPayload {
17
17
  TagType type = 4;
18
18
  }
19
19
 
20
- message TagIdentifier {
21
- string id = 1;
22
- string group_id = 2;
23
- }
24
-
25
20
  message TagGroupPayload {
26
21
  string id = 1;
27
22
  string name = 2;
@@ -29,7 +24,7 @@ message TagGroupPayload {
29
24
  }
30
25
 
31
26
  message TagContactTagAddRequest {
32
- repeated TagIdentifier tags = 1;
27
+ repeated string tag_ids = 1;
33
28
  repeated string contact_ids = 2;
34
29
  }
35
30
 
@@ -37,7 +32,7 @@ message TagContactTagAddResponse {
37
32
  }
38
33
 
39
34
  message TagContactTagRemoveRequest {
40
- repeated TagIdentifier tags = 1;
35
+ repeated string tag_ids = 1;
41
36
  repeated string contact_ids = 2;
42
37
  }
43
38
 
@@ -65,11 +60,11 @@ message TagTagAddRequest {
65
60
  }
66
61
 
67
62
  message TagTagAddResponse {
68
- TagIdentifier tag = 1;
63
+ string tag_id = 1;
69
64
  }
70
65
 
71
66
  message TagTagDeleteRequest {
72
- TagIdentifier tag = 1;
67
+ string tag_id = 1;
73
68
  }
74
69
 
75
70
  message TagTagDeleteResponse {
@@ -87,14 +82,14 @@ message TagGroupTagListRequest {
87
82
  }
88
83
 
89
84
  message TagGroupTagListResponse {
90
- repeated TagIdentifier tags = 1;
85
+ repeated string tag_ids = 1;
91
86
  }
92
87
 
93
88
  message TagTagListRequest {
94
89
  }
95
90
 
96
91
  message TagTagListResponse {
97
- repeated TagIdentifier tags = 1;
92
+ repeated string tag_ids = 1;
98
93
  }
99
94
 
100
95
  message TagContactTagListRequest {
@@ -102,11 +97,11 @@ message TagContactTagListRequest {
102
97
  }
103
98
 
104
99
  message TagContactTagListResponse {
105
- repeated TagIdentifier tags = 1;
100
+ repeated string tag_ids = 1;
106
101
  }
107
102
 
108
103
  message TagTagContactListRequest {
109
- TagIdentifier tag = 1;
104
+ string tag_id = 1;
110
105
  }
111
106
 
112
107
  message TagTagContactListResponse {
@@ -122,7 +117,7 @@ message TagGroupPayloadResponse {
122
117
  }
123
118
 
124
119
  message TagPayloadRequest {
125
- TagIdentifier tag = 1;
120
+ string tag_id = 1;
126
121
  }
127
122
 
128
123
  message TagPayloadResponse {
@@ -568,7 +568,7 @@ service Puppet {
568
568
 
569
569
  rpc TagTagContactList (puppet.TagTagContactListRequest) returns (puppet.TagTagContactListResponse) {
570
570
  option (google.api.http) = {
571
- get: "/tag/{tag.group_id}/{tag.id}/contacts"
571
+ get: "/tag/{tag_id}/contacts"
572
572
  };
573
573
  }
574
574
  /**
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.packageJson = void 0;
4
4
  exports.packageJson = {
5
5
  "name": "@juzi/wechaty-grpc",
6
- "version": "1.0.15",
6
+ "version": "1.0.16",
7
7
  "description": "gRPC for Wechaty",
8
8
  "type": "module",
9
9
  "exports": {
@@ -3,7 +3,6 @@
3
3
 
4
4
  import * as jspb from "google-protobuf";
5
5
  import * as google_protobuf_wrappers_pb from "google-protobuf/google/protobuf/wrappers_pb";
6
- import * as wechaty_puppet_tag_pb from "../../wechaty/puppet/tag_pb";
7
6
 
8
7
  export class ContactListRequest extends jspb.Message {
9
8
  serializeBinary(): Uint8Array;
@@ -123,10 +122,10 @@ export class ContactPayloadResponse extends jspb.Message {
123
122
  getAdditionalInfo(): string;
124
123
  setAdditionalInfo(value: string): void;
125
124
 
126
- clearTagsList(): void;
127
- getTagsList(): Array<wechaty_puppet_tag_pb.TagIdentifier>;
128
- setTagsList(value: Array<wechaty_puppet_tag_pb.TagIdentifier>): void;
129
- addTags(value?: wechaty_puppet_tag_pb.TagIdentifier, index?: number): wechaty_puppet_tag_pb.TagIdentifier;
125
+ clearTagIdsList(): void;
126
+ getTagIdsList(): Array<string>;
127
+ setTagIdsList(value: Array<string>): void;
128
+ addTagIds(value: string, index?: number): string;
130
129
 
131
130
  serializeBinary(): Uint8Array;
132
131
  toObject(includeInstance?: boolean): ContactPayloadResponse.AsObject;
@@ -159,7 +158,7 @@ export namespace ContactPayloadResponse {
159
158
  coworker: boolean,
160
159
  phonesList: Array<string>,
161
160
  additionalInfo: string,
162
- tagsList: Array<wechaty_puppet_tag_pb.TagIdentifier.AsObject>,
161
+ tagIdsList: Array<string>,
163
162
  }
164
163
  }
165
164
 
@@ -17,8 +17,6 @@ var global = (function() { return this || window || global || self || Function('
17
17
 
18
18
  var google_protobuf_wrappers_pb = require('google-protobuf/google/protobuf/wrappers_pb.js');
19
19
  goog.object.extend(proto, google_protobuf_wrappers_pb);
20
- var wechaty_puppet_tag_pb = require('../../wechaty/puppet/tag_pb.js');
21
- goog.object.extend(proto, wechaty_puppet_tag_pb);
22
20
  goog.exportSymbol('proto.wechaty.puppet.ContactAliasRequest', null, global);
23
21
  goog.exportSymbol('proto.wechaty.puppet.ContactAliasResponse', null, global);
24
22
  goog.exportSymbol('proto.wechaty.puppet.ContactAvatarRequest', null, global);
@@ -906,8 +904,7 @@ proto.wechaty.puppet.ContactPayloadResponse.toObject = function(includeInstance,
906
904
  coworker: jspb.Message.getBooleanFieldWithDefault(msg, 17, false),
907
905
  phonesList: (f = jspb.Message.getRepeatedField(msg, 18)) == null ? undefined : f,
908
906
  additionalInfo: jspb.Message.getFieldWithDefault(msg, 19, ""),
909
- tagsList: jspb.Message.toObjectList(msg.getTagsList(),
910
- wechaty_puppet_tag_pb.TagIdentifier.toObject, includeInstance)
907
+ tagIdsList: (f = jspb.Message.getRepeatedField(msg, 20)) == null ? undefined : f
911
908
  };
912
909
 
913
910
  if (includeInstance) {
@@ -1021,9 +1018,8 @@ proto.wechaty.puppet.ContactPayloadResponse.deserializeBinaryFromReader = functi
1021
1018
  msg.setAdditionalInfo(value);
1022
1019
  break;
1023
1020
  case 20:
1024
- var value = new wechaty_puppet_tag_pb.TagIdentifier;
1025
- reader.readMessage(value,wechaty_puppet_tag_pb.TagIdentifier.deserializeBinaryFromReader);
1026
- msg.addTags(value);
1021
+ var value = /** @type {string} */ (reader.readString());
1022
+ msg.addTagIds(value);
1027
1023
  break;
1028
1024
  default:
1029
1025
  reader.skipField();
@@ -1187,12 +1183,11 @@ proto.wechaty.puppet.ContactPayloadResponse.serializeBinaryToWriter = function(m
1187
1183
  f
1188
1184
  );
1189
1185
  }
1190
- f = message.getTagsList();
1186
+ f = message.getTagIdsList();
1191
1187
  if (f.length > 0) {
1192
- writer.writeRepeatedMessage(
1188
+ writer.writeRepeatedString(
1193
1189
  20,
1194
- f,
1195
- wechaty_puppet_tag_pb.TagIdentifier.serializeBinaryToWriter
1190
+ f
1196
1191
  );
1197
1192
  }
1198
1193
  };
@@ -1560,31 +1555,30 @@ proto.wechaty.puppet.ContactPayloadResponse.prototype.setAdditionalInfo = functi
1560
1555
 
1561
1556
 
1562
1557
  /**
1563
- * repeated TagIdentifier tags = 20;
1564
- * @return {!Array<!proto.wechaty.puppet.TagIdentifier>}
1558
+ * repeated string tag_ids = 20;
1559
+ * @return {!Array<string>}
1565
1560
  */
1566
- proto.wechaty.puppet.ContactPayloadResponse.prototype.getTagsList = function() {
1567
- return /** @type{!Array<!proto.wechaty.puppet.TagIdentifier>} */ (
1568
- jspb.Message.getRepeatedWrapperField(this, wechaty_puppet_tag_pb.TagIdentifier, 20));
1561
+ proto.wechaty.puppet.ContactPayloadResponse.prototype.getTagIdsList = function() {
1562
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 20));
1569
1563
  };
1570
1564
 
1571
1565
 
1572
1566
  /**
1573
- * @param {!Array<!proto.wechaty.puppet.TagIdentifier>} value
1567
+ * @param {!Array<string>} value
1574
1568
  * @return {!proto.wechaty.puppet.ContactPayloadResponse} returns this
1575
- */
1576
- proto.wechaty.puppet.ContactPayloadResponse.prototype.setTagsList = function(value) {
1577
- return jspb.Message.setRepeatedWrapperField(this, 20, value);
1569
+ */
1570
+ proto.wechaty.puppet.ContactPayloadResponse.prototype.setTagIdsList = function(value) {
1571
+ return jspb.Message.setField(this, 20, value || []);
1578
1572
  };
1579
1573
 
1580
1574
 
1581
1575
  /**
1582
- * @param {!proto.wechaty.puppet.TagIdentifier=} opt_value
1576
+ * @param {string} value
1583
1577
  * @param {number=} opt_index
1584
- * @return {!proto.wechaty.puppet.TagIdentifier}
1578
+ * @return {!proto.wechaty.puppet.ContactPayloadResponse} returns this
1585
1579
  */
1586
- proto.wechaty.puppet.ContactPayloadResponse.prototype.addTags = function(opt_value, opt_index) {
1587
- return jspb.Message.addToRepeatedWrapperField(this, 20, opt_value, proto.wechaty.puppet.TagIdentifier, opt_index);
1580
+ proto.wechaty.puppet.ContactPayloadResponse.prototype.addTagIds = function(value, opt_index) {
1581
+ return jspb.Message.addToRepeatedField(this, 20, value, opt_index);
1588
1582
  };
1589
1583
 
1590
1584
 
@@ -1592,8 +1586,8 @@ proto.wechaty.puppet.ContactPayloadResponse.prototype.addTags = function(opt_val
1592
1586
  * Clears the list making it empty but non-null.
1593
1587
  * @return {!proto.wechaty.puppet.ContactPayloadResponse} returns this
1594
1588
  */
1595
- proto.wechaty.puppet.ContactPayloadResponse.prototype.clearTagsList = function() {
1596
- return this.setTagsList([]);
1589
+ proto.wechaty.puppet.ContactPayloadResponse.prototype.clearTagIdsList = function() {
1590
+ return this.setTagIdsList([]);
1597
1591
  };
1598
1592
 
1599
1593