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