@juzi/wechaty-grpc 1.0.106 → 1.0.108
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/call_pb.d.ts +54 -0
- package/dist/cjs/out/wechaty/puppet/call_pb.js +420 -0
- package/dist/cjs/out/wechaty/puppet/event_pb.d.ts +1 -0
- package/dist/cjs/out/wechaty/puppet/event_pb.js +2 -1
- package/dist/cjs/out/wechaty/puppet.openapi.yaml +70 -7
- package/dist/cjs/out/wechaty/puppet.swagger.json +78 -9
- 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/call.proto +24 -0
- package/dist/cjs/proto/wechaty/puppet/event.proto +2 -0
- package/dist/cjs/proto/wechaty/puppet.proto +6 -0
- package/dist/cjs/src/package-json.d.ts.map +1 -1
- package/dist/cjs/src/package-json.js +2 -1
- package/dist/cjs/src/package-json.js.map +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/call_pb.d.ts +54 -0
- package/dist/esm/out/wechaty/puppet/call_pb.js +420 -0
- package/dist/esm/out/wechaty/puppet/event_pb.d.ts +1 -0
- package/dist/esm/out/wechaty/puppet/event_pb.js +2 -1
- package/dist/esm/out/wechaty/puppet.openapi.yaml +70 -7
- package/dist/esm/out/wechaty/puppet.swagger.json +78 -9
- 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/call.proto +24 -0
- package/dist/esm/proto/wechaty/puppet/event.proto +2 -0
- package/dist/esm/proto/wechaty/puppet.proto +6 -0
- package/dist/esm/src/package-json.d.ts.map +1 -1
- package/dist/esm/src/package-json.js +2 -1
- package/dist/esm/src/package-json.js.map +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/call_pb.d.ts +54 -0
- package/out/wechaty/puppet/call_pb.js +420 -0
- package/out/wechaty/puppet/event_pb.d.ts +1 -0
- package/out/wechaty/puppet/event_pb.js +2 -1
- package/out/wechaty/puppet.openapi.yaml +70 -7
- package/out/wechaty/puppet.swagger.json +78 -9
- 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 +2 -1
- package/src/package-json.ts +2 -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.108",
|
|
7
7
|
"contact": {
|
|
8
8
|
"name": "Wechaty",
|
|
9
9
|
"url": "https://github.com/wechaty/openapi",
|
|
@@ -58,6 +58,38 @@
|
|
|
58
58
|
]
|
|
59
59
|
}
|
|
60
60
|
},
|
|
61
|
+
"/call/invite-with-media": {
|
|
62
|
+
"post": {
|
|
63
|
+
"operationId": "Puppet_CallInviteWithMedia",
|
|
64
|
+
"responses": {
|
|
65
|
+
"200": {
|
|
66
|
+
"description": "A successful response.",
|
|
67
|
+
"schema": {
|
|
68
|
+
"$ref": "#/definitions/puppetCallInviteWithMediaResponse"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"default": {
|
|
72
|
+
"description": "An unexpected error response.",
|
|
73
|
+
"schema": {
|
|
74
|
+
"$ref": "#/definitions/rpcStatus"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"parameters": [
|
|
79
|
+
{
|
|
80
|
+
"name": "body",
|
|
81
|
+
"in": "body",
|
|
82
|
+
"required": true,
|
|
83
|
+
"schema": {
|
|
84
|
+
"$ref": "#/definitions/puppetCallInviteWithMediaRequest"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
"tags": [
|
|
89
|
+
"Puppet"
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
},
|
|
61
93
|
"/call/{callId}/accept": {
|
|
62
94
|
"post": {
|
|
63
95
|
"operationId": "Puppet_CallAccept",
|
|
@@ -5378,6 +5410,41 @@
|
|
|
5378
5410
|
},
|
|
5379
5411
|
"title": "CallInvite 响应:\n- call_id 由 puppet 实现侧(协议端)生成并经本响应返回,全链路以此关联控制面与媒体旁路;\n- 上行 EVENT_TYPE_CALL 事件可能先于本响应到达,客户端须容忍乱序;\n- 后续控制 RPC(CallAccept/CallReject/CallCancel/CallHangup)凭此 call_id 引用本通通话。"
|
|
5380
5412
|
},
|
|
5413
|
+
"puppetCallInviteWithMediaRequest": {
|
|
5414
|
+
"type": "object",
|
|
5415
|
+
"properties": {
|
|
5416
|
+
"contactIds": {
|
|
5417
|
+
"type": "array",
|
|
5418
|
+
"items": {
|
|
5419
|
+
"type": "string"
|
|
5420
|
+
},
|
|
5421
|
+
"title": "对齐 CallInviteRequest:单元素 = 1v1,多元素 = 群通话播报(当前无实现支持,实现侧可拒 UNIMPLEMENTED)"
|
|
5422
|
+
},
|
|
5423
|
+
"fileBox": {
|
|
5424
|
+
"type": "string",
|
|
5425
|
+
"title": "FileBox 序列化串(URL/OSS 形态优先),puppet 侧按内容指纹缓存下载与转码产物;\n空 = 不播放、仅拨打(接通即视为\"播放完成\",配合 hangup_on_finish 实现\"接通 N 毫秒后自动挂断\")"
|
|
5426
|
+
},
|
|
5427
|
+
"hangupOnFinish": {
|
|
5428
|
+
"type": "boolean",
|
|
5429
|
+
"title": "播放完成后自动挂断。\"播放完成时刻\" = 有文件时播放结束、无文件时接通。\nfile_box 为空时必须为 true(否则语义等价 CallInvite,应直接用 CallInvite),实现侧校验。"
|
|
5430
|
+
},
|
|
5431
|
+
"hangupDelayMs": {
|
|
5432
|
+
"type": "integer",
|
|
5433
|
+
"format": "int64",
|
|
5434
|
+
"title": "播放完成 → 自动挂断的间隔毫秒数,0 = 立即;仅 hangup_on_finish = true 时生效。\n有文件时留缓冲防尾音被挂断信令掐掉;无文件时即\"接通后 N 毫秒挂断\"。"
|
|
5435
|
+
}
|
|
5436
|
+
},
|
|
5437
|
+
"title": "拨打并在接通后自动播放媒体文件(触达/群发场景)。\n与 CallInvite 的区别:puppet 侧在振铃期间即预下载+转码媒体文件,接通后零延迟起播,\n播放完成后可按配置自动挂断;业务侧一次 RPC 完成全部编排,无需媒体面连接。\n未接通(拒接/超时/取消)走正常终态事件,不播放。"
|
|
5438
|
+
},
|
|
5439
|
+
"puppetCallInviteWithMediaResponse": {
|
|
5440
|
+
"type": "object",
|
|
5441
|
+
"properties": {
|
|
5442
|
+
"callId": {
|
|
5443
|
+
"type": "string"
|
|
5444
|
+
}
|
|
5445
|
+
},
|
|
5446
|
+
"title": "语义对齐 CallInviteResponse:call_id 由 puppet 实现侧生成,业务侧凭此\nCancel/Hangup、关联终态事件与录音产物;事件可能先于本响应到达,须容忍乱序。"
|
|
5447
|
+
},
|
|
5381
5448
|
"puppetCallMediaEndpointResponse": {
|
|
5382
5449
|
"type": "object",
|
|
5383
5450
|
"properties": {
|
|
@@ -5486,7 +5553,7 @@
|
|
|
5486
5553
|
"CALL_TYPE_VIDEO"
|
|
5487
5554
|
],
|
|
5488
5555
|
"default": "CALL_TYPE_UNKNOWN",
|
|
5489
|
-
"
|
|
5556
|
+
"description": "- CALL_TYPE_UNKNOWN: 不明确\n - CALL_TYPE_VOICE: 语音\n - CALL_TYPE_VIDEO: 视频"
|
|
5490
5557
|
},
|
|
5491
5558
|
"puppetCancelVerifyCodeResponse": {
|
|
5492
5559
|
"type": "object"
|
|
@@ -6083,9 +6150,11 @@
|
|
|
6083
6150
|
"EVENT_TYPE_ROOM_ANNOUNCE",
|
|
6084
6151
|
"EVENT_TYPE_VERIFY_CODE",
|
|
6085
6152
|
"EVENT_TYPE_VERIFY_SLIDE",
|
|
6086
|
-
"EVENT_TYPE_CALL"
|
|
6153
|
+
"EVENT_TYPE_CALL",
|
|
6154
|
+
"EVENT_TYPE_SAME_NET_VERIFY"
|
|
6087
6155
|
],
|
|
6088
|
-
"default": "EVENT_TYPE_UNSPECIFIED"
|
|
6156
|
+
"default": "EVENT_TYPE_UNSPECIFIED",
|
|
6157
|
+
"description": "- EVENT_TYPE_SAME_NET_VERIFY: same network verify for personal wechat login on Mac protocol"
|
|
6089
6158
|
},
|
|
6090
6159
|
"puppetFriendshipAcceptResponse": {
|
|
6091
6160
|
"type": "object"
|
|
@@ -6142,7 +6211,7 @@
|
|
|
6142
6211
|
"FRIENDSHIP_SCENE_TYPE_QRCODE"
|
|
6143
6212
|
],
|
|
6144
6213
|
"default": "FRIENDSHIP_SCENE_TYPE_UNSPECIFIED",
|
|
6145
|
-
"
|
|
6214
|
+
"description": "事件场景 wxwork中未使用"
|
|
6146
6215
|
},
|
|
6147
6216
|
"puppetFriendshipSearchHandleRequest": {
|
|
6148
6217
|
"type": "object",
|
|
@@ -7235,7 +7304,7 @@
|
|
|
7235
7304
|
"PAYLOAD_TYPE_CALL"
|
|
7236
7305
|
],
|
|
7237
7306
|
"default": "PAYLOAD_TYPE_UNSPECIFIED",
|
|
7238
|
-
"
|
|
7307
|
+
"description": "数值必须与 @juzi/wechaty-puppet 的 DirtyType 严格一致。"
|
|
7239
7308
|
},
|
|
7240
7309
|
"puppetPostPayloadClient": {
|
|
7241
7310
|
"type": "object",
|
|
@@ -7426,7 +7495,7 @@
|
|
|
7426
7495
|
"POST_TYPE_GOODS_CARD"
|
|
7427
7496
|
],
|
|
7428
7497
|
"default": "POST_TYPE_UNSPECIFIED",
|
|
7429
|
-
"
|
|
7498
|
+
"description": "- 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 商品消息"
|
|
7430
7499
|
},
|
|
7431
7500
|
"puppetReferrer": {
|
|
7432
7501
|
"type": "object",
|
|
@@ -7642,7 +7711,7 @@
|
|
|
7642
7711
|
"ROOM_MEMBER_JOIN_SCENE_TYPE_OTHER"
|
|
7643
7712
|
],
|
|
7644
7713
|
"default": "ROOM_MEMBER_JOIN_SCENE_TYPE_UNKNOWN",
|
|
7645
|
-
"
|
|
7714
|
+
"description": "类型枚举"
|
|
7646
7715
|
},
|
|
7647
7716
|
"puppetRoomMemberListResponse": {
|
|
7648
7717
|
"type": "object",
|
|
@@ -8086,7 +8155,7 @@
|
|
|
8086
8155
|
"CORPORATION"
|
|
8087
8156
|
],
|
|
8088
8157
|
"default": "Unspecific",
|
|
8089
|
-
"
|
|
8158
|
+
"description": "- PERSONAL: 个人标签\n - CORPORATION: 企业标签"
|
|
8090
8159
|
},
|
|
8091
8160
|
"puppetTapType": {
|
|
8092
8161
|
"type": "string",
|
|
@@ -78,6 +78,7 @@ interface IPuppetService extends grpc.ServiceDefinition<grpc.UntypedServiceImple
|
|
|
78
78
|
callCancel: IPuppetService_ICallCancel;
|
|
79
79
|
callHangup: IPuppetService_ICallHangup;
|
|
80
80
|
callMediaEndpoint: IPuppetService_ICallMediaEndpoint;
|
|
81
|
+
callInviteWithMedia: IPuppetService_ICallInviteWithMedia;
|
|
81
82
|
callPayload: IPuppetService_ICallPayload;
|
|
82
83
|
messageChatHistory: IPuppetService_IMessageChatHistory;
|
|
83
84
|
messageRecall: IPuppetService_IMessageRecall;
|
|
@@ -638,6 +639,15 @@ interface IPuppetService_ICallMediaEndpoint extends grpc.MethodDefinition<wechat
|
|
|
638
639
|
responseSerialize: grpc.serialize<wechaty_puppet_call_pb.CallMediaEndpointResponse>;
|
|
639
640
|
responseDeserialize: grpc.deserialize<wechaty_puppet_call_pb.CallMediaEndpointResponse>;
|
|
640
641
|
}
|
|
642
|
+
interface IPuppetService_ICallInviteWithMedia extends grpc.MethodDefinition<wechaty_puppet_call_pb.CallInviteWithMediaRequest, wechaty_puppet_call_pb.CallInviteWithMediaResponse> {
|
|
643
|
+
path: "/wechaty.Puppet/CallInviteWithMedia";
|
|
644
|
+
requestStream: false;
|
|
645
|
+
responseStream: false;
|
|
646
|
+
requestSerialize: grpc.serialize<wechaty_puppet_call_pb.CallInviteWithMediaRequest>;
|
|
647
|
+
requestDeserialize: grpc.deserialize<wechaty_puppet_call_pb.CallInviteWithMediaRequest>;
|
|
648
|
+
responseSerialize: grpc.serialize<wechaty_puppet_call_pb.CallInviteWithMediaResponse>;
|
|
649
|
+
responseDeserialize: grpc.deserialize<wechaty_puppet_call_pb.CallInviteWithMediaResponse>;
|
|
650
|
+
}
|
|
641
651
|
interface IPuppetService_ICallPayload extends grpc.MethodDefinition<wechaty_puppet_call_pb.CallPayloadRequest, wechaty_puppet_call_pb.CallPayloadResponse> {
|
|
642
652
|
path: "/wechaty.Puppet/CallPayload";
|
|
643
653
|
requestStream: false;
|
|
@@ -1424,6 +1434,7 @@ export interface IPuppetServer extends grpc.UntypedServiceImplementation {
|
|
|
1424
1434
|
callCancel: grpc.handleUnaryCall<wechaty_puppet_call_pb.CallCancelRequest, wechaty_puppet_call_pb.CallCancelResponse>;
|
|
1425
1435
|
callHangup: grpc.handleUnaryCall<wechaty_puppet_call_pb.CallHangupRequest, wechaty_puppet_call_pb.CallHangupResponse>;
|
|
1426
1436
|
callMediaEndpoint: grpc.handleUnaryCall<wechaty_puppet_call_pb.CallMediaEndpointRequest, wechaty_puppet_call_pb.CallMediaEndpointResponse>;
|
|
1437
|
+
callInviteWithMedia: grpc.handleUnaryCall<wechaty_puppet_call_pb.CallInviteWithMediaRequest, wechaty_puppet_call_pb.CallInviteWithMediaResponse>;
|
|
1427
1438
|
callPayload: grpc.handleUnaryCall<wechaty_puppet_call_pb.CallPayloadRequest, wechaty_puppet_call_pb.CallPayloadResponse>;
|
|
1428
1439
|
messageChatHistory: grpc.handleUnaryCall<wechaty_puppet_message_pb.MessageChatHistoryRequest, wechaty_puppet_message_pb.MessageChatHistoryResponse>;
|
|
1429
1440
|
messageRecall: grpc.handleUnaryCall<wechaty_puppet_message_pb.MessageRecallRequest, wechaty_puppet_message_pb.MessageRecallResponse>;
|
|
@@ -1666,6 +1677,9 @@ export interface IPuppetClient {
|
|
|
1666
1677
|
callMediaEndpoint(request: wechaty_puppet_call_pb.CallMediaEndpointRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_call_pb.CallMediaEndpointResponse) => void): grpc.ClientUnaryCall;
|
|
1667
1678
|
callMediaEndpoint(request: wechaty_puppet_call_pb.CallMediaEndpointRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_call_pb.CallMediaEndpointResponse) => void): grpc.ClientUnaryCall;
|
|
1668
1679
|
callMediaEndpoint(request: wechaty_puppet_call_pb.CallMediaEndpointRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_call_pb.CallMediaEndpointResponse) => void): grpc.ClientUnaryCall;
|
|
1680
|
+
callInviteWithMedia(request: wechaty_puppet_call_pb.CallInviteWithMediaRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_call_pb.CallInviteWithMediaResponse) => void): grpc.ClientUnaryCall;
|
|
1681
|
+
callInviteWithMedia(request: wechaty_puppet_call_pb.CallInviteWithMediaRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_call_pb.CallInviteWithMediaResponse) => void): grpc.ClientUnaryCall;
|
|
1682
|
+
callInviteWithMedia(request: wechaty_puppet_call_pb.CallInviteWithMediaRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_call_pb.CallInviteWithMediaResponse) => void): grpc.ClientUnaryCall;
|
|
1669
1683
|
callPayload(request: wechaty_puppet_call_pb.CallPayloadRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_call_pb.CallPayloadResponse) => void): grpc.ClientUnaryCall;
|
|
1670
1684
|
callPayload(request: wechaty_puppet_call_pb.CallPayloadRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_call_pb.CallPayloadResponse) => void): grpc.ClientUnaryCall;
|
|
1671
1685
|
callPayload(request: wechaty_puppet_call_pb.CallPayloadRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_call_pb.CallPayloadResponse) => void): grpc.ClientUnaryCall;
|
|
@@ -2071,6 +2085,9 @@ export class PuppetClient extends grpc.Client implements IPuppetClient {
|
|
|
2071
2085
|
public callMediaEndpoint(request: wechaty_puppet_call_pb.CallMediaEndpointRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_call_pb.CallMediaEndpointResponse) => void): grpc.ClientUnaryCall;
|
|
2072
2086
|
public callMediaEndpoint(request: wechaty_puppet_call_pb.CallMediaEndpointRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_call_pb.CallMediaEndpointResponse) => void): grpc.ClientUnaryCall;
|
|
2073
2087
|
public callMediaEndpoint(request: wechaty_puppet_call_pb.CallMediaEndpointRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_call_pb.CallMediaEndpointResponse) => void): grpc.ClientUnaryCall;
|
|
2088
|
+
public callInviteWithMedia(request: wechaty_puppet_call_pb.CallInviteWithMediaRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_call_pb.CallInviteWithMediaResponse) => void): grpc.ClientUnaryCall;
|
|
2089
|
+
public callInviteWithMedia(request: wechaty_puppet_call_pb.CallInviteWithMediaRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_call_pb.CallInviteWithMediaResponse) => void): grpc.ClientUnaryCall;
|
|
2090
|
+
public callInviteWithMedia(request: wechaty_puppet_call_pb.CallInviteWithMediaRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_call_pb.CallInviteWithMediaResponse) => void): grpc.ClientUnaryCall;
|
|
2074
2091
|
public callPayload(request: wechaty_puppet_call_pb.CallPayloadRequest, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_call_pb.CallPayloadResponse) => void): grpc.ClientUnaryCall;
|
|
2075
2092
|
public callPayload(request: wechaty_puppet_call_pb.CallPayloadRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_call_pb.CallPayloadResponse) => void): grpc.ClientUnaryCall;
|
|
2076
2093
|
public callPayload(request: wechaty_puppet_call_pb.CallPayloadRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: wechaty_puppet_call_pb.CallPayloadResponse) => void): grpc.ClientUnaryCall;
|
|
@@ -231,6 +231,28 @@ function deserialize_wechaty_puppet_CallInviteResponse(buffer_arg) {
|
|
|
231
231
|
return wechaty_puppet_call_pb.CallInviteResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
+
function serialize_wechaty_puppet_CallInviteWithMediaRequest(arg) {
|
|
235
|
+
if (!(arg instanceof wechaty_puppet_call_pb.CallInviteWithMediaRequest)) {
|
|
236
|
+
throw new Error('Expected argument of type wechaty.puppet.CallInviteWithMediaRequest');
|
|
237
|
+
}
|
|
238
|
+
return Buffer.from(arg.serializeBinary());
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
function deserialize_wechaty_puppet_CallInviteWithMediaRequest(buffer_arg) {
|
|
242
|
+
return wechaty_puppet_call_pb.CallInviteWithMediaRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
function serialize_wechaty_puppet_CallInviteWithMediaResponse(arg) {
|
|
246
|
+
if (!(arg instanceof wechaty_puppet_call_pb.CallInviteWithMediaResponse)) {
|
|
247
|
+
throw new Error('Expected argument of type wechaty.puppet.CallInviteWithMediaResponse');
|
|
248
|
+
}
|
|
249
|
+
return Buffer.from(arg.serializeBinary());
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
function deserialize_wechaty_puppet_CallInviteWithMediaResponse(buffer_arg) {
|
|
253
|
+
return wechaty_puppet_call_pb.CallInviteWithMediaResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
254
|
+
}
|
|
255
|
+
|
|
234
256
|
function serialize_wechaty_puppet_CallMediaEndpointRequest(arg) {
|
|
235
257
|
if (!(arg instanceof wechaty_puppet_call_pb.CallMediaEndpointRequest)) {
|
|
236
258
|
throw new Error('Expected argument of type wechaty.puppet.CallMediaEndpointRequest');
|
|
@@ -3546,6 +3568,17 @@ callMediaEndpoint: {
|
|
|
3546
3568
|
responseSerialize: serialize_wechaty_puppet_CallMediaEndpointResponse,
|
|
3547
3569
|
responseDeserialize: deserialize_wechaty_puppet_CallMediaEndpointResponse,
|
|
3548
3570
|
},
|
|
3571
|
+
callInviteWithMedia: {
|
|
3572
|
+
path: '/wechaty.Puppet/CallInviteWithMedia',
|
|
3573
|
+
requestStream: false,
|
|
3574
|
+
responseStream: false,
|
|
3575
|
+
requestType: wechaty_puppet_call_pb.CallInviteWithMediaRequest,
|
|
3576
|
+
responseType: wechaty_puppet_call_pb.CallInviteWithMediaResponse,
|
|
3577
|
+
requestSerialize: serialize_wechaty_puppet_CallInviteWithMediaRequest,
|
|
3578
|
+
requestDeserialize: deserialize_wechaty_puppet_CallInviteWithMediaRequest,
|
|
3579
|
+
responseSerialize: serialize_wechaty_puppet_CallInviteWithMediaResponse,
|
|
3580
|
+
responseDeserialize: deserialize_wechaty_puppet_CallInviteWithMediaResponse,
|
|
3581
|
+
},
|
|
3549
3582
|
callPayload: {
|
|
3550
3583
|
path: '/wechaty.Puppet/CallPayload',
|
|
3551
3584
|
requestStream: false,
|
|
@@ -497,6 +497,15 @@ type PuppetCallMediaEndpoint = {
|
|
|
497
497
|
readonly responseType: typeof wechaty_puppet_call_pb.CallMediaEndpointResponse;
|
|
498
498
|
};
|
|
499
499
|
|
|
500
|
+
type PuppetCallInviteWithMedia = {
|
|
501
|
+
readonly methodName: string;
|
|
502
|
+
readonly service: typeof Puppet;
|
|
503
|
+
readonly requestStream: false;
|
|
504
|
+
readonly responseStream: false;
|
|
505
|
+
readonly requestType: typeof wechaty_puppet_call_pb.CallInviteWithMediaRequest;
|
|
506
|
+
readonly responseType: typeof wechaty_puppet_call_pb.CallInviteWithMediaResponse;
|
|
507
|
+
};
|
|
508
|
+
|
|
500
509
|
type PuppetCallPayload = {
|
|
501
510
|
readonly methodName: string;
|
|
502
511
|
readonly service: typeof Puppet;
|
|
@@ -1281,6 +1290,7 @@ export class Puppet {
|
|
|
1281
1290
|
static readonly CallCancel: PuppetCallCancel;
|
|
1282
1291
|
static readonly CallHangup: PuppetCallHangup;
|
|
1283
1292
|
static readonly CallMediaEndpoint: PuppetCallMediaEndpoint;
|
|
1293
|
+
static readonly CallInviteWithMedia: PuppetCallInviteWithMedia;
|
|
1284
1294
|
static readonly CallPayload: PuppetCallPayload;
|
|
1285
1295
|
static readonly MessageChatHistory: PuppetMessageChatHistory;
|
|
1286
1296
|
static readonly MessageRecall: PuppetMessageRecall;
|
|
@@ -1865,6 +1875,15 @@ export class PuppetClient {
|
|
|
1865
1875
|
requestMessage: wechaty_puppet_call_pb.CallMediaEndpointRequest,
|
|
1866
1876
|
callback: (error: ServiceError|null, responseMessage: wechaty_puppet_call_pb.CallMediaEndpointResponse|null) => void
|
|
1867
1877
|
): UnaryResponse;
|
|
1878
|
+
callInviteWithMedia(
|
|
1879
|
+
requestMessage: wechaty_puppet_call_pb.CallInviteWithMediaRequest,
|
|
1880
|
+
metadata: grpc.Metadata,
|
|
1881
|
+
callback: (error: ServiceError|null, responseMessage: wechaty_puppet_call_pb.CallInviteWithMediaResponse|null) => void
|
|
1882
|
+
): UnaryResponse;
|
|
1883
|
+
callInviteWithMedia(
|
|
1884
|
+
requestMessage: wechaty_puppet_call_pb.CallInviteWithMediaRequest,
|
|
1885
|
+
callback: (error: ServiceError|null, responseMessage: wechaty_puppet_call_pb.CallInviteWithMediaResponse|null) => void
|
|
1886
|
+
): UnaryResponse;
|
|
1868
1887
|
callPayload(
|
|
1869
1888
|
requestMessage: wechaty_puppet_call_pb.CallPayloadRequest,
|
|
1870
1889
|
metadata: grpc.Metadata,
|
|
@@ -503,6 +503,15 @@ Puppet.CallMediaEndpoint = {
|
|
|
503
503
|
responseType: wechaty_puppet_call_pb.CallMediaEndpointResponse
|
|
504
504
|
};
|
|
505
505
|
|
|
506
|
+
Puppet.CallInviteWithMedia = {
|
|
507
|
+
methodName: "CallInviteWithMedia",
|
|
508
|
+
service: Puppet,
|
|
509
|
+
requestStream: false,
|
|
510
|
+
responseStream: false,
|
|
511
|
+
requestType: wechaty_puppet_call_pb.CallInviteWithMediaRequest,
|
|
512
|
+
responseType: wechaty_puppet_call_pb.CallInviteWithMediaResponse
|
|
513
|
+
};
|
|
514
|
+
|
|
506
515
|
Puppet.CallPayload = {
|
|
507
516
|
methodName: "CallPayload",
|
|
508
517
|
service: Puppet,
|
|
@@ -2890,6 +2899,37 @@ PuppetClient.prototype.callMediaEndpoint = function callMediaEndpoint(requestMes
|
|
|
2890
2899
|
};
|
|
2891
2900
|
};
|
|
2892
2901
|
|
|
2902
|
+
PuppetClient.prototype.callInviteWithMedia = function callInviteWithMedia(requestMessage, metadata, callback) {
|
|
2903
|
+
if (arguments.length === 2) {
|
|
2904
|
+
callback = arguments[1];
|
|
2905
|
+
}
|
|
2906
|
+
var client = grpc.unary(Puppet.CallInviteWithMedia, {
|
|
2907
|
+
request: requestMessage,
|
|
2908
|
+
host: this.serviceHost,
|
|
2909
|
+
metadata: metadata,
|
|
2910
|
+
transport: this.options.transport,
|
|
2911
|
+
debug: this.options.debug,
|
|
2912
|
+
onEnd: function (response) {
|
|
2913
|
+
if (callback) {
|
|
2914
|
+
if (response.status !== grpc.Code.OK) {
|
|
2915
|
+
var err = new Error(response.statusMessage);
|
|
2916
|
+
err.code = response.status;
|
|
2917
|
+
err.metadata = response.trailers;
|
|
2918
|
+
callback(err, null);
|
|
2919
|
+
} else {
|
|
2920
|
+
callback(null, response.message);
|
|
2921
|
+
}
|
|
2922
|
+
}
|
|
2923
|
+
}
|
|
2924
|
+
});
|
|
2925
|
+
return {
|
|
2926
|
+
cancel: function () {
|
|
2927
|
+
callback = null;
|
|
2928
|
+
client.close();
|
|
2929
|
+
}
|
|
2930
|
+
};
|
|
2931
|
+
};
|
|
2932
|
+
|
|
2893
2933
|
PuppetClient.prototype.callPayload = function callPayload(requestMessage, metadata, callback) {
|
|
2894
2934
|
if (arguments.length === 2) {
|
|
2895
2935
|
callback = arguments[1];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@juzi/wechaty-grpc",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.108",
|
|
4
4
|
"description": "gRPC for Wechaty",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -66,6 +66,7 @@
|
|
|
66
66
|
"@chatie/tsconfig": "^4.6.3",
|
|
67
67
|
"@swc/core": "1.3.39",
|
|
68
68
|
"@types/google-protobuf": "^3.15.5",
|
|
69
|
+
"@types/node": "^20",
|
|
69
70
|
"@types/protobufjs": "^6.0.0",
|
|
70
71
|
"cross-env": "^7.0.3",
|
|
71
72
|
"esquery": "1.4.0",
|
package/src/package-json.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import type { PackageJson } from 'type-fest'
|
|
5
5
|
export const packageJson: PackageJson = {
|
|
6
6
|
"name": "@juzi/wechaty-grpc",
|
|
7
|
-
"version": "1.0.
|
|
7
|
+
"version": "1.0.108",
|
|
8
8
|
"description": "gRPC for Wechaty",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"exports": {
|
|
@@ -70,6 +70,7 @@ export const packageJson: PackageJson = {
|
|
|
70
70
|
"@chatie/tsconfig": "^4.6.3",
|
|
71
71
|
"@swc/core": "1.3.39",
|
|
72
72
|
"@types/google-protobuf": "^3.15.5",
|
|
73
|
+
"@types/node": "^20",
|
|
73
74
|
"@types/protobufjs": "^6.0.0",
|
|
74
75
|
"cross-env": "^7.0.3",
|
|
75
76
|
"esquery": "1.4.0",
|