@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,388 +1,433 @@
1
- import { Block, BlockIdRelation, DeleteGridColumnRequest, DeleteTableColumnsRequest, DeleteTableRowsRequest, Document, InsertGridColumnRequest, InsertTableColumnRequest, InsertTableRowRequest, MergeTableCellsRequest, ReplaceFileRequest, ReplaceImageRequest, UnmergeTableCellsRequest, UpdateBlockRequest, UpdateGridColumnWidthRatioRequest, UpdateTablePropertyRequest, UpdateTaskRequest, UpdateTextElementsRequest, UpdateTextRequest, UpdateTextStyleRequest } 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/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/chat-announcement/get
8
- */
9
- getDocxChatAnnouncement(chat_id: string, query?: GetDocxChatAnnouncementQuery): Promise<GetDocxChatAnnouncementResponse>;
10
- /**
11
- * 获取群公告所有块
12
- * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/chat-announcement-block/list
13
- */
14
- listDocxChatAnnouncementBlock(chat_id: string, query?: ListDocxChatAnnouncementBlockQuery): Paginated<Block>;
15
- /**
16
- * 在群公告中创建块
17
- * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/chat-announcement-block-children/create
18
- */
19
- createDocxChatAnnouncementBlockChildren(chat_id: string, block_id: string, body: CreateDocxChatAnnouncementBlockChildrenRequest, query?: CreateDocxChatAnnouncementBlockChildrenQuery): Promise<CreateDocxChatAnnouncementBlockChildrenResponse>;
20
- /**
21
- * 批量更新群公告块的内容
22
- * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/chat-announcement-block/batch_update
23
- */
24
- batchUpdateDocxChatAnnouncementBlock(chat_id: string, body: BatchUpdateDocxChatAnnouncementBlockRequest, query?: BatchUpdateDocxChatAnnouncementBlockQuery): Promise<BatchUpdateDocxChatAnnouncementBlockResponse>;
25
- /**
26
- * 获取群公告块的内容
27
- * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/chat-announcement-block/get
28
- */
29
- getDocxChatAnnouncementBlock(chat_id: string, block_id: string, query?: GetDocxChatAnnouncementBlockQuery): Promise<GetDocxChatAnnouncementBlockResponse>;
30
- /**
31
- * 获取所有子块
32
- * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/chat-announcement-block-children/get
33
- */
34
- getDocxChatAnnouncementBlockChildren(chat_id: string, block_id: string, query?: GetDocxChatAnnouncementBlockChildrenQuery): Paginated<Block>;
35
- /**
36
- * 删除群公告中的块
37
- * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/chat-announcement-block-children/batch_delete
38
- */
39
- batchDeleteDocxChatAnnouncementBlockChildren(chat_id: string, block_id: string, body: BatchDeleteDocxChatAnnouncementBlockChildrenRequest, query?: BatchDeleteDocxChatAnnouncementBlockChildrenQuery): Promise<BatchDeleteDocxChatAnnouncementBlockChildrenResponse>;
40
- /**
41
- * 创建文档
42
- * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document/create
43
- */
44
- createDocxDocument(body: CreateDocxDocumentRequest): Promise<CreateDocxDocumentResponse>;
45
- /**
46
- * 获取文档基本信息
47
- * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document/get
48
- */
49
- getDocxDocument(document_id: string): Promise<GetDocxDocumentResponse>;
50
- /**
51
- * 获取文档纯文本内容
52
- * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document/raw_content
53
- */
54
- rawContentDocxDocument(document_id: string, query?: RawContentDocxDocumentQuery): Promise<RawContentDocxDocumentResponse>;
55
- /**
56
- * 获取文档所有块
57
- * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block/list
58
- */
59
- listDocxDocumentBlock(document_id: string, query?: ListDocxDocumentBlockQuery): Paginated<Block>;
60
- /**
61
- * 创建块
62
- * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block-children/create
63
- */
64
- createDocxDocumentBlockChildren(document_id: string, block_id: string, body: CreateDocxDocumentBlockChildrenRequest, query?: CreateDocxDocumentBlockChildrenQuery): Promise<CreateDocxDocumentBlockChildrenResponse>;
65
- /**
66
- * 创建嵌套块
67
- * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block-descendant/create
68
- */
69
- createDocxDocumentBlockDescendant(document_id: string, block_id: string, body: CreateDocxDocumentBlockDescendantRequest, query?: CreateDocxDocumentBlockDescendantQuery): Promise<CreateDocxDocumentBlockDescendantResponse>;
70
- /**
71
- * 更新块的内容
72
- * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block/patch
73
- */
74
- patchDocxDocumentBlock(document_id: string, block_id: string, body: PatchDocxDocumentBlockRequest, query?: PatchDocxDocumentBlockQuery): Promise<PatchDocxDocumentBlockResponse>;
75
- /**
76
- * 获取块的内容
77
- * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block/get
78
- */
79
- getDocxDocumentBlock(document_id: string, block_id: string, query?: GetDocxDocumentBlockQuery): Promise<GetDocxDocumentBlockResponse>;
80
- /**
81
- * 批量更新块的内容
82
- * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block/batch_update
83
- */
84
- batchUpdateDocxDocumentBlock(document_id: string, body: BatchUpdateDocxDocumentBlockRequest, query?: BatchUpdateDocxDocumentBlockQuery): Promise<BatchUpdateDocxDocumentBlockResponse>;
85
- /**
86
- * 获取所有子块
87
- * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block-children/get
88
- */
89
- getDocxDocumentBlockChildren(document_id: string, block_id: string, query?: GetDocxDocumentBlockChildrenQuery): Paginated<Block>;
90
- /**
91
- * 删除块
92
- * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block-children/batch_delete
93
- */
94
- batchDeleteDocxDocumentBlockChildren(document_id: string, block_id: string, body: BatchDeleteDocxDocumentBlockChildrenRequest, query?: BatchDeleteDocxDocumentBlockChildrenQuery): Promise<BatchDeleteDocxDocumentBlockChildrenResponse>;
5
+ docx: Docx.Methods;
95
6
  }
96
7
  }
97
- export interface GetDocxChatAnnouncementQuery {
98
- /** 此次调用中使用的用户ID的类型 */
99
- user_id_type?: 'user_id' | 'union_id' | 'open_id';
100
- }
101
- export interface GetDocxChatAnnouncementResponse {
102
- /** 当前版本号 */
103
- revision_id?: number;
104
- /** 群公告生成的时间戳(秒) */
105
- create_time?: string;
106
- /** 群公告更新的时间戳(秒) */
107
- update_time?: string;
108
- /** 群公告所有者 ID,ID 值与 owner_id_type 中的ID类型对应 */
109
- owner_id?: string;
110
- /** 群公告所有者的 ID 类型 */
111
- owner_id_type?: 'user_id' | 'union_id' | 'open_id';
112
- /** 群公告最新修改者 ID,ID 值与 modifier_id_type 中的ID类型对应 */
113
- modifier_id?: string;
114
- /** 群公告最新修改者 id 类型 */
115
- modifier_id_type?: 'user_id' | 'union_id' | 'open_id';
116
- /** 群公告类型 */
117
- announcement_type?: 'docx' | 'doc';
118
- }
119
- export interface ListDocxChatAnnouncementBlockQuery extends Pagination {
120
- /** 查询的群公告版本,-1 表示群公告最新版本。群公告创建后,版本为 1。若查询的版本为群公告最新版本,则需要持有群公告的阅读权限;若查询的版本为群公告的历史版本,则需要持有群公告的编辑权限。 */
121
- revision_id?: number;
122
- /** 此次调用中使用的用户ID的类型 */
123
- user_id_type?: 'user_id' | 'union_id' | 'open_id';
124
- }
125
- export interface CreateDocxChatAnnouncementBlockChildrenRequest {
126
- /** 添加的孩子列表。 */
127
- children?: Block[];
128
- /** 当前 block children 中的插入位置,起始值为 0,最大值为原 children 长度 */
129
- index?: number;
130
- }
131
- export interface CreateDocxChatAnnouncementBlockChildrenQuery {
132
- /** 要操作的群公告版本。-1 表示群公告最新版本。群公告创建后,版本为 1。你需确保你已拥有群公告的编辑权限 */
133
- revision_id?: number;
134
- /** 操作的唯一标识,与接口返回值的 client_token 相对应,用于幂等的进行更新操作。此值为空表示将发起一次新的请求,此值非空表示幂等的进行更新操作。 */
135
- client_token?: string;
136
- /** 此次调用中使用的用户ID的类型 */
137
- user_id_type?: 'user_id' | 'union_id' | 'open_id';
138
- }
139
- export interface CreateDocxChatAnnouncementBlockChildrenResponse {
140
- /** 所添加的孩子的 Block 信息 */
141
- children?: Block[];
142
- /** 当前 Block Children 创建成功后群公告的版本号 */
143
- revision_id?: number;
144
- /** 操作的唯一标识,更新请求中使用此值表示幂等的进行此次更新 */
145
- client_token?: string;
146
- }
147
- export interface BatchUpdateDocxChatAnnouncementBlockRequest {
148
- /** 批量更新 Block */
149
- requests?: UpdateBlockRequest[];
150
- }
151
- export interface BatchUpdateDocxChatAnnouncementBlockQuery {
152
- /** 要操作的群公告版本。-1 表示群公告最新版本。群公告创建后,版本为 1。你需确保你已拥有群公告的编辑权限。 */
153
- revision_id?: number;
154
- /** 操作的唯一标识,与接口返回值的 client_token 相对应,用于幂等的进行更新操作。此值为空表示将发起一次新的请求,此值非空表示幂等的进行更新操作。 */
155
- client_token?: string;
156
- /** 此次调用中使用的用户ID的类型 */
157
- user_id_type?: 'user_id' | 'union_id' | 'open_id';
158
- }
159
- export interface BatchUpdateDocxChatAnnouncementBlockResponse {
160
- /** 批量更新的 Block */
161
- blocks?: Block[];
162
- /** 当前更新成功后群公告的版本号 */
163
- revision_id?: number;
164
- /** 操作的唯一标识,更新请求中使用此值表示幂等的进行此次更新 */
165
- client_token?: string;
166
- }
167
- export interface GetDocxChatAnnouncementBlockQuery {
168
- /** 查询的群公告版本,-1 表示群公告最新版本。群公告创建后,版本为 1。若查询的版本为群公告最新版本,则需要持有群公告的阅读权限;若查询的版本为群公告的历史版本,则需要持有群公告的更新权限 */
169
- revision_id?: number;
170
- /** 此次调用中使用的用户ID的类型 */
171
- user_id_type?: 'user_id' | 'union_id' | 'open_id';
172
- }
173
- export interface GetDocxChatAnnouncementBlockResponse {
174
- /** 查询的 Block 的信息 */
175
- block?: Block;
176
- }
177
- export interface GetDocxChatAnnouncementBlockChildrenQuery extends Pagination {
178
- /** 查询的群公告版本,-1 表示群公告最新版本。群公告创建后,版本为 1。若查询的版本为群公告最新版本,则需要持有群公告的阅读权限;若查询的版本为群公告的历史版本,则需要持有群公告的更新权限。 */
179
- revision_id?: number;
180
- /** 此次调用中使用的用户ID的类型 */
181
- user_id_type?: 'user_id' | 'union_id' | 'open_id';
182
- }
183
- export interface BatchDeleteDocxChatAnnouncementBlockChildrenRequest {
184
- /** 删除的起始索引(操作区间左闭右开) */
185
- start_index: number;
186
- /** 删除的末尾索引(操作区间左闭右开) */
187
- end_index: number;
188
- }
189
- export interface BatchDeleteDocxChatAnnouncementBlockChildrenQuery {
190
- /** 要操作的群公告版本。-1 表示群公告最新版本。群公告创建后,版本为 1。你需确保你已拥有群公告的编辑权限 */
191
- revision_id?: number;
192
- /** 操作的唯一标识,与接口返回值的 client_token 相对应,用于幂等的进行更新操作。此值为空表示将发起一次新的请求,此值非空表示幂等的进行更新操作。 */
193
- client_token?: string;
194
- }
195
- export interface BatchDeleteDocxChatAnnouncementBlockChildrenResponse {
196
- /** 当前删除操作成功后群公告的版本号 */
197
- revision_id?: number;
198
- /** 操作的唯一标识,更新请求中使用此值表示幂等的进行此次更新 */
199
- client_token?: string;
200
- }
201
- export interface CreateDocxDocumentRequest {
202
- /** 文件夹 token,获取方式见云文档接口快速入门;空表示根目录,tenant_access_token应用权限仅允许操作应用创建的目录 */
203
- folder_token?: string;
204
- /** 文档标题,只支持纯文本 */
205
- title?: string;
206
- }
207
- export interface CreateDocxDocumentResponse {
208
- /** 新建文档的文档信息 */
209
- document?: Document;
210
- }
211
- export interface GetDocxDocumentResponse {
212
- /** 文档信息 */
213
- document?: Document;
214
- }
215
- export declare const enum RawContentDocxDocumentQueryLang {
216
- /** 中文 */
217
- ZH = 0,
218
- /** 英文 */
219
- EN = 1,
220
- /** 日文 */
221
- JP = 2
222
- }
223
- export interface RawContentDocxDocumentQuery {
224
- /** 语言(用于 MentionUser 语言的选取) */
225
- lang?: RawContentDocxDocumentQueryLang;
226
- }
227
- export interface RawContentDocxDocumentResponse {
228
- /** 文档纯文本 */
229
- content?: string;
230
- }
231
- export interface ListDocxDocumentBlockQuery extends Pagination {
232
- /** 查询的文档版本,-1表示文档最新版本。若此时查询的版本为文档最新版本,则需要持有文档的阅读权限;若此时查询的版本为文档的历史版本,则需要持有文档的编辑权限。 */
233
- document_revision_id?: number;
234
- /** 此次调用中使用的用户ID的类型 */
235
- user_id_type?: 'user_id' | 'union_id' | 'open_id';
236
- }
237
- export interface CreateDocxDocumentBlockChildrenRequest {
238
- /** 添加的孩子列表。 */
239
- children?: Block[];
240
- /** 当前 block 在 children 中的插入位置,起始值为 0,最大值为原 children 长度 */
241
- index?: number;
242
- }
243
- export interface CreateDocxDocumentBlockChildrenQuery {
244
- /** 操作的文档版本,-1表示文档最新版本。若此时操作的版本为文档最新版本,则需要持有文档的阅读权限;若此时操作的版本为文档的历史版本,则需要持有文档的编辑权限。 */
245
- document_revision_id?: number;
246
- /** 操作的唯一标识,与接口返回值的 client_token 相对应,用于幂等的进行更新操作。此值为空表示将发起一次新的请求,此值非空表示幂等的进行更新操作。 */
247
- client_token?: string;
248
- /** 此次调用中使用的用户ID的类型 */
249
- user_id_type?: 'user_id' | 'union_id' | 'open_id';
250
- }
251
- export interface CreateDocxDocumentBlockChildrenResponse {
252
- /** 所添加的孩子的 Block 信息 */
253
- children?: Block[];
254
- /** 当前 block children 创建成功后文档的版本号 */
255
- document_revision_id?: number;
256
- /** 操作的唯一标识,更新请求中使用此值表示幂等的进行此次更新 */
257
- client_token: string;
258
- }
259
- export interface CreateDocxDocumentBlockDescendantRequest {
260
- /** 添加的孩子 BlockID 列表 */
261
- children_id: string[];
262
- /** 当前 Block 在 Children 中的插入位置,起始值为 0,最大值为原 Children 长度 */
263
- index?: number;
264
- /** 添加的子孙列表,包括孩子 */
265
- descendants: Block[];
266
- }
267
- export interface CreateDocxDocumentBlockDescendantQuery {
268
- /** 操作的文档版本,-1 表示文档最新版本。若此时操作的版本为文档最新版本,则需要持有文档的阅读权限;若此时操作的版本为文档的历史版本,则需要持有文档的编辑权限 */
269
- document_revision_id?: number;
270
- /** 操作的唯一标识,与接口返回值的 client_token 相对应,用于幂等的进行更新操作。此值为空表示将发起一次新的请求,此值非空表示幂等的进行更新操作 */
271
- client_token?: string;
272
- /** 此次调用中使用的用户ID的类型 */
273
- user_id_type?: 'user_id' | 'union_id' | 'open_id';
274
- }
275
- export interface CreateDocxDocumentBlockDescendantResponse {
276
- /** 所添加的孩子的 Block 信息 */
277
- children?: Block[];
278
- /** 当前提交的 Block 创建成功后文档的版本号 */
279
- document_revision_id?: number;
280
- /** 操作的唯一标识,更新请求中使用此值表示幂等的进行此次更新 */
281
- client_token?: string;
282
- /** 传入的临时 BlockID 与真实 BlockID 映射关系 */
283
- block_id_relations?: BlockIdRelation[];
284
- }
285
- export interface PatchDocxDocumentBlockRequest {
286
- /** 更新文本元素请求 */
287
- update_text_elements?: UpdateTextElementsRequest;
288
- /** 更新文本样式请求 */
289
- update_text_style?: UpdateTextStyleRequest;
290
- /** 更新表格属性请求 */
291
- update_table_property?: UpdateTablePropertyRequest;
292
- /** 表格插入新行请求 */
293
- insert_table_row?: InsertTableRowRequest;
294
- /** 表格插入新列请求 */
295
- insert_table_column?: InsertTableColumnRequest;
296
- /** 表格批量删除行请求 */
297
- delete_table_rows?: DeleteTableRowsRequest;
298
- /** 表格批量删除列请求 */
299
- delete_table_columns?: DeleteTableColumnsRequest;
300
- /** 表格合并单元格请求 */
301
- merge_table_cells?: MergeTableCellsRequest;
302
- /** 表格取消单元格合并状态请求 */
303
- unmerge_table_cells?: UnmergeTableCellsRequest;
304
- /** 分栏插入新的分栏列请求 */
305
- insert_grid_column?: InsertGridColumnRequest;
306
- /** 分栏删除列请求 */
307
- delete_grid_column?: DeleteGridColumnRequest;
308
- /** 更新分栏列宽比例请求 */
309
- update_grid_column_width_ratio?: UpdateGridColumnWidthRatioRequest;
310
- /** 替换图片请求 */
311
- replace_image?: ReplaceImageRequest;
312
- /** 替换附件请求 */
313
- replace_file?: ReplaceFileRequest;
314
- /** 更新文本元素及样式请求 */
315
- update_text?: UpdateTextRequest;
316
- /** 更新任务 Block 请求 */
317
- update_task?: UpdateTaskRequest;
318
- }
319
- export interface PatchDocxDocumentBlockQuery {
320
- /** 操作的文档版本,-1表示文档最新版本。若此时操作的版本为文档最新版本,则需要持有文档的阅读权限;若此时操作的版本为文档的历史版本,则需要持有文档的编辑权限。 */
321
- document_revision_id?: number;
322
- /** 操作的唯一标识,与接口返回值的 client_token 相对应,用于幂等的进行更新操作。此值为空表示将发起一次新的请求,此值非空表示幂等的进行更新操作。 */
323
- client_token?: string;
324
- /** 此次调用中使用的用户ID的类型 */
325
- user_id_type?: 'user_id' | 'union_id' | 'open_id';
326
- }
327
- export interface PatchDocxDocumentBlockResponse {
328
- /** 更新后的 block 信息 */
329
- block?: Block;
330
- /** 当前更新成功后文档的版本号 */
331
- document_revision_id?: number;
332
- /** 操作的唯一标识,更新请求中使用此值表示幂等的进行此次更新 */
333
- client_token: string;
334
- }
335
- export interface GetDocxDocumentBlockQuery {
336
- /** 查询的文档版本,-1表示文档最新版本。若此时查询的版本为文档最新版本,则需要持有文档的阅读权限;若此时查询的版本为文档的历史版本,则需要持有文档的编辑权限。 */
337
- document_revision_id?: number;
338
- /** 此次调用中使用的用户ID的类型 */
339
- user_id_type?: 'user_id' | 'union_id' | 'open_id';
340
- }
341
- export interface GetDocxDocumentBlockResponse {
342
- /** 查询的 Block 的信息 */
343
- block?: Block;
344
- }
345
- export interface BatchUpdateDocxDocumentBlockRequest {
346
- /** 批量更新 Block */
347
- requests: UpdateBlockRequest[];
348
- }
349
- export interface BatchUpdateDocxDocumentBlockQuery {
350
- /** 操作的文档版本,-1表示文档最新版本。若此时操作的版本为文档最新版本,则需要持有文档的阅读权限;若此时操作的版本为文档的历史版本,则需要持有文档的编辑权限。 */
351
- document_revision_id?: number;
352
- /** 操作的唯一标识,与接口返回值的 client_token 相对应,用于幂等的进行更新操作。此值为空表示将发起一次新的请求,此值非空表示幂等的进行更新操作。 */
353
- client_token?: string;
354
- /** 此次调用中使用的用户ID的类型 */
355
- user_id_type?: 'user_id' | 'union_id' | 'open_id';
356
- }
357
- export interface BatchUpdateDocxDocumentBlockResponse {
358
- /** 批量更新的 Block */
359
- blocks?: Block[];
360
- /** 当前更新成功后文档的版本号 */
361
- document_revision_id?: number;
362
- /** 操作的唯一标识,更新请求中使用此值表示幂等的进行此次更新 */
363
- client_token: string;
364
- }
365
- export interface GetDocxDocumentBlockChildrenQuery extends Pagination {
366
- /** 操作的文档版本,-1表示文档最新版本。若此时操作的版本为文档最新版本,则需要持有文档的阅读权限;若此时操作的版本为文档的历史版本,则需要持有文档的编辑权限。 */
367
- document_revision_id?: number;
368
- /** 此次调用中使用的用户ID的类型 */
369
- user_id_type?: 'user_id' | 'union_id' | 'open_id';
370
- }
371
- export interface BatchDeleteDocxDocumentBlockChildrenRequest {
372
- /** 删除的起始索引(操作区间左闭右开) */
373
- start_index: number;
374
- /** 删除的末尾索引(操作区间左闭右开) */
375
- end_index: number;
376
- }
377
- export interface BatchDeleteDocxDocumentBlockChildrenQuery {
378
- /** 操作的文档版本,-1表示文档最新版本。若此时操作的版本为文档最新版本,则需要持有文档的阅读权限;若此时操作的版本为文档的历史版本,则需要持有文档的编辑权限。 */
379
- document_revision_id?: number;
380
- /** 操作的唯一标识,与接口返回值的 client_token 相对应,用于幂等的进行更新操作。此值为空表示将发起一次新的请求,此值非空表示幂等的进行更新操作。 */
381
- client_token?: string;
382
- }
383
- export interface BatchDeleteDocxDocumentBlockChildrenResponse {
384
- /** 当前删除操作成功后文档的版本号 */
385
- document_revision_id?: number;
386
- /** 操作的唯一标识,更新请求中使用此值表示幂等的进行此次更新 */
387
- client_token: string;
8
+ export declare namespace Docx {
9
+ interface Methods {
10
+ chat: Chat.Methods;
11
+ document: Document.Methods;
12
+ }
13
+ namespace Chat {
14
+ interface Methods {
15
+ announcement: Announcement.Methods;
16
+ }
17
+ namespace Announcement {
18
+ interface Methods {
19
+ block: Block.Methods;
20
+ /**
21
+ * 获取群公告基本信息
22
+ * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/chat-announcement/get
23
+ */
24
+ get(chat_id: string, query?: GetQuery): Promise<GetResponse>;
25
+ }
26
+ interface GetQuery {
27
+ /** 此次调用中使用的用户ID的类型 */
28
+ user_id_type?: 'user_id' | 'union_id' | 'open_id';
29
+ }
30
+ interface GetResponse {
31
+ /** 当前版本号 */
32
+ revision_id?: number;
33
+ /** 群公告生成的时间戳(秒) */
34
+ create_time?: string;
35
+ /** 群公告更新的时间戳(秒) */
36
+ update_time?: string;
37
+ /** 群公告所有者 ID,ID 值与 owner_id_type 中的ID类型对应 */
38
+ owner_id?: string;
39
+ /** 群公告所有者的 ID 类型 */
40
+ owner_id_type?: 'user_id' | 'union_id' | 'open_id';
41
+ /** 群公告最新修改者 ID,ID 值与 modifier_id_type 中的ID类型对应 */
42
+ modifier_id?: string;
43
+ /** 群公告最新修改者 id 类型 */
44
+ modifier_id_type?: 'user_id' | 'union_id' | 'open_id';
45
+ /** 群公告类型 */
46
+ announcement_type?: 'docx' | 'doc';
47
+ }
48
+ namespace Block {
49
+ interface Methods {
50
+ children: Children.Methods;
51
+ /**
52
+ * 获取群公告所有块
53
+ * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/chat-announcement-block/list
54
+ */
55
+ list(chat_id: string, query?: ListQuery): Paginated<Lark.Block>;
56
+ /**
57
+ * 批量更新群公告块的内容
58
+ * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/chat-announcement-block/batch_update
59
+ */
60
+ batchUpdate(chat_id: string, body: BatchUpdateRequest, query?: BatchUpdateQuery): Promise<BatchUpdateResponse>;
61
+ /**
62
+ * 获取群公告块的内容
63
+ * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/chat-announcement-block/get
64
+ */
65
+ get(chat_id: string, block_id: string, query?: GetQuery): Promise<GetResponse>;
66
+ }
67
+ interface ListQuery extends Pagination {
68
+ /** 查询的群公告版本,-1 表示群公告最新版本。群公告创建后,版本为 1。若查询的版本为群公告最新版本,则需要持有群公告的阅读权限;若查询的版本为群公告的历史版本,则需要持有群公告的编辑权限。 */
69
+ revision_id?: number;
70
+ /** 此次调用中使用的用户ID的类型 */
71
+ user_id_type?: 'user_id' | 'union_id' | 'open_id';
72
+ }
73
+ interface BatchUpdateRequest {
74
+ /** 批量更新 Block */
75
+ requests?: Lark.UpdateBlockRequest[];
76
+ }
77
+ interface BatchUpdateQuery {
78
+ /** 要操作的群公告版本。-1 表示群公告最新版本。群公告创建后,版本为 1。你需确保你已拥有群公告的编辑权限。 */
79
+ revision_id?: number;
80
+ /** 操作的唯一标识,与接口返回值的 client_token 相对应,用于幂等的进行更新操作。此值为空表示将发起一次新的请求,此值非空表示幂等的进行更新操作。 */
81
+ client_token?: string;
82
+ /** 此次调用中使用的用户ID的类型 */
83
+ user_id_type?: 'user_id' | 'union_id' | 'open_id';
84
+ }
85
+ interface BatchUpdateResponse {
86
+ /** 批量更新的 Block */
87
+ blocks?: Lark.Block[];
88
+ /** 当前更新成功后群公告的版本号 */
89
+ revision_id?: number;
90
+ /** 操作的唯一标识,更新请求中使用此值表示幂等的进行此次更新 */
91
+ client_token?: string;
92
+ }
93
+ interface GetQuery {
94
+ /** 查询的群公告版本,-1 表示群公告最新版本。群公告创建后,版本为 1。若查询的版本为群公告最新版本,则需要持有群公告的阅读权限;若查询的版本为群公告的历史版本,则需要持有群公告的更新权限 */
95
+ revision_id?: number;
96
+ /** 此次调用中使用的用户ID的类型 */
97
+ user_id_type?: 'user_id' | 'union_id' | 'open_id';
98
+ }
99
+ interface GetResponse {
100
+ /** 查询的 Block 的信息 */
101
+ block?: Lark.Block;
102
+ }
103
+ namespace Children {
104
+ interface Methods {
105
+ /**
106
+ * 在群公告中创建块
107
+ * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/chat-announcement-block-children/create
108
+ */
109
+ create(chat_id: string, block_id: string, body: CreateRequest, query?: CreateQuery): Promise<CreateResponse>;
110
+ /**
111
+ * 获取所有子块
112
+ * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/chat-announcement-block-children/get
113
+ */
114
+ get(chat_id: string, block_id: string, query?: GetQuery): Paginated<Lark.Block>;
115
+ /**
116
+ * 删除群公告中的块
117
+ * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/chat-announcement-block-children/batch_delete
118
+ */
119
+ batchDelete(chat_id: string, block_id: string, body: BatchDeleteRequest, query?: BatchDeleteQuery): Promise<BatchDeleteResponse>;
120
+ }
121
+ interface CreateRequest {
122
+ /** 添加的孩子列表。 */
123
+ children?: Lark.Block[];
124
+ /** 当前 block 在 children 中的插入位置,起始值为 0,最大值为原 children 长度 */
125
+ index?: number;
126
+ }
127
+ interface CreateQuery {
128
+ /** 要操作的群公告版本。-1 表示群公告最新版本。群公告创建后,版本为 1。你需确保你已拥有群公告的编辑权限 */
129
+ revision_id?: number;
130
+ /** 操作的唯一标识,与接口返回值的 client_token 相对应,用于幂等的进行更新操作。此值为空表示将发起一次新的请求,此值非空表示幂等的进行更新操作。 */
131
+ client_token?: string;
132
+ /** 此次调用中使用的用户ID的类型 */
133
+ user_id_type?: 'user_id' | 'union_id' | 'open_id';
134
+ }
135
+ interface CreateResponse {
136
+ /** 所添加的孩子的 Block 信息 */
137
+ children?: Lark.Block[];
138
+ /** 当前 Block Children 创建成功后群公告的版本号 */
139
+ revision_id?: number;
140
+ /** 操作的唯一标识,更新请求中使用此值表示幂等的进行此次更新 */
141
+ client_token?: string;
142
+ }
143
+ interface GetQuery extends Pagination {
144
+ /** 查询的群公告版本,-1 表示群公告最新版本。群公告创建后,版本为 1。若查询的版本为群公告最新版本,则需要持有群公告的阅读权限;若查询的版本为群公告的历史版本,则需要持有群公告的更新权限。 */
145
+ revision_id?: number;
146
+ /** 此次调用中使用的用户ID的类型 */
147
+ user_id_type?: 'user_id' | 'union_id' | 'open_id';
148
+ }
149
+ interface BatchDeleteRequest {
150
+ /** 删除的起始索引(操作区间左闭右开) */
151
+ start_index: number;
152
+ /** 删除的末尾索引(操作区间左闭右开) */
153
+ end_index: number;
154
+ }
155
+ interface BatchDeleteQuery {
156
+ /** 要操作的群公告版本。-1 表示群公告最新版本。群公告创建后,版本为 1。你需确保你已拥有群公告的编辑权限 */
157
+ revision_id?: number;
158
+ /** 操作的唯一标识,与接口返回值的 client_token 相对应,用于幂等的进行更新操作。此值为空表示将发起一次新的请求,此值非空表示幂等的进行更新操作。 */
159
+ client_token?: string;
160
+ }
161
+ interface BatchDeleteResponse {
162
+ /** 当前删除操作成功后群公告的版本号 */
163
+ revision_id?: number;
164
+ /** 操作的唯一标识,更新请求中使用此值表示幂等的进行此次更新 */
165
+ client_token?: string;
166
+ }
167
+ }
168
+ }
169
+ }
170
+ }
171
+ namespace Document {
172
+ interface Methods {
173
+ block: Block.Methods;
174
+ /**
175
+ * 创建文档
176
+ * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document/create
177
+ */
178
+ create(body: CreateRequest): Promise<CreateResponse>;
179
+ /**
180
+ * 获取文档基本信息
181
+ * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document/get
182
+ */
183
+ get(document_id: string): Promise<GetResponse>;
184
+ /**
185
+ * 获取文档纯文本内容
186
+ * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document/raw_content
187
+ */
188
+ rawContent(document_id: string, query?: RawContentQuery): Promise<RawContentResponse>;
189
+ }
190
+ interface CreateRequest {
191
+ /** 文件夹 token,获取方式见云文档接口快速入门;空表示根目录,tenant_access_token应用权限仅允许操作应用创建的目录 */
192
+ folder_token?: string;
193
+ /** 文档标题,只支持纯文本 */
194
+ title?: string;
195
+ }
196
+ interface CreateResponse {
197
+ /** 新建文档的文档信息 */
198
+ document?: Lark.Document;
199
+ }
200
+ interface GetResponse {
201
+ /** 文档信息 */
202
+ document?: Lark.Document;
203
+ }
204
+ const enum RawContentQueryLang {
205
+ /** 中文 */
206
+ ZH = 0,
207
+ /** 英文 */
208
+ EN = 1,
209
+ /** 日文 */
210
+ JP = 2
211
+ }
212
+ interface RawContentQuery {
213
+ /** 语言(用于 MentionUser 语言的选取) */
214
+ lang?: RawContentQueryLang;
215
+ }
216
+ interface RawContentResponse {
217
+ /** 文档纯文本 */
218
+ content?: string;
219
+ }
220
+ namespace Block {
221
+ interface Methods {
222
+ children: Children.Methods;
223
+ descendant: Descendant.Methods;
224
+ /**
225
+ * 获取文档所有块
226
+ * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block/list
227
+ */
228
+ list(document_id: string, query?: ListQuery): Paginated<Lark.Block>;
229
+ /**
230
+ * 更新块的内容
231
+ * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block/patch
232
+ */
233
+ patch(document_id: string, block_id: string, body: PatchRequest, query?: PatchQuery): Promise<PatchResponse>;
234
+ /**
235
+ * 获取块的内容
236
+ * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block/get
237
+ */
238
+ get(document_id: string, block_id: string, query?: GetQuery): Promise<GetResponse>;
239
+ /**
240
+ * 批量更新块的内容
241
+ * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block/batch_update
242
+ */
243
+ batchUpdate(document_id: string, body: BatchUpdateRequest, query?: BatchUpdateQuery): Promise<BatchUpdateResponse>;
244
+ }
245
+ interface ListQuery extends Pagination {
246
+ /** 查询的文档版本,-1表示文档最新版本。若此时查询的版本为文档最新版本,则需要持有文档的阅读权限;若此时查询的版本为文档的历史版本,则需要持有文档的编辑权限。 */
247
+ document_revision_id?: number;
248
+ /** 此次调用中使用的用户ID的类型 */
249
+ user_id_type?: 'user_id' | 'union_id' | 'open_id';
250
+ }
251
+ interface PatchRequest {
252
+ /** 更新文本元素请求 */
253
+ update_text_elements?: Lark.UpdateTextElementsRequest;
254
+ /** 更新文本样式请求 */
255
+ update_text_style?: Lark.UpdateTextStyleRequest;
256
+ /** 更新表格属性请求 */
257
+ update_table_property?: Lark.UpdateTablePropertyRequest;
258
+ /** 表格插入新行请求 */
259
+ insert_table_row?: Lark.InsertTableRowRequest;
260
+ /** 表格插入新列请求 */
261
+ insert_table_column?: Lark.InsertTableColumnRequest;
262
+ /** 表格批量删除行请求 */
263
+ delete_table_rows?: Lark.DeleteTableRowsRequest;
264
+ /** 表格批量删除列请求 */
265
+ delete_table_columns?: Lark.DeleteTableColumnsRequest;
266
+ /** 表格合并单元格请求 */
267
+ merge_table_cells?: Lark.MergeTableCellsRequest;
268
+ /** 表格取消单元格合并状态请求 */
269
+ unmerge_table_cells?: Lark.UnmergeTableCellsRequest;
270
+ /** 分栏插入新的分栏列请求 */
271
+ insert_grid_column?: Lark.InsertGridColumnRequest;
272
+ /** 分栏删除列请求 */
273
+ delete_grid_column?: Lark.DeleteGridColumnRequest;
274
+ /** 更新分栏列宽比例请求 */
275
+ update_grid_column_width_ratio?: Lark.UpdateGridColumnWidthRatioRequest;
276
+ /** 替换图片请求 */
277
+ replace_image?: Lark.ReplaceImageRequest;
278
+ /** 替换附件请求 */
279
+ replace_file?: Lark.ReplaceFileRequest;
280
+ /** 更新文本元素及样式请求 */
281
+ update_text?: Lark.UpdateTextRequest;
282
+ /** 更新任务 Block 请求 */
283
+ update_task?: Lark.UpdateTaskRequest;
284
+ }
285
+ interface PatchQuery {
286
+ /** 操作的文档版本,-1表示文档最新版本。若此时操作的版本为文档最新版本,则需要持有文档的阅读权限;若此时操作的版本为文档的历史版本,则需要持有文档的编辑权限。 */
287
+ document_revision_id?: number;
288
+ /** 操作的唯一标识,与接口返回值的 client_token 相对应,用于幂等的进行更新操作。此值为空表示将发起一次新的请求,此值非空表示幂等的进行更新操作。 */
289
+ client_token?: string;
290
+ /** 此次调用中使用的用户ID的类型 */
291
+ user_id_type?: 'user_id' | 'union_id' | 'open_id';
292
+ }
293
+ interface PatchResponse {
294
+ /** 更新后的 block 信息 */
295
+ block?: Lark.Block;
296
+ /** 当前更新成功后文档的版本号 */
297
+ document_revision_id?: number;
298
+ /** 操作的唯一标识,更新请求中使用此值表示幂等的进行此次更新 */
299
+ client_token: string;
300
+ }
301
+ interface GetQuery {
302
+ /** 查询的文档版本,-1表示文档最新版本。若此时查询的版本为文档最新版本,则需要持有文档的阅读权限;若此时查询的版本为文档的历史版本,则需要持有文档的编辑权限。 */
303
+ document_revision_id?: number;
304
+ /** 此次调用中使用的用户ID的类型 */
305
+ user_id_type?: 'user_id' | 'union_id' | 'open_id';
306
+ }
307
+ interface GetResponse {
308
+ /** 查询的 Block 的信息 */
309
+ block?: Lark.Block;
310
+ }
311
+ interface BatchUpdateRequest {
312
+ /** 批量更新 Block */
313
+ requests: Lark.UpdateBlockRequest[];
314
+ }
315
+ interface BatchUpdateQuery {
316
+ /** 操作的文档版本,-1表示文档最新版本。若此时操作的版本为文档最新版本,则需要持有文档的阅读权限;若此时操作的版本为文档的历史版本,则需要持有文档的编辑权限。 */
317
+ document_revision_id?: number;
318
+ /** 操作的唯一标识,与接口返回值的 client_token 相对应,用于幂等的进行更新操作。此值为空表示将发起一次新的请求,此值非空表示幂等的进行更新操作。 */
319
+ client_token?: string;
320
+ /** 此次调用中使用的用户ID的类型 */
321
+ user_id_type?: 'user_id' | 'union_id' | 'open_id';
322
+ }
323
+ interface BatchUpdateResponse {
324
+ /** 批量更新的 Block */
325
+ blocks?: Lark.Block[];
326
+ /** 当前更新成功后文档的版本号 */
327
+ document_revision_id?: number;
328
+ /** 操作的唯一标识,更新请求中使用此值表示幂等的进行此次更新 */
329
+ client_token: string;
330
+ }
331
+ namespace Children {
332
+ interface Methods {
333
+ /**
334
+ * 创建块
335
+ * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block-children/create
336
+ */
337
+ create(document_id: string, block_id: string, body: CreateRequest, query?: CreateQuery): Promise<CreateResponse>;
338
+ /**
339
+ * 获取所有子块
340
+ * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block-children/get
341
+ */
342
+ get(document_id: string, block_id: string, query?: GetQuery): Paginated<Lark.Block>;
343
+ /**
344
+ * 删除块
345
+ * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block-children/batch_delete
346
+ */
347
+ batchDelete(document_id: string, block_id: string, body: BatchDeleteRequest, query?: BatchDeleteQuery): Promise<BatchDeleteResponse>;
348
+ }
349
+ interface CreateRequest {
350
+ /** 添加的孩子列表。 */
351
+ children?: Lark.Block[];
352
+ /** 当前 block 在 children 中的插入位置,起始值为 0,最大值为原 children 长度 */
353
+ index?: number;
354
+ }
355
+ interface CreateQuery {
356
+ /** 操作的文档版本,-1表示文档最新版本。若此时操作的版本为文档最新版本,则需要持有文档的阅读权限;若此时操作的版本为文档的历史版本,则需要持有文档的编辑权限。 */
357
+ document_revision_id?: number;
358
+ /** 操作的唯一标识,与接口返回值的 client_token 相对应,用于幂等的进行更新操作。此值为空表示将发起一次新的请求,此值非空表示幂等的进行更新操作。 */
359
+ client_token?: string;
360
+ /** 此次调用中使用的用户ID的类型 */
361
+ user_id_type?: 'user_id' | 'union_id' | 'open_id';
362
+ }
363
+ interface CreateResponse {
364
+ /** 所添加的孩子的 Block 信息 */
365
+ children?: Lark.Block[];
366
+ /** 当前 block children 创建成功后文档的版本号 */
367
+ document_revision_id?: number;
368
+ /** 操作的唯一标识,更新请求中使用此值表示幂等的进行此次更新 */
369
+ client_token: string;
370
+ }
371
+ interface GetQuery extends Pagination {
372
+ /** 操作的文档版本,-1表示文档最新版本。若此时操作的版本为文档最新版本,则需要持有文档的阅读权限;若此时操作的版本为文档的历史版本,则需要持有文档的编辑权限。 */
373
+ document_revision_id?: number;
374
+ /** 此次调用中使用的用户ID的类型 */
375
+ user_id_type?: 'user_id' | 'union_id' | 'open_id';
376
+ }
377
+ interface BatchDeleteRequest {
378
+ /** 删除的起始索引(操作区间左闭右开) */
379
+ start_index: number;
380
+ /** 删除的末尾索引(操作区间左闭右开) */
381
+ end_index: number;
382
+ }
383
+ interface BatchDeleteQuery {
384
+ /** 操作的文档版本,-1表示文档最新版本。若此时操作的版本为文档最新版本,则需要持有文档的阅读权限;若此时操作的版本为文档的历史版本,则需要持有文档的编辑权限。 */
385
+ document_revision_id?: number;
386
+ /** 操作的唯一标识,与接口返回值的 client_token 相对应,用于幂等的进行更新操作。此值为空表示将发起一次新的请求,此值非空表示幂等的进行更新操作。 */
387
+ client_token?: string;
388
+ }
389
+ interface BatchDeleteResponse {
390
+ /** 当前删除操作成功后文档的版本号 */
391
+ document_revision_id?: number;
392
+ /** 操作的唯一标识,更新请求中使用此值表示幂等的进行此次更新 */
393
+ client_token: string;
394
+ }
395
+ }
396
+ namespace Descendant {
397
+ interface Methods {
398
+ /**
399
+ * 创建嵌套块
400
+ * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block-descendant/create
401
+ */
402
+ create(document_id: string, block_id: string, body: CreateRequest, query?: CreateQuery): Promise<CreateResponse>;
403
+ }
404
+ interface CreateRequest {
405
+ /** 添加的孩子 BlockID 列表 */
406
+ children_id: string[];
407
+ /** 当前 Block 在 Children 中的插入位置,起始值为 0,最大值为原 Children 长度 */
408
+ index?: number;
409
+ /** 添加的子孙列表,包括孩子 */
410
+ descendants: Lark.Block[];
411
+ }
412
+ interface CreateQuery {
413
+ /** 操作的文档版本,-1 表示文档最新版本。若此时操作的版本为文档最新版本,则需要持有文档的阅读权限;若此时操作的版本为文档的历史版本,则需要持有文档的编辑权限 */
414
+ document_revision_id?: number;
415
+ /** 操作的唯一标识,与接口返回值的 client_token 相对应,用于幂等的进行更新操作。此值为空表示将发起一次新的请求,此值非空表示幂等的进行更新操作 */
416
+ client_token?: string;
417
+ /** 此次调用中使用的用户ID的类型 */
418
+ user_id_type?: 'user_id' | 'union_id' | 'open_id';
419
+ }
420
+ interface CreateResponse {
421
+ /** 所添加的孩子的 Block 信息 */
422
+ children?: Lark.Block[];
423
+ /** 当前提交的 Block 创建成功后文档的版本号 */
424
+ document_revision_id?: number;
425
+ /** 操作的唯一标识,更新请求中使用此值表示幂等的进行此次更新 */
426
+ client_token?: string;
427
+ /** 传入的临时 BlockID 与真实 BlockID 映射关系 */
428
+ block_id_relations?: Lark.BlockIdRelation[];
429
+ }
430
+ }
431
+ }
432
+ }
388
433
  }