@juzi/wechaty-grpc 1.0.51 → 1.0.53

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 (46) hide show
  1. package/dist/cjs/out/wechaty/puppet/contact_pb.d.ts +12 -0
  2. package/dist/cjs/out/wechaty/puppet/contact_pb.js +97 -1
  3. package/dist/cjs/out/wechaty/puppet/moment_pb.d.ts +36 -0
  4. package/dist/cjs/out/wechaty/puppet/moment_pb.js +275 -0
  5. package/dist/cjs/out/wechaty/puppet.openapi.yaml +31 -1
  6. package/dist/cjs/out/wechaty/puppet.swagger.json +41 -1
  7. package/dist/cjs/out/wechaty/puppet_grpc_pb.d.ts +17 -0
  8. package/dist/cjs/out/wechaty/puppet_grpc_pb.js +33 -0
  9. package/dist/cjs/out/wechaty/puppet_pb_service.d.ts +19 -0
  10. package/dist/cjs/out/wechaty/puppet_pb_service.js +40 -0
  11. package/dist/cjs/proto/wechaty/puppet/contact.proto +10 -2
  12. package/dist/cjs/proto/wechaty/puppet/moment.proto +6 -0
  13. package/dist/cjs/proto/wechaty/puppet.proto +7 -0
  14. package/dist/cjs/src/package-json.js +1 -1
  15. package/dist/cjs/tests/puppet-server-impl.d.ts.map +1 -1
  16. package/dist/cjs/tests/puppet-server-impl.js +5 -0
  17. package/dist/cjs/tests/puppet-server-impl.js.map +1 -1
  18. package/dist/esm/out/wechaty/puppet/contact_pb.d.ts +12 -0
  19. package/dist/esm/out/wechaty/puppet/contact_pb.js +97 -1
  20. package/dist/esm/out/wechaty/puppet/moment_pb.d.ts +36 -0
  21. package/dist/esm/out/wechaty/puppet/moment_pb.js +275 -0
  22. package/dist/esm/out/wechaty/puppet.openapi.yaml +31 -1
  23. package/dist/esm/out/wechaty/puppet.swagger.json +41 -1
  24. package/dist/esm/out/wechaty/puppet_grpc_pb.d.ts +17 -0
  25. package/dist/esm/out/wechaty/puppet_grpc_pb.js +33 -0
  26. package/dist/esm/out/wechaty/puppet_pb_service.d.ts +19 -0
  27. package/dist/esm/out/wechaty/puppet_pb_service.js +40 -0
  28. package/dist/esm/proto/wechaty/puppet/contact.proto +10 -2
  29. package/dist/esm/proto/wechaty/puppet/moment.proto +6 -0
  30. package/dist/esm/proto/wechaty/puppet.proto +7 -0
  31. package/dist/esm/src/package-json.js +1 -1
  32. package/dist/esm/tests/puppet-server-impl.d.ts.map +1 -1
  33. package/dist/esm/tests/puppet-server-impl.js +5 -0
  34. package/dist/esm/tests/puppet-server-impl.js.map +1 -1
  35. package/out/wechaty/puppet/contact_pb.d.ts +12 -0
  36. package/out/wechaty/puppet/contact_pb.js +97 -1
  37. package/out/wechaty/puppet/moment_pb.d.ts +36 -0
  38. package/out/wechaty/puppet/moment_pb.js +275 -0
  39. package/out/wechaty/puppet.openapi.yaml +31 -1
  40. package/out/wechaty/puppet.swagger.json +41 -1
  41. package/out/wechaty/puppet_grpc_pb.d.ts +17 -0
  42. package/out/wechaty/puppet_grpc_pb.js +33 -0
  43. package/out/wechaty/puppet_pb_service.d.ts +19 -0
  44. package/out/wechaty/puppet_pb_service.js +40 -0
  45. package/package.json +1 -1
  46. package/src/package-json.ts +1 -1
@@ -23,6 +23,8 @@ goog.exportSymbol('proto.wechaty.puppet.MomentPublishRequest', null, global);
23
23
  goog.exportSymbol('proto.wechaty.puppet.MomentPublishResponse', null, global);
24
24
  goog.exportSymbol('proto.wechaty.puppet.MomentSignatureRequest', null, global);
25
25
  goog.exportSymbol('proto.wechaty.puppet.MomentSignatureResponse', null, global);
26
+ goog.exportSymbol('proto.wechaty.puppet.MomentUnpublishRequest', null, global);
27
+ goog.exportSymbol('proto.wechaty.puppet.MomentUnpublishResponse', null, global);
26
28
  goog.exportSymbol('proto.wechaty.puppet.MomentVisibleListRequest', null, global);
27
29
  goog.exportSymbol('proto.wechaty.puppet.MomentVisibleListResponse', null, global);
28
30
  /**
@@ -193,6 +195,48 @@ if (goog.DEBUG && !COMPILED) {
193
195
  */
194
196
  proto.wechaty.puppet.MomentVisibleListResponse.displayName = 'proto.wechaty.puppet.MomentVisibleListResponse';
195
197
  }
198
+ /**
199
+ * Generated by JsPbCodeGenerator.
200
+ * @param {Array=} opt_data Optional initial data array, typically from a
201
+ * server response, or constructed directly in Javascript. The array is used
202
+ * in place and becomes part of the constructed object. It is not cloned.
203
+ * If no data is provided, the constructed object will be empty, but still
204
+ * valid.
205
+ * @extends {jspb.Message}
206
+ * @constructor
207
+ */
208
+ proto.wechaty.puppet.MomentUnpublishRequest = function(opt_data) {
209
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
210
+ };
211
+ goog.inherits(proto.wechaty.puppet.MomentUnpublishRequest, jspb.Message);
212
+ if (goog.DEBUG && !COMPILED) {
213
+ /**
214
+ * @public
215
+ * @override
216
+ */
217
+ proto.wechaty.puppet.MomentUnpublishRequest.displayName = 'proto.wechaty.puppet.MomentUnpublishRequest';
218
+ }
219
+ /**
220
+ * Generated by JsPbCodeGenerator.
221
+ * @param {Array=} opt_data Optional initial data array, typically from a
222
+ * server response, or constructed directly in Javascript. The array is used
223
+ * in place and becomes part of the constructed object. It is not cloned.
224
+ * If no data is provided, the constructed object will be empty, but still
225
+ * valid.
226
+ * @extends {jspb.Message}
227
+ * @constructor
228
+ */
229
+ proto.wechaty.puppet.MomentUnpublishResponse = function(opt_data) {
230
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
231
+ };
232
+ goog.inherits(proto.wechaty.puppet.MomentUnpublishResponse, jspb.Message);
233
+ if (goog.DEBUG && !COMPILED) {
234
+ /**
235
+ * @public
236
+ * @override
237
+ */
238
+ proto.wechaty.puppet.MomentUnpublishResponse.displayName = 'proto.wechaty.puppet.MomentUnpublishResponse';
239
+ }
196
240
 
197
241
 
198
242
 
@@ -1251,4 +1295,235 @@ proto.wechaty.puppet.MomentVisibleListResponse.prototype.clearContactIdsList = f
1251
1295
  };
1252
1296
 
1253
1297
 
1298
+
1299
+
1300
+
1301
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1302
+ /**
1303
+ * Creates an object representation of this proto.
1304
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1305
+ * Optional fields that are not set will be set to undefined.
1306
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1307
+ * For the list of reserved names please see:
1308
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1309
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1310
+ * JSPB instance for transitional soy proto support:
1311
+ * http://goto/soy-param-migration
1312
+ * @return {!Object}
1313
+ */
1314
+ proto.wechaty.puppet.MomentUnpublishRequest.prototype.toObject = function(opt_includeInstance) {
1315
+ return proto.wechaty.puppet.MomentUnpublishRequest.toObject(opt_includeInstance, this);
1316
+ };
1317
+
1318
+
1319
+ /**
1320
+ * Static version of the {@see toObject} method.
1321
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1322
+ * the JSPB instance for transitional soy proto support:
1323
+ * http://goto/soy-param-migration
1324
+ * @param {!proto.wechaty.puppet.MomentUnpublishRequest} msg The msg instance to transform.
1325
+ * @return {!Object}
1326
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1327
+ */
1328
+ proto.wechaty.puppet.MomentUnpublishRequest.toObject = function(includeInstance, msg) {
1329
+ var f, obj = {
1330
+ momentId: jspb.Message.getFieldWithDefault(msg, 1, "")
1331
+ };
1332
+
1333
+ if (includeInstance) {
1334
+ obj.$jspbMessageInstance = msg;
1335
+ }
1336
+ return obj;
1337
+ };
1338
+ }
1339
+
1340
+
1341
+ /**
1342
+ * Deserializes binary data (in protobuf wire format).
1343
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1344
+ * @return {!proto.wechaty.puppet.MomentUnpublishRequest}
1345
+ */
1346
+ proto.wechaty.puppet.MomentUnpublishRequest.deserializeBinary = function(bytes) {
1347
+ var reader = new jspb.BinaryReader(bytes);
1348
+ var msg = new proto.wechaty.puppet.MomentUnpublishRequest;
1349
+ return proto.wechaty.puppet.MomentUnpublishRequest.deserializeBinaryFromReader(msg, reader);
1350
+ };
1351
+
1352
+
1353
+ /**
1354
+ * Deserializes binary data (in protobuf wire format) from the
1355
+ * given reader into the given message object.
1356
+ * @param {!proto.wechaty.puppet.MomentUnpublishRequest} msg The message object to deserialize into.
1357
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1358
+ * @return {!proto.wechaty.puppet.MomentUnpublishRequest}
1359
+ */
1360
+ proto.wechaty.puppet.MomentUnpublishRequest.deserializeBinaryFromReader = function(msg, reader) {
1361
+ while (reader.nextField()) {
1362
+ if (reader.isEndGroup()) {
1363
+ break;
1364
+ }
1365
+ var field = reader.getFieldNumber();
1366
+ switch (field) {
1367
+ case 1:
1368
+ var value = /** @type {string} */ (reader.readString());
1369
+ msg.setMomentId(value);
1370
+ break;
1371
+ default:
1372
+ reader.skipField();
1373
+ break;
1374
+ }
1375
+ }
1376
+ return msg;
1377
+ };
1378
+
1379
+
1380
+ /**
1381
+ * Serializes the message to binary data (in protobuf wire format).
1382
+ * @return {!Uint8Array}
1383
+ */
1384
+ proto.wechaty.puppet.MomentUnpublishRequest.prototype.serializeBinary = function() {
1385
+ var writer = new jspb.BinaryWriter();
1386
+ proto.wechaty.puppet.MomentUnpublishRequest.serializeBinaryToWriter(this, writer);
1387
+ return writer.getResultBuffer();
1388
+ };
1389
+
1390
+
1391
+ /**
1392
+ * Serializes the given message to binary data (in protobuf wire
1393
+ * format), writing to the given BinaryWriter.
1394
+ * @param {!proto.wechaty.puppet.MomentUnpublishRequest} message
1395
+ * @param {!jspb.BinaryWriter} writer
1396
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1397
+ */
1398
+ proto.wechaty.puppet.MomentUnpublishRequest.serializeBinaryToWriter = function(message, writer) {
1399
+ var f = undefined;
1400
+ f = message.getMomentId();
1401
+ if (f.length > 0) {
1402
+ writer.writeString(
1403
+ 1,
1404
+ f
1405
+ );
1406
+ }
1407
+ };
1408
+
1409
+
1410
+ /**
1411
+ * optional string moment_id = 1;
1412
+ * @return {string}
1413
+ */
1414
+ proto.wechaty.puppet.MomentUnpublishRequest.prototype.getMomentId = function() {
1415
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1416
+ };
1417
+
1418
+
1419
+ /**
1420
+ * @param {string} value
1421
+ * @return {!proto.wechaty.puppet.MomentUnpublishRequest} returns this
1422
+ */
1423
+ proto.wechaty.puppet.MomentUnpublishRequest.prototype.setMomentId = function(value) {
1424
+ return jspb.Message.setProto3StringField(this, 1, value);
1425
+ };
1426
+
1427
+
1428
+
1429
+
1430
+
1431
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1432
+ /**
1433
+ * Creates an object representation of this proto.
1434
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1435
+ * Optional fields that are not set will be set to undefined.
1436
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1437
+ * For the list of reserved names please see:
1438
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1439
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1440
+ * JSPB instance for transitional soy proto support:
1441
+ * http://goto/soy-param-migration
1442
+ * @return {!Object}
1443
+ */
1444
+ proto.wechaty.puppet.MomentUnpublishResponse.prototype.toObject = function(opt_includeInstance) {
1445
+ return proto.wechaty.puppet.MomentUnpublishResponse.toObject(opt_includeInstance, this);
1446
+ };
1447
+
1448
+
1449
+ /**
1450
+ * Static version of the {@see toObject} method.
1451
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1452
+ * the JSPB instance for transitional soy proto support:
1453
+ * http://goto/soy-param-migration
1454
+ * @param {!proto.wechaty.puppet.MomentUnpublishResponse} msg The msg instance to transform.
1455
+ * @return {!Object}
1456
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1457
+ */
1458
+ proto.wechaty.puppet.MomentUnpublishResponse.toObject = function(includeInstance, msg) {
1459
+ var f, obj = {
1460
+
1461
+ };
1462
+
1463
+ if (includeInstance) {
1464
+ obj.$jspbMessageInstance = msg;
1465
+ }
1466
+ return obj;
1467
+ };
1468
+ }
1469
+
1470
+
1471
+ /**
1472
+ * Deserializes binary data (in protobuf wire format).
1473
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1474
+ * @return {!proto.wechaty.puppet.MomentUnpublishResponse}
1475
+ */
1476
+ proto.wechaty.puppet.MomentUnpublishResponse.deserializeBinary = function(bytes) {
1477
+ var reader = new jspb.BinaryReader(bytes);
1478
+ var msg = new proto.wechaty.puppet.MomentUnpublishResponse;
1479
+ return proto.wechaty.puppet.MomentUnpublishResponse.deserializeBinaryFromReader(msg, reader);
1480
+ };
1481
+
1482
+
1483
+ /**
1484
+ * Deserializes binary data (in protobuf wire format) from the
1485
+ * given reader into the given message object.
1486
+ * @param {!proto.wechaty.puppet.MomentUnpublishResponse} msg The message object to deserialize into.
1487
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1488
+ * @return {!proto.wechaty.puppet.MomentUnpublishResponse}
1489
+ */
1490
+ proto.wechaty.puppet.MomentUnpublishResponse.deserializeBinaryFromReader = function(msg, reader) {
1491
+ while (reader.nextField()) {
1492
+ if (reader.isEndGroup()) {
1493
+ break;
1494
+ }
1495
+ var field = reader.getFieldNumber();
1496
+ switch (field) {
1497
+ default:
1498
+ reader.skipField();
1499
+ break;
1500
+ }
1501
+ }
1502
+ return msg;
1503
+ };
1504
+
1505
+
1506
+ /**
1507
+ * Serializes the message to binary data (in protobuf wire format).
1508
+ * @return {!Uint8Array}
1509
+ */
1510
+ proto.wechaty.puppet.MomentUnpublishResponse.prototype.serializeBinary = function() {
1511
+ var writer = new jspb.BinaryWriter();
1512
+ proto.wechaty.puppet.MomentUnpublishResponse.serializeBinaryToWriter(this, writer);
1513
+ return writer.getResultBuffer();
1514
+ };
1515
+
1516
+
1517
+ /**
1518
+ * Serializes the given message to binary data (in protobuf wire
1519
+ * format), writing to the given BinaryWriter.
1520
+ * @param {!proto.wechaty.puppet.MomentUnpublishResponse} message
1521
+ * @param {!jspb.BinaryWriter} writer
1522
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1523
+ */
1524
+ proto.wechaty.puppet.MomentUnpublishResponse.serializeBinaryToWriter = function(message, writer) {
1525
+ var f = undefined;
1526
+ };
1527
+
1528
+
1254
1529
  goog.object.extend(exports, proto.wechaty.puppet);
@@ -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.51
12
+ version: 1.0.53
13
13
  contact:
14
14
  name: Wechaty
15
15
  url: 'https://github.com/wechaty/openapi'
@@ -428,6 +428,15 @@ paths:
428
428
  items:
429
429
  type: string
430
430
  title: 标签(的id)
431
+ clearPhones:
432
+ type: boolean
433
+ description: |-
434
+ *
435
+ The protobuf encoding doesn't distinguish between these two cases. (undefined vs [])
436
+ Since protobuf is language-agnostic,
437
+ it doesn't understand the conceptual nuance of "undefined" versus "[]" of Javascript.
438
+ clearTagIds:
439
+ type: boolean
431
440
  tags:
432
441
  - Puppet
433
442
  '/conversation/{conversationId}/read':
@@ -1294,6 +1303,25 @@ paths:
1294
1303
  $ref: '#/definitions/rpcStatus'
1295
1304
  tags:
1296
1305
  - Puppet
1306
+ '/moment/{momentId}':
1307
+ delete:
1308
+ operationId: Puppet_MomentUnpublish
1309
+ responses:
1310
+ '200':
1311
+ description: A successful response.
1312
+ schema:
1313
+ $ref: '#/definitions/puppetMomentUnpublishResponse'
1314
+ default:
1315
+ description: An unexpected error response.
1316
+ schema:
1317
+ $ref: '#/definitions/rpcStatus'
1318
+ parameters:
1319
+ - name: momentId
1320
+ in: path
1321
+ required: true
1322
+ type: string
1323
+ tags:
1324
+ - Puppet
1297
1325
  /post/like:
1298
1326
  post:
1299
1327
  operationId: Puppet_postTap
@@ -2984,6 +3012,8 @@ definitions:
2984
3012
  properties:
2985
3013
  text:
2986
3014
  type: string
3015
+ puppetMomentUnpublishResponse:
3016
+ type: object
2987
3017
  puppetMomentVisibleListResponse:
2988
3018
  type: object
2989
3019
  properties:
@@ -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.51",
6
+ "version": "1.0.53",
7
7
  "contact": {
8
8
  "name": "Wechaty",
9
9
  "url": "https://github.com/wechaty/openapi",
@@ -626,6 +626,13 @@
626
626
  "type": "string"
627
627
  },
628
628
  "title": "标签(的id)"
629
+ },
630
+ "clearPhones": {
631
+ "type": "boolean",
632
+ "description": "*\n The protobuf encoding doesn't distinguish between these two cases. (undefined vs [])\n Since protobuf is language-agnostic,\n it doesn't understand the conceptual nuance of \"undefined\" versus \"[]\" of Javascript."
633
+ },
634
+ "clearTagIds": {
635
+ "type": "boolean"
629
636
  }
630
637
  }
631
638
  }
@@ -1920,6 +1927,36 @@
1920
1927
  ]
1921
1928
  }
1922
1929
  },
1930
+ "/moment/{momentId}": {
1931
+ "delete": {
1932
+ "operationId": "Puppet_MomentUnpublish",
1933
+ "responses": {
1934
+ "200": {
1935
+ "description": "A successful response.",
1936
+ "schema": {
1937
+ "$ref": "#/definitions/puppetMomentUnpublishResponse"
1938
+ }
1939
+ },
1940
+ "default": {
1941
+ "description": "An unexpected error response.",
1942
+ "schema": {
1943
+ "$ref": "#/definitions/rpcStatus"
1944
+ }
1945
+ }
1946
+ },
1947
+ "parameters": [
1948
+ {
1949
+ "name": "momentId",
1950
+ "in": "path",
1951
+ "required": true,
1952
+ "type": "string"
1953
+ }
1954
+ ],
1955
+ "tags": [
1956
+ "Puppet"
1957
+ ]
1958
+ }
1959
+ },
1923
1960
  "/post/like": {
1924
1961
  "post": {
1925
1962
  "operationId": "Puppet_postTap",
@@ -4225,6 +4262,9 @@
4225
4262
  }
4226
4263
  }
4227
4264
  },
4265
+ "puppetMomentUnpublishResponse": {
4266
+ "type": "object"
4267
+ },
4228
4268
  "puppetMomentVisibleListResponse": {
4229
4269
  "type": "object",
4230
4270
  "properties": {
@@ -100,6 +100,7 @@ interface IPuppetService extends grpc.ServiceDefinition<grpc.UntypedServiceImple
100
100
  tagContactTagList: IPuppetService_ITagContactTagList;
101
101
  tagTagContactList: IPuppetService_ITagTagContactList;
102
102
  momentPublish: IPuppetService_ImomentPublish;
103
+ momentUnpublish: IPuppetService_IMomentUnpublish;
103
104
  postTap: IPuppetService_IpostTap;
104
105
  momentSignature: IPuppetService_ImomentSignature;
105
106
  momentCoverage: IPuppetService_ImomentCoverage;
@@ -803,6 +804,15 @@ interface IPuppetService_ImomentPublish extends grpc.MethodDefinition<wechaty_pu
803
804
  responseSerialize: grpc.serialize<wechaty_puppet_moment_pb.MomentPublishResponse>;
804
805
  responseDeserialize: grpc.deserialize<wechaty_puppet_moment_pb.MomentPublishResponse>;
805
806
  }
807
+ interface IPuppetService_IMomentUnpublish extends grpc.MethodDefinition<wechaty_puppet_moment_pb.MomentUnpublishRequest, wechaty_puppet_moment_pb.MomentUnpublishResponse> {
808
+ path: "/wechaty.Puppet/MomentUnpublish";
809
+ requestStream: false;
810
+ responseStream: false;
811
+ requestSerialize: grpc.serialize<wechaty_puppet_moment_pb.MomentUnpublishRequest>;
812
+ requestDeserialize: grpc.deserialize<wechaty_puppet_moment_pb.MomentUnpublishRequest>;
813
+ responseSerialize: grpc.serialize<wechaty_puppet_moment_pb.MomentUnpublishResponse>;
814
+ responseDeserialize: grpc.deserialize<wechaty_puppet_moment_pb.MomentUnpublishResponse>;
815
+ }
806
816
  interface IPuppetService_IpostTap extends grpc.MethodDefinition<wechaty_puppet_post_pb.PostTapRequest, wechaty_puppet_post_pb.PostTapResponse> {
807
817
  path: "/wechaty.Puppet/postTap";
808
818
  requestStream: false;
@@ -956,6 +966,7 @@ export interface IPuppetServer extends grpc.UntypedServiceImplementation {
956
966
  tagContactTagList: grpc.handleUnaryCall<wechaty_puppet_tag_pb.TagContactTagListRequest, wechaty_puppet_tag_pb.TagContactTagListResponse>;
957
967
  tagTagContactList: grpc.handleUnaryCall<wechaty_puppet_tag_pb.TagTagContactListRequest, wechaty_puppet_tag_pb.TagTagContactListResponse>;
958
968
  momentPublish: grpc.handleUnaryCall<wechaty_puppet_moment_pb.MomentPublishRequest, wechaty_puppet_moment_pb.MomentPublishResponse>;
969
+ momentUnpublish: grpc.handleUnaryCall<wechaty_puppet_moment_pb.MomentUnpublishRequest, wechaty_puppet_moment_pb.MomentUnpublishResponse>;
959
970
  postTap: grpc.handleUnaryCall<wechaty_puppet_post_pb.PostTapRequest, wechaty_puppet_post_pb.PostTapResponse>;
960
971
  momentSignature: grpc.handleUnaryCall<wechaty_puppet_moment_pb.MomentSignatureRequest, wechaty_puppet_moment_pb.MomentSignatureResponse>;
961
972
  momentCoverage: grpc.handleUnaryCall<wechaty_puppet_moment_pb.MomentCoverageRequest, wechaty_puppet_moment_pb.MomentCoverageResponse>;
@@ -1197,6 +1208,9 @@ export interface IPuppetClient {
1197
1208
  momentPublish(request: wechaty_puppet_moment_pb.MomentPublishRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_moment_pb.MomentPublishResponse) => void): grpc.ClientUnaryCall;
1198
1209
  momentPublish(request: wechaty_puppet_moment_pb.MomentPublishRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_moment_pb.MomentPublishResponse) => void): grpc.ClientUnaryCall;
1199
1210
  momentPublish(request: wechaty_puppet_moment_pb.MomentPublishRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_moment_pb.MomentPublishResponse) => void): grpc.ClientUnaryCall;
1211
+ momentUnpublish(request: wechaty_puppet_moment_pb.MomentUnpublishRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_moment_pb.MomentUnpublishResponse) => void): grpc.ClientUnaryCall;
1212
+ momentUnpublish(request: wechaty_puppet_moment_pb.MomentUnpublishRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_moment_pb.MomentUnpublishResponse) => void): grpc.ClientUnaryCall;
1213
+ momentUnpublish(request: wechaty_puppet_moment_pb.MomentUnpublishRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_moment_pb.MomentUnpublishResponse) => void): grpc.ClientUnaryCall;
1200
1214
  postTap(request: wechaty_puppet_post_pb.PostTapRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_post_pb.PostTapResponse) => void): grpc.ClientUnaryCall;
1201
1215
  postTap(request: wechaty_puppet_post_pb.PostTapRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_post_pb.PostTapResponse) => void): grpc.ClientUnaryCall;
1202
1216
  postTap(request: wechaty_puppet_post_pb.PostTapRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_post_pb.PostTapResponse) => void): grpc.ClientUnaryCall;
@@ -1455,6 +1469,9 @@ export class PuppetClient extends grpc.Client implements IPuppetClient {
1455
1469
  public momentPublish(request: wechaty_puppet_moment_pb.MomentPublishRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_moment_pb.MomentPublishResponse) => void): grpc.ClientUnaryCall;
1456
1470
  public momentPublish(request: wechaty_puppet_moment_pb.MomentPublishRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_moment_pb.MomentPublishResponse) => void): grpc.ClientUnaryCall;
1457
1471
  public momentPublish(request: wechaty_puppet_moment_pb.MomentPublishRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_moment_pb.MomentPublishResponse) => void): grpc.ClientUnaryCall;
1472
+ public momentUnpublish(request: wechaty_puppet_moment_pb.MomentUnpublishRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_moment_pb.MomentUnpublishResponse) => void): grpc.ClientUnaryCall;
1473
+ public momentUnpublish(request: wechaty_puppet_moment_pb.MomentUnpublishRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_moment_pb.MomentUnpublishResponse) => void): grpc.ClientUnaryCall;
1474
+ public momentUnpublish(request: wechaty_puppet_moment_pb.MomentUnpublishRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_moment_pb.MomentUnpublishResponse) => void): grpc.ClientUnaryCall;
1458
1475
  public postTap(request: wechaty_puppet_post_pb.PostTapRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_post_pb.PostTapResponse) => void): grpc.ClientUnaryCall;
1459
1476
  public postTap(request: wechaty_puppet_post_pb.PostTapRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_post_pb.PostTapResponse) => void): grpc.ClientUnaryCall;
1460
1477
  public postTap(request: wechaty_puppet_post_pb.PostTapRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_post_pb.PostTapResponse) => void): grpc.ClientUnaryCall;
@@ -1087,6 +1087,28 @@ function deserialize_wechaty_puppet_MomentSignatureResponse(buffer_arg) {
1087
1087
  return wechaty_puppet_moment_pb.MomentSignatureResponse.deserializeBinary(new Uint8Array(buffer_arg));
1088
1088
  }
1089
1089
 
1090
+ function serialize_wechaty_puppet_MomentUnpublishRequest(arg) {
1091
+ if (!(arg instanceof wechaty_puppet_moment_pb.MomentUnpublishRequest)) {
1092
+ throw new Error('Expected argument of type wechaty.puppet.MomentUnpublishRequest');
1093
+ }
1094
+ return Buffer.from(arg.serializeBinary());
1095
+ }
1096
+
1097
+ function deserialize_wechaty_puppet_MomentUnpublishRequest(buffer_arg) {
1098
+ return wechaty_puppet_moment_pb.MomentUnpublishRequest.deserializeBinary(new Uint8Array(buffer_arg));
1099
+ }
1100
+
1101
+ function serialize_wechaty_puppet_MomentUnpublishResponse(arg) {
1102
+ if (!(arg instanceof wechaty_puppet_moment_pb.MomentUnpublishResponse)) {
1103
+ throw new Error('Expected argument of type wechaty.puppet.MomentUnpublishResponse');
1104
+ }
1105
+ return Buffer.from(arg.serializeBinary());
1106
+ }
1107
+
1108
+ function deserialize_wechaty_puppet_MomentUnpublishResponse(buffer_arg) {
1109
+ return wechaty_puppet_moment_pb.MomentUnpublishResponse.deserializeBinary(new Uint8Array(buffer_arg));
1110
+ }
1111
+
1090
1112
  function serialize_wechaty_puppet_MomentVisibleListRequest(arg) {
1091
1113
  if (!(arg instanceof wechaty_puppet_moment_pb.MomentVisibleListRequest)) {
1092
1114
  throw new Error('Expected argument of type wechaty.puppet.MomentVisibleListRequest');
@@ -2784,6 +2806,17 @@ momentPublish: {
2784
2806
  responseSerialize: serialize_wechaty_puppet_MomentPublishResponse,
2785
2807
  responseDeserialize: deserialize_wechaty_puppet_MomentPublishResponse,
2786
2808
  },
2809
+ momentUnpublish: {
2810
+ path: '/wechaty.Puppet/MomentUnpublish',
2811
+ requestStream: false,
2812
+ responseStream: false,
2813
+ requestType: wechaty_puppet_moment_pb.MomentUnpublishRequest,
2814
+ responseType: wechaty_puppet_moment_pb.MomentUnpublishResponse,
2815
+ requestSerialize: serialize_wechaty_puppet_MomentUnpublishRequest,
2816
+ requestDeserialize: deserialize_wechaty_puppet_MomentUnpublishRequest,
2817
+ responseSerialize: serialize_wechaty_puppet_MomentUnpublishResponse,
2818
+ responseDeserialize: deserialize_wechaty_puppet_MomentUnpublishResponse,
2819
+ },
2787
2820
  postTap: {
2788
2821
  path: '/wechaty.Puppet/postTap',
2789
2822
  requestStream: false,
@@ -710,6 +710,15 @@ type PuppetmomentPublish = {
710
710
  readonly responseType: typeof wechaty_puppet_moment_pb.MomentPublishResponse;
711
711
  };
712
712
 
713
+ type PuppetMomentUnpublish = {
714
+ readonly methodName: string;
715
+ readonly service: typeof Puppet;
716
+ readonly requestStream: false;
717
+ readonly responseStream: false;
718
+ readonly requestType: typeof wechaty_puppet_moment_pb.MomentUnpublishRequest;
719
+ readonly responseType: typeof wechaty_puppet_moment_pb.MomentUnpublishResponse;
720
+ };
721
+
713
722
  type PuppetpostTap = {
714
723
  readonly methodName: string;
715
724
  readonly service: typeof Puppet;
@@ -861,6 +870,7 @@ export class Puppet {
861
870
  static readonly TagContactTagList: PuppetTagContactTagList;
862
871
  static readonly TagTagContactList: PuppetTagTagContactList;
863
872
  static readonly momentPublish: PuppetmomentPublish;
873
+ static readonly MomentUnpublish: PuppetMomentUnpublish;
864
874
  static readonly postTap: PuppetpostTap;
865
875
  static readonly momentSignature: PuppetmomentSignature;
866
876
  static readonly momentCoverage: PuppetmomentCoverage;
@@ -1588,6 +1598,15 @@ export class PuppetClient {
1588
1598
  requestMessage: wechaty_puppet_moment_pb.MomentPublishRequest,
1589
1599
  callback: (error: ServiceError|null, responseMessage: wechaty_puppet_moment_pb.MomentPublishResponse|null) => void
1590
1600
  ): UnaryResponse;
1601
+ momentUnpublish(
1602
+ requestMessage: wechaty_puppet_moment_pb.MomentUnpublishRequest,
1603
+ metadata: grpc.Metadata,
1604
+ callback: (error: ServiceError|null, responseMessage: wechaty_puppet_moment_pb.MomentUnpublishResponse|null) => void
1605
+ ): UnaryResponse;
1606
+ momentUnpublish(
1607
+ requestMessage: wechaty_puppet_moment_pb.MomentUnpublishRequest,
1608
+ callback: (error: ServiceError|null, responseMessage: wechaty_puppet_moment_pb.MomentUnpublishResponse|null) => void
1609
+ ): UnaryResponse;
1591
1610
  postTap(
1592
1611
  requestMessage: wechaty_puppet_post_pb.PostTapRequest,
1593
1612
  metadata: grpc.Metadata,
@@ -716,6 +716,15 @@ Puppet.momentPublish = {
716
716
  responseType: wechaty_puppet_moment_pb.MomentPublishResponse
717
717
  };
718
718
 
719
+ Puppet.MomentUnpublish = {
720
+ methodName: "MomentUnpublish",
721
+ service: Puppet,
722
+ requestStream: false,
723
+ responseStream: false,
724
+ requestType: wechaty_puppet_moment_pb.MomentUnpublishRequest,
725
+ responseType: wechaty_puppet_moment_pb.MomentUnpublishResponse
726
+ };
727
+
719
728
  Puppet.postTap = {
720
729
  methodName: "postTap",
721
730
  service: Puppet,
@@ -3190,6 +3199,37 @@ PuppetClient.prototype.momentPublish = function momentPublish(requestMessage, me
3190
3199
  };
3191
3200
  };
3192
3201
 
3202
+ PuppetClient.prototype.momentUnpublish = function momentUnpublish(requestMessage, metadata, callback) {
3203
+ if (arguments.length === 2) {
3204
+ callback = arguments[1];
3205
+ }
3206
+ var client = grpc.unary(Puppet.MomentUnpublish, {
3207
+ request: requestMessage,
3208
+ host: this.serviceHost,
3209
+ metadata: metadata,
3210
+ transport: this.options.transport,
3211
+ debug: this.options.debug,
3212
+ onEnd: function (response) {
3213
+ if (callback) {
3214
+ if (response.status !== grpc.Code.OK) {
3215
+ var err = new Error(response.statusMessage);
3216
+ err.code = response.status;
3217
+ err.metadata = response.trailers;
3218
+ callback(err, null);
3219
+ } else {
3220
+ callback(null, response.message);
3221
+ }
3222
+ }
3223
+ }
3224
+ });
3225
+ return {
3226
+ cancel: function () {
3227
+ callback = null;
3228
+ client.close();
3229
+ }
3230
+ };
3231
+ };
3232
+
3193
3233
  PuppetClient.prototype.postTap = function postTap(requestMessage, metadata, callback) {
3194
3234
  if (arguments.length === 2) {
3195
3235
  callback = arguments[1];
@@ -149,9 +149,17 @@ message ContactPayloadModifyRequest {
149
149
  optional string title = 15; // 头衔
150
150
  optional string description = 16; // 描述
151
151
  optional bool coworker = 17; // 是否为同事
152
- repeated string phones = 18; // 电话号码,企微中最多5个
152
+ repeated string phones = 18; // 电话号码,企微中最多5个
153
153
  optional string additional_info = 19; // 额外信息,是由JS对象stringify得到的字符串,目前支持的内容包含addContactTime、corpId等。
154
- repeated string tag_ids = 20; // 标签(的id)
154
+ repeated string tag_ids = 20; // 标签(的id)
155
+
156
+ /**
157
+ * The protobuf encoding doesn't distinguish between these two cases. (undefined vs [])
158
+ * Since protobuf is language-agnostic,
159
+ * it doesn't understand the conceptual nuance of "undefined" versus "[]" of Javascript.
160
+ */
161
+ optional bool clear_phones = 21;
162
+ optional bool clear_tag_ids = 22;
155
163
  }
156
164
 
157
165
  message ContactPayloadModifyResponse {}
@@ -37,3 +37,9 @@ message MomentVisibleListResponse {
37
37
  repeated string contact_ids = 1;
38
38
  }
39
39
 
40
+ message MomentUnpublishRequest {
41
+ string moment_id = 1;
42
+ }
43
+
44
+ message MomentUnpublishResponse {
45
+ }
@@ -630,6 +630,13 @@ service Puppet {
630
630
  };
631
631
  }
632
632
 
633
+ rpc MomentUnpublish (puppet.MomentUnpublishRequest) returns (puppet.MomentUnpublishResponse) {
634
+ option (google.api.http) = {
635
+ delete: "/moment/{moment_id}"
636
+ };
637
+ }
638
+
639
+
633
640
  rpc postTap (puppet.PostTapRequest) returns (puppet.PostTapResponse) {
634
641
  option (google.api.http) = {
635
642
  post: "/post/like"
@@ -1,6 +1,6 @@
1
1
  export const packageJson = {
2
2
  "name": "@juzi/wechaty-grpc",
3
- "version": "1.0.51",
3
+ "version": "1.0.53",
4
4
  "description": "gRPC for Wechaty",
5
5
  "type": "module",
6
6
  "exports": {
@@ -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,KAAK,aAAa,GAAG,MAAM,CAAC,aAAa,CAAA;AAEzC;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,aA+f9B,CAAA"}
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,KAAK,aAAa,GAAG,MAAM,CAAC,aAAa,CAAA;AAEzC;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,aAqgB9B,CAAA"}