@juzi/wechaty-grpc 1.0.91 → 1.0.93

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 +44 -0
  2. package/dist/cjs/out/wechaty/puppet/contact_pb.js +360 -0
  3. package/dist/cjs/out/wechaty/puppet/room-member_pb.d.ts +5 -5
  4. package/dist/cjs/out/wechaty/puppet/room-member_pb.js +9 -9
  5. package/dist/cjs/out/wechaty/puppet.openapi.yaml +37 -2
  6. package/dist/cjs/out/wechaty/puppet.swagger.json +57 -2
  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 +8 -0
  12. package/dist/cjs/proto/wechaty/puppet/room-member.proto +1 -1
  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 +44 -0
  19. package/dist/esm/out/wechaty/puppet/contact_pb.js +360 -0
  20. package/dist/esm/out/wechaty/puppet/room-member_pb.d.ts +5 -5
  21. package/dist/esm/out/wechaty/puppet/room-member_pb.js +9 -9
  22. package/dist/esm/out/wechaty/puppet.openapi.yaml +37 -2
  23. package/dist/esm/out/wechaty/puppet.swagger.json +57 -2
  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 +8 -0
  29. package/dist/esm/proto/wechaty/puppet/room-member.proto +1 -1
  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 +44 -0
  36. package/out/wechaty/puppet/contact_pb.js +360 -0
  37. package/out/wechaty/puppet/room-member_pb.d.ts +5 -5
  38. package/out/wechaty/puppet/room-member_pb.js +9 -9
  39. package/out/wechaty/puppet.openapi.yaml +37 -2
  40. package/out/wechaty/puppet.swagger.json +57 -2
  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
@@ -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_BatchContactPayloadRequest(arg) {
58
+ if (!(arg instanceof wechaty_puppet_contact_pb.BatchContactPayloadRequest)) {
59
+ throw new Error('Expected argument of type wechaty.puppet.BatchContactPayloadRequest');
60
+ }
61
+ return Buffer.from(arg.serializeBinary());
62
+ }
63
+
64
+ function deserialize_wechaty_puppet_BatchContactPayloadRequest(buffer_arg) {
65
+ return wechaty_puppet_contact_pb.BatchContactPayloadRequest.deserializeBinary(new Uint8Array(buffer_arg));
66
+ }
67
+
68
+ function serialize_wechaty_puppet_BatchContactPayloadResponse(arg) {
69
+ if (!(arg instanceof wechaty_puppet_contact_pb.BatchContactPayloadResponse)) {
70
+ throw new Error('Expected argument of type wechaty.puppet.BatchContactPayloadResponse');
71
+ }
72
+ return Buffer.from(arg.serializeBinary());
73
+ }
74
+
75
+ function deserialize_wechaty_puppet_BatchContactPayloadResponse(buffer_arg) {
76
+ return wechaty_puppet_contact_pb.BatchContactPayloadResponse.deserializeBinary(new Uint8Array(buffer_arg));
77
+ }
78
+
57
79
  function serialize_wechaty_puppet_BatchRoomMemberPayloadRequest(arg) {
58
80
  if (!(arg instanceof wechaty_puppet_room$member_pb.BatchRoomMemberPayloadRequest)) {
59
81
  throw new Error('Expected argument of type wechaty.puppet.BatchRoomMemberPayloadRequest');
@@ -2591,6 +2613,17 @@ contactPayload: {
2591
2613
  responseSerialize: serialize_wechaty_puppet_ContactPayloadResponse,
2592
2614
  responseDeserialize: deserialize_wechaty_puppet_ContactPayloadResponse,
2593
2615
  },
2616
+ batchContactPayload: {
2617
+ path: '/wechaty.Puppet/BatchContactPayload',
2618
+ requestStream: false,
2619
+ responseStream: false,
2620
+ requestType: wechaty_puppet_contact_pb.BatchContactPayloadRequest,
2621
+ responseType: wechaty_puppet_contact_pb.BatchContactPayloadResponse,
2622
+ requestSerialize: serialize_wechaty_puppet_BatchContactPayloadRequest,
2623
+ requestDeserialize: deserialize_wechaty_puppet_BatchContactPayloadRequest,
2624
+ responseSerialize: serialize_wechaty_puppet_BatchContactPayloadResponse,
2625
+ responseDeserialize: deserialize_wechaty_puppet_BatchContactPayloadResponse,
2626
+ },
2594
2627
  contactAlias: {
2595
2628
  path: '/wechaty.Puppet/ContactAlias',
2596
2629
  requestStream: false,
@@ -181,6 +181,15 @@ type PuppetContactPayload = {
181
181
  readonly responseType: typeof wechaty_puppet_contact_pb.ContactPayloadResponse;
182
182
  };
183
183
 
184
+ type PuppetBatchContactPayload = {
185
+ readonly methodName: string;
186
+ readonly service: typeof Puppet;
187
+ readonly requestStream: false;
188
+ readonly responseStream: false;
189
+ readonly requestType: typeof wechaty_puppet_contact_pb.BatchContactPayloadRequest;
190
+ readonly responseType: typeof wechaty_puppet_contact_pb.BatchContactPayloadResponse;
191
+ };
192
+
184
193
  type PuppetContactAlias = {
185
194
  readonly methodName: string;
186
195
  readonly service: typeof Puppet;
@@ -1020,6 +1029,7 @@ export class Puppet {
1020
1029
  static readonly ContactSelfSignature: PuppetContactSelfSignature;
1021
1030
  static readonly ContactSelfRoomAlias: PuppetContactSelfRoomAlias;
1022
1031
  static readonly ContactPayload: PuppetContactPayload;
1032
+ static readonly BatchContactPayload: PuppetBatchContactPayload;
1023
1033
  static readonly ContactAlias: PuppetContactAlias;
1024
1034
  static readonly ContactAvatar: PuppetContactAvatar;
1025
1035
  static readonly ContactPhone: PuppetContactPhone;
@@ -1299,6 +1309,15 @@ export class PuppetClient {
1299
1309
  requestMessage: wechaty_puppet_contact_pb.ContactPayloadRequest,
1300
1310
  callback: (error: ServiceError|null, responseMessage: wechaty_puppet_contact_pb.ContactPayloadResponse|null) => void
1301
1311
  ): UnaryResponse;
1312
+ batchContactPayload(
1313
+ requestMessage: wechaty_puppet_contact_pb.BatchContactPayloadRequest,
1314
+ metadata: grpc.Metadata,
1315
+ callback: (error: ServiceError|null, responseMessage: wechaty_puppet_contact_pb.BatchContactPayloadResponse|null) => void
1316
+ ): UnaryResponse;
1317
+ batchContactPayload(
1318
+ requestMessage: wechaty_puppet_contact_pb.BatchContactPayloadRequest,
1319
+ callback: (error: ServiceError|null, responseMessage: wechaty_puppet_contact_pb.BatchContactPayloadResponse|null) => void
1320
+ ): UnaryResponse;
1302
1321
  contactAlias(
1303
1322
  requestMessage: wechaty_puppet_contact_pb.ContactAliasRequest,
1304
1323
  metadata: grpc.Metadata,
@@ -187,6 +187,15 @@ Puppet.ContactPayload = {
187
187
  responseType: wechaty_puppet_contact_pb.ContactPayloadResponse
188
188
  };
189
189
 
190
+ Puppet.BatchContactPayload = {
191
+ methodName: "BatchContactPayload",
192
+ service: Puppet,
193
+ requestStream: false,
194
+ responseStream: false,
195
+ requestType: wechaty_puppet_contact_pb.BatchContactPayloadRequest,
196
+ responseType: wechaty_puppet_contact_pb.BatchContactPayloadResponse
197
+ };
198
+
190
199
  Puppet.ContactAlias = {
191
200
  methodName: "ContactAlias",
192
201
  service: Puppet,
@@ -1579,6 +1588,37 @@ PuppetClient.prototype.contactPayload = function contactPayload(requestMessage,
1579
1588
  };
1580
1589
  };
1581
1590
 
1591
+ PuppetClient.prototype.batchContactPayload = function batchContactPayload(requestMessage, metadata, callback) {
1592
+ if (arguments.length === 2) {
1593
+ callback = arguments[1];
1594
+ }
1595
+ var client = grpc.unary(Puppet.BatchContactPayload, {
1596
+ request: requestMessage,
1597
+ host: this.serviceHost,
1598
+ metadata: metadata,
1599
+ transport: this.options.transport,
1600
+ debug: this.options.debug,
1601
+ onEnd: function (response) {
1602
+ if (callback) {
1603
+ if (response.status !== grpc.Code.OK) {
1604
+ var err = new Error(response.statusMessage);
1605
+ err.code = response.status;
1606
+ err.metadata = response.trailers;
1607
+ callback(err, null);
1608
+ } else {
1609
+ callback(null, response.message);
1610
+ }
1611
+ }
1612
+ }
1613
+ });
1614
+ return {
1615
+ cancel: function () {
1616
+ callback = null;
1617
+ client.close();
1618
+ }
1619
+ };
1620
+ };
1621
+
1582
1622
  PuppetClient.prototype.contactAlias = function contactAlias(requestMessage, metadata, callback) {
1583
1623
  if (arguments.length === 2) {
1584
1624
  callback = arguments[1];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juzi/wechaty-grpc",
3
- "version": "1.0.91",
3
+ "version": "1.0.93",
4
4
  "description": "gRPC for Wechaty",
5
5
  "type": "module",
6
6
  "exports": {
@@ -4,7 +4,7 @@
4
4
  import type { PackageJson } from 'type-fest'
5
5
  export const packageJson: PackageJson = {
6
6
  "name": "@juzi/wechaty-grpc",
7
- "version": "1.0.91",
7
+ "version": "1.0.93",
8
8
  "description": "gRPC for Wechaty",
9
9
  "type": "module",
10
10
  "exports": {