@juzi/wechaty-grpc 1.0.85 → 1.0.87
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/room_pb.d.ts +8 -0
- package/dist/cjs/out/wechaty/puppet/room_pb.js +62 -2
- package/dist/cjs/out/wechaty/puppet.openapi.yaml +48 -1
- package/dist/cjs/out/wechaty/puppet.swagger.json +72 -1
- 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/room.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/room_pb.d.ts +8 -0
- package/dist/esm/out/wechaty/puppet/room_pb.js +62 -2
- package/dist/esm/out/wechaty/puppet.openapi.yaml +48 -1
- package/dist/esm/out/wechaty/puppet.swagger.json +72 -1
- 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/room.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/room_pb.d.ts +8 -0
- package/out/wechaty/puppet/room_pb.js +62 -2
- package/out/wechaty/puppet.openapi.yaml +48 -1
- package/out/wechaty/puppet.swagger.json +72 -1
- 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
|
@@ -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.87",
|
|
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",
|
|
@@ -2941,6 +2980,18 @@
|
|
|
2941
2980
|
"BOOL_TRUE"
|
|
2942
2981
|
],
|
|
2943
2982
|
"default": "BOOL_UNSET"
|
|
2983
|
+
},
|
|
2984
|
+
{
|
|
2985
|
+
"name": "disableMemberMutualAdd",
|
|
2986
|
+
"in": "query",
|
|
2987
|
+
"required": false,
|
|
2988
|
+
"type": "string",
|
|
2989
|
+
"enum": [
|
|
2990
|
+
"BOOL_UNSET",
|
|
2991
|
+
"BOOL_FALSE",
|
|
2992
|
+
"BOOL_TRUE"
|
|
2993
|
+
],
|
|
2994
|
+
"default": "BOOL_UNSET"
|
|
2944
2995
|
}
|
|
2945
2996
|
],
|
|
2946
2997
|
"tags": [
|
|
@@ -4034,6 +4085,15 @@
|
|
|
4034
4085
|
}
|
|
4035
4086
|
}
|
|
4036
4087
|
},
|
|
4088
|
+
"PuppetMessageSendPostBody": {
|
|
4089
|
+
"type": "object",
|
|
4090
|
+
"properties": {
|
|
4091
|
+
"content": {
|
|
4092
|
+
"$ref": "#/definitions/puppetPostPayloadClient",
|
|
4093
|
+
"title": "发送的post内容"
|
|
4094
|
+
}
|
|
4095
|
+
}
|
|
4096
|
+
},
|
|
4037
4097
|
"PuppetMessageSendTextBody": {
|
|
4038
4098
|
"type": "object",
|
|
4039
4099
|
"properties": {
|
|
@@ -5186,6 +5246,14 @@
|
|
|
5186
5246
|
}
|
|
5187
5247
|
}
|
|
5188
5248
|
},
|
|
5249
|
+
"puppetMessageSendPostResponse": {
|
|
5250
|
+
"type": "object",
|
|
5251
|
+
"properties": {
|
|
5252
|
+
"id": {
|
|
5253
|
+
"type": "string"
|
|
5254
|
+
}
|
|
5255
|
+
}
|
|
5256
|
+
},
|
|
5189
5257
|
"puppetMessageSendTextResponse": {
|
|
5190
5258
|
"type": "object",
|
|
5191
5259
|
"properties": {
|
|
@@ -5847,6 +5915,9 @@
|
|
|
5847
5915
|
},
|
|
5848
5916
|
"forbidRoomTopicEdit": {
|
|
5849
5917
|
"$ref": "#/definitions/puppetOptionalBoolean"
|
|
5918
|
+
},
|
|
5919
|
+
"disableMemberMutualAdd": {
|
|
5920
|
+
"$ref": "#/definitions/puppetOptionalBoolean"
|
|
5850
5921
|
}
|
|
5851
5922
|
}
|
|
5852
5923
|
},
|
|
@@ -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