@satorijs/adapter-lark 3.10.6 → 3.11.1

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 (119) hide show
  1. package/lib/content.d.ts +211 -93
  2. package/lib/index.cjs +2954 -2474
  3. package/lib/internal.d.ts +4 -4
  4. package/lib/message.d.ts +2 -3
  5. package/lib/types/acs.d.ts +212 -172
  6. package/lib/types/admin.d.ts +331 -291
  7. package/lib/types/aily.d.ts +331 -216
  8. package/lib/types/apaas.d.ts +646 -494
  9. package/lib/types/application.d.ts +559 -458
  10. package/lib/types/approval.d.ts +826 -791
  11. package/lib/types/attendance.d.ts +1094 -994
  12. package/lib/types/auth.d.ts +66 -61
  13. package/lib/types/authen.d.ts +221 -186
  14. package/lib/types/baike.d.ts +258 -233
  15. package/lib/types/base.d.ts +74 -0
  16. package/lib/types/bitable.d.ts +830 -770
  17. package/lib/types/board.d.ts +29 -14
  18. package/lib/types/calendar.d.ts +660 -605
  19. package/lib/types/cardkit.d.ts +149 -134
  20. package/lib/types/compensation.d.ts +84 -49
  21. package/lib/types/contact.d.ts +1279 -1204
  22. package/lib/types/corehr.d.ts +4982 -4526
  23. package/lib/types/directory.d.ts +447 -0
  24. package/lib/types/docs.d.ts +28 -18
  25. package/lib/types/document_ai.d.ts +347 -252
  26. package/lib/types/docx.d.ts +428 -383
  27. package/lib/types/drive.d.ts +1093 -1048
  28. package/lib/types/ehr.d.ts +66 -51
  29. package/lib/types/event.d.ts +16 -6
  30. package/lib/types/helpdesk.d.ts +816 -741
  31. package/lib/types/hire.d.ts +3955 -3589
  32. package/lib/types/human_authentication.d.ts +32 -22
  33. package/lib/types/im.d.ts +1420 -1295
  34. package/lib/types/index.d.ts +1422 -330
  35. package/lib/types/lingo.d.ts +279 -249
  36. package/lib/types/mail.d.ts +1032 -675
  37. package/lib/types/mdm.d.ts +105 -37
  38. package/lib/types/minutes.d.ts +73 -26
  39. package/lib/types/moments.d.ts +23 -13
  40. package/lib/types/okr.d.ts +266 -225
  41. package/lib/types/optical_char_recognition.d.ts +22 -12
  42. package/lib/types/passport.d.ts +58 -48
  43. package/lib/types/payroll.d.ts +210 -53
  44. package/lib/types/performance.d.ts +463 -414
  45. package/lib/types/personal_settings.d.ts +93 -82
  46. package/lib/types/report.d.ts +79 -58
  47. package/lib/types/search.d.ts +265 -235
  48. package/lib/types/security_and_compliance.d.ts +30 -19
  49. package/lib/types/sheets.d.ts +356 -321
  50. package/lib/types/speech_to_text.d.ts +44 -34
  51. package/lib/types/task.d.ts +998 -1087
  52. package/lib/types/tenant.d.ts +25 -15
  53. package/lib/types/translation.d.ts +42 -32
  54. package/lib/types/trust_party.d.ts +81 -0
  55. package/lib/types/vc.d.ts +1218 -1123
  56. package/lib/types/verification.d.ts +11 -6
  57. package/lib/types/wiki.d.ts +270 -235
  58. package/lib/types/workplace.d.ts +58 -38
  59. package/lib/utils.d.ts +2 -2
  60. package/package.json +4 -4
  61. package/src/bot.ts +15 -15
  62. package/src/content.ts +230 -107
  63. package/src/internal.ts +29 -12
  64. package/src/message.ts +82 -111
  65. package/src/types/acs.ts +234 -186
  66. package/src/types/admin.ts +353 -305
  67. package/src/types/aily.ts +375 -233
  68. package/src/types/apaas.ts +754 -568
  69. package/src/types/application.ts +633 -507
  70. package/src/types/approval.ts +914 -872
  71. package/src/types/attendance.ts +1226 -1104
  72. package/src/types/auth.ts +72 -66
  73. package/src/types/authen.ts +233 -191
  74. package/src/types/baike.ts +276 -246
  75. package/src/types/base.ts +93 -0
  76. package/src/types/bitable.ts +966 -894
  77. package/src/types/board.ts +34 -16
  78. package/src/types/calendar.ts +751 -685
  79. package/src/types/cardkit.ts +164 -146
  80. package/src/types/compensation.ts +97 -55
  81. package/src/types/contact.ts +1465 -1375
  82. package/src/types/corehr.ts +5664 -5077
  83. package/src/types/directory.ts +569 -0
  84. package/src/types/docs.ts +31 -19
  85. package/src/types/document_ai.ts +401 -287
  86. package/src/types/docx.ts +492 -438
  87. package/src/types/drive.ts +1266 -1213
  88. package/src/types/ehr.ts +71 -53
  89. package/src/types/event.ts +19 -7
  90. package/src/types/helpdesk.ts +930 -840
  91. package/src/types/hire.ts +4453 -4019
  92. package/src/types/human_authentication.ts +35 -23
  93. package/src/types/im.ts +1626 -1476
  94. package/src/types/index.ts +1532 -346
  95. package/src/types/lingo.ts +299 -263
  96. package/src/types/mail.ts +1231 -779
  97. package/src/types/mdm.ts +122 -39
  98. package/src/types/minutes.ts +88 -28
  99. package/src/types/moments.ts +26 -14
  100. package/src/types/okr.ts +286 -238
  101. package/src/types/optical_char_recognition.ts +25 -13
  102. package/src/types/passport.ts +62 -50
  103. package/src/types/payroll.ts +254 -57
  104. package/src/types/performance.ts +528 -467
  105. package/src/types/personal_settings.ts +101 -89
  106. package/src/types/report.ts +86 -62
  107. package/src/types/search.ts +285 -249
  108. package/src/types/security_and_compliance.ts +33 -21
  109. package/src/types/sheets.ts +421 -379
  110. package/src/types/speech_to_text.ts +48 -36
  111. package/src/types/task.ts +1152 -1260
  112. package/src/types/tenant.ts +29 -17
  113. package/src/types/translation.ts +46 -34
  114. package/src/types/trust_party.ts +110 -0
  115. package/src/types/vc.ts +1397 -1283
  116. package/src/types/verification.ts +13 -7
  117. package/src/types/wiki.ts +293 -251
  118. package/src/types/workplace.ts +65 -41
  119. package/src/utils.ts +3 -3
@@ -1,614 +1,740 @@
1
- import { AppContactsRangeIdList, Application, ApplicationAppContactsRange, ApplicationAppUsage, ApplicationAppVersion, ApplicationDepartmentAppUsage, ApplicationFeedback, ApplicationVisibilityDepartmentWhiteBlackInfo, ApplicationVisibilityGroupWhiteBlackInfo, ApplicationVisibilityUserWhiteBlackInfo, AppRecommendRule, AppVisibilityIdList, ClientBadgeNum, Scope } from '.'
2
- import { Internal, Pagination } from '../internal'
1
+ import * as Lark from '.'
2
+ import { Internal, Paginated, Pagination } from '../internal'
3
3
 
4
4
  declare module '../internal' {
5
5
  interface Internal {
6
+ application: Application.Methods
7
+ }
8
+ }
9
+
10
+ export namespace Application {
11
+ export interface Methods {
12
+ owner: Owner.Methods
13
+ collaborators: Collaborators.Methods
14
+ appVersion: AppVersion.Methods
15
+ scope: Scope.Methods
16
+ contactsRange: ContactsRange.Methods
17
+ visibility: Visibility.Methods
18
+ management: Management.Methods
19
+ appUsage: AppUsage.Methods
20
+ feedback: Feedback.Methods
21
+ appBadge: AppBadge.Methods
22
+ appRecommendRule: AppRecommendRule.Methods
6
23
  /**
7
24
  * 获取应用信息
8
25
  * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application/get
9
26
  */
10
- getApplication(app_id: string, query?: GetApplicationQuery): Promise<GetApplicationResponse>
11
- /**
12
- * 获取应用版本信息
13
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-app_version/get
14
- */
15
- getApplicationApplicationAppVersion(app_id: string, version_id: string, query?: GetApplicationApplicationAppVersionQuery): Promise<GetApplicationApplicationAppVersionResponse>
16
- /**
17
- * 获取应用版本列表
18
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-app_version/list
19
- */
20
- listApplicationApplicationAppVersion(app_id: string, query?: ListApplicationApplicationAppVersionQuery): Paginated<ApplicationAppVersion>
21
- /**
22
- * 获取应用版本中开发者申请的通讯录权限范围
23
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-app_version/contacts_range_suggest
24
- */
25
- contactsRangeSuggestApplicationApplicationAppVersion(app_id: string, version_id: string, query?: ContactsRangeSuggestApplicationApplicationAppVersionQuery): Promise<ContactsRangeSuggestApplicationApplicationAppVersionResponse>
26
- /**
27
- * 向管理员申请授权
28
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/scope/apply
29
- */
30
- applyApplicationScope(): Promise<void>
31
- /**
32
- * 查询租户授权状态
33
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/scope/list
34
- */
35
- listApplicationScope(): Promise<ListApplicationScopeResponse>
27
+ get(app_id: string, query?: GetQuery): Promise<GetResponse>
36
28
  /**
37
29
  * 获取企业安装的应用
38
30
  * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application/list
39
31
  */
40
- listApplication(query?: ListApplicationQuery): Promise<ListApplicationResponse> & AsyncIterableIterator<Application>
32
+ list(query?: ListQuery): Promise<ListResponse> & AsyncIterableIterator<Lark.Application>
41
33
  /**
42
34
  * 查看待审核的应用列表
43
35
  * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application/underauditlist
44
36
  */
45
- underauditlistApplication(query?: UnderauditlistApplicationQuery): Paginated<Application>
46
- /**
47
- * 更新应用审核状态
48
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-app_version/patch
49
- */
50
- patchApplicationApplicationAppVersion(app_id: string, version_id: string, body: PatchApplicationApplicationAppVersionRequest, query?: PatchApplicationApplicationAppVersionQuery): Promise<void>
37
+ underauditlist(query?: UnderauditlistQuery): Paginated<Lark.Application>
51
38
  /**
52
39
  * 更新应用分组信息
53
40
  * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application/patch
54
41
  */
55
- patchApplication(app_id: string, body: PatchApplicationRequest, query?: PatchApplicationQuery): Promise<void>
42
+ patch(app_id: string, body: PatchRequest, query?: PatchQuery): Promise<void>
56
43
  /**
57
44
  * 获取应用通讯录权限范围配置
58
45
  * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application/contacts_range_configuration
59
46
  */
60
- contactsRangeConfigurationApplication(app_id: string, query?: ContactsRangeConfigurationApplicationQuery): Promise<ContactsRangeConfigurationApplicationResponse>
61
- /**
62
- * 更新应用通讯录权限范围配置
63
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-contacts_range/patch
64
- */
65
- patchApplicationApplicationContactsRange(app_id: string, body: PatchApplicationApplicationContactsRangeRequest, query?: PatchApplicationApplicationContactsRangeQuery): Promise<void>
66
- /**
67
- * 查询用户或部门是否在应用的可用或禁用名单
68
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-visibility/check_white_black_list
69
- */
70
- checkWhiteBlackListApplicationApplicationVisibility(app_id: string, body: CheckWhiteBlackListApplicationApplicationVisibilityRequest, query?: CheckWhiteBlackListApplicationApplicationVisibilityQuery): Promise<CheckWhiteBlackListApplicationApplicationVisibilityResponse>
71
- /**
72
- * 更新应用可用范围
73
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-visibility/patch
74
- */
75
- patchApplicationApplicationVisibility(app_id: string, body: PatchApplicationApplicationVisibilityRequest, query?: PatchApplicationApplicationVisibilityQuery): Promise<void>
76
- /**
77
- * 启停用应用
78
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-management/update
79
- */
80
- updateApplicationApplicationManagement(app_id: string, body: UpdateApplicationApplicationManagementRequest): Promise<void>
81
- /**
82
- * 获取多部门应用使用概览
83
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-app_usage/department_overview
84
- */
85
- departmentOverviewApplicationApplicationAppUsage(app_id: string, body: DepartmentOverviewApplicationApplicationAppUsageRequest, query?: DepartmentOverviewApplicationApplicationAppUsageQuery): Paginated<ApplicationDepartmentAppUsage>
86
- /**
87
- * 获取消息推送概览
88
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-app_usage/message_push_overview
89
- */
90
- messagePushOverviewApplicationApplicationAppUsage(app_id: string, body: MessagePushOverviewApplicationApplicationAppUsageRequest, query?: MessagePushOverviewApplicationApplicationAppUsageQuery): Promise<MessagePushOverviewApplicationApplicationAppUsageResponse>
91
- /**
92
- * 获取应用使用概览
93
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-app_usage/overview
94
- */
95
- overviewApplicationApplicationAppUsage(app_id: string, body: OverviewApplicationApplicationAppUsageRequest, query?: OverviewApplicationApplicationAppUsageQuery): Promise<OverviewApplicationApplicationAppUsageResponse>
96
- /**
97
- * 更新应用反馈
98
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-feedback/patch
99
- */
100
- patchApplicationApplicationFeedback(app_id: string, feedback_id: string, query?: PatchApplicationApplicationFeedbackQuery): Promise<void>
101
- /**
102
- * 获取应用反馈列表
103
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-feedback/list
104
- */
105
- listApplicationApplicationFeedback(app_id: string, query?: ListApplicationApplicationFeedbackQuery): Paginated<ApplicationFeedback, 'feedback_list'>
106
- /**
107
- * 更新应用红点
108
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/app_badge/set
109
- */
110
- setApplicationAppBadge(body: SetApplicationAppBadgeRequest, query?: SetApplicationAppBadgeQuery): Promise<void>
47
+ contactsRangeConfiguration(app_id: string, query?: ContactsRangeConfigurationQuery): Promise<ContactsRangeConfigurationResponse>
111
48
  /**
112
49
  * 获取用户自定义常用的应用
113
50
  * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v5/application/favourite
114
51
  */
115
- favouriteApplication(query?: FavouriteApplicationQuery): Promise<FavouriteApplicationResponse> & AsyncIterableIterator<Application>
52
+ favourite(query?: FavouriteQuery): Promise<FavouriteResponse> & AsyncIterableIterator<Lark.Application>
116
53
  /**
117
54
  * 获取管理员推荐的应用
118
55
  * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v5/application/recommend
119
56
  */
120
- recommendApplication(query?: RecommendApplicationQuery): Promise<RecommendApplicationResponse> & AsyncIterableIterator<Application>
121
- /**
122
- * 获取当前设置的推荐规则列表
123
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/app_recommend_rule/list
124
- */
125
- listApplicationAppRecommendRule(query?: ListApplicationAppRecommendRuleQuery): Paginated<AppRecommendRule, 'rules'>
57
+ recommend(query?: RecommendQuery): Promise<RecommendResponse> & AsyncIterableIterator<Lark.Application>
126
58
  }
127
- }
128
-
129
- export interface GetApplicationQuery {
130
- /** 指定获取应用在该语言下的信息 */
131
- lang: 'zh_cn' | 'en_us' | 'ja_jp'
132
- /** 此次调用中使用的用户ID的类型 */
133
- user_id_type?: 'user_id' | 'union_id' | 'open_id'
134
- }
135
-
136
- export interface GetApplicationResponse {
137
- /** 应用数据 */
138
- app?: Application
139
- }
140
-
141
- export interface GetApplicationApplicationAppVersionQuery {
142
- /** 应用信息的语言版本 */
143
- lang: 'zh_cn' | 'en_us' | 'ja_jp'
144
- /** 此次调用中使用的用户ID的类型 */
145
- user_id_type?: 'user_id' | 'union_id' | 'open_id'
146
- }
147
-
148
- export interface GetApplicationApplicationAppVersionResponse {
149
- app_version?: ApplicationAppVersion
150
- }
151
-
152
- export interface ListApplicationApplicationAppVersionQuery extends Pagination {
153
- /** 应用信息的语言版本 */
154
- lang: 'zh_cn' | 'en_us' | 'ja_jp'
155
- /** 0:按照时间倒序 1:按照时间正序 */
156
- order?: number
157
- /** 此次调用中使用的用户ID的类型 */
158
- user_id_type?: 'user_id' | 'union_id' | 'open_id'
159
- }
160
-
161
- export interface ContactsRangeSuggestApplicationApplicationAppVersionQuery {
162
- /** 返回值的部门ID的类型 */
163
- department_id_type?: 'department_id' | 'open_department_id'
164
- /** 此次调用中使用的用户ID的类型 */
165
- user_id_type?: 'user_id' | 'union_id' | 'open_id'
166
- }
167
-
168
- export interface ContactsRangeSuggestApplicationApplicationAppVersionResponse {
169
- contacts_range?: ApplicationAppContactsRange
170
- }
171
-
172
- export interface ListApplicationScopeResponse {
173
- scopes?: Scope[]
174
- }
175
-
176
- export const enum ListApplicationQueryStatus {
177
- /** 停用 */
178
- AvailabilityStopped = 0,
179
- /** 启用 */
180
- AvailabilityActivated = 1,
181
- /** 未启用 */
182
- AvailabilityUnactivated = 2,
183
- }
184
-
185
- export const enum ListApplicationQueryPaymentType {
186
- /** 免费 */
187
- Free = 0,
188
- /** 付费 */
189
- Paid = 1,
190
- }
191
-
192
- export const enum ListApplicationQueryOwnerType {
193
- /** 飞书科技 */
194
- FeishuTechnology = 0,
195
- /** 飞书合作伙伴 */
196
- FeishuThirdParty = 1,
197
- /** 企业内成员 */
198
- EnterpriseMember = 2,
199
- }
200
-
201
- export interface ListApplicationQuery extends Pagination {
202
- /** 用户 ID 类型 */
203
- user_id_type?: string
204
- /** 应用的图标、描述、帮助文档链接是按照应用的主语言返回;其他内容(如应用权限、应用分类)按照该参数设定返回对应的语言。可选值有: zh_cn:中文 en_us:英文 ja_jp:日文 如不填写,则按照应用的主语言返回 */
205
- lang: string
206
- /** 不传入代表全部返回。传入则按照这种应用状态返回。应用状态可选值有:0:停用状态1:启用状态 2:未启用状态 */
207
- status?: ListApplicationQueryStatus
208
- /** 不传入代表全部返回。传入则按照这种应用状态返回。 付费类型 可选值: 0:免费 1:付费 */
209
- payment_type?: ListApplicationQueryPaymentType
210
- /** 不传入代表全部返回。传入则按照这种应用状态返回。所有者类型,可选值: 0:飞书科技 1:飞书合作伙伴 2:企业内成员 */
211
- owner_type?: ListApplicationQueryOwnerType
212
- }
213
-
214
- export interface ListApplicationResponse {
215
- /** 应用列表 */
216
- app_list?: Application[]
217
- /** 分页标记,当 has_more 为 true 时,会同时返回新的 page_token,否则不返回 page_token */
218
- page_token?: string
219
- /** 是否还有更多项 */
220
- has_more?: boolean
221
- /** 应用状态=启用的应用总数 */
222
- total_count?: number
223
- }
224
-
225
- export interface UnderauditlistApplicationQuery extends Pagination {
226
- /** 指定返回的语言 */
227
- lang: 'zh_cn' | 'en_us' | 'ja_jp'
228
- /** 此次调用中使用的用户ID的类型 */
229
- user_id_type?: 'user_id' | 'union_id' | 'open_id'
230
- }
231
-
232
- export const enum PatchApplicationApplicationAppVersionRequestStatus {
233
- /** 未知状态 */
234
- Unknown = 0,
235
- /** 审核通过 */
236
- Audited = 1,
237
- /** 审核拒绝 */
238
- Reject = 2,
239
- /** 审核中 */
240
- UnderAudit = 3,
241
- /** 未提交审核 */
242
- Unaudit = 4,
243
- }
244
-
245
- export interface PatchApplicationApplicationAppVersionRequest {
246
- /** 版本状态 */
247
- status?: PatchApplicationApplicationAppVersionRequestStatus
248
- }
249
-
250
- export interface PatchApplicationApplicationAppVersionQuery {
251
- /** 此次调用中使用的用户ID的类型 */
252
- user_id_type: 'user_id' | 'union_id' | 'open_id'
253
- /** 操作者的 open_id */
254
- operator_id: string
255
- /** 当修改版本状态为被驳回时,这一项必填 */
256
- reject_reason?: string
257
- }
258
59
 
259
- export interface PatchApplicationRequest {
260
- /** 应用分类的国际化描述 */
261
- common_categories?: string[]
262
- }
263
-
264
- export interface PatchApplicationQuery {
265
- /** 指定返回的语言 */
266
- lang: 'zh_cn' | 'en_us' | 'ja_jp'
267
- }
268
-
269
- export interface ContactsRangeConfigurationApplicationQuery extends Pagination {
270
- /** 返回值的部门ID的类型 */
271
- department_id_type?: 'department_id' | 'open_department_id'
272
- /** 此次调用中使用的用户ID的类型 */
273
- user_id_type?: 'user_id' | 'union_id' | 'open_id'
274
- }
275
-
276
- export interface ContactsRangeConfigurationApplicationResponse {
277
- contacts_range?: ApplicationAppContactsRange
278
- /** 是否还有更多项 */
279
- has_more?: boolean
280
- /** 分页标记,当 has_more 为 true 时,会同时返回新的 page_token,否则不返回 page_token */
281
- page_token?: string
282
- }
283
-
284
- export interface PatchApplicationApplicationContactsRangeRequest {
285
- /** 更新范围方式 */
286
- contacts_range_type: 'equal_to_availability' | 'some' | 'all'
287
- /** 可见范围新增列表 */
288
- add_visible_list?: AppContactsRangeIdList
289
- /** 删除可用名单 */
290
- del_visible_list?: AppContactsRangeIdList
291
- }
292
-
293
- export interface PatchApplicationApplicationContactsRangeQuery {
294
- /** 成员id类型 */
295
- user_id_type?: 'open_id' | 'user_id' | 'union_id'
296
- /** 部门id 类型 */
297
- department_id_type?: 'open_department_id' | 'department_id'
298
- }
299
-
300
- export interface CheckWhiteBlackListApplicationApplicationVisibilityRequest {
301
- /** 用户ID列表 */
302
- user_ids?: string[]
303
- /** 部门ID列表 */
304
- department_ids?: string[]
305
- /** 用户组ID列表 */
306
- group_ids?: string[]
307
- }
308
-
309
- export interface CheckWhiteBlackListApplicationApplicationVisibilityQuery {
310
- /** 此次请求传参中的user_id的类型 */
311
- user_id_type?: 'user_id' | 'union_id' | 'open_id'
312
- /** 此次请求传参中的department_id的类型 */
313
- department_id_type?: 'department_id' | 'open_department_id'
314
- }
315
-
316
- export interface CheckWhiteBlackListApplicationApplicationVisibilityResponse {
317
- /** 用户可见性信息列表 */
318
- user_visibility_list?: ApplicationVisibilityUserWhiteBlackInfo[]
319
- /** 部门可见性信息列表 */
320
- department_visibility_list?: ApplicationVisibilityDepartmentWhiteBlackInfo[]
321
- /** 用户组可见性信息列表 */
322
- group_visibility_list?: ApplicationVisibilityGroupWhiteBlackInfo[]
323
- }
60
+ export interface GetQuery {
61
+ /** 指定获取应用在该语言下的信息 */
62
+ lang: 'zh_cn' | 'en_us' | 'ja_jp'
63
+ /** 此次调用中使用的用户ID的类型 */
64
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
65
+ }
324
66
 
325
- export interface PatchApplicationApplicationVisibilityRequest {
326
- /** 添加可用人员名单 */
327
- add_visible_list?: AppVisibilityIdList
328
- /** 删除可用人员名单 */
329
- del_visible_list?: AppVisibilityIdList
330
- /** 添加禁用人员名单 */
331
- add_invisible_list?: AppVisibilityIdList
332
- /** 删除禁用人员名单 */
333
- del_invisible_list?: AppVisibilityIdList
334
- /** 是否全员可见,false:否;true:是;不填:继续当前状态不改变.如果可见范围为全员后添加的可用人员则无效,禁用人员仍然有效 */
335
- is_visible_to_all?: boolean
336
- }
67
+ export interface GetResponse {
68
+ /** 应用数据 */
69
+ app?: Lark.Application
70
+ }
337
71
 
338
- export interface PatchApplicationApplicationVisibilityQuery {
339
- /** 部门id 类型 */
340
- department_id_type?: 'open_department_id' | 'department_id'
341
- /** open_id 类型 */
342
- user_id_type?: 'open_id' | 'user_id' | 'union_id'
343
- }
72
+ export const enum ListQueryStatus {
73
+ /** 停用 */
74
+ AvailabilityStopped = 0,
75
+ /** 启用 */
76
+ AvailabilityActivated = 1,
77
+ /** 未启用 */
78
+ AvailabilityUnactivated = 2,
79
+ }
344
80
 
345
- export interface UpdateApplicationApplicationManagementRequest {
346
- /** 启用/停用应用 */
347
- enable?: boolean
348
- }
81
+ export const enum ListQueryPaymentType {
82
+ /** 免费 */
83
+ Free = 0,
84
+ /** 付费 */
85
+ Paid = 1,
86
+ }
349
87
 
350
- export const enum DepartmentOverviewApplicationApplicationAppUsageRequestCycleType {
351
- /** 日活 */
352
- Day = 1,
353
- /** 周活, date字段应该填自然周周一的日期 */
354
- Week = 2,
355
- /** 月活, date字段应该填自然月1号的日期 */
356
- Month = 3,
357
- }
88
+ export const enum ListQueryOwnerType {
89
+ /** 飞书科技 */
90
+ FeishuTechnology = 0,
91
+ /** 飞书合作伙伴 */
92
+ FeishuThirdParty = 1,
93
+ /** 企业内成员 */
94
+ EnterpriseMember = 2,
95
+ }
358
96
 
359
- export interface DepartmentOverviewApplicationApplicationAppUsageRequest {
360
- /** 查询日期,格式为yyyy-mm-dd,若cycle_type为1,date可以为任何自然日;若cycle_type为2,则输入的date必须为周一; 若cycle_type为3,则输入的date必须为每月1号 */
361
- date: string
362
- /** 活跃周期的统计类型 */
363
- cycle_type: DepartmentOverviewApplicationApplicationAppUsageRequestCycleType
364
- /** 查询的部门id,获取方法可参考[部门ID概述](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/field-overview)- 若部门id为空,则返回当前租户的使用数据;若填写部门id,则返回当前部门的使用数据(包含子部门的用户) 以及多级子部门的使用数据。- 若路径参数中department_id_type为空或者为open_department_id,则此处应该填写部门的 open_department_id;若路径参数中department_id_type为department_id,则此处应该填写部门的 department_id。- 若不填写则返回整个租户的数据 */
365
- department_id?: string
366
- /** 是否需要查询部门下多层子部门的数据。未设置或为0时,仅查询department_id对应的部门。设置为n时,查询department_id及其n级子部门的数据。仅在department_id参数传递时有效,最大值为4。 */
367
- recursion?: number
368
- /** 分页大小,取值范围 1~20 */
369
- page_size?: number
370
- /** 分页标记,第一次请求不填,表示从头开始遍历;当返回的has_more为true时,会返回新的page_token,再次调用接口,传入这个page_token,将获得下一页数据。 */
371
- page_token?: string
372
- }
97
+ export interface ListQuery extends Pagination {
98
+ /** 用户 ID 类型 */
99
+ user_id_type?: string
100
+ /** 应用的图标、描述、帮助文档链接是按照应用的主语言返回;其他内容(如应用权限、应用分类)按照该参数设定返回对应的语言。可选值有: zh_cn:中文 en_us:英文 ja_jp:日文 如不填写,则按照应用的主语言返回 */
101
+ lang: string
102
+ /** 不传入代表全部返回。传入则按照这种应用状态返回。应用状态可选值有:0:停用状态1:启用状态 2:未启用状态 */
103
+ status?: ListQueryStatus
104
+ /** 不传入代表全部返回。传入则按照这种应用状态返回。 付费类型 可选值: 0:免费 1:付费 */
105
+ payment_type?: ListQueryPaymentType
106
+ /** 不传入代表全部返回。传入则按照这种应用状态返回。所有者类型,可选值: 0:飞书科技 1:飞书合作伙伴 2:企业内成员 */
107
+ owner_type?: ListQueryOwnerType
108
+ }
373
109
 
374
- export interface DepartmentOverviewApplicationApplicationAppUsageQuery {
375
- /** 调用中使用的部门ID的类型 */
376
- department_id_type?: 'department_id' | 'open_department_id'
377
- }
110
+ export interface ListResponse {
111
+ /** 应用列表 */
112
+ app_list?: Lark.Application[]
113
+ /** 分页标记,当 has_more 为 true 时,会同时返回新的 page_token,否则不返回 page_token */
114
+ page_token?: string
115
+ /** 是否还有更多项 */
116
+ has_more?: boolean
117
+ /** 应用状态=启用的应用总数 */
118
+ total_count?: number
119
+ }
378
120
 
379
- export const enum MessagePushOverviewApplicationApplicationAppUsageRequestCycleType {
380
- /** 日活 */
381
- Day = 1,
382
- /** 周活, date字段应该填自然周周一的日期 */
383
- Week = 2,
384
- /** 月活, date字段应该填自然月1号的日期 */
385
- Month = 3,
386
- }
121
+ export interface UnderauditlistQuery extends Pagination {
122
+ /** 指定返回的语言 */
123
+ lang: 'zh_cn' | 'en_us' | 'ja_jp'
124
+ /** 此次调用中使用的用户ID的类型 */
125
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
126
+ }
387
127
 
388
- export interface MessagePushOverviewApplicationApplicationAppUsageRequest {
389
- /** 查询日期,若cycle_type为week,则输入的date必须为周一; 若cycle_type为month,则输入的date必须为每月1号 */
390
- date: string
391
- /** 枚举值:day,week,month;week指自然周,返回当前日期所在周的数据;不满一周则从周一到当前日期算。month指自然月,返回当前日期所在月的数据。 */
392
- cycle_type: MessagePushOverviewApplicationApplicationAppUsageRequestCycleType
393
- /** 需要查询的部门id,获取方法可参考[部门ID概述](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/field-overview)- 若部门id为空,则返回当前租户的使用数据;若填写部门id,则返回当前部门的使用数据(包含子部门的用户); - 若路径参数中department_id_type为空或者为open_department_id,则此处应该填写部门的 open_department_id;若路径参数中department_id_type为department_id,则此处应该填写部门的 department_id。返回当前部门的使用数据; 若不填写,则返回当前租户的使用数据 */
394
- department_id?: string
395
- }
128
+ export interface PatchRequest {
129
+ /** 应用分类的国际化描述 */
130
+ common_categories?: string[]
131
+ }
396
132
 
397
- export interface MessagePushOverviewApplicationApplicationAppUsageQuery {
398
- /** 调用中使用的部门ID的类型 */
399
- department_id_type?: 'department_id' | 'open_department_id'
400
- }
133
+ export interface PatchQuery {
134
+ /** 指定返回的语言 */
135
+ lang: 'zh_cn' | 'en_us' | 'ja_jp'
136
+ }
401
137
 
402
- export interface MessagePushOverviewApplicationApplicationAppUsageResponse {
403
- /** 消息推送情况 */
404
- items?: ApplicationAppUsage[]
405
- }
138
+ export interface ContactsRangeConfigurationQuery extends Pagination {
139
+ /** 返回值的部门ID的类型 */
140
+ department_id_type?: 'department_id' | 'open_department_id'
141
+ /** 此次调用中使用的用户ID的类型 */
142
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
143
+ }
406
144
 
407
- export const enum OverviewApplicationApplicationAppUsageRequestCycleType {
408
- /** 日活 */
409
- Day = 1,
410
- /** 周活, date字段应该填自然周周一的日期 */
411
- Week = 2,
412
- /** 月活, date字段应该填自然月1号的日期 */
413
- Month = 3,
414
- }
145
+ export interface ContactsRangeConfigurationResponse {
146
+ contacts_range?: Lark.ApplicationAppContactsRange
147
+ /** 是否还有更多项 */
148
+ has_more?: boolean
149
+ /** 分页标记,当 has_more 为 true 时,会同时返回新的 page_token,否则不返回 page_token */
150
+ page_token?: string
151
+ }
415
152
 
416
- export interface OverviewApplicationApplicationAppUsageRequest {
417
- /** 查询日期,格式为yyyy-mm-dd,若cycle_type为1,date可以为任何自然日;若cycle_type为2,则输入的date必须为周一; 若cycle_type为3,则输入的date必须为每月1号 */
418
- date: string
419
- /** 活跃周期的统计类型 */
420
- cycle_type: OverviewApplicationApplicationAppUsageRequestCycleType
421
- /** 查询的部门id,获取方法可参考[部门ID概述](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/field-overview)- 若部门id为空,则返回当前租户的使用数据;若填写部门id,则返回当前部门的使用数据(包含子部门的用户); - 若路径参数中department_id_type为空或者为open_department_id,则此处应该填写部门的 open_department_id;若路径参数中department_id_type为department_id,则此处应该填写部门的 department_id。 */
422
- department_id?: string
423
- /** 能力类型,按能力类型进行筛选,返回对应能力的活跃数据 */
424
- ability: 'app' | 'mp' | 'h5' | 'bot'
425
- }
153
+ export interface FavouriteQuery extends Pagination {
154
+ /** 应用信息的语言版本 */
155
+ language?: 'zh_cn' | 'en_us' | 'ja_jp'
156
+ }
426
157
 
427
- export interface OverviewApplicationApplicationAppUsageQuery {
428
- /** 调用中使用的部门ID的类型 */
429
- department_id_type?: 'department_id' | 'open_department_id'
430
- }
158
+ export interface FavouriteResponse {
159
+ /** 分页的token */
160
+ page_token?: string
161
+ /** 总的数量 */
162
+ total_count?: number
163
+ /** 是否有更多数据 */
164
+ has_more?: boolean
165
+ /** 应用数据列表 */
166
+ app_list?: Lark.Application[]
167
+ }
431
168
 
432
- export interface OverviewApplicationApplicationAppUsageResponse {
433
- /** 员工使用应用概览数据 */
434
- items?: ApplicationAppUsage[]
435
- }
169
+ export interface RecommendQuery extends Pagination {
170
+ /** 应用信息的语言版本 */
171
+ language?: 'zh_cn' | 'en_us' | 'ja_jp'
172
+ /** 推荐应用类型,默认为用户不可移除的推荐应用列表 */
173
+ recommend_type?: 'user_unremovable' | 'user_removable'
174
+ }
436
175
 
437
- export const enum PatchApplicationApplicationFeedbackQueryStatus {
438
- /** 反馈未处理 */
439
- Unmarked = 0,
440
- /** 反馈已处理 */
441
- Marked = 1,
442
- /** 反馈处理中 */
443
- Processing = 2,
444
- /** 反馈已关闭 */
445
- Closed = 3,
446
- }
176
+ export interface RecommendResponse {
177
+ /** 分页的token */
178
+ page_token?: string
179
+ /** 分页数量 */
180
+ page_size?: number
181
+ /** 总的数量 */
182
+ total_count?: number
183
+ /** 是否有更多数据 */
184
+ has_more?: boolean
185
+ /** 应用数据列表 */
186
+ app_list?: Lark.Application[]
187
+ }
447
188
 
448
- export interface PatchApplicationApplicationFeedbackQuery {
449
- user_id_type?: 'open_id' | 'union_id' | 'user_id'
450
- /** 反馈处理状态 */
451
- status: PatchApplicationApplicationFeedbackQueryStatus
452
- /** 反馈处理人员id,租户内用户的唯一标识, ID值与查询参数中的user_id_type 对应 */
453
- operator_id: string
454
- }
189
+ export namespace Owner {
190
+ export interface Methods {
191
+ /**
192
+ * 转移应用所有者
193
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-owner/update
194
+ */
195
+ update(app_id: string, body: UpdateRequest, query?: UpdateQuery): Promise<void>
196
+ }
197
+
198
+ export interface UpdateRequest {
199
+ /** 新的拥有者用户ID,类型由查询参数中的user_id_type确定 */
200
+ owner_id: string
201
+ }
202
+
203
+ export interface UpdateQuery {
204
+ /** 用户ID类型 */
205
+ user_id_type?: 'open_id' | 'user_id' | 'union_id'
206
+ }
207
+ }
455
208
 
456
- export const enum ListApplicationApplicationFeedbackQueryFeedbackType {
457
- /** 故障反馈 */
458
- Fault = 1,
459
- /** 产品建议 */
460
- Advice = 2,
461
- }
209
+ export namespace Collaborators {
210
+ export interface Methods {
211
+ /**
212
+ * 更新应用协作者
213
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-collaborators/update
214
+ */
215
+ update(app_id: string, body: UpdateRequest, query?: UpdateQuery): Promise<void>
216
+ /**
217
+ * 获取应用协作者列表
218
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-collaborators/get
219
+ */
220
+ get(app_id: string, query?: GetQuery): Promise<GetResponse>
221
+ }
222
+
223
+ export interface UpdateRequest {
224
+ /** 添加人员 */
225
+ adds?: Lark.AppCollaborator[]
226
+ /** 移除人员 */
227
+ removes?: string[]
228
+ }
229
+
230
+ export interface UpdateQuery {
231
+ /** 用户 ID 类型 */
232
+ user_id_type?: 'open_id' | 'union_id' | 'user_id'
233
+ }
234
+
235
+ export interface GetQuery {
236
+ /** 用户 ID 类型 */
237
+ user_id_type?: 'open_id' | 'union_id' | 'user_id'
238
+ }
239
+
240
+ export interface GetResponse {
241
+ /** 协作者 */
242
+ collaborators?: Lark.AppCollaborator[]
243
+ }
244
+ }
462
245
 
463
- export const enum ListApplicationApplicationFeedbackQueryStatus {
464
- /** 反馈未处理 */
465
- Unmarked = 0,
466
- /** 反馈已处理 */
467
- Marked = 1,
468
- /** 反馈处理中 */
469
- Processing = 2,
470
- /** 反馈已关闭 */
471
- Closed = 3,
472
- }
246
+ export namespace AppVersion {
247
+ export interface Methods {
248
+ /**
249
+ * 获取应用版本信息
250
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-app_version/get
251
+ */
252
+ get(app_id: string, version_id: string, query?: GetQuery): Promise<GetResponse>
253
+ /**
254
+ * 获取应用版本列表
255
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-app_version/list
256
+ */
257
+ list(app_id: string, query?: ListQuery): Paginated<Lark.ApplicationAppVersion>
258
+ /**
259
+ * 获取应用版本中开发者申请的通讯录权限范围
260
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-app_version/contacts_range_suggest
261
+ */
262
+ contactsRangeSuggest(app_id: string, version_id: string, query?: ContactsRangeSuggestQuery): Promise<ContactsRangeSuggestResponse>
263
+ /**
264
+ * 更新应用审核状态
265
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-app_version/patch
266
+ */
267
+ patch(app_id: string, version_id: string, body: PatchRequest, query?: PatchQuery): Promise<void>
268
+ }
269
+
270
+ export interface GetQuery {
271
+ /** 应用信息的语言版本 */
272
+ lang: 'zh_cn' | 'en_us' | 'ja_jp'
273
+ /** 此次调用中使用的用户ID的类型 */
274
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
275
+ }
276
+
277
+ export interface GetResponse {
278
+ app_version?: Lark.ApplicationAppVersion
279
+ }
280
+
281
+ export interface ListQuery extends Pagination {
282
+ /** 应用信息的语言版本 */
283
+ lang: 'zh_cn' | 'en_us' | 'ja_jp'
284
+ /** 0:按照时间倒序 1:按照时间正序 */
285
+ order?: number
286
+ /** 此次调用中使用的用户ID的类型 */
287
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
288
+ }
289
+
290
+ export interface ContactsRangeSuggestQuery {
291
+ /** 返回值的部门ID的类型 */
292
+ department_id_type?: 'department_id' | 'open_department_id'
293
+ /** 此次调用中使用的用户ID的类型 */
294
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
295
+ }
296
+
297
+ export interface ContactsRangeSuggestResponse {
298
+ contacts_range?: Lark.ApplicationAppContactsRange
299
+ }
300
+
301
+ export const enum PatchRequestStatus {
302
+ /** 未知状态 */
303
+ Unknown = 0,
304
+ /** 审核通过 */
305
+ Audited = 1,
306
+ /** 审核拒绝 */
307
+ Reject = 2,
308
+ /** 审核中 */
309
+ UnderAudit = 3,
310
+ /** 未提交审核 */
311
+ Unaudit = 4,
312
+ }
313
+
314
+ export interface PatchRequest {
315
+ /** 版本状态 */
316
+ status?: PatchRequestStatus
317
+ }
318
+
319
+ export interface PatchQuery {
320
+ /** 此次调用中使用的用户ID的类型 */
321
+ user_id_type: 'user_id' | 'union_id' | 'open_id'
322
+ /** 操作者的 open_id */
323
+ operator_id: string
324
+ /** 当修改版本状态为被驳回时,这一项必填 */
325
+ reject_reason?: string
326
+ }
327
+ }
473
328
 
474
- export interface ListApplicationApplicationFeedbackQuery extends Pagination {
475
- /** 查询的起始日期,格式为yyyy-mm-dd。不填则默认为当前日期减去180天。 */
476
- from_date?: string
477
- /** 查询的结束日期,格式为yyyy-mm-dd。不填默认为当前日期。只能查询 180 天内的数据。 */
478
- to_date?: string
479
- /** 反馈类型,不填写则表示查询所有反馈类型。 */
480
- feedback_type?: ListApplicationApplicationFeedbackQueryFeedbackType
481
- /** 反馈处理状态,不填写则表示查询所有处理类型。 */
482
- status?: ListApplicationApplicationFeedbackQueryStatus
483
- user_id_type?: 'open_id' | 'union_id' | 'user_id'
484
- }
329
+ export namespace Scope {
330
+ export interface Methods {
331
+ /**
332
+ * 向管理员申请授权
333
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/scope/apply
334
+ */
335
+ apply(): Promise<void>
336
+ /**
337
+ * 查询租户授权状态
338
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/scope/list
339
+ */
340
+ list(): Promise<ListResponse>
341
+ }
342
+
343
+ export interface ListResponse {
344
+ scopes?: Lark.Scope[]
345
+ }
346
+ }
485
347
 
486
- export interface SetApplicationAppBadgeRequest {
487
- /** 用户ID */
488
- user_id: string
489
- /** badge数据版本号 */
490
- version: string
491
- /** badge extra 信息 */
492
- extra?: string
493
- /** pc端badge数量 */
494
- pc?: ClientBadgeNum
495
- /** 移动端badge数量 */
496
- mobile?: ClientBadgeNum
497
- }
348
+ export namespace ContactsRange {
349
+ export interface Methods {
350
+ /**
351
+ * 更新应用通讯录权限范围配置
352
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-contacts_range/patch
353
+ */
354
+ patch(app_id: string, body: PatchRequest, query?: PatchQuery): Promise<void>
355
+ }
356
+
357
+ export interface PatchRequest {
358
+ /** 更新范围方式 */
359
+ contacts_range_type: 'equal_to_availability' | 'some' | 'all'
360
+ /** 可见范围新增列表 */
361
+ add_visible_list?: Lark.AppContactsRangeIdList
362
+ /** 删除可用名单 */
363
+ del_visible_list?: Lark.AppContactsRangeIdList
364
+ }
365
+
366
+ export interface PatchQuery {
367
+ /** 成员id类型 */
368
+ user_id_type?: 'open_id' | 'user_id' | 'union_id'
369
+ /** 部门id 类型 */
370
+ department_id_type?: 'open_department_id' | 'department_id'
371
+ }
372
+ }
498
373
 
499
- export interface SetApplicationAppBadgeQuery {
500
- /** 此次调用中使用的用户ID的类型 */
501
- user_id_type?: 'user_id' | 'union_id' | 'open_id'
502
- }
374
+ export namespace Visibility {
375
+ export interface Methods {
376
+ /**
377
+ * 查询用户或部门是否在应用的可用或禁用名单
378
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-visibility/check_white_black_list
379
+ */
380
+ checkWhiteBlackList(app_id: string, body: CheckWhiteBlackListRequest, query?: CheckWhiteBlackListQuery): Promise<CheckWhiteBlackListResponse>
381
+ /**
382
+ * 更新应用可用范围
383
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-visibility/patch
384
+ */
385
+ patch(app_id: string, body: PatchRequest, query?: PatchQuery): Promise<void>
386
+ }
387
+
388
+ export interface CheckWhiteBlackListRequest {
389
+ /** 用户ID列表 */
390
+ user_ids?: string[]
391
+ /** 部门ID列表 */
392
+ department_ids?: string[]
393
+ /** 用户组ID列表 */
394
+ group_ids?: string[]
395
+ }
396
+
397
+ export interface CheckWhiteBlackListQuery {
398
+ /** 此次请求传参中的user_id的类型 */
399
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
400
+ /** 此次请求传参中的department_id的类型 */
401
+ department_id_type?: 'department_id' | 'open_department_id'
402
+ }
403
+
404
+ export interface CheckWhiteBlackListResponse {
405
+ /** 用户可见性信息列表 */
406
+ user_visibility_list?: Lark.ApplicationVisibilityUserWhiteBlackInfo[]
407
+ /** 部门可见性信息列表 */
408
+ department_visibility_list?: Lark.ApplicationVisibilityDepartmentWhiteBlackInfo[]
409
+ /** 用户组可见性信息列表 */
410
+ group_visibility_list?: Lark.ApplicationVisibilityGroupWhiteBlackInfo[]
411
+ }
412
+
413
+ export interface PatchRequest {
414
+ /** 添加可用人员名单 */
415
+ add_visible_list?: Lark.AppVisibilityIdList
416
+ /** 删除可用人员名单 */
417
+ del_visible_list?: Lark.AppVisibilityIdList
418
+ /** 添加禁用人员名单 */
419
+ add_invisible_list?: Lark.AppVisibilityIdList
420
+ /** 删除禁用人员名单 */
421
+ del_invisible_list?: Lark.AppVisibilityIdList
422
+ /** 是否全员可见,false:否;true:是;不填:继续当前状态不改变.如果可见范围为全员后添加的可用人员则无效,禁用人员仍然有效 */
423
+ is_visible_to_all?: boolean
424
+ }
425
+
426
+ export interface PatchQuery {
427
+ /** 部门id 类型 */
428
+ department_id_type?: 'open_department_id' | 'department_id'
429
+ /** open_id 类型 */
430
+ user_id_type?: 'open_id' | 'user_id' | 'union_id'
431
+ }
432
+ }
503
433
 
504
- export interface FavouriteApplicationQuery extends Pagination {
505
- /** 应用信息的语言版本 */
506
- language?: 'zh_cn' | 'en_us' | 'ja_jp'
507
- }
434
+ export namespace Management {
435
+ export interface Methods {
436
+ /**
437
+ * 启停用应用
438
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-management/update
439
+ */
440
+ update(app_id: string, body: UpdateRequest): Promise<void>
441
+ }
442
+
443
+ export interface UpdateRequest {
444
+ /** 启用/停用应用 */
445
+ enable?: boolean
446
+ }
447
+ }
508
448
 
509
- export interface FavouriteApplicationResponse {
510
- /** 分页的token */
511
- page_token?: string
512
- /** 总的数量 */
513
- total_count?: number
514
- /** 是否有更多数据 */
515
- has_more?: boolean
516
- /** 应用数据列表 */
517
- app_list?: Application[]
518
- }
449
+ export namespace AppUsage {
450
+ export interface Methods {
451
+ /**
452
+ * 获取多部门应用使用概览
453
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-app_usage/department_overview
454
+ */
455
+ departmentOverview(app_id: string, body: DepartmentOverviewRequest, query?: DepartmentOverviewQuery): Paginated<Lark.ApplicationDepartmentAppUsage>
456
+ /**
457
+ * 获取消息推送概览
458
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-app_usage/message_push_overview
459
+ */
460
+ messagePushOverview(app_id: string, body: MessagePushOverviewRequest, query?: MessagePushOverviewQuery): Promise<MessagePushOverviewResponse>
461
+ /**
462
+ * 获取应用使用概览
463
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-app_usage/overview
464
+ */
465
+ overview(app_id: string, body: OverviewRequest, query?: OverviewQuery): Promise<OverviewResponse>
466
+ }
467
+
468
+ export const enum DepartmentOverviewRequestCycleType {
469
+ /** 日活 */
470
+ Day = 1,
471
+ /** 周活, date字段应该填自然周周一的日期 */
472
+ Week = 2,
473
+ /** 月活, date字段应该填自然月1号的日期 */
474
+ Month = 3,
475
+ }
476
+
477
+ export interface DepartmentOverviewRequest {
478
+ /** 查询日期,格式为yyyy-mm-dd,若cycle_type为1,date可以为任何自然日;若cycle_type为2,则输入的date必须为周一; 若cycle_type为3,则输入的date必须为每月1号 */
479
+ date: string
480
+ /** 活跃周期的统计类型 */
481
+ cycle_type: DepartmentOverviewRequestCycleType
482
+ /** 查询的部门id,获取方法可参考[部门ID概述](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/field-overview)- 若部门id为空,则返回当前租户的使用数据;若填写部门id,则返回当前部门的使用数据(包含子部门的用户) 以及多级子部门的使用数据。- 若路径参数中department_id_type为空或者为open_department_id,则此处应该填写部门的 open_department_id;若路径参数中department_id_type为department_id,则此处应该填写部门的 department_id。- 若不填写则返回整个租户的数据 */
483
+ department_id?: string
484
+ /** 是否需要查询部门下多层子部门的数据。未设置或为0时,仅查询department_id对应的部门。设置为n时,查询department_id及其n级子部门的数据。仅在department_id参数传递时有效,最大值为4。 */
485
+ recursion?: number
486
+ /** 分页大小,取值范围 1~20 */
487
+ page_size?: number
488
+ /** 分页标记,第一次请求不填,表示从头开始遍历;当返回的has_more为true时,会返回新的page_token,再次调用接口,传入这个page_token,将获得下一页数据。 */
489
+ page_token?: string
490
+ }
491
+
492
+ export interface DepartmentOverviewQuery {
493
+ /** 调用中使用的部门ID的类型 */
494
+ department_id_type?: 'department_id' | 'open_department_id'
495
+ }
496
+
497
+ export const enum MessagePushOverviewRequestCycleType {
498
+ /** 日活 */
499
+ Day = 1,
500
+ /** 周活, date字段应该填自然周周一的日期 */
501
+ Week = 2,
502
+ /** 月活, date字段应该填自然月1号的日期 */
503
+ Month = 3,
504
+ }
505
+
506
+ export interface MessagePushOverviewRequest {
507
+ /** 查询日期,若cycle_type为week,则输入的date必须为周一; 若cycle_type为month,则输入的date必须为每月1号 */
508
+ date: string
509
+ /** 枚举值:day,week,month;week指自然周,返回当前日期所在周的数据;不满一周则从周一到当前日期算。month指自然月,返回当前日期所在月的数据。 */
510
+ cycle_type: MessagePushOverviewRequestCycleType
511
+ /** 需要查询的部门id,获取方法可参考[部门ID概述](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/field-overview)- 若部门id为空,则返回当前租户的使用数据;若填写部门id,则返回当前部门的使用数据(包含子部门的用户); - 若路径参数中department_id_type为空或者为open_department_id,则此处应该填写部门的 open_department_id;若路径参数中department_id_type为department_id,则此处应该填写部门的 department_id。返回当前部门的使用数据; 若不填写,则返回当前租户的使用数据 */
512
+ department_id?: string
513
+ }
514
+
515
+ export interface MessagePushOverviewQuery {
516
+ /** 调用中使用的部门ID的类型 */
517
+ department_id_type?: 'department_id' | 'open_department_id'
518
+ }
519
+
520
+ export interface MessagePushOverviewResponse {
521
+ /** 消息推送情况 */
522
+ items?: Lark.ApplicationAppUsage[]
523
+ }
524
+
525
+ export const enum OverviewRequestCycleType {
526
+ /** 日活 */
527
+ Day = 1,
528
+ /** 周活, date字段应该填自然周周一的日期 */
529
+ Week = 2,
530
+ /** 月活, date字段应该填自然月1号的日期 */
531
+ Month = 3,
532
+ }
533
+
534
+ export interface OverviewRequest {
535
+ /** 查询日期,格式为yyyy-mm-dd,若cycle_type为1,date可以为任何自然日;若cycle_type为2,则输入的date必须为周一; 若cycle_type为3,则输入的date必须为每月1号 */
536
+ date: string
537
+ /** 活跃周期的统计类型 */
538
+ cycle_type: OverviewRequestCycleType
539
+ /** 查询的部门id,获取方法可参考[部门ID概述](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/field-overview)- 若部门id为空,则返回当前租户的使用数据;若填写部门id,则返回当前部门的使用数据(包含子部门的用户); - 若路径参数中department_id_type为空或者为open_department_id,则此处应该填写部门的 open_department_id;若路径参数中department_id_type为department_id,则此处应该填写部门的 department_id。 */
540
+ department_id?: string
541
+ /** 能力类型,按能力类型进行筛选,返回对应能力的活跃数据 */
542
+ ability: 'app' | 'mp' | 'h5' | 'bot'
543
+ }
544
+
545
+ export interface OverviewQuery {
546
+ /** 调用中使用的部门ID的类型 */
547
+ department_id_type?: 'department_id' | 'open_department_id'
548
+ }
549
+
550
+ export interface OverviewResponse {
551
+ /** 员工使用应用概览数据 */
552
+ items?: Lark.ApplicationAppUsage[]
553
+ }
554
+ }
519
555
 
520
- export interface RecommendApplicationQuery extends Pagination {
521
- /** 应用信息的语言版本 */
522
- language?: 'zh_cn' | 'en_us' | 'ja_jp'
523
- /** 推荐应用类型,默认为用户不可移除的推荐应用列表 */
524
- recommend_type?: 'user_unremovable' | 'user_removable'
525
- }
556
+ export namespace Feedback {
557
+ export interface Methods {
558
+ /**
559
+ * 更新应用反馈
560
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-feedback/patch
561
+ */
562
+ patch(app_id: string, feedback_id: string, query?: PatchQuery): Promise<void>
563
+ /**
564
+ * 获取应用反馈列表
565
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-feedback/list
566
+ */
567
+ list(app_id: string, query?: ListQuery): Paginated<Lark.ApplicationFeedback, 'feedback_list'>
568
+ }
569
+
570
+ export const enum PatchQueryStatus {
571
+ /** 反馈未处理 */
572
+ Unmarked = 0,
573
+ /** 反馈已处理 */
574
+ Marked = 1,
575
+ /** 反馈处理中 */
576
+ Processing = 2,
577
+ /** 反馈已关闭 */
578
+ Closed = 3,
579
+ }
580
+
581
+ export interface PatchQuery {
582
+ user_id_type?: 'open_id' | 'union_id' | 'user_id'
583
+ /** 反馈处理状态 */
584
+ status: PatchQueryStatus
585
+ /** 反馈处理人员id,租户内用户的唯一标识, ID值与查询参数中的user_id_type 对应 */
586
+ operator_id: string
587
+ }
588
+
589
+ export const enum ListQueryFeedbackType {
590
+ /** 故障反馈 */
591
+ Fault = 1,
592
+ /** 产品建议 */
593
+ Advice = 2,
594
+ }
595
+
596
+ export const enum ListQueryStatus {
597
+ /** 反馈未处理 */
598
+ Unmarked = 0,
599
+ /** 反馈已处理 */
600
+ Marked = 1,
601
+ /** 反馈处理中 */
602
+ Processing = 2,
603
+ /** 反馈已关闭 */
604
+ Closed = 3,
605
+ }
606
+
607
+ export interface ListQuery extends Pagination {
608
+ /** 查询的起始日期,格式为yyyy-mm-dd。不填则默认为当前日期减去180天。 */
609
+ from_date?: string
610
+ /** 查询的结束日期,格式为yyyy-mm-dd。不填默认为当前日期。只能查询 180 天内的数据。 */
611
+ to_date?: string
612
+ /** 反馈类型,不填写则表示查询所有反馈类型。 */
613
+ feedback_type?: ListQueryFeedbackType
614
+ /** 反馈处理状态,不填写则表示查询所有处理类型。 */
615
+ status?: ListQueryStatus
616
+ user_id_type?: 'open_id' | 'union_id' | 'user_id'
617
+ }
618
+ }
526
619
 
527
- export interface RecommendApplicationResponse {
528
- /** 分页的token */
529
- page_token?: string
530
- /** 分页数量 */
531
- page_size?: number
532
- /** 总的数量 */
533
- total_count?: number
534
- /** 是否有更多数据 */
535
- has_more?: boolean
536
- /** 应用数据列表 */
537
- app_list?: Application[]
538
- }
620
+ export namespace AppBadge {
621
+ export interface Methods {
622
+ /**
623
+ * 更新应用红点
624
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/app_badge/set
625
+ */
626
+ set(body: SetRequest, query?: SetQuery): Promise<void>
627
+ }
628
+
629
+ export interface SetRequest {
630
+ /** 用户ID */
631
+ user_id: string
632
+ /** badge数据版本号 */
633
+ version: string
634
+ /** badge extra 信息 */
635
+ extra?: string
636
+ /** pc端badge数量 */
637
+ pc?: Lark.ClientBadgeNum
638
+ /** 移动端badge数量 */
639
+ mobile?: Lark.ClientBadgeNum
640
+ }
641
+
642
+ export interface SetQuery {
643
+ /** 此次调用中使用的用户ID的类型 */
644
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
645
+ }
646
+ }
539
647
 
540
- export interface ListApplicationAppRecommendRuleQuery extends Pagination {
541
- /** 此次调用中使用的用户ID的类型 */
542
- user_id_type?: 'user_id' | 'union_id' | 'open_id'
648
+ export namespace AppRecommendRule {
649
+ export interface Methods {
650
+ /**
651
+ * 获取当前设置的推荐规则列表
652
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/app_recommend_rule/list
653
+ */
654
+ list(query?: ListQuery): Paginated<Lark.AppRecommendRule, 'rules'>
655
+ }
656
+
657
+ export interface ListQuery extends Pagination {
658
+ /** 此次调用中使用的用户ID的类型 */
659
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
660
+ }
661
+ }
543
662
  }
544
663
 
545
664
  Internal.define({
665
+ '/application/v6/applications/{app_id}/owner': {
666
+ PUT: 'application.owner.update',
667
+ },
668
+ '/application/v6/applications/{app_id}/collaborators': {
669
+ PUT: 'application.collaborators.update',
670
+ GET: 'application.collaborators.get',
671
+ },
546
672
  '/application/v6/applications/{app_id}': {
547
- GET: 'getApplication',
548
- PATCH: 'patchApplication',
673
+ GET: 'application.get',
674
+ PATCH: 'application.patch',
549
675
  },
550
676
  '/application/v6/applications/{app_id}/app_versions/{version_id}': {
551
- GET: 'getApplicationApplicationAppVersion',
552
- PATCH: 'patchApplicationApplicationAppVersion',
677
+ GET: 'application.appVersion.get',
678
+ PATCH: 'application.appVersion.patch',
553
679
  },
554
680
  '/application/v6/applications/{app_id}/app_versions': {
555
- GET: { name: 'listApplicationApplicationAppVersion', pagination: { argIndex: 1 } },
681
+ GET: { name: 'application.appVersion.list', pagination: { argIndex: 1 } },
556
682
  },
557
683
  '/application/v6/applications/{app_id}/app_versions/{version_id}/contacts_range_suggest': {
558
- GET: 'contactsRangeSuggestApplicationApplicationAppVersion',
684
+ GET: 'application.appVersion.contactsRangeSuggest',
559
685
  },
560
686
  '/application/v6/scopes/apply': {
561
- POST: 'applyApplicationScope',
687
+ POST: 'application.scope.apply',
562
688
  },
563
689
  '/application/v6/scopes': {
564
- GET: 'listApplicationScope',
690
+ GET: 'application.scope.list',
565
691
  },
566
692
  '/application/v6/applications': {
567
- GET: { name: 'listApplication', pagination: { argIndex: 0, itemsKey: 'app_list' } },
693
+ GET: { name: 'application.list', pagination: { argIndex: 0, itemsKey: 'app_list' } },
568
694
  },
569
695
  '/application/v6/applications/underauditlist': {
570
- GET: { name: 'underauditlistApplication', pagination: { argIndex: 0 } },
696
+ GET: { name: 'application.underauditlist', pagination: { argIndex: 0 } },
571
697
  },
572
698
  '/application/v6/applications/{app_id}/contacts_range_configuration': {
573
- GET: 'contactsRangeConfigurationApplication',
699
+ GET: 'application.contactsRangeConfiguration',
574
700
  },
575
701
  '/application/v6/applications/{app_id}/contacts_range': {
576
- PATCH: 'patchApplicationApplicationContactsRange',
702
+ PATCH: 'application.contactsRange.patch',
577
703
  },
578
704
  '/application/v6/applications/{app_id}/visibility/check_white_black_list': {
579
- POST: 'checkWhiteBlackListApplicationApplicationVisibility',
705
+ POST: 'application.visibility.checkWhiteBlackList',
580
706
  },
581
707
  '/application/v6/applications/{app_id}/visibility': {
582
- PATCH: 'patchApplicationApplicationVisibility',
708
+ PATCH: 'application.visibility.patch',
583
709
  },
584
710
  '/application/v6/applications/{app_id}/management': {
585
- PUT: 'updateApplicationApplicationManagement',
711
+ PUT: 'application.management.update',
586
712
  },
587
713
  '/application/v6/applications/{app_id}/app_usage/department_overview': {
588
- POST: 'departmentOverviewApplicationApplicationAppUsage',
714
+ POST: 'application.appUsage.departmentOverview',
589
715
  },
590
716
  '/application/v6/applications/{app_id}/app_usage/message_push_overview': {
591
- POST: 'messagePushOverviewApplicationApplicationAppUsage',
717
+ POST: 'application.appUsage.messagePushOverview',
592
718
  },
593
719
  '/application/v6/applications/{app_id}/app_usage/overview': {
594
- POST: 'overviewApplicationApplicationAppUsage',
720
+ POST: 'application.appUsage.overview',
595
721
  },
596
722
  '/application/v6/applications/{app_id}/feedbacks/{feedback_id}': {
597
- PATCH: 'patchApplicationApplicationFeedback',
723
+ PATCH: 'application.feedback.patch',
598
724
  },
599
725
  '/application/v6/applications/{app_id}/feedbacks': {
600
- GET: { name: 'listApplicationApplicationFeedback', pagination: { argIndex: 1, itemsKey: 'feedback_list' } },
726
+ GET: { name: 'application.feedback.list', pagination: { argIndex: 1, itemsKey: 'feedback_list' } },
601
727
  },
602
728
  '/application/v6/app_badge/set': {
603
- POST: 'setApplicationAppBadge',
729
+ POST: 'application.appBadge.set',
604
730
  },
605
731
  '/application/v5/applications/favourite': {
606
- GET: { name: 'favouriteApplication', pagination: { argIndex: 0, itemsKey: 'app_list' } },
732
+ GET: { name: 'application.favourite', pagination: { argIndex: 0, itemsKey: 'app_list' } },
607
733
  },
608
734
  '/application/v5/applications/recommend': {
609
- GET: { name: 'recommendApplication', pagination: { argIndex: 0, itemsKey: 'app_list' } },
735
+ GET: { name: 'application.recommend', pagination: { argIndex: 0, itemsKey: 'app_list' } },
610
736
  },
611
737
  '/application/v6/app_recommend_rules': {
612
- GET: { name: 'listApplicationAppRecommendRule', pagination: { argIndex: 0, itemsKey: 'rules' } },
738
+ GET: { name: 'application.appRecommendRule.list', pagination: { argIndex: 0, itemsKey: 'rules' } },
613
739
  },
614
740
  })