@juzi/wechaty-grpc 1.0.92 → 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 +6 -3
  4. package/dist/cjs/out/wechaty/puppet/room-member_pb.js +48 -21
  5. package/dist/cjs/out/wechaty/puppet.openapi.yaml +40 -4
  6. package/dist/cjs/out/wechaty/puppet.swagger.json +60 -4
  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 +6 -3
  21. package/dist/esm/out/wechaty/puppet/room-member_pb.js +48 -21
  22. package/dist/esm/out/wechaty/puppet.openapi.yaml +40 -4
  23. package/dist/esm/out/wechaty/puppet.swagger.json +60 -4
  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 +6 -3
  38. package/out/wechaty/puppet/room-member_pb.js +48 -21
  39. package/out/wechaty/puppet.openapi.yaml +40 -4
  40. package/out/wechaty/puppet.swagger.json +60 -4
  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
@@ -42,6 +42,7 @@ interface IPuppetService extends grpc.ServiceDefinition<grpc.UntypedServiceImple
42
42
  contactSelfSignature: IPuppetService_IContactSelfSignature;
43
43
  contactSelfRoomAlias: IPuppetService_IContactSelfRoomAlias;
44
44
  contactPayload: IPuppetService_IContactPayload;
45
+ batchContactPayload: IPuppetService_IBatchContactPayload;
45
46
  contactAlias: IPuppetService_IContactAlias;
46
47
  contactAvatar: IPuppetService_IContactAvatar;
47
48
  contactPhone: IPuppetService_IContactPhone;
@@ -297,6 +298,15 @@ interface IPuppetService_IContactPayload extends grpc.MethodDefinition<wechaty_p
297
298
  responseSerialize: grpc.serialize<wechaty_puppet_contact_pb.ContactPayloadResponse>;
298
299
  responseDeserialize: grpc.deserialize<wechaty_puppet_contact_pb.ContactPayloadResponse>;
299
300
  }
301
+ interface IPuppetService_IBatchContactPayload extends grpc.MethodDefinition<wechaty_puppet_contact_pb.BatchContactPayloadRequest, wechaty_puppet_contact_pb.BatchContactPayloadResponse> {
302
+ path: "/wechaty.Puppet/BatchContactPayload";
303
+ requestStream: false;
304
+ responseStream: false;
305
+ requestSerialize: grpc.serialize<wechaty_puppet_contact_pb.BatchContactPayloadRequest>;
306
+ requestDeserialize: grpc.deserialize<wechaty_puppet_contact_pb.BatchContactPayloadRequest>;
307
+ responseSerialize: grpc.serialize<wechaty_puppet_contact_pb.BatchContactPayloadResponse>;
308
+ responseDeserialize: grpc.deserialize<wechaty_puppet_contact_pb.BatchContactPayloadResponse>;
309
+ }
300
310
  interface IPuppetService_IContactAlias extends grpc.MethodDefinition<wechaty_puppet_contact_pb.ContactAliasRequest, wechaty_puppet_contact_pb.ContactAliasResponse> {
301
311
  path: "/wechaty.Puppet/ContactAlias";
302
312
  requestStream: false;
@@ -1138,6 +1148,7 @@ export interface IPuppetServer extends grpc.UntypedServiceImplementation {
1138
1148
  contactSelfSignature: grpc.handleUnaryCall<wechaty_puppet_contact_pb.ContactSelfSignatureRequest, wechaty_puppet_contact_pb.ContactSelfSignatureResponse>;
1139
1149
  contactSelfRoomAlias: grpc.handleUnaryCall<wechaty_puppet_contact_pb.ContactSelfRoomAliasRequest, wechaty_puppet_contact_pb.ContactSelfRoomAliasResponse>;
1140
1150
  contactPayload: grpc.handleUnaryCall<wechaty_puppet_contact_pb.ContactPayloadRequest, wechaty_puppet_contact_pb.ContactPayloadResponse>;
1151
+ batchContactPayload: grpc.handleUnaryCall<wechaty_puppet_contact_pb.BatchContactPayloadRequest, wechaty_puppet_contact_pb.BatchContactPayloadResponse>;
1141
1152
  contactAlias: grpc.handleUnaryCall<wechaty_puppet_contact_pb.ContactAliasRequest, wechaty_puppet_contact_pb.ContactAliasResponse>;
1142
1153
  contactAvatar: grpc.handleUnaryCall<wechaty_puppet_contact_pb.ContactAvatarRequest, wechaty_puppet_contact_pb.ContactAvatarResponse>;
1143
1154
  contactPhone: grpc.handleUnaryCall<wechaty_puppet_contact_pb.ContactPhoneRequest, wechaty_puppet_contact_pb.ContactPhoneResponse>;
@@ -1285,6 +1296,9 @@ export interface IPuppetClient {
1285
1296
  contactPayload(request: wechaty_puppet_contact_pb.ContactPayloadRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactPayloadResponse) => void): grpc.ClientUnaryCall;
1286
1297
  contactPayload(request: wechaty_puppet_contact_pb.ContactPayloadRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactPayloadResponse) => void): grpc.ClientUnaryCall;
1287
1298
  contactPayload(request: wechaty_puppet_contact_pb.ContactPayloadRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactPayloadResponse) => void): grpc.ClientUnaryCall;
1299
+ batchContactPayload(request: wechaty_puppet_contact_pb.BatchContactPayloadRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.BatchContactPayloadResponse) => void): grpc.ClientUnaryCall;
1300
+ batchContactPayload(request: wechaty_puppet_contact_pb.BatchContactPayloadRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.BatchContactPayloadResponse) => void): grpc.ClientUnaryCall;
1301
+ batchContactPayload(request: wechaty_puppet_contact_pb.BatchContactPayloadRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.BatchContactPayloadResponse) => void): grpc.ClientUnaryCall;
1288
1302
  contactAlias(request: wechaty_puppet_contact_pb.ContactAliasRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactAliasResponse) => void): grpc.ClientUnaryCall;
1289
1303
  contactAlias(request: wechaty_puppet_contact_pb.ContactAliasRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactAliasResponse) => void): grpc.ClientUnaryCall;
1290
1304
  contactAlias(request: wechaty_puppet_contact_pb.ContactAliasRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactAliasResponse) => void): grpc.ClientUnaryCall;
@@ -1615,6 +1629,9 @@ export class PuppetClient extends grpc.Client implements IPuppetClient {
1615
1629
  public contactPayload(request: wechaty_puppet_contact_pb.ContactPayloadRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactPayloadResponse) => void): grpc.ClientUnaryCall;
1616
1630
  public contactPayload(request: wechaty_puppet_contact_pb.ContactPayloadRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactPayloadResponse) => void): grpc.ClientUnaryCall;
1617
1631
  public contactPayload(request: wechaty_puppet_contact_pb.ContactPayloadRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactPayloadResponse) => void): grpc.ClientUnaryCall;
1632
+ public batchContactPayload(request: wechaty_puppet_contact_pb.BatchContactPayloadRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.BatchContactPayloadResponse) => void): grpc.ClientUnaryCall;
1633
+ public batchContactPayload(request: wechaty_puppet_contact_pb.BatchContactPayloadRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.BatchContactPayloadResponse) => void): grpc.ClientUnaryCall;
1634
+ public batchContactPayload(request: wechaty_puppet_contact_pb.BatchContactPayloadRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.BatchContactPayloadResponse) => void): grpc.ClientUnaryCall;
1618
1635
  public contactAlias(request: wechaty_puppet_contact_pb.ContactAliasRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactAliasResponse) => void): grpc.ClientUnaryCall;
1619
1636
  public contactAlias(request: wechaty_puppet_contact_pb.ContactAliasRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactAliasResponse) => void): grpc.ClientUnaryCall;
1620
1637
  public contactAlias(request: wechaty_puppet_contact_pb.ContactAliasRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactAliasResponse) => 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_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.92",
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.92",
7
+ "version": "1.0.93",
8
8
  "description": "gRPC for Wechaty",
9
9
  "type": "module",
10
10
  "exports": {