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