@juzi/wechaty-grpc 1.0.84 → 1.0.86
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.
- package/dist/cjs/out/wechaty/puppet/message_pb.d.ts +46 -0
- package/dist/cjs/out/wechaty/puppet/message_pb.js +355 -0
- package/dist/cjs/out/wechaty/puppet/post_pb.d.ts +2 -0
- package/dist/cjs/out/wechaty/puppet/post_pb.js +3 -1
- package/dist/cjs/out/wechaty/puppet.openapi.yaml +41 -1
- package/dist/cjs/out/wechaty/puppet.swagger.json +61 -3
- package/dist/cjs/out/wechaty/puppet_grpc_pb.d.ts +17 -0
- package/dist/cjs/out/wechaty/puppet_grpc_pb.js +33 -0
- package/dist/cjs/out/wechaty/puppet_pb_service.d.ts +19 -0
- package/dist/cjs/out/wechaty/puppet_pb_service.js +40 -0
- package/dist/cjs/proto/wechaty/puppet/message.proto +9 -0
- package/dist/cjs/proto/wechaty/puppet/post.proto +2 -0
- package/dist/cjs/proto/wechaty/puppet.proto +6 -1
- package/dist/cjs/src/package-json.js +1 -1
- package/dist/cjs/tests/puppet-server-impl.d.ts.map +1 -1
- package/dist/cjs/tests/puppet-server-impl.js +5 -0
- package/dist/cjs/tests/puppet-server-impl.js.map +1 -1
- package/dist/esm/out/wechaty/puppet/message_pb.d.ts +46 -0
- package/dist/esm/out/wechaty/puppet/message_pb.js +355 -0
- package/dist/esm/out/wechaty/puppet/post_pb.d.ts +2 -0
- package/dist/esm/out/wechaty/puppet/post_pb.js +3 -1
- package/dist/esm/out/wechaty/puppet.openapi.yaml +41 -1
- package/dist/esm/out/wechaty/puppet.swagger.json +61 -3
- package/dist/esm/out/wechaty/puppet_grpc_pb.d.ts +17 -0
- package/dist/esm/out/wechaty/puppet_grpc_pb.js +33 -0
- package/dist/esm/out/wechaty/puppet_pb_service.d.ts +19 -0
- package/dist/esm/out/wechaty/puppet_pb_service.js +40 -0
- package/dist/esm/proto/wechaty/puppet/message.proto +9 -0
- package/dist/esm/proto/wechaty/puppet/post.proto +2 -0
- package/dist/esm/proto/wechaty/puppet.proto +6 -1
- package/dist/esm/src/package-json.js +1 -1
- package/dist/esm/tests/puppet-server-impl.d.ts.map +1 -1
- package/dist/esm/tests/puppet-server-impl.js +5 -0
- package/dist/esm/tests/puppet-server-impl.js.map +1 -1
- package/out/wechaty/puppet/message_pb.d.ts +46 -0
- package/out/wechaty/puppet/message_pb.js +355 -0
- package/out/wechaty/puppet/post_pb.d.ts +2 -0
- package/out/wechaty/puppet/post_pb.js +3 -1
- package/out/wechaty/puppet.openapi.yaml +41 -1
- package/out/wechaty/puppet.swagger.json +61 -3
- package/out/wechaty/puppet_grpc_pb.d.ts +17 -0
- package/out/wechaty/puppet_grpc_pb.js +33 -0
- package/out/wechaty/puppet_pb_service.d.ts +19 -0
- package/out/wechaty/puppet_pb_service.js +40 -0
- package/package.json +1 -1
- package/src/package-json.ts +1 -1
|
@@ -2598,7 +2598,9 @@ proto.wechaty.puppet.PostType = {
|
|
|
2598
2598
|
POST_TYPE_MOMENT: 1,
|
|
2599
2599
|
POST_TYPE_CHANNEL: 2,
|
|
2600
2600
|
POST_TYPE_MESSAGE: 3,
|
|
2601
|
-
POST_TYPE_BROADCAST: 4
|
|
2601
|
+
POST_TYPE_BROADCAST: 4,
|
|
2602
|
+
POST_TYPE_TEXT_BUTTON: 5,
|
|
2603
|
+
POST_TYPE_GOODS_CARD: 6
|
|
2602
2604
|
};
|
|
2603
2605
|
|
|
2604
2606
|
/**
|
|
@@ -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.
|
|
12
|
+
version: 1.0.86
|
|
13
13
|
contact:
|
|
14
14
|
name: Wechaty
|
|
15
15
|
url: https://github.com/wechaty/openapi
|
|
@@ -603,6 +603,31 @@ paths:
|
|
|
603
603
|
$ref: '#/definitions/PuppetMessageSendMiniProgramBody'
|
|
604
604
|
tags:
|
|
605
605
|
- Puppet
|
|
606
|
+
/conversations/{conversationId}/post:
|
|
607
|
+
post:
|
|
608
|
+
operationId: Puppet_MessageSendPost
|
|
609
|
+
responses:
|
|
610
|
+
'200':
|
|
611
|
+
description: A successful response.
|
|
612
|
+
schema:
|
|
613
|
+
$ref: '#/definitions/puppetMessageSendPostResponse'
|
|
614
|
+
default:
|
|
615
|
+
description: An unexpected error response.
|
|
616
|
+
schema:
|
|
617
|
+
$ref: '#/definitions/rpcStatus'
|
|
618
|
+
parameters:
|
|
619
|
+
- name: conversationId
|
|
620
|
+
description: 对话id
|
|
621
|
+
in: path
|
|
622
|
+
required: true
|
|
623
|
+
type: string
|
|
624
|
+
- name: body
|
|
625
|
+
in: body
|
|
626
|
+
required: true
|
|
627
|
+
schema:
|
|
628
|
+
$ref: '#/definitions/PuppetMessageSendPostBody'
|
|
629
|
+
tags:
|
|
630
|
+
- Puppet
|
|
606
631
|
/conversations/{conversationId}/text:
|
|
607
632
|
post:
|
|
608
633
|
operationId: Puppet_MessageSendText
|
|
@@ -2697,6 +2722,12 @@ definitions:
|
|
|
2697
2722
|
miniProgram:
|
|
2698
2723
|
$ref: '#/definitions/puppetMiniProgramPayload'
|
|
2699
2724
|
title: 小程序payload
|
|
2725
|
+
PuppetMessageSendPostBody:
|
|
2726
|
+
type: object
|
|
2727
|
+
properties:
|
|
2728
|
+
content:
|
|
2729
|
+
$ref: '#/definitions/puppetPostPayloadClient'
|
|
2730
|
+
title: 发送的post内容
|
|
2700
2731
|
PuppetMessageSendTextBody:
|
|
2701
2732
|
type: object
|
|
2702
2733
|
properties:
|
|
@@ -3610,6 +3641,11 @@ definitions:
|
|
|
3610
3641
|
https://cloud.google.com/apis/design/design_patterns#optional_primitive_fields
|
|
3611
3642
|
id:
|
|
3612
3643
|
type: string
|
|
3644
|
+
puppetMessageSendPostResponse:
|
|
3645
|
+
type: object
|
|
3646
|
+
properties:
|
|
3647
|
+
id:
|
|
3648
|
+
type: string
|
|
3613
3649
|
puppetMessageSendTextResponse:
|
|
3614
3650
|
type: object
|
|
3615
3651
|
properties:
|
|
@@ -3914,12 +3950,16 @@ definitions:
|
|
|
3914
3950
|
- POST_TYPE_CHANNEL
|
|
3915
3951
|
- POST_TYPE_MESSAGE
|
|
3916
3952
|
- POST_TYPE_BROADCAST
|
|
3953
|
+
- POST_TYPE_TEXT_BUTTON
|
|
3954
|
+
- POST_TYPE_GOODS_CARD
|
|
3917
3955
|
default: POST_TYPE_UNSPECIFIED
|
|
3918
3956
|
title: |-
|
|
3919
3957
|
- POST_TYPE_MOMENT: 朋友圈
|
|
3920
3958
|
- POST_TYPE_CHANNEL: 视频号——原始设计走post,实际目前采用message
|
|
3921
3959
|
- POST_TYPE_MESSAGE: 消息——富媒体消息
|
|
3922
3960
|
- POST_TYPE_BROADCAST: 群发
|
|
3961
|
+
- POST_TYPE_TEXT_BUTTON: puppet-mini 按钮消息
|
|
3962
|
+
- POST_TYPE_GOODS_CARD: puppet-mini 商品消息
|
|
3923
3963
|
puppetReferrer:
|
|
3924
3964
|
type: object
|
|
3925
3965
|
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.
|
|
6
|
+
"version": "1.0.86",
|
|
7
7
|
"contact": {
|
|
8
8
|
"name": "Wechaty",
|
|
9
9
|
"url": "https://github.com/wechaty/openapi",
|
|
@@ -916,6 +916,45 @@
|
|
|
916
916
|
]
|
|
917
917
|
}
|
|
918
918
|
},
|
|
919
|
+
"/conversations/{conversationId}/post": {
|
|
920
|
+
"post": {
|
|
921
|
+
"operationId": "Puppet_MessageSendPost",
|
|
922
|
+
"responses": {
|
|
923
|
+
"200": {
|
|
924
|
+
"description": "A successful response.",
|
|
925
|
+
"schema": {
|
|
926
|
+
"$ref": "#/definitions/puppetMessageSendPostResponse"
|
|
927
|
+
}
|
|
928
|
+
},
|
|
929
|
+
"default": {
|
|
930
|
+
"description": "An unexpected error response.",
|
|
931
|
+
"schema": {
|
|
932
|
+
"$ref": "#/definitions/rpcStatus"
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
},
|
|
936
|
+
"parameters": [
|
|
937
|
+
{
|
|
938
|
+
"name": "conversationId",
|
|
939
|
+
"description": "对话id",
|
|
940
|
+
"in": "path",
|
|
941
|
+
"required": true,
|
|
942
|
+
"type": "string"
|
|
943
|
+
},
|
|
944
|
+
{
|
|
945
|
+
"name": "body",
|
|
946
|
+
"in": "body",
|
|
947
|
+
"required": true,
|
|
948
|
+
"schema": {
|
|
949
|
+
"$ref": "#/definitions/PuppetMessageSendPostBody"
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
],
|
|
953
|
+
"tags": [
|
|
954
|
+
"Puppet"
|
|
955
|
+
]
|
|
956
|
+
}
|
|
957
|
+
},
|
|
919
958
|
"/conversations/{conversationId}/text": {
|
|
920
959
|
"post": {
|
|
921
960
|
"operationId": "Puppet_MessageSendText",
|
|
@@ -4034,6 +4073,15 @@
|
|
|
4034
4073
|
}
|
|
4035
4074
|
}
|
|
4036
4075
|
},
|
|
4076
|
+
"PuppetMessageSendPostBody": {
|
|
4077
|
+
"type": "object",
|
|
4078
|
+
"properties": {
|
|
4079
|
+
"content": {
|
|
4080
|
+
"$ref": "#/definitions/puppetPostPayloadClient",
|
|
4081
|
+
"title": "发送的post内容"
|
|
4082
|
+
}
|
|
4083
|
+
}
|
|
4084
|
+
},
|
|
4037
4085
|
"PuppetMessageSendTextBody": {
|
|
4038
4086
|
"type": "object",
|
|
4039
4087
|
"properties": {
|
|
@@ -5186,6 +5234,14 @@
|
|
|
5186
5234
|
}
|
|
5187
5235
|
}
|
|
5188
5236
|
},
|
|
5237
|
+
"puppetMessageSendPostResponse": {
|
|
5238
|
+
"type": "object",
|
|
5239
|
+
"properties": {
|
|
5240
|
+
"id": {
|
|
5241
|
+
"type": "string"
|
|
5242
|
+
}
|
|
5243
|
+
}
|
|
5244
|
+
},
|
|
5189
5245
|
"puppetMessageSendTextResponse": {
|
|
5190
5246
|
"type": "object",
|
|
5191
5247
|
"properties": {
|
|
@@ -5565,10 +5621,12 @@
|
|
|
5565
5621
|
"POST_TYPE_MOMENT",
|
|
5566
5622
|
"POST_TYPE_CHANNEL",
|
|
5567
5623
|
"POST_TYPE_MESSAGE",
|
|
5568
|
-
"POST_TYPE_BROADCAST"
|
|
5624
|
+
"POST_TYPE_BROADCAST",
|
|
5625
|
+
"POST_TYPE_TEXT_BUTTON",
|
|
5626
|
+
"POST_TYPE_GOODS_CARD"
|
|
5569
5627
|
],
|
|
5570
5628
|
"default": "POST_TYPE_UNSPECIFIED",
|
|
5571
|
-
"title": "- POST_TYPE_MOMENT: 朋友圈\n - POST_TYPE_CHANNEL: 视频号——原始设计走post,实际目前采用message\n - POST_TYPE_MESSAGE: 消息——富媒体消息\n - POST_TYPE_BROADCAST:
|
|
5629
|
+
"title": "- POST_TYPE_MOMENT: 朋友圈\n - POST_TYPE_CHANNEL: 视频号——原始设计走post,实际目前采用message\n - POST_TYPE_MESSAGE: 消息——富媒体消息\n - POST_TYPE_BROADCAST: 群发\n - POST_TYPE_TEXT_BUTTON: puppet-mini 按钮消息\n - POST_TYPE_GOODS_CARD: puppet-mini 商品消息"
|
|
5572
5630
|
},
|
|
5573
5631
|
"puppetReferrer": {
|
|
5574
5632
|
"type": "object",
|
|
@@ -76,6 +76,7 @@ interface IPuppetService extends grpc.ServiceDefinition<grpc.UntypedServiceImple
|
|
|
76
76
|
messageSendUrl: IPuppetService_IMessageSendUrl;
|
|
77
77
|
messageSendLocation: IPuppetService_IMessageSendLocation;
|
|
78
78
|
messageSendChannel: IPuppetService_IMessageSendChannel;
|
|
79
|
+
messageSendPost: IPuppetService_IMessageSendPost;
|
|
79
80
|
messagePreview: IPuppetService_IMessagePreview;
|
|
80
81
|
getMessageBroadcastTarget: IPuppetService_IGetMessageBroadcastTarget;
|
|
81
82
|
createMessageBroadcast: IPuppetService_ICreateMessageBroadcast;
|
|
@@ -599,6 +600,15 @@ interface IPuppetService_IMessageSendChannel extends grpc.MethodDefinition<wecha
|
|
|
599
600
|
responseSerialize: grpc.serialize<wechaty_puppet_message_pb.MessageSendChannelResponse>;
|
|
600
601
|
responseDeserialize: grpc.deserialize<wechaty_puppet_message_pb.MessageSendChannelResponse>;
|
|
601
602
|
}
|
|
603
|
+
interface IPuppetService_IMessageSendPost extends grpc.MethodDefinition<wechaty_puppet_message_pb.MessageSendPostRequest, wechaty_puppet_message_pb.MessageSendPostResponse> {
|
|
604
|
+
path: "/wechaty.Puppet/MessageSendPost";
|
|
605
|
+
requestStream: false;
|
|
606
|
+
responseStream: false;
|
|
607
|
+
requestSerialize: grpc.serialize<wechaty_puppet_message_pb.MessageSendPostRequest>;
|
|
608
|
+
requestDeserialize: grpc.deserialize<wechaty_puppet_message_pb.MessageSendPostRequest>;
|
|
609
|
+
responseSerialize: grpc.serialize<wechaty_puppet_message_pb.MessageSendPostResponse>;
|
|
610
|
+
responseDeserialize: grpc.deserialize<wechaty_puppet_message_pb.MessageSendPostResponse>;
|
|
611
|
+
}
|
|
602
612
|
interface IPuppetService_IMessagePreview extends grpc.MethodDefinition<wechaty_puppet_message_pb.MessagePreviewRequest, wechaty_puppet_message_pb.MessagePreviewResponse> {
|
|
603
613
|
path: "/wechaty.Puppet/MessagePreview";
|
|
604
614
|
requestStream: false;
|
|
@@ -1132,6 +1142,7 @@ export interface IPuppetServer extends grpc.UntypedServiceImplementation {
|
|
|
1132
1142
|
messageSendUrl: grpc.handleUnaryCall<wechaty_puppet_message_pb.MessageSendUrlRequest, wechaty_puppet_message_pb.MessageSendUrlResponse>;
|
|
1133
1143
|
messageSendLocation: grpc.handleUnaryCall<wechaty_puppet_message_pb.MessageSendLocationRequest, wechaty_puppet_message_pb.MessageSendLocationResponse>;
|
|
1134
1144
|
messageSendChannel: grpc.handleUnaryCall<wechaty_puppet_message_pb.MessageSendChannelRequest, wechaty_puppet_message_pb.MessageSendChannelResponse>;
|
|
1145
|
+
messageSendPost: grpc.handleUnaryCall<wechaty_puppet_message_pb.MessageSendPostRequest, wechaty_puppet_message_pb.MessageSendPostResponse>;
|
|
1135
1146
|
messagePreview: grpc.handleUnaryCall<wechaty_puppet_message_pb.MessagePreviewRequest, wechaty_puppet_message_pb.MessagePreviewResponse>;
|
|
1136
1147
|
getMessageBroadcastTarget: grpc.handleUnaryCall<wechaty_puppet_message_pb.GetMessageBroadcastTargetRequest, wechaty_puppet_message_pb.GetMessageBroadcastTargetResponse>;
|
|
1137
1148
|
createMessageBroadcast: grpc.handleUnaryCall<wechaty_puppet_message_pb.CreateMessageBroadcastRequest, wechaty_puppet_message_pb.CreateMessageBroadcastResponse>;
|
|
@@ -1343,6 +1354,9 @@ export interface IPuppetClient {
|
|
|
1343
1354
|
messageSendChannel(request: wechaty_puppet_message_pb.MessageSendChannelRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageSendChannelResponse) => void): grpc.ClientUnaryCall;
|
|
1344
1355
|
messageSendChannel(request: wechaty_puppet_message_pb.MessageSendChannelRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageSendChannelResponse) => void): grpc.ClientUnaryCall;
|
|
1345
1356
|
messageSendChannel(request: wechaty_puppet_message_pb.MessageSendChannelRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageSendChannelResponse) => void): grpc.ClientUnaryCall;
|
|
1357
|
+
messageSendPost(request: wechaty_puppet_message_pb.MessageSendPostRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageSendPostResponse) => void): grpc.ClientUnaryCall;
|
|
1358
|
+
messageSendPost(request: wechaty_puppet_message_pb.MessageSendPostRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageSendPostResponse) => void): grpc.ClientUnaryCall;
|
|
1359
|
+
messageSendPost(request: wechaty_puppet_message_pb.MessageSendPostRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageSendPostResponse) => void): grpc.ClientUnaryCall;
|
|
1346
1360
|
messagePreview(request: wechaty_puppet_message_pb.MessagePreviewRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessagePreviewResponse) => void): grpc.ClientUnaryCall;
|
|
1347
1361
|
messagePreview(request: wechaty_puppet_message_pb.MessagePreviewRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessagePreviewResponse) => void): grpc.ClientUnaryCall;
|
|
1348
1362
|
messagePreview(request: wechaty_puppet_message_pb.MessagePreviewRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessagePreviewResponse) => void): grpc.ClientUnaryCall;
|
|
@@ -1661,6 +1675,9 @@ export class PuppetClient extends grpc.Client implements IPuppetClient {
|
|
|
1661
1675
|
public messageSendChannel(request: wechaty_puppet_message_pb.MessageSendChannelRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageSendChannelResponse) => void): grpc.ClientUnaryCall;
|
|
1662
1676
|
public messageSendChannel(request: wechaty_puppet_message_pb.MessageSendChannelRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageSendChannelResponse) => void): grpc.ClientUnaryCall;
|
|
1663
1677
|
public messageSendChannel(request: wechaty_puppet_message_pb.MessageSendChannelRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageSendChannelResponse) => void): grpc.ClientUnaryCall;
|
|
1678
|
+
public messageSendPost(request: wechaty_puppet_message_pb.MessageSendPostRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageSendPostResponse) => void): grpc.ClientUnaryCall;
|
|
1679
|
+
public messageSendPost(request: wechaty_puppet_message_pb.MessageSendPostRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageSendPostResponse) => void): grpc.ClientUnaryCall;
|
|
1680
|
+
public messageSendPost(request: wechaty_puppet_message_pb.MessageSendPostRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessageSendPostResponse) => void): grpc.ClientUnaryCall;
|
|
1664
1681
|
public messagePreview(request: wechaty_puppet_message_pb.MessagePreviewRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessagePreviewResponse) => void): grpc.ClientUnaryCall;
|
|
1665
1682
|
public messagePreview(request: wechaty_puppet_message_pb.MessagePreviewRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessagePreviewResponse) => void): grpc.ClientUnaryCall;
|
|
1666
1683
|
public messagePreview(request: wechaty_puppet_message_pb.MessagePreviewRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.MessagePreviewResponse) => void): grpc.ClientUnaryCall;
|
|
@@ -1220,6 +1220,28 @@ function deserialize_wechaty_puppet_MessageSendMiniProgramResponse(buffer_arg) {
|
|
|
1220
1220
|
return wechaty_puppet_message_pb.MessageSendMiniProgramResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
1221
1221
|
}
|
|
1222
1222
|
|
|
1223
|
+
function serialize_wechaty_puppet_MessageSendPostRequest(arg) {
|
|
1224
|
+
if (!(arg instanceof wechaty_puppet_message_pb.MessageSendPostRequest)) {
|
|
1225
|
+
throw new Error('Expected argument of type wechaty.puppet.MessageSendPostRequest');
|
|
1226
|
+
}
|
|
1227
|
+
return Buffer.from(arg.serializeBinary());
|
|
1228
|
+
}
|
|
1229
|
+
|
|
1230
|
+
function deserialize_wechaty_puppet_MessageSendPostRequest(buffer_arg) {
|
|
1231
|
+
return wechaty_puppet_message_pb.MessageSendPostRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
function serialize_wechaty_puppet_MessageSendPostResponse(arg) {
|
|
1235
|
+
if (!(arg instanceof wechaty_puppet_message_pb.MessageSendPostResponse)) {
|
|
1236
|
+
throw new Error('Expected argument of type wechaty.puppet.MessageSendPostResponse');
|
|
1237
|
+
}
|
|
1238
|
+
return Buffer.from(arg.serializeBinary());
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
function deserialize_wechaty_puppet_MessageSendPostResponse(buffer_arg) {
|
|
1242
|
+
return wechaty_puppet_message_pb.MessageSendPostResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1223
1245
|
function serialize_wechaty_puppet_MessageSendTextRequest(arg) {
|
|
1224
1246
|
if (!(arg instanceof wechaty_puppet_message_pb.MessageSendTextRequest)) {
|
|
1225
1247
|
throw new Error('Expected argument of type wechaty.puppet.MessageSendTextRequest');
|
|
@@ -2895,6 +2917,17 @@ messageFile: {
|
|
|
2895
2917
|
responseSerialize: serialize_wechaty_puppet_MessageSendChannelResponse,
|
|
2896
2918
|
responseDeserialize: deserialize_wechaty_puppet_MessageSendChannelResponse,
|
|
2897
2919
|
},
|
|
2920
|
+
messageSendPost: {
|
|
2921
|
+
path: '/wechaty.Puppet/MessageSendPost',
|
|
2922
|
+
requestStream: false,
|
|
2923
|
+
responseStream: false,
|
|
2924
|
+
requestType: wechaty_puppet_message_pb.MessageSendPostRequest,
|
|
2925
|
+
responseType: wechaty_puppet_message_pb.MessageSendPostResponse,
|
|
2926
|
+
requestSerialize: serialize_wechaty_puppet_MessageSendPostRequest,
|
|
2927
|
+
requestDeserialize: deserialize_wechaty_puppet_MessageSendPostRequest,
|
|
2928
|
+
responseSerialize: serialize_wechaty_puppet_MessageSendPostResponse,
|
|
2929
|
+
responseDeserialize: deserialize_wechaty_puppet_MessageSendPostResponse,
|
|
2930
|
+
},
|
|
2898
2931
|
messagePreview: {
|
|
2899
2932
|
path: '/wechaty.Puppet/MessagePreview',
|
|
2900
2933
|
requestStream: false,
|
|
@@ -487,6 +487,15 @@ type PuppetMessageSendChannel = {
|
|
|
487
487
|
readonly responseType: typeof wechaty_puppet_message_pb.MessageSendChannelResponse;
|
|
488
488
|
};
|
|
489
489
|
|
|
490
|
+
type PuppetMessageSendPost = {
|
|
491
|
+
readonly methodName: string;
|
|
492
|
+
readonly service: typeof Puppet;
|
|
493
|
+
readonly requestStream: false;
|
|
494
|
+
readonly responseStream: false;
|
|
495
|
+
readonly requestType: typeof wechaty_puppet_message_pb.MessageSendPostRequest;
|
|
496
|
+
readonly responseType: typeof wechaty_puppet_message_pb.MessageSendPostResponse;
|
|
497
|
+
};
|
|
498
|
+
|
|
490
499
|
type PuppetMessagePreview = {
|
|
491
500
|
readonly methodName: string;
|
|
492
501
|
readonly service: typeof Puppet;
|
|
@@ -1018,6 +1027,7 @@ export class Puppet {
|
|
|
1018
1027
|
static readonly MessageSendUrl: PuppetMessageSendUrl;
|
|
1019
1028
|
static readonly MessageSendLocation: PuppetMessageSendLocation;
|
|
1020
1029
|
static readonly MessageSendChannel: PuppetMessageSendChannel;
|
|
1030
|
+
static readonly MessageSendPost: PuppetMessageSendPost;
|
|
1021
1031
|
static readonly MessagePreview: PuppetMessagePreview;
|
|
1022
1032
|
static readonly GetMessageBroadcastTarget: PuppetGetMessageBroadcastTarget;
|
|
1023
1033
|
static readonly CreateMessageBroadcast: PuppetCreateMessageBroadcast;
|
|
@@ -1565,6 +1575,15 @@ export class PuppetClient {
|
|
|
1565
1575
|
requestMessage: wechaty_puppet_message_pb.MessageSendChannelRequest,
|
|
1566
1576
|
callback: (error: ServiceError|null, responseMessage: wechaty_puppet_message_pb.MessageSendChannelResponse|null) => void
|
|
1567
1577
|
): UnaryResponse;
|
|
1578
|
+
messageSendPost(
|
|
1579
|
+
requestMessage: wechaty_puppet_message_pb.MessageSendPostRequest,
|
|
1580
|
+
metadata: grpc.Metadata,
|
|
1581
|
+
callback: (error: ServiceError|null, responseMessage: wechaty_puppet_message_pb.MessageSendPostResponse|null) => void
|
|
1582
|
+
): UnaryResponse;
|
|
1583
|
+
messageSendPost(
|
|
1584
|
+
requestMessage: wechaty_puppet_message_pb.MessageSendPostRequest,
|
|
1585
|
+
callback: (error: ServiceError|null, responseMessage: wechaty_puppet_message_pb.MessageSendPostResponse|null) => void
|
|
1586
|
+
): UnaryResponse;
|
|
1568
1587
|
messagePreview(
|
|
1569
1588
|
requestMessage: wechaty_puppet_message_pb.MessagePreviewRequest,
|
|
1570
1589
|
metadata: grpc.Metadata,
|
|
@@ -493,6 +493,15 @@ Puppet.MessageSendChannel = {
|
|
|
493
493
|
responseType: wechaty_puppet_message_pb.MessageSendChannelResponse
|
|
494
494
|
};
|
|
495
495
|
|
|
496
|
+
Puppet.MessageSendPost = {
|
|
497
|
+
methodName: "MessageSendPost",
|
|
498
|
+
service: Puppet,
|
|
499
|
+
requestStream: false,
|
|
500
|
+
responseStream: false,
|
|
501
|
+
requestType: wechaty_puppet_message_pb.MessageSendPostRequest,
|
|
502
|
+
responseType: wechaty_puppet_message_pb.MessageSendPostResponse
|
|
503
|
+
};
|
|
504
|
+
|
|
496
505
|
Puppet.MessagePreview = {
|
|
497
506
|
methodName: "MessagePreview",
|
|
498
507
|
service: Puppet,
|
|
@@ -2597,6 +2606,37 @@ PuppetClient.prototype.messageSendChannel = function messageSendChannel(requestM
|
|
|
2597
2606
|
};
|
|
2598
2607
|
};
|
|
2599
2608
|
|
|
2609
|
+
PuppetClient.prototype.messageSendPost = function messageSendPost(requestMessage, metadata, callback) {
|
|
2610
|
+
if (arguments.length === 2) {
|
|
2611
|
+
callback = arguments[1];
|
|
2612
|
+
}
|
|
2613
|
+
var client = grpc.unary(Puppet.MessageSendPost, {
|
|
2614
|
+
request: requestMessage,
|
|
2615
|
+
host: this.serviceHost,
|
|
2616
|
+
metadata: metadata,
|
|
2617
|
+
transport: this.options.transport,
|
|
2618
|
+
debug: this.options.debug,
|
|
2619
|
+
onEnd: function (response) {
|
|
2620
|
+
if (callback) {
|
|
2621
|
+
if (response.status !== grpc.Code.OK) {
|
|
2622
|
+
var err = new Error(response.statusMessage);
|
|
2623
|
+
err.code = response.status;
|
|
2624
|
+
err.metadata = response.trailers;
|
|
2625
|
+
callback(err, null);
|
|
2626
|
+
} else {
|
|
2627
|
+
callback(null, response.message);
|
|
2628
|
+
}
|
|
2629
|
+
}
|
|
2630
|
+
}
|
|
2631
|
+
});
|
|
2632
|
+
return {
|
|
2633
|
+
cancel: function () {
|
|
2634
|
+
callback = null;
|
|
2635
|
+
client.close();
|
|
2636
|
+
}
|
|
2637
|
+
};
|
|
2638
|
+
};
|
|
2639
|
+
|
|
2600
2640
|
PuppetClient.prototype.messagePreview = function messagePreview(requestMessage, metadata, callback) {
|
|
2601
2641
|
if (arguments.length === 2) {
|
|
2602
2642
|
callback = arguments[1];
|
package/package.json
CHANGED
package/src/package-json.ts
CHANGED