@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,358 +1,406 @@
1
- import { AdminDeptStat, AdminUserStat, AuditInfo, Badge, Grant, I18n, Password, RuleDetail } 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
- /**
7
- * 重置用户的企业邮箱密码
8
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/password/reset
9
- */
10
- resetAdminPassword(body: ResetAdminPasswordRequest, query?: ResetAdminPasswordQuery): Promise<void>
11
- /**
12
- * 获取部门维度的用户活跃和功能使用数据
13
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/admin_dept_stat/list
14
- */
15
- listAdminAdminDeptStat(query?: ListAdminAdminDeptStatQuery): Paginated<AdminDeptStat>
16
- /**
17
- * 获取用户维度的用户活跃和功能使用数据
18
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/admin_user_stat/list
19
- */
20
- listAdminAdminUserStat(query?: ListAdminAdminUserStatQuery): Paginated<AdminUserStat>
21
- /**
22
- * 创建勋章
23
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge/create
24
- */
25
- createAdminBadge(body: CreateAdminBadgeRequest): Promise<CreateAdminBadgeResponse>
26
- /**
27
- * 修改勋章信息
28
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge/update
29
- */
30
- updateAdminBadge(badge_id: string, body: UpdateAdminBadgeRequest): Promise<UpdateAdminBadgeResponse>
31
- /**
32
- * 上传勋章图片
33
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge_image/create
34
- */
35
- createAdminBadgeImage(form: CreateAdminBadgeImageForm): Promise<CreateAdminBadgeImageResponse>
36
- /**
37
- * 获取勋章列表
38
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge/list
39
- */
40
- listAdminBadge(query?: ListAdminBadgeQuery): Paginated<Badge, 'badges'>
41
- /**
42
- * 获取勋章详情
43
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge/get
44
- */
45
- getAdminBadge(badge_id: string): Promise<GetAdminBadgeResponse>
46
- /**
47
- * 创建授予名单
48
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge-grant/create
49
- */
50
- createAdminBadgeGrant(badge_id: string, body: CreateAdminBadgeGrantRequest, query?: CreateAdminBadgeGrantQuery): Promise<CreateAdminBadgeGrantResponse>
51
- /**
52
- * 删除授予名单
53
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge-grant/delete
54
- */
55
- deleteAdminBadgeGrant(badge_id: string, grant_id: string): Promise<void>
56
- /**
57
- * 修改授予名单
58
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge-grant/update
59
- */
60
- updateAdminBadgeGrant(badge_id: string, grant_id: string, body: UpdateAdminBadgeGrantRequest, query?: UpdateAdminBadgeGrantQuery): Promise<UpdateAdminBadgeGrantResponse>
61
- /**
62
- * 获取授予名单列表
63
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge-grant/list
64
- */
65
- listAdminBadgeGrant(badge_id: string, query?: ListAdminBadgeGrantQuery): Paginated<Grant, 'grants'>
66
- /**
67
- * 获取授予名单详情
68
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge-grant/get
69
- */
70
- getAdminBadgeGrant(badge_id: string, grant_id: string, query?: GetAdminBadgeGrantQuery): Promise<GetAdminBadgeGrantResponse>
71
- /**
72
- * 获取行为审计日志数据
73
- * @see https://open.feishu.cn/document/ukTMukTMukTM/uQjM5YjL0ITO24CNykjN/audit_log/audit_data_get
74
- */
75
- listAdminAuditInfo(query?: ListAdminAuditInfoQuery): Paginated<AuditInfo>
6
+ admin: Admin.Methods
76
7
  }
77
8
  }
78
9
 
79
- export interface ResetAdminPasswordRequest {
80
- /** 需要重置的密码参数,不少于8个字符,字母、数字和符号,至少三选二 */
81
- password: Password
82
- /** 待修改密码的用户ID,只针对邮箱登录凭证与企业邮箱(包括别名)相等的用户生效 */
83
- user_id: string
84
- }
10
+ export namespace Admin {
11
+ export interface Methods {
12
+ password: Password.Methods
13
+ adminDeptStat: AdminDeptStat.Methods
14
+ adminUserStat: AdminUserStat.Methods
15
+ badge: Badge.Methods
16
+ badgeImage: BadgeImage.Methods
17
+ auditInfo: AuditInfo.Methods
18
+ }
85
19
 
86
- export interface ResetAdminPasswordQuery {
87
- /** 用户ID类型 */
88
- user_id_type: 'open_id' | 'union_id' | 'user_id'
89
- }
20
+ export namespace Password {
21
+ export interface Methods {
22
+ /**
23
+ * 重置用户的企业邮箱密码
24
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/password/reset
25
+ */
26
+ reset(body: ResetRequest, query?: ResetQuery): Promise<void>
27
+ }
90
28
 
91
- export interface ListAdminAdminDeptStatQuery extends Pagination {
92
- /** 部门ID类型 */
93
- department_id_type: 'department_id' | 'open_department_id'
94
- /** 起始日期(包含),格式是YYYY-mm-dd */
95
- start_date: string
96
- /** 终止日期(包含),格式是YYYY-mm-dd,起止日期之间相差不能超过91天(包含91天) */
97
- end_date: string
98
- /** 部门的 ID,取决于department_id_type,仅支持根部门及其下前4级子部门 */
99
- department_id: string
100
- /** 是否包含子部门,如果该值为false,则只查出本部门直属用户活跃和功能使用数据;如果该值为true,则查出该部门以及其子部门(子部门层级最多不超过根部门下的前4级)的用户活跃和功能使用数据 */
101
- contains_child_dept: boolean
102
- /** 跨域访问的geo */
103
- target_geo?: string
104
- /** 是否返回分产品版本数据 */
105
- with_product_version?: boolean
106
- }
29
+ export interface ResetRequest {
30
+ /** 需要重置的密码参数,不少于8个字符,字母、数字和符号,至少三选二 */
31
+ password: Lark.Password
32
+ /** 待修改密码的用户ID,只针对邮箱登录凭证与企业邮箱(包括别名)相等的用户生效 */
33
+ user_id: string
34
+ }
107
35
 
108
- export interface ListAdminAdminUserStatQuery extends Pagination {
109
- /** 此次调用中使用的用户ID的类型 */
110
- user_id_type?: 'user_id' | 'union_id' | 'open_id'
111
- /** 部门ID类型 */
112
- department_id_type?: 'department_id' | 'open_department_id'
113
- /** 起始日期(包含),格式是YYYY-mm-dd */
114
- start_date: string
115
- /** 终止日期(包含),格式是YYYY-mm-dd。起止日期之间相差不能超过31天(包含31天) */
116
- end_date: string
117
- /** 部门的 ID,取决于department_id_type */
118
- department_id?: string
119
- /** 用户的open_id,user_id或者union_id,取决于user_id_type */
120
- user_id?: string
121
- /** 跨域访问的geo */
122
- target_geo?: string
123
- }
36
+ export interface ResetQuery {
37
+ /** 用户ID类型 */
38
+ user_id_type: 'open_id' | 'union_id' | 'user_id'
39
+ }
40
+ }
124
41
 
125
- export interface CreateAdminBadgeRequest {
126
- /** 租户内唯一的勋章名称,最多30个字符。 */
127
- name: string
128
- /** 勋章的描述文案,最多100个字符。 */
129
- explanation?: string
130
- /** 企业勋章的详情图Key。1.权限校验:非本租户上传的图片key,不能直接使用;2.时效校验:创建勋章,或者修改勋章图片key时,需使用1h内上传的图片key。 */
131
- detail_image: string
132
- /** 企业勋章的头像挂饰图Key。1.权限校验:非本租户上传的图片key,不能直接使用;2.时效校验:创建勋章,或者修改勋章图片key时,需使用1h内上传的图片key。 */
133
- show_image: string
134
- /** 勋章的多语言名称,同name字段限制,最多30个字符。 */
135
- i18n_name?: I18n
136
- /** 勋章的多语言描述文案,同explanation字段限制,最多100个字符。 */
137
- i18n_explanation?: I18n
138
- }
42
+ export namespace AdminDeptStat {
43
+ export interface Methods {
44
+ /**
45
+ * 获取部门维度的用户活跃和功能使用数据
46
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/admin_dept_stat/list
47
+ */
48
+ list(query?: ListQuery): Paginated<Lark.AdminDeptStat>
49
+ }
139
50
 
140
- export interface CreateAdminBadgeResponse {
141
- /** 勋章的信息 */
142
- badge?: Badge
143
- }
51
+ export interface ListQuery extends Pagination {
52
+ /** 部门ID类型 */
53
+ department_id_type: 'department_id' | 'open_department_id'
54
+ /** 起始日期(包含),格式是YYYY-mm-dd */
55
+ start_date: string
56
+ /** 终止日期(包含),格式是YYYY-mm-dd,起止日期之间相差不能超过91天(包含91天) */
57
+ end_date: string
58
+ /** 部门的 ID,取决于department_id_type,仅支持根部门及其下前4级子部门 */
59
+ department_id: string
60
+ /** 是否包含子部门,如果该值为false,则只查出本部门直属用户活跃和功能使用数据;如果该值为true,则查出该部门以及其子部门(子部门层级最多不超过根部门下的前4级)的用户活跃和功能使用数据 */
61
+ contains_child_dept: boolean
62
+ /** 跨域访问的geo */
63
+ target_geo?: string
64
+ /** 是否返回分产品版本数据 */
65
+ with_product_version?: boolean
66
+ }
67
+ }
144
68
 
145
- export interface UpdateAdminBadgeRequest {
146
- /** 租户内唯一的勋章名称,最多30个字符。 */
147
- name: string
148
- /** 勋章的描述文案,最多100个字符。 */
149
- explanation?: string
150
- /** 企业勋章的详情图Key。1.权限校验:非本租户上传的图片key,不能直接使用;2.时效校验:创建勋章,或者修改勋章图片key时,需使用1h内上传的图片key。 */
151
- detail_image: string
152
- /** 企业勋章的头像挂饰图Key。1.权限校验:非本租户上传的图片key,不能直接使用;2.时效校验:创建勋章,或者修改勋章图片key时,需使用1h内上传的图片key。 */
153
- show_image: string
154
- /** 勋章的多语言名称,同name字段限制,最多30个字符。 */
155
- i18n_name?: I18n
156
- /** 勋章的多语言描述文案,同explanation字段限制,最多100个字符。 */
157
- i18n_explanation?: I18n
158
- }
69
+ export namespace AdminUserStat {
70
+ export interface Methods {
71
+ /**
72
+ * 获取用户维度的用户活跃和功能使用数据
73
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/admin_user_stat/list
74
+ */
75
+ list(query?: ListQuery): Paginated<Lark.AdminUserStat>
76
+ }
159
77
 
160
- export interface UpdateAdminBadgeResponse {
161
- /** 勋章信息 */
162
- badge?: Badge
163
- }
78
+ export interface ListQuery extends Pagination {
79
+ /** 此次调用中使用的用户ID的类型 */
80
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
81
+ /** 部门ID类型 */
82
+ department_id_type?: 'department_id' | 'open_department_id'
83
+ /** 起始日期(包含),格式是YYYY-mm-dd */
84
+ start_date: string
85
+ /** 终止日期(包含),格式是YYYY-mm-dd。起止日期之间相差不能超过31天(包含31天) */
86
+ end_date: string
87
+ /** 部门的 ID,取决于department_id_type */
88
+ department_id?: string
89
+ /** 用户的open_id,user_id或者union_id,取决于user_id_type */
90
+ user_id?: string
91
+ /** 跨域访问的geo */
92
+ target_geo?: string
93
+ }
94
+ }
164
95
 
165
- export const enum CreateAdminBadgeImageFormImageType {
166
- /** 勋章详情图 */
167
- Detail = 1,
168
- /** 勋章挂饰图 */
169
- Show = 2,
170
- }
96
+ export namespace Badge {
97
+ export interface Methods {
98
+ grant: Grant.Methods
99
+ /**
100
+ * 创建勋章
101
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge/create
102
+ */
103
+ create(body: CreateRequest): Promise<CreateResponse>
104
+ /**
105
+ * 修改勋章信息
106
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge/update
107
+ */
108
+ update(badge_id: string, body: UpdateRequest): Promise<UpdateResponse>
109
+ /**
110
+ * 获取勋章列表
111
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge/list
112
+ */
113
+ list(query?: ListQuery): Paginated<Lark.Badge, 'badges'>
114
+ /**
115
+ * 获取勋章详情
116
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge/get
117
+ */
118
+ get(badge_id: string): Promise<GetResponse>
119
+ }
171
120
 
172
- export interface CreateAdminBadgeImageForm {
173
- /** 勋章图片的文件,仅支持 PNG 格式,320 x 320 像素,大小不超过 1024 KB。 */
174
- image_file: Blob
175
- /** 图片的类型 */
176
- image_type: CreateAdminBadgeImageFormImageType
177
- }
121
+ export interface CreateRequest {
122
+ /** 租户内唯一的勋章名称,最多30个字符。 */
123
+ name: string
124
+ /** 勋章的描述文案,最多100个字符。 */
125
+ explanation?: string
126
+ /** 企业勋章的详情图Key。1.权限校验:非本租户上传的图片key,不能直接使用;2.时效校验:创建勋章,或者修改勋章图片key时,需使用1h内上传的图片key。 */
127
+ detail_image: string
128
+ /** 企业勋章的头像挂饰图Key。1.权限校验:非本租户上传的图片key,不能直接使用;2.时效校验:创建勋章,或者修改勋章图片key时,需使用1h内上传的图片key。 */
129
+ show_image: string
130
+ /** 勋章的多语言名称,同name字段限制,最多30个字符。 */
131
+ i18n_name?: Lark.I18n
132
+ /** 勋章的多语言描述文案,同explanation字段限制,最多100个字符。 */
133
+ i18n_explanation?: Lark.I18n
134
+ }
178
135
 
179
- export interface CreateAdminBadgeImageResponse {
180
- /** 图片的key */
181
- image_key?: string
182
- }
136
+ export interface CreateResponse {
137
+ /** 勋章的信息 */
138
+ badge?: Lark.Badge
139
+ }
183
140
 
184
- export interface ListAdminBadgeQuery extends Pagination {
185
- /** 租户内唯一的勋章名称,精确匹配。 */
186
- name?: string
187
- }
141
+ export interface UpdateRequest {
142
+ /** 租户内唯一的勋章名称,最多30个字符。 */
143
+ name: string
144
+ /** 勋章的描述文案,最多100个字符。 */
145
+ explanation?: string
146
+ /** 企业勋章的详情图Key。1.权限校验:非本租户上传的图片key,不能直接使用;2.时效校验:创建勋章,或者修改勋章图片key时,需使用1h内上传的图片key。 */
147
+ detail_image: string
148
+ /** 企业勋章的头像挂饰图Key。1.权限校验:非本租户上传的图片key,不能直接使用;2.时效校验:创建勋章,或者修改勋章图片key时,需使用1h内上传的图片key。 */
149
+ show_image: string
150
+ /** 勋章的多语言名称,同name字段限制,最多30个字符。 */
151
+ i18n_name?: Lark.I18n
152
+ /** 勋章的多语言描述文案,同explanation字段限制,最多100个字符。 */
153
+ i18n_explanation?: Lark.I18n
154
+ }
188
155
 
189
- export interface GetAdminBadgeResponse {
190
- /** 勋章信息 */
191
- badge?: Badge
192
- }
156
+ export interface UpdateResponse {
157
+ /** 勋章信息 */
158
+ badge?: Lark.Badge
159
+ }
193
160
 
194
- export const enum CreateAdminBadgeGrantRequestGrantType {
195
- /** 手动选择有效期 */
196
- Manual = 0,
197
- /** 匹配系统入职时间 */
198
- JoinTime = 1,
199
- }
161
+ export interface ListQuery extends Pagination {
162
+ /** 租户内唯一的勋章名称,精确匹配。 */
163
+ name?: string
164
+ }
200
165
 
201
- export interface CreateAdminBadgeGrantRequest {
202
- /** 授予名单名称,最多100个字符。 */
203
- name: string
204
- /** 勋章下唯一的授予事项 */
205
- grant_type: CreateAdminBadgeGrantRequestGrantType
206
- /** 授予名单的生效时间对应的时区,用于检查RuleDetail的时间戳的取值是否规范,取值范围为TZ database name */
207
- time_zone: string
208
- /** 规则详情 */
209
- rule_detail: RuleDetail
210
- /** 是否授予给全员。1.为false时,需要关联1~500个用户群体。2.为true时,不可关联用户、用户组、部门。 */
211
- is_grant_all: boolean
212
- /** 授予的用户ID列表,授予名单列表接口返回结果中不返回该字段,只在详情接口返回 */
213
- user_ids?: string[]
214
- /** 授予的部门ID列表,授予名单列表接口返回结果中不返回该字段,只在详情接口返回 */
215
- department_ids?: string[]
216
- /** 授予的用户组ID列表,授予名单列表接口返回结果中不返回该字段,只在详情接口返回 */
217
- group_ids?: string[]
218
- }
166
+ export interface GetResponse {
167
+ /** 勋章信息 */
168
+ badge?: Lark.Badge
169
+ }
219
170
 
220
- export interface CreateAdminBadgeGrantQuery {
221
- /** 用户 ID 类型 */
222
- user_id_type?: 'open_id' | 'union_id' | 'user_id'
223
- /** 此次调用中使用的部门ID的类型。 */
224
- department_id_type?: 'department_id' | 'open_department_id'
225
- }
171
+ export namespace Grant {
172
+ export interface Methods {
173
+ /**
174
+ * 创建授予名单
175
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge-grant/create
176
+ */
177
+ create(badge_id: string, body: CreateRequest, query?: CreateQuery): Promise<CreateResponse>
178
+ /**
179
+ * 删除授予名单
180
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge-grant/delete
181
+ */
182
+ delete(badge_id: string, grant_id: string): Promise<void>
183
+ /**
184
+ * 修改授予名单
185
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge-grant/update
186
+ */
187
+ update(badge_id: string, grant_id: string, body: UpdateRequest, query?: UpdateQuery): Promise<UpdateResponse>
188
+ /**
189
+ * 获取授予名单列表
190
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge-grant/list
191
+ */
192
+ list(badge_id: string, query?: ListQuery): Paginated<Lark.Grant, 'grants'>
193
+ /**
194
+ * 获取授予名单详情
195
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge-grant/get
196
+ */
197
+ get(badge_id: string, grant_id: string, query?: GetQuery): Promise<GetResponse>
198
+ }
226
199
 
227
- export interface CreateAdminBadgeGrantResponse {
228
- /** 授予名单的信息 */
229
- grant?: Grant
230
- }
200
+ export const enum CreateRequestGrantType {
201
+ /** 手动选择有效期 */
202
+ Manual = 0,
203
+ /** 匹配系统入职时间 */
204
+ JoinTime = 1,
205
+ }
231
206
 
232
- export const enum UpdateAdminBadgeGrantRequestGrantType {
233
- /** 手动选择有效期 */
234
- Manual = 0,
235
- /** 匹配系统入职时间 */
236
- JoinTime = 1,
237
- }
207
+ export interface CreateRequest {
208
+ /** 授予名单名称,最多100个字符。 */
209
+ name: string
210
+ /** 勋章下唯一的授予事项 */
211
+ grant_type: CreateRequestGrantType
212
+ /** 授予名单的生效时间对应的时区,用于检查RuleDetail的时间戳的取值是否规范,取值范围为TZ database name */
213
+ time_zone: string
214
+ /** 规则详情 */
215
+ rule_detail: Lark.RuleDetail
216
+ /** 是否授予给全员。1.为false时,需要关联1~500个用户群体。2.为true时,不可关联用户、用户组、部门。 */
217
+ is_grant_all: boolean
218
+ /** 授予的用户ID列表,授予名单列表接口返回结果中不返回该字段,只在详情接口返回 */
219
+ user_ids?: string[]
220
+ /** 授予的部门ID列表,授予名单列表接口返回结果中不返回该字段,只在详情接口返回 */
221
+ department_ids?: string[]
222
+ /** 授予的用户组ID列表,授予名单列表接口返回结果中不返回该字段,只在详情接口返回 */
223
+ group_ids?: string[]
224
+ }
238
225
 
239
- export interface UpdateAdminBadgeGrantRequest {
240
- /** 授予名单名称,最多100个字符。 */
241
- name: string
242
- /** 勋章下唯一的授予事项 */
243
- grant_type: UpdateAdminBadgeGrantRequestGrantType
244
- /** 授予名单的生效时间对应的时区,用于检查RuleDetail的时间戳的取值是否规范,取值范围为TZ database name */
245
- time_zone: string
246
- /** 规则详情 */
247
- rule_detail: RuleDetail
248
- /** 是否授予给全员。1.为false时,需要关联1~500个用户群体。2.为true时,不可关联用户、用户组、部门。 */
249
- is_grant_all: boolean
250
- /** 授予的用户ID列表,授予名单列表接口返回结果中不返回该字段,只在详情接口返回 */
251
- user_ids?: string[]
252
- /** 授予的部门ID列表,授予名单列表接口返回结果中不返回该字段,只在详情接口返回 */
253
- department_ids?: string[]
254
- /** 授予的用户组ID列表,授予名单列表接口返回结果中不返回该字段,只在详情接口返回 */
255
- group_ids?: string[]
256
- }
226
+ export interface CreateQuery {
227
+ /** 用户 ID 类型 */
228
+ user_id_type?: 'open_id' | 'union_id' | 'user_id'
229
+ /** 此次调用中使用的部门ID的类型。 */
230
+ department_id_type?: 'department_id' | 'open_department_id'
231
+ }
257
232
 
258
- export interface UpdateAdminBadgeGrantQuery {
259
- /** 用户 ID 类型 */
260
- user_id_type?: 'open_id' | 'union_id' | 'user_id'
261
- /** 此次调用中使用的部门ID的类型。 */
262
- department_id_type?: 'department_id' | 'open_department_id'
263
- }
233
+ export interface CreateResponse {
234
+ /** 授予名单的信息 */
235
+ grant?: Lark.Grant
236
+ }
264
237
 
265
- export interface UpdateAdminBadgeGrantResponse {
266
- /** 授予名单 */
267
- grant?: Grant
268
- }
238
+ export const enum UpdateRequestGrantType {
239
+ /** 手动选择有效期 */
240
+ Manual = 0,
241
+ /** 匹配系统入职时间 */
242
+ JoinTime = 1,
243
+ }
269
244
 
270
- export interface ListAdminBadgeGrantQuery extends Pagination {
271
- /** 用户 ID 类型 */
272
- user_id_type?: 'open_id' | 'union_id' | 'user_id'
273
- /** 此次调用中使用的部门ID的类型。 */
274
- department_id_type?: 'department_id' | 'open_department_id'
275
- /** 授予名单名称,精确匹配。 */
276
- name?: string
277
- }
245
+ export interface UpdateRequest {
246
+ /** 授予名单名称,最多100个字符。 */
247
+ name: string
248
+ /** 勋章下唯一的授予事项 */
249
+ grant_type: UpdateRequestGrantType
250
+ /** 授予名单的生效时间对应的时区,用于检查RuleDetail的时间戳的取值是否规范,取值范围为TZ database name */
251
+ time_zone: string
252
+ /** 规则详情 */
253
+ rule_detail: Lark.RuleDetail
254
+ /** 是否授予给全员。1.为false时,需要关联1~500个用户群体。2.为true时,不可关联用户、用户组、部门。 */
255
+ is_grant_all: boolean
256
+ /** 授予的用户ID列表,授予名单列表接口返回结果中不返回该字段,只在详情接口返回 */
257
+ user_ids?: string[]
258
+ /** 授予的部门ID列表,授予名单列表接口返回结果中不返回该字段,只在详情接口返回 */
259
+ department_ids?: string[]
260
+ /** 授予的用户组ID列表,授予名单列表接口返回结果中不返回该字段,只在详情接口返回 */
261
+ group_ids?: string[]
262
+ }
278
263
 
279
- export interface GetAdminBadgeGrantQuery {
280
- /** 用户 ID 类型 */
281
- user_id_type?: 'open_id' | 'union_id' | 'user_id'
282
- /** 此次调用中使用的部门ID的类型。 */
283
- department_id_type?: 'department_id' | 'open_department_id'
284
- }
264
+ export interface UpdateQuery {
265
+ /** 用户 ID 类型 */
266
+ user_id_type?: 'open_id' | 'union_id' | 'user_id'
267
+ /** 此次调用中使用的部门ID的类型。 */
268
+ department_id_type?: 'department_id' | 'open_department_id'
269
+ }
285
270
 
286
- export interface GetAdminBadgeGrantResponse {
287
- /** 授予名单信息 */
288
- grant?: Grant
289
- }
271
+ export interface UpdateResponse {
272
+ /** 授予名单 */
273
+ grant?: Lark.Grant
274
+ }
290
275
 
291
- export const enum ListAdminAuditInfoQueryUserType {
292
- /** 互联网上的任何人 */
293
- All = 0,
294
- /** 组织内成员 */
295
- NormalUser = 1,
296
- /** 组织外成员 */
297
- ExternalUser = 2,
298
- }
276
+ export interface ListQuery extends Pagination {
277
+ /** 用户 ID 类型 */
278
+ user_id_type?: 'open_id' | 'union_id' | 'user_id'
279
+ /** 此次调用中使用的部门ID的类型。 */
280
+ department_id_type?: 'department_id' | 'open_department_id'
281
+ /** 授予名单名称,精确匹配。 */
282
+ name?: string
283
+ }
284
+
285
+ export interface GetQuery {
286
+ /** 用户 ID 类型 */
287
+ user_id_type?: 'open_id' | 'union_id' | 'user_id'
288
+ /** 此次调用中使用的部门ID的类型。 */
289
+ department_id_type?: 'department_id' | 'open_department_id'
290
+ }
299
291
 
300
- export interface ListAdminAuditInfoQuery extends Pagination {
301
- /** 此次调用中使用的用户ID的类型 */
302
- user_id_type?: 'user_id' | 'union_id' | 'open_id'
303
- /** 日志时间范围: 结束时间. 格式: 秒级时间戳. 默认值: 此刻 */
304
- latest?: number
305
- /** 日志时间范围: 起始时间. 格式: 秒级时间戳. 默认值: 30日前此刻 */
306
- oldest?: number
307
- /** 事件名称 */
308
- event_name?: string
309
- /** 过滤操作者: 操作者类型. 与 operator_value 配合使用 */
310
- operator_type?: 'user' | 'bot'
311
- /** 过滤操作者: 操作者ID. 与 operator_type 配合使用 */
312
- operator_value?: string
313
- /** 过滤模块 */
314
- event_module?: number
315
- /** 过滤用户类型. 仅当 operator_type=user 时生效 */
316
- user_type?: ListAdminAuditInfoQueryUserType
317
- /** 过滤操作对象: 操作对象类型. 与object_value配合使用 */
318
- object_type?: number
319
- /** 过滤操作对象: 操作对象ID. 与object_type配合使用 */
320
- object_value?: string
321
- /** 增强过滤操作对象: 操作对象ID,支持云文档侧泛token过滤。会覆盖object_type和object_value查询条件 */
322
- ext_filter_object_by_ccm_token?: string
292
+ export interface GetResponse {
293
+ /** 授予名单信息 */
294
+ grant?: Lark.Grant
295
+ }
296
+ }
297
+ }
298
+
299
+ export namespace BadgeImage {
300
+ export interface Methods {
301
+ /**
302
+ * 上传勋章图片
303
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge_image/create
304
+ */
305
+ create(form: CreateForm): Promise<CreateResponse>
306
+ }
307
+
308
+ export const enum CreateFormImageType {
309
+ /** 勋章详情图 */
310
+ Detail = 1,
311
+ /** 勋章挂饰图 */
312
+ Show = 2,
313
+ }
314
+
315
+ export interface CreateForm {
316
+ /** 勋章图片的文件,仅支持 PNG 格式,320 x 320 像素,大小不超过 1024 KB。 */
317
+ image_file: Blob
318
+ /** 图片的类型 */
319
+ image_type: CreateFormImageType
320
+ }
321
+
322
+ export interface CreateResponse {
323
+ /** 图片的key */
324
+ image_key?: string
325
+ }
326
+ }
327
+
328
+ export namespace AuditInfo {
329
+ export interface Methods {
330
+ /**
331
+ * 获取行为审计日志数据
332
+ * @see https://open.feishu.cn/document/ukTMukTMukTM/uQjM5YjL0ITO24CNykjN/audit_log/audit_data_get
333
+ */
334
+ list(query?: ListQuery): Paginated<Lark.AuditInfo>
335
+ }
336
+
337
+ export const enum ListQueryUserType {
338
+ /** 互联网上的任何人 */
339
+ All = 0,
340
+ /** 组织内成员 */
341
+ NormalUser = 1,
342
+ /** 组织外成员 */
343
+ ExternalUser = 2,
344
+ }
345
+
346
+ export interface ListQuery extends Pagination {
347
+ /** 此次调用中使用的用户ID的类型 */
348
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
349
+ /** 日志时间范围: 结束时间. 格式: 秒级时间戳. 默认值: 此刻 */
350
+ latest?: number
351
+ /** 日志时间范围: 起始时间. 格式: 秒级时间戳. 默认值: 30日前此刻 */
352
+ oldest?: number
353
+ /** 事件名称 */
354
+ event_name?: string
355
+ /** 过滤操作者: 操作者类型. 与 operator_value 配合使用 */
356
+ operator_type?: 'user' | 'bot'
357
+ /** 过滤操作者: 操作者ID. 与 operator_type 配合使用 */
358
+ operator_value?: string
359
+ /** 过滤模块 */
360
+ event_module?: number
361
+ /** 过滤用户类型. 仅当 operator_type=user 时生效 */
362
+ user_type?: ListQueryUserType
363
+ /** 过滤操作对象: 操作对象类型. 与object_value配合使用 */
364
+ object_type?: number
365
+ /** 过滤操作对象: 操作对象ID. 与object_type配合使用 */
366
+ object_value?: string
367
+ /** 增强过滤操作对象: 操作对象ID,支持云文档侧泛token过滤。会覆盖object_type和object_value查询条件 */
368
+ ext_filter_object_by_ccm_token?: string
369
+ }
370
+ }
323
371
  }
324
372
 
325
373
  Internal.define({
326
374
  '/admin/v1/password/reset': {
327
- POST: 'resetAdminPassword',
375
+ POST: 'admin.password.reset',
328
376
  },
329
377
  '/admin/v1/admin_dept_stats': {
330
- GET: { name: 'listAdminAdminDeptStat', pagination: { argIndex: 0 } },
378
+ GET: { name: 'admin.adminDeptStat.list', pagination: { argIndex: 0 } },
331
379
  },
332
380
  '/admin/v1/admin_user_stats': {
333
- GET: { name: 'listAdminAdminUserStat', pagination: { argIndex: 0 } },
381
+ GET: { name: 'admin.adminUserStat.list', pagination: { argIndex: 0 } },
334
382
  },
335
383
  '/admin/v1/badges': {
336
- POST: 'createAdminBadge',
337
- GET: { name: 'listAdminBadge', pagination: { argIndex: 0, itemsKey: 'badges' } },
384
+ POST: 'admin.badge.create',
385
+ GET: { name: 'admin.badge.list', pagination: { argIndex: 0, itemsKey: 'badges' } },
338
386
  },
339
387
  '/admin/v1/badges/{badge_id}': {
340
- PUT: 'updateAdminBadge',
341
- GET: 'getAdminBadge',
388
+ PUT: 'admin.badge.update',
389
+ GET: 'admin.badge.get',
342
390
  },
343
391
  '/admin/v1/badge_images': {
344
- POST: { name: 'createAdminBadgeImage', multipart: true },
392
+ POST: { name: 'admin.badgeImage.create', multipart: true },
345
393
  },
346
394
  '/admin/v1/badges/{badge_id}/grants': {
347
- POST: 'createAdminBadgeGrant',
348
- GET: { name: 'listAdminBadgeGrant', pagination: { argIndex: 1, itemsKey: 'grants' } },
395
+ POST: 'admin.badge.grant.create',
396
+ GET: { name: 'admin.badge.grant.list', pagination: { argIndex: 1, itemsKey: 'grants' } },
349
397
  },
350
398
  '/admin/v1/badges/{badge_id}/grants/{grant_id}': {
351
- DELETE: 'deleteAdminBadgeGrant',
352
- PUT: 'updateAdminBadgeGrant',
353
- GET: 'getAdminBadgeGrant',
399
+ DELETE: 'admin.badge.grant.delete',
400
+ PUT: 'admin.badge.grant.update',
401
+ GET: 'admin.badge.grant.get',
354
402
  },
355
403
  '/admin/v1/audit_infos': {
356
- GET: { name: 'listAdminAuditInfo', pagination: { argIndex: 0 } },
404
+ GET: { name: 'admin.auditInfo.list', pagination: { argIndex: 0 } },
357
405
  },
358
406
  })