@juzi/wechaty-grpc 1.0.101 → 1.0.102

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/cjs/out/wechaty/puppet/base_pb.d.ts +3 -0
  2. package/dist/cjs/out/wechaty/puppet/base_pb.js +4 -1
  3. package/dist/cjs/out/wechaty/puppet/call_pb.d.ts +361 -0
  4. package/dist/cjs/out/wechaty/puppet/call_pb.js +2869 -79
  5. package/dist/cjs/out/wechaty/puppet/event_pb.d.ts +1 -0
  6. package/dist/cjs/out/wechaty/puppet/event_pb.js +2 -1
  7. package/dist/cjs/out/wechaty/puppet.openapi.yaml +324 -2
  8. package/dist/cjs/out/wechaty/puppet.swagger.json +469 -10
  9. package/dist/cjs/out/wechaty/puppet_grpc_pb.d.ts +137 -0
  10. package/dist/cjs/out/wechaty/puppet_grpc_pb.js +266 -0
  11. package/dist/cjs/out/wechaty/puppet_pb.d.ts +1 -0
  12. package/dist/cjs/out/wechaty/puppet_pb.js +2 -0
  13. package/dist/cjs/out/wechaty/puppet_pb_service.d.ts +153 -0
  14. package/dist/cjs/out/wechaty/puppet_pb_service.js +321 -0
  15. package/dist/cjs/proto/wechaty/puppet/base.proto +4 -0
  16. package/dist/cjs/proto/wechaty/puppet/call.proto +101 -1
  17. package/dist/cjs/proto/wechaty/puppet/event.proto +1 -0
  18. package/dist/cjs/proto/wechaty/puppet.proto +49 -0
  19. package/dist/cjs/src/package-json.js +1 -1
  20. package/dist/cjs/tests/puppet-server-impl.d.ts.map +1 -1
  21. package/dist/cjs/tests/puppet-server-impl.js +40 -0
  22. package/dist/cjs/tests/puppet-server-impl.js.map +1 -1
  23. package/dist/esm/out/wechaty/puppet/base_pb.d.ts +3 -0
  24. package/dist/esm/out/wechaty/puppet/base_pb.js +4 -1
  25. package/dist/esm/out/wechaty/puppet/call_pb.d.ts +361 -0
  26. package/dist/esm/out/wechaty/puppet/call_pb.js +2869 -79
  27. package/dist/esm/out/wechaty/puppet/event_pb.d.ts +1 -0
  28. package/dist/esm/out/wechaty/puppet/event_pb.js +2 -1
  29. package/dist/esm/out/wechaty/puppet.openapi.yaml +324 -2
  30. package/dist/esm/out/wechaty/puppet.swagger.json +469 -10
  31. package/dist/esm/out/wechaty/puppet_grpc_pb.d.ts +137 -0
  32. package/dist/esm/out/wechaty/puppet_grpc_pb.js +266 -0
  33. package/dist/esm/out/wechaty/puppet_pb.d.ts +1 -0
  34. package/dist/esm/out/wechaty/puppet_pb.js +2 -0
  35. package/dist/esm/out/wechaty/puppet_pb_service.d.ts +153 -0
  36. package/dist/esm/out/wechaty/puppet_pb_service.js +321 -0
  37. package/dist/esm/proto/wechaty/puppet/base.proto +4 -0
  38. package/dist/esm/proto/wechaty/puppet/call.proto +101 -1
  39. package/dist/esm/proto/wechaty/puppet/event.proto +1 -0
  40. package/dist/esm/proto/wechaty/puppet.proto +49 -0
  41. package/dist/esm/src/package-json.js +1 -1
  42. package/dist/esm/tests/puppet-server-impl.d.ts.map +1 -1
  43. package/dist/esm/tests/puppet-server-impl.js +40 -0
  44. package/dist/esm/tests/puppet-server-impl.js.map +1 -1
  45. package/out/wechaty/puppet/base_pb.d.ts +3 -0
  46. package/out/wechaty/puppet/base_pb.js +4 -1
  47. package/out/wechaty/puppet/call_pb.d.ts +361 -0
  48. package/out/wechaty/puppet/call_pb.js +2869 -79
  49. package/out/wechaty/puppet/event_pb.d.ts +1 -0
  50. package/out/wechaty/puppet/event_pb.js +2 -1
  51. package/out/wechaty/puppet.openapi.yaml +324 -2
  52. package/out/wechaty/puppet.swagger.json +469 -10
  53. package/out/wechaty/puppet_grpc_pb.d.ts +137 -0
  54. package/out/wechaty/puppet_grpc_pb.js +266 -0
  55. package/out/wechaty/puppet_pb.d.ts +1 -0
  56. package/out/wechaty/puppet_pb.js +2 -0
  57. package/out/wechaty/puppet_pb_service.d.ts +153 -0
  58. package/out/wechaty/puppet_pb_service.js +321 -0
  59. package/package.json +1 -1
  60. package/src/package-json.ts +1 -1
@@ -80,6 +80,7 @@ export interface EventTypeMap {
80
80
  EVENT_TYPE_ROOM_ANNOUNCE: 32;
81
81
  EVENT_TYPE_VERIFY_CODE: 33;
82
82
  EVENT_TYPE_VERIFY_SLIDE: 34;
83
+ EVENT_TYPE_CALL: 35;
83
84
  }
84
85
 
85
86
  export const EventType: EventTypeMap;
@@ -437,7 +437,8 @@ proto.wechaty.puppet.EventType = {
437
437
  EVENT_TYPE_POST_TAP: 31,
438
438
  EVENT_TYPE_ROOM_ANNOUNCE: 32,
439
439
  EVENT_TYPE_VERIFY_CODE: 33,
440
- EVENT_TYPE_VERIFY_SLIDE: 34
440
+ EVENT_TYPE_VERIFY_SLIDE: 34,
441
+ EVENT_TYPE_CALL: 35
441
442
  };
442
443
 
443
444
  goog.object.extend(exports, proto.wechaty.puppet);
@@ -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.101
12
+ version: 1.0.102
13
13
  contact:
14
14
  name: Wechaty
15
15
  url: https://github.com/wechaty/openapi
@@ -24,6 +24,197 @@ consumes:
24
24
  produces:
25
25
  - application/json
26
26
  paths:
27
+ /call/invite:
28
+ post:
29
+ operationId: Puppet_CallInvite
30
+ responses:
31
+ '200':
32
+ description: A successful response.
33
+ schema:
34
+ $ref: '#/definitions/puppetCallInviteResponse'
35
+ default:
36
+ description: An unexpected error response.
37
+ schema:
38
+ $ref: '#/definitions/rpcStatus'
39
+ parameters:
40
+ - name: body
41
+ in: body
42
+ required: true
43
+ schema:
44
+ $ref: '#/definitions/puppetCallInviteRequest'
45
+ tags:
46
+ - Puppet
47
+ /call/{callId}/accept:
48
+ post:
49
+ operationId: Puppet_CallAccept
50
+ responses:
51
+ '200':
52
+ description: A successful response.
53
+ schema:
54
+ $ref: '#/definitions/puppetCallAcceptResponse'
55
+ default:
56
+ description: An unexpected error response.
57
+ schema:
58
+ $ref: '#/definitions/rpcStatus'
59
+ parameters:
60
+ - name: callId
61
+ description: 由 CallInvite 响应获得;协议端持有会话状态,凭此即可定位会话(无需 peer/media)
62
+ in: path
63
+ required: true
64
+ type: string
65
+ - name: body
66
+ in: body
67
+ required: true
68
+ schema:
69
+ $ref: '#/definitions/PuppetCallAcceptBody'
70
+ tags:
71
+ - Puppet
72
+ /call/{callId}/add:
73
+ post:
74
+ operationId: Puppet_CallAdd
75
+ responses:
76
+ '200':
77
+ description: A successful response.
78
+ schema:
79
+ $ref: '#/definitions/puppetCallAddResponse'
80
+ default:
81
+ description: An unexpected error response.
82
+ schema:
83
+ $ref: '#/definitions/rpcStatus'
84
+ parameters:
85
+ - name: callId
86
+ description: 由 CallInvite 响应获得
87
+ in: path
88
+ required: true
89
+ type: string
90
+ - name: body
91
+ in: body
92
+ required: true
93
+ schema:
94
+ $ref: '#/definitions/PuppetCallAddBody'
95
+ tags:
96
+ - Puppet
97
+ /call/{callId}/cancel:
98
+ post:
99
+ operationId: Puppet_CallCancel
100
+ responses:
101
+ '200':
102
+ description: A successful response.
103
+ schema:
104
+ $ref: '#/definitions/puppetCallCancelResponse'
105
+ default:
106
+ description: An unexpected error response.
107
+ schema:
108
+ $ref: '#/definitions/rpcStatus'
109
+ parameters:
110
+ - name: callId
111
+ description: 由 CallInvite 响应获得;协议端持有会话状态,凭此即可定位会话(无需 peer/media)
112
+ in: path
113
+ required: true
114
+ type: string
115
+ - name: body
116
+ in: body
117
+ required: true
118
+ schema:
119
+ $ref: '#/definitions/PuppetCallCancelBody'
120
+ tags:
121
+ - Puppet
122
+ /call/{callId}/hangup:
123
+ post:
124
+ operationId: Puppet_CallHangup
125
+ responses:
126
+ '200':
127
+ description: A successful response.
128
+ schema:
129
+ $ref: '#/definitions/puppetCallHangupResponse'
130
+ default:
131
+ description: An unexpected error response.
132
+ schema:
133
+ $ref: '#/definitions/rpcStatus'
134
+ parameters:
135
+ - name: callId
136
+ description: 由 CallInvite 响应获得;协议端持有会话状态,凭此即可定位会话(无需 peer/media)
137
+ in: path
138
+ required: true
139
+ type: string
140
+ - name: body
141
+ in: body
142
+ required: true
143
+ schema:
144
+ $ref: '#/definitions/PuppetCallHangupBody'
145
+ tags:
146
+ - Puppet
147
+ /call/{callId}/media-endpoint:
148
+ post:
149
+ summary: POST:签发可能在网关侧预分配媒体会话(有副作用),非幂等读取。
150
+ operationId: Puppet_CallMediaEndpoint
151
+ responses:
152
+ '200':
153
+ description: A successful response.
154
+ schema:
155
+ $ref: '#/definitions/puppetCallMediaEndpointResponse'
156
+ default:
157
+ description: An unexpected error response.
158
+ schema:
159
+ $ref: '#/definitions/rpcStatus'
160
+ parameters:
161
+ - name: callId
162
+ description: 由 CallInvite 响应获得
163
+ in: path
164
+ required: true
165
+ type: string
166
+ - name: body
167
+ in: body
168
+ required: true
169
+ schema:
170
+ $ref: '#/definitions/PuppetCallMediaEndpointBody'
171
+ tags:
172
+ - Puppet
173
+ /call/{callId}/reject:
174
+ post:
175
+ operationId: Puppet_CallReject
176
+ responses:
177
+ '200':
178
+ description: A successful response.
179
+ schema:
180
+ $ref: '#/definitions/puppetCallRejectResponse'
181
+ default:
182
+ description: An unexpected error response.
183
+ schema:
184
+ $ref: '#/definitions/rpcStatus'
185
+ parameters:
186
+ - name: callId
187
+ description: 由 CallInvite 响应获得;协议端持有会话状态,凭此即可定位会话(无需 peer/media)
188
+ in: path
189
+ required: true
190
+ type: string
191
+ - name: body
192
+ in: body
193
+ required: true
194
+ schema:
195
+ $ref: '#/definitions/PuppetCallRejectBody'
196
+ tags:
197
+ - Puppet
198
+ /call/{id}:
199
+ get:
200
+ operationId: Puppet_CallPayload
201
+ responses:
202
+ '200':
203
+ description: A successful response.
204
+ schema:
205
+ $ref: '#/definitions/puppetCallPayloadResponse'
206
+ default:
207
+ description: An unexpected error response.
208
+ schema:
209
+ $ref: '#/definitions/rpcStatus'
210
+ parameters:
211
+ - name: id
212
+ description: call_id
213
+ in: path
214
+ required: true
215
+ type: string
216
+ tags:
217
+ - Puppet
27
218
  /cancel_verify_code:
28
219
  post:
29
220
  operationId: Puppet_CancelVerifyCode
@@ -437,6 +628,9 @@ paths:
437
628
  - PAYLOAD_TYPE_POST
438
629
  - PAYLOAD_TYPE_TAG
439
630
  - PAYLOAD_TYPE_TAG_GROUP
631
+ - PAYLOAD_TYPE_WXXD_PRODUCT
632
+ - PAYLOAD_TYPE_WXXD_ORDER
633
+ - PAYLOAD_TYPE_CALL
440
634
  pattern: PAYLOAD_TYPE_CONTACT
441
635
  tags:
442
636
  - Puppet
@@ -1216,6 +1410,9 @@ paths:
1216
1410
  - PAYLOAD_TYPE_POST
1217
1411
  - PAYLOAD_TYPE_TAG
1218
1412
  - PAYLOAD_TYPE_TAG_GROUP
1413
+ - PAYLOAD_TYPE_WXXD_PRODUCT
1414
+ - PAYLOAD_TYPE_WXXD_ORDER
1415
+ - PAYLOAD_TYPE_CALL
1219
1416
  pattern: PAYLOAD_TYPE_FRIENDSHIP
1220
1417
  tags:
1221
1418
  - Puppet
@@ -1431,6 +1628,9 @@ paths:
1431
1628
  - PAYLOAD_TYPE_POST
1432
1629
  - PAYLOAD_TYPE_TAG
1433
1630
  - PAYLOAD_TYPE_TAG_GROUP
1631
+ - PAYLOAD_TYPE_WXXD_PRODUCT
1632
+ - PAYLOAD_TYPE_WXXD_ORDER
1633
+ - PAYLOAD_TYPE_CALL
1434
1634
  pattern: PAYLOAD_TYPE_MESSAGE
1435
1635
  tags:
1436
1636
  - Puppet
@@ -2164,6 +2364,9 @@ paths:
2164
2364
  - PAYLOAD_TYPE_POST
2165
2365
  - PAYLOAD_TYPE_TAG
2166
2366
  - PAYLOAD_TYPE_TAG_GROUP
2367
+ - PAYLOAD_TYPE_WXXD_PRODUCT
2368
+ - PAYLOAD_TYPE_WXXD_ORDER
2369
+ - PAYLOAD_TYPE_CALL
2167
2370
  pattern: PAYLOAD_TYPE_ROOM_MEMBER
2168
2371
  tags:
2169
2372
  - Puppet
@@ -2198,6 +2401,9 @@ paths:
2198
2401
  - PAYLOAD_TYPE_POST
2199
2402
  - PAYLOAD_TYPE_TAG
2200
2403
  - PAYLOAD_TYPE_TAG_GROUP
2404
+ - PAYLOAD_TYPE_WXXD_PRODUCT
2405
+ - PAYLOAD_TYPE_WXXD_ORDER
2406
+ - PAYLOAD_TYPE_CALL
2201
2407
  pattern: PAYLOAD_TYPE_ROOM
2202
2408
  tags:
2203
2409
  - Puppet
@@ -2968,6 +3174,43 @@ definitions:
2968
3174
  type: array
2969
3175
  items:
2970
3176
  type: string
3177
+ PuppetCallAcceptBody:
3178
+ type: object
3179
+ title: 被叫接听来电。
3180
+ PuppetCallAddBody:
3181
+ type: object
3182
+ properties:
3183
+ contactIds:
3184
+ type: array
3185
+ items:
3186
+ type: string
3187
+ title: 新增受邀方 contactId 列表(不含已在通话中的参与者)
3188
+ title: |-
3189
+ 通话中途拉人(errors-only 契约):
3190
+ - 新参与者的应答回执(响铃/接听/拒接)一律经 EVENT_TYPE_CALL 事件上行,本响应恒为空;
3191
+ - 拉人特有的失败(通话不存在/已结束、人数上限等)经 gRPC status error 返回。
3192
+ PuppetCallCancelBody:
3193
+ type: object
3194
+ title: 接通前主叫取消呼叫。
3195
+ PuppetCallHangupBody:
3196
+ type: object
3197
+ properties:
3198
+ reason:
3199
+ type: string
3200
+ title: 可空,空串表示无
3201
+ title: 接通后任一方挂断。
3202
+ PuppetCallMediaEndpointBody:
3203
+ type: object
3204
+ title: |-
3205
+ 媒体入场券:按 call_id 向协议端换取媒体网关协商入口。
3206
+ 签发可能在网关侧预分配媒体会话(有副作用),故服务端不得缓存响应、客户端按需拉取。
3207
+ PuppetCallRejectBody:
3208
+ type: object
3209
+ properties:
3210
+ reason:
3211
+ type: string
3212
+ title: 可空,空串表示无
3213
+ title: 被叫拒接来电。
2971
3214
  PuppetContactAliasBody:
2972
3215
  type: object
2973
3216
  properties:
@@ -3239,6 +3482,78 @@ definitions:
3239
3482
  - BROADCAST_TARGET_STATUS_NOT_FRIEND
3240
3483
  - BROADCAST_TARGET_STATUS_OCCUPIED
3241
3484
  default: BROADCAST_TARGET_STATUS_UNSENT
3485
+ puppetCallAcceptResponse:
3486
+ type: object
3487
+ puppetCallAddResponse:
3488
+ type: object
3489
+ puppetCallCancelResponse:
3490
+ type: object
3491
+ puppetCallHangupResponse:
3492
+ type: object
3493
+ puppetCallInviteRequest:
3494
+ type: object
3495
+ properties:
3496
+ contactIds:
3497
+ type: array
3498
+ items:
3499
+ type: string
3500
+ title: |-
3501
+ 受邀方 contactId 列表(不含发起方):单元素 = 1v1 通话,多元素 = 群通话;
3502
+ 无论几人,一通通话只铸造一个 call_id。
3503
+ media:
3504
+ $ref: '#/definitions/puppetCallType'
3505
+ title: 必填:媒体类型(VOICE/VIDEO),复用既有 CallType;零值 CALL_TYPE_UNKNOWN 会被 server 拒绝
3506
+ title: 发起呼叫请求:callId 不由主叫携带,而是由 puppet 实现侧生成并经 CallInviteResponse 返回。
3507
+ puppetCallInviteResponse:
3508
+ type: object
3509
+ properties:
3510
+ callId:
3511
+ type: string
3512
+ title: |-
3513
+ CallInvite 响应:
3514
+ - call_id 由 puppet 实现侧(协议端)生成并经本响应返回,全链路以此关联控制面与媒体旁路;
3515
+ - 上行 EVENT_TYPE_CALL 事件可能先于本响应到达,客户端须容忍乱序;
3516
+ - 后续控制 RPC(CallAccept/CallReject/CallCancel/CallHangup)凭此 call_id 引用本通通话。
3517
+ puppetCallMediaEndpointResponse:
3518
+ type: object
3519
+ properties:
3520
+ url:
3521
+ type: string
3522
+ title: 媒体网关协商入口(非媒体流地址本身)
3523
+ token:
3524
+ type: string
3525
+ title: 短时效凭证,绑定 call_id + 本端身份
3526
+ expiresAt:
3527
+ type: string
3528
+ format: date-time
3529
+ title: 凭证过期时刻;不设置 = 不过期;过期后重新拉取本 RPC
3530
+ protocol:
3531
+ type: string
3532
+ title: 入口方言(如 whip / livekit / 自定义),由媒体 SDK 消费
3533
+ puppetCallPayloadResponse:
3534
+ type: object
3535
+ properties:
3536
+ id:
3537
+ type: string
3538
+ starter:
3539
+ type: string
3540
+ title: 发起方 contactId;空串 = 协议端不可知(如中途被拉入者视角)
3541
+ participants:
3542
+ type: array
3543
+ items:
3544
+ type: string
3545
+ title: 当前全量参与者名册
3546
+ media:
3547
+ $ref: '#/definitions/puppetCallType'
3548
+ title: 当前媒体类型(语音↔视频切换经 dirty 反映)
3549
+ startTime:
3550
+ type: string
3551
+ format: date-time
3552
+ title: 通话发起时刻;接通时刻不在此(等于上行 Accept 事件的 timestamp)
3553
+ endTime:
3554
+ type: string
3555
+ format: date-time
3556
+ title: 通话结束时刻;未设置 = 通话进行中
3242
3557
  puppetCallRecordPayload:
3243
3558
  type: object
3244
3559
  properties:
@@ -3255,6 +3570,8 @@ definitions:
3255
3570
  $ref: '#/definitions/puppetCallType'
3256
3571
  status:
3257
3572
  $ref: '#/definitions/puppetCallStatus'
3573
+ puppetCallRejectResponse:
3574
+ type: object
3258
3575
  puppetCallStatus:
3259
3576
  type: string
3260
3577
  enum:
@@ -3269,7 +3586,7 @@ definitions:
3269
3586
  - CALL_STATUS_UNKNOWN: 不明确
3270
3587
  - CALL_STATUS_CANCELED: 自己取消
3271
3588
  - CALL_STATUS_REJECTED: 对方拒接
3272
- - CALL_STATUS_MISSED: 正在通话
3589
+ - CALL_STATUS_MISSED: 未接
3273
3590
  - CALL_STATUS_ONGOING: 正在通话
3274
3591
  - CALL_STATUS_ENDED: 已结束
3275
3592
  title: 类型枚举
@@ -3687,6 +4004,7 @@ definitions:
3687
4004
  - EVENT_TYPE_ROOM_ANNOUNCE
3688
4005
  - EVENT_TYPE_VERIFY_CODE
3689
4006
  - EVENT_TYPE_VERIFY_SLIDE
4007
+ - EVENT_TYPE_CALL
3690
4008
  default: EVENT_TYPE_UNSPECIFIED
3691
4009
  puppetFriendshipAcceptResponse:
3692
4010
  type: object
@@ -4543,7 +4861,11 @@ definitions:
4543
4861
  - PAYLOAD_TYPE_POST
4544
4862
  - PAYLOAD_TYPE_TAG
4545
4863
  - PAYLOAD_TYPE_TAG_GROUP
4864
+ - PAYLOAD_TYPE_WXXD_PRODUCT
4865
+ - PAYLOAD_TYPE_WXXD_ORDER
4866
+ - PAYLOAD_TYPE_CALL
4546
4867
  default: PAYLOAD_TYPE_UNSPECIFIED
4868
+ title: 数值必须与 @juzi/wechaty-puppet 的 DirtyType 严格一致。
4547
4869
  puppetPostPayloadClient:
4548
4870
  type: object
4549
4871
  properties: