@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,309 @@
1
+ import { Internal } from '../internal'
2
+ // GENERATED CONTENT
3
+
4
+ export interface RollbackInnerAppVersionParams {
5
+ /** 小程序版本id,用于唯一标识小程序版本信息。可通过调用服务端API-[获取企业内部小程序历史版本列表](https://open.dingtalk.com/document/orgapp/obtain-the-list-of-historical-versions-of-enterprise-internal-applets)接口,获取返回参数中`appVersionId`字段值。 */
6
+ appVersionId: number
7
+ /** 操作人的unionId。可调用[查询用户详情](https://open.dingtalk.com/document/orgapp/query-user-details)接口获取`unionId`参数值。 */
8
+ opUnionId: string
9
+ }
10
+
11
+ export interface RollbackInnerAppVersionResponse {
12
+ result?: unknown
13
+ }
14
+
15
+ export interface PublishInnerAppVersionParams {
16
+ appVersionId: number
17
+ /** 操作人的unionId。 */
18
+ opUnionId: string
19
+ /** 小程序发布类型,取值: */
20
+ publishType?: string
21
+ /** 是否支持PC端打开小程序,取值: */
22
+ miniAppOnPc?: unknown
23
+ }
24
+
25
+ export interface PublishInnerAppVersionResponse {
26
+ result?: unknown
27
+ }
28
+
29
+ export interface PageInnerAppHistoryVersionQuery {
30
+ /** 当前页。 */
31
+ pageNumber: number
32
+ /** 本次读取的最大数据记录数量。 */
33
+ pageSize: number
34
+ }
35
+
36
+ export interface PageInnerAppHistoryVersionResponse {
37
+ totalCount?: number
38
+ miniAppVersionList?: {
39
+ appVersionId: number
40
+ miniAppId?: string
41
+ appVersion: string
42
+ appVersionType: number
43
+ miniAppOnPc: number
44
+ createTime: string
45
+ modifyTime: string
46
+ }[]
47
+ }
48
+
49
+ export interface ListInnerAppVersionResponse {
50
+ appVersionList?: {
51
+ appVersionId: number
52
+ miniAppId: string
53
+ appVersion: string
54
+ appVersionType: number
55
+ miniAppOnPc?: number
56
+ createTime: string
57
+ modifyTime: string
58
+ entranceLink?: string
59
+ }[]
60
+ }
61
+
62
+ export interface ListAllInnerAppsResponse {
63
+ appList?: {
64
+ agentId: number
65
+ name?: string
66
+ desc?: string
67
+ icon?: string
68
+ homepageLink?: string
69
+ pcHomepageLink?: string
70
+ ompLink?: string
71
+ appId: number
72
+ appStatus: number
73
+ developType: number
74
+ }[]
75
+ }
76
+
77
+ export interface GetMicroAppScopeResponse {
78
+ result?: {
79
+ userIds: number
80
+ deptIds: number
81
+ roleIds: number
82
+ onlyAdminVisible: number
83
+ }
84
+ }
85
+
86
+ export interface SetMicroAppScopeParams {
87
+ /** 增加的可使用用户userId列表,最大长度100。 */
88
+ addUserIds?: string[]
89
+ /** 删除的可使用用户userId列表,最大长度100。 */
90
+ delUserIds?: string[]
91
+ /** 增加的可使用部门ID列表,最大长度100。 */
92
+ addDeptIds?: number[]
93
+ /** 删除的可使用部门ID列表,最大长度100。 */
94
+ delDeptIds?: number[]
95
+ /** 用户角色ID, */
96
+ addRoleIds?: number[]
97
+ /** 删除的可使用角色列表,通过[获取角色列表](https://open.dingtalk.com/document/orgapp-server/obtains-a-list-of-enterprise-roles)接口获取,最大长度100。 */
98
+ delRoleIds?: number[]
99
+ /** 是否仅管理员可使用。 */
100
+ onlyAdminVisible?: unknown
101
+ }
102
+
103
+ export interface SetMicroAppScopeResponse {
104
+ result?: unknown
105
+ }
106
+
107
+ export interface ListUserVilebleAppResponse {
108
+ appList?: {
109
+ agentId: number
110
+ name?: string
111
+ desc?: string
112
+ icon?: string
113
+ homepageLink?: string
114
+ pcHomepageLink?: string
115
+ ompLink?: string
116
+ appId: number
117
+ appStatus: number
118
+ developType: number
119
+ }[]
120
+ }
121
+
122
+ export interface ListAllAppResponse {
123
+ appList?: {
124
+ agentId: number
125
+ name?: string
126
+ desc?: string
127
+ icon?: string
128
+ homepageLink?: string
129
+ pcHomepageLink?: string
130
+ ompLink?: string
131
+ appId: number
132
+ appStatus: number
133
+ developType: number
134
+ }[]
135
+ }
136
+
137
+ export interface DeleteInnerAppQuery {
138
+ /** 操作人的unionId,可调用[查询用户详情](https://open.dingtalk.com/document/orgapp/query-user-details)接口获取unionid参数值。 */
139
+ opUnionId: string
140
+ }
141
+
142
+ export interface DeleteInnerAppResponse {
143
+ result?: unknown
144
+ }
145
+
146
+ export interface UpdateInnerAppParams {
147
+ /** 操作更新的员工unionId,可调用[查询用户信息](https://open.dingtalk.com/document/orgapp/query-user-details)接口获取unionid参数值。 */
148
+ opUnionId: string
149
+ /** 应用名称,名称可以由中文、数字以及字母组成,长度范围要求2-20个字符。 */
150
+ name?: string
151
+ /** 应用描述,最大长度200个字符。 */
152
+ desc?: string
153
+ /** 应用图标,可调用[上传媒体文件](https://open.dingtalk.com/document/orgapp/upload-media-files)接口获取media_id参数值。 */
154
+ icon?: string
155
+ /** 应用首页地址,请输入http或https开头的网址链接。 */
156
+ homepageLink?: string
157
+ /** 应用PC端地址,请输入http或https开头的链接。 */
158
+ pcHomepageLink?: string
159
+ /** 应用管理后台地址,输入http或https开头的链接。 */
160
+ ompLink?: string
161
+ /** 服务器出口ip白名单,支持带一个*号通配符的IP格式。 */
162
+ ipWhiteList?: string[]
163
+ }
164
+
165
+ export interface UpdateInnerAppResponse {
166
+ result?: unknown
167
+ }
168
+
169
+ export interface CreateInnerAppParams {
170
+ /** 操作人的unionId,该用户必须是拥有**应用管理权限**的管理员,可调用[查询用户详情](https://open.dingtalk.com/document/orgapp/query-user-details)接口获取unionid参数值。 */
171
+ opUnionId: string
172
+ /** 应用名称。 */
173
+ name: string
174
+ /** 应用描述。 */
175
+ desc: string
176
+ /** 应用图标media,调用[上传媒体文件](https://open.dingtalk.com/document/orgapp/upload-media-files)接口获取media_id参数值。 */
177
+ icon?: string
178
+ /** 应用首页地址。 */
179
+ homepageLink?: string
180
+ /** 应用PC端地址。 */
181
+ pcHomepageLink?: string
182
+ /** 应用管理后台地址。 */
183
+ ompLink?: string
184
+ /** 服务器出口IP白名单列表,最大值50。 */
185
+ ipWhiteList?: string[]
186
+ /** 权限类型,目前只支持BASE。 */
187
+ scopeType?: string
188
+ /** 创建的内部应用类型:【默认为0】 */
189
+ developType?: number
190
+ }
191
+
192
+ export interface CreateInnerAppResponse {
193
+ agentId?: number
194
+ appKey?: string
195
+ appSecret?: string
196
+ }
197
+
198
+ // funcName: isOldApi
199
+ Internal.define({
200
+ '/microApp/innerMiniApps/{agentId}/versions/rollback': {
201
+ POST: { rollbackInnerAppVersion: false },
202
+ },
203
+ '/microApp/innerMiniApps/{agentId}/versions/publish': {
204
+ POST: { publishInnerAppVersion: false },
205
+ },
206
+ '/microApp/innerMiniApps/{agentId}/historyVersions': {
207
+ GET: { pageInnerAppHistoryVersion: false },
208
+ },
209
+ '/microApp/innerMiniApps/{agentId}/versions': {
210
+ GET: { listInnerAppVersion: false },
211
+ },
212
+ '/microApp/allInnerApps': { GET: { listAllInnerApps: false } },
213
+ '/microApp/apps/{agentId}/scopes': {
214
+ GET: { getMicroAppScope: false },
215
+ POST: { setMicroAppScope: false },
216
+ },
217
+ '/microApp/users/{userId}/apps': { GET: { listUserVilebleApp: false } },
218
+ '/microApp/allApps': { GET: { listAllApp: false } },
219
+ '/microApp/apps/{agentId}': {
220
+ DELETE: { deleteInnerApp: false },
221
+ PUT: { updateInnerApp: false },
222
+ },
223
+ '/microApp/apps': { POST: { createInnerApp: false } },
224
+ })
225
+
226
+ declare module '../internal' {
227
+ interface Internal {
228
+ /**
229
+ * 回滚企业内部小程序版本
230
+ * @see https://open.dingtalk.com/document/app/rollback-of-enterprise-internal-applet-version
231
+ */
232
+ rollbackInnerAppVersion(
233
+ agentId: number,
234
+ params: RollbackInnerAppVersionParams,
235
+ ): Promise<RollbackInnerAppVersionResponse>
236
+ /**
237
+ * 发布企业内部小程序版本
238
+ * @see https://open.dingtalk.com/document/orgapp/release-internal-applet-version
239
+ */
240
+ publishInnerAppVersion(
241
+ agentId: number,
242
+ params: PublishInnerAppVersionParams,
243
+ ): Promise<PublishInnerAppVersionResponse>
244
+ /**
245
+ * 获取企业内部小程序历史版本列表
246
+ * @see https://open.dingtalk.com/document/orgapp/obtain-the-list-of-historical-versions-of-enterprise-internal-applets
247
+ */
248
+ pageInnerAppHistoryVersion(
249
+ agentId: number,
250
+ query: PageInnerAppHistoryVersionQuery,
251
+ ): Promise<PageInnerAppHistoryVersionResponse>
252
+ /**
253
+ * 获取企业内部小程序的版本列表
254
+ * @see https://open.dingtalk.com/document/orgapp/get-the-version-list-of-the-enterprise-internal-applet
255
+ */
256
+ listInnerAppVersion(agentId: number): Promise<ListInnerAppVersionResponse>
257
+ /**
258
+ * 获取企业所有内部应用列表
259
+ * @see https://open.dingtalk.com/document/orgapp/get-a-list-of-all-applications-inside-the-enterprise
260
+ */
261
+ listAllInnerApps(): Promise<ListAllInnerAppsResponse>
262
+ /**
263
+ * 获取企业内部应用微应用的可使用范围
264
+ * @see https://open.dingtalk.com/document/orgapp/obtains-the-application-visible-range
265
+ */
266
+ getMicroAppScope(agentId: number): Promise<GetMicroAppScopeResponse>
267
+ /**
268
+ * 更新企业内部应用微应用的可使用范围
269
+ * @see https://open.dingtalk.com/document/orgapp/update-the-visible-range-of-micro-applications
270
+ */
271
+ setMicroAppScope(
272
+ agentId: number,
273
+ params: SetMicroAppScopeParams,
274
+ ): Promise<SetMicroAppScopeResponse>
275
+ /**
276
+ * 获取用户可见的企业应用列表
277
+ * @see https://open.dingtalk.com/document/orgapp/obtains-the-list-of-enterprise-applications-visible-to-a-user
278
+ */
279
+ listUserVilebleApp(userId: string): Promise<ListUserVilebleAppResponse>
280
+ /**
281
+ * 获取企业所有应用列表
282
+ * @see https://open.dingtalk.com/document/orgapp/obtains-a-list-of-all-enterprise-applications
283
+ */
284
+ listAllApp(): Promise<ListAllAppResponse>
285
+ /**
286
+ * 删除企业内部应用
287
+ * @see https://open.dingtalk.com/document/app/delete-an-internal-h5-application
288
+ */
289
+ deleteInnerApp(
290
+ agentId: number,
291
+ query: DeleteInnerAppQuery,
292
+ ): Promise<DeleteInnerAppResponse>
293
+ /**
294
+ * 更新企业内部应用
295
+ * @see https://open.dingtalk.com/document/app/update-internal-h5-applications
296
+ */
297
+ updateInnerApp(
298
+ agentId: number,
299
+ params: UpdateInnerAppParams,
300
+ ): Promise<UpdateInnerAppResponse>
301
+ /**
302
+ * 创建企业内部应用
303
+ * @see https://open.dingtalk.com/document/app/create-an-h5-application-for-your-enterprise
304
+ */
305
+ createInnerApp(
306
+ params: CreateInnerAppParams,
307
+ ): Promise<CreateInnerAppResponse>
308
+ }
309
+ }