@satorijs/adapter-lark 3.8.6 → 3.9.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 (121) hide show
  1. package/lib/bot.d.ts +1 -1
  2. package/lib/content.d.ts +433 -0
  3. package/lib/http.d.ts +1 -1
  4. package/lib/index.cjs +2792 -1719
  5. package/lib/index.d.ts +4 -2
  6. package/lib/internal.d.ts +37 -0
  7. package/lib/message.d.ts +2 -0
  8. package/lib/types/acs.d.ts +177 -0
  9. package/lib/types/admin.d.ts +270 -0
  10. package/lib/types/aily.d.ts +221 -0
  11. package/lib/types/apaas.d.ts +499 -0
  12. package/lib/types/application.d.ts +406 -0
  13. package/lib/types/approval.d.ts +779 -0
  14. package/lib/types/attendance.d.ts +957 -0
  15. package/lib/types/auth.d.ts +86 -0
  16. package/lib/types/authen.d.ts +191 -0
  17. package/lib/types/baike.d.ts +239 -0
  18. package/lib/types/bitable.d.ts +691 -0
  19. package/lib/types/board.d.ts +19 -0
  20. package/lib/types/calendar.d.ts +653 -0
  21. package/lib/types/cardkit.d.ts +139 -0
  22. package/lib/types/compensation.d.ts +54 -0
  23. package/lib/types/contact.d.ts +1137 -0
  24. package/lib/types/corehr.d.ts +4391 -0
  25. package/lib/types/docs.d.ts +23 -0
  26. package/lib/types/document_ai.d.ts +257 -0
  27. package/lib/types/docx.d.ts +380 -0
  28. package/lib/types/drive.d.ts +1053 -0
  29. package/lib/types/ehr.d.ts +32 -0
  30. package/lib/types/event.d.ts +9 -18
  31. package/lib/types/helpdesk.d.ts +746 -0
  32. package/lib/types/hire.d.ts +3150 -0
  33. package/lib/types/human_authentication.d.ts +27 -0
  34. package/lib/types/im.d.ts +1300 -0
  35. package/lib/types/index.d.ts +16432 -34
  36. package/lib/types/lingo.d.ts +254 -0
  37. package/lib/types/mail.d.ts +680 -0
  38. package/lib/types/mdm.d.ts +42 -0
  39. package/lib/types/minutes.d.ts +31 -0
  40. package/lib/types/moments.d.ts +18 -0
  41. package/lib/types/okr.d.ts +205 -0
  42. package/lib/types/optical_char_recognition.d.ts +17 -0
  43. package/lib/types/passport.d.ts +45 -0
  44. package/lib/types/payroll.d.ts +50 -0
  45. package/lib/types/performance.d.ts +413 -0
  46. package/lib/types/personal_settings.d.ts +87 -0
  47. package/lib/types/report.d.ts +57 -0
  48. package/lib/types/search.d.ts +216 -0
  49. package/lib/types/security_and_compliance.d.ts +24 -0
  50. package/lib/types/sheets.d.ts +326 -0
  51. package/lib/types/speech_to_text.d.ts +39 -0
  52. package/lib/types/task.d.ts +1153 -0
  53. package/lib/types/tenant.d.ts +23 -0
  54. package/lib/types/translation.d.ts +37 -0
  55. package/lib/types/vc.d.ts +948 -0
  56. package/lib/types/verification.d.ts +14 -0
  57. package/lib/types/wiki.d.ts +240 -0
  58. package/lib/types/workplace.d.ts +43 -0
  59. package/lib/utils.d.ts +143 -7
  60. package/package.json +6 -4
  61. package/src/bot.ts +19 -3
  62. package/src/{types/message/content.ts → content.ts} +1 -0
  63. package/src/http.ts +1 -3
  64. package/src/index.ts +4 -2
  65. package/src/internal.ts +143 -0
  66. package/src/message.ts +13 -11
  67. package/src/types/acs.ts +236 -0
  68. package/src/types/admin.ts +328 -0
  69. package/src/types/aily.ts +288 -0
  70. package/src/types/apaas.ts +646 -0
  71. package/src/types/application.ts +520 -0
  72. package/src/types/approval.ts +924 -0
  73. package/src/types/attendance.ts +1153 -0
  74. package/src/types/auth.ts +114 -0
  75. package/src/types/authen.ts +220 -0
  76. package/src/types/baike.ts +306 -0
  77. package/src/types/bitable.ts +879 -0
  78. package/src/types/board.ts +31 -0
  79. package/src/types/calendar.ts +817 -0
  80. package/src/types/cardkit.ts +182 -0
  81. package/src/types/compensation.ts +79 -0
  82. package/src/types/contact.ts +1411 -0
  83. package/src/types/corehr.ts +5297 -0
  84. package/src/types/docs.ts +33 -0
  85. package/src/types/document_ai.ts +352 -0
  86. package/src/types/docx.ts +471 -0
  87. package/src/types/drive.ts +1321 -0
  88. package/src/types/ehr.ts +43 -0
  89. package/src/types/event.ts +15 -21
  90. package/src/types/helpdesk.ts +925 -0
  91. package/src/types/hire.ts +3918 -0
  92. package/src/types/human_authentication.ts +38 -0
  93. package/src/types/im.ts +1605 -0
  94. package/src/types/index.ts +17754 -39
  95. package/src/types/lingo.ts +321 -0
  96. package/src/types/mail.ts +851 -0
  97. package/src/types/mdm.ts +57 -0
  98. package/src/types/minutes.ts +46 -0
  99. package/src/types/moments.ts +28 -0
  100. package/src/types/okr.ts +261 -0
  101. package/src/types/optical_char_recognition.ts +27 -0
  102. package/src/types/passport.ts +61 -0
  103. package/src/types/payroll.ts +69 -0
  104. package/src/types/performance.ts +524 -0
  105. package/src/types/personal_settings.ts +116 -0
  106. package/src/types/report.ts +77 -0
  107. package/src/types/search.ts +268 -0
  108. package/src/types/security_and_compliance.ts +33 -0
  109. package/src/types/sheets.ts +425 -0
  110. package/src/types/speech_to_text.ts +54 -0
  111. package/src/types/task.ts +1464 -0
  112. package/src/types/tenant.ts +36 -0
  113. package/src/types/translation.ts +52 -0
  114. package/src/types/vc.ts +1197 -0
  115. package/src/types/verification.ts +23 -0
  116. package/src/types/wiki.ts +313 -0
  117. package/src/types/workplace.ts +59 -0
  118. package/src/utils.ts +160 -8
  119. package/src/types/api.ts +0 -30848
  120. package/src/types/internal.ts +0 -84
  121. package/src/types/message/index.ts +0 -97
@@ -0,0 +1,57 @@
1
+ import { Internal } from '../internal'
2
+
3
+ declare module '../internal' {
4
+ interface Internal {
5
+ /**
6
+ * 用户数据维度绑定
7
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/mdm-v1/user_auth_data_relation/bind
8
+ */
9
+ bindMdmUserAuthDataRelation(body: BindMdmUserAuthDataRelationRequest, query?: BindMdmUserAuthDataRelationQuery): Promise<void>
10
+ /**
11
+ * 用户数据维度解绑
12
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/mdm-v1/user_auth_data_relation/unbind
13
+ */
14
+ unbindMdmUserAuthDataRelation(body: UnbindMdmUserAuthDataRelationRequest, query?: UnbindMdmUserAuthDataRelationQuery): Promise<void>
15
+ }
16
+ }
17
+
18
+ export interface BindMdmUserAuthDataRelationRequest {
19
+ /** 数据类型编码 */
20
+ root_dimension_type: string
21
+ /** 数据编码列表 */
22
+ sub_dimension_types: string[]
23
+ /** 授权人的lark id */
24
+ authorized_user_ids: string[]
25
+ /** uams系统中应用id */
26
+ uams_app_id: string
27
+ }
28
+
29
+ export interface BindMdmUserAuthDataRelationQuery {
30
+ /** 此次调用中使用的用户ID的类型 */
31
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
32
+ }
33
+
34
+ export interface UnbindMdmUserAuthDataRelationRequest {
35
+ /** 数据类型编码 */
36
+ root_dimension_type: string
37
+ /** 数据编码列表 */
38
+ sub_dimension_types: string[]
39
+ /** 授权人的lark id */
40
+ authorized_user_ids: string[]
41
+ /** uams系统中应用id */
42
+ uams_app_id: string
43
+ }
44
+
45
+ export interface UnbindMdmUserAuthDataRelationQuery {
46
+ /** 此次调用中使用的用户ID的类型 */
47
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
48
+ }
49
+
50
+ Internal.define({
51
+ '/mdm/v1/user_auth_data_relations/bind': {
52
+ POST: 'bindMdmUserAuthDataRelation',
53
+ },
54
+ '/mdm/v1/user_auth_data_relations/unbind': {
55
+ POST: 'unbindMdmUserAuthDataRelation',
56
+ },
57
+ })
@@ -0,0 +1,46 @@
1
+ import { Minute, Statictics } from '.'
2
+ import { Internal } from '../internal'
3
+
4
+ declare module '../internal' {
5
+ interface Internal {
6
+ /**
7
+ * 获取妙记统计数据
8
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/minutes-v1/minute-statistics/get
9
+ */
10
+ getMinutesMinuteStatistics(minute_token: string, query?: GetMinutesMinuteStatisticsQuery): Promise<GetMinutesMinuteStatisticsResponse>
11
+ /**
12
+ * 获取妙记信息
13
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/minutes-v1/minute/get
14
+ */
15
+ getMinutesMinute(minute_token: string, query?: GetMinutesMinuteQuery): Promise<GetMinutesMinuteResponse>
16
+ }
17
+ }
18
+
19
+ export interface GetMinutesMinuteStatisticsQuery {
20
+ /** 此次调用中使用的用户ID的类型 */
21
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
22
+ }
23
+
24
+ export interface GetMinutesMinuteQuery {
25
+ /** 此次调用中使用的用户ID的类型 */
26
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
27
+ }
28
+
29
+ export interface GetMinutesMinuteStatisticsResponse {
30
+ /** 妙记浏览信息统计 */
31
+ statistics?: Statictics
32
+ }
33
+
34
+ export interface GetMinutesMinuteResponse {
35
+ /** 妙记基本信息 */
36
+ minute?: Minute
37
+ }
38
+
39
+ Internal.define({
40
+ '/minutes/v1/minutes/{minute_token}/statistics': {
41
+ GET: 'getMinutesMinuteStatistics',
42
+ },
43
+ '/minutes/v1/minutes/{minute_token}': {
44
+ GET: 'getMinutesMinute',
45
+ },
46
+ })
@@ -0,0 +1,28 @@
1
+ import { Post } from '.'
2
+ import { Internal } from '../internal'
3
+
4
+ declare module '../internal' {
5
+ interface Internal {
6
+ /**
7
+ * 查询帖子信息
8
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/moments-v1/post/get
9
+ */
10
+ getMomentsPost(post_id: string, query?: GetMomentsPostQuery): Promise<GetMomentsPostResponse>
11
+ }
12
+ }
13
+
14
+ export interface GetMomentsPostQuery {
15
+ /** 此次调用中使用的用户ID的类型 */
16
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
17
+ }
18
+
19
+ export interface GetMomentsPostResponse {
20
+ /** 帖子实体 */
21
+ post?: Post
22
+ }
23
+
24
+ Internal.define({
25
+ '/moments/v1/posts/{post_id}': {
26
+ GET: 'getMomentsPost',
27
+ },
28
+ })
@@ -0,0 +1,261 @@
1
+ import { ContentBlock, OkrBatch, OkrReview, Period, PeriodRule } from '.'
2
+ import { Internal } from '../internal'
3
+
4
+ declare module '../internal' {
5
+ interface Internal {
6
+ /**
7
+ * 创建 OKR 周期
8
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/period/create
9
+ */
10
+ createOkrPeriod(body: CreateOkrPeriodRequest): Promise<CreateOkrPeriodResponse>
11
+ /**
12
+ * 修改 OKR 周期状态
13
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/period/patch
14
+ */
15
+ patchOkrPeriod(period_id: string, body: PatchOkrPeriodRequest): Promise<PatchOkrPeriodResponse>
16
+ /**
17
+ * 获取 OKR 周期列表
18
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/period/list
19
+ */
20
+ listOkrPeriod(query?: Pagination): Paginated<Period>
21
+ /**
22
+ * 获取 OKR 周期规则
23
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/period_rule/list
24
+ */
25
+ listOkrPeriodRule(): Promise<ListOkrPeriodRuleResponse>
26
+ /**
27
+ * 获取用户的 OKR 列表
28
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/user-okr/list
29
+ */
30
+ listOkrUserOkr(user_id: string, query?: ListOkrUserOkrQuery): Promise<ListOkrUserOkrResponse>
31
+ /**
32
+ * 批量获取 OKR
33
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/okr/batch_get
34
+ */
35
+ batchGetOkr(query?: BatchGetOkrQuery): Promise<BatchGetOkrResponse>
36
+ /**
37
+ * 创建 OKR 进展记录
38
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/progress_record/create
39
+ */
40
+ createOkrProgressRecord(body: CreateOkrProgressRecordRequest, query?: CreateOkrProgressRecordQuery): Promise<CreateOkrProgressRecordResponse>
41
+ /**
42
+ * 删除 OKR 进展记录
43
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/progress_record/delete
44
+ */
45
+ deleteOkrProgressRecord(progress_id: string): Promise<void>
46
+ /**
47
+ * 更新 OKR 进展记录
48
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/progress_record/update
49
+ */
50
+ updateOkrProgressRecord(progress_id: string, body: UpdateOkrProgressRecordRequest, query?: UpdateOkrProgressRecordQuery): Promise<UpdateOkrProgressRecordResponse>
51
+ /**
52
+ * 获取 OKR 进展记录
53
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/progress_record/get
54
+ */
55
+ getOkrProgressRecord(progress_id: string, query?: GetOkrProgressRecordQuery): Promise<GetOkrProgressRecordResponse>
56
+ /**
57
+ * 上传进展记录图片
58
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/image/upload
59
+ */
60
+ uploadOkrImage(form: UploadOkrImageForm): Promise<UploadOkrImageResponse>
61
+ /**
62
+ * 查询复盘信息
63
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/review/query
64
+ */
65
+ queryOkrReview(query?: QueryOkrReviewQuery): Promise<QueryOkrReviewResponse>
66
+ }
67
+ }
68
+
69
+ export interface CreateOkrPeriodRequest {
70
+ /** 周期规则 id */
71
+ period_rule_id: string
72
+ /** 周期起始年月 */
73
+ start_month: string
74
+ }
75
+
76
+ export interface PatchOkrPeriodRequest {
77
+ /** 周期显示状态 */
78
+ status: 1 | 2 | 3
79
+ }
80
+
81
+ export interface ListOkrUserOkrQuery {
82
+ /** 此次调用中使用的用户ID的类型 */
83
+ user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id'
84
+ /** 请求列表的偏移,offset>=0 */
85
+ offset: string
86
+ /** 列表长度,0-10 */
87
+ limit: string
88
+ /** 请求OKR的语言版本(比如@的人名),lang=en_us/zh_cn */
89
+ lang?: string
90
+ /** period_id列表,最多10个 */
91
+ period_ids?: string[]
92
+ }
93
+
94
+ export interface BatchGetOkrQuery {
95
+ /** 此次调用中使用的用户ID的类型 */
96
+ user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id'
97
+ /** OKR ID 列表,最多10个 */
98
+ okr_ids: string[]
99
+ /** 请求OKR的语言版本(比如@的人名),lang=en_us/zh_cn,请求 Query中 */
100
+ lang?: string
101
+ }
102
+
103
+ export interface CreateOkrProgressRecordRequest {
104
+ /** 进展来源 */
105
+ source_title: string
106
+ /** 进展来源链接 */
107
+ source_url: string
108
+ /** 目标id,与target_type对应 */
109
+ target_id: string
110
+ /** 目标类型 */
111
+ target_type: 2 | 3
112
+ /** 进展详情 富文本格式 */
113
+ content: ContentBlock
114
+ /** pc进展来源链接 */
115
+ source_url_pc?: string
116
+ /** mobile进展来源链接 */
117
+ source_url_mobile?: string
118
+ }
119
+
120
+ export interface CreateOkrProgressRecordQuery {
121
+ /** 此次调用中使用的用户ID的类型 */
122
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
123
+ }
124
+
125
+ export interface UpdateOkrProgressRecordRequest {
126
+ /** 进展详情 富文本格式 */
127
+ content: ContentBlock
128
+ }
129
+
130
+ export interface UpdateOkrProgressRecordQuery {
131
+ /** 此次调用中使用的用户ID的类型 */
132
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
133
+ }
134
+
135
+ export interface GetOkrProgressRecordQuery {
136
+ /** 此次调用中使用的用户ID的类型 */
137
+ user_id_type?: 'user_id' | 'union_id' | 'open_id'
138
+ }
139
+
140
+ export interface UploadOkrImageForm {
141
+ /** 图片 */
142
+ data: Blob
143
+ /** 图片的目标ID */
144
+ target_id: string
145
+ /** 图片使用的目标类型 */
146
+ target_type: 2 | 3
147
+ }
148
+
149
+ export interface QueryOkrReviewQuery {
150
+ /** 此次调用中使用的用户ID的类型 */
151
+ user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id'
152
+ /** 目标用户id列表,最多5个 */
153
+ user_ids: string[]
154
+ /** period_id列表,最多5个 */
155
+ period_ids: string[]
156
+ }
157
+
158
+ export interface CreateOkrPeriodResponse {
159
+ /** 周期id */
160
+ period_id?: string
161
+ /** 周期起始年月 */
162
+ start_month?: string
163
+ /** 周期结束年月 */
164
+ end_month?: string
165
+ }
166
+
167
+ export interface PatchOkrPeriodResponse {
168
+ /** 周期规则id */
169
+ period_id?: string
170
+ /** 周期显示状态 */
171
+ status?: 1 | 2 | 3
172
+ }
173
+
174
+ export interface ListOkrPeriodRuleResponse {
175
+ /** 指标库列表 */
176
+ period_rules?: PeriodRule[]
177
+ }
178
+
179
+ export interface ListOkrUserOkrResponse {
180
+ /** OKR周期总数 */
181
+ total?: number
182
+ /** OKR 列表 */
183
+ okr_list?: OkrBatch[]
184
+ }
185
+
186
+ export interface BatchGetOkrResponse {
187
+ /** OKR 列表 */
188
+ okr_list?: OkrBatch[]
189
+ }
190
+
191
+ export interface CreateOkrProgressRecordResponse {
192
+ /** OKR 进展ID */
193
+ progress_id?: string
194
+ /** 进展更新时间 毫秒 */
195
+ modify_time?: string
196
+ /** 进展 对应的 Content 详细内容 */
197
+ content?: ContentBlock
198
+ }
199
+
200
+ export interface UpdateOkrProgressRecordResponse {
201
+ /** OKR 进展ID */
202
+ progress_id?: string
203
+ /** 进展更新时间 毫秒 */
204
+ modify_time?: string
205
+ /** 进展 对应的 Content 详细内容 */
206
+ content?: ContentBlock
207
+ }
208
+
209
+ export interface GetOkrProgressRecordResponse {
210
+ /** OKR 进展ID */
211
+ progress_id?: string
212
+ /** 进展更新时间 毫秒 */
213
+ modify_time?: string
214
+ /** 进展 对应的 Content 详细内容 */
215
+ content?: ContentBlock
216
+ }
217
+
218
+ export interface UploadOkrImageResponse {
219
+ /** 图片token */
220
+ file_token?: string
221
+ /** 图片下载链接 */
222
+ url?: string
223
+ }
224
+
225
+ export interface QueryOkrReviewResponse {
226
+ /** OKR复盘 列表 */
227
+ review_list?: OkrReview[]
228
+ }
229
+
230
+ Internal.define({
231
+ '/okr/v1/periods': {
232
+ POST: 'createOkrPeriod',
233
+ GET: { name: 'listOkrPeriod', pagination: { argIndex: 0 } },
234
+ },
235
+ '/okr/v1/periods/{period_id}': {
236
+ PATCH: 'patchOkrPeriod',
237
+ },
238
+ '/okr/v1/period_rules': {
239
+ GET: 'listOkrPeriodRule',
240
+ },
241
+ '/okr/v1/users/{user_id}/okrs': {
242
+ GET: 'listOkrUserOkr',
243
+ },
244
+ '/okr/v1/okrs/batch_get': {
245
+ GET: 'batchGetOkr',
246
+ },
247
+ '/okr/v1/progress_records': {
248
+ POST: 'createOkrProgressRecord',
249
+ },
250
+ '/okr/v1/progress_records/{progress_id}': {
251
+ DELETE: 'deleteOkrProgressRecord',
252
+ PUT: 'updateOkrProgressRecord',
253
+ GET: 'getOkrProgressRecord',
254
+ },
255
+ '/okr/v1/images/upload': {
256
+ POST: { name: 'uploadOkrImage', multipart: true },
257
+ },
258
+ '/okr/v1/reviews/query': {
259
+ GET: 'queryOkrReview',
260
+ },
261
+ })
@@ -0,0 +1,27 @@
1
+ import { Internal } from '../internal'
2
+
3
+ declare module '../internal' {
4
+ interface Internal {
5
+ /**
6
+ * 识别图片中的文字
7
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/optical_char_recognition-v1/image/basic_recognize
8
+ */
9
+ basicRecognizeOpticalCharRecognitionImage(body: BasicRecognizeOpticalCharRecognitionImageRequest): Promise<BasicRecognizeOpticalCharRecognitionImageResponse>
10
+ }
11
+ }
12
+
13
+ export interface BasicRecognizeOpticalCharRecognitionImageRequest {
14
+ /** base64 后的图片数据 */
15
+ image?: string
16
+ }
17
+
18
+ export interface BasicRecognizeOpticalCharRecognitionImageResponse {
19
+ /** 按区域识别,返回文本列表 */
20
+ text_list: string[]
21
+ }
22
+
23
+ Internal.define({
24
+ '/optical_char_recognition/v1/image/basic_recognize': {
25
+ POST: 'basicRecognizeOpticalCharRecognitionImage',
26
+ },
27
+ })
@@ -0,0 +1,61 @@
1
+ import { MaskSession } from '.'
2
+ import { Internal } from '../internal'
3
+
4
+ declare module '../internal' {
5
+ interface Internal {
6
+ /**
7
+ * 批量获取脱敏的用户登录信息
8
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/passport-v1/session/query
9
+ */
10
+ queryPassportSession(body: QueryPassportSessionRequest, query?: QueryPassportSessionQuery): Promise<QueryPassportSessionResponse>
11
+ /**
12
+ * 退出登录
13
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/passport-v1/session/logout
14
+ */
15
+ logoutPassportSession(body: LogoutPassportSessionRequest, query?: LogoutPassportSessionQuery): Promise<void>
16
+ }
17
+ }
18
+
19
+ export interface QueryPassportSessionRequest {
20
+ /** 用户 ID */
21
+ user_ids?: string[]
22
+ }
23
+
24
+ export interface QueryPassportSessionQuery {
25
+ /** 用户id类型 */
26
+ user_id_type?: 'open_id' | 'union_id' | 'user_id'
27
+ }
28
+
29
+ export interface LogoutPassportSessionRequest {
30
+ /** idp 侧的唯一标识 */
31
+ idp_credential_id?: string
32
+ /** 登出的方式 */
33
+ logout_type: 1 | 2 | 3
34
+ /** 登出的客户端类型,默认全部登出,1-桌面端,2-网页端,3-安卓移动端,4-Apple移动端 5-服务端 6-旧版小程序端 8-其他移动端 */
35
+ terminal_type?: number[]
36
+ /** user_id */
37
+ user_id?: string
38
+ /** 登出原因 */
39
+ logout_reason?: number
40
+ /** 需要精确登出的 session 标识符 */
41
+ sid?: string
42
+ }
43
+
44
+ export interface LogoutPassportSessionQuery {
45
+ /** user_id_type */
46
+ user_id_type?: 'open_id' | 'union_id' | 'user_id'
47
+ }
48
+
49
+ export interface QueryPassportSessionResponse {
50
+ /** session信息 */
51
+ mask_sessions?: MaskSession[]
52
+ }
53
+
54
+ Internal.define({
55
+ '/passport/v1/sessions/query': {
56
+ POST: 'queryPassportSession',
57
+ },
58
+ '/passport/v1/sessions/logout': {
59
+ POST: 'logoutPassportSession',
60
+ },
61
+ })
@@ -0,0 +1,69 @@
1
+ import { AcctItem, CostAllocationPlan, CostAllocationReportData, I18nContent, Paygroup } from '.'
2
+ import { Internal, Pagination } from '../internal'
3
+
4
+ declare module '../internal' {
5
+ interface Internal {
6
+ /**
7
+ * 批量查询算薪项
8
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/acct_item/list
9
+ */
10
+ listPayrollAcctItem(query?: Pagination): Paginated<AcctItem>
11
+ /**
12
+ * 查询成本分摊报表汇总数据
13
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/cost_allocation_report/list
14
+ */
15
+ listPayrollCostAllocationReport(query?: ListPayrollCostAllocationReportQuery): Promise<ListPayrollCostAllocationReportResponse>
16
+ /**
17
+ * 批量查询成本分摊方案
18
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/cost_allocation_plan/list
19
+ */
20
+ listPayrollCostAllocationPlan(query?: ListPayrollCostAllocationPlanQuery): Paginated<CostAllocationPlan>
21
+ /**
22
+ * 获取薪资组基本信息
23
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/paygroup/list
24
+ */
25
+ listPayrollPaygroup(query?: Pagination): Paginated<Paygroup>
26
+ }
27
+ }
28
+
29
+ export interface ListPayrollCostAllocationReportQuery extends Pagination {
30
+ /** 成本分摊方案ID */
31
+ cost_allocation_plan_id: string
32
+ /** 期间 */
33
+ pay_period: string
34
+ /** 报表类型 */
35
+ report_type: 0 | 1 | 2
36
+ }
37
+
38
+ export interface ListPayrollCostAllocationPlanQuery extends Pagination {
39
+ /** 期间 */
40
+ pay_period: string
41
+ }
42
+
43
+ export interface ListPayrollCostAllocationReportResponse {
44
+ /** 期间 */
45
+ pay_period?: string
46
+ /** 下一页开始 */
47
+ page_token?: string
48
+ /** 是否还有更多数据 */
49
+ has_more?: boolean
50
+ /** 报表名称 */
51
+ cost_allocation_report_names?: I18nContent[]
52
+ /** 汇总数据 */
53
+ cost_allocation_report_datas?: CostAllocationReportData[]
54
+ }
55
+
56
+ Internal.define({
57
+ '/payroll/v1/acct_items': {
58
+ GET: { name: 'listPayrollAcctItem', pagination: { argIndex: 0 } },
59
+ },
60
+ '/payroll/v1/cost_allocation_reports': {
61
+ GET: 'listPayrollCostAllocationReport',
62
+ },
63
+ '/payroll/v1/cost_allocation_plans': {
64
+ GET: { name: 'listPayrollCostAllocationPlan', pagination: { argIndex: 0 } },
65
+ },
66
+ '/payroll/v1/paygroups': {
67
+ GET: { name: 'listPayrollPaygroup', pagination: { argIndex: 0 } },
68
+ },
69
+ })