@juzi/wechaty-grpc 1.0.57 → 1.0.59

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 +40 -0
  2. package/dist/cjs/out/wechaty/puppet/contact_pb.js +305 -0
  3. package/dist/cjs/out/wechaty/puppet/room_pb.d.ts +34 -18
  4. package/dist/cjs/out/wechaty/puppet/room_pb.js +177 -57
  5. package/dist/cjs/out/wechaty/puppet.openapi.yaml +57 -10
  6. package/dist/cjs/out/wechaty/puppet.swagger.json +79 -10
  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 +7 -0
  12. package/dist/cjs/proto/wechaty/puppet/room.proto +10 -6
  13. package/dist/cjs/proto/wechaty/puppet.proto +5 -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 +40 -0
  19. package/dist/esm/out/wechaty/puppet/contact_pb.js +305 -0
  20. package/dist/esm/out/wechaty/puppet/room_pb.d.ts +34 -18
  21. package/dist/esm/out/wechaty/puppet/room_pb.js +177 -57
  22. package/dist/esm/out/wechaty/puppet.openapi.yaml +57 -10
  23. package/dist/esm/out/wechaty/puppet.swagger.json +79 -10
  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 +7 -0
  29. package/dist/esm/proto/wechaty/puppet/room.proto +10 -6
  30. package/dist/esm/proto/wechaty/puppet.proto +5 -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 +40 -0
  36. package/out/wechaty/puppet/contact_pb.js +305 -0
  37. package/out/wechaty/puppet/room_pb.d.ts +34 -18
  38. package/out/wechaty/puppet/room_pb.js +177 -57
  39. package/out/wechaty/puppet.openapi.yaml +57 -10
  40. package/out/wechaty/puppet.swagger.json +79 -10
  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
@@ -34,6 +34,7 @@ interface IPuppetService extends grpc.ServiceDefinition<grpc.UntypedServiceImple
34
34
  contactSelfQRCode: IPuppetService_IContactSelfQRCode;
35
35
  contactSelfName: IPuppetService_IContactSelfName;
36
36
  contactSelfSignature: IPuppetService_IContactSelfSignature;
37
+ contactSelfRoomAlias: IPuppetService_IContactSelfRoomAlias;
37
38
  contactPayload: IPuppetService_IContactPayload;
38
39
  contactAlias: IPuppetService_IContactAlias;
39
40
  contactAvatar: IPuppetService_IContactAvatar;
@@ -212,6 +213,15 @@ interface IPuppetService_IContactSelfSignature extends grpc.MethodDefinition<wec
212
213
  responseSerialize: grpc.serialize<wechaty_puppet_contact_pb.ContactSelfSignatureResponse>;
213
214
  responseDeserialize: grpc.deserialize<wechaty_puppet_contact_pb.ContactSelfSignatureResponse>;
214
215
  }
216
+ interface IPuppetService_IContactSelfRoomAlias extends grpc.MethodDefinition<wechaty_puppet_contact_pb.ContactSelfRoomAliasRequest, wechaty_puppet_contact_pb.ContactSelfRoomAliasResponse> {
217
+ path: "/wechaty.Puppet/ContactSelfRoomAlias";
218
+ requestStream: false;
219
+ responseStream: false;
220
+ requestSerialize: grpc.serialize<wechaty_puppet_contact_pb.ContactSelfRoomAliasRequest>;
221
+ requestDeserialize: grpc.deserialize<wechaty_puppet_contact_pb.ContactSelfRoomAliasRequest>;
222
+ responseSerialize: grpc.serialize<wechaty_puppet_contact_pb.ContactSelfRoomAliasResponse>;
223
+ responseDeserialize: grpc.deserialize<wechaty_puppet_contact_pb.ContactSelfRoomAliasResponse>;
224
+ }
215
225
  interface IPuppetService_IContactPayload extends grpc.MethodDefinition<wechaty_puppet_contact_pb.ContactPayloadRequest, wechaty_puppet_contact_pb.ContactPayloadResponse> {
216
226
  path: "/wechaty.Puppet/ContactPayload";
217
227
  requestStream: false;
@@ -920,6 +930,7 @@ export interface IPuppetServer extends grpc.UntypedServiceImplementation {
920
930
  contactSelfQRCode: grpc.handleUnaryCall<wechaty_puppet_contact_pb.ContactSelfQRCodeRequest, wechaty_puppet_contact_pb.ContactSelfQRCodeResponse>;
921
931
  contactSelfName: grpc.handleUnaryCall<wechaty_puppet_contact_pb.ContactSelfNameRequest, wechaty_puppet_contact_pb.ContactSelfNameResponse>;
922
932
  contactSelfSignature: grpc.handleUnaryCall<wechaty_puppet_contact_pb.ContactSelfSignatureRequest, wechaty_puppet_contact_pb.ContactSelfSignatureResponse>;
933
+ contactSelfRoomAlias: grpc.handleUnaryCall<wechaty_puppet_contact_pb.ContactSelfRoomAliasRequest, wechaty_puppet_contact_pb.ContactSelfRoomAliasResponse>;
923
934
  contactPayload: grpc.handleUnaryCall<wechaty_puppet_contact_pb.ContactPayloadRequest, wechaty_puppet_contact_pb.ContactPayloadResponse>;
924
935
  contactAlias: grpc.handleUnaryCall<wechaty_puppet_contact_pb.ContactAliasRequest, wechaty_puppet_contact_pb.ContactAliasResponse>;
925
936
  contactAvatar: grpc.handleUnaryCall<wechaty_puppet_contact_pb.ContactAvatarRequest, wechaty_puppet_contact_pb.ContactAvatarResponse>;
@@ -1032,6 +1043,9 @@ export interface IPuppetClient {
1032
1043
  contactSelfSignature(request: wechaty_puppet_contact_pb.ContactSelfSignatureRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactSelfSignatureResponse) => void): grpc.ClientUnaryCall;
1033
1044
  contactSelfSignature(request: wechaty_puppet_contact_pb.ContactSelfSignatureRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactSelfSignatureResponse) => void): grpc.ClientUnaryCall;
1034
1045
  contactSelfSignature(request: wechaty_puppet_contact_pb.ContactSelfSignatureRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactSelfSignatureResponse) => void): grpc.ClientUnaryCall;
1046
+ contactSelfRoomAlias(request: wechaty_puppet_contact_pb.ContactSelfRoomAliasRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactSelfRoomAliasResponse) => void): grpc.ClientUnaryCall;
1047
+ contactSelfRoomAlias(request: wechaty_puppet_contact_pb.ContactSelfRoomAliasRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactSelfRoomAliasResponse) => void): grpc.ClientUnaryCall;
1048
+ contactSelfRoomAlias(request: wechaty_puppet_contact_pb.ContactSelfRoomAliasRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactSelfRoomAliasResponse) => void): grpc.ClientUnaryCall;
1035
1049
  contactPayload(request: wechaty_puppet_contact_pb.ContactPayloadRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactPayloadResponse) => void): grpc.ClientUnaryCall;
1036
1050
  contactPayload(request: wechaty_puppet_contact_pb.ContactPayloadRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactPayloadResponse) => void): grpc.ClientUnaryCall;
1037
1051
  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,6 +1313,9 @@ export class PuppetClient extends grpc.Client implements IPuppetClient {
1299
1313
  public contactSelfSignature(request: wechaty_puppet_contact_pb.ContactSelfSignatureRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactSelfSignatureResponse) => void): grpc.ClientUnaryCall;
1300
1314
  public contactSelfSignature(request: wechaty_puppet_contact_pb.ContactSelfSignatureRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactSelfSignatureResponse) => void): grpc.ClientUnaryCall;
1301
1315
  public contactSelfSignature(request: wechaty_puppet_contact_pb.ContactSelfSignatureRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactSelfSignatureResponse) => void): grpc.ClientUnaryCall;
1316
+ public contactSelfRoomAlias(request: wechaty_puppet_contact_pb.ContactSelfRoomAliasRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactSelfRoomAliasResponse) => void): grpc.ClientUnaryCall;
1317
+ public contactSelfRoomAlias(request: wechaty_puppet_contact_pb.ContactSelfRoomAliasRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactSelfRoomAliasResponse) => void): grpc.ClientUnaryCall;
1318
+ public contactSelfRoomAlias(request: wechaty_puppet_contact_pb.ContactSelfRoomAliasRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactSelfRoomAliasResponse) => void): grpc.ClientUnaryCall;
1302
1319
  public contactPayload(request: wechaty_puppet_contact_pb.ContactPayloadRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_contact_pb.ContactPayloadResponse) => void): grpc.ClientUnaryCall;
1303
1320
  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;
1304
1321
  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;
@@ -273,6 +273,28 @@ function deserialize_wechaty_puppet_ContactSelfQRCodeResponse(buffer_arg) {
273
273
  return wechaty_puppet_contact_pb.ContactSelfQRCodeResponse.deserializeBinary(new Uint8Array(buffer_arg));
274
274
  }
275
275
 
276
+ function serialize_wechaty_puppet_ContactSelfRoomAliasRequest(arg) {
277
+ if (!(arg instanceof wechaty_puppet_contact_pb.ContactSelfRoomAliasRequest)) {
278
+ throw new Error('Expected argument of type wechaty.puppet.ContactSelfRoomAliasRequest');
279
+ }
280
+ return Buffer.from(arg.serializeBinary());
281
+ }
282
+
283
+ function deserialize_wechaty_puppet_ContactSelfRoomAliasRequest(buffer_arg) {
284
+ return wechaty_puppet_contact_pb.ContactSelfRoomAliasRequest.deserializeBinary(new Uint8Array(buffer_arg));
285
+ }
286
+
287
+ function serialize_wechaty_puppet_ContactSelfRoomAliasResponse(arg) {
288
+ if (!(arg instanceof wechaty_puppet_contact_pb.ContactSelfRoomAliasResponse)) {
289
+ throw new Error('Expected argument of type wechaty.puppet.ContactSelfRoomAliasResponse');
290
+ }
291
+ return Buffer.from(arg.serializeBinary());
292
+ }
293
+
294
+ function deserialize_wechaty_puppet_ContactSelfRoomAliasResponse(buffer_arg) {
295
+ return wechaty_puppet_contact_pb.ContactSelfRoomAliasResponse.deserializeBinary(new Uint8Array(buffer_arg));
296
+ }
297
+
276
298
  function serialize_wechaty_puppet_ContactSelfSignatureRequest(arg) {
277
299
  if (!(arg instanceof wechaty_puppet_contact_pb.ContactSelfSignatureRequest)) {
278
300
  throw new Error('Expected argument of type wechaty.puppet.ContactSelfSignatureRequest');
@@ -2080,6 +2102,17 @@ contactSelfQRCode: {
2080
2102
  responseSerialize: serialize_wechaty_puppet_ContactSelfSignatureResponse,
2081
2103
  responseDeserialize: deserialize_wechaty_puppet_ContactSelfSignatureResponse,
2082
2104
  },
2105
+ contactSelfRoomAlias: {
2106
+ path: '/wechaty.Puppet/ContactSelfRoomAlias',
2107
+ requestStream: false,
2108
+ responseStream: false,
2109
+ requestType: wechaty_puppet_contact_pb.ContactSelfRoomAliasRequest,
2110
+ responseType: wechaty_puppet_contact_pb.ContactSelfRoomAliasResponse,
2111
+ requestSerialize: serialize_wechaty_puppet_ContactSelfRoomAliasRequest,
2112
+ requestDeserialize: deserialize_wechaty_puppet_ContactSelfRoomAliasRequest,
2113
+ responseSerialize: serialize_wechaty_puppet_ContactSelfRoomAliasResponse,
2114
+ responseDeserialize: deserialize_wechaty_puppet_ContactSelfRoomAliasResponse,
2115
+ },
2083
2116
  // *
2084
2117
  //
2085
2118
  // Contact
@@ -116,6 +116,15 @@ type PuppetContactSelfSignature = {
116
116
  readonly responseType: typeof wechaty_puppet_contact_pb.ContactSelfSignatureResponse;
117
117
  };
118
118
 
119
+ type PuppetContactSelfRoomAlias = {
120
+ readonly methodName: string;
121
+ readonly service: typeof Puppet;
122
+ readonly requestStream: false;
123
+ readonly responseStream: false;
124
+ readonly requestType: typeof wechaty_puppet_contact_pb.ContactSelfRoomAliasRequest;
125
+ readonly responseType: typeof wechaty_puppet_contact_pb.ContactSelfRoomAliasResponse;
126
+ };
127
+
119
128
  type PuppetContactPayload = {
120
129
  readonly methodName: string;
121
130
  readonly service: typeof Puppet;
@@ -822,6 +831,7 @@ export class Puppet {
822
831
  static readonly ContactSelfQRCode: PuppetContactSelfQRCode;
823
832
  static readonly ContactSelfName: PuppetContactSelfName;
824
833
  static readonly ContactSelfSignature: PuppetContactSelfSignature;
834
+ static readonly ContactSelfRoomAlias: PuppetContactSelfRoomAlias;
825
835
  static readonly ContactPayload: PuppetContactPayload;
826
836
  static readonly ContactAlias: PuppetContactAlias;
827
837
  static readonly ContactAvatar: PuppetContactAvatar;
@@ -1024,6 +1034,15 @@ export class PuppetClient {
1024
1034
  requestMessage: wechaty_puppet_contact_pb.ContactSelfSignatureRequest,
1025
1035
  callback: (error: ServiceError|null, responseMessage: wechaty_puppet_contact_pb.ContactSelfSignatureResponse|null) => void
1026
1036
  ): UnaryResponse;
1037
+ contactSelfRoomAlias(
1038
+ requestMessage: wechaty_puppet_contact_pb.ContactSelfRoomAliasRequest,
1039
+ metadata: grpc.Metadata,
1040
+ callback: (error: ServiceError|null, responseMessage: wechaty_puppet_contact_pb.ContactSelfRoomAliasResponse|null) => void
1041
+ ): UnaryResponse;
1042
+ contactSelfRoomAlias(
1043
+ requestMessage: wechaty_puppet_contact_pb.ContactSelfRoomAliasRequest,
1044
+ callback: (error: ServiceError|null, responseMessage: wechaty_puppet_contact_pb.ContactSelfRoomAliasResponse|null) => void
1045
+ ): UnaryResponse;
1027
1046
  contactPayload(
1028
1047
  requestMessage: wechaty_puppet_contact_pb.ContactPayloadRequest,
1029
1048
  metadata: grpc.Metadata,
@@ -122,6 +122,15 @@ Puppet.ContactSelfSignature = {
122
122
  responseType: wechaty_puppet_contact_pb.ContactSelfSignatureResponse
123
123
  };
124
124
 
125
+ Puppet.ContactSelfRoomAlias = {
126
+ methodName: "ContactSelfRoomAlias",
127
+ service: Puppet,
128
+ requestStream: false,
129
+ responseStream: false,
130
+ requestType: wechaty_puppet_contact_pb.ContactSelfRoomAliasRequest,
131
+ responseType: wechaty_puppet_contact_pb.ContactSelfRoomAliasResponse
132
+ };
133
+
125
134
  Puppet.ContactPayload = {
126
135
  methodName: "ContactPayload",
127
136
  service: Puppet,
@@ -1171,6 +1180,37 @@ PuppetClient.prototype.contactSelfSignature = function contactSelfSignature(requ
1171
1180
  };
1172
1181
  };
1173
1182
 
1183
+ PuppetClient.prototype.contactSelfRoomAlias = function contactSelfRoomAlias(requestMessage, metadata, callback) {
1184
+ if (arguments.length === 2) {
1185
+ callback = arguments[1];
1186
+ }
1187
+ var client = grpc.unary(Puppet.ContactSelfRoomAlias, {
1188
+ request: requestMessage,
1189
+ host: this.serviceHost,
1190
+ metadata: metadata,
1191
+ transport: this.options.transport,
1192
+ debug: this.options.debug,
1193
+ onEnd: function (response) {
1194
+ if (callback) {
1195
+ if (response.status !== grpc.Code.OK) {
1196
+ var err = new Error(response.statusMessage);
1197
+ err.code = response.status;
1198
+ err.metadata = response.trailers;
1199
+ callback(err, null);
1200
+ } else {
1201
+ callback(null, response.message);
1202
+ }
1203
+ }
1204
+ }
1205
+ });
1206
+ return {
1207
+ cancel: function () {
1208
+ callback = null;
1209
+ client.close();
1210
+ }
1211
+ };
1212
+ };
1213
+
1174
1214
  PuppetClient.prototype.contactPayload = function contactPayload(requestMessage, metadata, callback) {
1175
1215
  if (arguments.length === 2) {
1176
1216
  callback = arguments[1];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juzi/wechaty-grpc",
3
- "version": "1.0.57",
3
+ "version": "1.0.59",
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.57",
7
+ "version": "1.0.59",
8
8
  "description": "gRPC for Wechaty",
9
9
  "type": "module",
10
10
  "exports": {