@satorijs/adapter-lark 3.10.6 → 3.11.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 (119) hide show
  1. package/lib/content.d.ts +211 -93
  2. package/lib/index.cjs +2954 -2474
  3. package/lib/internal.d.ts +4 -4
  4. package/lib/message.d.ts +2 -3
  5. package/lib/types/acs.d.ts +212 -172
  6. package/lib/types/admin.d.ts +331 -291
  7. package/lib/types/aily.d.ts +331 -216
  8. package/lib/types/apaas.d.ts +646 -494
  9. package/lib/types/application.d.ts +559 -458
  10. package/lib/types/approval.d.ts +826 -791
  11. package/lib/types/attendance.d.ts +1094 -994
  12. package/lib/types/auth.d.ts +66 -61
  13. package/lib/types/authen.d.ts +221 -186
  14. package/lib/types/baike.d.ts +258 -233
  15. package/lib/types/base.d.ts +74 -0
  16. package/lib/types/bitable.d.ts +830 -770
  17. package/lib/types/board.d.ts +29 -14
  18. package/lib/types/calendar.d.ts +660 -605
  19. package/lib/types/cardkit.d.ts +149 -134
  20. package/lib/types/compensation.d.ts +84 -49
  21. package/lib/types/contact.d.ts +1279 -1204
  22. package/lib/types/corehr.d.ts +4982 -4526
  23. package/lib/types/directory.d.ts +447 -0
  24. package/lib/types/docs.d.ts +28 -18
  25. package/lib/types/document_ai.d.ts +347 -252
  26. package/lib/types/docx.d.ts +428 -383
  27. package/lib/types/drive.d.ts +1093 -1048
  28. package/lib/types/ehr.d.ts +66 -51
  29. package/lib/types/event.d.ts +16 -6
  30. package/lib/types/helpdesk.d.ts +816 -741
  31. package/lib/types/hire.d.ts +3955 -3589
  32. package/lib/types/human_authentication.d.ts +32 -22
  33. package/lib/types/im.d.ts +1420 -1295
  34. package/lib/types/index.d.ts +1422 -330
  35. package/lib/types/lingo.d.ts +279 -249
  36. package/lib/types/mail.d.ts +1032 -675
  37. package/lib/types/mdm.d.ts +105 -37
  38. package/lib/types/minutes.d.ts +73 -26
  39. package/lib/types/moments.d.ts +23 -13
  40. package/lib/types/okr.d.ts +266 -225
  41. package/lib/types/optical_char_recognition.d.ts +22 -12
  42. package/lib/types/passport.d.ts +58 -48
  43. package/lib/types/payroll.d.ts +210 -53
  44. package/lib/types/performance.d.ts +463 -414
  45. package/lib/types/personal_settings.d.ts +93 -82
  46. package/lib/types/report.d.ts +79 -58
  47. package/lib/types/search.d.ts +265 -235
  48. package/lib/types/security_and_compliance.d.ts +30 -19
  49. package/lib/types/sheets.d.ts +356 -321
  50. package/lib/types/speech_to_text.d.ts +44 -34
  51. package/lib/types/task.d.ts +998 -1087
  52. package/lib/types/tenant.d.ts +25 -15
  53. package/lib/types/translation.d.ts +42 -32
  54. package/lib/types/trust_party.d.ts +81 -0
  55. package/lib/types/vc.d.ts +1218 -1123
  56. package/lib/types/verification.d.ts +11 -6
  57. package/lib/types/wiki.d.ts +270 -235
  58. package/lib/types/workplace.d.ts +58 -38
  59. package/lib/utils.d.ts +2 -2
  60. package/package.json +4 -4
  61. package/src/bot.ts +15 -15
  62. package/src/content.ts +230 -107
  63. package/src/internal.ts +29 -12
  64. package/src/message.ts +82 -111
  65. package/src/types/acs.ts +234 -186
  66. package/src/types/admin.ts +353 -305
  67. package/src/types/aily.ts +375 -233
  68. package/src/types/apaas.ts +754 -568
  69. package/src/types/application.ts +633 -507
  70. package/src/types/approval.ts +914 -872
  71. package/src/types/attendance.ts +1226 -1104
  72. package/src/types/auth.ts +72 -66
  73. package/src/types/authen.ts +233 -191
  74. package/src/types/baike.ts +276 -246
  75. package/src/types/base.ts +93 -0
  76. package/src/types/bitable.ts +966 -894
  77. package/src/types/board.ts +34 -16
  78. package/src/types/calendar.ts +751 -685
  79. package/src/types/cardkit.ts +164 -146
  80. package/src/types/compensation.ts +97 -55
  81. package/src/types/contact.ts +1465 -1375
  82. package/src/types/corehr.ts +5664 -5077
  83. package/src/types/directory.ts +569 -0
  84. package/src/types/docs.ts +31 -19
  85. package/src/types/document_ai.ts +401 -287
  86. package/src/types/docx.ts +492 -438
  87. package/src/types/drive.ts +1266 -1213
  88. package/src/types/ehr.ts +71 -53
  89. package/src/types/event.ts +19 -7
  90. package/src/types/helpdesk.ts +930 -840
  91. package/src/types/hire.ts +4453 -4019
  92. package/src/types/human_authentication.ts +35 -23
  93. package/src/types/im.ts +1626 -1476
  94. package/src/types/index.ts +1532 -346
  95. package/src/types/lingo.ts +299 -263
  96. package/src/types/mail.ts +1231 -779
  97. package/src/types/mdm.ts +122 -39
  98. package/src/types/minutes.ts +88 -28
  99. package/src/types/moments.ts +26 -14
  100. package/src/types/okr.ts +286 -238
  101. package/src/types/optical_char_recognition.ts +25 -13
  102. package/src/types/passport.ts +62 -50
  103. package/src/types/payroll.ts +254 -57
  104. package/src/types/performance.ts +528 -467
  105. package/src/types/personal_settings.ts +101 -89
  106. package/src/types/report.ts +86 -62
  107. package/src/types/search.ts +285 -249
  108. package/src/types/security_and_compliance.ts +33 -21
  109. package/src/types/sheets.ts +421 -379
  110. package/src/types/speech_to_text.ts +48 -36
  111. package/src/types/task.ts +1152 -1260
  112. package/src/types/tenant.ts +29 -17
  113. package/src/types/translation.ts +46 -34
  114. package/src/types/trust_party.ts +110 -0
  115. package/src/types/vc.ts +1397 -1283
  116. package/src/types/verification.ts +13 -7
  117. package/src/types/wiki.ts +293 -251
  118. package/src/types/workplace.ts +65 -41
  119. package/src/utils.ts +3 -3
@@ -1,221 +1,336 @@
1
- import { AilyKnowledgeAskProcessData, AilyKnowledgeFaq, AilyKnowledgeMessage, AilyMention, AilyMessage, AilyMessageContentType, AilySession, DataAsset, DataAssetTag, Run, Skill, SkillGlobalVariable } 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
- /**
6
- * 创建会话
7
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/aily_session/create
8
- */
9
- createAilyAilySession(body: CreateAilyAilySessionRequest): Promise<CreateAilyAilySessionResponse>;
10
- /**
11
- * 更新会话
12
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/aily_session/update
13
- */
14
- updateAilyAilySession(aily_session_id: string, body: UpdateAilyAilySessionRequest): Promise<UpdateAilyAilySessionResponse>;
15
- /**
16
- * 获取会话
17
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/aily_session/get
18
- */
19
- getAilyAilySession(aily_session_id: string): Promise<GetAilyAilySessionResponse>;
20
- /**
21
- * 删除会话
22
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/aily_session/delete
23
- */
24
- deleteAilyAilySession(aily_session_id: string): Promise<void>;
25
- /**
26
- * 发送智能伙伴消息
27
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/aily_session-aily_message/create
28
- */
29
- createAilyAilySessionAilyMessage(aily_session_id: string, body: CreateAilyAilySessionAilyMessageRequest): Promise<CreateAilyAilySessionAilyMessageResponse>;
30
- /**
31
- * 获取智能伙伴消息
32
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/aily_session-aily_message/get
33
- */
34
- getAilyAilySessionAilyMessage(aily_session_id: string, aily_message_id: string): Promise<GetAilyAilySessionAilyMessageResponse>;
35
- /**
36
- * 列出智能伙伴消息
37
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/aily_session-aily_message/list
38
- */
39
- listAilyAilySessionAilyMessage(aily_session_id: string, query?: ListAilyAilySessionAilyMessageQuery): Paginated<AilyMessage, 'messages'>;
40
- /**
41
- * 创建运行
42
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/aily_session-run/create
43
- */
44
- createAilyAilySessionRun(aily_session_id: string, body: CreateAilyAilySessionRunRequest): Promise<CreateAilyAilySessionRunResponse>;
45
- /**
46
- * 获取运行
47
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/aily_session-run/get
48
- */
49
- getAilyAilySessionRun(aily_session_id: string, run_id: string): Promise<GetAilyAilySessionRunResponse>;
50
- /**
51
- * 列出运行
52
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/aily_session-run/list
53
- */
54
- listAilyAilySessionRun(aily_session_id: string, query?: Pagination): Paginated<Run, 'runs'>;
55
- /**
56
- * 取消运行
57
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/aily_session-run/cancel
58
- */
59
- cancelAilyAilySessionRun(aily_session_id: string, run_id: string): Promise<CancelAilyAilySessionRunResponse>;
60
- /**
61
- * 调用技能
62
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/app-skill/start
63
- */
64
- startAilyAppSkill(app_id: string, skill_id: string, body: StartAilyAppSkillRequest): Promise<StartAilyAppSkillResponse>;
65
- /**
66
- * 获取技能信息
67
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/app-skill/get
68
- */
69
- getAilyAppSkill(app_id: string, skill_id: string): Promise<GetAilyAppSkillResponse>;
70
- /**
71
- * 查询技能列表
72
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/app-skill/list
73
- */
74
- listAilyAppSkill(app_id: string, query?: Pagination): Paginated<Skill, 'skills'>;
75
- /**
76
- * 执行数据知识问答
77
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/app-knowledge/ask
78
- */
79
- askAilyAppKnowledge(app_id: string, body: AskAilyAppKnowledgeRequest): Promise<AskAilyAppKnowledgeResponse>;
80
- /**
81
- * 查询数据知识列表
82
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/app-data_asset/list
83
- */
84
- listAilyAppDataAsset(app_id: string, query?: ListAilyAppDataAssetQuery): Paginated<DataAsset>;
85
- /**
86
- * 获取数据知识分类列表
87
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/app-data_asset_tag/list
88
- */
89
- listAilyAppDataAssetTag(app_id: string, query?: ListAilyAppDataAssetTagQuery): Paginated<DataAssetTag>;
5
+ aily: Aily.Methods;
90
6
  }
91
7
  }
92
- export interface CreateAilyAilySessionRequest {
93
- /** 渠道上下文 */
94
- channel_context?: string;
95
- /** 其他透传信息 */
96
- metadata?: string;
97
- }
98
- export interface CreateAilyAilySessionResponse {
99
- /** 创建的会话信息 */
100
- session?: AilySession;
101
- }
102
- export interface UpdateAilyAilySessionRequest {
103
- /** 渠道上下文 */
104
- channel_context?: string;
105
- /** 其他透传信息 */
106
- metadata?: string;
107
- }
108
- export interface UpdateAilyAilySessionResponse {
109
- /** 会话信息 */
110
- session?: AilySession;
111
- }
112
- export interface GetAilyAilySessionResponse {
113
- /** 会话信息 */
114
- session?: AilySession;
115
- }
116
- export interface CreateAilyAilySessionAilyMessageRequest {
117
- /** 幂等id,同一 session 下相同的幂等 id 算一条消息,有效期72h */
118
- idempotent_id: string;
119
- /** 消息内容类型 */
120
- content_type: AilyMessageContentType;
121
- /** 消息内容 */
122
- content: string;
123
- /** 消息中包含的文件 ID 列表 */
124
- file_ids?: string[];
125
- /** 引用的消息 ID */
126
- quote_message_id?: string;
127
- /** 被@的实体 */
128
- mentions?: AilyMention[];
129
- }
130
- export interface CreateAilyAilySessionAilyMessageResponse {
131
- /** 消息信息 */
132
- message?: AilyMessage;
133
- }
134
- export interface GetAilyAilySessionAilyMessageResponse {
135
- /** 消息信息 */
136
- message?: AilyMessage;
137
- }
138
- export interface ListAilyAilySessionAilyMessageQuery extends Pagination {
139
- /** 运行 ID */
140
- run_id?: string;
141
- /** 返回生成中的消息 */
142
- with_partial_message?: boolean;
143
- }
144
- export interface CreateAilyAilySessionRunRequest {
145
- /** 应用 ID */
146
- app_id: string;
147
- /** 技能 ID */
148
- skill_id?: string;
149
- /** 指定技能 ID 时可以同时指定技能输入 */
150
- skill_input?: string;
151
- /** 其他透传信息 */
152
- metadata?: string;
153
- }
154
- export interface CreateAilyAilySessionRunResponse {
155
- /** 运行信息 */
156
- run?: Run;
157
- }
158
- export interface GetAilyAilySessionRunResponse {
159
- /** 运行信息 */
160
- run?: Run;
161
- }
162
- export interface CancelAilyAilySessionRunResponse {
163
- /** 运行信息 */
164
- run?: Run;
165
- }
166
- export interface StartAilyAppSkillRequest {
167
- /** 技能的全局变量 */
168
- global_variable?: SkillGlobalVariable;
169
- /** 技能的自定义变量 */
170
- input?: string;
171
- }
172
- export interface StartAilyAppSkillResponse {
173
- /** 技能的输出 */
174
- output?: string;
175
- /** 技能的执行状态 */
176
- status?: string;
177
- }
178
- export interface GetAilyAppSkillResponse {
179
- /** 技能信息 */
180
- skill?: Skill;
181
- }
182
- export interface AskAilyAppKnowledgeRequest {
183
- /** 输入消息(当前仅支持纯文本输入) */
184
- message: AilyKnowledgeMessage;
185
- /** 控制知识问答所依据的数据知识范围 */
186
- data_asset_ids?: string[];
187
- /** 控制知识问答所依据的数据知识分类范围 */
188
- data_asset_tag_ids?: string[];
189
- }
190
- export interface AskAilyAppKnowledgeResponse {
191
- /** 响应状态,枚举值 */
192
- status?: 'processing' | 'finished';
193
- /** 结束类型,枚举值 */
194
- finish_type?: 'qa' | 'faq';
195
- /** 响应消息 */
196
- message?: AilyKnowledgeMessage;
197
- /** 知识问答运行过程结构化数据,status=finished 且 finish_type=qa 时返回 */
198
- process_data?: AilyKnowledgeAskProcessData;
199
- /** 匹配标准问答对结果,status=finished finish_type=faq时返回 */
200
- faq_result?: AilyKnowledgeFaq;
201
- /** 是否有结果,true 则 代表 message 中的内容是通过配置知识而生成的 */
202
- has_answer?: boolean;
203
- }
204
- export interface ListAilyAppDataAssetQuery extends Pagination {
205
- /** 模糊匹配关键词 */
206
- keyword?: string;
207
- /** 根据数据知识 ID 进行过滤 */
208
- data_asset_ids?: string[];
209
- /** 根据数据知识分类 ID 进行过滤 */
210
- data_asset_tag_ids?: string[];
211
- /** 结果是否包含数据与知识项目 */
212
- with_data_asset_item?: boolean;
213
- /** 结果是否包含数据连接状态 */
214
- with_connect_status?: boolean;
215
- }
216
- export interface ListAilyAppDataAssetTagQuery extends Pagination {
217
- /** 模糊匹配分类名称 */
218
- keyword?: string;
219
- /** 模糊匹配分类名称 */
220
- data_asset_tag_ids?: string[];
8
+ export declare namespace Aily {
9
+ interface Methods {
10
+ ailySession: AilySession.Methods;
11
+ app: App.Methods;
12
+ }
13
+ namespace AilySession {
14
+ interface Methods {
15
+ ailyMessage: AilyMessage.Methods;
16
+ run: Run.Methods;
17
+ /**
18
+ * 创建会话
19
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/aily_session/create
20
+ */
21
+ create(body: CreateRequest): Promise<CreateResponse>;
22
+ /**
23
+ * 更新会话
24
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/aily_session/update
25
+ */
26
+ update(aily_session_id: string, body: UpdateRequest): Promise<UpdateResponse>;
27
+ /**
28
+ * 获取会话
29
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/aily_session/get
30
+ */
31
+ get(aily_session_id: string): Promise<GetResponse>;
32
+ /**
33
+ * 删除会话
34
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/aily_session/delete
35
+ */
36
+ delete(aily_session_id: string): Promise<void>;
37
+ }
38
+ interface CreateRequest {
39
+ /** 渠道上下文 */
40
+ channel_context?: string;
41
+ /** 其他透传信息 */
42
+ metadata?: string;
43
+ }
44
+ interface CreateResponse {
45
+ /** 创建的会话信息 */
46
+ session?: Lark.AilySession;
47
+ }
48
+ interface UpdateRequest {
49
+ /** 渠道上下文 */
50
+ channel_context?: string;
51
+ /** 其他透传信息 */
52
+ metadata?: string;
53
+ }
54
+ interface UpdateResponse {
55
+ /** 会话信息 */
56
+ session?: Lark.AilySession;
57
+ }
58
+ interface GetResponse {
59
+ /** 会话信息 */
60
+ session?: Lark.AilySession;
61
+ }
62
+ namespace AilyMessage {
63
+ interface Methods {
64
+ /**
65
+ * 发送智能伙伴消息
66
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/aily_session-aily_message/create
67
+ */
68
+ create(aily_session_id: string, body: CreateRequest): Promise<CreateResponse>;
69
+ /**
70
+ * 获取智能伙伴消息
71
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/aily_session-aily_message/get
72
+ */
73
+ get(aily_session_id: string, aily_message_id: string): Promise<GetResponse>;
74
+ /**
75
+ * 列出智能伙伴消息
76
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/aily_session-aily_message/list
77
+ */
78
+ list(aily_session_id: string, query?: ListQuery): Paginated<Lark.AilyMessage, 'messages'>;
79
+ }
80
+ interface CreateRequest {
81
+ /** 幂等id,同一 session 下相同的幂等 id 算一条消息,有效期72h */
82
+ idempotent_id: string;
83
+ /** 消息内容类型 */
84
+ content_type: Lark.AilyMessageContentType;
85
+ /** 消息内容 */
86
+ content: string;
87
+ /** 消息中包含的文件 ID 列表 */
88
+ file_ids?: string[];
89
+ /** 引用的消息 ID */
90
+ quote_message_id?: string;
91
+ /** 被@的实体 */
92
+ mentions?: Lark.AilyMention[];
93
+ }
94
+ interface CreateResponse {
95
+ /** 消息信息 */
96
+ message?: Lark.AilyMessage;
97
+ }
98
+ interface GetResponse {
99
+ /** 消息信息 */
100
+ message?: Lark.AilyMessage;
101
+ }
102
+ interface ListQuery extends Pagination {
103
+ /** 运行 ID */
104
+ run_id?: string;
105
+ /** 返回生成中的消息 */
106
+ with_partial_message?: boolean;
107
+ }
108
+ }
109
+ namespace Run {
110
+ interface Methods {
111
+ /**
112
+ * 创建运行
113
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/aily_session-run/create
114
+ */
115
+ create(aily_session_id: string, body: CreateRequest): Promise<CreateResponse>;
116
+ /**
117
+ * 获取运行
118
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/aily_session-run/get
119
+ */
120
+ get(aily_session_id: string, run_id: string): Promise<GetResponse>;
121
+ /**
122
+ * 列出运行
123
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/aily_session-run/list
124
+ */
125
+ list(aily_session_id: string, query?: Pagination): Paginated<Lark.Run, 'runs'>;
126
+ /**
127
+ * 取消运行
128
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/aily_session-run/cancel
129
+ */
130
+ cancel(aily_session_id: string, run_id: string): Promise<CancelResponse>;
131
+ }
132
+ interface CreateRequest {
133
+ /** 应用 ID */
134
+ app_id: string;
135
+ /** 技能 ID */
136
+ skill_id?: string;
137
+ /** 指定技能 ID 时可以同时指定技能输入 */
138
+ skill_input?: string;
139
+ /** 其他透传信息 */
140
+ metadata?: string;
141
+ }
142
+ interface CreateResponse {
143
+ /** 运行信息 */
144
+ run?: Lark.Run;
145
+ }
146
+ interface GetResponse {
147
+ /** 运行信息 */
148
+ run?: Lark.Run;
149
+ }
150
+ interface CancelResponse {
151
+ /** 运行信息 */
152
+ run?: Lark.Run;
153
+ }
154
+ }
155
+ }
156
+ namespace App {
157
+ interface Methods {
158
+ skill: Skill.Methods;
159
+ knowledge: Knowledge.Methods;
160
+ dataAsset: DataAsset.Methods;
161
+ dataAssetTag: DataAssetTag.Methods;
162
+ }
163
+ namespace Skill {
164
+ interface Methods {
165
+ /**
166
+ * 调用技能
167
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/app-skill/start
168
+ */
169
+ start(app_id: string, skill_id: string, body: StartRequest): Promise<StartResponse>;
170
+ /**
171
+ * 获取技能信息
172
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/app-skill/get
173
+ */
174
+ get(app_id: string, skill_id: string): Promise<GetResponse>;
175
+ /**
176
+ * 查询技能列表
177
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/app-skill/list
178
+ */
179
+ list(app_id: string, query?: Pagination): Paginated<Lark.Skill, 'skills'>;
180
+ }
181
+ interface StartRequest {
182
+ /** 技能的全局变量 */
183
+ global_variable?: Lark.SkillGlobalVariable;
184
+ /** 技能的自定义变量 */
185
+ input?: string;
186
+ }
187
+ interface StartResponse {
188
+ /** 技能的输出 */
189
+ output?: string;
190
+ /** 技能的执行状态 */
191
+ status?: string;
192
+ }
193
+ interface GetResponse {
194
+ /** 技能信息 */
195
+ skill?: Lark.Skill;
196
+ }
197
+ }
198
+ namespace Knowledge {
199
+ interface Methods {
200
+ /**
201
+ * 执行数据知识问答
202
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/app-knowledge/ask
203
+ */
204
+ ask(app_id: string, body: AskRequest): Promise<AskResponse>;
205
+ }
206
+ interface AskRequest {
207
+ /** 输入消息(当前仅支持纯文本输入) */
208
+ message: Lark.AilyKnowledgeMessage;
209
+ /** 控制知识问答所依据的数据知识范围 */
210
+ data_asset_ids?: string[];
211
+ /** 控制知识问答所依据的数据知识分类范围 */
212
+ data_asset_tag_ids?: string[];
213
+ }
214
+ interface AskResponse {
215
+ /** 响应状态,枚举值 */
216
+ status?: 'processing' | 'finished';
217
+ /** 结束类型,枚举值 */
218
+ finish_type?: 'qa' | 'faq';
219
+ /** 响应消息 */
220
+ message?: Lark.AilyKnowledgeMessage;
221
+ /** 知识问答运行过程结构化数据,status=finished 且 finish_type=qa 时返回 */
222
+ process_data?: Lark.AilyKnowledgeAskProcessData;
223
+ /** 匹配标准问答对结果,status=finished 且 finish_type=faq时返回 */
224
+ faq_result?: Lark.AilyKnowledgeFaq;
225
+ /** 是否有结果,true 则 代表 message 中的内容是通过配置知识而生成的 */
226
+ has_answer?: boolean;
227
+ }
228
+ }
229
+ namespace DataAsset {
230
+ interface Methods {
231
+ /**
232
+ * 上传文件用于数据知识管理
233
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/app-data_asset/upload_file
234
+ */
235
+ uploadFile(app_id: string, form: UploadFileForm, query?: UploadFileQuery): Promise<UploadFileResponse>;
236
+ /**
237
+ * 创建数据知识
238
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/app-data_asset/create
239
+ */
240
+ create(app_id: string, body: CreateRequest, query?: CreateQuery): Promise<CreateResponse>;
241
+ /**
242
+ * 获取数据知识
243
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/app-data_asset/get
244
+ */
245
+ get(app_id: string, data_asset_id: string, query?: GetQuery): Promise<GetResponse>;
246
+ /**
247
+ * 删除数据知识
248
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/app-data_asset/delete
249
+ */
250
+ delete(app_id: string, data_asset_id: string, query?: DeleteQuery): Promise<DeleteResponse>;
251
+ /**
252
+ * 查询数据知识列表
253
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/app-data_asset/list
254
+ */
255
+ list(app_id: string, query?: ListQuery): Paginated<Lark.DataAsset>;
256
+ }
257
+ interface UploadFileForm {
258
+ /** 需要上传的文件 */
259
+ file: Blob;
260
+ }
261
+ interface UploadFileQuery {
262
+ /** 应用环境,默认为线上环境,dev代表开发环境,只支持dev */
263
+ tenant_type?: string;
264
+ }
265
+ interface UploadFileResponse {
266
+ /** 数据知识文件 */
267
+ file_info?: Lark.DataAssetFile;
268
+ }
269
+ interface CreateRequest {
270
+ /** 连接类型 */
271
+ connect_type: 'import' | 'direct';
272
+ /** 数据源类型 */
273
+ source_type: 'file' | 'lark_wiki_space' | 'lark_doc' | 'lark_helpdesk';
274
+ /** 知识导入配置 */
275
+ import_knowledge_setting?: Lark.DataAssetImportKnowledgeSetting;
276
+ /** 数据知识描述信息 */
277
+ description?: Record<string, string>;
278
+ }
279
+ interface CreateQuery {
280
+ /** 应用环境,默认为线上环境,dev代表开发环境,只支持dev */
281
+ tenant_type?: string;
282
+ }
283
+ interface CreateResponse {
284
+ /** 数据知识 */
285
+ data_asset?: Lark.DataAsset;
286
+ }
287
+ interface GetQuery {
288
+ /** 结果是否包含数据与知识项 */
289
+ with_data_asset_item?: boolean;
290
+ /** 结果是否包含数据知识连接状态 */
291
+ with_connect_status?: boolean;
292
+ /** 应用环境,默认为线上环境,dev代表开发环境 */
293
+ tenant_type?: string;
294
+ }
295
+ interface GetResponse {
296
+ /** 数据知识 */
297
+ data_asset?: Lark.DataAsset;
298
+ }
299
+ interface DeleteQuery {
300
+ /** 应用环境,默认为线上环境,dev代表开发环境,只支持dev */
301
+ tenant_type?: string;
302
+ }
303
+ interface DeleteResponse {
304
+ /** 数据知识 */
305
+ data_asset?: Lark.DataAsset;
306
+ }
307
+ interface ListQuery extends Pagination {
308
+ /** 模糊匹配关键词 */
309
+ keyword?: string;
310
+ /** 根据数据知识 ID 进行过滤 */
311
+ data_asset_ids?: string[];
312
+ /** 根据数据知识分类 ID 进行过滤 */
313
+ data_asset_tag_ids?: string[];
314
+ /** 结果是否包含数据与知识项目 */
315
+ with_data_asset_item?: boolean;
316
+ /** 结果是否包含数据连接状态 */
317
+ with_connect_status?: boolean;
318
+ }
319
+ }
320
+ namespace DataAssetTag {
321
+ interface Methods {
322
+ /**
323
+ * 获取数据知识分类列表
324
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/app-data_asset_tag/list
325
+ */
326
+ list(app_id: string, query?: ListQuery): Paginated<Lark.DataAssetTag>;
327
+ }
328
+ interface ListQuery extends Pagination {
329
+ /** 模糊匹配分类名称 */
330
+ keyword?: string;
331
+ /** 模糊匹配分类名称 */
332
+ data_asset_tag_ids?: string[];
333
+ }
334
+ }
335
+ }
221
336
  }