@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
package/lib/types/im.d.ts CHANGED
@@ -1,1300 +1,1425 @@
1
- import { BatchMessageReadUser, BatchMessageRecallProgress, BatchMessageSendProgress, ChatMenuItem, ChatMenuTree, ChatTab, ChatTopNotice, CreateTag, CreateTagFailReason, Emoji, FailedReason, FollowUp, I18nNames, ListChat, ListMember, ListModerator, Mention, Message, MessageBody, MessageReaction, OpenAppFeedCard, OpenAppFeedCardButtons, OpenFailedUserAppFeedCardItem, Operator, PatchTag, PatchTagFailReason, Pin, ReadUser, RestrictedModeSetting, Sender, TagInfo, TagInfoWithBindVersion, UserOpenAppFeedCardDeleter, UserOpenAppFeedCardUpdater } from '.';
2
- import { Pagination } from '../internal';
1
+ import * as Lark from '.';
2
+ import { Paginated, Pagination } from '../internal';
3
3
  declare module '../internal' {
4
4
  interface Internal {
5
- /**
6
- * 发送消息
7
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/create
8
- */
9
- createImMessage(body: CreateImMessageRequest, query?: CreateImMessageQuery): Promise<CreateImMessageResponse>;
10
- /**
11
- * 回复消息
12
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/reply
13
- */
14
- replyImMessage(message_id: string, body: ReplyImMessageRequest): Promise<ReplyImMessageResponse>;
15
- /**
16
- * 编辑消息
17
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/update
18
- */
19
- updateImMessage(message_id: string, body: UpdateImMessageRequest): Promise<UpdateImMessageResponse>;
20
- /**
21
- * 转发消息
22
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/forward
23
- */
24
- forwardImMessage(message_id: string, body: ForwardImMessageRequest, query?: ForwardImMessageQuery): Promise<ForwardImMessageResponse>;
25
- /**
26
- * 合并转发消息
27
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/merge_forward
28
- */
29
- mergeForwardImMessage(body: MergeForwardImMessageRequest, query?: MergeForwardImMessageQuery): Promise<MergeForwardImMessageResponse>;
30
- /**
31
- * 转发话题
32
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/thread/forward
33
- */
34
- forwardImThread(thread_id: string, body: ForwardImThreadRequest, query?: ForwardImThreadQuery): Promise<ForwardImThreadResponse>;
35
- /**
36
- * 撤回消息
37
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/delete
38
- */
39
- deleteImMessage(message_id: string): Promise<void>;
40
- /**
41
- * 添加跟随气泡
42
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/push_follow_up
43
- */
44
- pushFollowUpImMessage(message_id: string, body: PushFollowUpImMessageRequest): Promise<void>;
45
- /**
46
- * 查询消息已读信息
47
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/read_users
48
- */
49
- readUsersImMessage(message_id: string, query?: ReadUsersImMessageQuery): Paginated<ReadUser>;
50
- /**
51
- * 获取会话历史消息
52
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/list
53
- */
54
- listImMessage(query?: ListImMessageQuery): Paginated<Message>;
55
- /**
56
- * 获取消息中的资源文件
57
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message-resource/get
58
- */
59
- getImMessageResource(message_id: string, file_key: string, query?: GetImMessageResourceQuery): Promise<ArrayBuffer>;
60
- /**
61
- * 获取指定消息的内容
62
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/get
63
- */
64
- getImMessage(message_id: string, query?: GetImMessageQuery): Promise<GetImMessageResponse>;
65
- /**
66
- * 批量撤回消息
67
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/batch_message/delete
68
- */
69
- deleteImBatchMessage(batch_message_id: string): Promise<void>;
70
- /**
71
- * 查询批量消息推送和阅读人数
72
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/batch_message/read_user
73
- */
74
- readUserImBatchMessage(batch_message_id: string): Promise<ReadUserImBatchMessageResponse>;
75
- /**
76
- * 查询批量消息整体进度
77
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/batch_message/get_progress
78
- */
79
- getProgressImBatchMessage(batch_message_id: string): Promise<GetProgressImBatchMessageResponse>;
80
- /**
81
- * 上传图片
82
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/image/create
83
- */
84
- createImImage(form: CreateImImageForm): Promise<CreateImImageResponse>;
85
- /**
86
- * 下载图片
87
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/image/get
88
- */
89
- getImImage(image_key: string): Promise<ArrayBuffer>;
90
- /**
91
- * 上传文件
92
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/file/create
93
- */
94
- createImFile(form: CreateImFileForm): Promise<CreateImFileResponse>;
95
- /**
96
- * 下载文件
97
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/file/get
98
- */
99
- getImFile(file_key: string): Promise<ArrayBuffer>;
100
- /**
101
- * 发送应用内加急
102
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/urgent_app
103
- */
104
- urgentAppImMessage(message_id: string, body: UrgentAppImMessageRequest, query?: UrgentAppImMessageQuery): Promise<UrgentAppImMessageResponse>;
105
- /**
106
- * 发送短信加急
107
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/urgent_sms
108
- */
109
- urgentSmsImMessage(message_id: string, body: UrgentSmsImMessageRequest, query?: UrgentSmsImMessageQuery): Promise<UrgentSmsImMessageResponse>;
110
- /**
111
- * 发送电话加急
112
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/urgent_phone
113
- */
114
- urgentPhoneImMessage(message_id: string, body: UrgentPhoneImMessageRequest, query?: UrgentPhoneImMessageQuery): Promise<UrgentPhoneImMessageResponse>;
115
- /**
116
- * 添加消息表情回复
117
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message-reaction/create
118
- */
119
- createImMessageReaction(message_id: string, body: CreateImMessageReactionRequest): Promise<CreateImMessageReactionResponse>;
120
- /**
121
- * 获取消息表情回复
122
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message-reaction/list
123
- */
124
- listImMessageReaction(message_id: string, query?: ListImMessageReactionQuery): Paginated<MessageReaction>;
125
- /**
126
- * 删除消息表情回复
127
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message-reaction/delete
128
- */
129
- deleteImMessageReaction(message_id: string, reaction_id: string): Promise<DeleteImMessageReactionResponse>;
130
- /**
131
- * Pin 消息
132
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/pin/create
133
- */
134
- createImPin(body: CreateImPinRequest): Promise<CreateImPinResponse>;
135
- /**
136
- * 移除 Pin 消息
137
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/pin/delete
138
- */
139
- deleteImPin(message_id: string): Promise<void>;
140
- /**
141
- * 获取群内 Pin 消息
142
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/pin/list
143
- */
144
- listImPin(query?: ListImPinQuery): Paginated<Pin>;
145
- /**
146
- * 更新应用发送的消息卡片
147
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/patch
148
- */
149
- patchImMessage(message_id: string, body: PatchImMessageRequest): Promise<void>;
150
- /**
151
- * 更新 URL 预览
152
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/group/im-v2/url_preview/batch_update
153
- */
154
- batchUpdateImUrlPreview(body: BatchUpdateImUrlPreviewRequest): Promise<void>;
155
- /**
156
- * 创建群
157
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat/create
158
- */
159
- createImChat(body: CreateImChatRequest, query?: CreateImChatQuery): Promise<CreateImChatResponse>;
160
- /**
161
- * 解散群
162
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat/delete
163
- */
164
- deleteImChat(chat_id: string): Promise<void>;
165
- /**
166
- * 更新群信息
167
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat/update
168
- */
169
- updateImChat(chat_id: string, body: UpdateImChatRequest, query?: UpdateImChatQuery): Promise<void>;
170
- /**
171
- * 更新群发言权限
172
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-moderation/update
173
- */
174
- updateImChatModeration(chat_id: string, body: UpdateImChatModerationRequest, query?: UpdateImChatModerationQuery): Promise<void>;
175
- /**
176
- * 获取群信息
177
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat/get
178
- */
179
- getImChat(chat_id: string, query?: GetImChatQuery): Promise<GetImChatResponse>;
180
- /**
181
- * 更新群置顶
182
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-top_notice/put_top_notice
183
- */
184
- putTopNoticeImChatTopNotice(chat_id: string, body: PutTopNoticeImChatTopNoticeRequest): Promise<void>;
185
- /**
186
- * 撤销群置顶
187
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-top_notice/delete_top_notice
188
- */
189
- deleteTopNoticeImChatTopNotice(chat_id: string): Promise<void>;
190
- /**
191
- * 获取用户或机器人所在的群列表
192
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat/list
193
- */
194
- listImChat(query?: ListImChatQuery): Paginated<ListChat>;
195
- /**
196
- * 搜索对用户或机器人可见的群列表
197
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat/search
198
- */
199
- searchImChat(query?: SearchImChatQuery): Paginated<ListChat>;
200
- /**
201
- * 获取群成员发言权限
202
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-moderation/get
203
- */
204
- getImChatModeration(chat_id: string, query?: GetImChatModerationQuery): Promise<GetImChatModerationResponse>;
205
- /**
206
- * 获取群分享链接
207
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat/link
208
- */
209
- linkImChat(chat_id: string, body: LinkImChatRequest): Promise<LinkImChatResponse>;
210
- /**
211
- * 指定群管理员
212
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-managers/add_managers
213
- */
214
- addManagersImChatManagers(chat_id: string, body: AddManagersImChatManagersRequest, query?: AddManagersImChatManagersQuery): Promise<AddManagersImChatManagersResponse>;
215
- /**
216
- * 删除群管理员
217
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-managers/delete_managers
218
- */
219
- deleteManagersImChatManagers(chat_id: string, body: DeleteManagersImChatManagersRequest, query?: DeleteManagersImChatManagersQuery): Promise<DeleteManagersImChatManagersResponse>;
220
- /**
221
- * 将用户或机器人拉入群聊
222
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-members/create
223
- */
224
- createImChatMembers(chat_id: string, body: CreateImChatMembersRequest, query?: CreateImChatMembersQuery): Promise<CreateImChatMembersResponse>;
225
- /**
226
- * 用户或机器人主动加入群聊
227
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-members/me_join
228
- */
229
- meJoinImChatMembers(chat_id: string): Promise<void>;
230
- /**
231
- * 将用户或机器人移出群聊
232
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-members/delete
233
- */
234
- deleteImChatMembers(chat_id: string, body: DeleteImChatMembersRequest, query?: DeleteImChatMembersQuery): Promise<DeleteImChatMembersResponse>;
235
- /**
236
- * 获取群成员列表
237
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-members/get
238
- */
239
- getImChatMembers(chat_id: string, query?: GetImChatMembersQuery): Promise<GetImChatMembersResponse>;
240
- /**
241
- * 判断用户或机器人是否在群里
242
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-members/is_in_chat
243
- */
244
- isInChatImChatMembers(chat_id: string): Promise<IsInChatImChatMembersResponse>;
245
- /**
246
- * 更新群公告信息
247
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-announcement/patch
248
- */
249
- patchImChatAnnouncement(chat_id: string, body: PatchImChatAnnouncementRequest): Promise<void>;
250
- /**
251
- * 获取群公告信息
252
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-announcement/get
253
- */
254
- getImChatAnnouncement(chat_id: string, query?: GetImChatAnnouncementQuery): Promise<GetImChatAnnouncementResponse>;
255
- /**
256
- * 添加会话标签页
257
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-tab/create
258
- */
259
- createImChatTab(chat_id: string, body: CreateImChatTabRequest): Promise<CreateImChatTabResponse>;
260
- /**
261
- * 删除会话标签页
262
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-tab/delete_tabs
263
- */
264
- deleteTabsImChatTab(chat_id: string, body: DeleteTabsImChatTabRequest): Promise<DeleteTabsImChatTabResponse>;
265
- /**
266
- * 更新会话标签页
267
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-tab/update_tabs
268
- */
269
- updateTabsImChatTab(chat_id: string, body: UpdateTabsImChatTabRequest): Promise<UpdateTabsImChatTabResponse>;
270
- /**
271
- * 会话标签页排序
272
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-tab/sort_tabs
273
- */
274
- sortTabsImChatTab(chat_id: string, body: SortTabsImChatTabRequest): Promise<SortTabsImChatTabResponse>;
275
- /**
276
- * 拉取会话标签页
277
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-tab/list_tabs
278
- */
279
- listTabsImChatTab(chat_id: string): Promise<ListTabsImChatTabResponse>;
280
- /**
281
- * 添加群菜单
282
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-menu_tree/create
283
- */
284
- createImChatMenuTree(chat_id: string, body: CreateImChatMenuTreeRequest): Promise<CreateImChatMenuTreeResponse>;
285
- /**
286
- * 删除群菜单
287
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-menu_tree/delete
288
- */
289
- deleteImChatMenuTree(chat_id: string, body: DeleteImChatMenuTreeRequest): Promise<DeleteImChatMenuTreeResponse>;
290
- /**
291
- * 修改群菜单元信息
292
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-menu_item/patch
293
- */
294
- patchImChatMenuItem(chat_id: string, menu_item_id: string, body: PatchImChatMenuItemRequest): Promise<PatchImChatMenuItemResponse>;
295
- /**
296
- * 排序群菜单
297
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-menu_tree/sort
298
- */
299
- sortImChatMenuTree(chat_id: string, body: SortImChatMenuTreeRequest): Promise<SortImChatMenuTreeResponse>;
300
- /**
301
- * 获取群菜单
302
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-menu_tree/get
303
- */
304
- getImChatMenuTree(chat_id: string): Promise<GetImChatMenuTreeResponse>;
305
- /**
306
- * 创建应用消息流卡片
307
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/group/im-v2/app_feed_card/create
308
- */
309
- createImAppFeedCard(body: CreateImAppFeedCardRequest, query?: CreateImAppFeedCardQuery): Promise<CreateImAppFeedCardResponse>;
310
- /**
311
- * 更新应用消息流卡片
312
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/group/im-v2/app_feed_card-batch/update
313
- */
314
- updateImAppFeedCardBatch(body: UpdateImAppFeedCardBatchRequest, query?: UpdateImAppFeedCardBatchQuery): Promise<UpdateImAppFeedCardBatchResponse>;
315
- /**
316
- * 删除应用消息流卡片
317
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/group/im-v2/app_feed_card-batch/delete
318
- */
319
- deleteImAppFeedCardBatch(body: DeleteImAppFeedCardBatchRequest, query?: DeleteImAppFeedCardBatchQuery): Promise<DeleteImAppFeedCardBatchResponse>;
320
- /**
321
- * 机器人单聊即时提醒
322
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/group/im-v2/feed_card/bot_time_sentive
323
- */
324
- botTimeSentiveImFeedCard(body: BotTimeSentiveImFeedCardRequest, query?: BotTimeSentiveImFeedCardQuery): Promise<BotTimeSentiveImFeedCardResponse>;
325
- /**
326
- * 更新消息流卡片按钮
327
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/group/im-v2/chat_button/update
328
- */
329
- updateImChatButton(body: UpdateImChatButtonRequest, query?: UpdateImChatButtonQuery): Promise<UpdateImChatButtonResponse>;
330
- /**
331
- * 即时提醒
332
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/group/im-v2/feed_card/patch
333
- */
334
- patchImFeedCard(feed_card_id: string, body: PatchImFeedCardRequest, query?: PatchImFeedCardQuery): Promise<PatchImFeedCardResponse>;
335
- /**
336
- * 查询实体与标签的绑定关系
337
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/group/im-v2/biz_entity_tag_relation/get
338
- */
339
- getImBizEntityTagRelation(query?: GetImBizEntityTagRelationQuery): Promise<GetImBizEntityTagRelationResponse>;
340
- /**
341
- * 创建标签
342
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/group/im-v2/tag/create
343
- */
344
- createImTag(body: CreateImTagRequest): Promise<CreateImTagResponse>;
345
- /**
346
- * 修改标签
347
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/group/im-v2/tag/patch
348
- */
349
- patchImTag(tag_id: string, body: PatchImTagRequest): Promise<PatchImTagResponse>;
350
- /**
351
- * 绑定标签到群
352
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/group/im-v2/biz_entity_tag_relation/create
353
- */
354
- createImBizEntityTagRelation(body: CreateImBizEntityTagRelationRequest): Promise<void>;
355
- /**
356
- * 解绑标签与群
357
- * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/group/im-v2/biz_entity_tag_relation/update
358
- */
359
- updateImBizEntityTagRelation(body: UpdateImBizEntityTagRelationRequest): Promise<void>;
5
+ im: Im.Methods;
360
6
  }
361
7
  }
362
- export interface CreateImMessageRequest {
363
- /** 依据receive_id_type的值,填写对应的消息接收者id */
364
- receive_id: string;
365
- /** 消息类型 包括:text、post、image、file、audio、media、sticker、interactive、share_chat、share_user等,类型定义请参考[发送消息content说明](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/im-v1/message/create_json) */
366
- msg_type: string;
367
- /** 消息内容,json结构序列化后的字符串。不同msg_type对应不同内容。消息类型 包括:text、post、image、file、audio、media、sticker、interactive、share_chat、share_user等,具体格式说明参考:[发送消息content说明](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/im-v1/message/create_json)<b>请求体大小限制</b>:- 文本消息请求体最大不能超过150KB- 卡片及富文本消息请求体最大不能超过30KB */
368
- content: string;
369
- /** 由开发者生成的唯一字符串序列,用于发送消息请求去重;持有相同uuid的请求1小时内至多成功执行一次 */
370
- uuid?: string;
371
- }
372
- export interface CreateImMessageQuery {
373
- /** 消息接收者id类型 open_id/user_id/union_id/email/chat_id */
374
- receive_id_type: 'open_id' | 'user_id' | 'union_id' | 'email' | 'chat_id';
375
- }
376
- export interface CreateImMessageResponse {
377
- /** 消息id open_message_id */
378
- message_id?: string;
379
- /** 根消息id open_message_id */
380
- root_id?: string;
381
- /** 父消息的id open_message_id */
382
- parent_id?: string;
383
- /** 消息所属的话题 ID */
384
- thread_id?: string;
385
- /** 消息类型 text post card image等等 */
386
- msg_type?: string;
387
- /** 消息生成的时间戳(毫秒) */
388
- create_time?: string;
389
- /** 消息更新的时间戳 */
390
- update_time?: string;
391
- /** 消息是否被撤回 */
392
- deleted?: boolean;
393
- /** 消息是否被更新 */
394
- updated?: boolean;
395
- /** 所属的群 */
396
- chat_id?: string;
397
- /** 发送者,可以是用户或应用 */
398
- sender?: Sender;
399
- /** 消息内容,json结构 */
400
- body?: MessageBody;
401
- /** 被艾特的人或应用的id */
402
- mentions?: Mention[];
403
- /** 合并消息的上一层级消息id open_message_id */
404
- upper_message_id?: string;
405
- }
406
- export interface ReplyImMessageRequest {
407
- /** 消息内容 json 格式,格式说明参考: [发送消息content说明](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/im-v1/message/create_json) */
408
- content: string;
409
- /** 消息类型,包括:text、post、image、file、audio、media、sticker、interactive、share_card、share_user */
410
- msg_type: string;
411
- /** 是否以话题形式回复;若群聊已经是话题模式,则自动回复该条消息所在的话题 */
412
- reply_in_thread?: boolean;
413
- /** 由开发者生成的唯一字符串序列,用于回复消息请求去重;持有相同uuid的请求1小时内至多成功执行一次 */
414
- uuid?: string;
415
- }
416
- export interface ReplyImMessageResponse {
417
- /** 消息id open_message_id */
418
- message_id?: string;
419
- /** 根消息id open_message_id */
420
- root_id?: string;
421
- /** 父消息的id open_message_id */
422
- parent_id?: string;
423
- /** 消息所属的话题 ID */
424
- thread_id?: string;
425
- /** 消息类型 text post card image等等 */
426
- msg_type?: string;
427
- /** 消息生成的时间戳(毫秒) */
428
- create_time?: string;
429
- /** 消息更新的时间戳 */
430
- update_time?: string;
431
- /** 消息是否被撤回 */
432
- deleted?: boolean;
433
- /** 消息是否被更新 */
434
- updated?: boolean;
435
- /** 所属的群 */
436
- chat_id?: string;
437
- /** 发送者,可以是用户或应用 */
438
- sender?: Sender;
439
- /** 消息内容,json结构 */
440
- body?: MessageBody;
441
- /** 被艾特的人或应用的id */
442
- mentions?: Mention[];
443
- /** 合并消息的上一层级消息id open_message_id */
444
- upper_message_id?: string;
445
- }
446
- export interface UpdateImMessageRequest {
447
- /** 消息的类型,仅支持文本(text)和富文本(post)类型 */
448
- msg_type: string;
449
- /** 消息内容,JSON 格式 */
450
- content: string;
451
- }
452
- export interface UpdateImMessageResponse {
453
- /** 消息id open_message_id */
454
- message_id?: string;
455
- /** 根消息id open_message_id */
456
- root_id?: string;
457
- /** 父消息的id open_message_id */
458
- parent_id?: string;
459
- /** 消息所属的话题 ID */
460
- thread_id?: string;
461
- /** 消息类型 text post card image等等 */
462
- msg_type?: string;
463
- /** 消息生成的时间戳(毫秒) */
464
- create_time?: string;
465
- /** 消息更新的时间戳 */
466
- update_time?: string;
467
- /** 消息是否被撤回 */
468
- deleted?: boolean;
469
- /** 消息是否被更新 */
470
- updated?: boolean;
471
- /** 所属的群 */
472
- chat_id?: string;
473
- /** 发送者,可以是用户或应用 */
474
- sender?: Sender;
475
- /** 消息内容,json结构 */
476
- body?: MessageBody;
477
- /** 被艾特的人或应用的id */
478
- mentions?: Mention[];
479
- /** 合并消息的上一层级消息id open_message_id */
480
- upper_message_id?: string;
481
- }
482
- export interface ForwardImMessageRequest {
483
- /** 依据receive_id_type的值,填写对应的转发目标的ID */
484
- receive_id: string;
485
- }
486
- export interface ForwardImMessageQuery {
487
- /** 消息接收者id类型 open_id/user_id/union_id/email/chat_id */
488
- receive_id_type: 'open_id' | 'user_id' | 'union_id' | 'email' | 'chat_id' | 'thread_id';
489
- /** 由开发者生成的唯一字符串序列,用于转发消息请求去重;持有相同uuid的请求在1小时内向同一个目标的转发只可成功一次。 */
490
- uuid?: string;
491
- }
492
- export interface ForwardImMessageResponse {
493
- /** 消息id open_message_id */
494
- message_id?: string;
495
- /** 根消息id open_message_id */
496
- root_id?: string;
497
- /** 父消息的id open_message_id */
498
- parent_id?: string;
499
- /** 消息所属的话题 ID */
500
- thread_id?: string;
501
- /** 消息类型 text post card image等等 */
502
- msg_type?: string;
503
- /** 消息生成的时间戳(毫秒) */
504
- create_time?: string;
505
- /** 消息更新的时间戳 */
506
- update_time?: string;
507
- /** 消息是否被撤回 */
508
- deleted?: boolean;
509
- /** 消息是否被更新 */
510
- updated?: boolean;
511
- /** 所属的群 */
512
- chat_id?: string;
513
- /** 发送者,可以是用户或应用 */
514
- sender?: Sender;
515
- /** 消息内容,json结构 */
516
- body?: MessageBody;
517
- /** 被艾特的人或应用的id */
518
- mentions?: Mention[];
519
- /** 合并消息的上一层级消息id open_message_id */
520
- upper_message_id?: string;
521
- }
522
- export interface MergeForwardImMessageRequest {
523
- /** 依据receive_id_type的值,填写对应的转发目标的ID */
524
- receive_id: string;
525
- /** 要转发的消息ID列表 */
526
- message_id_list: string[];
527
- }
528
- export interface MergeForwardImMessageQuery {
529
- /** 消息接收者id类型 open_id/user_id/union_id/email/chat_id */
530
- receive_id_type: 'open_id' | 'user_id' | 'union_id' | 'email' | 'chat_id' | 'thread_id';
531
- /** 由开发者生成的唯一字符串序列,用于转发消息请求去重;持有相同uuid的请求在1小时内向同一个目标的转发只可成功一次。 */
532
- uuid?: string;
533
- }
534
- export interface MergeForwardImMessageResponse {
535
- /** 合并转发生成的新消息 */
536
- message?: Message;
537
- /** 无效的消息ID列表 */
538
- invalid_message_id_list?: string[];
539
- }
540
- export interface ForwardImThreadRequest {
541
- /** 依据receive_id_type的值,填写对应的转发目标的ID */
542
- receive_id: string;
543
- }
544
- export interface ForwardImThreadQuery {
545
- /** 消息接收者id类型 open_id/user_id/union_id/email/chat_id/thread_id */
546
- receive_id_type: 'open_id' | 'user_id' | 'union_id' | 'email' | 'chat_id' | 'thread_id';
547
- /** 由开发者生成的唯一字符串序列,用于转发消息请求去重;持有相同uuid的请求在1小时内向同一个目标的转发只可成功一次。 */
548
- uuid?: string;
549
- }
550
- export interface ForwardImThreadResponse {
551
- /** 消息id open_message_id */
552
- message_id?: string;
553
- /** 根消息id open_message_id */
554
- root_id?: string;
555
- /** 父消息的id open_message_id */
556
- parent_id?: string;
557
- /** 消息所属的话题 ID */
558
- thread_id?: string;
559
- /** 消息类型 text post card image等等 */
560
- msg_type?: string;
561
- /** 消息生成的时间戳(毫秒) */
562
- create_time?: string;
563
- /** 消息更新的时间戳 */
564
- update_time?: string;
565
- /** 消息是否被撤回 */
566
- deleted?: boolean;
567
- /** 消息是否被更新 */
568
- updated?: boolean;
569
- /** 所属的群 */
570
- chat_id?: string;
571
- /** 发送者,可以是用户或应用 */
572
- sender?: Sender;
573
- /** 消息内容,json结构 */
574
- body?: MessageBody;
575
- /** 被艾特的人或应用的id */
576
- mentions?: Mention[];
577
- /** 合并消息的上一层级消息id open_message_id */
578
- upper_message_id?: string;
579
- }
580
- export interface PushFollowUpImMessageRequest {
581
- /** follow up列表 */
582
- follow_ups: FollowUp[];
583
- }
584
- export interface ReadUsersImMessageQuery extends Pagination {
585
- /** 此次调用中使用的用户ID的类型 */
586
- user_id_type: 'user_id' | 'union_id' | 'open_id';
587
- }
588
- export interface ListImMessageQuery extends Pagination {
589
- /** 容器类型 ,目前可选值仅有"chat",包含单聊(p2p)和群聊(group) */
590
- container_id_type: string;
591
- /** 容器的id,即chat的id,详情参见[群ID 说明](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-id-description) */
592
- container_id: string;
593
- /** 历史信息的起始时间(秒级时间戳) */
594
- start_time?: string;
595
- /** 历史信息的结束时间(秒级时间戳) */
596
- end_time?: string;
597
- /** 消息排序方式 */
598
- sort_type?: 'ByCreateTimeAsc' | 'ByCreateTimeDesc';
599
- }
600
- export interface GetImMessageResourceQuery {
601
- /** 资源类型,可选"image, file“; image对应消息中的 图片,富文本消息中的图片。 file对应消息中的 文件、音频、视频、(表情包除外) */
602
- type: string;
603
- }
604
- export interface GetImMessageQuery {
605
- /** 此次调用中使用的用户ID的类型 */
606
- user_id_type?: 'user_id' | 'union_id' | 'open_id';
607
- }
608
- export interface GetImMessageResponse {
609
- /** message[] */
610
- items?: Message[];
611
- }
612
- export interface ReadUserImBatchMessageResponse {
613
- read_user?: BatchMessageReadUser;
614
- }
615
- export interface GetProgressImBatchMessageResponse {
616
- /** 消息发送进度 */
617
- batch_message_send_progress?: BatchMessageSendProgress;
618
- /** 消息撤回进度 */
619
- batch_message_recall_progress?: BatchMessageRecallProgress;
620
- }
621
- export interface CreateImImageForm {
622
- /** 图片类型 */
623
- image_type: 'message' | 'avatar';
624
- /** 图片内容 **注意:** 上传的图片大小不能超过10MB */
625
- image: Blob;
626
- }
627
- export interface CreateImImageResponse {
628
- /** 图片的key */
629
- image_key?: string;
630
- }
631
- export interface CreateImFileForm {
632
- /** 文件类型 */
633
- file_type: 'opus' | 'mp4' | 'pdf' | 'doc' | 'xls' | 'ppt' | 'stream';
634
- /** 带后缀的文件名 */
635
- file_name: string;
636
- /** 文件的时长(视频,音频),单位:毫秒。不填充时无法显示具体时长。 */
637
- duration?: number;
638
- /** 文件内容 */
639
- file: Blob;
640
- }
641
- export interface CreateImFileResponse {
642
- /** 文件的key */
643
- file_key?: string;
644
- }
645
- export interface UrgentAppImMessageRequest {
646
- /** 该字段标识目标用户的id类型 */
647
- user_id_list: string[];
648
- }
649
- export interface UrgentAppImMessageQuery {
650
- /** 此次调用中使用的用户ID的类型 */
651
- user_id_type: 'user_id' | 'union_id' | 'open_id';
652
- }
653
- export interface UrgentAppImMessageResponse {
654
- /** 无效的用户id */
655
- invalid_user_id_list: string[];
656
- }
657
- export interface UrgentSmsImMessageRequest {
658
- /** 该字段标识目标用户的id类型 */
659
- user_id_list: string[];
660
- }
661
- export interface UrgentSmsImMessageQuery {
662
- /** 此次调用中使用的用户ID的类型 */
663
- user_id_type: 'user_id' | 'union_id' | 'open_id';
664
- }
665
- export interface UrgentSmsImMessageResponse {
666
- /** 无效的用户id */
667
- invalid_user_id_list: string[];
668
- }
669
- export interface UrgentPhoneImMessageRequest {
670
- /** 该字段标识目标用户的id类型 */
671
- user_id_list: string[];
672
- }
673
- export interface UrgentPhoneImMessageQuery {
674
- /** 此次调用中使用的用户ID的类型 */
675
- user_id_type: 'user_id' | 'union_id' | 'open_id';
676
- }
677
- export interface UrgentPhoneImMessageResponse {
678
- /** 无效的用户id */
679
- invalid_user_id_list: string[];
680
- }
681
- export interface CreateImMessageReactionRequest {
682
- /** reaction资源类型 */
683
- reaction_type: Emoji;
684
- }
685
- export interface CreateImMessageReactionResponse {
686
- /** reaction资源ID */
687
- reaction_id?: string;
688
- /** 添加reaction的操作人 */
689
- operator?: Operator;
690
- /** reaction动作的的unix timestamp(单位:ms) */
691
- action_time?: string;
692
- /** reaction资源类型 */
693
- reaction_type?: Emoji;
694
- }
695
- export interface ListImMessageReactionQuery extends Pagination {
696
- /** 待查询消息reaction的类型[emoji类型列举](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message-reaction/emojis-introduce)。- 不传入该参数,表示拉取所有类型reaction */
697
- reaction_type?: string;
698
- /** 当操作人为用户时返回用户ID的类型 */
699
- user_id_type?: 'open_id' | 'union_id' | 'user_id';
700
- }
701
- export interface DeleteImMessageReactionResponse {
702
- /** reaction资源ID */
703
- reaction_id?: string;
704
- /** 添加reaction的操作人 */
705
- operator?: Operator;
706
- /** reaction动作的的unix timestamp(单位:ms) */
707
- action_time?: string;
708
- /** reaction资源类型 */
709
- reaction_type?: Emoji;
710
- }
711
- export interface CreateImPinRequest {
712
- /** 待Pin的消息ID */
713
- message_id: string;
714
- }
715
- export interface CreateImPinResponse {
716
- pin?: Pin;
717
- }
718
- export interface ListImPinQuery extends Pagination {
719
- /** 待获取Pin消息的Chat ID */
720
- chat_id: string;
721
- /** Pin信息的起始时间(毫秒级时间戳) */
722
- start_time?: string;
723
- /** Pin信息的结束时间(毫秒级时间戳) */
724
- end_time?: string;
725
- }
726
- export interface PatchImMessageRequest {
727
- /** 消息内容 json 格式,[发送消息 content 说明](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/im-v1/message/create_json),参考文档中的卡片格式 */
728
- content: string;
729
- }
730
- export interface BatchUpdateImUrlPreviewRequest {
731
- /** URL预览的token列表 */
732
- preview_tokens: string[];
733
- /** 需要更新URL预览的用户open_id。若不传,则默认更新URL所在会话成员;若用户不在URL所在会话,则无法更新该用户 */
734
- open_ids?: string[];
735
- }
736
- export interface CreateImChatRequest {
737
- /** 群头像对应的 Image Key,可通过[上传图片](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/reference/im-v1/image/create)获取(注意:上传图片的 ==image_type== 需要指定为 ==avatar==) */
738
- avatar?: string;
739
- /** 群名称 **注意:** 公开群名称的长度不得少于2个字符 */
740
- name?: string;
741
- /** 群描述 */
742
- description?: string;
743
- /** 群国际化名称 */
744
- i18n_names?: I18nNames;
745
- /** 创建群时指定的群主,不填时指定建群的机器人为群主。群主 ID,ID值与查询参数中的 user_id_type 对应。不同 ID 的说明参见 [用户相关的 ID 概念](/ssl:ttdoc/home/user-identity-introduction/introduction) */
746
- owner_id?: string;
747
- /** 创建群时邀请的群成员,id 类型为 user_id_type */
748
- user_id_list?: string[];
749
- /** 创建群时邀请的群机器人 **注意:** 拉机器人入群请使用 ==app_id== */
750
- bot_id_list?: string[];
751
- /** 群消息模式 */
752
- group_message_type?: 'chat' | 'thread';
753
- /** 群模式**可选值有**:- `group`:群组 */
754
- chat_mode?: string;
755
- /** 群类型**可选值有**:- `private`:私有群- `public`:公开群 */
756
- chat_type?: string;
757
- /** 入群消息可见性**可选值有**:- `only_owner`:仅群主和管理员可见- `all_members`:所有成员可见- `not_anyone`:任何人均不可见 */
758
- join_message_visibility?: string;
759
- /** 退群消息可见性**可选值有**:- `only_owner`:仅群主和管理员可见- `all_members`:所有成员可见- `not_anyone`:任何人均不可见 */
760
- leave_message_visibility?: string;
761
- /** 加群审批**可选值有**:- `no_approval_required`:无需审批- `approval_required`:需要审批 */
762
- membership_approval?: string;
763
- /** 防泄密模式设置 */
764
- restricted_mode_setting?: RestrictedModeSetting;
765
- /** 谁可以加急 */
766
- urgent_setting?: 'only_owner' | 'all_members';
767
- /** 谁可以发起视频会议 */
768
- video_conference_setting?: 'only_owner' | 'all_members';
769
- /** 谁可以编辑群信息 */
770
- edit_permission?: 'only_owner' | 'all_members';
771
- /** 隐藏群成员人数设置 */
772
- hide_member_count_setting?: 'all_members' | 'only_owner';
773
- }
774
- export interface CreateImChatQuery {
775
- /** 此次调用中使用的用户ID的类型 */
776
- user_id_type?: 'user_id' | 'union_id' | 'open_id';
777
- /** 如果选择了设置群主为指定用户,可以选择是否同时设置创建此群的机器人为管理员,此标志位用于标记是否设置创建群的机器人为管理员 */
778
- set_bot_manager?: boolean;
779
- /** 由开发者生成的唯一字符串序列,用于创建群组请求去重;持有相同uuid的请求10小时内只可成功创建1个群聊 */
780
- uuid?: string;
781
- }
782
- export interface CreateImChatResponse {
783
- /** 群ID */
784
- chat_id?: string;
785
- /** 群头像URL */
786
- avatar?: string;
787
- /** 群名称 */
788
- name?: string;
789
- /** 群描述 */
790
- description?: string;
791
- /** 群国际化名称 */
792
- i18n_names?: I18nNames;
793
- /** 群主 ID */
794
- owner_id?: string;
795
- /** 群主 ID 类型 */
796
- owner_id_type?: string;
797
- /** 谁可以加急 */
798
- urgent_setting?: 'only_owner' | 'all_members';
799
- /** 谁可以发起视频会议 */
800
- video_conference_setting?: 'only_owner' | 'all_members';
801
- /** 加user/bot入群权限(all_members/only_owner) */
802
- add_member_permission?: string;
803
- /** 群分享权限(allowed/not_allowed) */
804
- share_card_permission?: string;
805
- /** at所有人权限(all_members/only_owner) */
806
- at_all_permission?: string;
807
- /** 群编辑权限(all_members/only_owner) */
808
- edit_permission?: string;
809
- /** 群消息模式 */
810
- group_message_type?: string;
811
- /** 群模式 */
812
- chat_mode?: string;
813
- /** 群类型 */
814
- chat_type?: string;
815
- /** 优先级最高的一个群tag */
816
- chat_tag?: string;
817
- /** 是否是外部群 */
818
- external?: boolean;
819
- /** tenant key */
820
- tenant_key?: string;
821
- /** 入群消息可见性 */
822
- join_message_visibility?: string;
823
- /** 出群消息可见性 */
824
- leave_message_visibility?: string;
825
- /** 加群审批 */
826
- membership_approval?: string;
827
- /** 发言权限 */
828
- moderation_permission?: string;
829
- /** 防泄密模式设置 */
830
- restricted_mode_setting?: RestrictedModeSetting;
831
- /** 隐藏群成员人数设置 */
832
- hide_member_count_setting?: 'all_members' | 'only_owner';
833
- }
834
- export interface UpdateImChatRequest {
835
- /** 群头像对应的 Image Key,可通过[上传图片](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/image/create)获取(注意:上传图片的 ==image_type== 需要指定为 ==avatar==) */
836
- avatar?: string;
837
- /** 群名称 */
838
- name?: string;
839
- /** 群描述 */
840
- description?: string;
841
- /** 群国际化名称 */
842
- i18n_names?: I18nNames;
843
- /** user/bot 入群权限(all_members/only_owner) */
844
- add_member_permission?: string;
845
- /** 群分享权限(allowed/not_allowed) */
846
- share_card_permission?: string;
847
- /** at 所有人权限(all_members/only_owner) */
848
- at_all_permission?: string;
849
- /** 群编辑权限(all_members/only_owner) */
850
- edit_permission?: string;
851
- /** 新群主 ID */
852
- owner_id?: string;
853
- /** 入群消息可见性(only_owner/all_members/not_anyone) */
854
- join_message_visibility?: string;
855
- /** 出群消息可见性(only_owner/all_members/not_anyone) */
856
- leave_message_visibility?: string;
857
- /** 加群审批(no_approval_required/approval_required) */
858
- membership_approval?: string;
859
- /** 防泄密模式设置 */
860
- restricted_mode_setting?: RestrictedModeSetting;
861
- /** 群类型 */
862
- chat_type?: string;
863
- /** 群消息模式 */
864
- group_message_type?: 'chat' | 'thread';
865
- /** 谁可以加急 */
866
- urgent_setting?: 'only_owner' | 'all_members';
867
- /** 谁可以发起视频会议 */
868
- video_conference_setting?: 'only_owner' | 'all_members';
869
- /** 隐藏群成员人数设置 */
870
- hide_member_count_setting?: 'all_members' | 'only_owner';
871
- }
872
- export interface UpdateImChatQuery {
873
- /** 此次调用中使用的用户ID的类型 */
874
- user_id_type?: 'user_id' | 'union_id' | 'open_id';
875
- }
876
- export interface UpdateImChatModerationRequest {
877
- /** 群发言模式(all_members/only_owner/moderator_list,其中 moderator_list 表示部分用户可发言的模式) */
878
- moderation_setting?: string;
879
- /** 选择部分用户可发言模式时,添加的可发言用户列表(自动过滤不在群内的用户) */
880
- moderator_added_list?: string[];
881
- /** 选择部分用户可发言模式时,移除的可发言用户列表(自动过滤不在群内的用户) */
882
- moderator_removed_list?: string[];
883
- }
884
- export interface UpdateImChatModerationQuery {
885
- /** 此次调用中使用的用户ID的类型 */
886
- user_id_type?: 'user_id' | 'union_id' | 'open_id';
887
- }
888
- export interface GetImChatQuery {
889
- /** 此次调用中使用的用户ID的类型 */
890
- user_id_type?: 'user_id' | 'union_id' | 'open_id';
891
- }
892
- export interface GetImChatResponse {
893
- /** 群头像URL */
894
- avatar?: string;
895
- /** 群名称 */
896
- name?: string;
897
- /** 群描述 */
898
- description?: string;
899
- /** 群国际化名称 */
900
- i18n_names?: I18nNames;
901
- /** 加user/bot入群权限(all_members/only_owner) */
902
- add_member_permission?: string;
903
- /** 群分享权限(allowed/not_allowed) */
904
- share_card_permission?: string;
905
- /** at所有人权限(all_members/only_owner) */
906
- at_all_permission?: string;
907
- /** 群编辑权限(all_members/only_owner) */
908
- edit_permission?: string;
909
- /** 群主ID的类型(open_id/user_id/union_id) */
910
- owner_id_type?: string;
911
- /** 群主ID */
912
- owner_id?: string;
913
- /** 用户管理员列表 */
914
- user_manager_id_list?: string[];
915
- /** 机器人管理员列表 */
916
- bot_manager_id_list?: string[];
917
- /** 群消息模式 */
918
- group_message_type?: string;
919
- /** 群模式 */
920
- chat_mode?: string;
921
- /** 群类型 */
922
- chat_type?: string;
923
- /** 优先级最高的一个群tag */
924
- chat_tag?: string;
925
- /** 入群消息可见性 */
926
- join_message_visibility?: string;
927
- /** 出群消息可见性 */
928
- leave_message_visibility?: string;
929
- /** 加群审批 */
930
- membership_approval?: string;
931
- /** 发言权限 */
932
- moderation_permission?: string;
933
- /** 是否是外部群 */
934
- external?: boolean;
935
- /** tenant key */
936
- tenant_key?: string;
937
- /** 群成员人数 */
938
- user_count?: string;
939
- /** 群机器人数 */
940
- bot_count?: string;
941
- /** 防泄密模式设置 */
942
- restricted_mode_setting?: RestrictedModeSetting;
943
- /** 谁可以加急 */
944
- urgent_setting?: 'only_owner' | 'all_members';
945
- /** 谁可以发起视频会议 */
946
- video_conference_setting?: 'only_owner' | 'all_members';
947
- /** 隐藏群成员人数设置 */
948
- hide_member_count_setting?: 'all_members' | 'only_owner';
949
- /** 群状态 */
950
- chat_status?: 'normal' | 'dissolved' | 'dissolved_save';
951
- }
952
- export interface PutTopNoticeImChatTopNoticeRequest {
953
- /** 要进行发布的群置顶 */
954
- chat_top_notice: ChatTopNotice[];
955
- }
956
- export interface ListImChatQuery extends Pagination {
957
- /** 此次调用中使用的用户ID的类型 */
958
- user_id_type?: 'user_id' | 'union_id' | 'open_id';
959
- /** 群组排序方式 */
960
- sort_type?: 'ByCreateTimeAsc' | 'ByActiveTimeDesc';
961
- }
962
- export interface SearchImChatQuery extends Pagination {
963
- /** 此次调用中使用的用户ID的类型 */
964
- user_id_type?: 'user_id' | 'union_id' | 'open_id';
965
- /** 关键词。注意:如果query为空值将返回空的结果 */
966
- query?: string;
967
- }
968
- export interface GetImChatModerationQuery extends Pagination {
969
- /** 此次调用中使用的用户ID的类型 */
970
- user_id_type?: 'user_id' | 'union_id' | 'open_id';
971
- }
972
- export interface GetImChatModerationResponse {
973
- /** 群发言模式 */
974
- moderation_setting?: string;
975
- /** 分页标记,当 has_more 为 true 时,会同时返回新的 page_token,否则不返回 page_token */
976
- page_token?: string;
977
- /** 是否还有更多项 */
978
- has_more?: boolean;
979
- /** 可发言用户列表 */
980
- items?: ListModerator[];
981
- }
982
- export interface LinkImChatRequest {
983
- /** 群分享链接有效时长,可选值week、year、permanently,分别表示7天、1年以及永久有效 */
984
- validity_period?: 'week' | 'year' | 'permanently';
985
- }
986
- export interface LinkImChatResponse {
987
- /** 群分享链接 */
988
- share_link?: string;
989
- /** 分享链接过期时间戳(秒级) */
990
- expire_time?: string;
991
- /** 分享链接是否永久有效 */
992
- is_permanent?: boolean;
993
- }
994
- export interface AddManagersImChatManagersRequest {
995
- /** 要增加的 manager_id */
996
- manager_ids?: string[];
997
- }
998
- export interface AddManagersImChatManagersQuery {
999
- /** 群成员 id 类型 open_id/user_id/union_id/app_id */
1000
- member_id_type?: 'user_id' | 'union_id' | 'open_id' | 'app_id';
1001
- }
1002
- export interface AddManagersImChatManagersResponse {
1003
- /** 群目前的管理员id */
1004
- chat_managers?: string[];
1005
- /** 群目前的管理员bot id */
1006
- chat_bot_managers?: string[];
1007
- }
1008
- export interface DeleteManagersImChatManagersRequest {
1009
- /** 要删除的 manager_id */
1010
- manager_ids?: string[];
1011
- }
1012
- export interface DeleteManagersImChatManagersQuery {
1013
- /** 群成员 id 类型 open_id/user_id/union_id/app_id */
1014
- member_id_type?: 'user_id' | 'union_id' | 'open_id' | 'app_id';
1015
- }
1016
- export interface DeleteManagersImChatManagersResponse {
1017
- /** 群目前的管理员id */
1018
- chat_managers?: string[];
1019
- /** 群目前的管理员bot id */
1020
- chat_bot_managers?: string[];
1021
- }
1022
- export interface CreateImChatMembersRequest {
1023
- /** 成员列表<b>注意:</b>每次请求,最多拉50个用户或者5个机器人,并且群组最多容纳15个机器人 */
1024
- id_list?: string[];
1025
- }
1026
- export interface CreateImChatMembersQuery {
1027
- /** 进群成员 id 类型 open_id/user_id/union_id/app_id<b>注意:</b>拉机器人入群请使用 ==app_id== */
1028
- member_id_type?: 'user_id' | 'union_id' | 'open_id' | 'app_id';
1029
- /** 出现不可用ID后的处理方式 0/1/2 */
1030
- succeed_type?: 0 | 1 | 2;
1031
- }
1032
- export interface CreateImChatMembersResponse {
1033
- /** ID无效的成员列表 */
1034
- invalid_id_list?: string[];
1035
- /** ID不存在的成员列表 */
1036
- not_existed_id_list?: string[];
1037
- /** 等待群主或管理员审批的成员ID列表 */
1038
- pending_approval_id_list?: string[];
1039
- }
1040
- export interface DeleteImChatMembersRequest {
1041
- /** 成员列表 */
1042
- id_list?: string[];
1043
- }
1044
- export interface DeleteImChatMembersQuery {
1045
- /** 出群成员 id 类型 open_id/user_id/union_id/app_id */
1046
- member_id_type?: 'user_id' | 'union_id' | 'open_id' | 'app_id';
1047
- }
1048
- export interface DeleteImChatMembersResponse {
1049
- /** 无效成员列表 */
1050
- invalid_id_list?: string[];
1051
- }
1052
- export interface GetImChatMembersQuery extends Pagination {
1053
- /** 群成员 用户 ID 类型,详情参见 [用户相关的 ID 概念](/ssl:ttdoc/home/user-identity-introduction/introduction) */
1054
- member_id_type?: 'user_id' | 'union_id' | 'open_id';
1055
- }
1056
- export interface GetImChatMembersResponse {
1057
- /** member列表 */
1058
- items?: ListMember[];
1059
- /** 分页标记,当 has_more 为 true 时,会同时返回新的 page_token,否则不返回 page_token */
1060
- page_token?: string;
1061
- /** 是否还有更多项 */
1062
- has_more?: boolean;
1063
- /** 成员总数 */
1064
- member_total?: number;
1065
- }
1066
- export interface IsInChatImChatMembersResponse {
1067
- /** 用户或者机器人是否在群中 */
1068
- is_in_chat?: boolean;
1069
- }
1070
- export interface PatchImChatAnnouncementRequest {
1071
- /** 文档当前版本号 int64 类型,get 接口会返回 */
1072
- revision: string;
1073
- /** 修改文档请求的序列化字段更新公告信息的格式和更新[云文档](/ssl:ttdoc/ukTMukTMukTM/uYDM2YjL2AjN24iNwYjN)格式相同 */
1074
- requests?: string[];
1075
- }
1076
- export interface GetImChatAnnouncementQuery {
1077
- /** 此次调用中使用的用户ID的类型 */
1078
- user_id_type?: 'user_id' | 'union_id' | 'open_id';
1079
- }
1080
- export interface GetImChatAnnouncementResponse {
1081
- /** CCM 文档序列化信息 */
1082
- content?: string;
1083
- /** 文档当前版本号 纯数字 */
1084
- revision?: string;
1085
- /** 文档生成的时间戳(秒) */
1086
- create_time?: string;
1087
- /** 消息更新的时间戳(秒) */
1088
- update_time?: string;
1089
- /** 文档所有者id类型, open_id/user_id/union_id/app_id */
1090
- owner_id_type?: 'user_id' | 'union_id' | 'open_id' | 'app_id';
1091
- /** 文档所有者id */
1092
- owner_id?: string;
1093
- /** 文档最新修改者id类型, open_id/user_id/union_id/app_id */
1094
- modifier_id_type?: 'user_id' | 'union_id' | 'open_id' | 'app_id';
1095
- /** 文档最新修改者id */
1096
- modifier_id?: string;
1097
- }
1098
- export interface CreateImChatTabRequest {
1099
- /** 会话标签页 */
1100
- chat_tabs: ChatTab[];
1101
- }
1102
- export interface CreateImChatTabResponse {
1103
- /** 群标签列表 */
1104
- chat_tabs?: ChatTab[];
1105
- }
1106
- export interface DeleteTabsImChatTabRequest {
1107
- /** 会话标签页id列表 */
1108
- tab_ids: string[];
1109
- }
1110
- export interface DeleteTabsImChatTabResponse {
1111
- /** 群标签列表 */
1112
- chat_tabs?: ChatTab[];
1113
- }
1114
- export interface UpdateTabsImChatTabRequest {
1115
- /** 会话标签页 */
1116
- chat_tabs?: ChatTab[];
1117
- }
1118
- export interface UpdateTabsImChatTabResponse {
1119
- /** 群标签列表 */
1120
- chat_tabs?: ChatTab[];
1121
- }
1122
- export interface SortTabsImChatTabRequest {
1123
- /** 会话标签页ID列表 */
1124
- tab_ids?: string[];
1125
- }
1126
- export interface SortTabsImChatTabResponse {
1127
- /** 群标签列表 */
1128
- chat_tabs?: ChatTab[];
1129
- }
1130
- export interface ListTabsImChatTabResponse {
1131
- /** 会话标签页 */
1132
- chat_tabs?: ChatTab[];
1133
- }
1134
- export interface CreateImChatMenuTreeRequest {
1135
- /** 要向群内追加的菜单 */
1136
- menu_tree: ChatMenuTree;
1137
- }
1138
- export interface CreateImChatMenuTreeResponse {
1139
- /** 追加后群内现有菜单 */
1140
- menu_tree?: ChatMenuTree;
1141
- }
1142
- export interface DeleteImChatMenuTreeRequest {
1143
- /** 要删除的一级菜单ID列表 */
1144
- chat_menu_top_level_ids: string[];
1145
- }
1146
- export interface DeleteImChatMenuTreeResponse {
1147
- /** 群内现有菜单 */
1148
- menu_tree?: ChatMenuTree;
1149
- }
1150
- export interface PatchImChatMenuItemRequest {
1151
- /** 修改的字段 */
1152
- update_fields: ('ICON' | 'NAME' | 'I18N_NAME' | 'REDIRECT_LINK')[];
1153
- /** 元信息 */
1154
- chat_menu_item: ChatMenuItem;
1155
- }
1156
- export interface PatchImChatMenuItemResponse {
1157
- chat_menu_item?: ChatMenuItem;
1158
- }
1159
- export interface SortImChatMenuTreeRequest {
1160
- /** 一级菜单id列表 */
1161
- chat_menu_top_level_ids: string[];
1162
- }
1163
- export interface SortImChatMenuTreeResponse {
1164
- /** 排序后群内菜单 */
1165
- menu_tree?: ChatMenuTree;
1166
- }
1167
- export interface GetImChatMenuTreeResponse {
1168
- /** 群内所有菜单 */
1169
- menu_tree?: ChatMenuTree;
1170
- }
1171
- export interface CreateImAppFeedCardRequest {
1172
- /** 应用消息卡片 */
1173
- app_feed_card?: OpenAppFeedCard;
1174
- /** 用户 ID */
1175
- user_ids?: string[];
1176
- }
1177
- export interface CreateImAppFeedCardQuery {
1178
- /** 用户 ID 类型 */
1179
- user_id_type?: 'open_id' | 'union_id' | 'user_id';
1180
- }
1181
- export interface CreateImAppFeedCardResponse {
1182
- /** 失败的卡片 */
1183
- failed_cards?: OpenFailedUserAppFeedCardItem[];
1184
- /** 卡片业务 ID */
1185
- biz_id?: string;
1186
- }
1187
- export interface UpdateImAppFeedCardBatchRequest {
1188
- /** 应用消息卡片 */
1189
- feed_cards?: UserOpenAppFeedCardUpdater[];
1190
- }
1191
- export interface UpdateImAppFeedCardBatchQuery {
1192
- /** 此次调用中使用的用户ID的类型 可选值有: - open_id: 以open_id来识别用户 - user_id: 以user_id来识别用户 - union_id: 以union_id来识别用户 */
1193
- user_id_type?: 'open_id' | 'user_id' | 'union_id';
1194
- }
1195
- export interface UpdateImAppFeedCardBatchResponse {
1196
- /** 失败的卡片 */
1197
- failed_cards?: OpenFailedUserAppFeedCardItem[];
1198
- }
1199
- export interface DeleteImAppFeedCardBatchRequest {
1200
- /** 应用消息卡片 */
1201
- feed_cards?: UserOpenAppFeedCardDeleter[];
1202
- }
1203
- export interface DeleteImAppFeedCardBatchQuery {
1204
- /** 此次调用中使用的用户ID的类型 可选值有: - open_id: 以open_id来识别用户 - user_id: 以user_id来识别用户 - union_id: 以union_id来识别用户 */
1205
- user_id_type?: 'open_id' | 'user_id' | 'union_id';
1206
- }
1207
- export interface DeleteImAppFeedCardBatchResponse {
1208
- /** 失败的卡片 */
1209
- failed_cards?: OpenFailedUserAppFeedCardItem[];
1210
- }
1211
- export interface BotTimeSentiveImFeedCardRequest {
1212
- /** 临时置顶状态,true-打开,false-关闭 */
1213
- time_sensitive: boolean;
1214
- /** 用户id 列表 */
1215
- user_ids: string[];
1216
- }
1217
- export interface BotTimeSentiveImFeedCardQuery {
1218
- /** 此次调用中使用的用户ID的类型 可选值有: - open_id: 以open_id来识别用户 - user_id: 以user_id来识别用户 - union_id: 以union_id来识别用户 */
1219
- user_id_type: 'open_id' | 'user_id' | 'union_id';
1220
- }
1221
- export interface BotTimeSentiveImFeedCardResponse {
1222
- /** 失败原因 */
1223
- failed_user_reasons?: FailedReason[];
1224
- }
1225
- export interface UpdateImChatButtonRequest {
1226
- /** 用户 ID 列表 */
1227
- user_ids?: string[];
1228
- /** ID */
1229
- chat_id: string;
1230
- /** 按钮 */
1231
- buttons?: OpenAppFeedCardButtons;
1232
- }
1233
- export interface UpdateImChatButtonQuery {
1234
- /** 用户 ID 类型 */
1235
- user_id_type?: 'open_id' | 'union_id' | 'user_id';
1236
- }
1237
- export interface UpdateImChatButtonResponse {
1238
- /** 失败的用户 */
1239
- failed_user_reasons?: FailedReason[];
1240
- }
1241
- export interface PatchImFeedCardRequest {
1242
- /** 临时置顶状态,true-打开,false-关闭 */
1243
- time_sensitive: boolean;
1244
- /** 用户id 列表 */
1245
- user_ids: string[];
1246
- }
1247
- export interface PatchImFeedCardQuery {
1248
- /** 此次调用中使用的用户ID的类型 可选值有: - open_id: 以open_id来识别用户 - user_id: 以user_id来识别用户 - union_id: 以union_id来识别用户 */
1249
- user_id_type: 'open_id' | 'user_id' | 'union_id';
1250
- }
1251
- export interface PatchImFeedCardResponse {
1252
- /** 失败原因 */
1253
- failed_user_reasons?: FailedReason[];
1254
- }
1255
- export interface GetImBizEntityTagRelationQuery {
1256
- /** 业务类型 */
1257
- tag_biz_type: 'chat';
1258
- /** 业务实体id */
1259
- biz_entity_id: string;
1260
- }
1261
- export interface GetImBizEntityTagRelationResponse {
1262
- /** 标签内容及绑定时间 */
1263
- tag_info_with_bind_versions?: TagInfoWithBindVersion[];
1264
- }
1265
- export interface CreateImTagRequest {
1266
- /** 创建标签 */
1267
- create_tag: CreateTag;
1268
- }
1269
- export interface CreateImTagResponse {
1270
- /** 创建的tagid */
1271
- id?: string;
1272
- /** 创建失败原因 */
1273
- create_tag_fail_reason?: CreateTagFailReason;
1274
- }
1275
- export interface PatchImTagRequest {
1276
- /** 编辑标签 */
1277
- patch_tag?: PatchTag;
1278
- }
1279
- export interface PatchImTagResponse {
1280
- /** 编辑后的taginfo */
1281
- tag_info?: TagInfo;
1282
- /** 修改失败原因 */
1283
- patch_tag_fail_reason?: PatchTagFailReason;
1284
- }
1285
- export interface CreateImBizEntityTagRelationRequest {
1286
- /** 业务类型 */
1287
- tag_biz_type: 'chat';
1288
- /** 业务实体id */
1289
- biz_entity_id: string;
1290
- /** 标签id */
1291
- tag_ids?: string[];
1292
- }
1293
- export interface UpdateImBizEntityTagRelationRequest {
1294
- /** 业务类型 */
1295
- tag_biz_type: 'chat';
1296
- /** 业务实体id */
1297
- biz_entity_id: string;
1298
- /** 标签id */
1299
- tag_ids?: string[];
8
+ export declare namespace Im {
9
+ interface Methods {
10
+ message: Message.Methods;
11
+ thread: Thread.Methods;
12
+ batchMessage: BatchMessage.Methods;
13
+ image: Image.Methods;
14
+ file: File.Methods;
15
+ pin: Pin.Methods;
16
+ urlPreview: UrlPreview.Methods;
17
+ chat: Chat.Methods;
18
+ appFeedCard: AppFeedCard.Methods;
19
+ feedCard: FeedCard.Methods;
20
+ chatButton: ChatButton.Methods;
21
+ bizEntityTagRelation: BizEntityTagRelation.Methods;
22
+ tag: Tag.Methods;
23
+ }
24
+ namespace Message {
25
+ interface Methods {
26
+ resource: Resource.Methods;
27
+ reaction: Reaction.Methods;
28
+ /**
29
+ * 发送消息
30
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/create
31
+ */
32
+ create(body: CreateRequest, query?: CreateQuery): Promise<CreateResponse>;
33
+ /**
34
+ * 回复消息
35
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/reply
36
+ */
37
+ reply(message_id: string, body: ReplyRequest): Promise<ReplyResponse>;
38
+ /**
39
+ * 编辑消息
40
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/update
41
+ */
42
+ update(message_id: string, body: UpdateRequest): Promise<UpdateResponse>;
43
+ /**
44
+ * 转发消息
45
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/forward
46
+ */
47
+ forward(message_id: string, body: ForwardRequest, query?: ForwardQuery): Promise<ForwardResponse>;
48
+ /**
49
+ * 合并转发消息
50
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/merge_forward
51
+ */
52
+ mergeForward(body: MergeForwardRequest, query?: MergeForwardQuery): Promise<MergeForwardResponse>;
53
+ /**
54
+ * 撤回消息
55
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/delete
56
+ */
57
+ delete(message_id: string): Promise<void>;
58
+ /**
59
+ * 添加跟随气泡
60
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/push_follow_up
61
+ */
62
+ pushFollowUp(message_id: string, body: PushFollowUpRequest): Promise<void>;
63
+ /**
64
+ * 查询消息已读信息
65
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/read_users
66
+ */
67
+ readUsers(message_id: string, query?: ReadUsersQuery): Paginated<Lark.ReadUser>;
68
+ /**
69
+ * 获取会话历史消息
70
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/list
71
+ */
72
+ list(query?: ListQuery): Paginated<Lark.Message>;
73
+ /**
74
+ * 获取指定消息的内容
75
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/get
76
+ */
77
+ get(message_id: string, query?: GetQuery): Promise<GetResponse>;
78
+ /**
79
+ * 发送应用内加急
80
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/urgent_app
81
+ */
82
+ urgentApp(message_id: string, body: UrgentAppRequest, query?: UrgentAppQuery): Promise<UrgentAppResponse>;
83
+ /**
84
+ * 发送短信加急
85
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/urgent_sms
86
+ */
87
+ urgentSms(message_id: string, body: UrgentSmsRequest, query?: UrgentSmsQuery): Promise<UrgentSmsResponse>;
88
+ /**
89
+ * 发送电话加急
90
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/urgent_phone
91
+ */
92
+ urgentPhone(message_id: string, body: UrgentPhoneRequest, query?: UrgentPhoneQuery): Promise<UrgentPhoneResponse>;
93
+ /**
94
+ * 更新应用发送的消息卡片
95
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/patch
96
+ */
97
+ patch(message_id: string, body: PatchRequest): Promise<void>;
98
+ }
99
+ interface CreateRequest {
100
+ /** 依据receive_id_type的值,填写对应的消息接收者id */
101
+ receive_id: string;
102
+ /** 消息类型 包括:text、post、image、file、audio、media、sticker、interactive、share_chat、share_user等,类型定义请参考[发送消息content说明](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/im-v1/message/create_json) */
103
+ msg_type: string;
104
+ /** 消息内容,json结构序列化后的字符串。不同msg_type对应不同内容。消息类型 包括:text、post、image、file、audio、media、sticker、interactive、share_chat、share_user等,具体格式说明参考:[发送消息content说明](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/im-v1/message/create_json)<b>请求体大小限制</b>:- 文本消息请求体最大不能超过150KB- 卡片及富文本消息请求体最大不能超过30KB */
105
+ content: string;
106
+ /** 由开发者生成的唯一字符串序列,用于发送消息请求去重;持有相同uuid的请求1小时内至多成功执行一次 */
107
+ uuid?: string;
108
+ }
109
+ interface CreateQuery {
110
+ /** 消息接收者id类型 open_id/user_id/union_id/email/chat_id */
111
+ receive_id_type: 'open_id' | 'user_id' | 'union_id' | 'email' | 'chat_id';
112
+ }
113
+ interface CreateResponse {
114
+ /** 消息id open_message_id */
115
+ message_id?: string;
116
+ /** 根消息id open_message_id */
117
+ root_id?: string;
118
+ /** 父消息的id open_message_id */
119
+ parent_id?: string;
120
+ /** 消息所属的话题 ID */
121
+ thread_id?: string;
122
+ /** 消息类型 text post card image等等 */
123
+ msg_type?: string;
124
+ /** 消息生成的时间戳(毫秒) */
125
+ create_time?: string;
126
+ /** 消息更新的时间戳 */
127
+ update_time?: string;
128
+ /** 消息是否被撤回 */
129
+ deleted?: boolean;
130
+ /** 消息是否被更新 */
131
+ updated?: boolean;
132
+ /** 所属的群 */
133
+ chat_id?: string;
134
+ /** 发送者,可以是用户或应用 */
135
+ sender?: Lark.Sender;
136
+ /** 消息内容,json结构 */
137
+ body?: Lark.MessageBody;
138
+ /** 被艾特的人或应用的id */
139
+ mentions?: Lark.Mention[];
140
+ /** 合并消息的上一层级消息id open_message_id */
141
+ upper_message_id?: string;
142
+ }
143
+ interface ReplyRequest {
144
+ /** 消息内容 json 格式,格式说明参考: [发送消息content说明](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/im-v1/message/create_json) */
145
+ content: string;
146
+ /** 消息类型,包括:text、post、image、file、audio、media、sticker、interactive、share_card、share_user */
147
+ msg_type: string;
148
+ /** 是否以话题形式回复;若群聊已经是话题模式,则自动回复该条消息所在的话题 */
149
+ reply_in_thread?: boolean;
150
+ /** 由开发者生成的唯一字符串序列,用于回复消息请求去重;持有相同uuid的请求1小时内至多成功执行一次 */
151
+ uuid?: string;
152
+ }
153
+ interface ReplyResponse {
154
+ /** 消息id open_message_id */
155
+ message_id?: string;
156
+ /** 根消息id open_message_id */
157
+ root_id?: string;
158
+ /** 父消息的id open_message_id */
159
+ parent_id?: string;
160
+ /** 消息所属的话题 ID */
161
+ thread_id?: string;
162
+ /** 消息类型 text post card image等等 */
163
+ msg_type?: string;
164
+ /** 消息生成的时间戳(毫秒) */
165
+ create_time?: string;
166
+ /** 消息更新的时间戳 */
167
+ update_time?: string;
168
+ /** 消息是否被撤回 */
169
+ deleted?: boolean;
170
+ /** 消息是否被更新 */
171
+ updated?: boolean;
172
+ /** 所属的群 */
173
+ chat_id?: string;
174
+ /** 发送者,可以是用户或应用 */
175
+ sender?: Lark.Sender;
176
+ /** 消息内容,json结构 */
177
+ body?: Lark.MessageBody;
178
+ /** 被艾特的人或应用的id */
179
+ mentions?: Lark.Mention[];
180
+ /** 合并消息的上一层级消息id open_message_id */
181
+ upper_message_id?: string;
182
+ }
183
+ interface UpdateRequest {
184
+ /** 消息的类型,仅支持文本(text)和富文本(post)类型 */
185
+ msg_type: string;
186
+ /** 消息内容,JSON 格式 */
187
+ content: string;
188
+ }
189
+ interface UpdateResponse {
190
+ /** 消息id open_message_id */
191
+ message_id?: string;
192
+ /** 根消息id open_message_id */
193
+ root_id?: string;
194
+ /** 父消息的id open_message_id */
195
+ parent_id?: string;
196
+ /** 消息所属的话题 ID */
197
+ thread_id?: string;
198
+ /** 消息类型 text post card image等等 */
199
+ msg_type?: string;
200
+ /** 消息生成的时间戳(毫秒) */
201
+ create_time?: string;
202
+ /** 消息更新的时间戳 */
203
+ update_time?: string;
204
+ /** 消息是否被撤回 */
205
+ deleted?: boolean;
206
+ /** 消息是否被更新 */
207
+ updated?: boolean;
208
+ /** 所属的群 */
209
+ chat_id?: string;
210
+ /** 发送者,可以是用户或应用 */
211
+ sender?: Lark.Sender;
212
+ /** 消息内容,json结构 */
213
+ body?: Lark.MessageBody;
214
+ /** 被艾特的人或应用的id */
215
+ mentions?: Lark.Mention[];
216
+ /** 合并消息的上一层级消息id open_message_id */
217
+ upper_message_id?: string;
218
+ }
219
+ interface ForwardRequest {
220
+ /** 依据receive_id_type的值,填写对应的转发目标的ID */
221
+ receive_id: string;
222
+ }
223
+ interface ForwardQuery {
224
+ /** 消息接收者id类型 open_id/user_id/union_id/email/chat_id */
225
+ receive_id_type: 'open_id' | 'user_id' | 'union_id' | 'email' | 'chat_id' | 'thread_id';
226
+ /** 由开发者生成的唯一字符串序列,用于转发消息请求去重;持有相同uuid的请求在1小时内向同一个目标的转发只可成功一次。 */
227
+ uuid?: string;
228
+ }
229
+ interface ForwardResponse {
230
+ /** 消息id open_message_id */
231
+ message_id?: string;
232
+ /** 根消息id open_message_id */
233
+ root_id?: string;
234
+ /** 父消息的id open_message_id */
235
+ parent_id?: string;
236
+ /** 消息所属的话题 ID */
237
+ thread_id?: string;
238
+ /** 消息类型 text post card image等等 */
239
+ msg_type?: string;
240
+ /** 消息生成的时间戳(毫秒) */
241
+ create_time?: string;
242
+ /** 消息更新的时间戳 */
243
+ update_time?: string;
244
+ /** 消息是否被撤回 */
245
+ deleted?: boolean;
246
+ /** 消息是否被更新 */
247
+ updated?: boolean;
248
+ /** 所属的群 */
249
+ chat_id?: string;
250
+ /** 发送者,可以是用户或应用 */
251
+ sender?: Lark.Sender;
252
+ /** 消息内容,json结构 */
253
+ body?: Lark.MessageBody;
254
+ /** 被艾特的人或应用的id */
255
+ mentions?: Lark.Mention[];
256
+ /** 合并消息的上一层级消息id open_message_id */
257
+ upper_message_id?: string;
258
+ }
259
+ interface MergeForwardRequest {
260
+ /** 依据receive_id_type的值,填写对应的转发目标的ID */
261
+ receive_id: string;
262
+ /** 要转发的消息ID列表 */
263
+ message_id_list: string[];
264
+ }
265
+ interface MergeForwardQuery {
266
+ /** 消息接收者id类型 open_id/user_id/union_id/email/chat_id */
267
+ receive_id_type: 'open_id' | 'user_id' | 'union_id' | 'email' | 'chat_id' | 'thread_id';
268
+ /** 由开发者生成的唯一字符串序列,用于转发消息请求去重;持有相同uuid的请求在1小时内向同一个目标的转发只可成功一次。 */
269
+ uuid?: string;
270
+ }
271
+ interface MergeForwardResponse {
272
+ /** 合并转发生成的新消息 */
273
+ message?: Lark.Message;
274
+ /** 无效的消息ID列表 */
275
+ invalid_message_id_list?: string[];
276
+ }
277
+ interface PushFollowUpRequest {
278
+ /** follow up列表 */
279
+ follow_ups: Lark.FollowUp[];
280
+ }
281
+ interface ReadUsersQuery extends Pagination {
282
+ /** 此次调用中使用的用户ID的类型 */
283
+ user_id_type: 'user_id' | 'union_id' | 'open_id';
284
+ }
285
+ interface ListQuery extends Pagination {
286
+ /** 容器类型 ,目前可选值仅有"chat",包含单聊(p2p)和群聊(group) */
287
+ container_id_type: string;
288
+ /** 容器的id,即chat的id,详情参见[群ID 说明](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-id-description) */
289
+ container_id: string;
290
+ /** 历史信息的起始时间(秒级时间戳) */
291
+ start_time?: string;
292
+ /** 历史信息的结束时间(秒级时间戳) */
293
+ end_time?: string;
294
+ /** 消息排序方式 */
295
+ sort_type?: 'ByCreateTimeAsc' | 'ByCreateTimeDesc';
296
+ }
297
+ interface GetQuery {
298
+ /** 此次调用中使用的用户ID的类型 */
299
+ user_id_type?: 'user_id' | 'union_id' | 'open_id';
300
+ }
301
+ interface GetResponse {
302
+ /** message[] */
303
+ items?: Lark.Message[];
304
+ }
305
+ interface UrgentAppRequest {
306
+ /** 该字段标识目标用户的id类型 */
307
+ user_id_list: string[];
308
+ }
309
+ interface UrgentAppQuery {
310
+ /** 此次调用中使用的用户ID的类型 */
311
+ user_id_type: 'user_id' | 'union_id' | 'open_id';
312
+ }
313
+ interface UrgentAppResponse {
314
+ /** 无效的用户id */
315
+ invalid_user_id_list: string[];
316
+ }
317
+ interface UrgentSmsRequest {
318
+ /** 该字段标识目标用户的id类型 */
319
+ user_id_list: string[];
320
+ }
321
+ interface UrgentSmsQuery {
322
+ /** 此次调用中使用的用户ID的类型 */
323
+ user_id_type: 'user_id' | 'union_id' | 'open_id';
324
+ }
325
+ interface UrgentSmsResponse {
326
+ /** 无效的用户id */
327
+ invalid_user_id_list: string[];
328
+ }
329
+ interface UrgentPhoneRequest {
330
+ /** 该字段标识目标用户的id类型 */
331
+ user_id_list: string[];
332
+ }
333
+ interface UrgentPhoneQuery {
334
+ /** 此次调用中使用的用户ID的类型 */
335
+ user_id_type: 'user_id' | 'union_id' | 'open_id';
336
+ }
337
+ interface UrgentPhoneResponse {
338
+ /** 无效的用户id */
339
+ invalid_user_id_list: string[];
340
+ }
341
+ interface PatchRequest {
342
+ /** 消息内容 json 格式,[发送消息 content 说明](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/im-v1/message/create_json),参考文档中的卡片格式 */
343
+ content: string;
344
+ }
345
+ namespace Resource {
346
+ interface Methods {
347
+ /**
348
+ * 获取消息中的资源文件
349
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message-resource/get
350
+ */
351
+ get(message_id: string, file_key: string, query?: GetQuery): Promise<ArrayBuffer>;
352
+ }
353
+ interface GetQuery {
354
+ /** 资源类型,可选"image, file“; image对应消息中的 图片,富文本消息中的图片。 file对应消息中的 文件、音频、视频、(表情包除外) */
355
+ type: string;
356
+ }
357
+ }
358
+ namespace Reaction {
359
+ interface Methods {
360
+ /**
361
+ * 添加消息表情回复
362
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message-reaction/create
363
+ */
364
+ create(message_id: string, body: CreateRequest): Promise<CreateResponse>;
365
+ /**
366
+ * 获取消息表情回复
367
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message-reaction/list
368
+ */
369
+ list(message_id: string, query?: ListQuery): Paginated<Lark.MessageReaction>;
370
+ /**
371
+ * 删除消息表情回复
372
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message-reaction/delete
373
+ */
374
+ delete(message_id: string, reaction_id: string): Promise<DeleteResponse>;
375
+ }
376
+ interface CreateRequest {
377
+ /** reaction资源类型 */
378
+ reaction_type: Lark.Emoji;
379
+ }
380
+ interface CreateResponse {
381
+ /** reaction资源ID */
382
+ reaction_id?: string;
383
+ /** 添加reaction的操作人 */
384
+ operator?: Lark.Operator;
385
+ /** reaction动作的的unix timestamp(单位:ms) */
386
+ action_time?: string;
387
+ /** reaction资源类型 */
388
+ reaction_type?: Lark.Emoji;
389
+ }
390
+ interface ListQuery extends Pagination {
391
+ /** 待查询消息reaction的类型[emoji类型列举](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message-reaction/emojis-introduce)。- 不传入该参数,表示拉取所有类型reaction */
392
+ reaction_type?: string;
393
+ /** 当操作人为用户时返回用户ID的类型 */
394
+ user_id_type?: 'open_id' | 'union_id' | 'user_id';
395
+ }
396
+ interface DeleteResponse {
397
+ /** reaction资源ID */
398
+ reaction_id?: string;
399
+ /** 添加reaction的操作人 */
400
+ operator?: Lark.Operator;
401
+ /** reaction动作的的unix timestamp(单位:ms) */
402
+ action_time?: string;
403
+ /** reaction资源类型 */
404
+ reaction_type?: Lark.Emoji;
405
+ }
406
+ }
407
+ }
408
+ namespace Thread {
409
+ interface Methods {
410
+ /**
411
+ * 转发话题
412
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/thread/forward
413
+ */
414
+ forward(thread_id: string, body: ForwardRequest, query?: ForwardQuery): Promise<ForwardResponse>;
415
+ }
416
+ interface ForwardRequest {
417
+ /** 依据receive_id_type的值,填写对应的转发目标的ID */
418
+ receive_id: string;
419
+ }
420
+ interface ForwardQuery {
421
+ /** 消息接收者id类型 open_id/user_id/union_id/email/chat_id/thread_id */
422
+ receive_id_type: 'open_id' | 'user_id' | 'union_id' | 'email' | 'chat_id' | 'thread_id';
423
+ /** 由开发者生成的唯一字符串序列,用于转发消息请求去重;持有相同uuid的请求在1小时内向同一个目标的转发只可成功一次。 */
424
+ uuid?: string;
425
+ }
426
+ interface ForwardResponse {
427
+ /** 消息id open_message_id */
428
+ message_id?: string;
429
+ /** 根消息id open_message_id */
430
+ root_id?: string;
431
+ /** 父消息的id open_message_id */
432
+ parent_id?: string;
433
+ /** 消息所属的话题 ID */
434
+ thread_id?: string;
435
+ /** 消息类型 text post card image等等 */
436
+ msg_type?: string;
437
+ /** 消息生成的时间戳(毫秒) */
438
+ create_time?: string;
439
+ /** 消息更新的时间戳 */
440
+ update_time?: string;
441
+ /** 消息是否被撤回 */
442
+ deleted?: boolean;
443
+ /** 消息是否被更新 */
444
+ updated?: boolean;
445
+ /** 所属的群 */
446
+ chat_id?: string;
447
+ /** 发送者,可以是用户或应用 */
448
+ sender?: Lark.Sender;
449
+ /** 消息内容,json结构 */
450
+ body?: Lark.MessageBody;
451
+ /** 被艾特的人或应用的id */
452
+ mentions?: Lark.Mention[];
453
+ /** 合并消息的上一层级消息id open_message_id */
454
+ upper_message_id?: string;
455
+ }
456
+ }
457
+ namespace BatchMessage {
458
+ interface Methods {
459
+ /**
460
+ * 批量撤回消息
461
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/batch_message/delete
462
+ */
463
+ delete(batch_message_id: string): Promise<void>;
464
+ /**
465
+ * 查询批量消息推送和阅读人数
466
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/batch_message/read_user
467
+ */
468
+ readUser(batch_message_id: string): Promise<ReadUserResponse>;
469
+ /**
470
+ * 查询批量消息整体进度
471
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/batch_message/get_progress
472
+ */
473
+ getProgress(batch_message_id: string): Promise<GetProgressResponse>;
474
+ }
475
+ interface ReadUserResponse {
476
+ read_user?: Lark.BatchMessageReadUser;
477
+ }
478
+ interface GetProgressResponse {
479
+ /** 消息发送进度 */
480
+ batch_message_send_progress?: Lark.BatchMessageSendProgress;
481
+ /** 消息撤回进度 */
482
+ batch_message_recall_progress?: Lark.BatchMessageRecallProgress;
483
+ }
484
+ }
485
+ namespace Image {
486
+ interface Methods {
487
+ /**
488
+ * 上传图片
489
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/image/create
490
+ */
491
+ create(form: CreateForm): Promise<CreateResponse>;
492
+ /**
493
+ * 下载图片
494
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/image/get
495
+ */
496
+ get(image_key: string): Promise<ArrayBuffer>;
497
+ }
498
+ interface CreateForm {
499
+ /** 图片类型 */
500
+ image_type: 'message' | 'avatar';
501
+ /** 图片内容 **注意:** 上传的图片大小不能超过10MB */
502
+ image: Blob;
503
+ }
504
+ interface CreateResponse {
505
+ /** 图片的key */
506
+ image_key?: string;
507
+ }
508
+ }
509
+ namespace File {
510
+ interface Methods {
511
+ /**
512
+ * 上传文件
513
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/file/create
514
+ */
515
+ create(form: CreateForm): Promise<CreateResponse>;
516
+ /**
517
+ * 下载文件
518
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/file/get
519
+ */
520
+ get(file_key: string): Promise<ArrayBuffer>;
521
+ }
522
+ interface CreateForm {
523
+ /** 文件类型 */
524
+ file_type: 'opus' | 'mp4' | 'pdf' | 'doc' | 'xls' | 'ppt' | 'stream';
525
+ /** 带后缀的文件名 */
526
+ file_name: string;
527
+ /** 文件的时长(视频,音频),单位:毫秒。不填充时无法显示具体时长。 */
528
+ duration?: number;
529
+ /** 文件内容 */
530
+ file: Blob;
531
+ }
532
+ interface CreateResponse {
533
+ /** 文件的key */
534
+ file_key?: string;
535
+ }
536
+ }
537
+ namespace Pin {
538
+ interface Methods {
539
+ /**
540
+ * Pin 消息
541
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/pin/create
542
+ */
543
+ create(body: CreateRequest): Promise<CreateResponse>;
544
+ /**
545
+ * 移除 Pin 消息
546
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/pin/delete
547
+ */
548
+ delete(message_id: string): Promise<void>;
549
+ /**
550
+ * 获取群内 Pin 消息
551
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/pin/list
552
+ */
553
+ list(query?: ListQuery): Paginated<Lark.Pin>;
554
+ }
555
+ interface CreateRequest {
556
+ /** 待Pin的消息ID */
557
+ message_id: string;
558
+ }
559
+ interface CreateResponse {
560
+ pin?: Lark.Pin;
561
+ }
562
+ interface ListQuery extends Pagination {
563
+ /** 待获取Pin消息的Chat ID */
564
+ chat_id: string;
565
+ /** Pin信息的起始时间(毫秒级时间戳) */
566
+ start_time?: string;
567
+ /** Pin信息的结束时间(毫秒级时间戳) */
568
+ end_time?: string;
569
+ }
570
+ }
571
+ namespace UrlPreview {
572
+ interface Methods {
573
+ /**
574
+ * 更新 URL 预览
575
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/group/im-v2/url_preview/batch_update
576
+ */
577
+ batchUpdate(body: BatchUpdateRequest): Promise<void>;
578
+ }
579
+ interface BatchUpdateRequest {
580
+ /** URL预览的token列表 */
581
+ preview_tokens: string[];
582
+ /** 需要更新URL预览的用户open_id。若不传,则默认更新URL所在会话成员;若用户不在URL所在会话,则无法更新该用户 */
583
+ open_ids?: string[];
584
+ }
585
+ }
586
+ namespace Chat {
587
+ interface Methods {
588
+ moderation: Moderation.Methods;
589
+ topNotice: TopNotice.Methods;
590
+ managers: Managers.Methods;
591
+ members: Members.Methods;
592
+ announcement: Announcement.Methods;
593
+ tab: Tab.Methods;
594
+ menuTree: MenuTree.Methods;
595
+ menuItem: MenuItem.Methods;
596
+ /**
597
+ * 创建群
598
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat/create
599
+ */
600
+ create(body: CreateRequest, query?: CreateQuery): Promise<CreateResponse>;
601
+ /**
602
+ * 解散群
603
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat/delete
604
+ */
605
+ delete(chat_id: string): Promise<void>;
606
+ /**
607
+ * 更新群信息
608
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat/update
609
+ */
610
+ update(chat_id: string, body: UpdateRequest, query?: UpdateQuery): Promise<void>;
611
+ /**
612
+ * 获取群信息
613
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat/get
614
+ */
615
+ get(chat_id: string, query?: GetQuery): Promise<GetResponse>;
616
+ /**
617
+ * 获取用户或机器人所在的群列表
618
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat/list
619
+ */
620
+ list(query?: ListQuery): Paginated<Lark.ListChat>;
621
+ /**
622
+ * 搜索对用户或机器人可见的群列表
623
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat/search
624
+ */
625
+ search(query?: SearchQuery): Paginated<Lark.ListChat>;
626
+ /**
627
+ * 获取群分享链接
628
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat/link
629
+ */
630
+ link(chat_id: string, body: LinkRequest): Promise<LinkResponse>;
631
+ }
632
+ interface CreateRequest {
633
+ /** 群头像对应的 Image Key,可通过[上传图片](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/reference/im-v1/image/create)获取(注意:上传图片的 ==image_type== 需要指定为 ==avatar==) */
634
+ avatar?: string;
635
+ /** 群名称 **注意:** 公开群名称的长度不得少于2个字符 */
636
+ name?: string;
637
+ /** 群描述 */
638
+ description?: string;
639
+ /** 群国际化名称 */
640
+ i18n_names?: Lark.I18nNames;
641
+ /** 创建群时指定的群主,不填时指定建群的机器人为群主。群主 ID,ID值与查询参数中的 user_id_type 对应。不同 ID 的说明参见 [用户相关的 ID 概念](/ssl:ttdoc/home/user-identity-introduction/introduction) */
642
+ owner_id?: string;
643
+ /** 创建群时邀请的群成员,id 类型为 user_id_type */
644
+ user_id_list?: string[];
645
+ /** 创建群时邀请的群机器人 **注意:** 拉机器人入群请使用 ==app_id== */
646
+ bot_id_list?: string[];
647
+ /** 群消息模式 */
648
+ group_message_type?: 'chat' | 'thread';
649
+ /** 群模式**可选值有**:- `group`:群组 */
650
+ chat_mode?: string;
651
+ /** 群类型**可选值有**:- `private`:私有群- `public`:公开群 */
652
+ chat_type?: string;
653
+ /** 入群消息可见性**可选值有**:- `only_owner`:仅群主和管理员可见- `all_members`:所有成员可见- `not_anyone`:任何人均不可见 */
654
+ join_message_visibility?: string;
655
+ /** 退群消息可见性**可选值有**:- `only_owner`:仅群主和管理员可见- `all_members`:所有成员可见- `not_anyone`:任何人均不可见 */
656
+ leave_message_visibility?: string;
657
+ /** 加群审批**可选值有**:- `no_approval_required`:无需审批- `approval_required`:需要审批 */
658
+ membership_approval?: string;
659
+ /** 防泄密模式设置 */
660
+ restricted_mode_setting?: Lark.RestrictedModeSetting;
661
+ /** 谁可以加急 */
662
+ urgent_setting?: 'only_owner' | 'all_members';
663
+ /** 谁可以发起视频会议 */
664
+ video_conference_setting?: 'only_owner' | 'all_members';
665
+ /** 谁可以编辑群信息 */
666
+ edit_permission?: 'only_owner' | 'all_members';
667
+ /** 隐藏群成员人数设置 */
668
+ hide_member_count_setting?: 'all_members' | 'only_owner';
669
+ }
670
+ interface CreateQuery {
671
+ /** 此次调用中使用的用户ID的类型 */
672
+ user_id_type?: 'user_id' | 'union_id' | 'open_id';
673
+ /** 如果选择了设置群主为指定用户,可以选择是否同时设置创建此群的机器人为管理员,此标志位用于标记是否设置创建群的机器人为管理员 */
674
+ set_bot_manager?: boolean;
675
+ /** 由开发者生成的唯一字符串序列,用于创建群组请求去重;持有相同uuid的请求10小时内只可成功创建1个群聊 */
676
+ uuid?: string;
677
+ }
678
+ interface CreateResponse {
679
+ /** ID */
680
+ chat_id?: string;
681
+ /** 群头像URL */
682
+ avatar?: string;
683
+ /** 群名称 */
684
+ name?: string;
685
+ /** 群描述 */
686
+ description?: string;
687
+ /** 群国际化名称 */
688
+ i18n_names?: Lark.I18nNames;
689
+ /** 群主 ID */
690
+ owner_id?: string;
691
+ /** 群主 ID 类型 */
692
+ owner_id_type?: string;
693
+ /** 谁可以加急 */
694
+ urgent_setting?: 'only_owner' | 'all_members';
695
+ /** 谁可以发起视频会议 */
696
+ video_conference_setting?: 'only_owner' | 'all_members';
697
+ /** 加user/bot入群权限(all_members/only_owner) */
698
+ add_member_permission?: string;
699
+ /** 群分享权限(allowed/not_allowed) */
700
+ share_card_permission?: string;
701
+ /** at所有人权限(all_members/only_owner) */
702
+ at_all_permission?: string;
703
+ /** 群编辑权限(all_members/only_owner) */
704
+ edit_permission?: string;
705
+ /** 群消息模式 */
706
+ group_message_type?: string;
707
+ /** 群模式 */
708
+ chat_mode?: string;
709
+ /** 群类型 */
710
+ chat_type?: string;
711
+ /** 优先级最高的一个群tag */
712
+ chat_tag?: string;
713
+ /** 是否是外部群 */
714
+ external?: boolean;
715
+ /** tenant key */
716
+ tenant_key?: string;
717
+ /** 入群消息可见性 */
718
+ join_message_visibility?: string;
719
+ /** 出群消息可见性 */
720
+ leave_message_visibility?: string;
721
+ /** 加群审批 */
722
+ membership_approval?: string;
723
+ /** 发言权限 */
724
+ moderation_permission?: string;
725
+ /** 防泄密模式设置 */
726
+ restricted_mode_setting?: Lark.RestrictedModeSetting;
727
+ /** 隐藏群成员人数设置 */
728
+ hide_member_count_setting?: 'all_members' | 'only_owner';
729
+ }
730
+ interface UpdateRequest {
731
+ /** 群头像对应的 Image Key,可通过[上传图片](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/image/create)获取(注意:上传图片的 ==image_type== 需要指定为 ==avatar==) */
732
+ avatar?: string;
733
+ /** 群名称 */
734
+ name?: string;
735
+ /** 群描述 */
736
+ description?: string;
737
+ /** 群国际化名称 */
738
+ i18n_names?: Lark.I18nNames;
739
+ /** user/bot 入群权限(all_members/only_owner) */
740
+ add_member_permission?: string;
741
+ /** 群分享权限(allowed/not_allowed) */
742
+ share_card_permission?: string;
743
+ /** at 所有人权限(all_members/only_owner) */
744
+ at_all_permission?: string;
745
+ /** 群编辑权限(all_members/only_owner) */
746
+ edit_permission?: string;
747
+ /** 新群主 ID */
748
+ owner_id?: string;
749
+ /** 入群消息可见性(only_owner/all_members/not_anyone) */
750
+ join_message_visibility?: string;
751
+ /** 出群消息可见性(only_owner/all_members/not_anyone) */
752
+ leave_message_visibility?: string;
753
+ /** 加群审批(no_approval_required/approval_required) */
754
+ membership_approval?: string;
755
+ /** 防泄密模式设置 */
756
+ restricted_mode_setting?: Lark.RestrictedModeSetting;
757
+ /** 群类型 */
758
+ chat_type?: string;
759
+ /** 群消息模式 */
760
+ group_message_type?: 'chat' | 'thread';
761
+ /** 谁可以加急 */
762
+ urgent_setting?: 'only_owner' | 'all_members';
763
+ /** 谁可以发起视频会议 */
764
+ video_conference_setting?: 'only_owner' | 'all_members';
765
+ /** 隐藏群成员人数设置 */
766
+ hide_member_count_setting?: 'all_members' | 'only_owner';
767
+ }
768
+ interface UpdateQuery {
769
+ /** 此次调用中使用的用户ID的类型 */
770
+ user_id_type?: 'user_id' | 'union_id' | 'open_id';
771
+ }
772
+ interface GetQuery {
773
+ /** 此次调用中使用的用户ID的类型 */
774
+ user_id_type?: 'user_id' | 'union_id' | 'open_id';
775
+ }
776
+ interface GetResponse {
777
+ /** 群头像URL */
778
+ avatar?: string;
779
+ /** 群名称 */
780
+ name?: string;
781
+ /** 群描述 */
782
+ description?: string;
783
+ /** 群国际化名称 */
784
+ i18n_names?: Lark.I18nNames;
785
+ /** 加user/bot入群权限(all_members/only_owner) */
786
+ add_member_permission?: string;
787
+ /** 群分享权限(allowed/not_allowed) */
788
+ share_card_permission?: string;
789
+ /** at所有人权限(all_members/only_owner) */
790
+ at_all_permission?: string;
791
+ /** 群编辑权限(all_members/only_owner) */
792
+ edit_permission?: string;
793
+ /** 群主ID的类型(open_id/user_id/union_id) */
794
+ owner_id_type?: string;
795
+ /** 群主ID */
796
+ owner_id?: string;
797
+ /** 用户管理员列表 */
798
+ user_manager_id_list?: string[];
799
+ /** 机器人管理员列表 */
800
+ bot_manager_id_list?: string[];
801
+ /** 群消息模式 */
802
+ group_message_type?: string;
803
+ /** 群模式 */
804
+ chat_mode?: string;
805
+ /** 群类型 */
806
+ chat_type?: string;
807
+ /** 优先级最高的一个群tag */
808
+ chat_tag?: string;
809
+ /** 入群消息可见性 */
810
+ join_message_visibility?: string;
811
+ /** 出群消息可见性 */
812
+ leave_message_visibility?: string;
813
+ /** 加群审批 */
814
+ membership_approval?: string;
815
+ /** 发言权限 */
816
+ moderation_permission?: string;
817
+ /** 是否是外部群 */
818
+ external?: boolean;
819
+ /** tenant key */
820
+ tenant_key?: string;
821
+ /** 群成员人数 */
822
+ user_count?: string;
823
+ /** 群机器人数 */
824
+ bot_count?: string;
825
+ /** 防泄密模式设置 */
826
+ restricted_mode_setting?: Lark.RestrictedModeSetting;
827
+ /** 谁可以加急 */
828
+ urgent_setting?: 'only_owner' | 'all_members';
829
+ /** 谁可以发起视频会议 */
830
+ video_conference_setting?: 'only_owner' | 'all_members';
831
+ /** 隐藏群成员人数设置 */
832
+ hide_member_count_setting?: 'all_members' | 'only_owner';
833
+ /** 群状态 */
834
+ chat_status?: 'normal' | 'dissolved' | 'dissolved_save';
835
+ }
836
+ interface ListQuery extends Pagination {
837
+ /** 此次调用中使用的用户ID的类型 */
838
+ user_id_type?: 'user_id' | 'union_id' | 'open_id';
839
+ /** 群组排序方式 */
840
+ sort_type?: 'ByCreateTimeAsc' | 'ByActiveTimeDesc';
841
+ }
842
+ interface SearchQuery extends Pagination {
843
+ /** 此次调用中使用的用户ID的类型 */
844
+ user_id_type?: 'user_id' | 'union_id' | 'open_id';
845
+ /** 关键词。注意:如果query为空值将返回空的结果 */
846
+ query?: string;
847
+ }
848
+ interface LinkRequest {
849
+ /** 群分享链接有效时长,可选值week、year、permanently,分别表示7天、1年以及永久有效 */
850
+ validity_period?: 'week' | 'year' | 'permanently';
851
+ }
852
+ interface LinkResponse {
853
+ /** 群分享链接 */
854
+ share_link?: string;
855
+ /** 分享链接过期时间戳(秒级) */
856
+ expire_time?: string;
857
+ /** 分享链接是否永久有效 */
858
+ is_permanent?: boolean;
859
+ }
860
+ namespace Moderation {
861
+ interface Methods {
862
+ /**
863
+ * 更新群发言权限
864
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-moderation/update
865
+ */
866
+ update(chat_id: string, body: UpdateRequest, query?: UpdateQuery): Promise<void>;
867
+ /**
868
+ * 获取群成员发言权限
869
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-moderation/get
870
+ */
871
+ get(chat_id: string, query?: GetQuery): Promise<GetResponse>;
872
+ }
873
+ interface UpdateRequest {
874
+ /** 群发言模式(all_members/only_owner/moderator_list,其中 moderator_list 表示部分用户可发言的模式) */
875
+ moderation_setting?: string;
876
+ /** 选择部分用户可发言模式时,添加的可发言用户列表(自动过滤不在群内的用户) */
877
+ moderator_added_list?: string[];
878
+ /** 选择部分用户可发言模式时,移除的可发言用户列表(自动过滤不在群内的用户) */
879
+ moderator_removed_list?: string[];
880
+ }
881
+ interface UpdateQuery {
882
+ /** 此次调用中使用的用户ID的类型 */
883
+ user_id_type?: 'user_id' | 'union_id' | 'open_id';
884
+ }
885
+ interface GetQuery extends Pagination {
886
+ /** 此次调用中使用的用户ID的类型 */
887
+ user_id_type?: 'user_id' | 'union_id' | 'open_id';
888
+ }
889
+ interface GetResponse {
890
+ /** 群发言模式 */
891
+ moderation_setting?: string;
892
+ /** 分页标记,当 has_more 为 true 时,会同时返回新的 page_token,否则不返回 page_token */
893
+ page_token?: string;
894
+ /** 是否还有更多项 */
895
+ has_more?: boolean;
896
+ /** 可发言用户列表 */
897
+ items?: Lark.ListModerator[];
898
+ }
899
+ }
900
+ namespace TopNotice {
901
+ interface Methods {
902
+ /**
903
+ * 更新群置顶
904
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-top_notice/put_top_notice
905
+ */
906
+ putTopNotice(chat_id: string, body: PutTopNoticeRequest): Promise<void>;
907
+ /**
908
+ * 撤销群置顶
909
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-top_notice/delete_top_notice
910
+ */
911
+ deleteTopNotice(chat_id: string): Promise<void>;
912
+ }
913
+ interface PutTopNoticeRequest {
914
+ /** 要进行发布的群置顶 */
915
+ chat_top_notice: Lark.ChatTopNotice[];
916
+ }
917
+ }
918
+ namespace Managers {
919
+ interface Methods {
920
+ /**
921
+ * 指定群管理员
922
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-managers/add_managers
923
+ */
924
+ addManagers(chat_id: string, body: AddManagersRequest, query?: AddManagersQuery): Promise<AddManagersResponse>;
925
+ /**
926
+ * 删除群管理员
927
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-managers/delete_managers
928
+ */
929
+ deleteManagers(chat_id: string, body: DeleteManagersRequest, query?: DeleteManagersQuery): Promise<DeleteManagersResponse>;
930
+ }
931
+ interface AddManagersRequest {
932
+ /** 要增加的 manager_id */
933
+ manager_ids?: string[];
934
+ }
935
+ interface AddManagersQuery {
936
+ /** 群成员 id 类型 open_id/user_id/union_id/app_id */
937
+ member_id_type?: 'user_id' | 'union_id' | 'open_id' | 'app_id';
938
+ }
939
+ interface AddManagersResponse {
940
+ /** 群目前的管理员id */
941
+ chat_managers?: string[];
942
+ /** 群目前的管理员bot id */
943
+ chat_bot_managers?: string[];
944
+ }
945
+ interface DeleteManagersRequest {
946
+ /** 要删除的 manager_id */
947
+ manager_ids?: string[];
948
+ }
949
+ interface DeleteManagersQuery {
950
+ /** 群成员 id 类型 open_id/user_id/union_id/app_id */
951
+ member_id_type?: 'user_id' | 'union_id' | 'open_id' | 'app_id';
952
+ }
953
+ interface DeleteManagersResponse {
954
+ /** 群目前的管理员id */
955
+ chat_managers?: string[];
956
+ /** 群目前的管理员bot id */
957
+ chat_bot_managers?: string[];
958
+ }
959
+ }
960
+ namespace Members {
961
+ interface Methods {
962
+ /**
963
+ * 将用户或机器人拉入群聊
964
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-members/create
965
+ */
966
+ create(chat_id: string, body: CreateRequest, query?: CreateQuery): Promise<CreateResponse>;
967
+ /**
968
+ * 用户或机器人主动加入群聊
969
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-members/me_join
970
+ */
971
+ meJoin(chat_id: string): Promise<void>;
972
+ /**
973
+ * 将用户或机器人移出群聊
974
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-members/delete
975
+ */
976
+ delete(chat_id: string, body: DeleteRequest, query?: DeleteQuery): Promise<DeleteResponse>;
977
+ /**
978
+ * 获取群成员列表
979
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-members/get
980
+ */
981
+ get(chat_id: string, query?: GetQuery): Promise<GetResponse>;
982
+ /**
983
+ * 判断用户或机器人是否在群里
984
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-members/is_in_chat
985
+ */
986
+ isInChat(chat_id: string): Promise<IsInChatResponse>;
987
+ }
988
+ interface CreateRequest {
989
+ /** 成员列表<b>注意:</b>每次请求,最多拉50个用户或者5个机器人,并且群组最多容纳15个机器人 */
990
+ id_list?: string[];
991
+ }
992
+ interface CreateQuery {
993
+ /** 进群成员 id 类型 open_id/user_id/union_id/app_id<b>注意:</b>拉机器人入群请使用 ==app_id== */
994
+ member_id_type?: 'user_id' | 'union_id' | 'open_id' | 'app_id';
995
+ /** 出现不可用ID后的处理方式 0/1/2 */
996
+ succeed_type?: 0 | 1 | 2;
997
+ }
998
+ interface CreateResponse {
999
+ /** ID无效的成员列表 */
1000
+ invalid_id_list?: string[];
1001
+ /** ID不存在的成员列表 */
1002
+ not_existed_id_list?: string[];
1003
+ /** 等待群主或管理员审批的成员ID列表 */
1004
+ pending_approval_id_list?: string[];
1005
+ }
1006
+ interface DeleteRequest {
1007
+ /** 成员列表 */
1008
+ id_list?: string[];
1009
+ }
1010
+ interface DeleteQuery {
1011
+ /** 出群成员 id 类型 open_id/user_id/union_id/app_id */
1012
+ member_id_type?: 'user_id' | 'union_id' | 'open_id' | 'app_id';
1013
+ }
1014
+ interface DeleteResponse {
1015
+ /** 无效成员列表 */
1016
+ invalid_id_list?: string[];
1017
+ }
1018
+ interface GetQuery extends Pagination {
1019
+ /** 群成员 用户 ID 类型,详情参见 [用户相关的 ID 概念](/ssl:ttdoc/home/user-identity-introduction/introduction) */
1020
+ member_id_type?: 'user_id' | 'union_id' | 'open_id';
1021
+ }
1022
+ interface GetResponse {
1023
+ /** member列表 */
1024
+ items?: Lark.ListMember[];
1025
+ /** 分页标记,当 has_more 为 true 时,会同时返回新的 page_token,否则不返回 page_token */
1026
+ page_token?: string;
1027
+ /** 是否还有更多项 */
1028
+ has_more?: boolean;
1029
+ /** 成员总数 */
1030
+ member_total?: number;
1031
+ }
1032
+ interface IsInChatResponse {
1033
+ /** 用户或者机器人是否在群中 */
1034
+ is_in_chat?: boolean;
1035
+ }
1036
+ }
1037
+ namespace Announcement {
1038
+ interface Methods {
1039
+ /**
1040
+ * 更新群公告信息
1041
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-announcement/patch
1042
+ */
1043
+ patch(chat_id: string, body: PatchRequest): Promise<void>;
1044
+ /**
1045
+ * 获取群公告信息
1046
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-announcement/get
1047
+ */
1048
+ get(chat_id: string, query?: GetQuery): Promise<GetResponse>;
1049
+ }
1050
+ interface PatchRequest {
1051
+ /** 文档当前版本号 int64 类型,get 接口会返回 */
1052
+ revision: string;
1053
+ /** 修改文档请求的序列化字段更新公告信息的格式和更新[云文档](/ssl:ttdoc/ukTMukTMukTM/uYDM2YjL2AjN24iNwYjN)格式相同 */
1054
+ requests?: string[];
1055
+ }
1056
+ interface GetQuery {
1057
+ /** 此次调用中使用的用户ID的类型 */
1058
+ user_id_type?: 'user_id' | 'union_id' | 'open_id';
1059
+ }
1060
+ interface GetResponse {
1061
+ /** CCM 文档序列化信息 */
1062
+ content?: string;
1063
+ /** 文档当前版本号 纯数字 */
1064
+ revision?: string;
1065
+ /** 文档生成的时间戳(秒) */
1066
+ create_time?: string;
1067
+ /** 消息更新的时间戳(秒) */
1068
+ update_time?: string;
1069
+ /** 文档所有者id类型, open_id/user_id/union_id/app_id */
1070
+ owner_id_type?: 'user_id' | 'union_id' | 'open_id' | 'app_id';
1071
+ /** 文档所有者id */
1072
+ owner_id?: string;
1073
+ /** 文档最新修改者id类型, open_id/user_id/union_id/app_id */
1074
+ modifier_id_type?: 'user_id' | 'union_id' | 'open_id' | 'app_id';
1075
+ /** 文档最新修改者id */
1076
+ modifier_id?: string;
1077
+ }
1078
+ }
1079
+ namespace Tab {
1080
+ interface Methods {
1081
+ /**
1082
+ * 添加会话标签页
1083
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-tab/create
1084
+ */
1085
+ create(chat_id: string, body: CreateRequest): Promise<CreateResponse>;
1086
+ /**
1087
+ * 删除会话标签页
1088
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-tab/delete_tabs
1089
+ */
1090
+ deleteTabs(chat_id: string, body: DeleteTabsRequest): Promise<DeleteTabsResponse>;
1091
+ /**
1092
+ * 更新会话标签页
1093
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-tab/update_tabs
1094
+ */
1095
+ updateTabs(chat_id: string, body: UpdateTabsRequest): Promise<UpdateTabsResponse>;
1096
+ /**
1097
+ * 会话标签页排序
1098
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-tab/sort_tabs
1099
+ */
1100
+ sortTabs(chat_id: string, body: SortTabsRequest): Promise<SortTabsResponse>;
1101
+ /**
1102
+ * 拉取会话标签页
1103
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-tab/list_tabs
1104
+ */
1105
+ listTabs(chat_id: string): Promise<ListTabsResponse>;
1106
+ }
1107
+ interface CreateRequest {
1108
+ /** 会话标签页 */
1109
+ chat_tabs: Lark.ChatTab[];
1110
+ }
1111
+ interface CreateResponse {
1112
+ /** 群标签列表 */
1113
+ chat_tabs?: Lark.ChatTab[];
1114
+ }
1115
+ interface DeleteTabsRequest {
1116
+ /** 会话标签页id列表 */
1117
+ tab_ids: string[];
1118
+ }
1119
+ interface DeleteTabsResponse {
1120
+ /** 群标签列表 */
1121
+ chat_tabs?: Lark.ChatTab[];
1122
+ }
1123
+ interface UpdateTabsRequest {
1124
+ /** 会话标签页 */
1125
+ chat_tabs?: Lark.ChatTab[];
1126
+ }
1127
+ interface UpdateTabsResponse {
1128
+ /** 群标签列表 */
1129
+ chat_tabs?: Lark.ChatTab[];
1130
+ }
1131
+ interface SortTabsRequest {
1132
+ /** 会话标签页ID列表 */
1133
+ tab_ids?: string[];
1134
+ }
1135
+ interface SortTabsResponse {
1136
+ /** 群标签列表 */
1137
+ chat_tabs?: Lark.ChatTab[];
1138
+ }
1139
+ interface ListTabsResponse {
1140
+ /** 会话标签页 */
1141
+ chat_tabs?: Lark.ChatTab[];
1142
+ }
1143
+ }
1144
+ namespace MenuTree {
1145
+ interface Methods {
1146
+ /**
1147
+ * 添加群菜单
1148
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-menu_tree/create
1149
+ */
1150
+ create(chat_id: string, body: CreateRequest): Promise<CreateResponse>;
1151
+ /**
1152
+ * 删除群菜单
1153
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-menu_tree/delete
1154
+ */
1155
+ delete(chat_id: string, body: DeleteRequest): Promise<DeleteResponse>;
1156
+ /**
1157
+ * 排序群菜单
1158
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-menu_tree/sort
1159
+ */
1160
+ sort(chat_id: string, body: SortRequest): Promise<SortResponse>;
1161
+ /**
1162
+ * 获取群菜单
1163
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-menu_tree/get
1164
+ */
1165
+ get(chat_id: string): Promise<GetResponse>;
1166
+ }
1167
+ interface CreateRequest {
1168
+ /** 要向群内追加的菜单 */
1169
+ menu_tree: Lark.ChatMenuTree;
1170
+ }
1171
+ interface CreateResponse {
1172
+ /** 追加后群内现有菜单 */
1173
+ menu_tree?: Lark.ChatMenuTree;
1174
+ }
1175
+ interface DeleteRequest {
1176
+ /** 要删除的一级菜单ID列表 */
1177
+ chat_menu_top_level_ids: string[];
1178
+ }
1179
+ interface DeleteResponse {
1180
+ /** 群内现有菜单 */
1181
+ menu_tree?: Lark.ChatMenuTree;
1182
+ }
1183
+ interface SortRequest {
1184
+ /** 一级菜单id列表 */
1185
+ chat_menu_top_level_ids: string[];
1186
+ }
1187
+ interface SortResponse {
1188
+ /** 排序后群内菜单 */
1189
+ menu_tree?: Lark.ChatMenuTree;
1190
+ }
1191
+ interface GetResponse {
1192
+ /** 群内所有菜单 */
1193
+ menu_tree?: Lark.ChatMenuTree;
1194
+ }
1195
+ }
1196
+ namespace MenuItem {
1197
+ interface Methods {
1198
+ /**
1199
+ * 修改群菜单元信息
1200
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-menu_item/patch
1201
+ */
1202
+ patch(chat_id: string, menu_item_id: string, body: PatchRequest): Promise<PatchResponse>;
1203
+ }
1204
+ interface PatchRequest {
1205
+ /** 修改的字段 */
1206
+ update_fields: ('ICON' | 'NAME' | 'I18N_NAME' | 'REDIRECT_LINK')[];
1207
+ /** 元信息 */
1208
+ chat_menu_item: Lark.ChatMenuItem;
1209
+ }
1210
+ interface PatchResponse {
1211
+ chat_menu_item?: Lark.ChatMenuItem;
1212
+ }
1213
+ }
1214
+ }
1215
+ namespace AppFeedCard {
1216
+ interface Methods {
1217
+ batch: Batch.Methods;
1218
+ /**
1219
+ * 创建应用消息流卡片
1220
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/group/im-v2/app_feed_card/create
1221
+ */
1222
+ create(body: CreateRequest, query?: CreateQuery): Promise<CreateResponse>;
1223
+ }
1224
+ interface CreateRequest {
1225
+ /** 应用消息卡片 */
1226
+ app_feed_card?: Lark.OpenAppFeedCard;
1227
+ /** 用户 ID */
1228
+ user_ids?: string[];
1229
+ }
1230
+ interface CreateQuery {
1231
+ /** 用户 ID 类型 */
1232
+ user_id_type?: 'open_id' | 'union_id' | 'user_id';
1233
+ }
1234
+ interface CreateResponse {
1235
+ /** 失败的卡片 */
1236
+ failed_cards?: Lark.OpenFailedUserAppFeedCardItem[];
1237
+ /** 卡片业务 ID */
1238
+ biz_id?: string;
1239
+ }
1240
+ namespace Batch {
1241
+ interface Methods {
1242
+ /**
1243
+ * 更新应用消息流卡片
1244
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/group/im-v2/app_feed_card-batch/update
1245
+ */
1246
+ update(body: UpdateRequest, query?: UpdateQuery): Promise<UpdateResponse>;
1247
+ /**
1248
+ * 删除应用消息流卡片
1249
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/group/im-v2/app_feed_card-batch/delete
1250
+ */
1251
+ delete(body: DeleteRequest, query?: DeleteQuery): Promise<DeleteResponse>;
1252
+ }
1253
+ interface UpdateRequest {
1254
+ /** 应用消息卡片 */
1255
+ feed_cards?: Lark.UserOpenAppFeedCardUpdater[];
1256
+ }
1257
+ interface UpdateQuery {
1258
+ /** 此次调用中使用的用户ID的类型 可选值有: - open_id: 以open_id来识别用户 - user_id: 以user_id来识别用户 - union_id: 以union_id来识别用户 */
1259
+ user_id_type?: 'open_id' | 'user_id' | 'union_id';
1260
+ }
1261
+ interface UpdateResponse {
1262
+ /** 失败的卡片 */
1263
+ failed_cards?: Lark.OpenFailedUserAppFeedCardItem[];
1264
+ }
1265
+ interface DeleteRequest {
1266
+ /** 应用消息卡片 */
1267
+ feed_cards?: Lark.UserOpenAppFeedCardDeleter[];
1268
+ }
1269
+ interface DeleteQuery {
1270
+ /** 此次调用中使用的用户ID的类型 可选值有: - open_id: 以open_id来识别用户 - user_id: 以user_id来识别用户 - union_id: 以union_id来识别用户 */
1271
+ user_id_type?: 'open_id' | 'user_id' | 'union_id';
1272
+ }
1273
+ interface DeleteResponse {
1274
+ /** 失败的卡片 */
1275
+ failed_cards?: Lark.OpenFailedUserAppFeedCardItem[];
1276
+ }
1277
+ }
1278
+ }
1279
+ namespace FeedCard {
1280
+ interface Methods {
1281
+ /**
1282
+ * 机器人单聊即时提醒
1283
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/group/im-v2/feed_card/bot_time_sentive
1284
+ */
1285
+ botTimeSentive(body: BotTimeSentiveRequest, query?: BotTimeSentiveQuery): Promise<BotTimeSentiveResponse>;
1286
+ /**
1287
+ * 即时提醒
1288
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/group/im-v2/feed_card/patch
1289
+ */
1290
+ patch(feed_card_id: string, body: PatchRequest, query?: PatchQuery): Promise<PatchResponse>;
1291
+ }
1292
+ interface BotTimeSentiveRequest {
1293
+ /** 临时置顶状态,true-打开,false-关闭 */
1294
+ time_sensitive: boolean;
1295
+ /** 用户id 列表 */
1296
+ user_ids: string[];
1297
+ }
1298
+ interface BotTimeSentiveQuery {
1299
+ /** 此次调用中使用的用户ID的类型 可选值有: - open_id: 以open_id来识别用户 - user_id: 以user_id来识别用户 - union_id: 以union_id来识别用户 */
1300
+ user_id_type: 'open_id' | 'user_id' | 'union_id';
1301
+ }
1302
+ interface BotTimeSentiveResponse {
1303
+ /** 失败原因 */
1304
+ failed_user_reasons?: Lark.FailedReason[];
1305
+ }
1306
+ interface PatchRequest {
1307
+ /** 临时置顶状态,true-打开,false-关闭 */
1308
+ time_sensitive: boolean;
1309
+ /** 用户id 列表 */
1310
+ user_ids: string[];
1311
+ }
1312
+ interface PatchQuery {
1313
+ /** 此次调用中使用的用户ID的类型 可选值有: - open_id: 以open_id来识别用户 - user_id: 以user_id来识别用户 - union_id: 以union_id来识别用户 */
1314
+ user_id_type: 'open_id' | 'user_id' | 'union_id';
1315
+ }
1316
+ interface PatchResponse {
1317
+ /** 失败原因 */
1318
+ failed_user_reasons?: Lark.FailedReason[];
1319
+ }
1320
+ }
1321
+ namespace ChatButton {
1322
+ interface Methods {
1323
+ /**
1324
+ * 更新消息流卡片按钮
1325
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/group/im-v2/chat_button/update
1326
+ */
1327
+ update(body: UpdateRequest, query?: UpdateQuery): Promise<UpdateResponse>;
1328
+ }
1329
+ interface UpdateRequest {
1330
+ /** 用户 ID 列表 */
1331
+ user_ids?: string[];
1332
+ /** 群 ID */
1333
+ chat_id: string;
1334
+ /** 按钮 */
1335
+ buttons?: Lark.OpenAppFeedCardButtons;
1336
+ }
1337
+ interface UpdateQuery {
1338
+ /** 用户 ID 类型 */
1339
+ user_id_type?: 'open_id' | 'union_id' | 'user_id';
1340
+ }
1341
+ interface UpdateResponse {
1342
+ /** 失败的用户 */
1343
+ failed_user_reasons?: Lark.FailedReason[];
1344
+ }
1345
+ }
1346
+ namespace BizEntityTagRelation {
1347
+ interface Methods {
1348
+ /**
1349
+ * 查询实体与标签的绑定关系
1350
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/group/im-v2/biz_entity_tag_relation/get
1351
+ */
1352
+ get(query?: GetQuery): Promise<GetResponse>;
1353
+ /**
1354
+ * 绑定标签到群
1355
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/group/im-v2/biz_entity_tag_relation/create
1356
+ */
1357
+ create(body: CreateRequest): Promise<void>;
1358
+ /**
1359
+ * 解绑标签与群
1360
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/group/im-v2/biz_entity_tag_relation/update
1361
+ */
1362
+ update(body: UpdateRequest): Promise<void>;
1363
+ }
1364
+ interface GetQuery {
1365
+ /** 业务类型 */
1366
+ tag_biz_type: 'chat';
1367
+ /** 业务实体id */
1368
+ biz_entity_id: string;
1369
+ }
1370
+ interface GetResponse {
1371
+ /** 标签内容及绑定时间 */
1372
+ tag_info_with_bind_versions?: Lark.TagInfoWithBindVersion[];
1373
+ }
1374
+ interface CreateRequest {
1375
+ /** 业务类型 */
1376
+ tag_biz_type: 'chat';
1377
+ /** 业务实体id */
1378
+ biz_entity_id: string;
1379
+ /** 标签id */
1380
+ tag_ids?: string[];
1381
+ }
1382
+ interface UpdateRequest {
1383
+ /** 业务类型 */
1384
+ tag_biz_type: 'chat';
1385
+ /** 业务实体id */
1386
+ biz_entity_id: string;
1387
+ /** 标签id */
1388
+ tag_ids?: string[];
1389
+ }
1390
+ }
1391
+ namespace Tag {
1392
+ interface Methods {
1393
+ /**
1394
+ * 创建标签
1395
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/group/im-v2/tag/create
1396
+ */
1397
+ create(body: CreateRequest): Promise<CreateResponse>;
1398
+ /**
1399
+ * 修改标签
1400
+ * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/group/im-v2/tag/patch
1401
+ */
1402
+ patch(tag_id: string, body: PatchRequest): Promise<PatchResponse>;
1403
+ }
1404
+ interface CreateRequest {
1405
+ /** 创建标签 */
1406
+ create_tag: Lark.CreateTag;
1407
+ }
1408
+ interface CreateResponse {
1409
+ /** 创建的tagid */
1410
+ id?: string;
1411
+ /** 创建失败原因 */
1412
+ create_tag_fail_reason?: Lark.CreateTagFailReason;
1413
+ }
1414
+ interface PatchRequest {
1415
+ /** 编辑标签 */
1416
+ patch_tag?: Lark.PatchTag;
1417
+ }
1418
+ interface PatchResponse {
1419
+ /** 编辑后的taginfo */
1420
+ tag_info?: Lark.TagInfo;
1421
+ /** 修改失败原因 */
1422
+ patch_tag_fail_reason?: Lark.PatchTagFailReason;
1423
+ }
1424
+ }
1300
1425
  }