@juzi/wechaty-grpc 1.0.47 → 1.0.49
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 +88 -9
- package/dist/cjs/out/wechaty/puppet/message_pb.js +597 -40
- package/dist/cjs/out/wechaty/puppet.openapi.yaml +53 -10
- package/dist/cjs/out/wechaty/puppet.swagger.json +78 -13
- 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 +29 -8
- package/dist/cjs/proto/wechaty/puppet.proto +6 -0
- 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 +88 -9
- package/dist/esm/out/wechaty/puppet/message_pb.js +597 -40
- package/dist/esm/out/wechaty/puppet.openapi.yaml +53 -10
- package/dist/esm/out/wechaty/puppet.swagger.json +78 -13
- 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 +29 -8
- package/dist/esm/proto/wechaty/puppet.proto +6 -0
- 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 +88 -9
- package/out/wechaty/puppet/message_pb.js +597 -40
- package/out/wechaty/puppet.openapi.yaml +53 -10
- package/out/wechaty/puppet.swagger.json +78 -13
- 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
|
@@ -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.49
|
|
13
13
|
contact:
|
|
14
14
|
name: Wechaty
|
|
15
15
|
url: 'https://github.com/wechaty/openapi'
|
|
@@ -990,6 +990,25 @@ paths:
|
|
|
990
990
|
$ref: '#/definitions/rpcStatus'
|
|
991
991
|
tags:
|
|
992
992
|
- Puppet
|
|
993
|
+
'/message/broadcast/{id}':
|
|
994
|
+
get:
|
|
995
|
+
operationId: Puppet_GetMessageBroadcastStatus
|
|
996
|
+
responses:
|
|
997
|
+
'200':
|
|
998
|
+
description: A successful response.
|
|
999
|
+
schema:
|
|
1000
|
+
$ref: '#/definitions/puppetGetMessageBroadcastStatusResponse'
|
|
1001
|
+
default:
|
|
1002
|
+
description: An unexpected error response.
|
|
1003
|
+
schema:
|
|
1004
|
+
$ref: '#/definitions/rpcStatus'
|
|
1005
|
+
parameters:
|
|
1006
|
+
- name: id
|
|
1007
|
+
in: path
|
|
1008
|
+
required: true
|
|
1009
|
+
type: string
|
|
1010
|
+
tags:
|
|
1011
|
+
- Puppet
|
|
993
1012
|
'/message/{id}':
|
|
994
1013
|
get:
|
|
995
1014
|
operationId: Puppet_MessagePayload
|
|
@@ -2179,6 +2198,30 @@ definitions:
|
|
|
2179
2198
|
'@type':
|
|
2180
2199
|
type: string
|
|
2181
2200
|
additionalProperties: {}
|
|
2201
|
+
puppetBroadcastStatus:
|
|
2202
|
+
type: string
|
|
2203
|
+
enum:
|
|
2204
|
+
- BROADCAST_STATUS_UNKNWON
|
|
2205
|
+
- BROADCAST_STATUS_SENDING
|
|
2206
|
+
- BROADCAST_STATUS_SENT
|
|
2207
|
+
default: BROADCAST_STATUS_UNKNWON
|
|
2208
|
+
puppetBroadcastTarget:
|
|
2209
|
+
type: object
|
|
2210
|
+
properties:
|
|
2211
|
+
contactId:
|
|
2212
|
+
type: string
|
|
2213
|
+
roomId:
|
|
2214
|
+
type: string
|
|
2215
|
+
status:
|
|
2216
|
+
$ref: '#/definitions/puppetBroadcastTargetStatus'
|
|
2217
|
+
puppetBroadcastTargetStatus:
|
|
2218
|
+
type: string
|
|
2219
|
+
enum:
|
|
2220
|
+
- BROADCAST_TARGET_STATUS_UNSENT
|
|
2221
|
+
- BROADCAST_TARGET_STATUS_SENT
|
|
2222
|
+
- BROADCAST_TARGET_STATUS_NOT_FROEND
|
|
2223
|
+
- BROADCAST_TARGET_STATUS_OCCUPIED
|
|
2224
|
+
default: BROADCAST_TARGET_STATUS_UNSENT
|
|
2182
2225
|
puppetChannelPayload:
|
|
2183
2226
|
type: object
|
|
2184
2227
|
properties:
|
|
@@ -2385,8 +2428,6 @@ definitions:
|
|
|
2385
2428
|
type: array
|
|
2386
2429
|
items:
|
|
2387
2430
|
type: string
|
|
2388
|
-
type:
|
|
2389
|
-
$ref: '#/definitions/puppetMessageBroadcastTargetType'
|
|
2390
2431
|
content:
|
|
2391
2432
|
$ref: '#/definitions/puppetPostPayloadClient'
|
|
2392
2433
|
puppetCreateMessageBroadcastResponse:
|
|
@@ -2563,6 +2604,15 @@ definitions:
|
|
|
2563
2604
|
- FRIENDSHIP_TYPE_DELETE: 删除——主动删除好友时触发
|
|
2564
2605
|
- FRIENDSHIP_TYPE_REMOVED: 被删除——被他人删除好友时触发
|
|
2565
2606
|
title: 事件类型
|
|
2607
|
+
puppetGetMessageBroadcastStatusResponse:
|
|
2608
|
+
type: object
|
|
2609
|
+
properties:
|
|
2610
|
+
status:
|
|
2611
|
+
$ref: '#/definitions/puppetBroadcastStatus'
|
|
2612
|
+
detail:
|
|
2613
|
+
type: array
|
|
2614
|
+
items:
|
|
2615
|
+
$ref: '#/definitions/puppetBroadcastTarget'
|
|
2566
2616
|
puppetGetMessageBroadcastTargetResponse:
|
|
2567
2617
|
type: object
|
|
2568
2618
|
properties:
|
|
@@ -2605,13 +2655,6 @@ definitions:
|
|
|
2605
2655
|
title: 地址名,例如xx大厦
|
|
2606
2656
|
puppetLogoutResponse:
|
|
2607
2657
|
type: object
|
|
2608
|
-
puppetMessageBroadcastTargetType:
|
|
2609
|
-
type: string
|
|
2610
|
-
enum:
|
|
2611
|
-
- MESSAGE_BROADCAST_TARGET_TYPE_UNKNOWN
|
|
2612
|
-
- MESSAGE_BROADCAST_TARGET_TYPE_CONTACT
|
|
2613
|
-
- MESSAGE_BROADCAST_TARGET_TYPE_ROOM
|
|
2614
|
-
default: MESSAGE_BROADCAST_TARGET_TYPE_UNKNOWN
|
|
2615
2658
|
puppetMessageChannelResponse:
|
|
2616
2659
|
type: object
|
|
2617
2660
|
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.49",
|
|
7
7
|
"contact": {
|
|
8
8
|
"name": "Wechaty",
|
|
9
9
|
"url": "https://github.com/wechaty/openapi",
|
|
@@ -1446,6 +1446,36 @@
|
|
|
1446
1446
|
]
|
|
1447
1447
|
}
|
|
1448
1448
|
},
|
|
1449
|
+
"/message/broadcast/{id}": {
|
|
1450
|
+
"get": {
|
|
1451
|
+
"operationId": "Puppet_GetMessageBroadcastStatus",
|
|
1452
|
+
"responses": {
|
|
1453
|
+
"200": {
|
|
1454
|
+
"description": "A successful response.",
|
|
1455
|
+
"schema": {
|
|
1456
|
+
"$ref": "#/definitions/puppetGetMessageBroadcastStatusResponse"
|
|
1457
|
+
}
|
|
1458
|
+
},
|
|
1459
|
+
"default": {
|
|
1460
|
+
"description": "An unexpected error response.",
|
|
1461
|
+
"schema": {
|
|
1462
|
+
"$ref": "#/definitions/rpcStatus"
|
|
1463
|
+
}
|
|
1464
|
+
}
|
|
1465
|
+
},
|
|
1466
|
+
"parameters": [
|
|
1467
|
+
{
|
|
1468
|
+
"name": "id",
|
|
1469
|
+
"in": "path",
|
|
1470
|
+
"required": true,
|
|
1471
|
+
"type": "string"
|
|
1472
|
+
}
|
|
1473
|
+
],
|
|
1474
|
+
"tags": [
|
|
1475
|
+
"Puppet"
|
|
1476
|
+
]
|
|
1477
|
+
}
|
|
1478
|
+
},
|
|
1449
1479
|
"/message/{id}": {
|
|
1450
1480
|
"get": {
|
|
1451
1481
|
"operationId": "Puppet_MessagePayload",
|
|
@@ -3258,6 +3288,39 @@
|
|
|
3258
3288
|
},
|
|
3259
3289
|
"additionalProperties": {}
|
|
3260
3290
|
},
|
|
3291
|
+
"puppetBroadcastStatus": {
|
|
3292
|
+
"type": "string",
|
|
3293
|
+
"enum": [
|
|
3294
|
+
"BROADCAST_STATUS_UNKNWON",
|
|
3295
|
+
"BROADCAST_STATUS_SENDING",
|
|
3296
|
+
"BROADCAST_STATUS_SENT"
|
|
3297
|
+
],
|
|
3298
|
+
"default": "BROADCAST_STATUS_UNKNWON"
|
|
3299
|
+
},
|
|
3300
|
+
"puppetBroadcastTarget": {
|
|
3301
|
+
"type": "object",
|
|
3302
|
+
"properties": {
|
|
3303
|
+
"contactId": {
|
|
3304
|
+
"type": "string"
|
|
3305
|
+
},
|
|
3306
|
+
"roomId": {
|
|
3307
|
+
"type": "string"
|
|
3308
|
+
},
|
|
3309
|
+
"status": {
|
|
3310
|
+
"$ref": "#/definitions/puppetBroadcastTargetStatus"
|
|
3311
|
+
}
|
|
3312
|
+
}
|
|
3313
|
+
},
|
|
3314
|
+
"puppetBroadcastTargetStatus": {
|
|
3315
|
+
"type": "string",
|
|
3316
|
+
"enum": [
|
|
3317
|
+
"BROADCAST_TARGET_STATUS_UNSENT",
|
|
3318
|
+
"BROADCAST_TARGET_STATUS_SENT",
|
|
3319
|
+
"BROADCAST_TARGET_STATUS_NOT_FROEND",
|
|
3320
|
+
"BROADCAST_TARGET_STATUS_OCCUPIED"
|
|
3321
|
+
],
|
|
3322
|
+
"default": "BROADCAST_TARGET_STATUS_UNSENT"
|
|
3323
|
+
},
|
|
3261
3324
|
"puppetChannelPayload": {
|
|
3262
3325
|
"type": "object",
|
|
3263
3326
|
"properties": {
|
|
@@ -3514,9 +3577,6 @@
|
|
|
3514
3577
|
"type": "string"
|
|
3515
3578
|
}
|
|
3516
3579
|
},
|
|
3517
|
-
"type": {
|
|
3518
|
-
"$ref": "#/definitions/puppetMessageBroadcastTargetType"
|
|
3519
|
-
},
|
|
3520
3580
|
"content": {
|
|
3521
3581
|
"$ref": "#/definitions/puppetPostPayloadClient"
|
|
3522
3582
|
}
|
|
@@ -3710,6 +3770,20 @@
|
|
|
3710
3770
|
"description": "- FRIENDSHIP_TYPE_UNSPECIFIED: 不明确\n - FRIENDSHIP_TYPE_CONFIRM: 确认——双方互加后触发\n - FRIENDSHIP_TYPE_RECEIVE: 收到——收到好友请求后触发\n - FRIENDSHIP_TYPE_VERIFY: 验证——主动加他人为好友时触发,wxwork里暂无此事件\n - FRIENDSHIP_TYPE_DELETE: 删除——主动删除好友时触发\n - FRIENDSHIP_TYPE_REMOVED: 被删除——被他人删除好友时触发",
|
|
3711
3771
|
"title": "事件类型"
|
|
3712
3772
|
},
|
|
3773
|
+
"puppetGetMessageBroadcastStatusResponse": {
|
|
3774
|
+
"type": "object",
|
|
3775
|
+
"properties": {
|
|
3776
|
+
"status": {
|
|
3777
|
+
"$ref": "#/definitions/puppetBroadcastStatus"
|
|
3778
|
+
},
|
|
3779
|
+
"detail": {
|
|
3780
|
+
"type": "array",
|
|
3781
|
+
"items": {
|
|
3782
|
+
"$ref": "#/definitions/puppetBroadcastTarget"
|
|
3783
|
+
}
|
|
3784
|
+
}
|
|
3785
|
+
}
|
|
3786
|
+
},
|
|
3713
3787
|
"puppetGetMessageBroadcastTargetResponse": {
|
|
3714
3788
|
"type": "object",
|
|
3715
3789
|
"properties": {
|
|
@@ -3768,15 +3842,6 @@
|
|
|
3768
3842
|
"puppetLogoutResponse": {
|
|
3769
3843
|
"type": "object"
|
|
3770
3844
|
},
|
|
3771
|
-
"puppetMessageBroadcastTargetType": {
|
|
3772
|
-
"type": "string",
|
|
3773
|
-
"enum": [
|
|
3774
|
-
"MESSAGE_BROADCAST_TARGET_TYPE_UNKNOWN",
|
|
3775
|
-
"MESSAGE_BROADCAST_TARGET_TYPE_CONTACT",
|
|
3776
|
-
"MESSAGE_BROADCAST_TARGET_TYPE_ROOM"
|
|
3777
|
-
],
|
|
3778
|
-
"default": "MESSAGE_BROADCAST_TARGET_TYPE_UNKNOWN"
|
|
3779
|
-
},
|
|
3780
3845
|
"puppetMessageChannelResponse": {
|
|
3781
3846
|
"type": "object",
|
|
3782
3847
|
"properties": {
|
|
@@ -70,6 +70,7 @@ interface IPuppetService extends grpc.ServiceDefinition<grpc.UntypedServiceImple
|
|
|
70
70
|
messagePreview: IPuppetService_IMessagePreview;
|
|
71
71
|
getMessageBroadcastTarget: IPuppetService_IGetMessageBroadcastTarget;
|
|
72
72
|
createMessageBroadcast: IPuppetService_ICreateMessageBroadcast;
|
|
73
|
+
getMessageBroadcastStatus: IPuppetService_IGetMessageBroadcastStatus;
|
|
73
74
|
roomPayload: IPuppetService_IRoomPayload;
|
|
74
75
|
roomList: IPuppetService_IRoomList;
|
|
75
76
|
roomAdd: IPuppetService_IRoomAdd;
|
|
@@ -532,6 +533,15 @@ interface IPuppetService_ICreateMessageBroadcast extends grpc.MethodDefinition<w
|
|
|
532
533
|
responseSerialize: grpc.serialize<wechaty_puppet_message_pb.CreateMessageBroadcastResponse>;
|
|
533
534
|
responseDeserialize: grpc.deserialize<wechaty_puppet_message_pb.CreateMessageBroadcastResponse>;
|
|
534
535
|
}
|
|
536
|
+
interface IPuppetService_IGetMessageBroadcastStatus extends grpc.MethodDefinition<wechaty_puppet_message_pb.GetMessageBroadcastStatusRequest, wechaty_puppet_message_pb.GetMessageBroadcastStatusResponse> {
|
|
537
|
+
path: "/wechaty.Puppet/GetMessageBroadcastStatus";
|
|
538
|
+
requestStream: false;
|
|
539
|
+
responseStream: false;
|
|
540
|
+
requestSerialize: grpc.serialize<wechaty_puppet_message_pb.GetMessageBroadcastStatusRequest>;
|
|
541
|
+
requestDeserialize: grpc.deserialize<wechaty_puppet_message_pb.GetMessageBroadcastStatusRequest>;
|
|
542
|
+
responseSerialize: grpc.serialize<wechaty_puppet_message_pb.GetMessageBroadcastStatusResponse>;
|
|
543
|
+
responseDeserialize: grpc.deserialize<wechaty_puppet_message_pb.GetMessageBroadcastStatusResponse>;
|
|
544
|
+
}
|
|
535
545
|
interface IPuppetService_IRoomPayload extends grpc.MethodDefinition<wechaty_puppet_room_pb.RoomPayloadRequest, wechaty_puppet_room_pb.RoomPayloadResponse> {
|
|
536
546
|
path: "/wechaty.Puppet/RoomPayload";
|
|
537
547
|
requestStream: false;
|
|
@@ -916,6 +926,7 @@ export interface IPuppetServer extends grpc.UntypedServiceImplementation {
|
|
|
916
926
|
messagePreview: grpc.handleUnaryCall<wechaty_puppet_message_pb.MessagePreviewRequest, wechaty_puppet_message_pb.MessagePreviewResponse>;
|
|
917
927
|
getMessageBroadcastTarget: grpc.handleUnaryCall<wechaty_puppet_message_pb.GetMessageBroadcastTargetRequest, wechaty_puppet_message_pb.GetMessageBroadcastTargetResponse>;
|
|
918
928
|
createMessageBroadcast: grpc.handleUnaryCall<wechaty_puppet_message_pb.CreateMessageBroadcastRequest, wechaty_puppet_message_pb.CreateMessageBroadcastResponse>;
|
|
929
|
+
getMessageBroadcastStatus: grpc.handleUnaryCall<wechaty_puppet_message_pb.GetMessageBroadcastStatusRequest, wechaty_puppet_message_pb.GetMessageBroadcastStatusResponse>;
|
|
919
930
|
roomPayload: grpc.handleUnaryCall<wechaty_puppet_room_pb.RoomPayloadRequest, wechaty_puppet_room_pb.RoomPayloadResponse>;
|
|
920
931
|
roomList: grpc.handleUnaryCall<wechaty_puppet_room_pb.RoomListRequest, wechaty_puppet_room_pb.RoomListResponse>;
|
|
921
932
|
roomAdd: grpc.handleUnaryCall<wechaty_puppet_room_pb.RoomAddRequest, wechaty_puppet_room_pb.RoomAddResponse>;
|
|
@@ -1096,6 +1107,9 @@ export interface IPuppetClient {
|
|
|
1096
1107
|
createMessageBroadcast(request: wechaty_puppet_message_pb.CreateMessageBroadcastRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.CreateMessageBroadcastResponse) => void): grpc.ClientUnaryCall;
|
|
1097
1108
|
createMessageBroadcast(request: wechaty_puppet_message_pb.CreateMessageBroadcastRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.CreateMessageBroadcastResponse) => void): grpc.ClientUnaryCall;
|
|
1098
1109
|
createMessageBroadcast(request: wechaty_puppet_message_pb.CreateMessageBroadcastRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.CreateMessageBroadcastResponse) => void): grpc.ClientUnaryCall;
|
|
1110
|
+
getMessageBroadcastStatus(request: wechaty_puppet_message_pb.GetMessageBroadcastStatusRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.GetMessageBroadcastStatusResponse) => void): grpc.ClientUnaryCall;
|
|
1111
|
+
getMessageBroadcastStatus(request: wechaty_puppet_message_pb.GetMessageBroadcastStatusRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.GetMessageBroadcastStatusResponse) => void): grpc.ClientUnaryCall;
|
|
1112
|
+
getMessageBroadcastStatus(request: wechaty_puppet_message_pb.GetMessageBroadcastStatusRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.GetMessageBroadcastStatusResponse) => void): grpc.ClientUnaryCall;
|
|
1099
1113
|
roomPayload(request: wechaty_puppet_room_pb.RoomPayloadRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_pb.RoomPayloadResponse) => void): grpc.ClientUnaryCall;
|
|
1100
1114
|
roomPayload(request: wechaty_puppet_room_pb.RoomPayloadRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_pb.RoomPayloadResponse) => void): grpc.ClientUnaryCall;
|
|
1101
1115
|
roomPayload(request: wechaty_puppet_room_pb.RoomPayloadRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_pb.RoomPayloadResponse) => void): grpc.ClientUnaryCall;
|
|
@@ -1351,6 +1365,9 @@ export class PuppetClient extends grpc.Client implements IPuppetClient {
|
|
|
1351
1365
|
public createMessageBroadcast(request: wechaty_puppet_message_pb.CreateMessageBroadcastRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.CreateMessageBroadcastResponse) => void): grpc.ClientUnaryCall;
|
|
1352
1366
|
public createMessageBroadcast(request: wechaty_puppet_message_pb.CreateMessageBroadcastRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.CreateMessageBroadcastResponse) => void): grpc.ClientUnaryCall;
|
|
1353
1367
|
public createMessageBroadcast(request: wechaty_puppet_message_pb.CreateMessageBroadcastRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.CreateMessageBroadcastResponse) => void): grpc.ClientUnaryCall;
|
|
1368
|
+
public getMessageBroadcastStatus(request: wechaty_puppet_message_pb.GetMessageBroadcastStatusRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.GetMessageBroadcastStatusResponse) => void): grpc.ClientUnaryCall;
|
|
1369
|
+
public getMessageBroadcastStatus(request: wechaty_puppet_message_pb.GetMessageBroadcastStatusRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.GetMessageBroadcastStatusResponse) => void): grpc.ClientUnaryCall;
|
|
1370
|
+
public getMessageBroadcastStatus(request: wechaty_puppet_message_pb.GetMessageBroadcastStatusRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_message_pb.GetMessageBroadcastStatusResponse) => void): grpc.ClientUnaryCall;
|
|
1354
1371
|
public roomPayload(request: wechaty_puppet_room_pb.RoomPayloadRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_pb.RoomPayloadResponse) => void): grpc.ClientUnaryCall;
|
|
1355
1372
|
public roomPayload(request: wechaty_puppet_room_pb.RoomPayloadRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_pb.RoomPayloadResponse) => void): grpc.ClientUnaryCall;
|
|
1356
1373
|
public roomPayload(request: wechaty_puppet_room_pb.RoomPayloadRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_room_pb.RoomPayloadResponse) => void): grpc.ClientUnaryCall;
|
|
@@ -559,6 +559,28 @@ function deserialize_wechaty_puppet_FriendshipSearchPhoneResponse(buffer_arg) {
|
|
|
559
559
|
return wechaty_puppet_friendship_pb.FriendshipSearchPhoneResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
560
560
|
}
|
|
561
561
|
|
|
562
|
+
function serialize_wechaty_puppet_GetMessageBroadcastStatusRequest(arg) {
|
|
563
|
+
if (!(arg instanceof wechaty_puppet_message_pb.GetMessageBroadcastStatusRequest)) {
|
|
564
|
+
throw new Error('Expected argument of type wechaty.puppet.GetMessageBroadcastStatusRequest');
|
|
565
|
+
}
|
|
566
|
+
return Buffer.from(arg.serializeBinary());
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
function deserialize_wechaty_puppet_GetMessageBroadcastStatusRequest(buffer_arg) {
|
|
570
|
+
return wechaty_puppet_message_pb.GetMessageBroadcastStatusRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
function serialize_wechaty_puppet_GetMessageBroadcastStatusResponse(arg) {
|
|
574
|
+
if (!(arg instanceof wechaty_puppet_message_pb.GetMessageBroadcastStatusResponse)) {
|
|
575
|
+
throw new Error('Expected argument of type wechaty.puppet.GetMessageBroadcastStatusResponse');
|
|
576
|
+
}
|
|
577
|
+
return Buffer.from(arg.serializeBinary());
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
function deserialize_wechaty_puppet_GetMessageBroadcastStatusResponse(buffer_arg) {
|
|
581
|
+
return wechaty_puppet_message_pb.GetMessageBroadcastStatusResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
582
|
+
}
|
|
583
|
+
|
|
562
584
|
function serialize_wechaty_puppet_GetMessageBroadcastTargetRequest(arg) {
|
|
563
585
|
if (!(arg instanceof wechaty_puppet_message_pb.GetMessageBroadcastTargetRequest)) {
|
|
564
586
|
throw new Error('Expected argument of type wechaty.puppet.GetMessageBroadcastTargetRequest');
|
|
@@ -2410,6 +2432,17 @@ messageFile: {
|
|
|
2410
2432
|
responseSerialize: serialize_wechaty_puppet_CreateMessageBroadcastResponse,
|
|
2411
2433
|
responseDeserialize: deserialize_wechaty_puppet_CreateMessageBroadcastResponse,
|
|
2412
2434
|
},
|
|
2435
|
+
getMessageBroadcastStatus: {
|
|
2436
|
+
path: '/wechaty.Puppet/GetMessageBroadcastStatus',
|
|
2437
|
+
requestStream: false,
|
|
2438
|
+
responseStream: false,
|
|
2439
|
+
requestType: wechaty_puppet_message_pb.GetMessageBroadcastStatusRequest,
|
|
2440
|
+
responseType: wechaty_puppet_message_pb.GetMessageBroadcastStatusResponse,
|
|
2441
|
+
requestSerialize: serialize_wechaty_puppet_GetMessageBroadcastStatusRequest,
|
|
2442
|
+
requestDeserialize: deserialize_wechaty_puppet_GetMessageBroadcastStatusRequest,
|
|
2443
|
+
responseSerialize: serialize_wechaty_puppet_GetMessageBroadcastStatusResponse,
|
|
2444
|
+
responseDeserialize: deserialize_wechaty_puppet_GetMessageBroadcastStatusResponse,
|
|
2445
|
+
},
|
|
2413
2446
|
// *
|
|
2414
2447
|
//
|
|
2415
2448
|
// Room
|
|
@@ -440,6 +440,15 @@ type PuppetCreateMessageBroadcast = {
|
|
|
440
440
|
readonly responseType: typeof wechaty_puppet_message_pb.CreateMessageBroadcastResponse;
|
|
441
441
|
};
|
|
442
442
|
|
|
443
|
+
type PuppetGetMessageBroadcastStatus = {
|
|
444
|
+
readonly methodName: string;
|
|
445
|
+
readonly service: typeof Puppet;
|
|
446
|
+
readonly requestStream: false;
|
|
447
|
+
readonly responseStream: false;
|
|
448
|
+
readonly requestType: typeof wechaty_puppet_message_pb.GetMessageBroadcastStatusRequest;
|
|
449
|
+
readonly responseType: typeof wechaty_puppet_message_pb.GetMessageBroadcastStatusResponse;
|
|
450
|
+
};
|
|
451
|
+
|
|
443
452
|
type PuppetRoomPayload = {
|
|
444
453
|
readonly methodName: string;
|
|
445
454
|
readonly service: typeof Puppet;
|
|
@@ -822,6 +831,7 @@ export class Puppet {
|
|
|
822
831
|
static readonly MessagePreview: PuppetMessagePreview;
|
|
823
832
|
static readonly GetMessageBroadcastTarget: PuppetGetMessageBroadcastTarget;
|
|
824
833
|
static readonly CreateMessageBroadcast: PuppetCreateMessageBroadcast;
|
|
834
|
+
static readonly GetMessageBroadcastStatus: PuppetGetMessageBroadcastStatus;
|
|
825
835
|
static readonly RoomPayload: PuppetRoomPayload;
|
|
826
836
|
static readonly RoomList: PuppetRoomList;
|
|
827
837
|
static readonly RoomAdd: PuppetRoomAdd;
|
|
@@ -1308,6 +1318,15 @@ export class PuppetClient {
|
|
|
1308
1318
|
requestMessage: wechaty_puppet_message_pb.CreateMessageBroadcastRequest,
|
|
1309
1319
|
callback: (error: ServiceError|null, responseMessage: wechaty_puppet_message_pb.CreateMessageBroadcastResponse|null) => void
|
|
1310
1320
|
): UnaryResponse;
|
|
1321
|
+
getMessageBroadcastStatus(
|
|
1322
|
+
requestMessage: wechaty_puppet_message_pb.GetMessageBroadcastStatusRequest,
|
|
1323
|
+
metadata: grpc.Metadata,
|
|
1324
|
+
callback: (error: ServiceError|null, responseMessage: wechaty_puppet_message_pb.GetMessageBroadcastStatusResponse|null) => void
|
|
1325
|
+
): UnaryResponse;
|
|
1326
|
+
getMessageBroadcastStatus(
|
|
1327
|
+
requestMessage: wechaty_puppet_message_pb.GetMessageBroadcastStatusRequest,
|
|
1328
|
+
callback: (error: ServiceError|null, responseMessage: wechaty_puppet_message_pb.GetMessageBroadcastStatusResponse|null) => void
|
|
1329
|
+
): UnaryResponse;
|
|
1311
1330
|
roomPayload(
|
|
1312
1331
|
requestMessage: wechaty_puppet_room_pb.RoomPayloadRequest,
|
|
1313
1332
|
metadata: grpc.Metadata,
|
|
@@ -446,6 +446,15 @@ Puppet.CreateMessageBroadcast = {
|
|
|
446
446
|
responseType: wechaty_puppet_message_pb.CreateMessageBroadcastResponse
|
|
447
447
|
};
|
|
448
448
|
|
|
449
|
+
Puppet.GetMessageBroadcastStatus = {
|
|
450
|
+
methodName: "GetMessageBroadcastStatus",
|
|
451
|
+
service: Puppet,
|
|
452
|
+
requestStream: false,
|
|
453
|
+
responseStream: false,
|
|
454
|
+
requestType: wechaty_puppet_message_pb.GetMessageBroadcastStatusRequest,
|
|
455
|
+
responseType: wechaty_puppet_message_pb.GetMessageBroadcastStatusResponse
|
|
456
|
+
};
|
|
457
|
+
|
|
449
458
|
Puppet.RoomPayload = {
|
|
450
459
|
methodName: "RoomPayload",
|
|
451
460
|
service: Puppet,
|
|
@@ -2251,6 +2260,37 @@ PuppetClient.prototype.createMessageBroadcast = function createMessageBroadcast(
|
|
|
2251
2260
|
};
|
|
2252
2261
|
};
|
|
2253
2262
|
|
|
2263
|
+
PuppetClient.prototype.getMessageBroadcastStatus = function getMessageBroadcastStatus(requestMessage, metadata, callback) {
|
|
2264
|
+
if (arguments.length === 2) {
|
|
2265
|
+
callback = arguments[1];
|
|
2266
|
+
}
|
|
2267
|
+
var client = grpc.unary(Puppet.GetMessageBroadcastStatus, {
|
|
2268
|
+
request: requestMessage,
|
|
2269
|
+
host: this.serviceHost,
|
|
2270
|
+
metadata: metadata,
|
|
2271
|
+
transport: this.options.transport,
|
|
2272
|
+
debug: this.options.debug,
|
|
2273
|
+
onEnd: function (response) {
|
|
2274
|
+
if (callback) {
|
|
2275
|
+
if (response.status !== grpc.Code.OK) {
|
|
2276
|
+
var err = new Error(response.statusMessage);
|
|
2277
|
+
err.code = response.status;
|
|
2278
|
+
err.metadata = response.trailers;
|
|
2279
|
+
callback(err, null);
|
|
2280
|
+
} else {
|
|
2281
|
+
callback(null, response.message);
|
|
2282
|
+
}
|
|
2283
|
+
}
|
|
2284
|
+
}
|
|
2285
|
+
});
|
|
2286
|
+
return {
|
|
2287
|
+
cancel: function () {
|
|
2288
|
+
callback = null;
|
|
2289
|
+
client.close();
|
|
2290
|
+
}
|
|
2291
|
+
};
|
|
2292
|
+
};
|
|
2293
|
+
|
|
2254
2294
|
PuppetClient.prototype.roomPayload = function roomPayload(requestMessage, metadata, callback) {
|
|
2255
2295
|
if (arguments.length === 2) {
|
|
2256
2296
|
callback = arguments[1];
|
package/package.json
CHANGED
package/src/package-json.ts
CHANGED