@juzi/wechaty-grpc 1.0.90 → 1.0.92

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.
Files changed (41) hide show
  1. package/dist/cjs/out/google/api/health_check/v1/health_check_grpc_pb.js +1 -1
  2. package/dist/cjs/out/wechaty/puppet/room-member_pb.d.ts +45 -0
  3. package/dist/cjs/out/wechaty/puppet/room-member_pb.js +363 -0
  4. package/dist/cjs/out/wechaty/puppet.openapi.yaml +39 -1
  5. package/dist/cjs/out/wechaty/puppet.swagger.json +61 -1
  6. package/dist/cjs/out/wechaty/puppet_grpc_pb.d.ts +17 -0
  7. package/dist/cjs/out/wechaty/puppet_grpc_pb.js +34 -1
  8. package/dist/cjs/out/wechaty/puppet_pb_service.d.ts +19 -0
  9. package/dist/cjs/out/wechaty/puppet_pb_service.js +40 -0
  10. package/dist/cjs/proto/wechaty/puppet/room-member.proto +9 -0
  11. package/dist/cjs/proto/wechaty/puppet.proto +7 -0
  12. package/dist/cjs/src/package-json.js +1 -1
  13. package/dist/cjs/tests/puppet-server-impl.d.ts.map +1 -1
  14. package/dist/cjs/tests/puppet-server-impl.js +5 -0
  15. package/dist/cjs/tests/puppet-server-impl.js.map +1 -1
  16. package/dist/esm/out/google/api/health_check/v1/health_check_grpc_pb.js +1 -1
  17. package/dist/esm/out/wechaty/puppet/room-member_pb.d.ts +45 -0
  18. package/dist/esm/out/wechaty/puppet/room-member_pb.js +363 -0
  19. package/dist/esm/out/wechaty/puppet.openapi.yaml +39 -1
  20. package/dist/esm/out/wechaty/puppet.swagger.json +61 -1
  21. package/dist/esm/out/wechaty/puppet_grpc_pb.d.ts +17 -0
  22. package/dist/esm/out/wechaty/puppet_grpc_pb.js +34 -1
  23. package/dist/esm/out/wechaty/puppet_pb_service.d.ts +19 -0
  24. package/dist/esm/out/wechaty/puppet_pb_service.js +40 -0
  25. package/dist/esm/proto/wechaty/puppet/room-member.proto +9 -0
  26. package/dist/esm/proto/wechaty/puppet.proto +7 -0
  27. package/dist/esm/src/package-json.js +1 -1
  28. package/dist/esm/tests/puppet-server-impl.d.ts.map +1 -1
  29. package/dist/esm/tests/puppet-server-impl.js +5 -0
  30. package/dist/esm/tests/puppet-server-impl.js.map +1 -1
  31. package/out/google/api/health_check/v1/health_check_grpc_pb.js +1 -1
  32. package/out/wechaty/puppet/room-member_pb.d.ts +45 -0
  33. package/out/wechaty/puppet/room-member_pb.js +363 -0
  34. package/out/wechaty/puppet.openapi.yaml +39 -1
  35. package/out/wechaty/puppet.swagger.json +61 -1
  36. package/out/wechaty/puppet_grpc_pb.d.ts +17 -0
  37. package/out/wechaty/puppet_grpc_pb.js +34 -1
  38. package/out/wechaty/puppet_pb_service.d.ts +19 -0
  39. package/out/wechaty/puppet_pb_service.js +40 -0
  40. package/package.json +1 -1
  41. package/src/package-json.ts +1 -1
@@ -15,6 +15,8 @@ var jspb = require('google-protobuf');
15
15
  var goog = jspb;
16
16
  var global = (function() { return this || window || global || self || Function('return this')(); }).call(null);
17
17
 
18
+ goog.exportSymbol('proto.wechaty.puppet.BatchRoomMemberPayloadRequest', null, global);
19
+ goog.exportSymbol('proto.wechaty.puppet.BatchRoomMemberPayloadResponse', null, global);
18
20
  goog.exportSymbol('proto.wechaty.puppet.RoomMemberJoinSceneType', null, global);
19
21
  goog.exportSymbol('proto.wechaty.puppet.RoomMemberListRequest', null, global);
20
22
  goog.exportSymbol('proto.wechaty.puppet.RoomMemberListResponse', null, global);
@@ -104,6 +106,48 @@ if (goog.DEBUG && !COMPILED) {
104
106
  */
105
107
  proto.wechaty.puppet.RoomMemberListResponse.displayName = 'proto.wechaty.puppet.RoomMemberListResponse';
106
108
  }
109
+ /**
110
+ * Generated by JsPbCodeGenerator.
111
+ * @param {Array=} opt_data Optional initial data array, typically from a
112
+ * server response, or constructed directly in Javascript. The array is used
113
+ * in place and becomes part of the constructed object. It is not cloned.
114
+ * If no data is provided, the constructed object will be empty, but still
115
+ * valid.
116
+ * @extends {jspb.Message}
117
+ * @constructor
118
+ */
119
+ proto.wechaty.puppet.BatchRoomMemberPayloadRequest = function(opt_data) {
120
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.wechaty.puppet.BatchRoomMemberPayloadRequest.repeatedFields_, null);
121
+ };
122
+ goog.inherits(proto.wechaty.puppet.BatchRoomMemberPayloadRequest, jspb.Message);
123
+ if (goog.DEBUG && !COMPILED) {
124
+ /**
125
+ * @public
126
+ * @override
127
+ */
128
+ proto.wechaty.puppet.BatchRoomMemberPayloadRequest.displayName = 'proto.wechaty.puppet.BatchRoomMemberPayloadRequest';
129
+ }
130
+ /**
131
+ * Generated by JsPbCodeGenerator.
132
+ * @param {Array=} opt_data Optional initial data array, typically from a
133
+ * server response, or constructed directly in Javascript. The array is used
134
+ * in place and becomes part of the constructed object. It is not cloned.
135
+ * If no data is provided, the constructed object will be empty, but still
136
+ * valid.
137
+ * @extends {jspb.Message}
138
+ * @constructor
139
+ */
140
+ proto.wechaty.puppet.BatchRoomMemberPayloadResponse = function(opt_data) {
141
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
142
+ };
143
+ goog.inherits(proto.wechaty.puppet.BatchRoomMemberPayloadResponse, jspb.Message);
144
+ if (goog.DEBUG && !COMPILED) {
145
+ /**
146
+ * @public
147
+ * @override
148
+ */
149
+ proto.wechaty.puppet.BatchRoomMemberPayloadResponse.displayName = 'proto.wechaty.puppet.BatchRoomMemberPayloadResponse';
150
+ }
107
151
 
108
152
 
109
153
 
@@ -890,6 +934,325 @@ proto.wechaty.puppet.RoomMemberListResponse.prototype.clearMemberIdsList = funct
890
934
  };
891
935
 
892
936
 
937
+
938
+ /**
939
+ * List of repeated fields within this message type.
940
+ * @private {!Array<number>}
941
+ * @const
942
+ */
943
+ proto.wechaty.puppet.BatchRoomMemberPayloadRequest.repeatedFields_ = [2];
944
+
945
+
946
+
947
+ if (jspb.Message.GENERATE_TO_OBJECT) {
948
+ /**
949
+ * Creates an object representation of this proto.
950
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
951
+ * Optional fields that are not set will be set to undefined.
952
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
953
+ * For the list of reserved names please see:
954
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
955
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
956
+ * JSPB instance for transitional soy proto support:
957
+ * http://goto/soy-param-migration
958
+ * @return {!Object}
959
+ */
960
+ proto.wechaty.puppet.BatchRoomMemberPayloadRequest.prototype.toObject = function(opt_includeInstance) {
961
+ return proto.wechaty.puppet.BatchRoomMemberPayloadRequest.toObject(opt_includeInstance, this);
962
+ };
963
+
964
+
965
+ /**
966
+ * Static version of the {@see toObject} method.
967
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
968
+ * the JSPB instance for transitional soy proto support:
969
+ * http://goto/soy-param-migration
970
+ * @param {!proto.wechaty.puppet.BatchRoomMemberPayloadRequest} msg The msg instance to transform.
971
+ * @return {!Object}
972
+ * @suppress {unusedLocalVariables} f is only used for nested messages
973
+ */
974
+ proto.wechaty.puppet.BatchRoomMemberPayloadRequest.toObject = function(includeInstance, msg) {
975
+ var f, obj = {
976
+ id: jspb.Message.getFieldWithDefault(msg, 1, ""),
977
+ memberIdsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f
978
+ };
979
+
980
+ if (includeInstance) {
981
+ obj.$jspbMessageInstance = msg;
982
+ }
983
+ return obj;
984
+ };
985
+ }
986
+
987
+
988
+ /**
989
+ * Deserializes binary data (in protobuf wire format).
990
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
991
+ * @return {!proto.wechaty.puppet.BatchRoomMemberPayloadRequest}
992
+ */
993
+ proto.wechaty.puppet.BatchRoomMemberPayloadRequest.deserializeBinary = function(bytes) {
994
+ var reader = new jspb.BinaryReader(bytes);
995
+ var msg = new proto.wechaty.puppet.BatchRoomMemberPayloadRequest;
996
+ return proto.wechaty.puppet.BatchRoomMemberPayloadRequest.deserializeBinaryFromReader(msg, reader);
997
+ };
998
+
999
+
1000
+ /**
1001
+ * Deserializes binary data (in protobuf wire format) from the
1002
+ * given reader into the given message object.
1003
+ * @param {!proto.wechaty.puppet.BatchRoomMemberPayloadRequest} msg The message object to deserialize into.
1004
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1005
+ * @return {!proto.wechaty.puppet.BatchRoomMemberPayloadRequest}
1006
+ */
1007
+ proto.wechaty.puppet.BatchRoomMemberPayloadRequest.deserializeBinaryFromReader = function(msg, reader) {
1008
+ while (reader.nextField()) {
1009
+ if (reader.isEndGroup()) {
1010
+ break;
1011
+ }
1012
+ var field = reader.getFieldNumber();
1013
+ switch (field) {
1014
+ case 1:
1015
+ var value = /** @type {string} */ (reader.readString());
1016
+ msg.setId(value);
1017
+ break;
1018
+ case 2:
1019
+ var value = /** @type {string} */ (reader.readString());
1020
+ msg.addMemberIds(value);
1021
+ break;
1022
+ default:
1023
+ reader.skipField();
1024
+ break;
1025
+ }
1026
+ }
1027
+ return msg;
1028
+ };
1029
+
1030
+
1031
+ /**
1032
+ * Serializes the message to binary data (in protobuf wire format).
1033
+ * @return {!Uint8Array}
1034
+ */
1035
+ proto.wechaty.puppet.BatchRoomMemberPayloadRequest.prototype.serializeBinary = function() {
1036
+ var writer = new jspb.BinaryWriter();
1037
+ proto.wechaty.puppet.BatchRoomMemberPayloadRequest.serializeBinaryToWriter(this, writer);
1038
+ return writer.getResultBuffer();
1039
+ };
1040
+
1041
+
1042
+ /**
1043
+ * Serializes the given message to binary data (in protobuf wire
1044
+ * format), writing to the given BinaryWriter.
1045
+ * @param {!proto.wechaty.puppet.BatchRoomMemberPayloadRequest} message
1046
+ * @param {!jspb.BinaryWriter} writer
1047
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1048
+ */
1049
+ proto.wechaty.puppet.BatchRoomMemberPayloadRequest.serializeBinaryToWriter = function(message, writer) {
1050
+ var f = undefined;
1051
+ f = message.getId();
1052
+ if (f.length > 0) {
1053
+ writer.writeString(
1054
+ 1,
1055
+ f
1056
+ );
1057
+ }
1058
+ f = message.getMemberIdsList();
1059
+ if (f.length > 0) {
1060
+ writer.writeRepeatedString(
1061
+ 2,
1062
+ f
1063
+ );
1064
+ }
1065
+ };
1066
+
1067
+
1068
+ /**
1069
+ * optional string id = 1;
1070
+ * @return {string}
1071
+ */
1072
+ proto.wechaty.puppet.BatchRoomMemberPayloadRequest.prototype.getId = function() {
1073
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1074
+ };
1075
+
1076
+
1077
+ /**
1078
+ * @param {string} value
1079
+ * @return {!proto.wechaty.puppet.BatchRoomMemberPayloadRequest} returns this
1080
+ */
1081
+ proto.wechaty.puppet.BatchRoomMemberPayloadRequest.prototype.setId = function(value) {
1082
+ return jspb.Message.setProto3StringField(this, 1, value);
1083
+ };
1084
+
1085
+
1086
+ /**
1087
+ * repeated string member_ids = 2;
1088
+ * @return {!Array<string>}
1089
+ */
1090
+ proto.wechaty.puppet.BatchRoomMemberPayloadRequest.prototype.getMemberIdsList = function() {
1091
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2));
1092
+ };
1093
+
1094
+
1095
+ /**
1096
+ * @param {!Array<string>} value
1097
+ * @return {!proto.wechaty.puppet.BatchRoomMemberPayloadRequest} returns this
1098
+ */
1099
+ proto.wechaty.puppet.BatchRoomMemberPayloadRequest.prototype.setMemberIdsList = function(value) {
1100
+ return jspb.Message.setField(this, 2, value || []);
1101
+ };
1102
+
1103
+
1104
+ /**
1105
+ * @param {string} value
1106
+ * @param {number=} opt_index
1107
+ * @return {!proto.wechaty.puppet.BatchRoomMemberPayloadRequest} returns this
1108
+ */
1109
+ proto.wechaty.puppet.BatchRoomMemberPayloadRequest.prototype.addMemberIds = function(value, opt_index) {
1110
+ return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
1111
+ };
1112
+
1113
+
1114
+ /**
1115
+ * Clears the list making it empty but non-null.
1116
+ * @return {!proto.wechaty.puppet.BatchRoomMemberPayloadRequest} returns this
1117
+ */
1118
+ proto.wechaty.puppet.BatchRoomMemberPayloadRequest.prototype.clearMemberIdsList = function() {
1119
+ return this.setMemberIdsList([]);
1120
+ };
1121
+
1122
+
1123
+
1124
+
1125
+
1126
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1127
+ /**
1128
+ * Creates an object representation of this proto.
1129
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1130
+ * Optional fields that are not set will be set to undefined.
1131
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1132
+ * For the list of reserved names please see:
1133
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1134
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1135
+ * JSPB instance for transitional soy proto support:
1136
+ * http://goto/soy-param-migration
1137
+ * @return {!Object}
1138
+ */
1139
+ proto.wechaty.puppet.BatchRoomMemberPayloadResponse.prototype.toObject = function(opt_includeInstance) {
1140
+ return proto.wechaty.puppet.BatchRoomMemberPayloadResponse.toObject(opt_includeInstance, this);
1141
+ };
1142
+
1143
+
1144
+ /**
1145
+ * Static version of the {@see toObject} method.
1146
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1147
+ * the JSPB instance for transitional soy proto support:
1148
+ * http://goto/soy-param-migration
1149
+ * @param {!proto.wechaty.puppet.BatchRoomMemberPayloadResponse} msg The msg instance to transform.
1150
+ * @return {!Object}
1151
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1152
+ */
1153
+ proto.wechaty.puppet.BatchRoomMemberPayloadResponse.toObject = function(includeInstance, msg) {
1154
+ var f, obj = {
1155
+ membersMap: (f = msg.getMembersMap()) ? f.toObject(includeInstance, proto.wechaty.puppet.RoomMemberPayloadResponse.toObject) : []
1156
+ };
1157
+
1158
+ if (includeInstance) {
1159
+ obj.$jspbMessageInstance = msg;
1160
+ }
1161
+ return obj;
1162
+ };
1163
+ }
1164
+
1165
+
1166
+ /**
1167
+ * Deserializes binary data (in protobuf wire format).
1168
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1169
+ * @return {!proto.wechaty.puppet.BatchRoomMemberPayloadResponse}
1170
+ */
1171
+ proto.wechaty.puppet.BatchRoomMemberPayloadResponse.deserializeBinary = function(bytes) {
1172
+ var reader = new jspb.BinaryReader(bytes);
1173
+ var msg = new proto.wechaty.puppet.BatchRoomMemberPayloadResponse;
1174
+ return proto.wechaty.puppet.BatchRoomMemberPayloadResponse.deserializeBinaryFromReader(msg, reader);
1175
+ };
1176
+
1177
+
1178
+ /**
1179
+ * Deserializes binary data (in protobuf wire format) from the
1180
+ * given reader into the given message object.
1181
+ * @param {!proto.wechaty.puppet.BatchRoomMemberPayloadResponse} msg The message object to deserialize into.
1182
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1183
+ * @return {!proto.wechaty.puppet.BatchRoomMemberPayloadResponse}
1184
+ */
1185
+ proto.wechaty.puppet.BatchRoomMemberPayloadResponse.deserializeBinaryFromReader = function(msg, reader) {
1186
+ while (reader.nextField()) {
1187
+ if (reader.isEndGroup()) {
1188
+ break;
1189
+ }
1190
+ var field = reader.getFieldNumber();
1191
+ switch (field) {
1192
+ case 1:
1193
+ var value = msg.getMembersMap();
1194
+ reader.readMessage(value, function(message, reader) {
1195
+ jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.wechaty.puppet.RoomMemberPayloadResponse.deserializeBinaryFromReader, "", new proto.wechaty.puppet.RoomMemberPayloadResponse());
1196
+ });
1197
+ break;
1198
+ default:
1199
+ reader.skipField();
1200
+ break;
1201
+ }
1202
+ }
1203
+ return msg;
1204
+ };
1205
+
1206
+
1207
+ /**
1208
+ * Serializes the message to binary data (in protobuf wire format).
1209
+ * @return {!Uint8Array}
1210
+ */
1211
+ proto.wechaty.puppet.BatchRoomMemberPayloadResponse.prototype.serializeBinary = function() {
1212
+ var writer = new jspb.BinaryWriter();
1213
+ proto.wechaty.puppet.BatchRoomMemberPayloadResponse.serializeBinaryToWriter(this, writer);
1214
+ return writer.getResultBuffer();
1215
+ };
1216
+
1217
+
1218
+ /**
1219
+ * Serializes the given message to binary data (in protobuf wire
1220
+ * format), writing to the given BinaryWriter.
1221
+ * @param {!proto.wechaty.puppet.BatchRoomMemberPayloadResponse} message
1222
+ * @param {!jspb.BinaryWriter} writer
1223
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1224
+ */
1225
+ proto.wechaty.puppet.BatchRoomMemberPayloadResponse.serializeBinaryToWriter = function(message, writer) {
1226
+ var f = undefined;
1227
+ f = message.getMembersMap(true);
1228
+ if (f && f.getLength() > 0) {
1229
+ f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.wechaty.puppet.RoomMemberPayloadResponse.serializeBinaryToWriter);
1230
+ }
1231
+ };
1232
+
1233
+
1234
+ /**
1235
+ * map<string, RoomMemberPayloadResponse> members = 1;
1236
+ * @param {boolean=} opt_noLazyCreate Do not create the map if
1237
+ * empty, instead returning `undefined`
1238
+ * @return {!jspb.Map<string,!proto.wechaty.puppet.RoomMemberPayloadResponse>}
1239
+ */
1240
+ proto.wechaty.puppet.BatchRoomMemberPayloadResponse.prototype.getMembersMap = function(opt_noLazyCreate) {
1241
+ return /** @type {!jspb.Map<string,!proto.wechaty.puppet.RoomMemberPayloadResponse>} */ (
1242
+ jspb.Message.getMapField(this, 1, opt_noLazyCreate,
1243
+ proto.wechaty.puppet.RoomMemberPayloadResponse));
1244
+ };
1245
+
1246
+
1247
+ /**
1248
+ * Clears values from the map. The map will be non-null.
1249
+ * @return {!proto.wechaty.puppet.BatchRoomMemberPayloadResponse} returns this
1250
+ */
1251
+ proto.wechaty.puppet.BatchRoomMemberPayloadResponse.prototype.clearMembersMap = function() {
1252
+ this.getMembersMap().clear();
1253
+ return this;};
1254
+
1255
+
893
1256
  /**
894
1257
  * @enum {number}
895
1258
  */
@@ -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.90
12
+ version: 1.0.92
13
13
  contact:
14
14
  name: Wechaty
15
15
  url: https://github.com/wechaty/openapi
@@ -1937,6 +1937,30 @@ paths:
1937
1937
  type: string
1938
1938
  tags:
1939
1939
  - Puppet
1940
+ /rooms/{id}/members/batch-payload:
1941
+ post:
1942
+ operationId: Puppet_BatchRoomMemberPayload
1943
+ responses:
1944
+ '200':
1945
+ description: A successful response.
1946
+ schema:
1947
+ $ref: '#/definitions/puppetBatchRoomMemberPayloadResponse'
1948
+ default:
1949
+ description: An unexpected error response.
1950
+ schema:
1951
+ $ref: '#/definitions/rpcStatus'
1952
+ parameters:
1953
+ - name: id
1954
+ in: path
1955
+ required: true
1956
+ type: string
1957
+ - name: body
1958
+ in: body
1959
+ required: true
1960
+ schema:
1961
+ $ref: '#/definitions/PuppetBatchRoomMemberPayloadBody'
1962
+ tags:
1963
+ - Puppet
1940
1964
  /rooms/{id}/members/{memberId}:
1941
1965
  get:
1942
1966
  summary: '*'
@@ -2623,6 +2647,13 @@ paths:
2623
2647
  tags:
2624
2648
  - Puppet
2625
2649
  definitions:
2650
+ PuppetBatchRoomMemberPayloadBody:
2651
+ type: object
2652
+ properties:
2653
+ memberIds:
2654
+ type: array
2655
+ items:
2656
+ type: string
2626
2657
  PuppetContactAliasBody:
2627
2658
  type: object
2628
2659
  properties:
@@ -2842,6 +2873,13 @@ definitions:
2842
2873
  type: boolean
2843
2874
  puppetApplyRoomAntiSpamStrategyResponse:
2844
2875
  type: object
2876
+ puppetBatchRoomMemberPayloadResponse:
2877
+ type: object
2878
+ properties:
2879
+ members:
2880
+ type: object
2881
+ additionalProperties:
2882
+ $ref: '#/definitions/puppetRoomMemberPayloadResponse'
2845
2883
  puppetBroadcastStatus:
2846
2884
  type: string
2847
2885
  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.90",
6
+ "version": "1.0.92",
7
7
  "contact": {
8
8
  "name": "Wechaty",
9
9
  "url": "https://github.com/wechaty/openapi",
@@ -2900,6 +2900,44 @@
2900
2900
  ]
2901
2901
  }
2902
2902
  },
2903
+ "/rooms/{id}/members/batch-payload": {
2904
+ "post": {
2905
+ "operationId": "Puppet_BatchRoomMemberPayload",
2906
+ "responses": {
2907
+ "200": {
2908
+ "description": "A successful response.",
2909
+ "schema": {
2910
+ "$ref": "#/definitions/puppetBatchRoomMemberPayloadResponse"
2911
+ }
2912
+ },
2913
+ "default": {
2914
+ "description": "An unexpected error response.",
2915
+ "schema": {
2916
+ "$ref": "#/definitions/rpcStatus"
2917
+ }
2918
+ }
2919
+ },
2920
+ "parameters": [
2921
+ {
2922
+ "name": "id",
2923
+ "in": "path",
2924
+ "required": true,
2925
+ "type": "string"
2926
+ },
2927
+ {
2928
+ "name": "body",
2929
+ "in": "body",
2930
+ "required": true,
2931
+ "schema": {
2932
+ "$ref": "#/definitions/PuppetBatchRoomMemberPayloadBody"
2933
+ }
2934
+ }
2935
+ ],
2936
+ "tags": [
2937
+ "Puppet"
2938
+ ]
2939
+ }
2940
+ },
2903
2941
  "/rooms/{id}/members/{memberId}": {
2904
2942
  "get": {
2905
2943
  "summary": "*",
@@ -3947,6 +3985,17 @@
3947
3985
  }
3948
3986
  },
3949
3987
  "definitions": {
3988
+ "PuppetBatchRoomMemberPayloadBody": {
3989
+ "type": "object",
3990
+ "properties": {
3991
+ "memberIds": {
3992
+ "type": "array",
3993
+ "items": {
3994
+ "type": "string"
3995
+ }
3996
+ }
3997
+ }
3998
+ },
3950
3999
  "PuppetContactAliasBody": {
3951
4000
  "type": "object",
3952
4001
  "properties": {
@@ -4243,6 +4292,17 @@
4243
4292
  "puppetApplyRoomAntiSpamStrategyResponse": {
4244
4293
  "type": "object"
4245
4294
  },
4295
+ "puppetBatchRoomMemberPayloadResponse": {
4296
+ "type": "object",
4297
+ "properties": {
4298
+ "members": {
4299
+ "type": "object",
4300
+ "additionalProperties": {
4301
+ "$ref": "#/definitions/puppetRoomMemberPayloadResponse"
4302
+ }
4303
+ }
4304
+ }
4305
+ },
4246
4306
  "puppetBroadcastStatus": {
4247
4307
  "type": "string",
4248
4308
  "enum": [
@@ -100,6 +100,7 @@ interface IPuppetService extends grpc.ServiceDefinition<grpc.UntypedServiceImple
100
100
  roomDismiss: IPuppetService_IRoomDismiss;
101
101
  roomMemberPayload: IPuppetService_IRoomMemberPayload;
102
102
  roomMemberList: IPuppetService_IRoomMemberList;
103
+ batchRoomMemberPayload: IPuppetService_IBatchRoomMemberPayload;
103
104
  roomInvitationPayload: IPuppetService_IRoomInvitationPayload;
104
105
  roomInvitationAccept: IPuppetService_IRoomInvitationAccept;
105
106
  roomInvitationAcceptByQRCode: IPuppetService_IRoomInvitationAcceptByQRCode;
@@ -818,6 +819,15 @@ interface IPuppetService_IRoomMemberList extends grpc.MethodDefinition<wechaty_p
818
819
  responseSerialize: grpc.serialize<wechaty_puppet_room_member_pb.RoomMemberListResponse>;
819
820
  responseDeserialize: grpc.deserialize<wechaty_puppet_room_member_pb.RoomMemberListResponse>;
820
821
  }
822
+ interface IPuppetService_IBatchRoomMemberPayload extends grpc.MethodDefinition<wechaty_puppet_room_member_pb.BatchRoomMemberPayloadRequest, wechaty_puppet_room_member_pb.BatchRoomMemberPayloadResponse> {
823
+ path: "/wechaty.Puppet/BatchRoomMemberPayload";
824
+ requestStream: false;
825
+ responseStream: false;
826
+ requestSerialize: grpc.serialize<wechaty_puppet_room_member_pb.BatchRoomMemberPayloadRequest>;
827
+ requestDeserialize: grpc.deserialize<wechaty_puppet_room_member_pb.BatchRoomMemberPayloadRequest>;
828
+ responseSerialize: grpc.serialize<wechaty_puppet_room_member_pb.BatchRoomMemberPayloadResponse>;
829
+ responseDeserialize: grpc.deserialize<wechaty_puppet_room_member_pb.BatchRoomMemberPayloadResponse>;
830
+ }
821
831
  interface IPuppetService_IRoomInvitationPayload extends grpc.MethodDefinition<wechaty_puppet_room_invitation_pb.RoomInvitationPayloadRequest, wechaty_puppet_room_invitation_pb.RoomInvitationPayloadResponse> {
822
832
  path: "/wechaty.Puppet/RoomInvitationPayload";
823
833
  requestStream: false;
@@ -1186,6 +1196,7 @@ export interface IPuppetServer extends grpc.UntypedServiceImplementation {
1186
1196
  roomDismiss: grpc.handleUnaryCall<wechaty_puppet_room_pb.RoomDismissRequest, wechaty_puppet_room_pb.RoomDismissResponse>;
1187
1197
  roomMemberPayload: grpc.handleUnaryCall<wechaty_puppet_room_member_pb.RoomMemberPayloadRequest, wechaty_puppet_room_member_pb.RoomMemberPayloadResponse>;
1188
1198
  roomMemberList: grpc.handleUnaryCall<wechaty_puppet_room_member_pb.RoomMemberListRequest, wechaty_puppet_room_member_pb.RoomMemberListResponse>;
1199
+ batchRoomMemberPayload: grpc.handleUnaryCall<wechaty_puppet_room_member_pb.BatchRoomMemberPayloadRequest, wechaty_puppet_room_member_pb.BatchRoomMemberPayloadResponse>;
1189
1200
  roomInvitationPayload: grpc.handleUnaryCall<wechaty_puppet_room_invitation_pb.RoomInvitationPayloadRequest, wechaty_puppet_room_invitation_pb.RoomInvitationPayloadResponse>;
1190
1201
  roomInvitationAccept: grpc.handleUnaryCall<wechaty_puppet_room_invitation_pb.RoomInvitationAcceptRequest, wechaty_puppet_room_invitation_pb.RoomInvitationAcceptResponse>;
1191
1202
  roomInvitationAcceptByQRCode: grpc.handleUnaryCall<wechaty_puppet_room_invitation_pb.RoomInvitationAcceptByQRCodeRequest, wechaty_puppet_room_invitation_pb.RoomInvitationAcceptByQRCodeResponse>;
@@ -1448,6 +1459,9 @@ export interface IPuppetClient {
1448
1459
  roomMemberList(request: wechaty_puppet_room_member_pb.RoomMemberListRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_member_pb.RoomMemberListResponse) => void): grpc.ClientUnaryCall;
1449
1460
  roomMemberList(request: wechaty_puppet_room_member_pb.RoomMemberListRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_member_pb.RoomMemberListResponse) => void): grpc.ClientUnaryCall;
1450
1461
  roomMemberList(request: wechaty_puppet_room_member_pb.RoomMemberListRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_member_pb.RoomMemberListResponse) => void): grpc.ClientUnaryCall;
1462
+ batchRoomMemberPayload(request: wechaty_puppet_room_member_pb.BatchRoomMemberPayloadRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_member_pb.BatchRoomMemberPayloadResponse) => void): grpc.ClientUnaryCall;
1463
+ batchRoomMemberPayload(request: wechaty_puppet_room_member_pb.BatchRoomMemberPayloadRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_member_pb.BatchRoomMemberPayloadResponse) => void): grpc.ClientUnaryCall;
1464
+ batchRoomMemberPayload(request: wechaty_puppet_room_member_pb.BatchRoomMemberPayloadRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_member_pb.BatchRoomMemberPayloadResponse) => void): grpc.ClientUnaryCall;
1451
1465
  roomInvitationPayload(request: wechaty_puppet_room_invitation_pb.RoomInvitationPayloadRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_invitation_pb.RoomInvitationPayloadResponse) => void): grpc.ClientUnaryCall;
1452
1466
  roomInvitationPayload(request: wechaty_puppet_room_invitation_pb.RoomInvitationPayloadRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_invitation_pb.RoomInvitationPayloadResponse) => void): grpc.ClientUnaryCall;
1453
1467
  roomInvitationPayload(request: wechaty_puppet_room_invitation_pb.RoomInvitationPayloadRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_invitation_pb.RoomInvitationPayloadResponse) => void): grpc.ClientUnaryCall;
@@ -1775,6 +1789,9 @@ export class PuppetClient extends grpc.Client implements IPuppetClient {
1775
1789
  public roomMemberList(request: wechaty_puppet_room_member_pb.RoomMemberListRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_member_pb.RoomMemberListResponse) => void): grpc.ClientUnaryCall;
1776
1790
  public roomMemberList(request: wechaty_puppet_room_member_pb.RoomMemberListRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_member_pb.RoomMemberListResponse) => void): grpc.ClientUnaryCall;
1777
1791
  public roomMemberList(request: wechaty_puppet_room_member_pb.RoomMemberListRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_member_pb.RoomMemberListResponse) => void): grpc.ClientUnaryCall;
1792
+ public batchRoomMemberPayload(request: wechaty_puppet_room_member_pb.BatchRoomMemberPayloadRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_member_pb.BatchRoomMemberPayloadResponse) => void): grpc.ClientUnaryCall;
1793
+ public batchRoomMemberPayload(request: wechaty_puppet_room_member_pb.BatchRoomMemberPayloadRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_member_pb.BatchRoomMemberPayloadResponse) => void): grpc.ClientUnaryCall;
1794
+ public batchRoomMemberPayload(request: wechaty_puppet_room_member_pb.BatchRoomMemberPayloadRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_member_pb.BatchRoomMemberPayloadResponse) => void): grpc.ClientUnaryCall;
1778
1795
  public roomInvitationPayload(request: wechaty_puppet_room_invitation_pb.RoomInvitationPayloadRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_invitation_pb.RoomInvitationPayloadResponse) => void): grpc.ClientUnaryCall;
1779
1796
  public roomInvitationPayload(request: wechaty_puppet_room_invitation_pb.RoomInvitationPayloadRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_invitation_pb.RoomInvitationPayloadResponse) => void): grpc.ClientUnaryCall;
1780
1797
  public roomInvitationPayload(request: wechaty_puppet_room_invitation_pb.RoomInvitationPayloadRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_invitation_pb.RoomInvitationPayloadResponse) => void): grpc.ClientUnaryCall;
@@ -54,6 +54,28 @@ function deserialize_wechaty_puppet_ApplyRoomAntiSpamStrategyResponse(buffer_arg
54
54
  return wechaty_puppet_wecom_pb.ApplyRoomAntiSpamStrategyResponse.deserializeBinary(new Uint8Array(buffer_arg));
55
55
  }
56
56
 
57
+ function serialize_wechaty_puppet_BatchRoomMemberPayloadRequest(arg) {
58
+ if (!(arg instanceof wechaty_puppet_room$member_pb.BatchRoomMemberPayloadRequest)) {
59
+ throw new Error('Expected argument of type wechaty.puppet.BatchRoomMemberPayloadRequest');
60
+ }
61
+ return Buffer.from(arg.serializeBinary());
62
+ }
63
+
64
+ function deserialize_wechaty_puppet_BatchRoomMemberPayloadRequest(buffer_arg) {
65
+ return wechaty_puppet_room$member_pb.BatchRoomMemberPayloadRequest.deserializeBinary(new Uint8Array(buffer_arg));
66
+ }
67
+
68
+ function serialize_wechaty_puppet_BatchRoomMemberPayloadResponse(arg) {
69
+ if (!(arg instanceof wechaty_puppet_room$member_pb.BatchRoomMemberPayloadResponse)) {
70
+ throw new Error('Expected argument of type wechaty.puppet.BatchRoomMemberPayloadResponse');
71
+ }
72
+ return Buffer.from(arg.serializeBinary());
73
+ }
74
+
75
+ function deserialize_wechaty_puppet_BatchRoomMemberPayloadResponse(buffer_arg) {
76
+ return wechaty_puppet_room$member_pb.BatchRoomMemberPayloadResponse.deserializeBinary(new Uint8Array(buffer_arg));
77
+ }
78
+
57
79
  function serialize_wechaty_puppet_CancelVerifyCodeRequest(arg) {
58
80
  if (!(arg instanceof wechaty_puppet_verify$code_pb.CancelVerifyCodeRequest)) {
59
81
  throw new Error('Expected argument of type wechaty.puppet.CancelVerifyCodeRequest');
@@ -3233,6 +3255,17 @@ roomMemberPayload: {
3233
3255
  responseSerialize: serialize_wechaty_puppet_RoomMemberListResponse,
3234
3256
  responseDeserialize: deserialize_wechaty_puppet_RoomMemberListResponse,
3235
3257
  },
3258
+ batchRoomMemberPayload: {
3259
+ path: '/wechaty.Puppet/BatchRoomMemberPayload',
3260
+ requestStream: false,
3261
+ responseStream: false,
3262
+ requestType: wechaty_puppet_room$member_pb.BatchRoomMemberPayloadRequest,
3263
+ responseType: wechaty_puppet_room$member_pb.BatchRoomMemberPayloadResponse,
3264
+ requestSerialize: serialize_wechaty_puppet_BatchRoomMemberPayloadRequest,
3265
+ requestDeserialize: deserialize_wechaty_puppet_BatchRoomMemberPayloadRequest,
3266
+ responseSerialize: serialize_wechaty_puppet_BatchRoomMemberPayloadResponse,
3267
+ responseDeserialize: deserialize_wechaty_puppet_BatchRoomMemberPayloadResponse,
3268
+ },
3236
3269
  // *
3237
3270
  //
3238
3271
  // Room Invitation
@@ -3611,4 +3644,4 @@ download: {
3611
3644
  },
3612
3645
  };
3613
3646
 
3614
- exports.PuppetClient = grpc.makeGenericClientConstructor(PuppetService);
3647
+ exports.PuppetClient = grpc.makeGenericClientConstructor(PuppetService, 'Puppet');
@@ -703,6 +703,15 @@ type PuppetRoomMemberList = {
703
703
  readonly responseType: typeof wechaty_puppet_room_member_pb.RoomMemberListResponse;
704
704
  };
705
705
 
706
+ type PuppetBatchRoomMemberPayload = {
707
+ readonly methodName: string;
708
+ readonly service: typeof Puppet;
709
+ readonly requestStream: false;
710
+ readonly responseStream: false;
711
+ readonly requestType: typeof wechaty_puppet_room_member_pb.BatchRoomMemberPayloadRequest;
712
+ readonly responseType: typeof wechaty_puppet_room_member_pb.BatchRoomMemberPayloadResponse;
713
+ };
714
+
706
715
  type PuppetRoomInvitationPayload = {
707
716
  readonly methodName: string;
708
717
  readonly service: typeof Puppet;
@@ -1069,6 +1078,7 @@ export class Puppet {
1069
1078
  static readonly RoomDismiss: PuppetRoomDismiss;
1070
1079
  static readonly RoomMemberPayload: PuppetRoomMemberPayload;
1071
1080
  static readonly RoomMemberList: PuppetRoomMemberList;
1081
+ static readonly BatchRoomMemberPayload: PuppetBatchRoomMemberPayload;
1072
1082
  static readonly RoomInvitationPayload: PuppetRoomInvitationPayload;
1073
1083
  static readonly RoomInvitationAccept: PuppetRoomInvitationAccept;
1074
1084
  static readonly RoomInvitationAcceptByQRCode: PuppetRoomInvitationAcceptByQRCode;
@@ -1811,6 +1821,15 @@ export class PuppetClient {
1811
1821
  requestMessage: wechaty_puppet_room_member_pb.RoomMemberListRequest,
1812
1822
  callback: (error: ServiceError|null, responseMessage: wechaty_puppet_room_member_pb.RoomMemberListResponse|null) => void
1813
1823
  ): UnaryResponse;
1824
+ batchRoomMemberPayload(
1825
+ requestMessage: wechaty_puppet_room_member_pb.BatchRoomMemberPayloadRequest,
1826
+ metadata: grpc.Metadata,
1827
+ callback: (error: ServiceError|null, responseMessage: wechaty_puppet_room_member_pb.BatchRoomMemberPayloadResponse|null) => void
1828
+ ): UnaryResponse;
1829
+ batchRoomMemberPayload(
1830
+ requestMessage: wechaty_puppet_room_member_pb.BatchRoomMemberPayloadRequest,
1831
+ callback: (error: ServiceError|null, responseMessage: wechaty_puppet_room_member_pb.BatchRoomMemberPayloadResponse|null) => void
1832
+ ): UnaryResponse;
1814
1833
  roomInvitationPayload(
1815
1834
  requestMessage: wechaty_puppet_room_invitation_pb.RoomInvitationPayloadRequest,
1816
1835
  metadata: grpc.Metadata,