@satorijs/adapter-lark 3.9.1 → 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.
- package/lib/index.cjs +1077 -13
- package/lib/types/acs.d.ts +19 -19
- package/lib/types/admin.d.ts +58 -32
- package/lib/types/aily.d.ts +52 -52
- package/lib/types/apaas.d.ts +96 -96
- package/lib/types/application.d.ts +151 -67
- package/lib/types/approval.d.ts +182 -150
- package/lib/types/attendance.d.ts +395 -353
- package/lib/types/auth.d.ts +18 -18
- package/lib/types/authen.d.ts +24 -24
- package/lib/types/baike.d.ts +42 -42
- package/lib/types/bitable.d.ts +268 -184
- package/lib/types/calendar.d.ts +144 -144
- package/lib/types/cardkit.d.ts +8 -8
- package/lib/types/contact.d.ts +209 -137
- package/lib/types/corehr.d.ts +760 -620
- package/lib/types/document_ai.d.ts +68 -68
- package/lib/types/docx.d.ts +103 -95
- package/lib/types/drive.d.ts +236 -236
- package/lib/types/ehr.d.ts +26 -2
- package/lib/types/helpdesk.d.ts +155 -155
- package/lib/types/hire.d.ts +954 -510
- package/lib/types/im.d.ts +446 -446
- package/lib/types/index.d.ts +72 -30
- package/lib/types/lingo.d.ts +28 -28
- package/lib/types/mail.d.ts +192 -192
- package/lib/types/minutes.d.ts +4 -4
- package/lib/types/okr.d.ts +86 -58
- package/lib/types/passport.d.ts +13 -5
- package/lib/types/payroll.d.ts +13 -5
- package/lib/types/performance.d.ts +85 -79
- package/lib/types/personal_settings.d.ts +12 -12
- package/lib/types/report.d.ts +11 -5
- package/lib/types/search.d.ts +48 -24
- package/lib/types/sheets.d.ts +64 -64
- package/lib/types/speech_to_text.d.ts +4 -4
- package/lib/types/task.d.ts +191 -185
- package/lib/types/translation.d.ts +4 -4
- package/lib/types/vc.d.ts +335 -155
- package/lib/types/wiki.d.ts +48 -48
- package/package.json +1 -1
- package/src/internal.ts +1 -1
- package/src/types/acs.ts +24 -24
- package/src/types/admin.ts +69 -39
- package/src/types/aily.ts +61 -61
- package/src/types/apaas.ts +113 -113
- package/src/types/application.ts +173 -79
- package/src/types/approval.ts +202 -166
- package/src/types/attendance.ts +466 -421
- package/src/types/auth.ts +20 -20
- package/src/types/authen.ts +28 -28
- package/src/types/baike.ts +55 -55
- package/src/types/bitable.ts +305 -219
- package/src/types/calendar.ts +167 -167
- package/src/types/cardkit.ts +10 -10
- package/src/types/contact.ts +251 -169
- package/src/types/corehr.ts +903 -743
- package/src/types/document_ai.ts +85 -85
- package/src/types/docx.ts +117 -108
- package/src/types/drive.ts +298 -298
- package/src/types/ehr.ts +28 -2
- package/src/types/helpdesk.ts +181 -181
- package/src/types/hire.ts +1081 -591
- package/src/types/im.ts +521 -521
- package/src/types/index.ts +73 -30
- package/src/types/lingo.ts +36 -36
- package/src/types/mail.ts +215 -215
- package/src/types/minutes.ts +5 -5
- package/src/types/okr.ts +98 -66
- package/src/types/passport.ts +15 -6
- package/src/types/payroll.ts +15 -6
- package/src/types/performance.ts +98 -91
- package/src/types/personal_settings.ts +15 -15
- package/src/types/report.ts +13 -6
- package/src/types/search.ts +57 -29
- package/src/types/sheets.ts +80 -80
- package/src/types/speech_to_text.ts +5 -5
- package/src/types/task.ts +238 -231
- package/src/types/translation.ts +5 -5
- package/src/types/vc.ts +386 -186
- package/src/types/wiki.ts +59 -59
- package/src/utils.ts +11 -6
package/src/types/wiki.ts
CHANGED
|
@@ -96,6 +96,11 @@ export interface GetWikiSpaceQuery {
|
|
|
96
96
|
lang?: 'zh' | 'id' | 'de' | 'en' | 'es' | 'fr' | 'it' | 'pt' | 'vi' | 'ru' | 'hi' | 'th' | 'ko' | 'ja' | 'zh-HK' | 'zh-TW'
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
+
export interface GetWikiSpaceResponse {
|
|
100
|
+
/** 知识空间 */
|
|
101
|
+
space?: Space
|
|
102
|
+
}
|
|
103
|
+
|
|
99
104
|
export interface CreateWikiSpaceRequest {
|
|
100
105
|
/** 知识空间名称 */
|
|
101
106
|
name?: string
|
|
@@ -105,6 +110,11 @@ export interface CreateWikiSpaceRequest {
|
|
|
105
110
|
open_sharing?: 'open' | 'closed'
|
|
106
111
|
}
|
|
107
112
|
|
|
113
|
+
export interface CreateWikiSpaceResponse {
|
|
114
|
+
/** 知识空间信息 */
|
|
115
|
+
space?: Space
|
|
116
|
+
}
|
|
117
|
+
|
|
108
118
|
export interface CreateWikiSpaceMemberRequest {
|
|
109
119
|
/** 知识库协作者 ID 类型 */
|
|
110
120
|
member_type: string
|
|
@@ -119,6 +129,11 @@ export interface CreateWikiSpaceMemberQuery {
|
|
|
119
129
|
need_notification?: boolean
|
|
120
130
|
}
|
|
121
131
|
|
|
132
|
+
export interface CreateWikiSpaceMemberResponse {
|
|
133
|
+
/** 知识库协作者 */
|
|
134
|
+
member?: Member
|
|
135
|
+
}
|
|
136
|
+
|
|
122
137
|
export interface DeleteWikiSpaceMemberRequest {
|
|
123
138
|
/** 知识库协作者 ID 类型 */
|
|
124
139
|
member_type: string
|
|
@@ -128,6 +143,11 @@ export interface DeleteWikiSpaceMemberRequest {
|
|
|
128
143
|
type?: 'user' | 'chat' | 'department'
|
|
129
144
|
}
|
|
130
145
|
|
|
146
|
+
export interface DeleteWikiSpaceMemberResponse {
|
|
147
|
+
/** 成员信息 */
|
|
148
|
+
member: Member
|
|
149
|
+
}
|
|
150
|
+
|
|
131
151
|
export interface UpdateWikiSpaceSettingRequest {
|
|
132
152
|
/** 谁可以创建空间的一级页面: "admin_and_member" = 管理员和成员 "admin" - 仅管理员 */
|
|
133
153
|
create_setting?: string
|
|
@@ -137,6 +157,11 @@ export interface UpdateWikiSpaceSettingRequest {
|
|
|
137
157
|
comment_setting?: string
|
|
138
158
|
}
|
|
139
159
|
|
|
160
|
+
export interface UpdateWikiSpaceSettingResponse {
|
|
161
|
+
/** 空间设置 */
|
|
162
|
+
setting?: Setting
|
|
163
|
+
}
|
|
164
|
+
|
|
140
165
|
export interface CreateWikiSpaceNodeRequest {
|
|
141
166
|
/** 文档类型,对于快捷方式,该字段是对应的实体的obj_type。 */
|
|
142
167
|
obj_type: 'doc' | 'sheet' | 'mindnote' | 'bitable' | 'file' | 'docx' | 'slides'
|
|
@@ -150,6 +175,11 @@ export interface CreateWikiSpaceNodeRequest {
|
|
|
150
175
|
title?: string
|
|
151
176
|
}
|
|
152
177
|
|
|
178
|
+
export interface CreateWikiSpaceNodeResponse {
|
|
179
|
+
/** 节点 */
|
|
180
|
+
node?: Node
|
|
181
|
+
}
|
|
182
|
+
|
|
153
183
|
export interface GetNodeWikiSpaceQuery {
|
|
154
184
|
/** 文档的wiki token */
|
|
155
185
|
token: string
|
|
@@ -157,6 +187,11 @@ export interface GetNodeWikiSpaceQuery {
|
|
|
157
187
|
obj_type?: 'doc' | 'docx' | 'sheet' | 'mindnote' | 'bitable' | 'file' | 'slides' | 'wiki'
|
|
158
188
|
}
|
|
159
189
|
|
|
190
|
+
export interface GetNodeWikiSpaceResponse {
|
|
191
|
+
/** 节点信息 */
|
|
192
|
+
node?: Node
|
|
193
|
+
}
|
|
194
|
+
|
|
160
195
|
export interface ListWikiSpaceNodeQuery extends Pagination {
|
|
161
196
|
/** 父节点token */
|
|
162
197
|
parent_node_token?: string
|
|
@@ -169,6 +204,11 @@ export interface MoveWikiSpaceNodeRequest {
|
|
|
169
204
|
target_space_id?: string
|
|
170
205
|
}
|
|
171
206
|
|
|
207
|
+
export interface MoveWikiSpaceNodeResponse {
|
|
208
|
+
/** 移动后的节点信息 */
|
|
209
|
+
node?: Node
|
|
210
|
+
}
|
|
211
|
+
|
|
172
212
|
export interface UpdateTitleWikiSpaceNodeRequest {
|
|
173
213
|
/** 节点新标题 */
|
|
174
214
|
title: string
|
|
@@ -183,6 +223,11 @@ export interface CopyWikiSpaceNodeRequest {
|
|
|
183
223
|
title?: string
|
|
184
224
|
}
|
|
185
225
|
|
|
226
|
+
export interface CopyWikiSpaceNodeResponse {
|
|
227
|
+
/** copy后的节点 */
|
|
228
|
+
node: Node
|
|
229
|
+
}
|
|
230
|
+
|
|
186
231
|
export interface MoveDocsToWikiWikiSpaceNodeRequest {
|
|
187
232
|
/** 节点的父亲token */
|
|
188
233
|
parent_wiki_token?: string
|
|
@@ -194,65 +239,6 @@ export interface MoveDocsToWikiWikiSpaceNodeRequest {
|
|
|
194
239
|
apply?: boolean
|
|
195
240
|
}
|
|
196
241
|
|
|
197
|
-
export interface GetWikiTaskQuery {
|
|
198
|
-
/** 任务类型 */
|
|
199
|
-
task_type: 'move'
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
export interface SearchWikiNodeRequest {
|
|
203
|
-
/** 搜索关键词 */
|
|
204
|
-
query: string
|
|
205
|
-
/** 文档所属的知识空间ID,为空搜索所有 wiki */
|
|
206
|
-
space_id?: string
|
|
207
|
-
/** wiki token,不为空搜索该节点及其所有子节点,为空搜索所有 wiki(根据 space_id 选择 space) */
|
|
208
|
-
node_id?: string
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
export interface GetWikiSpaceResponse {
|
|
212
|
-
/** 知识空间 */
|
|
213
|
-
space?: Space
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
export interface CreateWikiSpaceResponse {
|
|
217
|
-
/** 知识空间信息 */
|
|
218
|
-
space?: Space
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
export interface CreateWikiSpaceMemberResponse {
|
|
222
|
-
/** 知识库协作者 */
|
|
223
|
-
member?: Member
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
export interface DeleteWikiSpaceMemberResponse {
|
|
227
|
-
/** 成员信息 */
|
|
228
|
-
member: Member
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
export interface UpdateWikiSpaceSettingResponse {
|
|
232
|
-
/** 空间设置 */
|
|
233
|
-
setting?: Setting
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
export interface CreateWikiSpaceNodeResponse {
|
|
237
|
-
/** 节点 */
|
|
238
|
-
node?: Node
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
export interface GetNodeWikiSpaceResponse {
|
|
242
|
-
/** 节点信息 */
|
|
243
|
-
node?: Node
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
export interface MoveWikiSpaceNodeResponse {
|
|
247
|
-
/** 移动后的节点信息 */
|
|
248
|
-
node?: Node
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
export interface CopyWikiSpaceNodeResponse {
|
|
252
|
-
/** copy后的节点 */
|
|
253
|
-
node: Node
|
|
254
|
-
}
|
|
255
|
-
|
|
256
242
|
export interface MoveDocsToWikiWikiSpaceNodeResponse {
|
|
257
243
|
/** 移动后的知识库token */
|
|
258
244
|
wiki_token?: string
|
|
@@ -262,11 +248,25 @@ export interface MoveDocsToWikiWikiSpaceNodeResponse {
|
|
|
262
248
|
applied?: boolean
|
|
263
249
|
}
|
|
264
250
|
|
|
251
|
+
export interface GetWikiTaskQuery {
|
|
252
|
+
/** 任务类型 */
|
|
253
|
+
task_type: 'move'
|
|
254
|
+
}
|
|
255
|
+
|
|
265
256
|
export interface GetWikiTaskResponse {
|
|
266
257
|
/** 任务结果 */
|
|
267
258
|
task: TaskResult
|
|
268
259
|
}
|
|
269
260
|
|
|
261
|
+
export interface SearchWikiNodeRequest {
|
|
262
|
+
/** 搜索关键词 */
|
|
263
|
+
query: string
|
|
264
|
+
/** 文档所属的知识空间ID,为空搜索所有 wiki */
|
|
265
|
+
space_id?: string
|
|
266
|
+
/** wiki token,不为空搜索该节点及其所有子节点,为空搜索所有 wiki(根据 space_id 选择 space) */
|
|
267
|
+
node_id?: string
|
|
268
|
+
}
|
|
269
|
+
|
|
270
270
|
Internal.define({
|
|
271
271
|
'/wiki/v2/spaces': {
|
|
272
272
|
GET: { name: 'listWikiSpace', pagination: { argIndex: 0 } },
|
package/src/utils.ts
CHANGED
|
@@ -250,7 +250,7 @@ export async function adaptSession<C extends Context>(bot: LarkBot<C>, body: Eve
|
|
|
250
250
|
if (body.event.action.value?._satori_type === 'command') {
|
|
251
251
|
session.type = 'interaction/command'
|
|
252
252
|
let content = body.event.action.value.content
|
|
253
|
-
const args = [], options = Object.create(null)
|
|
253
|
+
const args: any[] = [], options = Object.create(null)
|
|
254
254
|
for (const [key, value] of Object.entries(body.event.action.form_value ?? {})) {
|
|
255
255
|
if (+key * 0 === 0) {
|
|
256
256
|
args[+key] = value
|
|
@@ -258,15 +258,20 @@ export async function adaptSession<C extends Context>(bot: LarkBot<C>, body: Eve
|
|
|
258
258
|
options[key] = value
|
|
259
259
|
}
|
|
260
260
|
}
|
|
261
|
-
|
|
262
|
-
if (
|
|
263
|
-
|
|
261
|
+
const toArg = (value: any) => {
|
|
262
|
+
if (typeof value === 'string') {
|
|
263
|
+
return `'${value}'`
|
|
264
|
+
} else if (typeof value === 'number') {
|
|
265
|
+
return value
|
|
264
266
|
} else {
|
|
265
|
-
|
|
267
|
+
return `''`
|
|
266
268
|
}
|
|
267
269
|
}
|
|
270
|
+
for (let i = 0; i < args.length; ++i) {
|
|
271
|
+
content += ` ${toArg(args[i])}`
|
|
272
|
+
}
|
|
268
273
|
for (const [key, value] of Object.entries(options)) {
|
|
269
|
-
content += ` --${key} ${value}`
|
|
274
|
+
content += ` --${key} ${toArg(value)}`
|
|
270
275
|
}
|
|
271
276
|
if (body.event.action.input_value) {
|
|
272
277
|
content += ` ${body.event.action.input_value}`
|