@satorijs/adapter-lark 3.9.0 → 3.9.2

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 (89) hide show
  1. package/lib/index.cjs +1091 -27
  2. package/lib/internal.d.ts +2 -3
  3. package/lib/types/acs.d.ts +19 -19
  4. package/lib/types/admin.d.ts +58 -32
  5. package/lib/types/aily.d.ts +52 -52
  6. package/lib/types/apaas.d.ts +96 -96
  7. package/lib/types/api.d.ts +14 -1
  8. package/lib/types/application.d.ts +153 -69
  9. package/lib/types/approval.d.ts +186 -154
  10. package/lib/types/attendance.d.ts +395 -353
  11. package/lib/types/auth.d.ts +18 -18
  12. package/lib/types/authen.d.ts +24 -24
  13. package/lib/types/baike.d.ts +42 -42
  14. package/lib/types/bitable.d.ts +276 -192
  15. package/lib/types/calendar.d.ts +144 -144
  16. package/lib/types/cardkit.d.ts +8 -8
  17. package/lib/types/contact.d.ts +209 -137
  18. package/lib/types/corehr.d.ts +761 -613
  19. package/lib/types/document_ai.d.ts +68 -68
  20. package/lib/types/docx.d.ts +103 -95
  21. package/lib/types/drive.d.ts +237 -229
  22. package/lib/types/ehr.d.ts +26 -2
  23. package/lib/types/helpdesk.d.ts +156 -148
  24. package/lib/types/hire.d.ts +954 -510
  25. package/lib/types/im.d.ts +446 -446
  26. package/lib/types/index.d.ts +72 -30
  27. package/lib/types/lingo.d.ts +28 -28
  28. package/lib/types/mail.d.ts +192 -192
  29. package/lib/types/minutes.d.ts +4 -4
  30. package/lib/types/okr.d.ts +86 -58
  31. package/lib/types/passport.d.ts +13 -5
  32. package/lib/types/payroll.d.ts +13 -5
  33. package/lib/types/performance.d.ts +85 -79
  34. package/lib/types/personal_settings.d.ts +12 -12
  35. package/lib/types/report.d.ts +11 -5
  36. package/lib/types/search.d.ts +48 -24
  37. package/lib/types/sheets.d.ts +64 -64
  38. package/lib/types/speech_to_text.d.ts +4 -4
  39. package/lib/types/task.d.ts +191 -185
  40. package/lib/types/translation.d.ts +4 -4
  41. package/lib/types/vc.d.ts +335 -155
  42. package/lib/types/wiki.d.ts +48 -48
  43. package/package.json +1 -1
  44. package/src/internal.ts +3 -4
  45. package/src/types/acs.ts +24 -24
  46. package/src/types/admin.ts +69 -39
  47. package/src/types/aily.ts +61 -61
  48. package/src/types/apaas.ts +113 -113
  49. package/src/types/application.ts +177 -83
  50. package/src/types/approval.ts +210 -174
  51. package/src/types/attendance.ts +466 -421
  52. package/src/types/auth.ts +20 -20
  53. package/src/types/authen.ts +28 -28
  54. package/src/types/baike.ts +55 -55
  55. package/src/types/bitable.ts +321 -235
  56. package/src/types/calendar.ts +167 -167
  57. package/src/types/cardkit.ts +10 -10
  58. package/src/types/contact.ts +251 -169
  59. package/src/types/corehr.ts +905 -736
  60. package/src/types/document_ai.ts +85 -85
  61. package/src/types/docx.ts +117 -108
  62. package/src/types/drive.ts +299 -290
  63. package/src/types/ehr.ts +28 -2
  64. package/src/types/helpdesk.ts +182 -173
  65. package/src/types/hire.ts +1081 -591
  66. package/src/types/im.ts +521 -521
  67. package/src/types/index.ts +73 -30
  68. package/src/types/lingo.ts +36 -36
  69. package/src/types/mail.ts +215 -215
  70. package/src/types/minutes.ts +5 -5
  71. package/src/types/okr.ts +98 -66
  72. package/src/types/passport.ts +15 -6
  73. package/src/types/payroll.ts +15 -6
  74. package/src/types/performance.ts +98 -91
  75. package/src/types/personal_settings.ts +15 -15
  76. package/src/types/report.ts +13 -6
  77. package/src/types/search.ts +57 -29
  78. package/src/types/sheets.ts +80 -80
  79. package/src/types/speech_to_text.ts +5 -5
  80. package/src/types/task.ts +238 -231
  81. package/src/types/translation.ts +5 -5
  82. package/src/types/vc.ts +386 -186
  83. package/src/types/wiki.ts +59 -59
  84. package/src/utils.ts +11 -6
  85. package/lib/index.cjs.map +0 -6
  86. package/lib/types/guild.d.ts +0 -59
  87. package/lib/types/message/asset.d.ts +0 -40
  88. package/lib/types/user.d.ts +0 -78
  89. package/lib/types/utils.d.ts +0 -9
@@ -34,12 +34,24 @@ export interface TenantAccessTokenInternalAuthRequest {
34
34
  /** 应用秘钥,创建应用后获得 */
35
35
  app_secret: string;
36
36
  }
37
+ export interface TenantAccessTokenInternalAuthResponse extends BaseResponse {
38
+ /** 访问 token */
39
+ tenant_access_token?: string;
40
+ /** app_access_token 过期时间 */
41
+ expire?: number;
42
+ }
37
43
  export interface AppAccessTokenInternalAuthRequest {
38
44
  /** 应用唯一标识,创建应用后获得 */
39
45
  app_id: string;
40
46
  /** 应用秘钥,创建应用后获得 */
41
47
  app_secret: string;
42
48
  }
49
+ export interface AppAccessTokenInternalAuthResponse extends BaseResponse {
50
+ /** 访问 token */
51
+ app_access_token?: string;
52
+ /** app_access_token 过期时间 */
53
+ expire?: number;
54
+ }
43
55
  export interface AppTicketResendAuthRequest {
44
56
  /** 应用唯一标识,创建应用后获得 */
45
57
  app_id: string;
@@ -54,30 +66,18 @@ export interface AppAccessTokenAuthRequest {
54
66
  /** 平台定时推送给应用的临时凭证,通过事件监听机制获得 */
55
67
  app_ticket: string;
56
68
  }
57
- export interface TenantAccessTokenAuthRequest {
58
- /** 应用唯一标识,创建应用 */
59
- app_access_token: string;
60
- /** 应用秘钥,创建应用后获得 */
61
- tenant_key: string;
62
- }
63
- export interface TenantAccessTokenInternalAuthResponse extends BaseResponse {
64
- /** 访问 token */
65
- tenant_access_token?: string;
66
- /** app_access_token 过期时间 */
67
- expire?: number;
68
- }
69
- export interface AppAccessTokenInternalAuthResponse extends BaseResponse {
70
- /** 访问 token */
71
- app_access_token?: string;
72
- /** app_access_token 过期时间 */
73
- expire?: number;
74
- }
75
69
  export interface AppAccessTokenAuthResponse extends BaseResponse {
76
70
  /** 访问 token */
77
71
  app_access_token?: string;
78
72
  /** app_access_token 过期时间 */
79
73
  expire?: number;
80
74
  }
75
+ export interface TenantAccessTokenAuthRequest {
76
+ /** 应用唯一标识,创建应用 */
77
+ app_access_token: string;
78
+ /** 应用秘钥,创建应用后获得 */
79
+ tenant_key: string;
80
+ }
81
81
  export interface TenantAccessTokenAuthResponse extends BaseResponse {
82
82
  /** 访问 token */
83
83
  tenant_access_token?: string;
@@ -27,30 +27,6 @@ declare module '../internal' {
27
27
  createAuthenRefreshAccessToken(body: CreateAuthenRefreshAccessTokenRequest): Promise<CreateAuthenRefreshAccessTokenResponse>;
28
28
  }
29
29
  }
30
- export interface CreateAuthenOidcAccessTokenRequest {
31
- /** 授权类型,**固定值** */
32
- grant_type: string;
33
- /** 登录预授权码 */
34
- code: string;
35
- }
36
- export interface CreateAuthenOidcRefreshAccessTokenRequest {
37
- /** 授权类型,**固定值**: */
38
- grant_type: string;
39
- /** 刷新 `user_access_token` 需要的凭证<br>获取user_access_token`接口和本接口均返回 `refresh_token`,**每次请求,请注意使用最新获取到的`refresh_token`** */
40
- refresh_token: string;
41
- }
42
- export interface CreateAuthenAccessTokenRequest {
43
- /** 授权类型,**固定值** */
44
- grant_type: string;
45
- /** 登录预授权码,调用[获取登录预授权码](https://open.feishu.cn/document/ukTMukTMukTM/ukzN4UjL5cDO14SO3gTN)接口获取 */
46
- code: string;
47
- }
48
- export interface CreateAuthenRefreshAccessTokenRequest {
49
- /** 授权类型,**固定值**: */
50
- grant_type: string;
51
- /** 刷新 `user_access_token` 需要的凭证<br>获取user_access_token`接口和本接口均返回 `refresh_token`,**每次请求,请注意使用最新获取到的`refresh_token`** */
52
- refresh_token: string;
53
- }
54
30
  export interface GetAuthenUserInfoResponse {
55
31
  /** 用户姓名 */
56
32
  name?: string;
@@ -81,6 +57,12 @@ export interface GetAuthenUserInfoResponse {
81
57
  /** 用户工号 */
82
58
  employee_no?: string;
83
59
  }
60
+ export interface CreateAuthenOidcAccessTokenRequest {
61
+ /** 授权类型,**固定值** */
62
+ grant_type: string;
63
+ /** 登录预授权码 */
64
+ code: string;
65
+ }
84
66
  export interface CreateAuthenOidcAccessTokenResponse {
85
67
  /** user_access_token,用于获取用户资源和访问某些open api */
86
68
  access_token: string;
@@ -95,6 +77,12 @@ export interface CreateAuthenOidcAccessTokenResponse {
95
77
  /** 用户授予app的权限全集 */
96
78
  scope?: string;
97
79
  }
80
+ export interface CreateAuthenOidcRefreshAccessTokenRequest {
81
+ /** 授权类型,**固定值**: */
82
+ grant_type: string;
83
+ /** 刷新 `user_access_token` 需要的凭证<br>获取user_access_token`接口和本接口均返回 `refresh_token`,**每次请求,请注意使用最新获取到的`refresh_token`** */
84
+ refresh_token: string;
85
+ }
98
86
  export interface CreateAuthenOidcRefreshAccessTokenResponse {
99
87
  /** user_access_token,用于获取用户资源和访问某些open api */
100
88
  access_token: string;
@@ -109,6 +97,12 @@ export interface CreateAuthenOidcRefreshAccessTokenResponse {
109
97
  /** 用户授予app的权限全集 */
110
98
  scope?: string;
111
99
  }
100
+ export interface CreateAuthenAccessTokenRequest {
101
+ /** 授权类型,**固定值** */
102
+ grant_type: string;
103
+ /** 登录预授权码,调用[获取登录预授权码](https://open.feishu.cn/document/ukTMukTMukTM/ukzN4UjL5cDO14SO3gTN)接口获取 */
104
+ code: string;
105
+ }
112
106
  export interface CreateAuthenAccessTokenResponse {
113
107
  /** user_access_token,用于获取用户资源 */
114
108
  access_token?: string;
@@ -149,6 +143,12 @@ export interface CreateAuthenAccessTokenResponse {
149
143
  /** 用户当前登录态session的唯一标识,为空则不返回 */
150
144
  sid?: string;
151
145
  }
146
+ export interface CreateAuthenRefreshAccessTokenRequest {
147
+ /** 授权类型,**固定值**: */
148
+ grant_type: string;
149
+ /** 刷新 `user_access_token` 需要的凭证<br>获取user_access_token`接口和本接口均返回 `refresh_token`,**每次请求,请注意使用最新获取到的`refresh_token`** */
150
+ refresh_token: string;
151
+ }
152
152
  export interface CreateAuthenRefreshAccessTokenResponse {
153
153
  /** user_access_token,用于获取用户资源 */
154
154
  access_token?: string;
@@ -31,7 +31,7 @@ declare module '../internal' {
31
31
  * 获取词条列表
32
32
  * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/list
33
33
  */
34
- listBaikeEntity(query?: ListBaikeEntityQuery): Promise<ListBaikeEntityResponse>;
34
+ listBaikeEntity(query?: ListBaikeEntityQuery): Promise<ListBaikeEntityResponse> & AsyncIterableIterator<Entity>;
35
35
  /**
36
36
  * 精准搜索词条
37
37
  * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/match
@@ -41,7 +41,7 @@ declare module '../internal' {
41
41
  * 模糊搜索词条
42
42
  * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/search
43
43
  */
44
- searchBaikeEntity(body: SearchBaikeEntityRequest, query?: SearchBaikeEntityQuery): Promise<SearchBaikeEntityResponse>;
44
+ searchBaikeEntity(body: SearchBaikeEntityRequest, query?: SearchBaikeEntityQuery): Promise<SearchBaikeEntityResponse> & AsyncIterableIterator<Entity>;
45
45
  /**
46
46
  * 词条高亮
47
47
  * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/highlight
@@ -56,7 +56,7 @@ declare module '../internal' {
56
56
  * 获取词典分类
57
57
  * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/classification/list
58
58
  */
59
- listBaikeClassification(query?: Pagination): Promise<ListBaikeClassificationResponse>;
59
+ listBaikeClassification(query?: Pagination): Promise<ListBaikeClassificationResponse> & AsyncIterableIterator<Classification>;
60
60
  /**
61
61
  * 上传图片
62
62
  * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/file/upload
@@ -89,6 +89,9 @@ export interface CreateBaikeDraftQuery {
89
89
  /** 此次调用中使用的用户ID的类型 */
90
90
  user_id_type?: 'user_id' | 'union_id' | 'open_id';
91
91
  }
92
+ export interface CreateBaikeDraftResponse {
93
+ draft?: Draft;
94
+ }
92
95
  export interface UpdateBaikeDraftRequest {
93
96
  /** 实体词 Id */
94
97
  id?: string;
@@ -107,6 +110,9 @@ export interface UpdateBaikeDraftQuery {
107
110
  /** 此次调用中使用的用户ID的类型 */
108
111
  user_id_type?: 'user_id' | 'union_id' | 'open_id';
109
112
  }
113
+ export interface UpdateBaikeDraftResponse {
114
+ draft?: Draft;
115
+ }
110
116
  export interface CreateBaikeEntityRequest {
111
117
  /** 词条名 */
112
118
  main_keys: Term[];
@@ -125,6 +131,9 @@ export interface CreateBaikeEntityQuery {
125
131
  /** 此次调用中使用的用户ID的类型 */
126
132
  user_id_type?: 'user_id' | 'union_id' | 'open_id';
127
133
  }
134
+ export interface CreateBaikeEntityResponse {
135
+ entity?: Entity;
136
+ }
128
137
  export interface UpdateBaikeEntityRequest {
129
138
  /** 词条名 */
130
139
  main_keys: Term[];
@@ -143,6 +152,9 @@ export interface UpdateBaikeEntityQuery {
143
152
  /** 此次调用中使用的用户ID的类型 */
144
153
  user_id_type?: 'user_id' | 'union_id' | 'open_id';
145
154
  }
155
+ export interface UpdateBaikeEntityResponse {
156
+ entity?: Entity;
157
+ }
146
158
  export interface GetBaikeEntityQuery {
147
159
  /** 外部系统 */
148
160
  provider?: string;
@@ -151,16 +163,29 @@ export interface GetBaikeEntityQuery {
151
163
  /** 此次调用中使用的用户ID的类型 */
152
164
  user_id_type?: 'user_id' | 'union_id' | 'open_id';
153
165
  }
166
+ export interface GetBaikeEntityResponse {
167
+ /** 实体词 */
168
+ entity?: Entity;
169
+ }
154
170
  export interface ListBaikeEntityQuery extends Pagination {
155
171
  /** 相关外部系统【可用来过滤词条数据】 */
156
172
  provider?: string;
157
173
  /** 此次调用中使用的用户ID的类型 */
158
174
  user_id_type?: 'user_id' | 'union_id' | 'open_id';
159
175
  }
176
+ export interface ListBaikeEntityResponse {
177
+ entities?: Entity[];
178
+ /** 分页标记,当还有下一页时会返回新的 page_token,否则 page_token 为空 */
179
+ page_token?: string;
180
+ }
160
181
  export interface MatchBaikeEntityRequest {
161
182
  /** 搜索关键词,将与词条名、别名进行精准匹配 */
162
183
  word: string;
163
184
  }
185
+ export interface MatchBaikeEntityResponse {
186
+ /** 匹配结果 */
187
+ results?: MatchInfo[];
188
+ }
164
189
  export interface SearchBaikeEntityRequest {
165
190
  /** 搜索关键词 */
166
191
  query?: string;
@@ -175,55 +200,24 @@ export interface SearchBaikeEntityQuery extends Pagination {
175
200
  /** 此次调用中使用的用户ID的类型 */
176
201
  user_id_type?: 'user_id' | 'union_id' | 'open_id';
177
202
  }
178
- export interface HighlightBaikeEntityRequest {
179
- /** 需要识别百科词条的内容(不超过1000字) */
180
- text: string;
181
- }
182
- export interface ExtractBaikeEntityRequest {
183
- /** 需要被提取百科实体词的文本(不会过滤租户已成为百科词条的内容) */
184
- text?: string;
185
- }
186
- export interface UploadBaikeFileForm {
187
- /** 文件名称,当前仅支持上传图片且图片格式为以下六种:icon、bmp、gif、png、jpeg、webp */
188
- name: string;
189
- /** 二进制文件内容,高宽像素在 320-4096 像素之间,大小在 3KB-10MB 的图片 */
190
- file: Blob;
191
- }
192
- export interface CreateBaikeDraftResponse {
193
- draft?: Draft;
194
- }
195
- export interface UpdateBaikeDraftResponse {
196
- draft?: Draft;
197
- }
198
- export interface CreateBaikeEntityResponse {
199
- entity?: Entity;
200
- }
201
- export interface UpdateBaikeEntityResponse {
202
- entity?: Entity;
203
- }
204
- export interface GetBaikeEntityResponse {
205
- /** 实体词 */
206
- entity?: Entity;
207
- }
208
- export interface ListBaikeEntityResponse {
209
- entities?: Entity[];
210
- /** 分页标记,当还有下一页时会返回新的 page_token,否则 page_token 为空 */
211
- page_token?: string;
212
- }
213
- export interface MatchBaikeEntityResponse {
214
- /** 匹配结果 */
215
- results?: MatchInfo[];
216
- }
217
203
  export interface SearchBaikeEntityResponse {
218
204
  /** 数据数组 */
219
205
  entities?: Entity[];
220
206
  /** 分页标记,当还有下一页时会返回新的 page_token,否则 page_token 为空 */
221
207
  page_token?: string;
222
208
  }
209
+ export interface HighlightBaikeEntityRequest {
210
+ /** 需要识别百科词条的内容(不超过1000字) */
211
+ text: string;
212
+ }
223
213
  export interface HighlightBaikeEntityResponse {
224
214
  /** 返回识别到的实体词信息 */
225
215
  phrases?: Phrase[];
226
216
  }
217
+ export interface ExtractBaikeEntityRequest {
218
+ /** 需要被提取百科实体词的文本(不会过滤租户已成为百科词条的内容) */
219
+ text?: string;
220
+ }
227
221
  export interface ExtractBaikeEntityResponse {
228
222
  /** 文本中可能的成为百科词条的实体词 */
229
223
  entity_word: EntityWord[];
@@ -233,6 +227,12 @@ export interface ListBaikeClassificationResponse {
233
227
  /** 分页标记,当还有下一页时会返回新的 page_token,否则 page_token 为空 */
234
228
  page_token?: string;
235
229
  }
230
+ export interface UploadBaikeFileForm {
231
+ /** 文件名称,当前仅支持上传图片且图片格式为以下六种:icon、bmp、gif、png、jpeg、webp */
232
+ name: string;
233
+ /** 二进制文件内容,高宽像素在 320-4096 像素之间,大小在 3KB-10MB 的图片 */
234
+ file: Blob;
235
+ }
236
236
  export interface UploadBaikeFileResponse {
237
237
  /** 文件 token */
238
238
  file_token?: string;