@satorijs/adapter-dingtalk 2.0.3 → 2.0.5

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 (56) hide show
  1. package/lib/bot.d.ts +1 -1
  2. package/lib/http.d.ts +3 -2
  3. package/lib/index.js +35 -14
  4. package/lib/index.js.map +2 -3
  5. package/package.json +8 -4
  6. package/src/api/.eslintrc.yml +2 -0
  7. package/src/api/alitrip.ts +467 -0
  8. package/src/api/attendance.ts +81 -0
  9. package/src/api/badge.ts +285 -0
  10. package/src/api/blackboard.ts +28 -0
  11. package/src/api/calendar.ts +817 -0
  12. package/src/api/card.ts +215 -0
  13. package/src/api/conference.ts +561 -0
  14. package/src/api/connector.ts +97 -0
  15. package/src/api/contact.ts +56 -0
  16. package/src/api/convFile.ts +166 -0
  17. package/src/api/crm.ts +830 -0
  18. package/src/api/customerService.ts +156 -0
  19. package/src/api/datacenter.ts +672 -0
  20. package/src/api/devicemng.ts +202 -0
  21. package/src/api/diot.ts +19 -0
  22. package/src/api/doc.ts +232 -0
  23. package/src/api/drive.ts +109 -0
  24. package/src/api/edu.ts +30 -0
  25. package/src/api/esign.ts +44 -0
  26. package/src/api/exclusive.ts +372 -0
  27. package/src/api/h3yun.ts +537 -0
  28. package/src/api/hrm.ts +272 -0
  29. package/src/api/im.ts +978 -0
  30. package/src/api/industry.ts +153 -0
  31. package/src/api/jzcrm.ts +304 -0
  32. package/src/api/link.ts +94 -0
  33. package/src/api/live.ts +162 -0
  34. package/src/api/microApp.ts +309 -0
  35. package/src/api/oapi.ts +4083 -0
  36. package/src/api/oauth2.ts +146 -0
  37. package/src/api/pedia.ts +222 -0
  38. package/src/api/project.ts +1519 -0
  39. package/src/api/resident.ts +133 -0
  40. package/src/api/robot.ts +326 -0
  41. package/src/api/rooms.ts +334 -0
  42. package/src/api/serviceGroup.ts +216 -0
  43. package/src/api/storage.ts +1701 -0
  44. package/src/api/swform.ts +94 -0
  45. package/src/api/todo.ts +220 -0
  46. package/src/api/wiki.ts +231 -0
  47. package/src/api/workbench.ts +73 -0
  48. package/src/api/yida.ts +2165 -0
  49. package/src/bot.ts +129 -0
  50. package/src/http.ts +44 -0
  51. package/src/index.ts +9 -0
  52. package/src/internal.ts +47 -0
  53. package/src/message.ts +141 -0
  54. package/src/types/index.ts +140 -0
  55. package/src/utils.ts +53 -0
  56. package/src/ws.ts +55 -0
@@ -0,0 +1,153 @@
1
+ import { Internal } from '../internal'
2
+ // GENERATED CONTENT
3
+
4
+ export interface CampusGetCampusQuery {
5
+ /** 园区项目的部门ID。 */
6
+ campusDeptId: number
7
+ }
8
+
9
+ export interface CampusGetCampusResponse {
10
+ campusName?: string
11
+ campusCorpId?: string
12
+ campusDeptId?: number
13
+ belongProjectGroupId?: string
14
+ telephone?: string
15
+ description?: string
16
+ area?: unknown
17
+ country?: string
18
+ provId?: number
19
+ cityId?: number
20
+ countyId?: number
21
+ address?: string
22
+ location?: string
23
+ capacity?: string
24
+ orderStartTime?: number
25
+ orderEndTime?: number
26
+ orderInfo?: string
27
+ extend?: string
28
+ }
29
+
30
+ export interface CampusGetCampusGroupQuery {
31
+ /** 项目组ID。 */
32
+ groupId: number
33
+ }
34
+
35
+ export interface CampusGetCampusGroupResponse {
36
+ projectGroupName?: string
37
+ extend?: string
38
+ }
39
+
40
+ export interface CampusCreateCampusParams {
41
+ /** 园区项目的名称。 */
42
+ campusName: string
43
+ /** 归属的项目组ID。 */
44
+ belongProjectGroupId?: number
45
+ /** 联系电话。 */
46
+ telephone?: string
47
+ /** 园区项目的描述。 */
48
+ description?: string
49
+ /** 园区项目面积。 */
50
+ area?: unknown
51
+ /** 园区所在国家。 */
52
+ country?: string
53
+ /** 园区所在省行政编码。 */
54
+ provId?: number
55
+ /** 园区所在市行政编码。 */
56
+ cityId?: number
57
+ /** 园区所在区/县行政编码。 */
58
+ countyId?: number
59
+ /** 园区所在详细地址信息。 */
60
+ address?: string
61
+ /** 园区容量。 */
62
+ capacity?: number
63
+ /** 项目订购开始时间戳,单位毫秒。 */
64
+ orderStartTime?: number
65
+ /** 项目订购结束时间戳,单位毫秒。 */
66
+ orderEndTime?: number
67
+ /** 订单信息。 */
68
+ orderInfo?: string
69
+ /** 扩展字段。 */
70
+ extend?: string
71
+ /** 创建人的unionId。 */
72
+ creatorUnionId: string
73
+ /** 经纬度,格式为:经度,维度。 */
74
+ location?: string
75
+ }
76
+
77
+ export interface CampusCreateCampusResponse {
78
+ campusCorpId?: string
79
+ campusDeptId?: string
80
+ }
81
+
82
+ export interface CampusCreateCampusGroupParams {
83
+ /** 项目组名称。 */
84
+ name: string
85
+ /** 扩展信息。 */
86
+ extend?: string
87
+ }
88
+
89
+ export interface CampusCreateCampusGroupResponse {
90
+ groupId?: number
91
+ }
92
+
93
+ export interface CampusDeleteCampusGroupQuery {
94
+ /** 项目组ID。 */
95
+ campusProjectGroupId: number
96
+ }
97
+
98
+ export interface CampusDeleteCampusGroupResponse {
99
+ success?: unknown
100
+ }
101
+
102
+ // funcName: isOldApi
103
+ Internal.define({
104
+ '/industry/campuses/projectInfos': { GET: { campusGetCampus: false } },
105
+ '/industry/campuses/projects/groupInfos': {
106
+ GET: { campusGetCampusGroup: false },
107
+ },
108
+ '/industry/campuses/projects': { POST: { campusCreateCampus: false } },
109
+ '/industry/campuses/projects/groups': {
110
+ POST: { campusCreateCampusGroup: false },
111
+ DELETE: { campusDeleteCampusGroup: false },
112
+ },
113
+ })
114
+
115
+ declare module '../internal' {
116
+ interface Internal {
117
+ /**
118
+ * 查询园区项目详情
119
+ * @see https://open.dingtalk.com/document/isvapp/query-a-project-in-a-specified-campus
120
+ */
121
+ campusGetCampus(
122
+ query: CampusGetCampusQuery,
123
+ ): Promise<CampusGetCampusResponse>
124
+ /**
125
+ * 查询项目组信息
126
+ * @see https://open.dingtalk.com/document/isvapp/query-a-project-group-in-the-specified-park
127
+ */
128
+ campusGetCampusGroup(
129
+ query: CampusGetCampusGroupQuery,
130
+ ): Promise<CampusGetCampusGroupResponse>
131
+ /**
132
+ * 创建园区项目
133
+ * @see https://open.dingtalk.com/document/isvapp/create-a-campus-project
134
+ */
135
+ campusCreateCampus(
136
+ params: CampusCreateCampusParams,
137
+ ): Promise<CampusCreateCampusResponse>
138
+ /**
139
+ * 创建项目组
140
+ * @see https://open.dingtalk.com/document/isvapp/create-a-project-group
141
+ */
142
+ campusCreateCampusGroup(
143
+ params: CampusCreateCampusGroupParams,
144
+ ): Promise<CampusCreateCampusGroupResponse>
145
+ /**
146
+ * 删除项目组
147
+ * @see https://open.dingtalk.com/document/isvapp/delete-a-project-group
148
+ */
149
+ campusDeleteCampusGroup(
150
+ query: CampusDeleteCampusGroupQuery,
151
+ ): Promise<CampusDeleteCampusGroupResponse>
152
+ }
153
+ }
@@ -0,0 +1,304 @@
1
+ import { Internal } from '../internal'
2
+ // GENERATED CONTENT
3
+
4
+ export interface EditContactParams {
5
+ /** 数据类型,固定值**197**。 */
6
+ datatype: number
7
+ /** 时间戳。 */
8
+ stamp: number
9
+ /** 数据ID。 */
10
+ msgid?: number
11
+ /** 编辑数据。 */
12
+ data?: unknown
13
+ }
14
+
15
+ export interface EditContactResponse {
16
+ time: string
17
+ msgid: number
18
+ }
19
+
20
+ export interface EditCustomerPoolParams {
21
+ /** 数据类型,固定值**238**。 */
22
+ datatype: number
23
+ /** 时间戳。 */
24
+ stamp: number
25
+ /** 数据ID。 */
26
+ msgid?: number
27
+ /** 编辑数据。 */
28
+ data?: unknown
29
+ }
30
+
31
+ export interface EditCustomerPoolResponse {
32
+ time: string
33
+ msgid: number
34
+ }
35
+
36
+ export interface EditExchangeParams {
37
+ /** 数据类型,固定值**228**。 */
38
+ datatype: number
39
+ /** 时间戳。 */
40
+ stamp: number
41
+ /** 数据ID。 */
42
+ msgid?: number
43
+ /** 编辑数据。 */
44
+ data?: unknown
45
+ }
46
+
47
+ export interface EditExchangeResponse {
48
+ time: string
49
+ msgid: number
50
+ }
51
+
52
+ export interface EditGoodsParams {
53
+ /** 数据类型,固定值**154**。 */
54
+ datatype: number
55
+ /** 时间戳。 */
56
+ stamp: number
57
+ /** 数据ID。 */
58
+ msgid?: number
59
+ /** 编辑数据。 */
60
+ data?: unknown
61
+ }
62
+
63
+ export interface EditGoodsResponse {
64
+ time: string
65
+ msgid: number
66
+ }
67
+
68
+ export interface EditOutstockParams {
69
+ /** 数据类型,固定值**191**。 */
70
+ datatype: number
71
+ /** 时间戳。 */
72
+ stamp: number
73
+ /** 数据ID。 */
74
+ msgid?: number
75
+ /** 编辑数据。 */
76
+ data?: unknown
77
+ }
78
+
79
+ export interface EditOutstockResponse {
80
+ time: string
81
+ msgid: number
82
+ }
83
+
84
+ export interface EditIntostockParams {
85
+ /** 数据类型,固定值**189**。 */
86
+ datatype: number
87
+ /** 时间戳。 */
88
+ stamp: number
89
+ /** 数据ID。 */
90
+ msgid?: number
91
+ /** 编辑数据。 */
92
+ data?: unknown
93
+ }
94
+
95
+ export interface EditIntostockResponse {
96
+ time: string
97
+ msgid: number
98
+ }
99
+
100
+ export interface EditProductionParams {
101
+ /** 数据类型,固定值**156**。 */
102
+ datatype: number
103
+ /** 时间戳。 */
104
+ stamp: number
105
+ /** 数据ID。 */
106
+ msgid?: number
107
+ /** 编辑数据。 */
108
+ data?: unknown
109
+ }
110
+
111
+ export interface EditProductionResponse {
112
+ time: string
113
+ msgid: number
114
+ }
115
+
116
+ export interface EditPurchaseParams {
117
+ /** 数据类型,固定值**153**。 */
118
+ datatype: number
119
+ /** 时间戳。 */
120
+ stamp: number
121
+ /** 数据ID。 */
122
+ msgid?: number
123
+ /** 编辑数据。 */
124
+ data?: unknown
125
+ }
126
+
127
+ export interface EditPurchaseResponse {
128
+ time: string
129
+ msgid: number
130
+ }
131
+
132
+ export interface EditOrderParams {
133
+ /** 数据类型,固定填写**150**。 */
134
+ datatype: number
135
+ /** 时间戳。 */
136
+ stamp: number
137
+ /** 数据ID。 */
138
+ msgid?: number
139
+ /** 编辑数据。 */
140
+ data?: unknown
141
+ }
142
+
143
+ export interface EditOrderResponse {
144
+ time: string
145
+ msgid: number
146
+ }
147
+
148
+ export interface EditInvoiceParams {
149
+ /** 数据类型,固定值**169**。 */
150
+ datatype: number
151
+ /** 时间戳。 */
152
+ stamp: number
153
+ /** 数据ID。 */
154
+ msgid?: number
155
+ /** 编辑数据。 */
156
+ data?: unknown
157
+ }
158
+
159
+ export interface EditInvoiceResponse {
160
+ time: string
161
+ msgid: number
162
+ }
163
+
164
+ export interface EditCustomerParams {
165
+ /** 数据类型,固定值**148**。 */
166
+ datatype: number
167
+ /** 时间戳,单位:秒。 */
168
+ stamp: number
169
+ /** 数据ID。 */
170
+ msgid?: number
171
+ /** 编辑数据。 */
172
+ data?: unknown
173
+ }
174
+
175
+ export interface EditCustomerResponse {
176
+ time: string
177
+ msgid: number
178
+ }
179
+
180
+ export interface GetDataViewQuery {
181
+ /** 数据类型。 */
182
+ datatype: string
183
+ /** 数据ID。 */
184
+ msgid: number
185
+ }
186
+
187
+ export interface GetDataViewResponse {
188
+ data: {
189
+ detail: number
190
+ }
191
+ dataname: unknown
192
+ time: string
193
+ }
194
+
195
+ export interface GetDataListQuery {
196
+ /** 数据类型。 */
197
+ datatype: string
198
+ /** 页码。 */
199
+ page: number
200
+ /** 分页条数。 */
201
+ pagesize: number
202
+ }
203
+
204
+ export interface GetDataListResponse {
205
+ data: {
206
+ detail: number
207
+ }[]
208
+ dataname: unknown
209
+ page: number
210
+ pageSize: number
211
+ totalCount: number
212
+ time: string
213
+ }
214
+
215
+ // funcName: isOldApi
216
+ Internal.define({
217
+ '/jzcrm/contacts': { POST: { editContact: false } },
218
+ '/jzcrm/customerPools': { POST: { editCustomerPool: false } },
219
+ '/jzcrm/exchanges': { POST: { editExchange: false } },
220
+ '/jzcrm/goods': { POST: { editGoods: false } },
221
+ '/jzcrm/outstocks': { POST: { editOutstock: false } },
222
+ '/jzcrm/intostocks': { POST: { editIntostock: false } },
223
+ '/jzcrm/productions': { POST: { editProduction: false } },
224
+ '/jzcrm/purchases': { POST: { editPurchase: false } },
225
+ '/jzcrm/orders': { POST: { editOrder: false } },
226
+ '/jzcrm/invoices': { POST: { editInvoice: false } },
227
+ '/jzcrm/customers': { POST: { editCustomer: false } },
228
+ '/jzcrm/dataView': { GET: { getDataView: false } },
229
+ '/jzcrm/data': { GET: { getDataList: false } },
230
+ })
231
+
232
+ declare module '../internal' {
233
+ interface Internal {
234
+ /**
235
+ * 联系人
236
+ * @see https://open.dingtalk.com/document/isvapp/add-or-edit-contacts
237
+ */
238
+ editContact(params: EditContactParams): Promise<EditContactResponse>
239
+ /**
240
+ * 客户公共池
241
+ * @see https://open.dingtalk.com/document/isvapp/add-or-edit-customer-public-pools
242
+ */
243
+ editCustomerPool(
244
+ params: EditCustomerPoolParams,
245
+ ): Promise<EditCustomerPoolResponse>
246
+ /**
247
+ * 编辑销售换货单数据
248
+ * @see https://open.dingtalk.com/document/isvapp/add-or-edit-a-sales-order
249
+ */
250
+ editExchange(params: EditExchangeParams): Promise<EditExchangeResponse>
251
+ /**
252
+ * 编辑产品数据
253
+ * @see https://open.dingtalk.com/document/isvapp/add-or-edit-product-information
254
+ */
255
+ editGoods(params: EditGoodsParams): Promise<EditGoodsResponse>
256
+ /**
257
+ * 编辑出库单信息
258
+ * @see https://open.dingtalk.com/document/isvapp/add-or-edit-an-issue-ticket
259
+ */
260
+ editOutstock(params: EditOutstockParams): Promise<EditOutstockResponse>
261
+ /**
262
+ * 编辑入库单数据
263
+ * @see https://open.dingtalk.com/document/isvapp/add-or-edit-a-shipment-record
264
+ */
265
+ editIntostock(params: EditIntostockParams): Promise<EditIntostockResponse>
266
+ /**
267
+ * 生产单
268
+ * @see https://open.dingtalk.com/document/isvapp/add-or-edit-a-production-order
269
+ */
270
+ editProduction(
271
+ params: EditProductionParams,
272
+ ): Promise<EditProductionResponse>
273
+ /**
274
+ * 采购单
275
+ * @see https://open.dingtalk.com/document/isvapp/edit-purchase-order
276
+ */
277
+ editPurchase(params: EditPurchaseParams): Promise<EditPurchaseResponse>
278
+ /**
279
+ * 合同订单
280
+ * @see https://open.dingtalk.com/document/isvapp/add-or-edit-contract-orders
281
+ */
282
+ editOrder(params: EditOrderParams): Promise<EditOrderResponse>
283
+ /**
284
+ * 发货单
285
+ * @see https://open.dingtalk.com/document/isvapp/add-or-edit-invoices
286
+ */
287
+ editInvoice(params: EditInvoiceParams): Promise<EditInvoiceResponse>
288
+ /**
289
+ * 客户资料
290
+ * @see https://open.dingtalk.com/document/isvapp/add-or-edit-customer-profile
291
+ */
292
+ editCustomer(params: EditCustomerParams): Promise<EditCustomerResponse>
293
+ /**
294
+ * 获取数据详情
295
+ * @see https://open.dingtalk.com/document/isvapp/queries-data-details
296
+ */
297
+ getDataView(query: GetDataViewQuery): Promise<GetDataViewResponse>
298
+ /**
299
+ * 获取数据列表
300
+ * @see https://open.dingtalk.com/document/isvapp/obtain-the-data-list
301
+ */
302
+ getDataList(query: GetDataListQuery): Promise<GetDataListResponse>
303
+ }
304
+ }
@@ -0,0 +1,94 @@
1
+ import { Internal } from '../internal'
2
+ // GENERATED CONTENT
3
+
4
+ export interface GetUserFollowStatusQuery {
5
+ /** 待查询的服务窗关注者userId。 */
6
+ userId?: string
7
+ /** 待查询的服务窗关注者unionId。 */
8
+ unionId?: string
9
+ /** 服务窗帐号ID,可通过[服务窗帐号信息查询](https://open.dingtalk.com/document/orgapp/queries-the-list-of-services-under-an-enterprise)接口,获取返回参数`accountId`字段值。 */
10
+ accountId?: string
11
+ }
12
+
13
+ export interface GetUserFollowStatusResponse {
14
+ result: {
15
+ status?: string
16
+ }
17
+ }
18
+
19
+ export interface ListAccountResponse {
20
+ result?: {
21
+ accountId?: string
22
+ accountName?: string
23
+ }[]
24
+ }
25
+
26
+ export interface ListFollowerQuery {
27
+ /** 分页游标。 */
28
+ nextToken?: string
29
+ /** 每页最大条目数,最大值100。 */
30
+ maxResults?: number
31
+ /** 服务窗帐号ID,可调用[获取企业下服务窗列表](https://open.dingtalk.com/document/orgapp-server/queries-the-list-of-services-under-an-enterprise)接口获取accountId参数值。 */
32
+ accountId?: string
33
+ }
34
+
35
+ export interface ListFollowerResponse {
36
+ requestId?: string
37
+ result: {
38
+ nextToken?: string
39
+ userList?: number
40
+ }
41
+ }
42
+
43
+ export interface GetFollowerInfoQuery {
44
+ /** 关注服务窗用户的userId,可调用[批量获取关注服务窗用户信息](https://open.dingtalk.com/document/orgapp-server/obtains-the-follower-information-from-the-service-window)获得userId参数值。 */
45
+ userId?: string
46
+ /** 关注服务窗用户的unionId,可通过[查询用户详情](https://open.dingtalk.com/document/orgapp-server/query-user-details)接口获取unionId参数值。 */
47
+ unionId?: string
48
+ /** 服务窗帐号ID,可调用[获取企业下服务窗列表](https://open.dingtalk.com/document/orgapp-server/queries-the-list-of-services-under-an-enterprise)接口获取accountId参数值。 */
49
+ accountId?: string
50
+ }
51
+
52
+ export interface GetFollowerInfoResponse {
53
+ requestId?: string
54
+ result: {
55
+ user?: number
56
+ }
57
+ }
58
+
59
+ // funcName: isOldApi
60
+ Internal.define({
61
+ '/link/followers/statuses': { GET: { getUserFollowStatus: false } },
62
+ '/link/accounts': { GET: { listAccount: false } },
63
+ '/link/followers': { GET: { listFollower: false } },
64
+ '/link/followers/infos': { GET: { getFollowerInfo: false } },
65
+ })
66
+
67
+ declare module '../internal' {
68
+ interface Internal {
69
+ /**
70
+ * 获取用户关注状态
71
+ * @see https://open.dingtalk.com/document/orgapp/obtain-the-attention-status-of-the-user-service-window
72
+ */
73
+ getUserFollowStatus(
74
+ query: GetUserFollowStatusQuery,
75
+ ): Promise<GetUserFollowStatusResponse>
76
+ /**
77
+ * 获取企业下服务窗帐号列表
78
+ * @see https://open.dingtalk.com/document/orgapp/queries-the-list-of-services-under-an-enterprise
79
+ */
80
+ listAccount(): Promise<ListAccountResponse>
81
+ /**
82
+ * 批量获取关注服务窗用户信息
83
+ * @see https://open.dingtalk.com/document/orgapp/obtains-the-follower-information-from-the-service-window
84
+ */
85
+ listFollower(query: ListFollowerQuery): Promise<ListFollowerResponse>
86
+ /**
87
+ * 获取服务窗关注人信息
88
+ * @see https://open.dingtalk.com/document/orgapp/queries-the-follower-information-of-the-service-window
89
+ */
90
+ getFollowerInfo(
91
+ query: GetFollowerInfoQuery,
92
+ ): Promise<GetFollowerInfoResponse>
93
+ }
94
+ }
@@ -0,0 +1,162 @@
1
+ import { Internal } from '../internal'
2
+ // GENERATED CONTENT
3
+
4
+ export interface DeleteLiveQuery {
5
+ /** 直播ID。 */
6
+ liveId: string
7
+ /** 用户unionId。 */
8
+ unionId: string
9
+ }
10
+
11
+ export interface DeleteLiveResponse {
12
+ result?: {
13
+ success?: number
14
+ }
15
+ }
16
+
17
+ export interface QueryLiveWatchUserListQuery {
18
+ /** 直播ID。 */
19
+ liveId: string
20
+ /** 用户unionId。 */
21
+ unionId: string
22
+ /** 分页起始位置,从0开始。 */
23
+ pageNumber?: number
24
+ /** 分页大小。 */
25
+ pageSize: number
26
+ }
27
+
28
+ export interface QueryLiveWatchUserListResponse {
29
+ result?: {
30
+ orgUsesList?: number
31
+ outOrgUserList?: number
32
+ }
33
+ }
34
+
35
+ export interface QueryLiveWatchDetailQuery {
36
+ /** 直播ID。 */
37
+ liveId: string
38
+ /** 用户unionId。 */
39
+ unionId: string
40
+ }
41
+
42
+ export interface QueryLiveWatchDetailResponse {
43
+ result?: {
44
+ pv?: number
45
+ uv?: number
46
+ liveUv?: number
47
+ playbackUv?: number
48
+ totalWatchTime?: number
49
+ avgWatchTime?: number
50
+ praiseCount?: number
51
+ msgCount?: number
52
+ }
53
+ }
54
+
55
+ export interface UpdateLiveParams {
56
+ /** 直播ID。 */
57
+ liveId: string
58
+ /** 主播的unionId。 */
59
+ unionId: string
60
+ /** 直播标题。 */
61
+ title?: string
62
+ /** 直播简介。 */
63
+ introduction?: string
64
+ /** 直播的封面地址。 */
65
+ coverUrl?: string
66
+ /** 直播的预计开播时间戳,单位毫秒。 */
67
+ preStartTime?: number
68
+ /** 直播的预计结束时间戳,单位毫秒。 */
69
+ preEndTime?: number
70
+ }
71
+
72
+ export interface UpdateLiveResponse {
73
+ result?: {
74
+ success?: number
75
+ }
76
+ }
77
+
78
+ export interface CreateLiveParams {
79
+ /** 发起直播的主播unionId。 */
80
+ unionId: string
81
+ /** 直播标题。 */
82
+ title: string
83
+ /** 直播简介。 */
84
+ introduction?: string
85
+ /** 预计开播时间戳,单位毫秒。 */
86
+ preStartTime: number
87
+ /** 直播的封面地址。 */
88
+ coverUrl?: string
89
+ /** 预计结束时间戳,单位毫秒。 */
90
+ preEndTime: number
91
+ publicType?: number
92
+ }
93
+
94
+ export interface CreateLiveResponse {
95
+ result?: {
96
+ liveId?: string
97
+ }
98
+ }
99
+
100
+ export interface QueryLiveInfoQuery {
101
+ /** 直播ID。 */
102
+ liveId: string
103
+ /** 操作者的unionId。 */
104
+ unionId: string
105
+ }
106
+
107
+ export interface QueryLiveInfoResponse {
108
+ result?: {
109
+ liveInfo?: number
110
+ }
111
+ }
112
+
113
+ // funcName: isOldApi
114
+ Internal.define({
115
+ '/live/lives': {
116
+ DELETE: { deleteLive: false },
117
+ PUT: { updateLive: false },
118
+ POST: { createLive: false },
119
+ GET: { queryLiveInfo: false },
120
+ },
121
+ '/live/lives/watchUsers': { GET: { queryLiveWatchUserList: false } },
122
+ '/live/lives/watchDetails': { GET: { queryLiveWatchDetail: false } },
123
+ })
124
+
125
+ declare module '../internal' {
126
+ interface Internal {
127
+ /**
128
+ * 删除直播
129
+ * @see https://open.dingtalk.com/document/isvapp/delete-live-streaming
130
+ */
131
+ deleteLive(query: DeleteLiveQuery): Promise<DeleteLiveResponse>
132
+ /**
133
+ * 查询直播观看人员信息
134
+ * @see https://open.dingtalk.com/document/isvapp/queries-the-viewing-information-of-viewers
135
+ */
136
+ queryLiveWatchUserList(
137
+ query: QueryLiveWatchUserListQuery,
138
+ ): Promise<QueryLiveWatchUserListResponse>
139
+ /**
140
+ * 获取直播的观看数据
141
+ * @see https://open.dingtalk.com/document/orgapp/queries-the-playback-data-of-a-live-stream
142
+ */
143
+ queryLiveWatchDetail(
144
+ query: QueryLiveWatchDetailQuery,
145
+ ): Promise<QueryLiveWatchDetailResponse>
146
+ /**
147
+ * 修改直播属性信息
148
+ * @see https://open.dingtalk.com/document/isvapp/modify-live-streaming
149
+ */
150
+ updateLive(params: UpdateLiveParams): Promise<UpdateLiveResponse>
151
+ /**
152
+ * 创建直播
153
+ * @see https://open.dingtalk.com/document/isvapp/create-live-streaming
154
+ */
155
+ createLive(params: CreateLiveParams): Promise<CreateLiveResponse>
156
+ /**
157
+ * 查询直播详情
158
+ * @see https://open.dingtalk.com/document/isvapp/queries-the-live-streaming-information
159
+ */
160
+ queryLiveInfo(query: QueryLiveInfoQuery): Promise<QueryLiveInfoResponse>
161
+ }
162
+ }