@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,240 +1,270 @@
1
- import { Acl, ConnectorParam, DataSource, I18nMeta, Item, ItemContent, ItemMetadata, PatchSchemaProperty, Schema, SchemaDisplay, SchemaProperty } 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/search-v2/message/create
8
- */
9
- createSearchMessage(body: CreateSearchMessageRequest, query?: CreateSearchMessageQuery): Paginated<string>;
10
- /**
11
- * 搜索应用
12
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/app/create
13
- */
14
- createSearchApp(body: CreateSearchAppRequest, query?: CreateSearchAppQuery): Paginated<string>;
15
- /**
16
- * 创建数据源
17
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/create
18
- */
19
- createSearchDataSource(body: CreateSearchDataSourceRequest): Promise<CreateSearchDataSourceResponse>;
20
- /**
21
- * 删除数据源
22
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/delete
23
- */
24
- deleteSearchDataSource(data_source_id: string): Promise<void>;
25
- /**
26
- * 修改数据源
27
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/patch
28
- */
29
- patchSearchDataSource(data_source_id: string, body: PatchSearchDataSourceRequest): Promise<PatchSearchDataSourceResponse>;
30
- /**
31
- * 获取数据源
32
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/get
33
- */
34
- getSearchDataSource(data_source_id: string): Promise<GetSearchDataSourceResponse>;
35
- /**
36
- * 批量获取数据源
37
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/list
38
- */
39
- listSearchDataSource(query?: ListSearchDataSourceQuery): Paginated<DataSource>;
40
- /**
41
- * 为指定数据项创建索引
42
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source-item/create
43
- */
44
- createSearchDataSourceItem(data_source_id: string, body: CreateSearchDataSourceItemRequest): Promise<void>;
45
- /**
46
- * 删除数据项
47
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source-item/delete
48
- */
49
- deleteSearchDataSourceItem(data_source_id: string, item_id: string): Promise<void>;
50
- /**
51
- * 查询指定数据项
52
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source-item/get
53
- */
54
- getSearchDataSourceItem(data_source_id: string, item_id: string): Promise<GetSearchDataSourceItemResponse>;
55
- /**
56
- * 创建数据范式
57
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/schema/create
58
- */
59
- createSearchSchema(body: CreateSearchSchemaRequest, query?: CreateSearchSchemaQuery): Promise<CreateSearchSchemaResponse>;
60
- /**
61
- * 删除数据范式
62
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/schema/delete
63
- */
64
- deleteSearchSchema(schema_id: string): Promise<void>;
65
- /**
66
- * 修改数据范式
67
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/schema/patch
68
- */
69
- patchSearchSchema(schema_id: string, body: PatchSearchSchemaRequest): Promise<PatchSearchSchemaResponse>;
70
- /**
71
- * 获取数据范式
72
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/schema/get
73
- */
74
- getSearchSchema(schema_id: string): Promise<GetSearchSchemaResponse>;
5
+ search: Search.Methods;
75
6
  }
76
7
  }
77
- export interface CreateSearchMessageRequest {
78
- /** 搜索关键词 */
79
- query: string;
80
- /** 消息来自user_id列表 */
81
- from_ids?: string[];
82
- /** 消息所在chat_id列表 */
83
- chat_ids?: string[];
84
- /** 消息类型(file/image/media) */
85
- message_type?: 'file' | 'image' | 'media';
86
- /** at用户user_id列表 */
87
- at_chatter_ids?: string[];
88
- /** 消息来自类型(bot/user) */
89
- from_type?: 'bot' | 'user';
90
- /** 会话类型(group_chat/p2p_chat) */
91
- chat_type?: 'group_chat' | 'p2p_chat';
92
- /** 消息发送起始时间 */
93
- start_time?: string;
94
- /** 消息发送结束时间 */
95
- end_time?: string;
96
- }
97
- export interface CreateSearchMessageQuery extends Pagination {
98
- /** 此次调用中使用的用户ID的类型 */
99
- user_id_type?: 'user_id' | 'union_id' | 'open_id';
100
- }
101
- export interface CreateSearchAppRequest {
102
- /** 搜索关键词 */
103
- query: string;
104
- }
105
- export interface CreateSearchAppQuery extends Pagination {
106
- /** 此次调用中使用的用户ID的类型 */
107
- user_id_type?: 'user_id' | 'union_id' | 'open_id';
108
- }
109
- export declare const enum CreateSearchDataSourceRequestState {
110
- /** 已上线 */
111
- Online = 0,
112
- /** 未上线 */
113
- Offline = 1
114
- }
115
- export declare const enum CreateSearchDataSourceRequestConnectType {
116
- /** 调用搜索请求时,使用的是飞书搜索接口 */
117
- Default = 0,
118
- /** 调用搜索请求时,使用的是自定义回调函数的Uri */
119
- Callback = 1
120
- }
121
- export interface CreateSearchDataSourceRequest {
122
- /** data_source的展示名称 */
123
- name: string;
124
- /** 数据源状态,0-已上线,1-未上线 */
125
- state?: CreateSearchDataSourceRequestState;
126
- /** 对于数据源的描述 */
127
- description?: string;
128
- /** 数据源在 search tab 上的展示图标路径 */
129
- icon_url?: string;
130
- /** 数据源采用的展示模版名称 */
131
- template?: string;
132
- /** 描述哪些字段可以被搜索 */
133
- searchable_fields?: string[];
134
- /** 数据源的国际化展示名称 */
135
- i18n_name?: I18nMeta;
136
- /** 数据源的国际化描述 */
137
- i18n_description?: I18nMeta;
138
- /** 数据源关联的 schema 标识 */
139
- schema_id?: string;
140
- /** datasource对应的开放平台应用id */
141
- app_id?: string;
142
- /** 搜索请求的接入方式 */
143
- connect_type?: CreateSearchDataSourceRequestConnectType;
144
- /** 根据连接器类型不同所需要提供的相关参数 */
145
- connector_param?: ConnectorParam;
146
- /** 是否使用问答服务 */
147
- enable_answer?: boolean;
148
- }
149
- export interface CreateSearchDataSourceResponse {
150
- /** 数据源实例 */
151
- data_source?: DataSource;
152
- }
153
- export declare const enum PatchSearchDataSourceRequestState {
154
- /** 已上线 */
155
- Online = 0,
156
- /** 未上线 */
157
- Offline = 1
158
- }
159
- export interface PatchSearchDataSourceRequest {
160
- /** 数据源的展示名称 */
161
- name?: string;
162
- /** 数据源状态,0-已上线,1-未上线 */
163
- state?: PatchSearchDataSourceRequestState;
164
- /** 对于数据源的描述 */
165
- description?: string;
166
- /** 数据源在 search tab 上的展示图标路径 */
167
- icon_url?: string;
168
- /** 数据源名称多语言配置,json格式,key为语言locale,value为对应文案,例如{"zh_cn":"测试数据源", "en_us":"Test DataSource"} */
169
- i18n_name?: I18nMeta;
170
- /** 数据源描述多语言配置,json格式,key为语言locale,value为对应文案,例如{"zh_cn":"搜索测试数据源相关数据", "en_us":"Search data from Test DataSource"} */
171
- i18n_description?: I18nMeta;
172
- /** 修改connector的相关配置 */
173
- connector_param?: ConnectorParam;
174
- /** 是否使用问答服务 */
175
- enable_answer?: boolean;
176
- }
177
- export interface PatchSearchDataSourceResponse {
178
- /** 数据源 */
179
- data_source?: DataSource;
180
- }
181
- export interface GetSearchDataSourceResponse {
182
- /** 数据源实例 */
183
- data_source?: DataSource;
184
- }
185
- export declare const enum ListSearchDataSourceQueryView {
186
- /** 全量数据 */
187
- FULL = 0,
188
- /** 摘要数据 */
189
- BASIC = 1
190
- }
191
- export interface ListSearchDataSourceQuery extends Pagination {
192
- /** 回包数据格式,0-全量数据;1-摘要数据。**注**:摘要数据仅包含"id","name","state"。 */
193
- view?: ListSearchDataSourceQueryView;
194
- }
195
- export interface CreateSearchDataSourceItemRequest {
196
- /** item 在 datasource 中的唯一标识,只接受英文字母、数字和下划线 */
197
- id: string;
198
- /** item 的访问权限控制 */
199
- acl: Acl[];
200
- /** item 的元信息 */
201
- metadata: ItemMetadata;
202
- /** 结构化数据 */
203
- structured_data: string;
204
- /** 非结构化数据,如文档文本 */
205
- content?: ItemContent;
206
- }
207
- export interface GetSearchDataSourceItemResponse {
208
- /** 数据项实例 */
209
- item: Item;
210
- }
211
- export interface CreateSearchSchemaRequest {
212
- /** 数据范式的属性定义 */
213
- properties: SchemaProperty[];
214
- /** 数据展示相关配置 */
215
- display: SchemaDisplay;
216
- /** 用户自定义数据范式的唯一标识 */
217
- schema_id: string;
218
- }
219
- export interface CreateSearchSchemaQuery {
220
- /** 是否只用来校验合法性 */
221
- validate_only?: boolean;
222
- }
223
- export interface CreateSearchSchemaResponse {
224
- /** 数据范式实例 */
225
- schema?: Schema;
226
- }
227
- export interface PatchSearchSchemaRequest {
228
- /** 数据展示相关配置 */
229
- display?: SchemaDisplay;
230
- /** 数据范式的属性定义 */
231
- properties?: PatchSchemaProperty[];
232
- }
233
- export interface PatchSearchSchemaResponse {
234
- /** 数据范式实例 */
235
- schema?: Schema;
236
- }
237
- export interface GetSearchSchemaResponse {
238
- /** 数据范式 */
239
- schema?: Schema;
8
+ export declare namespace Search {
9
+ interface Methods {
10
+ message: Message.Methods;
11
+ app: App.Methods;
12
+ dataSource: DataSource.Methods;
13
+ schema: Schema.Methods;
14
+ }
15
+ namespace Message {
16
+ interface Methods {
17
+ /**
18
+ * 搜索消息
19
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/message/create
20
+ */
21
+ create(body: CreateRequest, query?: CreateQuery): Paginated<string>;
22
+ }
23
+ interface CreateRequest {
24
+ /** 搜索关键词 */
25
+ query: string;
26
+ /** 消息来自user_id列表 */
27
+ from_ids?: string[];
28
+ /** 消息所在chat_id列表 */
29
+ chat_ids?: string[];
30
+ /** 消息类型(file/image/media) */
31
+ message_type?: 'file' | 'image' | 'media';
32
+ /** at用户user_id列表 */
33
+ at_chatter_ids?: string[];
34
+ /** 消息来自类型(bot/user) */
35
+ from_type?: 'bot' | 'user';
36
+ /** 会话类型(group_chat/p2p_chat) */
37
+ chat_type?: 'group_chat' | 'p2p_chat';
38
+ /** 消息发送起始时间 */
39
+ start_time?: string;
40
+ /** 消息发送结束时间 */
41
+ end_time?: string;
42
+ }
43
+ interface CreateQuery extends Pagination {
44
+ /** 此次调用中使用的用户ID的类型 */
45
+ user_id_type?: 'user_id' | 'union_id' | 'open_id';
46
+ }
47
+ }
48
+ namespace App {
49
+ interface Methods {
50
+ /**
51
+ * 搜索应用
52
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/app/create
53
+ */
54
+ create(body: CreateRequest, query?: CreateQuery): Paginated<string>;
55
+ }
56
+ interface CreateRequest {
57
+ /** 搜索关键词 */
58
+ query: string;
59
+ }
60
+ interface CreateQuery extends Pagination {
61
+ /** 此次调用中使用的用户ID的类型 */
62
+ user_id_type?: 'user_id' | 'union_id' | 'open_id';
63
+ }
64
+ }
65
+ namespace DataSource {
66
+ interface Methods {
67
+ item: Item.Methods;
68
+ /**
69
+ * 创建数据源
70
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/create
71
+ */
72
+ create(body: CreateRequest): Promise<CreateResponse>;
73
+ /**
74
+ * 删除数据源
75
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/delete
76
+ */
77
+ delete(data_source_id: string): Promise<void>;
78
+ /**
79
+ * 修改数据源
80
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/patch
81
+ */
82
+ patch(data_source_id: string, body: PatchRequest): Promise<PatchResponse>;
83
+ /**
84
+ * 获取数据源
85
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/get
86
+ */
87
+ get(data_source_id: string): Promise<GetResponse>;
88
+ /**
89
+ * 批量获取数据源
90
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/list
91
+ */
92
+ list(query?: ListQuery): Paginated<Lark.DataSource>;
93
+ }
94
+ const enum CreateRequestState {
95
+ /** 已上线 */
96
+ Online = 0,
97
+ /** 未上线 */
98
+ Offline = 1
99
+ }
100
+ const enum CreateRequestConnectType {
101
+ /** 调用搜索请求时,使用的是飞书搜索接口 */
102
+ Default = 0,
103
+ /** 调用搜索请求时,使用的是自定义回调函数的Uri */
104
+ Callback = 1
105
+ }
106
+ interface CreateRequest {
107
+ /** data_source的展示名称 */
108
+ name: string;
109
+ /** 数据源状态,0-已上线,1-未上线 */
110
+ state?: CreateRequestState;
111
+ /** 对于数据源的描述 */
112
+ description?: string;
113
+ /** 数据源在 search tab 上的展示图标路径 */
114
+ icon_url?: string;
115
+ /** 数据源采用的展示模版名称 */
116
+ template?: string;
117
+ /** 描述哪些字段可以被搜索 */
118
+ searchable_fields?: string[];
119
+ /** 数据源的国际化展示名称 */
120
+ i18n_name?: Lark.I18nMeta;
121
+ /** 数据源的国际化描述 */
122
+ i18n_description?: Lark.I18nMeta;
123
+ /** 数据源关联的 schema 标识 */
124
+ schema_id?: string;
125
+ /** datasource对应的开放平台应用id */
126
+ app_id?: string;
127
+ /** 搜索请求的接入方式 */
128
+ connect_type?: CreateRequestConnectType;
129
+ /** 根据连接器类型不同所需要提供的相关参数 */
130
+ connector_param?: Lark.ConnectorParam;
131
+ /** 是否使用问答服务 */
132
+ enable_answer?: boolean;
133
+ }
134
+ interface CreateResponse {
135
+ /** 数据源实例 */
136
+ data_source?: Lark.DataSource;
137
+ }
138
+ const enum PatchRequestState {
139
+ /** 已上线 */
140
+ Online = 0,
141
+ /** 未上线 */
142
+ Offline = 1
143
+ }
144
+ interface PatchRequest {
145
+ /** 数据源的展示名称 */
146
+ name?: string;
147
+ /** 数据源状态,0-已上线,1-未上线 */
148
+ state?: PatchRequestState;
149
+ /** 对于数据源的描述 */
150
+ description?: string;
151
+ /** 数据源在 search tab 上的展示图标路径 */
152
+ icon_url?: string;
153
+ /** 数据源名称多语言配置,json格式,key为语言locale,value为对应文案,例如{"zh_cn":"测试数据源", "en_us":"Test DataSource"} */
154
+ i18n_name?: Lark.I18nMeta;
155
+ /** 数据源描述多语言配置,json格式,key为语言locale,value为对应文案,例如{"zh_cn":"搜索测试数据源相关数据", "en_us":"Search data from Test DataSource"} */
156
+ i18n_description?: Lark.I18nMeta;
157
+ /** 修改connector的相关配置 */
158
+ connector_param?: Lark.ConnectorParam;
159
+ /** 是否使用问答服务 */
160
+ enable_answer?: boolean;
161
+ }
162
+ interface PatchResponse {
163
+ /** 数据源 */
164
+ data_source?: Lark.DataSource;
165
+ }
166
+ interface GetResponse {
167
+ /** 数据源实例 */
168
+ data_source?: Lark.DataSource;
169
+ }
170
+ const enum ListQueryView {
171
+ /** 全量数据 */
172
+ FULL = 0,
173
+ /** 摘要数据 */
174
+ BASIC = 1
175
+ }
176
+ interface ListQuery extends Pagination {
177
+ /** 回包数据格式,0-全量数据;1-摘要数据。**注**:摘要数据仅包含"id","name","state"。 */
178
+ view?: ListQueryView;
179
+ }
180
+ namespace Item {
181
+ interface Methods {
182
+ /**
183
+ * 为指定数据项创建索引
184
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source-item/create
185
+ */
186
+ create(data_source_id: string, body: CreateRequest): Promise<void>;
187
+ /**
188
+ * 删除数据项
189
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source-item/delete
190
+ */
191
+ delete(data_source_id: string, item_id: string): Promise<void>;
192
+ /**
193
+ * 查询指定数据项
194
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source-item/get
195
+ */
196
+ get(data_source_id: string, item_id: string): Promise<GetResponse>;
197
+ }
198
+ interface CreateRequest {
199
+ /** item 在 datasource 中的唯一标识,只接受英文字母、数字和下划线 */
200
+ id: string;
201
+ /** item 的访问权限控制 */
202
+ acl: Lark.Acl[];
203
+ /** item 的元信息 */
204
+ metadata: Lark.ItemMetadata;
205
+ /** 结构化数据 */
206
+ structured_data: string;
207
+ /** 非结构化数据,如文档文本 */
208
+ content?: Lark.ItemContent;
209
+ }
210
+ interface GetResponse {
211
+ /** 数据项实例 */
212
+ item: Lark.Item;
213
+ }
214
+ }
215
+ }
216
+ namespace Schema {
217
+ interface Methods {
218
+ /**
219
+ * 创建数据范式
220
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/schema/create
221
+ */
222
+ create(body: CreateRequest, query?: CreateQuery): Promise<CreateResponse>;
223
+ /**
224
+ * 删除数据范式
225
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/schema/delete
226
+ */
227
+ delete(schema_id: string): Promise<void>;
228
+ /**
229
+ * 修改数据范式
230
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/schema/patch
231
+ */
232
+ patch(schema_id: string, body: PatchRequest): Promise<PatchResponse>;
233
+ /**
234
+ * 获取数据范式
235
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/schema/get
236
+ */
237
+ get(schema_id: string): Promise<GetResponse>;
238
+ }
239
+ interface CreateRequest {
240
+ /** 数据范式的属性定义 */
241
+ properties: Lark.SchemaProperty[];
242
+ /** 数据展示相关配置 */
243
+ display: Lark.SchemaDisplay;
244
+ /** 用户自定义数据范式的唯一标识 */
245
+ schema_id: string;
246
+ }
247
+ interface CreateQuery {
248
+ /** 是否只用来校验合法性 */
249
+ validate_only?: boolean;
250
+ }
251
+ interface CreateResponse {
252
+ /** 数据范式实例 */
253
+ schema?: Lark.Schema;
254
+ }
255
+ interface PatchRequest {
256
+ /** 数据展示相关配置 */
257
+ display?: Lark.SchemaDisplay;
258
+ /** 数据范式的属性定义 */
259
+ properties?: Lark.PatchSchemaProperty[];
260
+ }
261
+ interface PatchResponse {
262
+ /** 数据范式实例 */
263
+ schema?: Lark.Schema;
264
+ }
265
+ interface GetResponse {
266
+ /** 数据范式 */
267
+ schema?: Lark.Schema;
268
+ }
269
+ }
240
270
  }
@@ -1,24 +1,35 @@
1
- import { OpenapiLog } from '.';
1
+ import * as Lark from '.';
2
+ import { Paginated } from '../internal';
2
3
  declare module '../internal' {
3
4
  interface Internal {
4
- /**
5
- * 获取OpenAPI审计日志数据
6
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/security_and_compliance-v1/openapi_log/list_data
7
- */
8
- listDataSecurityAndComplianceOpenapiLog(body: ListDataSecurityAndComplianceOpenapiLogRequest): Paginated<OpenapiLog>;
5
+ securityAndCompliance: SecurityAndCompliance.Methods;
9
6
  }
10
7
  }
11
- export interface ListDataSecurityAndComplianceOpenapiLogRequest {
12
- /** 飞书开放平台定义的API */
13
- api_keys?: string[];
14
- /** 以秒为单位的起始时间戳 */
15
- start_time?: number;
16
- /** 以秒为单位的终止时间戳 */
17
- end_time?: number;
18
- /** 在开发者后台——凭证与基础信息页面查看的app_id(cli_xxx),指调用openapi的应用 */
19
- app_id?: string;
20
- /** 分页大小 */
21
- page_size?: number;
22
- /** 分页标记,第一次请求不填,表示从头开始遍历;当返回的has_more为true时,会返回新的page_token,再次调用接口,传入这个page_token,将获得下一页数据 */
23
- page_token?: string;
8
+ export declare namespace SecurityAndCompliance {
9
+ interface Methods {
10
+ openapiLog: OpenapiLog.Methods;
11
+ }
12
+ namespace OpenapiLog {
13
+ interface Methods {
14
+ /**
15
+ * 获取OpenAPI审计日志数据
16
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/security_and_compliance-v1/openapi_log/list_data
17
+ */
18
+ listData(body: ListDataRequest): Paginated<Lark.OpenapiLog>;
19
+ }
20
+ interface ListDataRequest {
21
+ /** 飞书开放平台定义的API */
22
+ api_keys?: string[];
23
+ /** 以秒为单位的起始时间戳 */
24
+ start_time?: number;
25
+ /** 以秒为单位的终止时间戳 */
26
+ end_time?: number;
27
+ /** 在开发者后台——凭证与基础信息页面查看的app_id(cli_xxx),指调用openapi的应用 */
28
+ app_id?: string;
29
+ /** 分页大小 */
30
+ page_size?: number;
31
+ /** 分页标记,第一次请求不填,表示从头开始遍历;当返回的has_more为true时,会返回新的page_token,再次调用接口,传入这个page_token,将获得下一页数据 */
32
+ page_token?: string;
33
+ }
34
+ }
24
35
  }