@juzi/wechaty-grpc 1.0.103 → 1.0.104

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 (38) hide show
  1. package/dist/cjs/out/wechaty/puppet/message_pb.d.ts +84 -0
  2. package/dist/cjs/out/wechaty/puppet/message_pb.js +638 -0
  3. package/dist/cjs/out/wechaty/puppet.openapi.yaml +63 -1
  4. package/dist/cjs/out/wechaty/puppet.swagger.json +100 -1
  5. package/dist/cjs/out/wechaty/puppet_grpc_pb.d.ts +34 -0
  6. package/dist/cjs/out/wechaty/puppet_grpc_pb.js +66 -0
  7. package/dist/cjs/out/wechaty/puppet_pb_service.d.ts +38 -0
  8. package/dist/cjs/out/wechaty/puppet_pb_service.js +80 -0
  9. package/dist/cjs/proto/wechaty/puppet/message.proto +15 -0
  10. package/dist/cjs/proto/wechaty/puppet.proto +6 -0
  11. package/dist/cjs/src/package-json.js +1 -1
  12. package/dist/cjs/tests/puppet-server-impl.d.ts.map +1 -1
  13. package/dist/cjs/tests/puppet-server-impl.js +10 -0
  14. package/dist/cjs/tests/puppet-server-impl.js.map +1 -1
  15. package/dist/esm/out/wechaty/puppet/message_pb.d.ts +84 -0
  16. package/dist/esm/out/wechaty/puppet/message_pb.js +638 -0
  17. package/dist/esm/out/wechaty/puppet.openapi.yaml +63 -1
  18. package/dist/esm/out/wechaty/puppet.swagger.json +100 -1
  19. package/dist/esm/out/wechaty/puppet_grpc_pb.d.ts +34 -0
  20. package/dist/esm/out/wechaty/puppet_grpc_pb.js +66 -0
  21. package/dist/esm/out/wechaty/puppet_pb_service.d.ts +38 -0
  22. package/dist/esm/out/wechaty/puppet_pb_service.js +80 -0
  23. package/dist/esm/proto/wechaty/puppet/message.proto +15 -0
  24. package/dist/esm/proto/wechaty/puppet.proto +6 -0
  25. package/dist/esm/src/package-json.js +1 -1
  26. package/dist/esm/tests/puppet-server-impl.d.ts.map +1 -1
  27. package/dist/esm/tests/puppet-server-impl.js +10 -0
  28. package/dist/esm/tests/puppet-server-impl.js.map +1 -1
  29. package/out/wechaty/puppet/message_pb.d.ts +84 -0
  30. package/out/wechaty/puppet/message_pb.js +638 -0
  31. package/out/wechaty/puppet.openapi.yaml +63 -1
  32. package/out/wechaty/puppet.swagger.json +100 -1
  33. package/out/wechaty/puppet_grpc_pb.d.ts +34 -0
  34. package/out/wechaty/puppet_grpc_pb.js +66 -0
  35. package/out/wechaty/puppet_pb_service.d.ts +38 -0
  36. package/out/wechaty/puppet_pb_service.js +80 -0
  37. package/package.json +1 -1
  38. package/src/package-json.ts +1 -1
@@ -9,7 +9,7 @@ info:
9
9
 
10
10
  Wechaty Puppet Service is the RESTful API for Wechaty API, which is build on
11
11
  top of the Wechaty Puppet Abstraction and the gRPC proto definition.
12
- version: 1.0.103
12
+ version: 1.0.104
13
13
  contact:
14
14
  name: Wechaty
15
15
  url: https://github.com/wechaty/openapi
@@ -3099,6 +3099,46 @@ paths:
3099
3099
  $ref: '#/definitions/puppetMessageSendFileRequest'
3100
3100
  tags:
3101
3101
  - Puppet
3102
+ /wechaty.Puppet/MessageVoice:
3103
+ post:
3104
+ operationId: Puppet_MessageVoice
3105
+ responses:
3106
+ '200':
3107
+ description: A successful response.
3108
+ schema:
3109
+ $ref: '#/definitions/puppetMessageVoiceResponse'
3110
+ default:
3111
+ description: An unexpected error response.
3112
+ schema:
3113
+ $ref: '#/definitions/rpcStatus'
3114
+ parameters:
3115
+ - name: body
3116
+ in: body
3117
+ required: true
3118
+ schema:
3119
+ $ref: '#/definitions/puppetMessageVoiceRequest'
3120
+ tags:
3121
+ - Puppet
3122
+ /wechaty.Puppet/MessageVoiceText:
3123
+ post:
3124
+ operationId: Puppet_MessageVoiceText
3125
+ responses:
3126
+ '200':
3127
+ description: A successful response.
3128
+ schema:
3129
+ $ref: '#/definitions/puppetMessageVoiceTextResponse'
3130
+ default:
3131
+ description: An unexpected error response.
3132
+ schema:
3133
+ $ref: '#/definitions/rpcStatus'
3134
+ parameters:
3135
+ - name: body
3136
+ in: body
3137
+ required: true
3138
+ schema:
3139
+ $ref: '#/definitions/puppetMessageVoiceTextRequest'
3140
+ tags:
3141
+ - Puppet
3102
3142
  /wecom/corpMessageInterceptionStrategyList:
3103
3143
  get:
3104
3144
  operationId: Puppet_GetCorpMessageInterceptionStrategies
@@ -4825,6 +4865,28 @@ definitions:
4825
4865
  The compatible code will be removed after Dec 31, 2022
4826
4866
  urlLink:
4827
4867
  $ref: '#/definitions/puppetUrlLinkPayload'
4868
+ puppetMessageVoiceRequest:
4869
+ type: object
4870
+ properties:
4871
+ id:
4872
+ type: string
4873
+ puppetMessageVoiceResponse:
4874
+ type: object
4875
+ properties:
4876
+ fileBox:
4877
+ type: string
4878
+ puppetMessageVoiceTextRequest:
4879
+ type: object
4880
+ properties:
4881
+ id:
4882
+ type: string
4883
+ puppetMessageVoiceTextResponse:
4884
+ type: object
4885
+ properties:
4886
+ text:
4887
+ type: string
4888
+ noSpeech:
4889
+ type: boolean
4828
4890
  puppetMiniProgramPayload:
4829
4891
  type: object
4830
4892
  properties:
@@ -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.103",
6
+ "version": "1.0.104",
7
7
  "contact": {
8
8
  "name": "Wechaty",
9
9
  "url": "https://github.com/wechaty/openapi",
@@ -4685,6 +4685,70 @@
4685
4685
  ]
4686
4686
  }
4687
4687
  },
4688
+ "/wechaty.Puppet/MessageVoice": {
4689
+ "post": {
4690
+ "operationId": "Puppet_MessageVoice",
4691
+ "responses": {
4692
+ "200": {
4693
+ "description": "A successful response.",
4694
+ "schema": {
4695
+ "$ref": "#/definitions/puppetMessageVoiceResponse"
4696
+ }
4697
+ },
4698
+ "default": {
4699
+ "description": "An unexpected error response.",
4700
+ "schema": {
4701
+ "$ref": "#/definitions/rpcStatus"
4702
+ }
4703
+ }
4704
+ },
4705
+ "parameters": [
4706
+ {
4707
+ "name": "body",
4708
+ "in": "body",
4709
+ "required": true,
4710
+ "schema": {
4711
+ "$ref": "#/definitions/puppetMessageVoiceRequest"
4712
+ }
4713
+ }
4714
+ ],
4715
+ "tags": [
4716
+ "Puppet"
4717
+ ]
4718
+ }
4719
+ },
4720
+ "/wechaty.Puppet/MessageVoiceText": {
4721
+ "post": {
4722
+ "operationId": "Puppet_MessageVoiceText",
4723
+ "responses": {
4724
+ "200": {
4725
+ "description": "A successful response.",
4726
+ "schema": {
4727
+ "$ref": "#/definitions/puppetMessageVoiceTextResponse"
4728
+ }
4729
+ },
4730
+ "default": {
4731
+ "description": "An unexpected error response.",
4732
+ "schema": {
4733
+ "$ref": "#/definitions/rpcStatus"
4734
+ }
4735
+ }
4736
+ },
4737
+ "parameters": [
4738
+ {
4739
+ "name": "body",
4740
+ "in": "body",
4741
+ "required": true,
4742
+ "schema": {
4743
+ "$ref": "#/definitions/puppetMessageVoiceTextRequest"
4744
+ }
4745
+ }
4746
+ ],
4747
+ "tags": [
4748
+ "Puppet"
4749
+ ]
4750
+ }
4751
+ },
4688
4752
  "/wecom/corpMessageInterceptionStrategyList": {
4689
4753
  "get": {
4690
4754
  "operationId": "Puppet_GetCorpMessageInterceptionStrategies",
@@ -6948,6 +7012,41 @@
6948
7012
  }
6949
7013
  }
6950
7014
  },
7015
+ "puppetMessageVoiceRequest": {
7016
+ "type": "object",
7017
+ "properties": {
7018
+ "id": {
7019
+ "type": "string"
7020
+ }
7021
+ }
7022
+ },
7023
+ "puppetMessageVoiceResponse": {
7024
+ "type": "object",
7025
+ "properties": {
7026
+ "fileBox": {
7027
+ "type": "string"
7028
+ }
7029
+ }
7030
+ },
7031
+ "puppetMessageVoiceTextRequest": {
7032
+ "type": "object",
7033
+ "properties": {
7034
+ "id": {
7035
+ "type": "string"
7036
+ }
7037
+ }
7038
+ },
7039
+ "puppetMessageVoiceTextResponse": {
7040
+ "type": "object",
7041
+ "properties": {
7042
+ "text": {
7043
+ "type": "string"
7044
+ },
7045
+ "noSpeech": {
7046
+ "type": "boolean"
7047
+ }
7048
+ }
7049
+ },
6951
7050
  "puppetMiniProgramPayload": {
6952
7051
  "type": "object",
6953
7052
  "properties": {
@@ -61,6 +61,8 @@ interface IPuppetService extends grpc.ServiceDefinition<grpc.UntypedServiceImple
61
61
  conversationRead: IPuppetService_IConversationRead;
62
62
  messageFile: IPuppetService_IMessageFile;
63
63
  messageImage: IPuppetService_IMessageImage;
64
+ messageVoice: IPuppetService_IMessageVoice;
65
+ messageVoiceText: IPuppetService_IMessageVoiceText;
64
66
  messageSendFile: IPuppetService_IMessageSendFile;
65
67
  messagePayload: IPuppetService_IMessagePayload;
66
68
  messageContact: IPuppetService_IMessageContact;
@@ -482,6 +484,24 @@ interface IPuppetService_IMessageImage extends grpc.MethodDefinition<wechaty_pup
482
484
  responseSerialize: grpc.serialize<wechaty_puppet_message_pb.MessageImageResponse>;
483
485
  responseDeserialize: grpc.deserialize<wechaty_puppet_message_pb.MessageImageResponse>;
484
486
  }
487
+ interface IPuppetService_IMessageVoice extends grpc.MethodDefinition<wechaty_puppet_message_pb.MessageVoiceRequest, wechaty_puppet_message_pb.MessageVoiceResponse> {
488
+ path: "/wechaty.Puppet/MessageVoice";
489
+ requestStream: false;
490
+ responseStream: false;
491
+ requestSerialize: grpc.serialize<wechaty_puppet_message_pb.MessageVoiceRequest>;
492
+ requestDeserialize: grpc.deserialize<wechaty_puppet_message_pb.MessageVoiceRequest>;
493
+ responseSerialize: grpc.serialize<wechaty_puppet_message_pb.MessageVoiceResponse>;
494
+ responseDeserialize: grpc.deserialize<wechaty_puppet_message_pb.MessageVoiceResponse>;
495
+ }
496
+ interface IPuppetService_IMessageVoiceText extends grpc.MethodDefinition<wechaty_puppet_message_pb.MessageVoiceTextRequest, wechaty_puppet_message_pb.MessageVoiceTextResponse> {
497
+ path: "/wechaty.Puppet/MessageVoiceText";
498
+ requestStream: false;
499
+ responseStream: false;
500
+ requestSerialize: grpc.serialize<wechaty_puppet_message_pb.MessageVoiceTextRequest>;
501
+ requestDeserialize: grpc.deserialize<wechaty_puppet_message_pb.MessageVoiceTextRequest>;
502
+ responseSerialize: grpc.serialize<wechaty_puppet_message_pb.MessageVoiceTextResponse>;
503
+ responseDeserialize: grpc.deserialize<wechaty_puppet_message_pb.MessageVoiceTextResponse>;
504
+ }
485
505
  interface IPuppetService_IMessageSendFile extends grpc.MethodDefinition<wechaty_puppet_message_pb.MessageSendFileRequest, wechaty_puppet_message_pb.MessageSendFileResponse> {
486
506
  path: "/wechaty.Puppet/MessageSendFile";
487
507
  requestStream: false;
@@ -1377,6 +1397,8 @@ export interface IPuppetServer extends grpc.UntypedServiceImplementation {
1377
1397
  conversationRead: grpc.handleUnaryCall<wechaty_puppet_conversation_pb.ConversationReadRequest, wechaty_puppet_conversation_pb.ConversationReadResponse>;
1378
1398
  messageFile: grpc.handleUnaryCall<wechaty_puppet_message_pb.MessageFileRequest, wechaty_puppet_message_pb.MessageFileResponse>;
1379
1399
  messageImage: grpc.handleUnaryCall<wechaty_puppet_message_pb.MessageImageRequest, wechaty_puppet_message_pb.MessageImageResponse>;
1400
+ messageVoice: grpc.handleUnaryCall<wechaty_puppet_message_pb.MessageVoiceRequest, wechaty_puppet_message_pb.MessageVoiceResponse>;
1401
+ messageVoiceText: grpc.handleUnaryCall<wechaty_puppet_message_pb.MessageVoiceTextRequest, wechaty_puppet_message_pb.MessageVoiceTextResponse>;
1380
1402
  messageSendFile: grpc.handleUnaryCall<wechaty_puppet_message_pb.MessageSendFileRequest, wechaty_puppet_message_pb.MessageSendFileResponse>;
1381
1403
  messagePayload: grpc.handleUnaryCall<wechaty_puppet_message_pb.MessagePayloadRequest, wechaty_puppet_message_pb.MessagePayloadResponse>;
1382
1404
  messageContact: grpc.handleUnaryCall<wechaty_puppet_message_pb.MessageContactRequest, wechaty_puppet_message_pb.MessageContactResponse>;
@@ -1582,6 +1604,12 @@ export interface IPuppetClient {
1582
1604
  messageImage(request: wechaty_puppet_message_pb.MessageImageRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageImageResponse) => void): grpc.ClientUnaryCall;
1583
1605
  messageImage(request: wechaty_puppet_message_pb.MessageImageRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageImageResponse) => void): grpc.ClientUnaryCall;
1584
1606
  messageImage(request: wechaty_puppet_message_pb.MessageImageRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageImageResponse) => void): grpc.ClientUnaryCall;
1607
+ messageVoice(request: wechaty_puppet_message_pb.MessageVoiceRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageVoiceResponse) => void): grpc.ClientUnaryCall;
1608
+ messageVoice(request: wechaty_puppet_message_pb.MessageVoiceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageVoiceResponse) => void): grpc.ClientUnaryCall;
1609
+ messageVoice(request: wechaty_puppet_message_pb.MessageVoiceRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageVoiceResponse) => void): grpc.ClientUnaryCall;
1610
+ messageVoiceText(request: wechaty_puppet_message_pb.MessageVoiceTextRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageVoiceTextResponse) => void): grpc.ClientUnaryCall;
1611
+ messageVoiceText(request: wechaty_puppet_message_pb.MessageVoiceTextRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageVoiceTextResponse) => void): grpc.ClientUnaryCall;
1612
+ messageVoiceText(request: wechaty_puppet_message_pb.MessageVoiceTextRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageVoiceTextResponse) => void): grpc.ClientUnaryCall;
1585
1613
  messageSendFile(request: wechaty_puppet_message_pb.MessageSendFileRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageSendFileResponse) => void): grpc.ClientUnaryCall;
1586
1614
  messageSendFile(request: wechaty_puppet_message_pb.MessageSendFileRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageSendFileResponse) => void): grpc.ClientUnaryCall;
1587
1615
  messageSendFile(request: wechaty_puppet_message_pb.MessageSendFileRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageSendFileResponse) => void): grpc.ClientUnaryCall;
@@ -1978,6 +2006,12 @@ export class PuppetClient extends grpc.Client implements IPuppetClient {
1978
2006
  public messageImage(request: wechaty_puppet_message_pb.MessageImageRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageImageResponse) => void): grpc.ClientUnaryCall;
1979
2007
  public messageImage(request: wechaty_puppet_message_pb.MessageImageRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageImageResponse) => void): grpc.ClientUnaryCall;
1980
2008
  public messageImage(request: wechaty_puppet_message_pb.MessageImageRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageImageResponse) => void): grpc.ClientUnaryCall;
2009
+ public messageVoice(request: wechaty_puppet_message_pb.MessageVoiceRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageVoiceResponse) => void): grpc.ClientUnaryCall;
2010
+ public messageVoice(request: wechaty_puppet_message_pb.MessageVoiceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageVoiceResponse) => void): grpc.ClientUnaryCall;
2011
+ public messageVoice(request: wechaty_puppet_message_pb.MessageVoiceRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageVoiceResponse) => void): grpc.ClientUnaryCall;
2012
+ public messageVoiceText(request: wechaty_puppet_message_pb.MessageVoiceTextRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageVoiceTextResponse) => void): grpc.ClientUnaryCall;
2013
+ public messageVoiceText(request: wechaty_puppet_message_pb.MessageVoiceTextRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageVoiceTextResponse) => void): grpc.ClientUnaryCall;
2014
+ public messageVoiceText(request: wechaty_puppet_message_pb.MessageVoiceTextRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageVoiceTextResponse) => void): grpc.ClientUnaryCall;
1981
2015
  public messageSendFile(request: wechaty_puppet_message_pb.MessageSendFileRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageSendFileResponse) => void): grpc.ClientUnaryCall;
1982
2016
  public messageSendFile(request: wechaty_puppet_message_pb.MessageSendFileRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageSendFileResponse) => void): grpc.ClientUnaryCall;
1983
2017
  public messageSendFile(request: wechaty_puppet_message_pb.MessageSendFileRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageSendFileResponse) => void): grpc.ClientUnaryCall;
@@ -1771,6 +1771,50 @@ function deserialize_wechaty_puppet_MessageUrlResponse(buffer_arg) {
1771
1771
  return wechaty_puppet_message_pb.MessageUrlResponse.deserializeBinary(new Uint8Array(buffer_arg));
1772
1772
  }
1773
1773
 
1774
+ function serialize_wechaty_puppet_MessageVoiceRequest(arg) {
1775
+ if (!(arg instanceof wechaty_puppet_message_pb.MessageVoiceRequest)) {
1776
+ throw new Error('Expected argument of type wechaty.puppet.MessageVoiceRequest');
1777
+ }
1778
+ return Buffer.from(arg.serializeBinary());
1779
+ }
1780
+
1781
+ function deserialize_wechaty_puppet_MessageVoiceRequest(buffer_arg) {
1782
+ return wechaty_puppet_message_pb.MessageVoiceRequest.deserializeBinary(new Uint8Array(buffer_arg));
1783
+ }
1784
+
1785
+ function serialize_wechaty_puppet_MessageVoiceResponse(arg) {
1786
+ if (!(arg instanceof wechaty_puppet_message_pb.MessageVoiceResponse)) {
1787
+ throw new Error('Expected argument of type wechaty.puppet.MessageVoiceResponse');
1788
+ }
1789
+ return Buffer.from(arg.serializeBinary());
1790
+ }
1791
+
1792
+ function deserialize_wechaty_puppet_MessageVoiceResponse(buffer_arg) {
1793
+ return wechaty_puppet_message_pb.MessageVoiceResponse.deserializeBinary(new Uint8Array(buffer_arg));
1794
+ }
1795
+
1796
+ function serialize_wechaty_puppet_MessageVoiceTextRequest(arg) {
1797
+ if (!(arg instanceof wechaty_puppet_message_pb.MessageVoiceTextRequest)) {
1798
+ throw new Error('Expected argument of type wechaty.puppet.MessageVoiceTextRequest');
1799
+ }
1800
+ return Buffer.from(arg.serializeBinary());
1801
+ }
1802
+
1803
+ function deserialize_wechaty_puppet_MessageVoiceTextRequest(buffer_arg) {
1804
+ return wechaty_puppet_message_pb.MessageVoiceTextRequest.deserializeBinary(new Uint8Array(buffer_arg));
1805
+ }
1806
+
1807
+ function serialize_wechaty_puppet_MessageVoiceTextResponse(arg) {
1808
+ if (!(arg instanceof wechaty_puppet_message_pb.MessageVoiceTextResponse)) {
1809
+ throw new Error('Expected argument of type wechaty.puppet.MessageVoiceTextResponse');
1810
+ }
1811
+ return Buffer.from(arg.serializeBinary());
1812
+ }
1813
+
1814
+ function deserialize_wechaty_puppet_MessageVoiceTextResponse(buffer_arg) {
1815
+ return wechaty_puppet_message_pb.MessageVoiceTextResponse.deserializeBinary(new Uint8Array(buffer_arg));
1816
+ }
1817
+
1774
1818
  function serialize_wechaty_puppet_MomentCoverageRequest(arg) {
1775
1819
  if (!(arg instanceof wechaty_puppet_moment_pb.MomentCoverageRequest)) {
1776
1820
  throw new Error('Expected argument of type wechaty.puppet.MomentCoverageRequest');
@@ -3292,6 +3336,28 @@ messageFile: {
3292
3336
  responseSerialize: serialize_wechaty_puppet_MessageImageResponse,
3293
3337
  responseDeserialize: deserialize_wechaty_puppet_MessageImageResponse,
3294
3338
  },
3339
+ messageVoice: {
3340
+ path: '/wechaty.Puppet/MessageVoice',
3341
+ requestStream: false,
3342
+ responseStream: false,
3343
+ requestType: wechaty_puppet_message_pb.MessageVoiceRequest,
3344
+ responseType: wechaty_puppet_message_pb.MessageVoiceResponse,
3345
+ requestSerialize: serialize_wechaty_puppet_MessageVoiceRequest,
3346
+ requestDeserialize: deserialize_wechaty_puppet_MessageVoiceRequest,
3347
+ responseSerialize: serialize_wechaty_puppet_MessageVoiceResponse,
3348
+ responseDeserialize: deserialize_wechaty_puppet_MessageVoiceResponse,
3349
+ },
3350
+ messageVoiceText: {
3351
+ path: '/wechaty.Puppet/MessageVoiceText',
3352
+ requestStream: false,
3353
+ responseStream: false,
3354
+ requestType: wechaty_puppet_message_pb.MessageVoiceTextRequest,
3355
+ responseType: wechaty_puppet_message_pb.MessageVoiceTextResponse,
3356
+ requestSerialize: serialize_wechaty_puppet_MessageVoiceTextRequest,
3357
+ requestDeserialize: deserialize_wechaty_puppet_MessageVoiceTextRequest,
3358
+ responseSerialize: serialize_wechaty_puppet_MessageVoiceTextResponse,
3359
+ responseDeserialize: deserialize_wechaty_puppet_MessageVoiceTextResponse,
3360
+ },
3295
3361
  messageSendFile: {
3296
3362
  path: '/wechaty.Puppet/MessageSendFile',
3297
3363
  requestStream: false,
@@ -344,6 +344,24 @@ type PuppetMessageImage = {
344
344
  readonly responseType: typeof wechaty_puppet_message_pb.MessageImageResponse;
345
345
  };
346
346
 
347
+ type PuppetMessageVoice = {
348
+ readonly methodName: string;
349
+ readonly service: typeof Puppet;
350
+ readonly requestStream: false;
351
+ readonly responseStream: false;
352
+ readonly requestType: typeof wechaty_puppet_message_pb.MessageVoiceRequest;
353
+ readonly responseType: typeof wechaty_puppet_message_pb.MessageVoiceResponse;
354
+ };
355
+
356
+ type PuppetMessageVoiceText = {
357
+ readonly methodName: string;
358
+ readonly service: typeof Puppet;
359
+ readonly requestStream: false;
360
+ readonly responseStream: false;
361
+ readonly requestType: typeof wechaty_puppet_message_pb.MessageVoiceTextRequest;
362
+ readonly responseType: typeof wechaty_puppet_message_pb.MessageVoiceTextResponse;
363
+ };
364
+
347
365
  type PuppetMessageSendFile = {
348
366
  readonly methodName: string;
349
367
  readonly service: typeof Puppet;
@@ -1237,6 +1255,8 @@ export class Puppet {
1237
1255
  static readonly ConversationRead: PuppetConversationRead;
1238
1256
  static readonly MessageFile: PuppetMessageFile;
1239
1257
  static readonly MessageImage: PuppetMessageImage;
1258
+ static readonly MessageVoice: PuppetMessageVoice;
1259
+ static readonly MessageVoiceText: PuppetMessageVoiceText;
1240
1260
  static readonly MessageSendFile: PuppetMessageSendFile;
1241
1261
  static readonly MessagePayload: PuppetMessagePayload;
1242
1262
  static readonly MessageContact: PuppetMessageContact;
@@ -1682,6 +1702,24 @@ export class PuppetClient {
1682
1702
  requestMessage: wechaty_puppet_message_pb.MessageImageRequest,
1683
1703
  callback: (error: ServiceError|null, responseMessage: wechaty_puppet_message_pb.MessageImageResponse|null) => void
1684
1704
  ): UnaryResponse;
1705
+ messageVoice(
1706
+ requestMessage: wechaty_puppet_message_pb.MessageVoiceRequest,
1707
+ metadata: grpc.Metadata,
1708
+ callback: (error: ServiceError|null, responseMessage: wechaty_puppet_message_pb.MessageVoiceResponse|null) => void
1709
+ ): UnaryResponse;
1710
+ messageVoice(
1711
+ requestMessage: wechaty_puppet_message_pb.MessageVoiceRequest,
1712
+ callback: (error: ServiceError|null, responseMessage: wechaty_puppet_message_pb.MessageVoiceResponse|null) => void
1713
+ ): UnaryResponse;
1714
+ messageVoiceText(
1715
+ requestMessage: wechaty_puppet_message_pb.MessageVoiceTextRequest,
1716
+ metadata: grpc.Metadata,
1717
+ callback: (error: ServiceError|null, responseMessage: wechaty_puppet_message_pb.MessageVoiceTextResponse|null) => void
1718
+ ): UnaryResponse;
1719
+ messageVoiceText(
1720
+ requestMessage: wechaty_puppet_message_pb.MessageVoiceTextRequest,
1721
+ callback: (error: ServiceError|null, responseMessage: wechaty_puppet_message_pb.MessageVoiceTextResponse|null) => void
1722
+ ): UnaryResponse;
1685
1723
  messageSendFile(
1686
1724
  requestMessage: wechaty_puppet_message_pb.MessageSendFileRequest,
1687
1725
  metadata: grpc.Metadata,
@@ -350,6 +350,24 @@ Puppet.MessageImage = {
350
350
  responseType: wechaty_puppet_message_pb.MessageImageResponse
351
351
  };
352
352
 
353
+ Puppet.MessageVoice = {
354
+ methodName: "MessageVoice",
355
+ service: Puppet,
356
+ requestStream: false,
357
+ responseStream: false,
358
+ requestType: wechaty_puppet_message_pb.MessageVoiceRequest,
359
+ responseType: wechaty_puppet_message_pb.MessageVoiceResponse
360
+ };
361
+
362
+ Puppet.MessageVoiceText = {
363
+ methodName: "MessageVoiceText",
364
+ service: Puppet,
365
+ requestStream: false,
366
+ responseStream: false,
367
+ requestType: wechaty_puppet_message_pb.MessageVoiceTextRequest,
368
+ responseType: wechaty_puppet_message_pb.MessageVoiceTextResponse
369
+ };
370
+
353
371
  Puppet.MessageSendFile = {
354
372
  methodName: "MessageSendFile",
355
373
  service: Puppet,
@@ -2336,6 +2354,68 @@ PuppetClient.prototype.messageImage = function messageImage(requestMessage, meta
2336
2354
  };
2337
2355
  };
2338
2356
 
2357
+ PuppetClient.prototype.messageVoice = function messageVoice(requestMessage, metadata, callback) {
2358
+ if (arguments.length === 2) {
2359
+ callback = arguments[1];
2360
+ }
2361
+ var client = grpc.unary(Puppet.MessageVoice, {
2362
+ request: requestMessage,
2363
+ host: this.serviceHost,
2364
+ metadata: metadata,
2365
+ transport: this.options.transport,
2366
+ debug: this.options.debug,
2367
+ onEnd: function (response) {
2368
+ if (callback) {
2369
+ if (response.status !== grpc.Code.OK) {
2370
+ var err = new Error(response.statusMessage);
2371
+ err.code = response.status;
2372
+ err.metadata = response.trailers;
2373
+ callback(err, null);
2374
+ } else {
2375
+ callback(null, response.message);
2376
+ }
2377
+ }
2378
+ }
2379
+ });
2380
+ return {
2381
+ cancel: function () {
2382
+ callback = null;
2383
+ client.close();
2384
+ }
2385
+ };
2386
+ };
2387
+
2388
+ PuppetClient.prototype.messageVoiceText = function messageVoiceText(requestMessage, metadata, callback) {
2389
+ if (arguments.length === 2) {
2390
+ callback = arguments[1];
2391
+ }
2392
+ var client = grpc.unary(Puppet.MessageVoiceText, {
2393
+ request: requestMessage,
2394
+ host: this.serviceHost,
2395
+ metadata: metadata,
2396
+ transport: this.options.transport,
2397
+ debug: this.options.debug,
2398
+ onEnd: function (response) {
2399
+ if (callback) {
2400
+ if (response.status !== grpc.Code.OK) {
2401
+ var err = new Error(response.statusMessage);
2402
+ err.code = response.status;
2403
+ err.metadata = response.trailers;
2404
+ callback(err, null);
2405
+ } else {
2406
+ callback(null, response.message);
2407
+ }
2408
+ }
2409
+ }
2410
+ });
2411
+ return {
2412
+ cancel: function () {
2413
+ callback = null;
2414
+ client.close();
2415
+ }
2416
+ };
2417
+ };
2418
+
2339
2419
  PuppetClient.prototype.messageSendFile = function messageSendFile(requestMessage, metadata, callback) {
2340
2420
  if (arguments.length === 2) {
2341
2421
  callback = arguments[1];
@@ -112,6 +112,21 @@ message MessageFileResponse {
112
112
  string file_box = 1;
113
113
  }
114
114
 
115
+ message MessageVoiceRequest {
116
+ string id = 1;
117
+ }
118
+ message MessageVoiceResponse {
119
+ string file_box = 1;
120
+ }
121
+
122
+ message MessageVoiceTextRequest {
123
+ string id = 1;
124
+ }
125
+ message MessageVoiceTextResponse {
126
+ string text = 1;
127
+ bool no_speech = 2;
128
+ }
129
+
115
130
  message MessageMiniProgramRequest {
116
131
  string id = 1;
117
132
  }
@@ -348,6 +348,12 @@ service Puppet {
348
348
  rpc MessageImage (puppet.MessageImageRequest) returns (puppet.MessageImageResponse) {
349
349
  }
350
350
 
351
+ rpc MessageVoice (puppet.MessageVoiceRequest) returns (puppet.MessageVoiceResponse) {
352
+ }
353
+
354
+ rpc MessageVoiceText (puppet.MessageVoiceTextRequest) returns (puppet.MessageVoiceTextResponse) {
355
+ }
356
+
351
357
  rpc MessageSendFile (puppet.MessageSendFileRequest) returns (puppet.MessageSendFileResponse) {
352
358
  }
353
359
 
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.packageJson = void 0;
4
4
  exports.packageJson = {
5
5
  "name": "@juzi/wechaty-grpc",
6
- "version": "1.0.103",
6
+ "version": "1.0.104",
7
7
  "description": "gRPC for Wechaty",
8
8
  "type": "module",
9
9
  "exports": {
@@ -1 +1 @@
1
- {"version":3,"file":"puppet-server-impl.d.ts","sourceRoot":"","sources":["../../../tests/puppet-server-impl.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,MAAM,EACP,MAAM,eAAe,CAAA;AAEtB,aAAK,aAAa,GAAG,MAAM,CAAC,aAAa,CAAA;AAEzC;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,aAmxB9B,CAAA"}
1
+ {"version":3,"file":"puppet-server-impl.d.ts","sourceRoot":"","sources":["../../../tests/puppet-server-impl.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,MAAM,EACP,MAAM,eAAe,CAAA;AAEtB,aAAK,aAAa,GAAG,MAAM,CAAC,aAAa,CAAA;AAEzC;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,aA+xB9B,CAAA"}
@@ -214,6 +214,16 @@ exports.puppetServerImpl = {
214
214
  void callback;
215
215
  throw new Error('not implemented.');
216
216
  },
217
+ messageVoice: (call, callback) => {
218
+ void call;
219
+ void callback;
220
+ throw new Error('not implemented.');
221
+ },
222
+ messageVoiceText: (call, callback) => {
223
+ void call;
224
+ void callback;
225
+ throw new Error('not implemented.');
226
+ },
217
227
  messageLocation: (call, callback) => {
218
228
  void call;
219
229
  void callback;