@satorijs/adapter-lark 3.10.6 → 3.11.0

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