@juzi/wechaty-grpc 1.0.67 → 1.0.69

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 (59) 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/chat-history_grpc_pb.js +1 -0
  4. package/dist/cjs/out/wechaty/puppet/chat-history_pb.d.ts +121 -0
  5. package/dist/cjs/out/wechaty/puppet/chat-history_pb.js +839 -0
  6. package/dist/cjs/out/wechaty/puppet/chat-history_pb_service.d.ts +3 -0
  7. package/dist/cjs/out/wechaty/puppet/chat-history_pb_service.js +3 -0
  8. package/dist/cjs/out/wechaty/puppet/message_pb.d.ts +49 -0
  9. package/dist/cjs/out/wechaty/puppet/message_pb.js +394 -2
  10. package/dist/cjs/out/wechaty/puppet.openapi.yaml +102 -3
  11. package/dist/cjs/out/wechaty/puppet.swagger.json +138 -3
  12. package/dist/cjs/out/wechaty/puppet_grpc_pb.d.ts +17 -0
  13. package/dist/cjs/out/wechaty/puppet_grpc_pb.js +33 -0
  14. package/dist/cjs/out/wechaty/puppet_pb_service.d.ts +19 -0
  15. package/dist/cjs/out/wechaty/puppet_pb_service.js +40 -0
  16. package/dist/cjs/proto/wechaty/puppet/chat-history.proto +42 -0
  17. package/dist/cjs/proto/wechaty/puppet/message.proto +11 -1
  18. package/dist/cjs/proto/wechaty/puppet.proto +5 -0
  19. package/dist/cjs/src/package-json.js +1 -1
  20. package/dist/cjs/tests/puppet-server-impl.d.ts.map +1 -1
  21. package/dist/cjs/tests/puppet-server-impl.js +5 -0
  22. package/dist/cjs/tests/puppet-server-impl.js.map +1 -1
  23. package/dist/esm/commonjs/generated/puppet.cjs +1 -0
  24. package/dist/esm/commonjs/generated/puppet.cjs.d.ts +1 -0
  25. package/dist/esm/out/wechaty/puppet/chat-history_grpc_pb.js +1 -0
  26. package/dist/esm/out/wechaty/puppet/chat-history_pb.d.ts +121 -0
  27. package/dist/esm/out/wechaty/puppet/chat-history_pb.js +839 -0
  28. package/dist/esm/out/wechaty/puppet/chat-history_pb_service.d.ts +3 -0
  29. package/dist/esm/out/wechaty/puppet/chat-history_pb_service.js +3 -0
  30. package/dist/esm/out/wechaty/puppet/message_pb.d.ts +49 -0
  31. package/dist/esm/out/wechaty/puppet/message_pb.js +394 -2
  32. package/dist/esm/out/wechaty/puppet.openapi.yaml +102 -3
  33. package/dist/esm/out/wechaty/puppet.swagger.json +138 -3
  34. package/dist/esm/out/wechaty/puppet_grpc_pb.d.ts +17 -0
  35. package/dist/esm/out/wechaty/puppet_grpc_pb.js +33 -0
  36. package/dist/esm/out/wechaty/puppet_pb_service.d.ts +19 -0
  37. package/dist/esm/out/wechaty/puppet_pb_service.js +40 -0
  38. package/dist/esm/proto/wechaty/puppet/chat-history.proto +42 -0
  39. package/dist/esm/proto/wechaty/puppet/message.proto +11 -1
  40. package/dist/esm/proto/wechaty/puppet.proto +5 -0
  41. package/dist/esm/src/package-json.js +1 -1
  42. package/dist/esm/tests/puppet-server-impl.d.ts.map +1 -1
  43. package/dist/esm/tests/puppet-server-impl.js +5 -0
  44. package/dist/esm/tests/puppet-server-impl.js.map +1 -1
  45. package/out/wechaty/puppet/chat-history_grpc_pb.js +1 -0
  46. package/out/wechaty/puppet/chat-history_pb.d.ts +121 -0
  47. package/out/wechaty/puppet/chat-history_pb.js +839 -0
  48. package/out/wechaty/puppet/chat-history_pb_service.d.ts +3 -0
  49. package/out/wechaty/puppet/chat-history_pb_service.js +3 -0
  50. package/out/wechaty/puppet/message_pb.d.ts +49 -0
  51. package/out/wechaty/puppet/message_pb.js +394 -2
  52. package/out/wechaty/puppet.openapi.yaml +102 -3
  53. package/out/wechaty/puppet.swagger.json +138 -3
  54. package/out/wechaty/puppet_grpc_pb.d.ts +17 -0
  55. package/out/wechaty/puppet_grpc_pb.js +33 -0
  56. package/out/wechaty/puppet_pb_service.d.ts +19 -0
  57. package/out/wechaty/puppet_pb_service.js +40 -0
  58. package/package.json +1 -1
  59. 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.67",
6
+ "version": "1.0.69",
7
7
  "contact": {
8
8
  "name": "Wechaty",
9
9
  "url": "https://github.com/wechaty/openapi",
@@ -867,10 +867,21 @@
867
867
  },
868
868
  {
869
869
  "name": "messageId",
870
- "description": "要转发的消息id",
870
+ "description": "@deprecated: use message_ids instead.\n\n要转发的消息id",
871
871
  "in": "path",
872
872
  "required": true,
873
873
  "type": "string"
874
+ },
875
+ {
876
+ "name": "messageIds",
877
+ "description": "要合并转发的消息id列表",
878
+ "in": "query",
879
+ "required": false,
880
+ "type": "array",
881
+ "items": {
882
+ "type": "string"
883
+ },
884
+ "collectionFormat": "multi"
874
885
  }
875
886
  ],
876
887
  "tags": [
@@ -1692,6 +1703,36 @@
1692
1703
  ]
1693
1704
  }
1694
1705
  },
1706
+ "/message/{id}/chat-history": {
1707
+ "get": {
1708
+ "operationId": "Puppet_MessageChatHistory",
1709
+ "responses": {
1710
+ "200": {
1711
+ "description": "A successful response.",
1712
+ "schema": {
1713
+ "$ref": "#/definitions/puppetMessageChatHistoryResponse"
1714
+ }
1715
+ },
1716
+ "default": {
1717
+ "description": "An unexpected error response.",
1718
+ "schema": {
1719
+ "$ref": "#/definitions/rpcStatus"
1720
+ }
1721
+ }
1722
+ },
1723
+ "parameters": [
1724
+ {
1725
+ "name": "id",
1726
+ "in": "path",
1727
+ "required": true,
1728
+ "type": "string"
1729
+ }
1730
+ ],
1731
+ "tags": [
1732
+ "Puppet"
1733
+ ]
1734
+ }
1735
+ },
1695
1736
  "/message/{id}/contact": {
1696
1737
  "get": {
1697
1738
  "operationId": "Puppet_MessageContact",
@@ -1940,7 +1981,7 @@
1940
1981
  "parameters": [
1941
1982
  {
1942
1983
  "name": "messageId",
1943
- "description": "要转发的消息id",
1984
+ "description": "@deprecated: use message_ids instead.\n\n要转发的消息id",
1944
1985
  "in": "path",
1945
1986
  "required": true,
1946
1987
  "type": "string"
@@ -1951,6 +1992,17 @@
1951
1992
  "in": "path",
1952
1993
  "required": true,
1953
1994
  "type": "string"
1995
+ },
1996
+ {
1997
+ "name": "messageIds",
1998
+ "description": "要合并转发的消息id列表",
1999
+ "in": "query",
2000
+ "required": false,
2001
+ "type": "array",
2002
+ "items": {
2003
+ "type": "string"
2004
+ },
2005
+ "collectionFormat": "multi"
1954
2006
  }
1955
2007
  ],
1956
2008
  "tags": [
@@ -3842,6 +3894,77 @@
3842
3894
  }
3843
3895
  }
3844
3896
  },
3897
+ "puppetChatHistoryContent": {
3898
+ "type": "object",
3899
+ "properties": {
3900
+ "type": {
3901
+ "$ref": "#/definitions/puppetChatHistoryContentType"
3902
+ },
3903
+ "text": {
3904
+ "type": "string"
3905
+ },
3906
+ "fileBox": {
3907
+ "type": "string"
3908
+ },
3909
+ "location": {
3910
+ "$ref": "#/definitions/puppetLocationPayload"
3911
+ },
3912
+ "urlLink": {
3913
+ "$ref": "#/definitions/puppetUrlLinkPayload"
3914
+ },
3915
+ "miniProgram": {
3916
+ "$ref": "#/definitions/puppetMiniProgramPayload"
3917
+ },
3918
+ "channel": {
3919
+ "$ref": "#/definitions/puppetChannelPayload"
3920
+ },
3921
+ "chatHistory": {
3922
+ "type": "array",
3923
+ "items": {
3924
+ "type": "object",
3925
+ "$ref": "#/definitions/puppetChatHistoryPayload"
3926
+ }
3927
+ }
3928
+ }
3929
+ },
3930
+ "puppetChatHistoryContentType": {
3931
+ "type": "string",
3932
+ "enum": [
3933
+ "TEXT",
3934
+ "FILE",
3935
+ "LOCATION",
3936
+ "URL",
3937
+ "MINI_PROGRAM",
3938
+ "CHANNEL",
3939
+ "CHAT_HISTORY"
3940
+ ],
3941
+ "default": "TEXT"
3942
+ },
3943
+ "puppetChatHistoryPayload": {
3944
+ "type": "object",
3945
+ "properties": {
3946
+ "type": {
3947
+ "type": "integer",
3948
+ "format": "int32"
3949
+ },
3950
+ "avatar": {
3951
+ "type": "string"
3952
+ },
3953
+ "senderName": {
3954
+ "type": "string"
3955
+ },
3956
+ "corpName": {
3957
+ "type": "string"
3958
+ },
3959
+ "time": {
3960
+ "type": "integer",
3961
+ "format": "int32"
3962
+ },
3963
+ "message": {
3964
+ "$ref": "#/definitions/puppetChatHistoryContent"
3965
+ }
3966
+ }
3967
+ },
3845
3968
  "puppetContactAliasResponse": {
3846
3969
  "type": "object",
3847
3970
  "properties": {
@@ -4346,6 +4469,18 @@
4346
4469
  }
4347
4470
  }
4348
4471
  },
4472
+ "puppetMessageChatHistoryResponse": {
4473
+ "type": "object",
4474
+ "properties": {
4475
+ "chatHistoryList": {
4476
+ "type": "array",
4477
+ "items": {
4478
+ "type": "object",
4479
+ "$ref": "#/definitions/puppetChatHistoryPayload"
4480
+ }
4481
+ }
4482
+ }
4483
+ },
4349
4484
  "puppetMessageContactResponse": {
4350
4485
  "type": "object",
4351
4486
  "properties": {
@@ -63,6 +63,7 @@ interface IPuppetService extends grpc.ServiceDefinition<grpc.UntypedServiceImple
63
63
  messageUrl: IPuppetService_IMessageUrl;
64
64
  messageChannel: IPuppetService_IMessageChannel;
65
65
  messageCallRecord: IPuppetService_IMessageCallRecord;
66
+ messageChatHistory: IPuppetService_IMessageChatHistory;
66
67
  messageRecall: IPuppetService_IMessageRecall;
67
68
  messageForward: IPuppetService_IMessageForward;
68
69
  messageLocation: IPuppetService_IMessageLocation;
@@ -480,6 +481,15 @@ interface IPuppetService_IMessageCallRecord extends grpc.MethodDefinition<wechat
480
481
  responseSerialize: grpc.serialize<wechaty_puppet_message_pb.MessageCallRecordResponse>;
481
482
  responseDeserialize: grpc.deserialize<wechaty_puppet_message_pb.MessageCallRecordResponse>;
482
483
  }
484
+ interface IPuppetService_IMessageChatHistory extends grpc.MethodDefinition<wechaty_puppet_message_pb.MessageChatHistoryRequest, wechaty_puppet_message_pb.MessageChatHistoryResponse> {
485
+ path: "/wechaty.Puppet/MessageChatHistory";
486
+ requestStream: false;
487
+ responseStream: false;
488
+ requestSerialize: grpc.serialize<wechaty_puppet_message_pb.MessageChatHistoryRequest>;
489
+ requestDeserialize: grpc.deserialize<wechaty_puppet_message_pb.MessageChatHistoryRequest>;
490
+ responseSerialize: grpc.serialize<wechaty_puppet_message_pb.MessageChatHistoryResponse>;
491
+ responseDeserialize: grpc.deserialize<wechaty_puppet_message_pb.MessageChatHistoryResponse>;
492
+ }
483
493
  interface IPuppetService_IMessageRecall extends grpc.MethodDefinition<wechaty_puppet_message_pb.MessageRecallRequest, wechaty_puppet_message_pb.MessageRecallResponse> {
484
494
  path: "/wechaty.Puppet/MessageRecall";
485
495
  requestStream: false;
@@ -1019,6 +1029,7 @@ export interface IPuppetServer extends grpc.UntypedServiceImplementation {
1019
1029
  messageUrl: grpc.handleUnaryCall<wechaty_puppet_message_pb.MessageUrlRequest, wechaty_puppet_message_pb.MessageUrlResponse>;
1020
1030
  messageChannel: grpc.handleUnaryCall<wechaty_puppet_message_pb.MessageChannelRequest, wechaty_puppet_message_pb.MessageChannelResponse>;
1021
1031
  messageCallRecord: grpc.handleUnaryCall<wechaty_puppet_message_pb.MessageCallRecordRequest, wechaty_puppet_message_pb.MessageCallRecordResponse>;
1032
+ messageChatHistory: grpc.handleUnaryCall<wechaty_puppet_message_pb.MessageChatHistoryRequest, wechaty_puppet_message_pb.MessageChatHistoryResponse>;
1022
1033
  messageRecall: grpc.handleUnaryCall<wechaty_puppet_message_pb.MessageRecallRequest, wechaty_puppet_message_pb.MessageRecallResponse>;
1023
1034
  messageForward: grpc.handleUnaryCall<wechaty_puppet_message_pb.MessageForwardRequest, wechaty_puppet_message_pb.MessageForwardResponse>;
1024
1035
  messageLocation: grpc.handleUnaryCall<wechaty_puppet_message_pb.MessageLocationRequest, wechaty_puppet_message_pb.MessageLocationResponse>;
@@ -1196,6 +1207,9 @@ export interface IPuppetClient {
1196
1207
  messageCallRecord(request: wechaty_puppet_message_pb.MessageCallRecordRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageCallRecordResponse) => void): grpc.ClientUnaryCall;
1197
1208
  messageCallRecord(request: wechaty_puppet_message_pb.MessageCallRecordRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageCallRecordResponse) => void): grpc.ClientUnaryCall;
1198
1209
  messageCallRecord(request: wechaty_puppet_message_pb.MessageCallRecordRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageCallRecordResponse) => void): grpc.ClientUnaryCall;
1210
+ messageChatHistory(request: wechaty_puppet_message_pb.MessageChatHistoryRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageChatHistoryResponse) => void): grpc.ClientUnaryCall;
1211
+ messageChatHistory(request: wechaty_puppet_message_pb.MessageChatHistoryRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageChatHistoryResponse) => void): grpc.ClientUnaryCall;
1212
+ messageChatHistory(request: wechaty_puppet_message_pb.MessageChatHistoryRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageChatHistoryResponse) => void): grpc.ClientUnaryCall;
1199
1213
  messageRecall(request: wechaty_puppet_message_pb.MessageRecallRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageRecallResponse) => void): grpc.ClientUnaryCall;
1200
1214
  messageRecall(request: wechaty_puppet_message_pb.MessageRecallRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageRecallResponse) => void): grpc.ClientUnaryCall;
1201
1215
  messageRecall(request: wechaty_puppet_message_pb.MessageRecallRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageRecallResponse) => void): grpc.ClientUnaryCall;
@@ -1484,6 +1498,9 @@ export class PuppetClient extends grpc.Client implements IPuppetClient {
1484
1498
  public messageCallRecord(request: wechaty_puppet_message_pb.MessageCallRecordRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageCallRecordResponse) => void): grpc.ClientUnaryCall;
1485
1499
  public messageCallRecord(request: wechaty_puppet_message_pb.MessageCallRecordRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageCallRecordResponse) => void): grpc.ClientUnaryCall;
1486
1500
  public messageCallRecord(request: wechaty_puppet_message_pb.MessageCallRecordRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageCallRecordResponse) => void): grpc.ClientUnaryCall;
1501
+ public messageChatHistory(request: wechaty_puppet_message_pb.MessageChatHistoryRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageChatHistoryResponse) => void): grpc.ClientUnaryCall;
1502
+ public messageChatHistory(request: wechaty_puppet_message_pb.MessageChatHistoryRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageChatHistoryResponse) => void): grpc.ClientUnaryCall;
1503
+ public messageChatHistory(request: wechaty_puppet_message_pb.MessageChatHistoryRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageChatHistoryResponse) => void): grpc.ClientUnaryCall;
1487
1504
  public messageRecall(request: wechaty_puppet_message_pb.MessageRecallRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageRecallResponse) => void): grpc.ClientUnaryCall;
1488
1505
  public messageRecall(request: wechaty_puppet_message_pb.MessageRecallRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageRecallResponse) => void): grpc.ClientUnaryCall;
1489
1506
  public messageRecall(request: wechaty_puppet_message_pb.MessageRecallRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageRecallResponse) => void): grpc.ClientUnaryCall;
@@ -735,6 +735,28 @@ function deserialize_wechaty_puppet_MessageChannelResponse(buffer_arg) {
735
735
  return wechaty_puppet_message_pb.MessageChannelResponse.deserializeBinary(new Uint8Array(buffer_arg));
736
736
  }
737
737
 
738
+ function serialize_wechaty_puppet_MessageChatHistoryRequest(arg) {
739
+ if (!(arg instanceof wechaty_puppet_message_pb.MessageChatHistoryRequest)) {
740
+ throw new Error('Expected argument of type wechaty.puppet.MessageChatHistoryRequest');
741
+ }
742
+ return Buffer.from(arg.serializeBinary());
743
+ }
744
+
745
+ function deserialize_wechaty_puppet_MessageChatHistoryRequest(buffer_arg) {
746
+ return wechaty_puppet_message_pb.MessageChatHistoryRequest.deserializeBinary(new Uint8Array(buffer_arg));
747
+ }
748
+
749
+ function serialize_wechaty_puppet_MessageChatHistoryResponse(arg) {
750
+ if (!(arg instanceof wechaty_puppet_message_pb.MessageChatHistoryResponse)) {
751
+ throw new Error('Expected argument of type wechaty.puppet.MessageChatHistoryResponse');
752
+ }
753
+ return Buffer.from(arg.serializeBinary());
754
+ }
755
+
756
+ function deserialize_wechaty_puppet_MessageChatHistoryResponse(buffer_arg) {
757
+ return wechaty_puppet_message_pb.MessageChatHistoryResponse.deserializeBinary(new Uint8Array(buffer_arg));
758
+ }
759
+
738
760
  function serialize_wechaty_puppet_MessageContactRequest(arg) {
739
761
  if (!(arg instanceof wechaty_puppet_message_pb.MessageContactRequest)) {
740
762
  throw new Error('Expected argument of type wechaty.puppet.MessageContactRequest');
@@ -2542,6 +2564,17 @@ messageFile: {
2542
2564
  responseSerialize: serialize_wechaty_puppet_MessageCallRecordResponse,
2543
2565
  responseDeserialize: deserialize_wechaty_puppet_MessageCallRecordResponse,
2544
2566
  },
2567
+ messageChatHistory: {
2568
+ path: '/wechaty.Puppet/MessageChatHistory',
2569
+ requestStream: false,
2570
+ responseStream: false,
2571
+ requestType: wechaty_puppet_message_pb.MessageChatHistoryRequest,
2572
+ responseType: wechaty_puppet_message_pb.MessageChatHistoryResponse,
2573
+ requestSerialize: serialize_wechaty_puppet_MessageChatHistoryRequest,
2574
+ requestDeserialize: deserialize_wechaty_puppet_MessageChatHistoryRequest,
2575
+ responseSerialize: serialize_wechaty_puppet_MessageChatHistoryResponse,
2576
+ responseDeserialize: deserialize_wechaty_puppet_MessageChatHistoryResponse,
2577
+ },
2545
2578
  messageRecall: {
2546
2579
  path: '/wechaty.Puppet/MessageRecall',
2547
2580
  requestStream: false,
@@ -378,6 +378,15 @@ type PuppetMessageCallRecord = {
378
378
  readonly responseType: typeof wechaty_puppet_message_pb.MessageCallRecordResponse;
379
379
  };
380
380
 
381
+ type PuppetMessageChatHistory = {
382
+ readonly methodName: string;
383
+ readonly service: typeof Puppet;
384
+ readonly requestStream: false;
385
+ readonly responseStream: false;
386
+ readonly requestType: typeof wechaty_puppet_message_pb.MessageChatHistoryRequest;
387
+ readonly responseType: typeof wechaty_puppet_message_pb.MessageChatHistoryResponse;
388
+ };
389
+
381
390
  type PuppetMessageRecall = {
382
391
  readonly methodName: string;
383
392
  readonly service: typeof Puppet;
@@ -915,6 +924,7 @@ export class Puppet {
915
924
  static readonly MessageUrl: PuppetMessageUrl;
916
925
  static readonly MessageChannel: PuppetMessageChannel;
917
926
  static readonly MessageCallRecord: PuppetMessageCallRecord;
927
+ static readonly MessageChatHistory: PuppetMessageChatHistory;
918
928
  static readonly MessageRecall: PuppetMessageRecall;
919
929
  static readonly MessageForward: PuppetMessageForward;
920
930
  static readonly MessageLocation: PuppetMessageLocation;
@@ -1356,6 +1366,15 @@ export class PuppetClient {
1356
1366
  requestMessage: wechaty_puppet_message_pb.MessageCallRecordRequest,
1357
1367
  callback: (error: ServiceError|null, responseMessage: wechaty_puppet_message_pb.MessageCallRecordResponse|null) => void
1358
1368
  ): UnaryResponse;
1369
+ messageChatHistory(
1370
+ requestMessage: wechaty_puppet_message_pb.MessageChatHistoryRequest,
1371
+ metadata: grpc.Metadata,
1372
+ callback: (error: ServiceError|null, responseMessage: wechaty_puppet_message_pb.MessageChatHistoryResponse|null) => void
1373
+ ): UnaryResponse;
1374
+ messageChatHistory(
1375
+ requestMessage: wechaty_puppet_message_pb.MessageChatHistoryRequest,
1376
+ callback: (error: ServiceError|null, responseMessage: wechaty_puppet_message_pb.MessageChatHistoryResponse|null) => void
1377
+ ): UnaryResponse;
1359
1378
  messageRecall(
1360
1379
  requestMessage: wechaty_puppet_message_pb.MessageRecallRequest,
1361
1380
  metadata: grpc.Metadata,
@@ -384,6 +384,15 @@ Puppet.MessageCallRecord = {
384
384
  responseType: wechaty_puppet_message_pb.MessageCallRecordResponse
385
385
  };
386
386
 
387
+ Puppet.MessageChatHistory = {
388
+ methodName: "MessageChatHistory",
389
+ service: Puppet,
390
+ requestStream: false,
391
+ responseStream: false,
392
+ requestType: wechaty_puppet_message_pb.MessageChatHistoryRequest,
393
+ responseType: wechaty_puppet_message_pb.MessageChatHistoryResponse
394
+ };
395
+
387
396
  Puppet.MessageRecall = {
388
397
  methodName: "MessageRecall",
389
398
  service: Puppet,
@@ -2134,6 +2143,37 @@ PuppetClient.prototype.messageCallRecord = function messageCallRecord(requestMes
2134
2143
  };
2135
2144
  };
2136
2145
 
2146
+ PuppetClient.prototype.messageChatHistory = function messageChatHistory(requestMessage, metadata, callback) {
2147
+ if (arguments.length === 2) {
2148
+ callback = arguments[1];
2149
+ }
2150
+ var client = grpc.unary(Puppet.MessageChatHistory, {
2151
+ request: requestMessage,
2152
+ host: this.serviceHost,
2153
+ metadata: metadata,
2154
+ transport: this.options.transport,
2155
+ debug: this.options.debug,
2156
+ onEnd: function (response) {
2157
+ if (callback) {
2158
+ if (response.status !== grpc.Code.OK) {
2159
+ var err = new Error(response.statusMessage);
2160
+ err.code = response.status;
2161
+ err.metadata = response.trailers;
2162
+ callback(err, null);
2163
+ } else {
2164
+ callback(null, response.message);
2165
+ }
2166
+ }
2167
+ }
2168
+ });
2169
+ return {
2170
+ cancel: function () {
2171
+ callback = null;
2172
+ client.close();
2173
+ }
2174
+ };
2175
+ };
2176
+
2137
2177
  PuppetClient.prototype.messageRecall = function messageRecall(requestMessage, metadata, callback) {
2138
2178
  if (arguments.length === 2) {
2139
2179
  callback = arguments[1];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juzi/wechaty-grpc",
3
- "version": "1.0.67",
3
+ "version": "1.0.69",
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.67",
7
+ "version": "1.0.69",
8
8
  "description": "gRPC for Wechaty",
9
9
  "type": "module",
10
10
  "exports": {