@juzi/wechaty-grpc 1.0.71 → 1.0.72

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 (57) hide show
  1. package/dist/cjs/commonjs/generated/puppet.cjs +1 -0
  2. package/dist/cjs/commonjs/generated/puppet.cjs.d.ts +1 -0
  3. package/dist/cjs/out/wechaty/puppet/wecom_grpc_pb.js +1 -0
  4. package/dist/cjs/out/wechaty/puppet/wecom_pb.d.ts +77 -0
  5. package/dist/cjs/out/wechaty/puppet/wecom_pb.js +590 -0
  6. package/dist/cjs/out/wechaty/puppet/wecom_pb_service.d.ts +3 -0
  7. package/dist/cjs/out/wechaty/puppet/wecom_pb_service.js +3 -0
  8. package/dist/cjs/out/wechaty/puppet.openapi.yaml +45 -1
  9. package/dist/cjs/out/wechaty/puppet.swagger.json +70 -1
  10. package/dist/cjs/out/wechaty/puppet_grpc_pb.d.ts +18 -0
  11. package/dist/cjs/out/wechaty/puppet_grpc_pb.js +37 -0
  12. package/dist/cjs/out/wechaty/puppet_pb.d.ts +1 -0
  13. package/dist/cjs/out/wechaty/puppet_pb.js +2 -0
  14. package/dist/cjs/out/wechaty/puppet_pb_service.d.ts +20 -0
  15. package/dist/cjs/out/wechaty/puppet_pb_service.js +41 -0
  16. package/dist/cjs/proto/wechaty/puppet/wecom.proto +20 -0
  17. package/dist/cjs/proto/wechaty/puppet.proto +11 -0
  18. package/dist/cjs/src/package-json.js +1 -1
  19. package/dist/cjs/tests/puppet-server-impl.d.ts.map +1 -1
  20. package/dist/cjs/tests/puppet-server-impl.js +5 -0
  21. package/dist/cjs/tests/puppet-server-impl.js.map +1 -1
  22. package/dist/esm/commonjs/generated/puppet.cjs +1 -0
  23. package/dist/esm/commonjs/generated/puppet.cjs.d.ts +1 -0
  24. package/dist/esm/out/wechaty/puppet/wecom_grpc_pb.js +1 -0
  25. package/dist/esm/out/wechaty/puppet/wecom_pb.d.ts +77 -0
  26. package/dist/esm/out/wechaty/puppet/wecom_pb.js +590 -0
  27. package/dist/esm/out/wechaty/puppet/wecom_pb_service.d.ts +3 -0
  28. package/dist/esm/out/wechaty/puppet/wecom_pb_service.js +3 -0
  29. package/dist/esm/out/wechaty/puppet.openapi.yaml +45 -1
  30. package/dist/esm/out/wechaty/puppet.swagger.json +70 -1
  31. package/dist/esm/out/wechaty/puppet_grpc_pb.d.ts +18 -0
  32. package/dist/esm/out/wechaty/puppet_grpc_pb.js +37 -0
  33. package/dist/esm/out/wechaty/puppet_pb.d.ts +1 -0
  34. package/dist/esm/out/wechaty/puppet_pb.js +2 -0
  35. package/dist/esm/out/wechaty/puppet_pb_service.d.ts +20 -0
  36. package/dist/esm/out/wechaty/puppet_pb_service.js +41 -0
  37. package/dist/esm/proto/wechaty/puppet/wecom.proto +20 -0
  38. package/dist/esm/proto/wechaty/puppet.proto +11 -0
  39. package/dist/esm/src/package-json.js +1 -1
  40. package/dist/esm/tests/puppet-server-impl.d.ts.map +1 -1
  41. package/dist/esm/tests/puppet-server-impl.js +5 -0
  42. package/dist/esm/tests/puppet-server-impl.js.map +1 -1
  43. package/out/wechaty/puppet/wecom_grpc_pb.js +1 -0
  44. package/out/wechaty/puppet/wecom_pb.d.ts +77 -0
  45. package/out/wechaty/puppet/wecom_pb.js +590 -0
  46. package/out/wechaty/puppet/wecom_pb_service.d.ts +3 -0
  47. package/out/wechaty/puppet/wecom_pb_service.js +3 -0
  48. package/out/wechaty/puppet.openapi.yaml +45 -1
  49. package/out/wechaty/puppet.swagger.json +70 -1
  50. package/out/wechaty/puppet_grpc_pb.d.ts +18 -0
  51. package/out/wechaty/puppet_grpc_pb.js +37 -0
  52. package/out/wechaty/puppet_pb.d.ts +1 -0
  53. package/out/wechaty/puppet_pb.js +2 -0
  54. package/out/wechaty/puppet_pb_service.d.ts +20 -0
  55. package/out/wechaty/puppet_pb_service.js +41 -0
  56. package/package.json +1 -1
  57. package/src/package-json.ts +1 -1
@@ -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.71",
6
+ "version": "1.0.72",
7
7
  "contact": {
8
8
  "name": "Wechaty",
9
9
  "url": "https://github.com/wechaty/openapi",
@@ -56,6 +56,38 @@
56
56
  ]
57
57
  }
58
58
  },
59
+ "/contact/externalUserId": {
60
+ "post": {
61
+ "operationId": "Puppet_GetContactExternalUserId",
62
+ "responses": {
63
+ "200": {
64
+ "description": "A successful response.",
65
+ "schema": {
66
+ "$ref": "#/definitions/puppetGetContactExternalUserIdResponse"
67
+ }
68
+ },
69
+ "default": {
70
+ "description": "An unexpected error response.",
71
+ "schema": {
72
+ "$ref": "#/definitions/rpcStatus"
73
+ }
74
+ }
75
+ },
76
+ "parameters": [
77
+ {
78
+ "name": "body",
79
+ "in": "body",
80
+ "required": true,
81
+ "schema": {
82
+ "$ref": "#/definitions/puppetGetContactExternalUserIdRequest"
83
+ }
84
+ }
85
+ ],
86
+ "tags": [
87
+ "Puppet"
88
+ ]
89
+ }
90
+ },
59
91
  "/contact/room/{roomId}/alias/{alias}": {
60
92
  "put": {
61
93
  "operationId": "Puppet_ContactSelfRoomAlias",
@@ -4061,6 +4093,17 @@
4061
4093
  "puppetContactDescriptionResponse": {
4062
4094
  "type": "object"
4063
4095
  },
4096
+ "puppetContactExternalUserIdPair": {
4097
+ "type": "object",
4098
+ "properties": {
4099
+ "contactId": {
4100
+ "type": "string"
4101
+ },
4102
+ "externalUserId": {
4103
+ "type": "string"
4104
+ }
4105
+ }
4106
+ },
4064
4107
  "puppetContactGender": {
4065
4108
  "type": "string",
4066
4109
  "enum": [
@@ -4455,6 +4498,32 @@
4455
4498
  "description": "- FRIENDSHIP_TYPE_UNSPECIFIED: 不明确\n - FRIENDSHIP_TYPE_CONFIRM: 确认——双方互加后触发\n - FRIENDSHIP_TYPE_RECEIVE: 收到——收到好友请求后触发\n - FRIENDSHIP_TYPE_VERIFY: 验证——主动加他人为好友时触发,wxwork里暂无此事件\n - FRIENDSHIP_TYPE_DELETE: 删除——主动删除好友时触发\n - FRIENDSHIP_TYPE_REMOVED: 被删除——被他人删除好友时触发",
4456
4499
  "title": "事件类型"
4457
4500
  },
4501
+ "puppetGetContactExternalUserIdRequest": {
4502
+ "type": "object",
4503
+ "properties": {
4504
+ "contactIds": {
4505
+ "type": "array",
4506
+ "items": {
4507
+ "type": "string"
4508
+ }
4509
+ },
4510
+ "serviceProviderId": {
4511
+ "type": "string"
4512
+ }
4513
+ }
4514
+ },
4515
+ "puppetGetContactExternalUserIdResponse": {
4516
+ "type": "object",
4517
+ "properties": {
4518
+ "contactExternalUserIdParis": {
4519
+ "type": "array",
4520
+ "items": {
4521
+ "type": "object",
4522
+ "$ref": "#/definitions/puppetContactExternalUserIdPair"
4523
+ }
4524
+ }
4525
+ }
4526
+ },
4458
4527
  "puppetGetMessageBroadcastStatusResponse": {
4459
4528
  "type": "object",
4460
4529
  "properties": {
@@ -21,6 +21,7 @@ import * as wechaty_puppet_conversation_pb from "../wechaty/puppet/conversation_
21
21
  import * as wechaty_puppet_post_pb from "../wechaty/puppet/post_pb";
22
22
  import * as wechaty_puppet_moment_pb from "../wechaty/puppet/moment_pb";
23
23
  import * as wechaty_puppet_verify_code_pb from "../wechaty/puppet/verify-code_pb";
24
+ import * as wechaty_puppet_wecom_pb from "../wechaty/puppet/wecom_pb";
24
25
 
25
26
  interface IPuppetService extends grpc.ServiceDefinition<grpc.UntypedServiceImplementation> {
26
27
  start: IPuppetService_IStart;
@@ -119,6 +120,7 @@ interface IPuppetService extends grpc.ServiceDefinition<grpc.UntypedServiceImple
119
120
  postPayload: IPuppetService_IpostPayload;
120
121
  postPayloadSayable: IPuppetService_IpostPayloadSayable;
121
122
  momentVisibleList: IPuppetService_IMomentVisibleList;
123
+ getContactExternalUserId: IPuppetService_IGetContactExternalUserId;
122
124
  download: IPuppetService_IDownload;
123
125
  upload: IPuppetService_IUpload;
124
126
  }
@@ -987,6 +989,15 @@ interface IPuppetService_IMomentVisibleList extends grpc.MethodDefinition<wechat
987
989
  responseSerialize: grpc.serialize<wechaty_puppet_moment_pb.MomentVisibleListResponse>;
988
990
  responseDeserialize: grpc.deserialize<wechaty_puppet_moment_pb.MomentVisibleListResponse>;
989
991
  }
992
+ interface IPuppetService_IGetContactExternalUserId extends grpc.MethodDefinition<wechaty_puppet_wecom_pb.GetContactExternalUserIdRequest, wechaty_puppet_wecom_pb.GetContactExternalUserIdResponse> {
993
+ path: "/wechaty.Puppet/GetContactExternalUserId";
994
+ requestStream: false;
995
+ responseStream: false;
996
+ requestSerialize: grpc.serialize<wechaty_puppet_wecom_pb.GetContactExternalUserIdRequest>;
997
+ requestDeserialize: grpc.deserialize<wechaty_puppet_wecom_pb.GetContactExternalUserIdRequest>;
998
+ responseSerialize: grpc.serialize<wechaty_puppet_wecom_pb.GetContactExternalUserIdResponse>;
999
+ responseDeserialize: grpc.deserialize<wechaty_puppet_wecom_pb.GetContactExternalUserIdResponse>;
1000
+ }
990
1001
  interface IPuppetService_IDownload extends grpc.MethodDefinition<wechaty_puppet_download_upload_pb.DownloadRequest, wechaty_puppet_download_upload_pb.DownloadResponse> {
991
1002
  path: "/wechaty.Puppet/Download";
992
1003
  requestStream: false;
@@ -1105,6 +1116,7 @@ export interface IPuppetServer extends grpc.UntypedServiceImplementation {
1105
1116
  postPayload: grpc.handleUnaryCall<wechaty_puppet_post_pb.PostPayloadRequest, wechaty_puppet_post_pb.PostPayloadResponse>;
1106
1117
  postPayloadSayable: grpc.handleUnaryCall<wechaty_puppet_post_pb.PostPayloadSayableRequest, wechaty_puppet_post_pb.PostPayloadSayableResponse>;
1107
1118
  momentVisibleList: grpc.handleUnaryCall<wechaty_puppet_moment_pb.MomentVisibleListRequest, wechaty_puppet_moment_pb.MomentVisibleListResponse>;
1119
+ getContactExternalUserId: grpc.handleUnaryCall<wechaty_puppet_wecom_pb.GetContactExternalUserIdRequest, wechaty_puppet_wecom_pb.GetContactExternalUserIdResponse>;
1108
1120
  download: grpc.handleServerStreamingCall<wechaty_puppet_download_upload_pb.DownloadRequest, wechaty_puppet_download_upload_pb.DownloadResponse>;
1109
1121
  upload: grpc.handleClientStreamingCall<wechaty_puppet_download_upload_pb.UploadRequest, wechaty_puppet_download_upload_pb.UploadResponse>;
1110
1122
  }
@@ -1397,6 +1409,9 @@ export interface IPuppetClient {
1397
1409
  momentVisibleList(request: wechaty_puppet_moment_pb.MomentVisibleListRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_moment_pb.MomentVisibleListResponse) => void): grpc.ClientUnaryCall;
1398
1410
  momentVisibleList(request: wechaty_puppet_moment_pb.MomentVisibleListRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_moment_pb.MomentVisibleListResponse) => void): grpc.ClientUnaryCall;
1399
1411
  momentVisibleList(request: wechaty_puppet_moment_pb.MomentVisibleListRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_moment_pb.MomentVisibleListResponse) => void): grpc.ClientUnaryCall;
1412
+ getContactExternalUserId(request: wechaty_puppet_wecom_pb.GetContactExternalUserIdRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_wecom_pb.GetContactExternalUserIdResponse) => void): grpc.ClientUnaryCall;
1413
+ getContactExternalUserId(request: wechaty_puppet_wecom_pb.GetContactExternalUserIdRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_wecom_pb.GetContactExternalUserIdResponse) => void): grpc.ClientUnaryCall;
1414
+ getContactExternalUserId(request: wechaty_puppet_wecom_pb.GetContactExternalUserIdRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_wecom_pb.GetContactExternalUserIdResponse) => void): grpc.ClientUnaryCall;
1400
1415
  download(request: wechaty_puppet_download_upload_pb.DownloadRequest, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<wechaty_puppet_download_upload_pb.DownloadResponse>;
1401
1416
  download(request: wechaty_puppet_download_upload_pb.DownloadRequest, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<wechaty_puppet_download_upload_pb.DownloadResponse>;
1402
1417
  upload(callback: (error: grpc.ServiceError | null, response: wechaty_puppet_download_upload_pb.UploadResponse) => void): grpc.ClientWritableStream<wechaty_puppet_download_upload_pb.UploadRequest>;
@@ -1694,6 +1709,9 @@ export class PuppetClient extends grpc.Client implements IPuppetClient {
1694
1709
  public momentVisibleList(request: wechaty_puppet_moment_pb.MomentVisibleListRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_moment_pb.MomentVisibleListResponse) => void): grpc.ClientUnaryCall;
1695
1710
  public momentVisibleList(request: wechaty_puppet_moment_pb.MomentVisibleListRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_moment_pb.MomentVisibleListResponse) => void): grpc.ClientUnaryCall;
1696
1711
  public momentVisibleList(request: wechaty_puppet_moment_pb.MomentVisibleListRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_moment_pb.MomentVisibleListResponse) => void): grpc.ClientUnaryCall;
1712
+ public getContactExternalUserId(request: wechaty_puppet_wecom_pb.GetContactExternalUserIdRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_wecom_pb.GetContactExternalUserIdResponse) => void): grpc.ClientUnaryCall;
1713
+ public getContactExternalUserId(request: wechaty_puppet_wecom_pb.GetContactExternalUserIdRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_wecom_pb.GetContactExternalUserIdResponse) => void): grpc.ClientUnaryCall;
1714
+ public getContactExternalUserId(request: wechaty_puppet_wecom_pb.GetContactExternalUserIdRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_wecom_pb.GetContactExternalUserIdResponse) => void): grpc.ClientUnaryCall;
1697
1715
  public download(request: wechaty_puppet_download_upload_pb.DownloadRequest, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<wechaty_puppet_download_upload_pb.DownloadResponse>;
1698
1716
  public download(request: wechaty_puppet_download_upload_pb.DownloadRequest, metadata?: grpc.Metadata, options?: Partial<grpc.CallOptions>): grpc.ClientReadableStream<wechaty_puppet_download_upload_pb.DownloadResponse>;
1699
1717
  public upload(callback: (error: grpc.ServiceError | null, response: wechaty_puppet_download_upload_pb.UploadResponse) => void): grpc.ClientWritableStream<wechaty_puppet_download_upload_pb.UploadRequest>;
@@ -30,6 +30,7 @@ var wechaty_puppet_conversation_pb = require('../wechaty/puppet/conversation_pb.
30
30
  var wechaty_puppet_post_pb = require('../wechaty/puppet/post_pb.js');
31
31
  var wechaty_puppet_moment_pb = require('../wechaty/puppet/moment_pb.js');
32
32
  var wechaty_puppet_verify$code_pb = require('../wechaty/puppet/verify-code_pb.js');
33
+ var wechaty_puppet_wecom_pb = require('../wechaty/puppet/wecom_pb.js');
33
34
 
34
35
  function serialize_wechaty_puppet_CancelVerifyCodeRequest(arg) {
35
36
  if (!(arg instanceof wechaty_puppet_verify$code_pb.CancelVerifyCodeRequest)) {
@@ -669,6 +670,28 @@ function deserialize_wechaty_puppet_FriendshipSearchPhoneResponse(buffer_arg) {
669
670
  return wechaty_puppet_friendship_pb.FriendshipSearchPhoneResponse.deserializeBinary(new Uint8Array(buffer_arg));
670
671
  }
671
672
 
673
+ function serialize_wechaty_puppet_GetContactExternalUserIdRequest(arg) {
674
+ if (!(arg instanceof wechaty_puppet_wecom_pb.GetContactExternalUserIdRequest)) {
675
+ throw new Error('Expected argument of type wechaty.puppet.GetContactExternalUserIdRequest');
676
+ }
677
+ return Buffer.from(arg.serializeBinary());
678
+ }
679
+
680
+ function deserialize_wechaty_puppet_GetContactExternalUserIdRequest(buffer_arg) {
681
+ return wechaty_puppet_wecom_pb.GetContactExternalUserIdRequest.deserializeBinary(new Uint8Array(buffer_arg));
682
+ }
683
+
684
+ function serialize_wechaty_puppet_GetContactExternalUserIdResponse(arg) {
685
+ if (!(arg instanceof wechaty_puppet_wecom_pb.GetContactExternalUserIdResponse)) {
686
+ throw new Error('Expected argument of type wechaty.puppet.GetContactExternalUserIdResponse');
687
+ }
688
+ return Buffer.from(arg.serializeBinary());
689
+ }
690
+
691
+ function deserialize_wechaty_puppet_GetContactExternalUserIdResponse(buffer_arg) {
692
+ return wechaty_puppet_wecom_pb.GetContactExternalUserIdResponse.deserializeBinary(new Uint8Array(buffer_arg));
693
+ }
694
+
672
695
  function serialize_wechaty_puppet_GetMessageBroadcastStatusRequest(arg) {
673
696
  if (!(arg instanceof wechaty_puppet_message_pb.GetMessageBroadcastStatusRequest)) {
674
697
  throw new Error('Expected argument of type wechaty.puppet.GetMessageBroadcastStatusRequest');
@@ -3252,6 +3275,20 @@ momentVisibleList: {
3252
3275
  responseDeserialize: deserialize_wechaty_puppet_MomentVisibleListResponse,
3253
3276
  },
3254
3277
  // *
3278
+ // Wecom
3279
+ //
3280
+ getContactExternalUserId: {
3281
+ path: '/wechaty.Puppet/GetContactExternalUserId',
3282
+ requestStream: false,
3283
+ responseStream: false,
3284
+ requestType: wechaty_puppet_wecom_pb.GetContactExternalUserIdRequest,
3285
+ responseType: wechaty_puppet_wecom_pb.GetContactExternalUserIdResponse,
3286
+ requestSerialize: serialize_wechaty_puppet_GetContactExternalUserIdRequest,
3287
+ requestDeserialize: deserialize_wechaty_puppet_GetContactExternalUserIdRequest,
3288
+ responseSerialize: serialize_wechaty_puppet_GetContactExternalUserIdResponse,
3289
+ responseDeserialize: deserialize_wechaty_puppet_GetContactExternalUserIdResponse,
3290
+ },
3291
+ // *
3255
3292
  // File/Blob download & upload
3256
3293
  download: {
3257
3294
  path: '/wechaty.Puppet/Download',
@@ -18,4 +18,5 @@ import * as wechaty_puppet_conversation_pb from "../wechaty/puppet/conversation_
18
18
  import * as wechaty_puppet_post_pb from "../wechaty/puppet/post_pb";
19
19
  import * as wechaty_puppet_moment_pb from "../wechaty/puppet/moment_pb";
20
20
  import * as wechaty_puppet_verify_code_pb from "../wechaty/puppet/verify-code_pb";
21
+ import * as wechaty_puppet_wecom_pb from "../wechaty/puppet/wecom_pb";
21
22
 
@@ -47,3 +47,5 @@ var wechaty_puppet_moment_pb = require('../wechaty/puppet/moment_pb.js');
47
47
  goog.object.extend(proto, wechaty_puppet_moment_pb);
48
48
  var wechaty_puppet_verify$code_pb = require('../wechaty/puppet/verify-code_pb.js');
49
49
  goog.object.extend(proto, wechaty_puppet_verify$code_pb);
50
+ var wechaty_puppet_wecom_pb = require('../wechaty/puppet/wecom_pb.js');
51
+ goog.object.extend(proto, wechaty_puppet_wecom_pb);
@@ -16,6 +16,7 @@ import * as wechaty_puppet_conversation_pb from "../wechaty/puppet/conversation_
16
16
  import * as wechaty_puppet_post_pb from "../wechaty/puppet/post_pb";
17
17
  import * as wechaty_puppet_moment_pb from "../wechaty/puppet/moment_pb";
18
18
  import * as wechaty_puppet_verify_code_pb from "../wechaty/puppet/verify-code_pb";
19
+ import * as wechaty_puppet_wecom_pb from "../wechaty/puppet/wecom_pb";
19
20
  import {grpc} from "@improbable-eng/grpc-web";
20
21
 
21
22
  type PuppetStart = {
@@ -882,6 +883,15 @@ type PuppetMomentVisibleList = {
882
883
  readonly responseType: typeof wechaty_puppet_moment_pb.MomentVisibleListResponse;
883
884
  };
884
885
 
886
+ type PuppetGetContactExternalUserId = {
887
+ readonly methodName: string;
888
+ readonly service: typeof Puppet;
889
+ readonly requestStream: false;
890
+ readonly responseStream: false;
891
+ readonly requestType: typeof wechaty_puppet_wecom_pb.GetContactExternalUserIdRequest;
892
+ readonly responseType: typeof wechaty_puppet_wecom_pb.GetContactExternalUserIdResponse;
893
+ };
894
+
885
895
  type PuppetDownload = {
886
896
  readonly methodName: string;
887
897
  readonly service: typeof Puppet;
@@ -998,6 +1008,7 @@ export class Puppet {
998
1008
  static readonly postPayload: PuppetpostPayload;
999
1009
  static readonly postPayloadSayable: PuppetpostPayloadSayable;
1000
1010
  static readonly MomentVisibleList: PuppetMomentVisibleList;
1011
+ static readonly GetContactExternalUserId: PuppetGetContactExternalUserId;
1001
1012
  static readonly Download: PuppetDownload;
1002
1013
  static readonly Upload: PuppetUpload;
1003
1014
  }
@@ -1890,6 +1901,15 @@ export class PuppetClient {
1890
1901
  requestMessage: wechaty_puppet_moment_pb.MomentVisibleListRequest,
1891
1902
  callback: (error: ServiceError|null, responseMessage: wechaty_puppet_moment_pb.MomentVisibleListResponse|null) => void
1892
1903
  ): UnaryResponse;
1904
+ getContactExternalUserId(
1905
+ requestMessage: wechaty_puppet_wecom_pb.GetContactExternalUserIdRequest,
1906
+ metadata: grpc.Metadata,
1907
+ callback: (error: ServiceError|null, responseMessage: wechaty_puppet_wecom_pb.GetContactExternalUserIdResponse|null) => void
1908
+ ): UnaryResponse;
1909
+ getContactExternalUserId(
1910
+ requestMessage: wechaty_puppet_wecom_pb.GetContactExternalUserIdRequest,
1911
+ callback: (error: ServiceError|null, responseMessage: wechaty_puppet_wecom_pb.GetContactExternalUserIdResponse|null) => void
1912
+ ): UnaryResponse;
1893
1913
  download(requestMessage: wechaty_puppet_download_upload_pb.DownloadRequest, metadata?: grpc.Metadata): ResponseStream<wechaty_puppet_download_upload_pb.DownloadResponse>;
1894
1914
  upload(metadata?: grpc.Metadata): RequestStream<wechaty_puppet_download_upload_pb.UploadRequest>;
1895
1915
  }
@@ -16,6 +16,7 @@ var wechaty_puppet_conversation_pb = require("../wechaty/puppet/conversation_pb"
16
16
  var wechaty_puppet_post_pb = require("../wechaty/puppet/post_pb");
17
17
  var wechaty_puppet_moment_pb = require("../wechaty/puppet/moment_pb");
18
18
  var wechaty_puppet_verify_code_pb = require("../wechaty/puppet/verify-code_pb");
19
+ var wechaty_puppet_wecom_pb = require("../wechaty/puppet/wecom_pb");
19
20
  var grpc = require("@improbable-eng/grpc-web").grpc;
20
21
 
21
22
  var Puppet = (function () {
@@ -888,6 +889,15 @@ Puppet.MomentVisibleList = {
888
889
  responseType: wechaty_puppet_moment_pb.MomentVisibleListResponse
889
890
  };
890
891
 
892
+ Puppet.GetContactExternalUserId = {
893
+ methodName: "GetContactExternalUserId",
894
+ service: Puppet,
895
+ requestStream: false,
896
+ responseStream: false,
897
+ requestType: wechaty_puppet_wecom_pb.GetContactExternalUserIdRequest,
898
+ responseType: wechaty_puppet_wecom_pb.GetContactExternalUserIdResponse
899
+ };
900
+
891
901
  Puppet.Download = {
892
902
  methodName: "Download",
893
903
  service: Puppet,
@@ -3897,6 +3907,37 @@ PuppetClient.prototype.momentVisibleList = function momentVisibleList(requestMes
3897
3907
  };
3898
3908
  };
3899
3909
 
3910
+ PuppetClient.prototype.getContactExternalUserId = function getContactExternalUserId(requestMessage, metadata, callback) {
3911
+ if (arguments.length === 2) {
3912
+ callback = arguments[1];
3913
+ }
3914
+ var client = grpc.unary(Puppet.GetContactExternalUserId, {
3915
+ request: requestMessage,
3916
+ host: this.serviceHost,
3917
+ metadata: metadata,
3918
+ transport: this.options.transport,
3919
+ debug: this.options.debug,
3920
+ onEnd: function (response) {
3921
+ if (callback) {
3922
+ if (response.status !== grpc.Code.OK) {
3923
+ var err = new Error(response.statusMessage);
3924
+ err.code = response.status;
3925
+ err.metadata = response.trailers;
3926
+ callback(err, null);
3927
+ } else {
3928
+ callback(null, response.message);
3929
+ }
3930
+ }
3931
+ }
3932
+ });
3933
+ return {
3934
+ cancel: function () {
3935
+ callback = null;
3936
+ client.close();
3937
+ }
3938
+ };
3939
+ };
3940
+
3900
3941
  PuppetClient.prototype.download = function download(requestMessage, metadata) {
3901
3942
  var listeners = {
3902
3943
  data: [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juzi/wechaty-grpc",
3
- "version": "1.0.71",
3
+ "version": "1.0.72",
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.71",
7
+ "version": "1.0.72",
8
8
  "description": "gRPC for Wechaty",
9
9
  "type": "module",
10
10
  "exports": {