From 855049085720f9752393a4334e2ceec0a293f0f5 Mon Sep 17 00:00:00 2001 From: Shigma Date: Mon, 25 Nov 2024 10:32:28 +0800 Subject: [PATCH 01/10] feat(lark): unwrap response.data --- adapters/lark/src/bot.ts | 26 +- adapters/lark/src/message.ts | 14 +- adapters/lark/src/types/api.ts | 6493 +++++++++++---------------- adapters/lark/src/types/internal.ts | 20 +- adapters/lark/src/utils.ts | 6 +- 5 files changed, 2539 insertions(+), 4020 deletions(-) diff --git a/adapters/lark/src/bot.ts b/adapters/lark/src/bot.ts index 8f2fb3ea..b9aef147 100644 --- a/adapters/lark/src/bot.ts +++ b/adapters/lark/src/bot.ts @@ -89,26 +89,26 @@ export class LarkBot extends Bot async getMessage(channelId: string, messageId: string, recursive = true) { const data = await this.internal.getImMessage(messageId) - const message = await Utils.decodeMessage(this, data.data.items[0], recursive) + const message = await Utils.decodeMessage(this, data.items[0], recursive) const im = await this.internal.getImChat(channelId) - message.channel.type = im.data.chat_mode === 'p2p' ? Universal.Channel.Type.DIRECT : Universal.Channel.Type.TEXT + message.channel.type = im.chat_mode === 'p2p' ? Universal.Channel.Type.DIRECT : Universal.Channel.Type.TEXT return message } async getMessageList(channelId: string, before?: string) { - const { data: messages } = await this.internal.listImMessage({ container_id_type: 'chat', container_id: channelId, page_token: before }) + const messages = await this.internal.listImMessage({ container_id_type: 'chat', container_id: channelId, page_token: before }) const data = await Promise.all(messages.items.reverse().map(data => Utils.decodeMessage(this, data))) return { data, next: data[0]?.id } } async getUser(userId: string, guildId?: string) { const data = await this.internal.getContactUser(userId) - return Utils.decodeUser(data.data.user) + return Utils.decodeUser(data.user) } async getChannel(channelId: string) { - const { data } = await this.internal.getImChat(channelId) - return Utils.decodeChannel(channelId, data) + const chat = await this.internal.getImChat(channelId) + return Utils.decodeChannel(channelId, chat) } async getChannelList(guildId: string) { @@ -116,19 +116,19 @@ export class LarkBot extends Bot } async getGuild(guildId: string) { - const { data } = await this.internal.getImChat(guildId) - return Utils.decodeGuild(data) + const chat = await this.internal.getImChat(guildId) + return Utils.decodeGuild(chat) } async getGuildList(after?: string) { - const { data: guilds } = await this.internal.listImChat({ page_token: after }) - return { data: guilds.items.map(Utils.decodeGuild), next: guilds.page_token } + const chats = await this.internal.listImChat({ page_token: after }) + return { data: chats.items.map(Utils.decodeGuild), next: chats.page_token } } async getGuildMemberList(guildId: string, after?: string) { - const { data: users } = await this.internal.getImChatMembers(guildId, { page_token: after }) - const data = users.items.map(v => ({ user: { id: v.member_id, name: v.name }, name: v.name })) - return { data, next: users.page_token } + const members = await this.internal.getImChatMembers(guildId, { page_token: after }) + const data = members.items.map(v => ({ user: { id: v.member_id, name: v.name }, name: v.name })) + return { data, next: members.page_token } } } diff --git a/adapters/lark/src/message.ts b/adapters/lark/src/message.ts index be452bbb..2502ee85 100644 --- a/adapters/lark/src/message.ts +++ b/adapters/lark/src/message.ts @@ -1,6 +1,6 @@ import { Context, Dict, h, MessageEncoder } from '@satorijs/core' import { LarkBot } from './bot' -import { BaseResponse, Lark, MessageContent } from './types' +import { Lark, MessageContent } from './types' import { extractIdType } from './utils' export class LarkMessageEncoder extends MessageEncoder> { @@ -13,7 +13,7 @@ export class LarkMessageEncoder extends MessageEnco async post(data?: any) { try { - let resp: BaseResponse & { data?: Lark.Message } + let resp: Lark.Message if (this.quote?.id) { resp = await this.bot.internal.replyImMessage(this.quote.id, { ...data, @@ -26,9 +26,9 @@ export class LarkMessageEncoder extends MessageEnco }) } const session = this.bot.session() - session.messageId = resp.data.message_id - session.timestamp = Number(resp.data.create_time) * 1000 - session.userId = resp.data.sender.id + session.messageId = resp.message_id + session.timestamp = Number(resp.create_time) * 1000 + session.userId = resp.sender.id session.channelId = this.channelId session.guildId = this.guildId session.app.emit(session, 'send', session) @@ -96,7 +96,7 @@ export class LarkMessageEncoder extends MessageEnco const payload = new FormData() payload.append('image', new Blob([data], { type }), filename) payload.append('image_type', 'message') - const { data: { image_key } } = await this.bot.internal.createImImage(payload) + const { image_key } = await this.bot.internal.createImImage(payload) return image_key } @@ -126,7 +126,7 @@ export class LarkMessageEncoder extends MessageEnco } } - const { data: { file_key } } = await this.bot.internal.createImFile(payload) + const { file_key } = await this.bot.internal.createImFile(payload) await this.post({ msg_type: _type === 'video' ? 'media' : _type, content: JSON.stringify({ file_key }), diff --git a/adapters/lark/src/types/api.ts b/adapters/lark/src/types/api.ts index bec9a8b1..7eddc2b4 100644 --- a/adapters/lark/src/types/api.ts +++ b/adapters/lark/src/types/api.ts @@ -25123,9 +25123,7 @@ export interface SetVcRoomConfigQuery { user_id_type?: string } -export interface ListEventOutboundIpResponse extends BaseResponse { - data: Paginated -} +export interface ListEventOutboundIpResponse extends Paginated {} export interface TenantAccessTokenInternalAuthResponse extends BaseResponse { /** 访问 token */ tenant_access_token?: string @@ -25150,4383 +25148,2898 @@ export interface TenantAccessTokenAuthResponse extends BaseResponse { /** app_access_token 过期时间 */ expire?: number } -export interface CreateAuthenOidcAccessTokenResponse extends BaseResponse { - data?: Lark.TokenInfo +export interface CreateAuthenOidcAccessTokenResponse extends Lark.TokenInfo {} +export interface CreateAuthenOidcRefreshAccessTokenResponse extends Lark.TokenInfo {} +export interface GetAuthenUserInfoResponse extends Lark.UserInfo {} +export interface QueryPassportSessionResponse { + mask_sessions?: Lark.MaskSession[] } -export interface CreateAuthenOidcRefreshAccessTokenResponse extends BaseResponse { - data?: Lark.TokenInfo +export interface ListContactScopeResponse extends Paginated {} +export interface CreateContactUserResponse { + user?: Lark.User } -export interface GetAuthenUserInfoResponse extends BaseResponse { - data?: Lark.UserInfo +export interface PatchContactUserResponse { + user?: Lark.User } -export interface QueryPassportSessionResponse extends BaseResponse { - data?: { - mask_sessions?: Lark.MaskSession[] - } +export interface GetContactUserResponse { + user?: Lark.User } -export interface ListContactScopeResponse extends BaseResponse { - data: Paginated +export interface BatchContactUserResponse { + /** 查询到的用户信息,其中异常的用户ID不返回结果。 */ + items?: Lark.User[] } -export interface CreateContactUserResponse extends BaseResponse { - data?: { - user?: Lark.User - } +export interface FindByDepartmentContactUserResponse extends Paginated {} +export interface BatchGetIdContactUserResponse { + /** 手机号或者邮箱对应的用户id信息 */ + user_list?: Lark.UserContactInfo[] } -export interface PatchContactUserResponse extends BaseResponse { - data?: { - user?: Lark.User - } +export interface CreateContactGroupResponse { + /** 用户组ID */ + group_id: string } -export interface GetContactUserResponse extends BaseResponse { - data?: { - user?: Lark.User - } +export interface GetContactGroupResponse { + /** 用户组详情 */ + group: Lark.Group } -export interface BatchContactUserResponse extends BaseResponse { - data?: { - /** 查询到的用户信息,其中异常的用户ID不返回结果。 */ - items?: Lark.User[] - } +export interface SimplelistContactGroupResponse extends Paginated {} +export interface MemberBelongContactGroupResponse { + /** 用户组ID列表 */ + group_list?: string[] + /** 分页查询Token */ + page_token?: string + /** 是否有更多结果 */ + has_more?: boolean } -export interface FindByDepartmentContactUserResponse extends BaseResponse { - data: Paginated +export interface ListContactCustomAttrResponse extends Paginated {} +export interface CreateContactEmployeeTypeEnumResponse { + /** 创建人员类型接口 */ + employee_type_enum?: Lark.EmployeeTypeEnum } -export interface BatchGetIdContactUserResponse extends BaseResponse { - data?: { - /** 手机号或者邮箱对应的用户id信息 */ - user_list?: Lark.UserContactInfo[] - } +export interface UpdateContactEmployeeTypeEnumResponse { + employee_type_enum?: Lark.EmployeeTypeEnum } -export interface CreateContactGroupResponse extends BaseResponse { - data?: { - /** 用户组ID */ - group_id: string - } +export interface ListContactEmployeeTypeEnumResponse extends Paginated {} +export interface CreateContactDepartmentResponse { + department?: Lark.Department } -export interface GetContactGroupResponse extends BaseResponse { - data?: { - /** 用户组详情 */ - group: Lark.Group - } +export interface PatchContactDepartmentResponse { + department?: Lark.Department } -export interface SimplelistContactGroupResponse extends BaseResponse { - data: Paginated -} -export interface MemberBelongContactGroupResponse extends BaseResponse { - data?: { - /** 用户组ID列表 */ - group_list?: string[] - /** 分页查询Token */ - page_token?: string - /** 是否有更多结果 */ - has_more?: boolean - } +export interface UpdateContactDepartmentResponse { + department?: Lark.Department } -export interface ListContactCustomAttrResponse extends BaseResponse { - data: Paginated +export interface GetContactDepartmentResponse { + department?: Lark.Department } -export interface CreateContactEmployeeTypeEnumResponse extends BaseResponse { - data?: { - /** 创建人员类型接口 */ - employee_type_enum?: Lark.EmployeeTypeEnum - } +export interface BatchContactDepartmentResponse { + /** 查询到的部门信息,其中异常的部门ID不返回结果。 */ + items?: Lark.Department[] } -export interface UpdateContactEmployeeTypeEnumResponse extends BaseResponse { - data?: { - employee_type_enum?: Lark.EmployeeTypeEnum - } +export interface ChildrenContactDepartmentResponse extends Paginated {} +export interface ParentContactDepartmentResponse extends Paginated {} +export interface SearchContactDepartmentResponse extends Paginated {} +export interface CreateContactUnitResponse { + /** 单位的自定义ID */ + unit_id: string } -export interface ListContactEmployeeTypeEnumResponse extends BaseResponse { - data: Paginated +export interface ListDepartmentContactUnitResponse { + /** 单位绑定的部门列表 */ + departmentlist: Lark.UnitDepartment[] + /** 是否还有分页数据 */ + has_more: boolean + /** 下次分页请求标记 */ + page_token: string } -export interface CreateContactDepartmentResponse extends BaseResponse { - data?: { - department?: Lark.Department - } +export interface GetContactUnitResponse { + /** 单位信息 */ + unit: Lark.Unit } -export interface PatchContactDepartmentResponse extends BaseResponse { - data?: { - department?: Lark.Department - } +export interface ListContactUnitResponse { + /** 单位列表 */ + unitlist: Lark.Unit[] + /** 是否还有分页数据 */ + has_more: boolean + /** 分页下次调用的page_token值 */ + page_token: string } -export interface UpdateContactDepartmentResponse extends BaseResponse { - data?: { - department?: Lark.Department - } +export interface BatchAddContactGroupMemberResponse { + /** 成员添加操作结果 */ + results?: Lark.MemberResult[] } -export interface GetContactDepartmentResponse extends BaseResponse { - data?: { - department?: Lark.Department - } +export interface SimplelistContactGroupMemberResponse { + /** 成员列表 */ + memberlist: Lark.Memberlist[] + /** 下次分页获取的page_token */ + page_token: string + /** 是否还需要分页获取 */ + has_more: boolean } -export interface BatchContactDepartmentResponse extends BaseResponse { - data?: { - /** 查询到的部门信息,其中异常的部门ID不返回结果。 */ - items?: Lark.Department[] - } +export interface CreateContactFunctionalRoleResponse { + /** 角色ID,在单租户下唯一 */ + role_id: string } -export interface ChildrenContactDepartmentResponse extends BaseResponse { - data: Paginated +export interface BatchCreateContactFunctionalRoleMemberResponse { + /** 批量新增角色成员结果集 */ + results?: Lark.FunctionalRoleMemberResult[] +} +export interface BatchDeleteContactFunctionalRoleMemberResponse { + /** 批量新增角色成员结果集 */ + result?: Lark.FunctionalRoleMemberResult[] +} +export interface ScopesContactFunctionalRoleMemberResponse { + /** 批量更新角色成员管理范围结果集 */ + results?: Lark.FunctionalRoleMemberResult[] +} +export interface GetContactFunctionalRoleMemberResponse { + /** 成员的管理范围 */ + member?: Lark.FunctionalRoleMember +} +export interface ListContactFunctionalRoleMemberResponse extends Paginated {} +export interface CreateContactJobLevelResponse { + /** 职级信息 */ + job_level?: Lark.JobLevel +} +export interface UpdateContactJobLevelResponse { + /** 职级信息 */ + job_level?: Lark.JobLevel +} +export interface GetContactJobLevelResponse { + /** 职级信息 */ + job_level?: Lark.JobLevel +} +export interface ListContactJobLevelResponse extends Paginated {} +export interface CreateContactJobFamilyResponse { + /** 序列信息 */ + job_family?: Lark.JobFamily +} +export interface UpdateContactJobFamilyResponse { + /** 更新后的序列信息 */ + job_family?: Lark.JobFamily +} +export interface GetContactJobFamilyResponse { + /** 序列信息 */ + job_family?: Lark.JobFamily +} +export interface ListContactJobFamilyResponse extends Paginated {} +export interface GetContactJobTitleResponse { + /** 职务信息 */ + job_title?: Lark.JobTitle +} +export interface ListContactJobTitleResponse extends Paginated {} +export interface GetContactWorkCityResponse { + /** 工作城市信息 */ + work_city?: Lark.WorkCity +} +export interface ListContactWorkCityResponse extends Paginated {} +export interface CreateImMessageResponse extends Lark.Message {} +export interface ReplyImMessageResponse extends Lark.Message {} +export interface UpdateImMessageResponse extends Lark.Message {} +export interface ForwardImMessageResponse extends Lark.Message {} +export interface MergeForwardImMessageResponse { + /** 合并转发生成的新消息 */ + message?: Lark.Message + /** 无效的消息ID列表 */ + invalid_message_id_list?: string[] +} +export interface ForwardImThreadResponse extends Lark.Message {} +export interface ReadUsersImMessageResponse { + /** read_user[] */ + items?: Lark.ReadUser[] + /** 是否还有下一页 */ + has_more: boolean + /** 下一页分页的token */ + page_token?: string } -export interface ParentContactDepartmentResponse extends BaseResponse { - data: Paginated +export interface ListImMessageResponse extends Paginated {} +export interface GetImMessageResponse { + /** message[] */ + items?: Lark.Message[] +} +export interface UrgentAppImMessageResponse { + /** 无效的用户id */ + invalid_user_id_list: string[] +} +export interface UrgentSmsImMessageResponse { + /** 无效的用户id */ + invalid_user_id_list: string[] +} +export interface UrgentPhoneImMessageResponse { + /** 无效的用户id */ + invalid_user_id_list: string[] +} +export interface ReadUserImBatchMessageResponse { + read_user?: Lark.BatchMessageReadUser +} +export interface GetProgressImBatchMessageResponse { + /** 消息发送进度 */ + batch_message_send_progress?: Lark.BatchMessageSendProgress + /** 消息撤回进度 */ + batch_message_recall_progress?: Lark.BatchMessageRecallProgress +} +export interface CreateImImageResponse { + /** 图片的key */ + image_key?: string +} +export interface CreateImFileResponse { + /** 文件的key */ + file_key?: string +} +export interface CreateImMessageReactionResponse extends Lark.MessageReaction {} +export interface DeleteImMessageReactionResponse extends Lark.MessageReaction {} +export interface ListImMessageReactionResponse extends Paginated {} +export interface CreateImPinResponse { + pin?: Lark.Pin +} +export interface ListImPinResponse extends Paginated {} +export interface CreateImChatResponse { + /** 群ID */ + chat_id?: string + /** 群头像URL */ + avatar?: string + /** 群名称 */ + name?: string + /** 群描述 */ + description?: string + /** 群国际化名称 */ + i18n_names?: Lark.I18nNames + /** 群主 ID */ + owner_id?: string + /** 群主 ID 类型 */ + owner_id_type?: string + /** 谁可以加急 */ + urgent_setting?: string + /** 谁可以发起视频会议 */ + video_conference_setting?: string + /** 加user/bot入群权限(all_members/only_owner) */ + add_member_permission?: string + /** 群分享权限(allowed/not_allowed) */ + share_card_permission?: string + /** at所有人权限(all_members/only_owner) */ + at_all_permission?: string + /** 群编辑权限(all_members/only_owner) */ + edit_permission?: string + /** 群模式 */ + chat_mode?: string + /** 群类型 */ + chat_type?: string + /** 优先级最高的一个群tag */ + chat_tag?: string + /** 是否是外部群 */ + external?: boolean + /** tenant key */ + tenant_key?: string + /** 入群消息可见性 */ + join_message_visibility?: string + /** 出群消息可见性 */ + leave_message_visibility?: string + /** 加群审批 */ + membership_approval?: string + /** 发言权限 */ + moderation_permission?: string + /** 防泄密模式设置 */ + restricted_mode_setting?: Lark.RestrictedModeSetting } -export interface SearchContactDepartmentResponse extends BaseResponse { - data: Paginated +export interface GetImChatResponse { + /** 群头像URL */ + avatar?: string + /** 群名称 */ + name?: string + /** 群描述 */ + description?: string + /** 群国际化名称 */ + i18n_names?: Lark.I18nNames + /** 加user/bot入群权限(all_members/only_owner) */ + add_member_permission?: string + /** 群分享权限(allowed/not_allowed) */ + share_card_permission?: string + /** at所有人权限(all_members/only_owner) */ + at_all_permission?: string + /** 群编辑权限(all_members/only_owner) */ + edit_permission?: string + /** 群主ID的类型(open_id/user_id/union_id) */ + owner_id_type?: string + /** 群主ID */ + owner_id?: string + /** 用户管理员列表 */ + user_manager_id_list?: string[] + /** 机器人管理员列表 */ + bot_manager_id_list?: string[] + /** 群模式 */ + chat_mode?: string + /** 群类型 */ + chat_type?: string + /** 优先级最高的一个群tag */ + chat_tag?: string + /** 入群消息可见性 */ + join_message_visibility?: string + /** 出群消息可见性 */ + leave_message_visibility?: string + /** 加群审批 */ + membership_approval?: string + /** 发言权限 */ + moderation_permission?: string + /** 是否是外部群 */ + external?: boolean + /** tenant key */ + tenant_key?: string + /** 群成员人数 */ + user_count?: string + /** 群机器人数 */ + bot_count?: string + /** 防泄密模式设置 */ + restricted_mode_setting?: Lark.RestrictedModeSetting + /** 谁可以加急 */ + urgent_setting?: string + /** 谁可以发起视频会议 */ + video_conference_setting?: string } -export interface CreateContactUnitResponse extends BaseResponse { - data?: { - /** 单位的自定义ID */ - unit_id: string - } +export interface ListImChatResponse extends Paginated {} +export interface SearchImChatResponse extends Paginated {} +export interface GetImChatModerationResponse extends Paginated {} +export interface LinkImChatResponse { + /** 群分享链接 */ + share_link?: string + /** 分享链接过期时间戳(秒级) */ + expire_time?: string + /** 分享链接是否永久有效 */ + is_permanent?: boolean +} +export interface AddManagersImChatManagersResponse { + /** 群目前的管理员id */ + chat_managers?: string[] + /** 群目前的管理员bot id */ + chat_bot_managers?: string[] +} +export interface DeleteManagersImChatManagersResponse { + /** 群目前的管理员id */ + chat_managers?: string[] + /** 群目前的管理员bot id */ + chat_bot_managers?: string[] +} +export interface CreateImChatMembersResponse { + /** ID无效的成员列表 */ + invalid_id_list?: string[] + /** ID不存在的成员列表 */ + not_existed_id_list?: string[] + /** 等待群主或管理员审批的成员ID列表 */ + pending_approval_id_list?: string[] +} +export interface DeleteImChatMembersResponse { + /** 无效成员列表 */ + invalid_id_list?: string[] +} +export interface GetImChatMembersResponse extends Paginated {} +export interface IsInChatImChatMembersResponse { + /** 用户或者机器人是否在群中 */ + is_in_chat?: boolean +} +export interface GetImChatAnnouncementResponse { + /** CCM 文档序列化信息 */ + content?: string + /** 文档当前版本号 纯数字 */ + revision?: string + /** 文档生成的时间戳(秒) */ + create_time?: string + /** 消息更新的时间戳(秒) */ + update_time?: string + /** 文档所有者id类型, open_id/user_id/union_id/app_id */ + owner_id_type?: string + /** 文档所有者id */ + owner_id?: string + /** 文档最新修改者id类型, open_id/user_id/union_id/app_id */ + modifier_id_type?: string + /** 文档最新修改者id */ + modifier_id?: string } -export interface ListDepartmentContactUnitResponse extends BaseResponse { - data?: { - /** 单位绑定的部门列表 */ - departmentlist: Lark.UnitDepartment[] - /** 是否还有分页数据 */ - has_more: boolean - /** 下次分页请求标记 */ - page_token: string - } +export interface CreateImChatTabResponse { + /** 群标签列表 */ + chat_tabs?: Lark.ChatTab[] } -export interface GetContactUnitResponse extends BaseResponse { - data?: { - /** 单位信息 */ - unit: Lark.Unit - } +export interface DeleteTabsImChatTabResponse { + /** 群标签列表 */ + chat_tabs?: Lark.ChatTab[] } -export interface ListContactUnitResponse extends BaseResponse { - data?: { - /** 单位列表 */ - unitlist: Lark.Unit[] - /** 是否还有分页数据 */ - has_more: boolean - /** 分页下次调用的page_token值 */ - page_token: string - } +export interface UpdateTabsImChatTabResponse { + /** 群标签列表 */ + chat_tabs?: Lark.ChatTab[] } -export interface BatchAddContactGroupMemberResponse extends BaseResponse { - data?: { - /** 成员添加操作结果 */ - results?: Lark.MemberResult[] - } +export interface SortTabsImChatTabResponse { + /** 群标签列表 */ + chat_tabs?: Lark.ChatTab[] } -export interface SimplelistContactGroupMemberResponse extends BaseResponse { - data?: { - /** 成员列表 */ - memberlist: Lark.Memberlist[] - /** 下次分页获取的page_token */ - page_token: string - /** 是否还需要分页获取 */ - has_more: boolean - } +export interface ListTabsImChatTabResponse { + /** 会话标签页 */ + chat_tabs?: Lark.ChatTab[] } -export interface CreateContactFunctionalRoleResponse extends BaseResponse { - data?: { - /** 角色ID,在单租户下唯一 */ - role_id: string - } +export interface CreateImChatMenuTreeResponse { + /** 追加后群内现有菜单 */ + menu_tree?: Lark.ChatMenuTree } -export interface BatchCreateContactFunctionalRoleMemberResponse extends BaseResponse { - data?: { - /** 批量新增角色成员结果集 */ - results?: Lark.FunctionalRoleMemberResult[] - } +export interface DeleteImChatMenuTreeResponse { + /** 群内现有菜单 */ + menu_tree?: Lark.ChatMenuTree } -export interface BatchDeleteContactFunctionalRoleMemberResponse extends BaseResponse { - data?: { - /** 批量新增角色成员结果集 */ - result?: Lark.FunctionalRoleMemberResult[] - } +export interface PatchImChatMenuItemResponse { + chat_menu_item?: Lark.ChatMenuItem } -export interface ScopesContactFunctionalRoleMemberResponse extends BaseResponse { - data?: { - /** 批量更新角色成员管理范围结果集 */ - results?: Lark.FunctionalRoleMemberResult[] - } +export interface SortImChatMenuTreeResponse { + /** 排序后群内菜单 */ + menu_tree?: Lark.ChatMenuTree } -export interface GetContactFunctionalRoleMemberResponse extends BaseResponse { - data?: { - /** 成员的管理范围 */ - member?: Lark.FunctionalRoleMember - } +export interface GetImChatMenuTreeResponse { + /** 群内所有菜单 */ + menu_tree?: Lark.ChatMenuTree } -export interface ListContactFunctionalRoleMemberResponse extends BaseResponse { - data: Paginated +export interface ListDrivev1FileResponse extends Paginated {} +export interface CreateFolderDrivev1FileResponse { + /** 创建文件夹的token */ + token?: string + /** 创建文件夹的访问url */ + url?: string } -export interface CreateContactJobLevelResponse extends BaseResponse { - data?: { - /** 职级信息 */ - job_level?: Lark.JobLevel - } +export interface BatchQueryDrivev1MetaResponse { + metas: Lark.Meta[] + failed_list?: Lark.MetaFailed[] } -export interface UpdateContactJobLevelResponse extends BaseResponse { - data?: { - /** 职级信息 */ - job_level?: Lark.JobLevel - } +export interface GetDrivev1FileStatisticsResponse { + /** 文档token */ + file_token?: string + /** 文档类型 */ + file_type?: string + /** 文档统计信息 */ + statistics?: Lark.FileStatistics } -export interface GetContactJobLevelResponse extends BaseResponse { - data?: { - /** 职级信息 */ - job_level?: Lark.JobLevel - } +export interface CopyDrivev1FileResponse { + /** 复制后的文件资源 */ + file?: Lark.File } -export interface ListContactJobLevelResponse extends BaseResponse { - data: Paginated +export interface MoveDrivev1FileResponse { + /** 异步任务id,移动文件夹时返回 */ + task_id?: string } -export interface CreateContactJobFamilyResponse extends BaseResponse { - data?: { - /** 序列信息 */ - job_family?: Lark.JobFamily - } +export interface DeleteDrivev1FileResponse { + /** 异步任务id,删除文件夹时返回 */ + task_id?: string } -export interface UpdateContactJobFamilyResponse extends BaseResponse { - data?: { - /** 更新后的序列信息 */ - job_family?: Lark.JobFamily - } +export interface CreateShortcutDrivev1FileResponse { + /** 返回创建成功的shortcut节点 */ + succ_shortcut_node?: Lark.File } -export interface GetContactJobFamilyResponse extends BaseResponse { - data?: { - /** 序列信息 */ - job_family?: Lark.JobFamily - } +export interface TaskCheckDrivev1FileResponse { + /** 异步任务的执行状态 */ + status?: string } -export interface ListContactJobFamilyResponse extends BaseResponse { - data: Paginated +export interface UploadAllDrivev1MediaResponse { + file_token?: string } -export interface GetContactJobTitleResponse extends BaseResponse { - data?: { - /** 职务信息 */ - job_title?: Lark.JobTitle - } +export interface BatchGetTmpDownloadUrlDrivev1MediaResponse { + /** 临时下载列表 */ + tmp_download_urls?: Lark.TmpDownloadUrl[] } -export interface ListContactJobTitleResponse extends BaseResponse { - data: Paginated +export interface UploadPrepareDrivev1MediaResponse { + /** 分片上传事务ID */ + upload_id?: string + /** 分片大小策略 */ + block_size?: number + /** 分片数量 */ + block_num?: number } -export interface GetContactWorkCityResponse extends BaseResponse { - data?: { - /** 工作城市信息 */ - work_city?: Lark.WorkCity - } +export interface UploadFinishDrivev1MediaResponse { + file_token?: string } -export interface ListContactWorkCityResponse extends BaseResponse { - data: Paginated +export interface UploadAllDrivev1FileResponse { + file_token?: string } -export interface CreateImMessageResponse extends BaseResponse { - data?: Lark.Message +export interface UploadPrepareDrivev1FileResponse { + /** 分片上传事务ID */ + upload_id?: string + /** 分片大小策略 */ + block_size?: number + /** 分片数量 */ + block_num?: number +} +export interface UploadFinishDrivev1FileResponse { + file_token?: string +} +export interface CreateDrivev1ImportTaskResponse { + /** 导入任务ID */ + ticket?: string +} +export interface GetDrivev1ImportTaskResponse { + result?: Lark.ImportTask +} +export interface CreateDrivev1ExportTaskResponse { + /** 导出任务ID */ + ticket?: string +} +export interface GetDrivev1ExportTaskResponse { + /** 导出结果 */ + result?: Lark.ExportTask +} +export interface ListDrivev1FileViewRecordResponse extends Paginated {} +export interface CreateDrivev1FileVersionResponse extends Lark.Version {} +export interface GetDrivev1FileVersionResponse extends Lark.Version {} +export interface ListDrivev1FileVersionResponse extends Paginated {} +export interface AuthDrivev1PermissionMemberResponse { + /** 是否有权限 */ + auth_result: boolean +} +export interface ListDrivev1PermissionMemberResponse { + /** 返回的列表数据 */ + items?: Lark.Member[] +} +export interface CreateDrivev1PermissionMemberResponse { + /** 本次添加权限的用户信息 */ + member?: Lark.BaseMember +} +export interface UpdateDrivev1PermissionMemberResponse { + /** 本次更新权限的用户信息 */ + member?: Lark.BaseMember +} +export interface CreateDrivev1PermissionPublicPasswordResponse { + /** 密码 */ + password?: string +} +export interface UpdateDrivev1PermissionPublicPasswordResponse { + /** 密码 */ + password?: string +} +export interface GetDrivev1PermissionPublicResponse { + /** 返回的文档公共设置 */ + permission_public?: Lark.PermissionPublic +} +export interface PatchDrivev1PermissionPublicResponse { + /** 本次更新后的文档公共设置 */ + permission_public?: Lark.PermissionPublic +} +export interface GetDrivev2PermissionPublicResponse { + /** 返回的文档公共设置 */ + permission_public?: Lark.PermissionPublic +} +export interface PatchDrivev2PermissionPublicResponse { + /** 本次更新后文档公共设置 */ + permission_public?: Lark.PermissionPublic +} +export interface ListDrivev1FileCommentResponse extends Paginated {} +export interface BatchQueryDrivev1FileCommentResponse { + /** 评论的相关信息、回复的信息、回复分页的信息 */ + items?: Lark.FileComment[] +} +export interface CreateDrivev1FileCommentResponse extends Lark.FileComment {} +export interface GetDrivev1FileCommentResponse extends Lark.FileComment {} +export interface ListDrivev1FileCommentReplyResponse extends Paginated {} +export interface GetDocxDocumentResponse { + /** 文档信息 */ + document?: Lark.Document +} +export interface RawContentDocxDocumentResponse { + /** 文档纯文本 */ + content?: string } -export interface ReplyImMessageResponse extends BaseResponse { - data?: Lark.Message +export interface ListDocxDocumentBlockResponse extends Paginated {} +export interface CreateDocxDocumentResponse { + /** 新建文档的文档信息 */ + document?: Lark.Document } -export interface UpdateImMessageResponse extends BaseResponse { - data?: Lark.Message +export interface GetDocxDocumentBlockResponse { + /** 查询的 Block 的信息 */ + block?: Lark.Block } -export interface ForwardImMessageResponse extends BaseResponse { - data?: Lark.Message +export interface GetDocxDocumentBlockChildrenResponse extends Paginated {} +export interface CreateDocxDocumentBlockChildrenResponse { + /** 所添加的孩子的 Block 信息 */ + children?: Lark.Block[] + /** 当前 block children 创建成功后文档的版本号 */ + document_revision_id?: number + /** 操作的唯一标识,更新请求中使用此值表示幂等的进行此次更新 */ + client_token: string } -export interface MergeForwardImMessageResponse extends BaseResponse { - data?: { - /** 合并转发生成的新消息 */ - message?: Lark.Message - /** 无效的消息ID列表 */ - invalid_message_id_list?: string[] - } +export interface PatchDocxDocumentBlockResponse { + /** 更新后的 block 信息 */ + block?: Lark.Block + /** 当前更新成功后文档的版本号 */ + document_revision_id?: number + /** 操作的唯一标识,更新请求中使用此值表示幂等的进行此次更新 */ + client_token: string } -export interface ForwardImThreadResponse extends BaseResponse { - data?: Lark.Message -} -export interface ReadUsersImMessageResponse extends BaseResponse { - data?: { - /** read_user[] */ - items?: Lark.ReadUser[] - /** 是否还有下一页 */ - has_more: boolean - /** 下一页分页的token */ - page_token?: string - } +export interface BatchUpdateDocxDocumentBlockResponse { + /** 批量更新的 Block */ + blocks?: Lark.Block[] + /** 当前更新成功后文档的版本号 */ + document_revision_id?: number + /** 操作的唯一标识,更新请求中使用此值表示幂等的进行此次更新 */ + client_token: string } -export interface ListImMessageResponse extends BaseResponse { - data: Paginated +export interface BatchDeleteDocxDocumentBlockChildrenResponse { + /** 当前删除操作成功后文档的版本号 */ + document_revision_id?: number + /** 操作的唯一标识,更新请求中使用此值表示幂等的进行此次更新 */ + client_token: string } -export interface GetImMessageResponse extends BaseResponse { - data?: { - /** message[] */ - items?: Lark.Message[] - } +export interface ListBoardWhiteboardNodeResponse { + /** 查询结果 */ + nodes?: Lark.WhiteboardNode[] } -export interface UrgentAppImMessageResponse extends BaseResponse { - data?: { - /** 无效的用户id */ - invalid_user_id_list: string[] - } +export interface GetSheetsSpreadsheetResponse { + spreadsheet?: Lark.GetSpreadsheet } -export interface UrgentSmsImMessageResponse extends BaseResponse { - data?: { - /** 无效的用户id */ - invalid_user_id_list: string[] - } +export interface CreateSheetsSpreadsheetResponse { + /** 表格信息 */ + spreadsheet?: Lark.Spreadsheet } -export interface UrgentPhoneImMessageResponse extends BaseResponse { - data?: { - /** 无效的用户id */ - invalid_user_id_list: string[] - } +export interface GetSheetsSpreadsheetSheetResponse { + sheet?: Lark.Sheet } -export interface ReadUserImBatchMessageResponse extends BaseResponse { - data?: { - read_user?: Lark.BatchMessageReadUser - } +export interface QuerySheetsSpreadsheetSheetResponse { + /** 工作表信息 */ + sheets?: Lark.Sheet[] } -export interface GetProgressImBatchMessageResponse extends BaseResponse { - data?: { - /** 消息发送进度 */ - batch_message_send_progress?: Lark.BatchMessageSendProgress - /** 消息撤回进度 */ - batch_message_recall_progress?: Lark.BatchMessageRecallProgress - } +export interface FindSheetsSpreadsheetSheetResponse { + /** 查找返回符合条件的信息 */ + find_result?: Lark.FindReplaceResult } -export interface CreateImImageResponse extends BaseResponse { - data?: { - /** 图片的key */ - image_key?: string - } +export interface ReplaceSheetsSpreadsheetSheetResponse { + /** 符合查找条件并替换的单元格信息 */ + replace_result?: Lark.FindReplaceResult } -export interface CreateImFileResponse extends BaseResponse { - data?: { - /** 文件的key */ - file_key?: string - } +export interface GetSheetsSpreadsheetSheetFilterResponse { + sheet_filter_info?: Lark.SheetFilterInfo } -export interface CreateImMessageReactionResponse extends BaseResponse { - data?: Lark.MessageReaction +export interface GetSheetsSpreadsheetSheetFilterViewResponse { + /** 筛选视图信息,包括 id、name、range */ + filter_view?: Lark.FilterView } -export interface DeleteImMessageReactionResponse extends BaseResponse { - data?: Lark.MessageReaction +export interface QuerySheetsSpreadsheetSheetFilterViewResponse { + /** 子表的所有筛选视图信息,id、name、range */ + items?: Lark.FilterView[] } -export interface ListImMessageReactionResponse extends BaseResponse { - data: Paginated +export interface CreateSheetsSpreadsheetSheetFilterViewResponse { + /** 创建的筛选视图的 id 、name、range */ + filter_view?: Lark.FilterView } -export interface CreateImPinResponse extends BaseResponse { - data?: { - pin?: Lark.Pin - } +export interface PatchSheetsSpreadsheetSheetFilterViewResponse { + /** 更新后的筛选视图的 id 、name、range */ + filter_view?: Lark.FilterView } -export interface ListImPinResponse extends BaseResponse { - data: Paginated -} -export interface CreateImChatResponse extends BaseResponse { - data?: { - /** 群ID */ - chat_id?: string - /** 群头像URL */ - avatar?: string - /** 群名称 */ - name?: string - /** 群描述 */ - description?: string - /** 群国际化名称 */ - i18n_names?: Lark.I18nNames - /** 群主 ID */ - owner_id?: string - /** 群主 ID 类型 */ - owner_id_type?: string - /** 谁可以加急 */ - urgent_setting?: string - /** 谁可以发起视频会议 */ - video_conference_setting?: string - /** 加user/bot入群权限(all_members/only_owner) */ - add_member_permission?: string - /** 群分享权限(allowed/not_allowed) */ - share_card_permission?: string - /** at所有人权限(all_members/only_owner) */ - at_all_permission?: string - /** 群编辑权限(all_members/only_owner) */ - edit_permission?: string - /** 群模式 */ - chat_mode?: string - /** 群类型 */ - chat_type?: string - /** 优先级最高的一个群tag */ - chat_tag?: string - /** 是否是外部群 */ - external?: boolean - /** tenant key */ - tenant_key?: string - /** 入群消息可见性 */ - join_message_visibility?: string - /** 出群消息可见性 */ - leave_message_visibility?: string - /** 加群审批 */ - membership_approval?: string - /** 发言权限 */ - moderation_permission?: string - /** 防泄密模式设置 */ - restricted_mode_setting?: Lark.RestrictedModeSetting - } +export interface GetSheetsSpreadsheetSheetFilterViewConditionResponse { + /** 筛选的条件 */ + condition?: Lark.FilterViewCondition } -export interface GetImChatResponse extends BaseResponse { - data?: { - /** 群头像URL */ - avatar?: string - /** 群名称 */ - name?: string - /** 群描述 */ - description?: string - /** 群国际化名称 */ - i18n_names?: Lark.I18nNames - /** 加user/bot入群权限(all_members/only_owner) */ - add_member_permission?: string - /** 群分享权限(allowed/not_allowed) */ - share_card_permission?: string - /** at所有人权限(all_members/only_owner) */ - at_all_permission?: string - /** 群编辑权限(all_members/only_owner) */ - edit_permission?: string - /** 群主ID的类型(open_id/user_id/union_id) */ - owner_id_type?: string - /** 群主ID */ - owner_id?: string - /** 用户管理员列表 */ - user_manager_id_list?: string[] - /** 机器人管理员列表 */ - bot_manager_id_list?: string[] - /** 群模式 */ - chat_mode?: string - /** 群类型 */ - chat_type?: string - /** 优先级最高的一个群tag */ - chat_tag?: string - /** 入群消息可见性 */ - join_message_visibility?: string - /** 出群消息可见性 */ - leave_message_visibility?: string - /** 加群审批 */ - membership_approval?: string - /** 发言权限 */ - moderation_permission?: string - /** 是否是外部群 */ - external?: boolean - /** tenant key */ - tenant_key?: string - /** 群成员人数 */ - user_count?: string - /** 群机器人数 */ - bot_count?: string - /** 防泄密模式设置 */ - restricted_mode_setting?: Lark.RestrictedModeSetting - /** 谁可以加急 */ - urgent_setting?: string - /** 谁可以发起视频会议 */ - video_conference_setting?: string - } +export interface QuerySheetsSpreadsheetSheetFilterViewConditionResponse { + /** 筛选视图设置的所有筛选条件 */ + items?: Lark.FilterViewCondition[] } -export interface ListImChatResponse extends BaseResponse { - data: Paginated +export interface CreateSheetsSpreadsheetSheetFilterViewConditionResponse { + /** 创建的筛选条件 */ + condition?: Lark.FilterViewCondition } -export interface SearchImChatResponse extends BaseResponse { - data: Paginated +export interface UpdateSheetsSpreadsheetSheetFilterViewConditionResponse { + /** 更新后的筛选条件 */ + condition?: Lark.FilterViewCondition } -export interface GetImChatModerationResponse extends BaseResponse { - data: Paginated +export interface GetSheetsSpreadsheetSheetFloatImageResponse { + float_image?: Lark.FloatImage } -export interface LinkImChatResponse extends BaseResponse { - data?: { - /** 群分享链接 */ - share_link?: string - /** 分享链接过期时间戳(秒级) */ - expire_time?: string - /** 分享链接是否永久有效 */ - is_permanent?: boolean - } +export interface QuerySheetsSpreadsheetSheetFloatImageResponse { + /** 子表的所有浮动图片信息 */ + items?: Lark.FloatImage[] } -export interface AddManagersImChatManagersResponse extends BaseResponse { - data?: { - /** 群目前的管理员id */ - chat_managers?: string[] - /** 群目前的管理员bot id */ - chat_bot_managers?: string[] - } +export interface CreateSheetsSpreadsheetSheetFloatImageResponse { + float_image?: Lark.FloatImage } -export interface DeleteManagersImChatManagersResponse extends BaseResponse { - data?: { - /** 群目前的管理员id */ - chat_managers?: string[] - /** 群目前的管理员bot id */ - chat_bot_managers?: string[] - } +export interface PatchSheetsSpreadsheetSheetFloatImageResponse { + float_image?: Lark.FloatImage } -export interface CreateImChatMembersResponse extends BaseResponse { - data?: { - /** ID无效的成员列表 */ - invalid_id_list?: string[] - /** ID不存在的成员列表 */ - not_existed_id_list?: string[] - /** 等待群主或管理员审批的成员ID列表 */ - pending_approval_id_list?: string[] - } +export interface CopyBitableAppResponse { + app?: Lark.App } -export interface DeleteImChatMembersResponse extends BaseResponse { - data?: { - /** 无效成员列表 */ - invalid_id_list?: string[] - } +export interface CreateBitableAppResponse { + app?: Lark.App } -export interface GetImChatMembersResponse extends BaseResponse { - data: Paginated +export interface GetBitableAppResponse { + app?: Lark.DisplayApp } -export interface IsInChatImChatMembersResponse extends BaseResponse { - data?: { - /** 用户或者机器人是否在群中 */ - is_in_chat?: boolean - } +export interface UpdateBitableAppResponse { + app?: Lark.DisplayAppV2 } -export interface GetImChatAnnouncementResponse extends BaseResponse { - data?: { - /** CCM 文档序列化信息 */ - content?: string - /** 文档当前版本号 纯数字 */ - revision?: string - /** 文档生成的时间戳(秒) */ - create_time?: string - /** 消息更新的时间戳(秒) */ - update_time?: string - /** 文档所有者id类型, open_id/user_id/union_id/app_id */ - owner_id_type?: string - /** 文档所有者id */ - owner_id?: string - /** 文档最新修改者id类型, open_id/user_id/union_id/app_id */ - modifier_id_type?: string - /** 文档最新修改者id */ - modifier_id?: string - } +export interface CreateBitableAppTableResponse { + /** 数据表的唯一标识id */ + table_id?: string + /** 默认表格视图的id,该字段仅在请求参数中填写了default_view_name或fields才会返回 */ + default_view_id?: string + /** 数据表初始字段的id列表,该字段仅在请求参数中填写了fields才会返回 */ + field_id_list?: string[] } -export interface CreateImChatTabResponse extends BaseResponse { - data?: { - /** 群标签列表 */ - chat_tabs?: Lark.ChatTab[] - } +export interface BatchCreateBitableAppTableResponse { + table_ids?: string[] } -export interface DeleteTabsImChatTabResponse extends BaseResponse { - data?: { - /** 群标签列表 */ - chat_tabs?: Lark.ChatTab[] - } +export interface PatchBitableAppTableResponse { + /** 数据表的名称 */ + name?: string } -export interface UpdateTabsImChatTabResponse extends BaseResponse { - data?: { - /** 群标签列表 */ - chat_tabs?: Lark.ChatTab[] - } +export interface ListBitableAppTableResponse extends Paginated {} +export interface CopyBitableAppDashboardResponse { + /** 多维表格 block_id */ + block_id?: string + /** block 名称 */ + name?: string } -export interface SortTabsImChatTabResponse extends BaseResponse { - data?: { - /** 群标签列表 */ - chat_tabs?: Lark.ChatTab[] - } +export interface ListBitableAppDashboardResponse extends Paginated {} +export interface PatchBitableAppTableViewResponse { + view?: Lark.AppTableView } -export interface ListTabsImChatTabResponse extends BaseResponse { - data?: { - /** 会话标签页 */ - chat_tabs?: Lark.ChatTab[] - } +export interface GetBitableAppTableViewResponse { + view?: Lark.AppTableView } -export interface CreateImChatMenuTreeResponse extends BaseResponse { - data?: { - /** 追加后群内现有菜单 */ - menu_tree?: Lark.ChatMenuTree - } +export interface ListBitableAppTableViewResponse extends Paginated {} +export interface CreateBitableAppTableViewResponse { + view?: Lark.AppTableView } -export interface DeleteImChatMenuTreeResponse extends BaseResponse { - data?: { - /** 群内现有菜单 */ - menu_tree?: Lark.ChatMenuTree - } +export interface PatchBitableAppTableFormResponse { + /** 表单元数据信息 */ + form: Lark.AppTableForm } -export interface PatchImChatMenuItemResponse extends BaseResponse { - data?: { - chat_menu_item?: Lark.ChatMenuItem - } +export interface GetBitableAppTableFormResponse { + /** 表单元数据信息 */ + form: Lark.AppTableForm } -export interface SortImChatMenuTreeResponse extends BaseResponse { - data?: { - /** 排序后群内菜单 */ - menu_tree?: Lark.ChatMenuTree - } +export interface PatchBitableAppTableFormFieldResponse { + /** 更新后的field值 */ + field?: Lark.AppTableFormPatchedField } -export interface GetImChatMenuTreeResponse extends BaseResponse { - data?: { - /** 群内所有菜单 */ - menu_tree?: Lark.ChatMenuTree - } +export interface ListBitableAppTableFormFieldResponse extends Paginated {} +export interface GetBitableAppTableRecordResponse { + record?: Lark.AppTableRecord } -export interface ListDrivev1FileResponse extends BaseResponse { - data: Paginated +export interface SearchBitableAppTableRecordResponse extends Paginated {} +export interface CreateBitableAppTableRecordResponse { + record?: Lark.AppTableRecord } -export interface CreateFolderDrivev1FileResponse extends BaseResponse { - data?: { - /** 创建文件夹的token */ - token?: string - /** 创建文件夹的访问url */ - url?: string - } +export interface UpdateBitableAppTableRecordResponse { + record?: Lark.AppTableRecord } -export interface BatchQueryDrivev1MetaResponse extends BaseResponse { - data?: { - metas: Lark.Meta[] - failed_list?: Lark.MetaFailed[] - } +export interface DeleteBitableAppTableRecordResponse extends Lark.DeleteRecord {} +export interface BatchCreateBitableAppTableRecordResponse { + /** 本次请求新增的记录列表 */ + records?: Lark.AppTableRecord[] } -export interface GetDrivev1FileStatisticsResponse extends BaseResponse { - data?: { - /** 文档token */ - file_token?: string - /** 文档类型 */ - file_type?: string - /** 文档统计信息 */ - statistics?: Lark.FileStatistics - } +export interface BatchUpdateBitableAppTableRecordResponse { + /** 更新后的记录 */ + records?: Lark.AppTableRecord[] } -export interface CopyDrivev1FileResponse extends BaseResponse { - data?: { - /** 复制后的文件资源 */ - file?: Lark.File - } +export interface BatchDeleteBitableAppTableRecordResponse { + /** 记录删除结果 */ + records?: Lark.DeleteRecord[] } -export interface MoveDrivev1FileResponse extends BaseResponse { - data?: { - /** 异步任务id,移动文件夹时返回 */ - task_id?: string - } +export interface ListBitableAppTableFieldResponse extends Paginated {} +export interface CreateBitableAppTableFieldResponse { + field?: Lark.AppTableField } -export interface DeleteDrivev1FileResponse extends BaseResponse { - data?: { - /** 异步任务id,删除文件夹时返回 */ - task_id?: string - } +export interface UpdateBitableAppTableFieldResponse { + field?: Lark.AppTableField } -export interface CreateShortcutDrivev1FileResponse extends BaseResponse { - data?: { - /** 返回创建成功的shortcut节点 */ - succ_shortcut_node?: Lark.File - } +export interface DeleteBitableAppTableFieldResponse { + /** 字段唯一标识id */ + field_id?: string + /** 是否已删除 */ + deleted?: boolean } -export interface TaskCheckDrivev1FileResponse extends BaseResponse { - data?: { - /** 异步任务的执行状态 */ - status?: string - } +export interface ListBitableAppRoleResponse extends Paginated {} +export interface CreateBitableAppRoleResponse { + role?: Lark.AppRole } -export interface UploadAllDrivev1MediaResponse extends BaseResponse { - data?: { - file_token?: string - } +export interface UpdateBitableAppRoleResponse { + role?: Lark.AppRole } -export interface BatchGetTmpDownloadUrlDrivev1MediaResponse extends BaseResponse { - data?: { - /** 临时下载列表 */ - tmp_download_urls?: Lark.TmpDownloadUrl[] - } +export interface ListBitableAppRoleMemberResponse extends Paginated {} +export interface ListWikiSpaceResponse extends Paginated {} +export interface GetWikiSpaceResponse { + space?: Lark.Space } -export interface UploadPrepareDrivev1MediaResponse extends BaseResponse { - data?: { - /** 分片上传事务ID */ - upload_id?: string - /** 分片大小策略 */ - block_size?: number - /** 分片数量 */ - block_num?: number - } +export interface CreateWikiSpaceResponse { + space?: Lark.Space } -export interface UploadFinishDrivev1MediaResponse extends BaseResponse { - data?: { - file_token?: string - } +export interface CreateWikiSpaceMemberResponse { + member?: Lark.Member } -export interface UploadAllDrivev1FileResponse extends BaseResponse { - data?: { - file_token?: string - } +export interface DeleteWikiSpaceMemberResponse { + /** 成员信息 */ + member: Lark.Member } -export interface UploadPrepareDrivev1FileResponse extends BaseResponse { - data?: { - /** 分片上传事务ID */ - upload_id?: string - /** 分片大小策略 */ - block_size?: number - /** 分片数量 */ - block_num?: number - } +export interface UpdateWikiSpaceSettingResponse { + setting?: Lark.Setting } -export interface UploadFinishDrivev1FileResponse extends BaseResponse { - data?: { - file_token?: string - } +export interface CreateWikiSpaceNodeResponse { + node?: Lark.Node } -export interface CreateDrivev1ImportTaskResponse extends BaseResponse { - data?: { - /** 导入任务ID */ - ticket?: string - } +export interface GetNodeWikiSpaceResponse { + /** 节点信息 */ + node?: Lark.Node } -export interface GetDrivev1ImportTaskResponse extends BaseResponse { - data?: { - result?: Lark.ImportTask - } +export interface ListWikiSpaceNodeResponse extends Paginated {} +export interface MoveWikiSpaceNodeResponse { + /** 移动后的节点信息 */ + node?: Lark.Node } -export interface CreateDrivev1ExportTaskResponse extends BaseResponse { - data?: { - /** 导出任务ID */ - ticket?: string - } +export interface CopyWikiSpaceNodeResponse { + /** copy后的节点 */ + node: Lark.Node } -export interface GetDrivev1ExportTaskResponse extends BaseResponse { - data?: { - /** 导出结果 */ - result?: Lark.ExportTask - } +export interface MoveDocsToWikiWikiSpaceNodeResponse { + /** 移动后的知识库token */ + wiki_token?: string + /** 任务id */ + task_id?: string + /** 是否提交了文档迁入申请 */ + applied?: boolean } -export interface ListDrivev1FileViewRecordResponse extends BaseResponse { - data: Paginated +export interface GetWikiTaskResponse { + /** 任务结果 */ + task: Lark.TaskResult } -export interface CreateDrivev1FileVersionResponse extends BaseResponse { - data?: Lark.Version +export interface SearchWikiNodeResponse extends Paginated {} +export interface GetDrivev1FileSubscriptionResponse { + /** 文档订阅信息 */ + subscription?: Lark.FileSubscription } -export interface GetDrivev1FileVersionResponse extends BaseResponse { - data?: Lark.Version +export interface CreateDrivev1FileSubscriptionResponse { + /** 本次增加的文档订阅信息 */ + subscription?: Lark.FileSubscription } -export interface ListDrivev1FileVersionResponse extends BaseResponse { - data: Paginated +export interface PatchDrivev1FileSubscriptionResponse { + /** 本次修改的文档订阅信息 */ + subscription?: Lark.FileSubscription } -export interface AuthDrivev1PermissionMemberResponse extends BaseResponse { - data?: { - /** 是否有权限 */ - auth_result: boolean - } +export interface CreateCalendarResponse { + calendar?: Lark.Calendar } -export interface ListDrivev1PermissionMemberResponse extends BaseResponse { - data?: { - /** 返回的列表数据 */ - items?: Lark.Member[] - } +export interface PrimaryCalendarResponse { + /** 主日历列表 */ + calendars?: Lark.UserCalendar[] } -export interface CreateDrivev1PermissionMemberResponse extends BaseResponse { - data?: { - /** 本次添加权限的用户信息 */ - member?: Lark.BaseMember - } +export interface GetCalendarResponse extends Lark.Calendar {} +export interface ListCalendarFreebusyResponse { + /** 日历上请求时间区间内的忙闲信息 */ + freebusy_list?: Lark.Freebusy[] } -export interface UpdateDrivev1PermissionMemberResponse extends BaseResponse { - data?: { - /** 本次更新权限的用户信息 */ - member?: Lark.BaseMember - } +export interface ListCalendarResponse { + /** 是否有下一页数据 */ + has_more?: boolean + /** 下次请求需要带上的分页标记,90 天有效期 */ + page_token?: string + /** 下次请求需要带上的增量同步标记,90 天有效期 */ + sync_token?: string + /** 分页加载的日历数据列表 */ + calendar_list?: Lark.Calendar[] } -export interface CreateDrivev1PermissionPublicPasswordResponse extends BaseResponse { - data?: { - /** 密码 */ - password?: string - } +export interface PatchCalendarResponse { + calendar?: Lark.Calendar } -export interface UpdateDrivev1PermissionPublicPasswordResponse extends BaseResponse { - data?: { - /** 密码 */ - password?: string - } +export interface SearchCalendarResponse extends Paginated {} +export interface SubscribeCalendarResponse { + calendar?: Lark.Calendar } -export interface GetDrivev1PermissionPublicResponse extends BaseResponse { - data?: { - /** 返回的文档公共设置 */ - permission_public?: Lark.PermissionPublic - } +export interface CreateCalendarCalendarAclResponse extends Lark.CalendarAcl {} +export interface ListCalendarCalendarAclResponse extends Paginated {} +export interface CreateCalendarCalendarEventResponse { + event?: Lark.CalendarEvent } -export interface PatchDrivev1PermissionPublicResponse extends BaseResponse { - data?: { - /** 本次更新后的文档公共设置 */ - permission_public?: Lark.PermissionPublic - } +export interface PatchCalendarCalendarEventResponse { + event?: Lark.CalendarEvent } -export interface GetDrivev2PermissionPublicResponse extends BaseResponse { - data?: { - /** 返回的文档公共设置 */ - permission_public?: Lark.PermissionPublic - } +export interface GetCalendarCalendarEventResponse { + event?: Lark.CalendarEvent } -export interface PatchDrivev2PermissionPublicResponse extends BaseResponse { - data?: { - /** 本次更新后文档公共设置 */ - permission_public?: Lark.PermissionPublic - } +export interface ListCalendarCalendarEventResponse { + /** 是否有下一页数据 */ + has_more?: boolean + /** 下次请求需要带上的分页标记,90 天有效期 */ + page_token?: string + /** 下次请求需要带上的增量同步标记,90 天有效期 */ + sync_token?: string + /** 日程列表 */ + items?: Lark.CalendarEvent[] } -export interface ListDrivev1FileCommentResponse extends BaseResponse { - data: Paginated +export interface SearchCalendarCalendarEventResponse extends Paginated {} +export interface InstancesCalendarCalendarEventResponse { + /** instances实例 */ + items?: Lark.Instance[] + page_token?: string + has_more?: boolean } -export interface BatchQueryDrivev1FileCommentResponse extends BaseResponse { - data?: { - /** 评论的相关信息、回复的信息、回复分页的信息 */ - items?: Lark.FileComment[] - } +export interface InstanceViewCalendarCalendarEventResponse { + /** 日程instance列表 */ + items?: Lark.Instance[] } -export interface CreateDrivev1FileCommentResponse extends BaseResponse { - data?: Lark.FileComment +export interface CreateCalendarCalendarEventMeetingChatResponse { + /** 会议群ID */ + meeting_chat_id?: string + /** 群分享链接 */ + applink?: string } -export interface GetDrivev1FileCommentResponse extends BaseResponse { - data?: Lark.FileComment +export interface CreateCalendarTimeoffEventResponse extends Lark.TimeoffEvent {} +export interface CreateCalendarCalendarEventAttendeeResponse { + /** 被添加的参与人列表 */ + attendees?: Lark.CalendarEventAttendee[] } -export interface ListDrivev1FileCommentReplyResponse extends BaseResponse { - data: Paginated +export interface ListCalendarCalendarEventAttendeeResponse extends Paginated {} +export interface ListCalendarCalendarEventAttendeeChatMemberResponse extends Paginated {} +export interface GenerateCaldavConfCalendarSettingResponse { + /** caldav密码 */ + password?: string + /** caldav用户名 */ + user_name?: string + /** 服务器地址 */ + server_address?: string + /** 设备名 */ + device_name?: string } -export interface GetDocxDocumentResponse extends BaseResponse { - data?: { - /** 文档信息 */ - document?: Lark.Document - } +export interface CreateCalendarExchangeBindingResponse extends Lark.ExchangeBinding {} +export interface GetCalendarExchangeBindingResponse extends Lark.ExchangeBinding {} +export interface ApplyVcReserveResponse { + reserve?: Lark.Reserve + reserve_correction_check_info?: Lark.ReserveCorrectionCheckInfo } -export interface RawContentDocxDocumentResponse extends BaseResponse { - data?: { - /** 文档纯文本 */ - content?: string - } +export interface UpdateVcReserveResponse { + reserve?: Lark.Reserve + reserve_correction_check_info?: Lark.ReserveCorrectionCheckInfo } -export interface ListDocxDocumentBlockResponse extends BaseResponse { - data: Paginated +export interface GetVcReserveResponse { + reserve?: Lark.Reserve } -export interface CreateDocxDocumentResponse extends BaseResponse { - data?: { - /** 新建文档的文档信息 */ - document?: Lark.Document - } +export interface GetActiveMeetingVcReserveResponse { + meeting?: Lark.Meeting } -export interface GetDocxDocumentBlockResponse extends BaseResponse { - data?: { - /** 查询的 Block 的信息 */ - block?: Lark.Block - } +export interface InviteVcMeetingResponse { + /** 邀请结果 */ + invite_results?: Lark.MeetingInviteStatus[] } -export interface GetDocxDocumentBlockChildrenResponse extends BaseResponse { - data: Paginated -} -export interface CreateDocxDocumentBlockChildrenResponse extends BaseResponse { - data?: { - /** 所添加的孩子的 Block 信息 */ - children?: Lark.Block[] - /** 当前 block children 创建成功后文档的版本号 */ - document_revision_id?: number - /** 操作的唯一标识,更新请求中使用此值表示幂等的进行此次更新 */ - client_token: string - } +export interface KickoutVcMeetingResponse { + /** 踢出结果 */ + kickout_results?: Lark.MeetingParticipantResult[] } -export interface PatchDocxDocumentBlockResponse extends BaseResponse { - data?: { - /** 更新后的 block 信息 */ - block?: Lark.Block - /** 当前更新成功后文档的版本号 */ - document_revision_id?: number - /** 操作的唯一标识,更新请求中使用此值表示幂等的进行此次更新 */ - client_token: string - } +export interface SetHostVcMeetingResponse { + /** 会中当前主持人 */ + host_user?: Lark.MeetingUser } -export interface BatchUpdateDocxDocumentBlockResponse extends BaseResponse { - data?: { - /** 批量更新的 Block */ - blocks?: Lark.Block[] - /** 当前更新成功后文档的版本号 */ - document_revision_id?: number - /** 操作的唯一标识,更新请求中使用此值表示幂等的进行此次更新 */ - client_token: string - } +export interface GetVcMeetingResponse { + meeting?: Lark.Meeting } -export interface BatchDeleteDocxDocumentBlockChildrenResponse extends BaseResponse { - data?: { - /** 当前删除操作成功后文档的版本号 */ - document_revision_id?: number - /** 操作的唯一标识,更新请求中使用此值表示幂等的进行此次更新 */ - client_token: string - } +export interface ListByNoVcMeetingResponse extends Paginated {} +export interface GetVcMeetingRecordingResponse { + recording?: Lark.MeetingRecording } -export interface ListBoardWhiteboardNodeResponse extends BaseResponse { - data?: { - /** 查询结果 */ - nodes?: Lark.WhiteboardNode[] - } +export interface GetDailyVcReportResponse { + /** 会议报告 */ + meeting_report?: Lark.Report } -export interface GetSheetsSpreadsheetResponse extends BaseResponse { - data?: { - spreadsheet?: Lark.GetSpreadsheet - } +export interface GetTopUserVcReportResponse { + /** top用户列表 */ + top_user_report?: Lark.ReportTopUser[] } -export interface CreateSheetsSpreadsheetResponse extends BaseResponse { - data?: { - /** 表格信息 */ - spreadsheet?: Lark.Spreadsheet - } +export interface MeetingListVcExportResponse { + /** 任务id */ + task_id?: string } -export interface GetSheetsSpreadsheetSheetResponse extends BaseResponse { - data?: { - sheet?: Lark.Sheet - } +export interface ParticipantListVcExportResponse { + /** 任务id */ + task_id?: string } -export interface QuerySheetsSpreadsheetSheetResponse extends BaseResponse { - data?: { - /** 工作表信息 */ - sheets?: Lark.Sheet[] - } +export interface ParticipantQualityListVcExportResponse { + /** 任务id */ + task_id?: string } -export interface FindSheetsSpreadsheetSheetResponse extends BaseResponse { - data?: { - /** 查找返回符合条件的信息 */ - find_result?: Lark.FindReplaceResult - } +export interface ResourceReservationListVcExportResponse { + /** 任务id */ + task_id?: string } -export interface ReplaceSheetsSpreadsheetSheetResponse extends BaseResponse { - data?: { - /** 符合查找条件并替换的单元格信息 */ - replace_result?: Lark.FindReplaceResult - } +export interface GetVcExportResponse { + /** 任务状态 */ + status: number + /** 文件下载地址 */ + url?: string + /** 文件token */ + file_token?: string + /** 失败信息 */ + fail_msg?: string } -export interface GetSheetsSpreadsheetSheetFilterResponse extends BaseResponse { - data?: { - sheet_filter_info?: Lark.SheetFilterInfo - } +export interface CreateVcRoomLevelResponse { + room_level?: Lark.RoomLevel } -export interface GetSheetsSpreadsheetSheetFilterViewResponse extends BaseResponse { - data?: { - /** 筛选视图信息,包括 id、name、range */ - filter_view?: Lark.FilterView - } +export interface GetVcRoomLevelResponse { + room_level?: Lark.RoomLevel } -export interface QuerySheetsSpreadsheetSheetFilterViewResponse extends BaseResponse { - data?: { - /** 子表的所有筛选视图信息,id、name、range */ - items?: Lark.FilterView[] - } +export interface MgetVcRoomLevelResponse { + items?: Lark.RoomLevel[] } -export interface CreateSheetsSpreadsheetSheetFilterViewResponse extends BaseResponse { - data?: { - /** 创建的筛选视图的 id 、name、range */ - filter_view?: Lark.FilterView - } +export interface ListVcRoomLevelResponse extends Paginated {} +export interface SearchVcRoomLevelResponse { + /** 层级id列表 */ + level_ids?: string[] } -export interface PatchSheetsSpreadsheetSheetFilterViewResponse extends BaseResponse { - data?: { - /** 更新后的筛选视图的 id 、name、range */ - filter_view?: Lark.FilterView - } +export interface CreateVcRoomResponse { + room?: Lark.Room } -export interface GetSheetsSpreadsheetSheetFilterViewConditionResponse extends BaseResponse { - data?: { - /** 筛选的条件 */ - condition?: Lark.FilterViewCondition - } +export interface GetVcRoomResponse { + room?: Lark.Room } -export interface QuerySheetsSpreadsheetSheetFilterViewConditionResponse extends BaseResponse { - data?: { - /** 筛选视图设置的所有筛选条件 */ - items?: Lark.FilterViewCondition[] - } +export interface MgetVcRoomResponse { + items?: Lark.Room[] } -export interface CreateSheetsSpreadsheetSheetFilterViewConditionResponse extends BaseResponse { - data?: { - /** 创建的筛选条件 */ - condition?: Lark.FilterViewCondition - } +export interface ListVcRoomResponse extends Paginated {} +export interface SearchVcRoomResponse { + /** 会议室列表 */ + rooms?: Lark.Room[] + /** 下一页分页的token,下次请求时传入 */ + page_token?: string + /** 是否还有数据 */ + has_more?: boolean } -export interface UpdateSheetsSpreadsheetSheetFilterViewConditionResponse extends BaseResponse { - data?: { - /** 更新后的筛选条件 */ - condition?: Lark.FilterViewCondition - } +export interface GetVcScopeConfigResponse { + /** 当前节点的配置,根据层级顺序从底向上进行合并计算后的结果;如果当前节点某个值已配置,则取该节点的值,否则会从该节点的父层级节点获取,如果父节点依然未配置,则继续向上递归获取;若所有节点均未配置,则该值返回为空 */ + current_config?: Lark.ScopeConfig + /** 所有节点的原始配置,按照层级顺序从底向上返回;如果某节点某个值未配置,则该值返回为空 */ + origin_configs?: Lark.ScopeConfig[] } -export interface GetSheetsSpreadsheetSheetFloatImageResponse extends BaseResponse { - data?: { - float_image?: Lark.FloatImage - } +export interface ReserveScopeVcReserveConfigResponse { + /** 预定审批设置 */ + approve_config?: Lark.ApprovalConfig + /** 预定时间设置 */ + time_config?: Lark.TimeConfig + /** 预定范围设置 */ + reserve_scope_config?: Lark.ReserveScopeConfig } -export interface QuerySheetsSpreadsheetSheetFloatImageResponse extends BaseResponse { - data?: { - /** 子表的所有浮动图片信息 */ - items?: Lark.FloatImage[] - } +export interface GetVcReserveConfigFormResponse { + /** 预定表单 */ + reserve_form_config: Lark.ReserveFormConfig } -export interface CreateSheetsSpreadsheetSheetFloatImageResponse extends BaseResponse { - data?: { - float_image?: Lark.FloatImage - } +export interface GetVcReserveConfigAdminResponse { + /** 预定管理员/部门 */ + reserve_admin_config: Lark.ReserveAdminConfig } -export interface PatchSheetsSpreadsheetSheetFloatImageResponse extends BaseResponse { - data?: { - float_image?: Lark.FloatImage - } -} -export interface CopyBitableAppResponse extends BaseResponse { - data?: { - app?: Lark.App - } -} -export interface CreateBitableAppResponse extends BaseResponse { - data?: { - app?: Lark.App - } -} -export interface GetBitableAppResponse extends BaseResponse { - data?: { - app?: Lark.DisplayApp - } -} -export interface UpdateBitableAppResponse extends BaseResponse { - data?: { - app?: Lark.DisplayAppV2 - } -} -export interface CreateBitableAppTableResponse extends BaseResponse { - data?: { - /** 数据表的唯一标识id */ - table_id?: string - /** 默认表格视图的id,该字段仅在请求参数中填写了default_view_name或fields才会返回 */ - default_view_id?: string - /** 数据表初始字段的id列表,该字段仅在请求参数中填写了fields才会返回 */ - field_id_list?: string[] - } -} -export interface BatchCreateBitableAppTableResponse extends BaseResponse { - data?: { - table_ids?: string[] - } -} -export interface PatchBitableAppTableResponse extends BaseResponse { - data?: { - /** 数据表的名称 */ - name?: string - } -} -export interface ListBitableAppTableResponse extends BaseResponse { - data: Paginated -} -export interface CopyBitableAppDashboardResponse extends BaseResponse { - data?: { - /** 多维表格 block_id */ - block_id?: string - /** block 名称 */ - name?: string - } -} -export interface ListBitableAppDashboardResponse extends BaseResponse { - data: Paginated -} -export interface PatchBitableAppTableViewResponse extends BaseResponse { - data?: { - view?: Lark.AppTableView - } -} -export interface GetBitableAppTableViewResponse extends BaseResponse { - data?: { - view?: Lark.AppTableView - } -} -export interface ListBitableAppTableViewResponse extends BaseResponse { - data: Paginated -} -export interface CreateBitableAppTableViewResponse extends BaseResponse { - data?: { - view?: Lark.AppTableView - } -} -export interface PatchBitableAppTableFormResponse extends BaseResponse { - data?: { - /** 表单元数据信息 */ - form: Lark.AppTableForm - } -} -export interface GetBitableAppTableFormResponse extends BaseResponse { - data?: { - /** 表单元数据信息 */ - form: Lark.AppTableForm - } -} -export interface PatchBitableAppTableFormFieldResponse extends BaseResponse { - data?: { - /** 更新后的field值 */ - field?: Lark.AppTableFormPatchedField - } -} -export interface ListBitableAppTableFormFieldResponse extends BaseResponse { - data: Paginated -} -export interface GetBitableAppTableRecordResponse extends BaseResponse { - data?: { - record?: Lark.AppTableRecord - } -} -export interface SearchBitableAppTableRecordResponse extends BaseResponse { - data: Paginated -} -export interface CreateBitableAppTableRecordResponse extends BaseResponse { - data?: { - record?: Lark.AppTableRecord - } -} -export interface UpdateBitableAppTableRecordResponse extends BaseResponse { - data?: { - record?: Lark.AppTableRecord - } -} -export interface DeleteBitableAppTableRecordResponse extends BaseResponse { - data?: Lark.DeleteRecord -} -export interface BatchCreateBitableAppTableRecordResponse extends BaseResponse { - data?: { - /** 本次请求新增的记录列表 */ - records?: Lark.AppTableRecord[] - } -} -export interface BatchUpdateBitableAppTableRecordResponse extends BaseResponse { - data?: { - /** 更新后的记录 */ - records?: Lark.AppTableRecord[] - } -} -export interface BatchDeleteBitableAppTableRecordResponse extends BaseResponse { - data?: { - /** 记录删除结果 */ - records?: Lark.DeleteRecord[] - } -} -export interface ListBitableAppTableFieldResponse extends BaseResponse { - data: Paginated -} -export interface CreateBitableAppTableFieldResponse extends BaseResponse { - data?: { - field?: Lark.AppTableField - } -} -export interface UpdateBitableAppTableFieldResponse extends BaseResponse { - data?: { - field?: Lark.AppTableField - } -} -export interface DeleteBitableAppTableFieldResponse extends BaseResponse { - data?: { - /** 字段唯一标识id */ - field_id?: string - /** 是否已删除 */ - deleted?: boolean - } -} -export interface ListBitableAppRoleResponse extends BaseResponse { - data: Paginated -} -export interface CreateBitableAppRoleResponse extends BaseResponse { - data?: { - role?: Lark.AppRole - } -} -export interface UpdateBitableAppRoleResponse extends BaseResponse { - data?: { - role?: Lark.AppRole - } -} -export interface ListBitableAppRoleMemberResponse extends BaseResponse { - data: Paginated -} -export interface ListWikiSpaceResponse extends BaseResponse { - data: Paginated -} -export interface GetWikiSpaceResponse extends BaseResponse { - data?: { - space?: Lark.Space - } -} -export interface CreateWikiSpaceResponse extends BaseResponse { - data?: { - space?: Lark.Space - } -} -export interface CreateWikiSpaceMemberResponse extends BaseResponse { - data?: { - member?: Lark.Member - } -} -export interface DeleteWikiSpaceMemberResponse extends BaseResponse { - data?: { - /** 成员信息 */ - member: Lark.Member - } -} -export interface UpdateWikiSpaceSettingResponse extends BaseResponse { - data?: { - setting?: Lark.Setting - } -} -export interface CreateWikiSpaceNodeResponse extends BaseResponse { - data?: { - node?: Lark.Node - } -} -export interface GetNodeWikiSpaceResponse extends BaseResponse { - data?: { - /** 节点信息 */ - node?: Lark.Node - } -} -export interface ListWikiSpaceNodeResponse extends BaseResponse { - data: Paginated -} -export interface MoveWikiSpaceNodeResponse extends BaseResponse { - data?: { - /** 移动后的节点信息 */ - node?: Lark.Node - } -} -export interface CopyWikiSpaceNodeResponse extends BaseResponse { - data?: { - /** copy后的节点 */ - node: Lark.Node - } -} -export interface MoveDocsToWikiWikiSpaceNodeResponse extends BaseResponse { - data?: { - /** 移动后的知识库token */ - wiki_token?: string - /** 任务id */ - task_id?: string - /** 是否提交了文档迁入申请 */ - applied?: boolean - } -} -export interface GetWikiTaskResponse extends BaseResponse { - data?: { - /** 任务结果 */ - task: Lark.TaskResult - } -} -export interface SearchWikiNodeResponse extends BaseResponse { - data: Paginated -} -export interface GetDrivev1FileSubscriptionResponse extends BaseResponse { - data?: { - /** 文档订阅信息 */ - subscription?: Lark.FileSubscription - } -} -export interface CreateDrivev1FileSubscriptionResponse extends BaseResponse { - data?: { - /** 本次增加的文档订阅信息 */ - subscription?: Lark.FileSubscription - } -} -export interface PatchDrivev1FileSubscriptionResponse extends BaseResponse { - data?: { - /** 本次修改的文档订阅信息 */ - subscription?: Lark.FileSubscription - } -} -export interface CreateCalendarResponse extends BaseResponse { - data?: { - calendar?: Lark.Calendar - } -} -export interface PrimaryCalendarResponse extends BaseResponse { - data?: { - /** 主日历列表 */ - calendars?: Lark.UserCalendar[] - } -} -export interface GetCalendarResponse extends BaseResponse { - data?: Lark.Calendar -} -export interface ListCalendarFreebusyResponse extends BaseResponse { - data?: { - /** 日历上请求时间区间内的忙闲信息 */ - freebusy_list?: Lark.Freebusy[] - } -} -export interface ListCalendarResponse extends BaseResponse { - data?: { - /** 是否有下一页数据 */ - has_more?: boolean - /** 下次请求需要带上的分页标记,90 天有效期 */ - page_token?: string - /** 下次请求需要带上的增量同步标记,90 天有效期 */ - sync_token?: string - /** 分页加载的日历数据列表 */ - calendar_list?: Lark.Calendar[] - } -} -export interface PatchCalendarResponse extends BaseResponse { - data?: { - calendar?: Lark.Calendar - } -} -export interface SearchCalendarResponse extends BaseResponse { - data: Paginated -} -export interface SubscribeCalendarResponse extends BaseResponse { - data?: { - calendar?: Lark.Calendar - } -} -export interface CreateCalendarCalendarAclResponse extends BaseResponse { - data?: Lark.CalendarAcl -} -export interface ListCalendarCalendarAclResponse extends BaseResponse { - data: Paginated -} -export interface CreateCalendarCalendarEventResponse extends BaseResponse { - data?: { - event?: Lark.CalendarEvent - } -} -export interface PatchCalendarCalendarEventResponse extends BaseResponse { - data?: { - event?: Lark.CalendarEvent - } -} -export interface GetCalendarCalendarEventResponse extends BaseResponse { - data?: { - event?: Lark.CalendarEvent - } -} -export interface ListCalendarCalendarEventResponse extends BaseResponse { - data?: { - /** 是否有下一页数据 */ - has_more?: boolean - /** 下次请求需要带上的分页标记,90 天有效期 */ - page_token?: string - /** 下次请求需要带上的增量同步标记,90 天有效期 */ - sync_token?: string - /** 日程列表 */ - items?: Lark.CalendarEvent[] - } -} -export interface SearchCalendarCalendarEventResponse extends BaseResponse { - data: Paginated -} -export interface InstancesCalendarCalendarEventResponse extends BaseResponse { - data?: { - /** instances实例 */ - items?: Lark.Instance[] - page_token?: string - has_more?: boolean - } -} -export interface InstanceViewCalendarCalendarEventResponse extends BaseResponse { - data?: { - /** 日程instance列表 */ - items?: Lark.Instance[] - } -} -export interface CreateCalendarCalendarEventMeetingChatResponse extends BaseResponse { - data?: { - /** 会议群ID */ - meeting_chat_id?: string - /** 群分享链接 */ - applink?: string - } -} -export interface CreateCalendarTimeoffEventResponse extends BaseResponse { - data?: Lark.TimeoffEvent -} -export interface CreateCalendarCalendarEventAttendeeResponse extends BaseResponse { - data?: { - /** 被添加的参与人列表 */ - attendees?: Lark.CalendarEventAttendee[] - } -} -export interface ListCalendarCalendarEventAttendeeResponse extends BaseResponse { - data: Paginated -} -export interface ListCalendarCalendarEventAttendeeChatMemberResponse extends BaseResponse { - data: Paginated -} -export interface GenerateCaldavConfCalendarSettingResponse extends BaseResponse { - data?: { - /** caldav密码 */ - password?: string - /** caldav用户名 */ - user_name?: string - /** 服务器地址 */ - server_address?: string - /** 设备名 */ - device_name?: string - } -} -export interface CreateCalendarExchangeBindingResponse extends BaseResponse { - data?: Lark.ExchangeBinding -} -export interface GetCalendarExchangeBindingResponse extends BaseResponse { - data?: Lark.ExchangeBinding -} -export interface ApplyVcReserveResponse extends BaseResponse { - data?: { - reserve?: Lark.Reserve - reserve_correction_check_info?: Lark.ReserveCorrectionCheckInfo - } -} -export interface UpdateVcReserveResponse extends BaseResponse { - data?: { - reserve?: Lark.Reserve - reserve_correction_check_info?: Lark.ReserveCorrectionCheckInfo - } -} -export interface GetVcReserveResponse extends BaseResponse { - data?: { - reserve?: Lark.Reserve - } -} -export interface GetActiveMeetingVcReserveResponse extends BaseResponse { - data?: { - meeting?: Lark.Meeting - } -} -export interface InviteVcMeetingResponse extends BaseResponse { - data?: { - /** 邀请结果 */ - invite_results?: Lark.MeetingInviteStatus[] - } -} -export interface KickoutVcMeetingResponse extends BaseResponse { - data?: { - /** 踢出结果 */ - kickout_results?: Lark.MeetingParticipantResult[] - } -} -export interface SetHostVcMeetingResponse extends BaseResponse { - data?: { - /** 会中当前主持人 */ - host_user?: Lark.MeetingUser - } -} -export interface GetVcMeetingResponse extends BaseResponse { - data?: { - meeting?: Lark.Meeting - } -} -export interface ListByNoVcMeetingResponse extends BaseResponse { - data: Paginated -} -export interface GetVcMeetingRecordingResponse extends BaseResponse { - data?: { - recording?: Lark.MeetingRecording - } -} -export interface GetDailyVcReportResponse extends BaseResponse { - data?: { - /** 会议报告 */ - meeting_report?: Lark.Report - } -} -export interface GetTopUserVcReportResponse extends BaseResponse { - data?: { - /** top用户列表 */ - top_user_report?: Lark.ReportTopUser[] - } -} -export interface MeetingListVcExportResponse extends BaseResponse { - data?: { - /** 任务id */ - task_id?: string - } -} -export interface ParticipantListVcExportResponse extends BaseResponse { - data?: { - /** 任务id */ - task_id?: string - } -} -export interface ParticipantQualityListVcExportResponse extends BaseResponse { - data?: { - /** 任务id */ - task_id?: string - } -} -export interface ResourceReservationListVcExportResponse extends BaseResponse { - data?: { - /** 任务id */ - task_id?: string - } -} -export interface GetVcExportResponse extends BaseResponse { - data?: { - /** 任务状态 */ - status: number - /** 文件下载地址 */ - url?: string - /** 文件token */ - file_token?: string - /** 失败信息 */ - fail_msg?: string - } -} -export interface CreateVcRoomLevelResponse extends BaseResponse { - data?: { - room_level?: Lark.RoomLevel - } -} -export interface GetVcRoomLevelResponse extends BaseResponse { - data?: { - room_level?: Lark.RoomLevel - } -} -export interface MgetVcRoomLevelResponse extends BaseResponse { - data?: { - items?: Lark.RoomLevel[] - } -} -export interface ListVcRoomLevelResponse extends BaseResponse { - data: Paginated -} -export interface SearchVcRoomLevelResponse extends BaseResponse { - data?: { - /** 层级id列表 */ - level_ids?: string[] - } -} -export interface CreateVcRoomResponse extends BaseResponse { - data?: { - room?: Lark.Room - } -} -export interface GetVcRoomResponse extends BaseResponse { - data?: { - room?: Lark.Room - } -} -export interface MgetVcRoomResponse extends BaseResponse { - data?: { - items?: Lark.Room[] - } -} -export interface ListVcRoomResponse extends BaseResponse { - data: Paginated -} -export interface SearchVcRoomResponse extends BaseResponse { - data?: { - /** 会议室列表 */ - rooms?: Lark.Room[] - /** 下一页分页的token,下次请求时传入 */ - page_token?: string - /** 是否还有数据 */ - has_more?: boolean - } -} -export interface GetVcScopeConfigResponse extends BaseResponse { - data?: { - /** 当前节点的配置,根据层级顺序从底向上进行合并计算后的结果;如果当前节点某个值已配置,则取该节点的值,否则会从该节点的父层级节点获取,如果父节点依然未配置,则继续向上递归获取;若所有节点均未配置,则该值返回为空 */ - current_config?: Lark.ScopeConfig - /** 所有节点的原始配置,按照层级顺序从底向上返回;如果某节点某个值未配置,则该值返回为空 */ - origin_configs?: Lark.ScopeConfig[] - } -} -export interface ReserveScopeVcReserveConfigResponse extends BaseResponse { - data?: { - /** 预定审批设置 */ - approve_config?: Lark.ApprovalConfig - /** 预定时间设置 */ - time_config?: Lark.TimeConfig - /** 预定范围设置 */ - reserve_scope_config?: Lark.ReserveScopeConfig - } -} -export interface GetVcReserveConfigFormResponse extends BaseResponse { - data?: { - /** 预定表单 */ - reserve_form_config: Lark.ReserveFormConfig - } -} -export interface GetVcReserveConfigAdminResponse extends BaseResponse { - data?: { - /** 预定管理员/部门 */ - reserve_admin_config: Lark.ReserveAdminConfig - } -} -export interface GetVcReserveConfigDisableInformResponse extends BaseResponse { - data?: { - /** 会议室禁用通知配置 */ - disable_inform?: Lark.DisableInformConfig - } -} -export interface GetVcMeetingListResponse extends BaseResponse { - data: Paginated -} -export interface GetVcParticipantListResponse extends BaseResponse { - data: Paginated -} -export interface GetVcParticipantQualityListResponse extends BaseResponse { - data: Paginated -} -export interface GetVcResourceReservationListResponse extends BaseResponse { - data: Paginated -} -export interface ListVcAlertResponse extends BaseResponse { - data: Paginated -} -export interface CreateAttendanceShiftResponse extends BaseResponse { - data?: { - /** 班次 */ - shift?: Lark.Shift - } -} -export interface GetAttendanceShiftResponse extends BaseResponse { - data?: Lark.Shift -} -export interface QueryAttendanceShiftResponse extends BaseResponse { - data?: Lark.Shift -} -export interface ListAttendanceShiftResponse extends BaseResponse { - data: Paginated -} -export interface CreateAttendanceGroupResponse extends BaseResponse { - data?: { - group?: Lark.Group - } -} -export interface GetAttendanceGroupResponse extends BaseResponse { - data?: Lark.Group -} -export interface SearchAttendanceGroupResponse extends BaseResponse { - data?: { - /** 考勤组列表 */ - group_list?: Lark.GroupMeta[] - } -} -export interface ListAttendanceGroupResponse extends BaseResponse { - data: Paginated -} -export interface BatchCreateAttendanceUserDailyShiftResponse extends BaseResponse { - data?: { - /** 班表信息列表 */ - user_daily_shifts?: Lark.UserDailyShift[] - } -} -export interface QueryAttendanceUserDailyShiftResponse extends BaseResponse { - data?: { - /** 班表信息列表 */ - user_daily_shifts?: Lark.UserDailyShift[] - } -} -export interface UpdateAttendanceUserStatsViewResponse extends BaseResponse { - data?: { - /** 视图 */ - view?: Lark.UserStatsView - } -} -export interface QueryAttendanceUserStatsFieldResponse extends BaseResponse { - data?: { - user_stats_field?: Lark.UserStatsField - } -} -export interface QueryAttendanceUserStatsViewResponse extends BaseResponse { - data?: { - view?: Lark.UserStatsView - } -} -export interface QueryAttendanceUserStatsDataResponse extends BaseResponse { - data?: { - /** 用户统计数据 */ - user_datas?: Lark.UserStatsData[] - /** 无权限获取的用户列表 */ - invalid_user_list?: string[] - } -} -export interface QueryAttendanceUserApprovalResponse extends BaseResponse { - data?: { - /** 审批结果列表 */ - user_approvals?: Lark.UserApproval[] - } -} -export interface CreateAttendanceUserApprovalResponse extends BaseResponse { - data?: { - /** 审批信息 */ - user_approval?: Lark.UserApproval - } -} -export interface ProcessAttendanceApprovalInfoResponse extends BaseResponse { - data?: { - /** 审批信息 */ - approval_info?: Lark.ApprovalInfo - } -} -export interface CreateAttendanceUserTaskRemedyResponse extends BaseResponse { - data?: { - /** 补卡审批信息 */ - user_remedy?: Lark.UserTaskRemedy - } -} -export interface QueryUserAllowedRemedysAttendanceUserTaskRemedyResponse extends BaseResponse { - data?: { - /** 用户可补卡时间 */ - user_allowed_remedys?: Lark.UserAllowedRemedy[] - } -} -export interface QueryAttendanceUserTaskRemedyResponse extends BaseResponse { - data?: { - /** 补卡记录列表 */ - user_remedys?: Lark.UserTaskRemedy[] - } -} -export interface BatchCreateAttendanceUserFlowResponse extends BaseResponse { - data?: { - /** 打卡流水记录列表 */ - flow_records?: Lark.UserFlow[] - } -} -export interface GetAttendanceUserFlowResponse extends BaseResponse { - data?: Lark.UserFlow -} -export interface QueryAttendanceUserFlowResponse extends BaseResponse { - data?: { - /** 打卡记录列表 */ - user_flow_results?: Lark.UserFlow[] - } -} -export interface QueryAttendanceUserTaskResponse extends BaseResponse { - data?: { - /** 打卡任务列表 */ - user_task_results?: Lark.UserTask[] - /** 无效用户工号列表 */ - invalid_user_ids?: string[] - /** 没有权限用户工号列表 */ - unauthorized_user_ids?: string[] - } -} -export interface ModifyAttendanceUserSettingResponse extends BaseResponse { - data?: { - /** 用户设置 */ - user_setting?: Lark.UserSetting - } -} -export interface QueryAttendanceUserSettingResponse extends BaseResponse { - data?: { - /** 用户设置信息列表 */ - user_settings?: Lark.UserSetting[] - } -} -export interface UploadAttendanceFileResponse extends BaseResponse { - data?: { - file?: Lark.File - } -} -export interface GetAttendanceLeaveEmployExpireRecordResponse extends BaseResponse { - data?: { - /** 员工过期日期的授予记录 */ - records: Lark.LeaveEmployExpireRecord[] - } -} -export interface PatchAttendanceLeaveAccrualRecordResponse extends BaseResponse { - data?: { - /** 员工过期日期的授予记录 */ - record: Lark.LeaveAccrualRecord - } -} -export interface CreateApprovalResponse extends BaseResponse { - data?: { - /** 审批定义 Code */ - approval_code?: string - /** 审批定义 id */ - approval_id?: string - } -} -export interface CreateApprovalInstanceResponse extends BaseResponse { - data?: { - /** 审批实例 Code */ - instance_code: string - } -} -export interface PreviewApprovalInstanceResponse extends BaseResponse { - data?: { - /** 预览节点信息 */ - preview_nodes?: Lark.PreviewNode[] - } -} -export interface GetApprovalInstanceResponse extends BaseResponse { - data?: { - /** 审批名称 */ - approval_name: string - /** 审批创建时间 */ - start_time?: string - /** 审批完成时间,未完成为 0 */ - end_time: string - /** 发起审批用户 */ - user_id: string - /** 发起审批用户 open id */ - open_id: string - /** 审批单编号 */ - serial_number: string - /** 发起审批用户所在部门 */ - department_id: string - /** 审批实例状态 */ - status: string - /** 用户的唯一标识id */ - uuid: string - /** json字符串,控件值 */ - form: string - /** 审批任务列表 */ - task_list: Lark.InstanceTask[] - /** 评论列表 */ - comment_list: Lark.InstanceComment[] - /** 审批动态 */ - timeline: Lark.InstanceTimeline[] - /** 修改的原实例 code,仅在查询修改实例时显示该字段 */ - modified_instance_code?: string - /** 撤销的原实例 code,仅在查询撤销实例时显示该字段 */ - reverted_instance_code?: string - /** 审批定义 Code */ - approval_code: string - /** 单据是否被撤销 */ - reverted?: boolean - /** 审批实例 Code */ - instance_code: string - } -} -export interface ListApprovalInstanceResponse extends BaseResponse { - data: Paginated -} -export interface CreateApprovalInstanceCommentResponse extends BaseResponse { - data?: { - /** 保存成功的comment_id */ - comment_id: string - } -} -export interface DeleteApprovalInstanceCommentResponse extends BaseResponse { - data?: { - /** 删除的评论ID */ - comment_id?: string - } -} -export interface RemoveApprovalInstanceCommentResponse extends BaseResponse { - data?: { - /** 审批实例code */ - instance_id?: string - /** 租户自定义审批实例ID */ - external_id?: string - } -} -export interface ListApprovalInstanceCommentResponse extends BaseResponse { - data: Paginated -} -export interface CreateApprovalExternalApprovalResponse extends BaseResponse { - data?: { - /** 审批定义 code,用户自定义,定义的唯一标识 */ - approval_code: string - } -} -export interface GetApprovalExternalApprovalResponse extends BaseResponse { - data?: { - /** 审批定义名称 */ - approval_name: string - /** 审批定义code */ - approval_code: string - /** 审批定义所属分组 */ - group_code: string - /** 分组名称 */ - group_name?: string - /** 审批定义的说明 */ - description?: string - /** 三方审批定义相关 */ - external?: Lark.ApprovalCreateExternal - /** 可见人列表 */ - viewers?: Lark.ApprovalCreateViewers[] - /** 国际化文案 */ - i18n_resources?: Lark.I18nResource[] - /** 流程管理员 */ - managers?: string[] - } -} -export interface CreateApprovalExternalInstanceResponse extends BaseResponse { - data?: { - /** 同步的实例数据 */ - data?: Lark.ExternalInstance - } -} -export interface CheckApprovalExternalInstanceResponse extends BaseResponse { - data?: { - /** 更新时间不一致的实例信息 */ - diff_instances?: Lark.ExteranlInstanceCheckResponse[] - } -} -export interface ListApprovalExternalTaskResponse extends BaseResponse { - data: Paginated -} -export interface QueryApprovalInstanceResponse extends BaseResponse { - data: Paginated -} -export interface SearchCcApprovalInstanceResponse extends BaseResponse { - data?: { - /** 查询返回条数 */ - count?: number - /** 审批实例列表 */ - cc_list?: Lark.CcSearchItem[] - /** 翻页 Token */ - page_token?: string - /** 是否有更多任务可供拉取 */ - has_more?: boolean - } -} -export interface SearchApprovalTaskResponse extends BaseResponse { - data?: { - /** 查询返回条数 */ - count?: number - /** 审批任务列表 */ - task_list?: Lark.TaskSearchItem[] - /** 翻页 Token */ - page_token?: string - /** 是否有更多任务可供拉取 */ - has_more?: boolean - } -} -export interface QueryApprovalTaskResponse extends BaseResponse { - data: Paginated -} -export interface AgentEmailHelpdeskAgentResponse extends BaseResponse { - data?: { - /** agent emails */ - agents?: string - } -} -export interface GetHelpdeskAgentSchedulesResponse extends BaseResponse { - data?: { - /** schedules of an agent */ - agent_schedule?: Lark.AgentSchedule - } -} -export interface ListHelpdeskAgentScheduleResponse extends BaseResponse { - data?: { - /** schedule of all agent */ - agent_schedules?: Lark.AgentSchedule[] - } -} -export interface CreateHelpdeskAgentSkillResponse extends BaseResponse { - data?: { - agent_skill_id?: string - } -} -export interface GetHelpdeskAgentSkillResponse extends BaseResponse { - data?: { - /** agent skill */ - agent_skill?: Lark.AgentSkill - } -} -export interface ListHelpdeskAgentSkillResponse extends BaseResponse { - data?: { - /** list of agent groups */ - agent_skills?: Lark.AgentSkill[] - } -} -export interface ListHelpdeskAgentSkillRuleResponse extends BaseResponse { - data?: { - /** all rules for agent skill */ - rules?: Lark.AgentSkillRule[] - } -} -export interface StartServiceHelpdeskTicketResponse extends BaseResponse { - data?: { - /** chat id */ - chat_id: string - } -} -export interface GetHelpdeskTicketResponse extends BaseResponse { - data?: { - /** ticket detail */ - ticket?: Lark.Ticket - } -} -export interface ListHelpdeskTicketResponse extends BaseResponse { - data?: { - /** the total count */ - total?: number - tickets?: Lark.Ticket[] - } -} -export interface CustomizedFieldsHelpdeskTicketResponse extends BaseResponse { - data?: { - /** user customized fields */ - user_customized_fields?: Lark.UserCustomizedField[] - /** ticket customized fields */ - ticket_customized_fields?: Lark.TicketCustomizedField[] - } -} -export interface CreateHelpdeskTicketMessageResponse extends BaseResponse { - data?: { - /** chat消息open ID */ - message_id?: string - } -} -export interface ListHelpdeskTicketMessageResponse extends BaseResponse { - data?: { - /** list of ticket messages */ - messages?: Lark.TicketMessage[] - /** total number of messages */ - total?: number - } -} -export interface CreateHelpdeskBotMessageResponse extends BaseResponse { - data?: { - message_id?: string - } -} -export interface GetHelpdeskTicketCustomizedFieldResponse extends BaseResponse { - data?: Lark.TicketCustomizedField -} -export interface ListHelpdeskTicketCustomizedFieldResponse extends BaseResponse { - data: Paginated -} -export interface CreateHelpdeskFaqResponse extends BaseResponse { - data?: { - /** faq detail */ - faq?: Lark.Faq - } -} -export interface GetHelpdeskFaqResponse extends BaseResponse { - data?: { - /** faq detail */ - faq?: Lark.Faq - } -} -export interface ListHelpdeskFaqResponse extends BaseResponse { - data: Paginated -} -export interface SearchHelpdeskFaqResponse extends BaseResponse { - data: Paginated -} -export interface CreateHelpdeskCategoryResponse extends BaseResponse { - data?: { - /** category */ - category?: Lark.Category - } -} -export interface GetHelpdeskCategoryResponse extends BaseResponse { - data?: Lark.Category -} -export interface ListHelpdeskCategoryResponse extends BaseResponse { - data?: { - /** list of categories */ - categories?: Lark.Category[] - } -} -export interface CreateHelpdeskNotificationResponse extends BaseResponse { - data?: { - /** 创建成功后的唯一id */ - notification_id?: string - /** 当前状态 */ - status?: number - } -} -export interface GetHelpdeskNotificationResponse extends BaseResponse { - data?: { - /** push任务详情 */ - notification?: Lark.Notification - /** 审批链接 */ - approval_app_link?: string - } -} -export interface SubmitApproveHelpdeskNotificationResponse extends BaseResponse { - data?: { - /** 是否有权限创建或者管理审批流程 (有两种情况会导致没有权限: 1:用户没有安装服务台小程序,需要在https://app.feishu.cn/app/cli_9f9f8825d53b900d或者https://ftest.feishu.cn/admin/appCenter/manage/cli_9f9f8825d53b900d?lang=zh-CN 安装小程序 2:用户安装的服务台小程序版本过低) */ - has_access?: boolean - } -} -export interface CreateTaskv1Response extends BaseResponse { - data?: { - /** 返回创建好的任务 */ - task?: Lark.Task - } -} -export interface PatchTaskv1Response extends BaseResponse { - data?: { - /** 返回修改后的任务详情 */ - task?: Lark.Task - } -} -export interface GetTaskv1Response extends BaseResponse { - data?: { - /** 返回任务资源详情 */ - task?: Lark.Task - } -} -export interface ListTaskv1Response extends BaseResponse { - data: Paginated -} -export interface CreateTaskv1TaskReminderResponse extends BaseResponse { - data?: { - /** 返回创建成功的提醒时间 */ - reminder?: Lark.Reminder - } -} -export interface ListTaskv1TaskReminderResponse extends BaseResponse { - data: Paginated -} -export interface CreateTaskv1TaskCommentResponse extends BaseResponse { - data?: { - /** 返回创建好的任务评论 */ - comment?: Lark.Comment - } -} -export interface UpdateTaskv1TaskCommentResponse extends BaseResponse { - data?: { - /** 返回修改后的任务评论详情 */ - comment?: Lark.Comment - } -} -export interface GetTaskv1TaskCommentResponse extends BaseResponse { - data?: { - /** 返回新的任务评论详情 */ - comment?: Lark.Comment - } -} -export interface ListTaskv1TaskCommentResponse extends BaseResponse { - data: Paginated -} -export interface CreateTaskv1TaskFollowerResponse extends BaseResponse { - data?: { - /** 创建后的任务关注者 */ - follower: Lark.Follower - } -} -export interface BatchDeleteFollowerTaskv1Response extends BaseResponse { - data?: { - /** 实际删除的关注人用户ID列表 */ - followers?: string[] - } -} -export interface ListTaskv1TaskFollowerResponse extends BaseResponse { - data: Paginated -} -export interface CreateTaskv1TaskCollaboratorResponse extends BaseResponse { - data?: { - /** 返回创建成功后的任务协作者 */ - collaborator: Lark.Collaborator - } -} -export interface BatchDeleteCollaboratorTaskv1Response extends BaseResponse { - data?: { - /** 实际删除的执行人用户ID列表 */ - collaborators?: string[] - } -} -export interface ListTaskv1TaskCollaboratorResponse extends BaseResponse { - data: Paginated -} -export interface CreateTaskv2Response extends BaseResponse { - data?: { - /** 产生的任务 */ - task?: Lark.Task - } -} -export interface GetTaskv2Response extends BaseResponse { - data?: { - /** 获得的任务实体 */ - task?: Lark.Task - } -} -export interface PatchTaskv2Response extends BaseResponse { - data?: { - /** 更新后的任务 */ - task?: Lark.Task - } -} -export interface AddMembersTaskv2Response extends BaseResponse { - data?: { - /** 更新完成后的任务实体数据 */ - task?: Lark.Task - } -} -export interface RemoveMembersTaskv2Response extends BaseResponse { - data?: { - /** 移除成员后的任务数据 */ - task?: Lark.Task - } -} -export interface ListTaskv2Response extends BaseResponse { - data: Paginated -} -export interface TasklistsTaskv2Response extends BaseResponse { - data?: { - /** 任务所在清单的摘要信息 */ - tasklists?: Lark.TaskInTasklistInfo[] - } -} -export interface AddTasklistTaskv2Response extends BaseResponse { - data?: { - /** 添加后的任务详情 */ - task?: Lark.Task - } -} -export interface RemoveTasklistTaskv2Response extends BaseResponse { - data?: { - /** 添加后的任务详情 */ - task?: Lark.Task - } -} -export interface AddRemindersTaskv2Response extends BaseResponse { - data?: { - /** 更新完成后的任务实体 */ - task?: Lark.Task - } -} -export interface RemoveRemindersTaskv2Response extends BaseResponse { - data?: { - /** 移除后任务的提醒列表 */ - task?: Lark.Task - } -} -export interface AddDependenciesTaskv2Response extends BaseResponse { - data?: { - /** 被添加后任务的所有依赖 */ - dependencies?: Lark.TaskDependency[] - } -} -export interface RemoveDependenciesTaskv2Response extends BaseResponse { - data?: { - /** 移除之后的任务GUID */ - dependencies?: Lark.TaskDependency[] - } -} -export interface CreateTaskv2TaskSubtaskResponse extends BaseResponse { - data?: { - /** 创建的任务 */ - subtask?: Lark.Task - } -} -export interface ListTaskv2TaskSubtaskResponse extends BaseResponse { - data: Paginated -} -export interface CreateTaskv2TasklistResponse extends BaseResponse { - data?: { - /** 创建的清单数据 */ - tasklist?: Lark.Tasklist - } -} -export interface GetTaskv2TasklistResponse extends BaseResponse { - data?: { - /** 清单详情 */ - tasklist?: Lark.Tasklist - } -} -export interface PatchTaskv2TasklistResponse extends BaseResponse { - data?: { - /** 修改后的任务清单 */ - tasklist?: Lark.Tasklist - } -} -export interface AddMembersTaskv2TasklistResponse extends BaseResponse { - data?: { - /** 完成更新后的清单实体 */ - tasklist?: Lark.Tasklist - } -} -export interface RemoveMembersTaskv2TasklistResponse extends BaseResponse { - data?: { - /** 修改完成后的清单实体 */ - tasklist?: Lark.Tasklist - } -} -export interface TasksTaskv2TasklistResponse extends BaseResponse { - data?: { - /** 任务摘要数据 */ - items?: Lark.TaskSummary[] - /** 用于获取下一页的分页标记,最后一页时发返回空 */ - page_token?: string - /** 是否有更多数据 */ - has_more?: boolean - } -} -export interface ListTaskv2TasklistResponse extends BaseResponse { - data: Paginated -} -export interface CreateTaskv2TasklistActivitySubscriptionResponse extends BaseResponse { - data?: { - /** 清单动态订阅 */ - activity_subscription?: Lark.TasklistActivitySubscription - } -} -export interface GetTaskv2TasklistActivitySubscriptionResponse extends BaseResponse { - data?: { - /** 订阅详情 */ - activity_subscription?: Lark.TasklistActivitySubscription - } -} -export interface ListTaskv2TasklistActivitySubscriptionResponse extends BaseResponse { - data?: { - /** 清单的动态订阅数据 */ - items?: Lark.TasklistActivitySubscription[] - } -} -export interface PatchTaskv2TasklistActivitySubscriptionResponse extends BaseResponse { - data?: { - /** 更新后的订阅 */ - activity_subscription?: Lark.TasklistActivitySubscription - } -} -export interface CreateTaskv2CommentResponse extends BaseResponse { - data?: { - /** 创建的评论详情 */ - comment?: Lark.Comment - } -} -export interface GetTaskv2CommentResponse extends BaseResponse { - data?: { - /** 评论详情 */ - comment?: Lark.Comment - } -} -export interface PatchTaskv2CommentResponse extends BaseResponse { - data?: { - /** 更新后的评论 */ - comment?: Lark.Comment - } -} -export interface ListTaskv2CommentResponse extends BaseResponse { - data: Paginated -} -export interface UploadTaskv2AttachmentResponse extends BaseResponse { - data?: { - /** 上传的附件列表 */ - items?: Lark.Attachment[] - } -} -export interface ListTaskv2AttachmentResponse extends BaseResponse { - data: Paginated -} -export interface GetTaskv2AttachmentResponse extends BaseResponse { - data?: { - /** 附件详情 */ - attachment?: Lark.Attachment - } -} -export interface CreateTaskv2SectionResponse extends BaseResponse { - data?: { - /** 创建的自定义分组数据 */ - section?: Lark.Section - } -} -export interface GetTaskv2SectionResponse extends BaseResponse { - data?: { - /** 获取的自定义分组详情 */ - section?: Lark.Section - } -} -export interface PatchTaskv2SectionResponse extends BaseResponse { - data?: { - /** 更新后的自定义分组 */ - section?: Lark.Section - } -} -export interface ListTaskv2SectionResponse extends BaseResponse { - data: Paginated -} -export interface TasksTaskv2SectionResponse extends BaseResponse { - data: Paginated -} -export interface CreateTaskv2CustomFieldResponse extends BaseResponse { - data?: { - /** 创建的自定义字段 */ - custom_field?: Lark.CustomField - } -} -export interface GetTaskv2CustomFieldResponse extends BaseResponse { - data?: { - /** 获取的自定义字段数据 */ - custom_field?: Lark.CustomField - } -} -export interface PatchTaskv2CustomFieldResponse extends BaseResponse { - data?: { - /** 修改后的自定义字段设置 */ - custom_field?: Lark.CustomField - } -} -export interface ListTaskv2CustomFieldResponse extends BaseResponse { - data: Paginated -} -export interface CreateTaskv2CustomFieldOptionResponse extends BaseResponse { - data?: { - /** 创建的选项 */ - option?: Lark.Option - } -} -export interface PatchTaskv2CustomFieldOptionResponse extends BaseResponse { - data?: { - /** 更新后的option数据 */ - option?: Lark.Option - } -} -export interface CreateMailMailgroupResponse extends BaseResponse { - data?: Lark.Mailgroup -} -export interface PatchMailMailgroupResponse extends BaseResponse { - data?: Lark.Mailgroup -} -export interface UpdateMailMailgroupResponse extends BaseResponse { - data?: Lark.Mailgroup -} -export interface GetMailMailgroupResponse extends BaseResponse { - data?: Lark.Mailgroup -} -export interface ListMailMailgroupResponse extends BaseResponse { - data: Paginated -} -export interface ListMailMailgroupManagerResponse extends BaseResponse { - data: Paginated -} -export interface CreateMailMailgroupMemberResponse extends BaseResponse { - data?: Lark.MailgroupMember -} -export interface GetMailMailgroupMemberResponse extends BaseResponse { - data?: Lark.MailgroupMember -} -export interface ListMailMailgroupMemberResponse extends BaseResponse { - data: Paginated -} -export interface BatchCreateMailMailgroupMemberResponse extends BaseResponse { - data?: { - /** 添加成功后的邮件组成员信息列表 */ - items?: Lark.MailgroupMember[] - } -} -export interface CreateMailMailgroupAliasResponse extends BaseResponse { - data?: { - /** 邮件组别名 */ - mailgroup_alias?: Lark.EmailAlias - } -} -export interface ListMailMailgroupAliasResponse extends BaseResponse { - data?: { - /** 邮件组别名 */ - items?: Lark.EmailAlias[] - } -} -export interface CreateMailMailgroupPermissionMemberResponse extends BaseResponse { - data?: Lark.MailgroupPermissionMember -} -export interface GetMailMailgroupPermissionMemberResponse extends BaseResponse { - data?: Lark.MailgroupPermissionMember -} -export interface ListMailMailgroupPermissionMemberResponse extends BaseResponse { - data: Paginated -} -export interface BatchCreateMailMailgroupPermissionMemberResponse extends BaseResponse { - data?: { - /** 添加成功后的邮件组权限成员信息列表 */ - items?: Lark.MailgroupPermissionMember[] - } -} -export interface CreateMailPublicMailboxResponse extends BaseResponse { - data?: Lark.PublicMailbox -} -export interface PatchMailPublicMailboxResponse extends BaseResponse { - data?: Lark.PublicMailbox -} -export interface UpdateMailPublicMailboxResponse extends BaseResponse { - data?: Lark.PublicMailbox -} -export interface GetMailPublicMailboxResponse extends BaseResponse { - data?: Lark.PublicMailbox -} -export interface ListMailPublicMailboxResponse extends BaseResponse { - data: Paginated -} -export interface CreateMailPublicMailboxMemberResponse extends BaseResponse { - data?: Lark.PublicMailboxMember -} -export interface GetMailPublicMailboxMemberResponse extends BaseResponse { - data?: Lark.PublicMailboxMember -} -export interface ListMailPublicMailboxMemberResponse extends BaseResponse { - data: Paginated -} -export interface BatchCreateMailPublicMailboxMemberResponse extends BaseResponse { - data?: { - /** 添加成功后的公共邮箱成员信息列表 */ - items?: Lark.PublicMailboxMember[] - } -} -export interface CreateMailPublicMailboxAliasResponse extends BaseResponse { - data?: { - /** 公共邮箱别名 */ - public_mailbox_alias?: Lark.EmailAlias - } -} -export interface ListMailPublicMailboxAliasResponse extends BaseResponse { - data?: { - /** 公共邮箱别名 */ - items?: Lark.EmailAlias[] - } -} -export interface CreateMailUserMailboxAliasResponse extends BaseResponse { - data?: { - /** 用户邮箱别名 */ - user_mailbox_alias?: Lark.EmailAlias - } -} -export interface ListMailUserMailboxAliasResponse extends BaseResponse { - data: Paginated -} -export interface QueryMailUserResponse extends BaseResponse { - data?: { - /** 邮箱地址返回 */ - user_list?: Lark.User[] - } -} -export interface GetApplicationResponse extends BaseResponse { - data?: { - /** 应用数据 */ - app?: Lark.Application - } -} -export interface GetApplicationApplicationAppVersionResponse extends BaseResponse { - data?: { - app_version?: Lark.ApplicationAppVersion - } -} -export interface ListApplicationApplicationAppVersionResponse extends BaseResponse { - data: Paginated -} -export interface ContactsRangeSuggestApplicationApplicationAppVersionResponse extends BaseResponse { - data?: { - contacts_range?: Lark.ApplicationAppContactsRange - } -} -export interface UnderauditlistApplicationResponse extends BaseResponse { - data: Paginated -} -export interface ContactsRangeConfigurationApplicationResponse extends BaseResponse { - data?: { - contacts_range?: Lark.ApplicationAppContactsRange - /** 是否还有更多项 */ - has_more?: boolean - /** 分页标记,当 has_more 为 true 时,会同时返回新的 page_token,否则不返回 page_token */ - page_token?: string - } -} -export interface CheckWhiteBlackListApplicationApplicationVisibilityResponse extends BaseResponse { - data?: { - /** 用户可见性信息列表 */ - user_visibility_list?: Lark.ApplicationVisibilityUserWhiteBlackInfo[] - /** 部门可见性信息列表 */ - department_visibility_list?: Lark.ApplicationVisibilityDepartmentWhiteBlackInfo[] - /** 用户组可见性信息列表 */ - group_visibility_list?: Lark.ApplicationVisibilityGroupWhiteBlackInfo[] - } -} -export interface DepartmentOverviewApplicationApplicationAppUsageResponse extends BaseResponse { - data?: { - /** 分页查询时返回,代表是否还有更多数据 */ - has_more?: boolean - /** 分页标记,下一页分页的token */ - page_token?: string - /** 部门内员工使用应用的概览数据 */ - items?: Lark.ApplicationDepartmentAppUsage[] - } -} -export interface OverviewApplicationApplicationAppUsageResponse extends BaseResponse { - data?: { - /** 员工使用应用概览数据 */ - items?: Lark.ApplicationAppUsage[] - } -} -export interface ListApplicationApplicationFeedbackResponse extends BaseResponse { - data?: { - /** 应用的反馈列表 */ - feedback_list?: Lark.ApplicationFeedback[] - /** 是否还有更多用户反馈列表,true:是,false:否 */ - has_more: boolean - /** 拉取下一页应用反馈列表时使用的 page_token */ - page_token?: string - } -} -export interface QueryTenantTenantProductAssignInfoResponse extends BaseResponse { - data?: { - /** 租户待分配席位列表 */ - assign_info_list?: Lark.TenantAssignInfo[] - } -} -export interface QueryTenantResponse extends BaseResponse { - data?: { - /** 企业信息 */ - tenant?: Lark.Tenant - } -} -export interface GetVerificationResponse extends BaseResponse { - data?: { - verification?: Lark.Verification - } -} -export interface CreatePersonalSettingsSystemStatusResponse extends BaseResponse { - data?: { - /** 系统状态 */ - system_status?: Lark.SystemStatus - } -} -export interface PatchPersonalSettingsSystemStatusResponse extends BaseResponse { - data?: { - /** 系统状态 */ - system_status?: Lark.SystemStatus - } -} -export interface ListPersonalSettingsSystemStatusResponse extends BaseResponse { - data: Paginated -} -export interface BatchOpenPersonalSettingsSystemStatusResponse extends BaseResponse { - data?: { - /** 开启结果 */ - result_list: Lark.SystemStatusUserOpenResultEntity[] - } -} -export interface BatchClosePersonalSettingsSystemStatusResponse extends BaseResponse { - data?: { - /** 关闭结果 */ - result_list: Lark.SystemStatusUserCloseResultEntity[] - } -} -export interface CreateSearchMessageResponse extends BaseResponse { - data?: { - /** 消息id列表 */ - items?: string[] - /** 翻页 token,传入返回下一页,首页不需要传入 */ - page_token?: string - /** 是否还有下一页 */ - has_more?: boolean - } -} -export interface CreateSearchAppResponse extends BaseResponse { - data?: { - /** app_id列表 */ - items?: string[] - /** 翻页 token,传入返回下一页,首页不需要传入 */ - page_token?: string - /** 是否还有下一页 */ - has_more?: boolean - } -} -export interface CreateSearchDataSourceResponse extends BaseResponse { - data?: { - /** 数据源实例 */ - data_source?: Lark.DataSource - } -} -export interface PatchSearchDataSourceResponse extends BaseResponse { - data?: { - /** 数据源 */ - data_source?: Lark.DataSource - } -} -export interface GetSearchDataSourceResponse extends BaseResponse { - data?: { - /** 数据源实例 */ - data_source?: Lark.DataSource - } -} -export interface ListSearchDataSourceResponse extends BaseResponse { - data: Paginated -} -export interface GetSearchDataSourceItemResponse extends BaseResponse { - data?: { - /** 数据项实例 */ - item: Lark.Item - } -} -export interface CreateSearchSchemaResponse extends BaseResponse { - data?: { - /** 数据范式实例 */ - schema?: Lark.Schema - } -} -export interface PatchSearchSchemaResponse extends BaseResponse { - data?: { - /** 数据范式实例 */ - schema?: Lark.Schema - } -} -export interface GetSearchSchemaResponse extends BaseResponse { - data?: { - /** 数据范式 */ - schema?: Lark.Schema - } -} -export interface ParseDocumentAiResumeResponse extends BaseResponse { - data?: { - /** 简历信息 */ - resumes?: Lark.Resume[] - } -} -export interface RecognizeDocumentAiVehicleInvoiceResponse extends BaseResponse { - data?: { - /** 机动车发票信息 */ - vehicle_invoice?: Lark.VehicleInvoice - } -} -export interface RecognizeDocumentAiHealthCertificateResponse extends BaseResponse { - data?: { - /** 健康证信息 */ - health_certificate?: Lark.HealthCertificate - } -} -export interface RecognizeDocumentAiHkmMainlandTravelPermitResponse extends BaseResponse { - data?: { - /** 港澳居民来往内地通行证信息 */ - hkm_mainland_travel_permit?: Lark.HkmMainlandTravelPermit - } -} -export interface RecognizeDocumentAiTwMainlandTravelPermitResponse extends BaseResponse { - data?: { - /** 台湾居民来往大陆通行证信息 */ - tw_mainland_travel_permit?: Lark.TwMainlandTravelPermit - } -} -export interface RecognizeDocumentAiChinesePassportResponse extends BaseResponse { - data?: { - /** 中国护照信息 */ - chinese_passport?: Lark.ChinesePassport - } -} -export interface RecognizeDocumentAiBankCardResponse extends BaseResponse { - data?: { - /** 银行卡信息 */ - bank_card?: Lark.BankCard - } -} -export interface RecognizeDocumentAiVehicleLicenseResponse extends BaseResponse { - data?: { - /** 行驶证信息 */ - vehicle_license?: Lark.VehicleLicense - } -} -export interface RecognizeDocumentAiTrainInvoiceResponse extends BaseResponse { - data?: { - /** 火车票信息 */ - train_invoices?: Lark.TrainInvoice[] - } -} -export interface RecognizeDocumentAiTaxiInvoiceResponse extends BaseResponse { - data?: { - /** 出租车票信息 */ - taxi_invoices?: Lark.TaxiInvoice[] - } -} -export interface RecognizeDocumentAiIdCardResponse extends BaseResponse { - data?: { - /** 身份证信息 */ - id_card?: Lark.IdCard - } -} -export interface RecognizeDocumentAiFoodProduceLicenseResponse extends BaseResponse { - data?: { - /** 食品生产许可证信息 */ - food_produce_license?: Lark.FoodProduceLicense - } -} -export interface RecognizeDocumentAiFoodManageLicenseResponse extends BaseResponse { - data?: { - /** 食品经营许可证信息 */ - food_manage_license?: Lark.FoodManageLicense - } -} -export interface RecognizeDocumentAiDrivingLicenseResponse extends BaseResponse { - data?: { - /** 驾驶证信息 */ - driving_license?: Lark.DrvingLicense - } -} -export interface RecognizeDocumentAiVatInvoiceResponse extends BaseResponse { - data?: { - /** 增值税发票信息 */ - vat_invoices?: Lark.VatInvoice[] - } -} -export interface RecognizeDocumentAiBusinessLicenseResponse extends BaseResponse { - data?: { - /** 营业执照信息 */ - business_license?: Lark.BusinessLicense - } -} -export interface FieldExtractionDocumentAiContractResponse extends BaseResponse { - data?: { - /** 文件的唯一id */ - file_id?: string - /** 总交易金额 */ - price?: Lark.ExtractPrice - /** 期限相关信息,包括开始日期、结束日期、有效时长 */ - time?: Lark.ExtractTime - /** 盖章份数 */ - copy?: Lark.ExtractCopy - /** 币种 */ - currency?: Lark.ExtractCurrency - /** 合同标题 */ - header?: string - /** 主体信息 */ - body_info?: Lark.BodyInfo[] - /** 银行信息 */ - bank_info?: Lark.BankInfo[] - } -} -export interface RecognizeDocumentAiBusinessCardResponse extends BaseResponse { - data?: { - /** 名片信息 */ - business_cards?: Lark.RecognizedEntities[] - } -} -export interface BasicRecognizeOpticalCharRecognitionImageResponse extends BaseResponse { - data?: { - /** 按区域识别,返回文本列表 */ - text_list: string[] - } -} -export interface FileRecognizeSpeechToTextSpeechResponse extends BaseResponse { - data?: { - /** 语音识别后的文本信息 */ - recognition_text: string - } -} -export interface StreamRecognizeSpeechToTextSpeechResponse extends BaseResponse { - data?: { - /** 16 位 String 随机串作为同一数据流的标识 */ - stream_id: string - /** 数据流分片的序号,序号从 0 开始,每次请求递增 1 */ - sequence_id: number - /** 语音流识别后的文本信息 */ - recognition_text: string - } -} -export interface DetectTranslationTextResponse extends BaseResponse { - data?: { - /** 识别的文本语种,返回符合 ISO 693-1 标准 */ - language: string - } -} -export interface TranslateTranslationTextResponse extends BaseResponse { - data?: { - /** 翻译后的文本 */ - text: string - } -} -export interface ListAdminAdminDeptStatResponse extends BaseResponse { - data?: { - /** 是否有下一页数据 */ - has_more?: boolean - /** 下一页分页的token */ - page_token?: string - items?: Lark.AdminDeptStat[] - } -} -export interface ListAdminAdminUserStatResponse extends BaseResponse { - data?: { - /** 是否有下一页数据 */ - has_more?: boolean - /** 下一页分页的token */ - page_token?: string - items?: Lark.AdminUserStat[] - } -} -export interface CreateAdminBadgeResponse extends BaseResponse { - data?: { - /** 勋章的信息 */ - badge?: Lark.Badge - } -} -export interface UpdateAdminBadgeResponse extends BaseResponse { - data?: { - /** 勋章信息 */ - badge?: Lark.Badge - } -} -export interface CreateAdminBadgeImageResponse extends BaseResponse { - data?: { - /** 图片的key */ - image_key?: string - } -} -export interface ListAdminBadgeResponse extends BaseResponse { - data: Paginated -} -export interface GetAdminBadgeResponse extends BaseResponse { - data?: { - /** 勋章信息 */ - badge?: Lark.Badge - } -} -export interface CreateAdminBadgeGrantResponse extends BaseResponse { - data?: { - /** 授予名单的信息 */ - grant?: Lark.Grant - } -} -export interface UpdateAdminBadgeGrantResponse extends BaseResponse { - data?: { - /** 授予名单 */ - grant?: Lark.Grant - } -} -export interface ListAdminBadgeGrantResponse extends BaseResponse { - data: Paginated -} -export interface GetAdminBadgeGrantResponse extends BaseResponse { - data?: { - /** 授予名单信息 */ - grant?: Lark.Grant - } -} -export interface ListEhrEmployeeResponse extends BaseResponse { - data: Paginated -} -export interface SearchCorehrBasicInfoNationalityResponse extends BaseResponse { - data: Paginated +export interface GetVcReserveConfigDisableInformResponse { + /** 会议室禁用通知配置 */ + disable_inform?: Lark.DisableInformConfig +} +export interface GetVcMeetingListResponse extends Paginated {} +export interface GetVcParticipantListResponse extends Paginated {} +export interface GetVcParticipantQualityListResponse extends Paginated {} +export interface GetVcResourceReservationListResponse extends Paginated {} +export interface ListVcAlertResponse extends Paginated {} +export interface CreateAttendanceShiftResponse { + /** 班次 */ + shift?: Lark.Shift +} +export interface GetAttendanceShiftResponse extends Lark.Shift {} +export interface QueryAttendanceShiftResponse extends Lark.Shift {} +export interface ListAttendanceShiftResponse extends Paginated {} +export interface CreateAttendanceGroupResponse { + group?: Lark.Group +} +export interface GetAttendanceGroupResponse extends Lark.Group {} +export interface SearchAttendanceGroupResponse { + /** 考勤组列表 */ + group_list?: Lark.GroupMeta[] +} +export interface ListAttendanceGroupResponse extends Paginated {} +export interface BatchCreateAttendanceUserDailyShiftResponse { + /** 班表信息列表 */ + user_daily_shifts?: Lark.UserDailyShift[] } -export interface SearchCorehrBasicInfoBankResponse extends BaseResponse { - data: Paginated +export interface QueryAttendanceUserDailyShiftResponse { + /** 班表信息列表 */ + user_daily_shifts?: Lark.UserDailyShift[] } -export interface SearchCorehrBasicInfoBankBranchResponse extends BaseResponse { - data: Paginated +export interface UpdateAttendanceUserStatsViewResponse { + /** 视图 */ + view?: Lark.UserStatsView } -export interface GetByParamCorehrCustomFieldResponse extends BaseResponse { - data?: { - /** 自定义字段详情 */ - data?: Lark.CustomField - } +export interface QueryAttendanceUserStatsFieldResponse { + user_stats_field?: Lark.UserStatsField } -export interface QueryCorehrCustomFieldResponse extends BaseResponse { - data?: { - /** 自定义字段列表 */ - items?: Lark.CustomField[] - } +export interface QueryAttendanceUserStatsViewResponse { + view?: Lark.UserStatsView } -export interface ListObjectApiNameCorehrCustomFieldResponse extends BaseResponse { - data?: { - /** 对象列表 */ - items?: Lark.Object[] - /** 是否有下一页 */ - has_more?: boolean - /** 下一页页码 */ - page_token?: string - } +export interface QueryAttendanceUserStatsDataResponse { + /** 用户统计数据 */ + user_datas?: Lark.UserStatsData[] + /** 无权限获取的用户列表 */ + invalid_user_list?: string[] } -export interface SearchCorehrBasicInfoCountryRegionResponse extends BaseResponse { - data: Paginated +export interface QueryAttendanceUserApprovalResponse { + /** 审批结果列表 */ + user_approvals?: Lark.UserApproval[] } -export interface SearchCorehrBasicInfoCountryRegionSubdivisionResponse extends BaseResponse { - data: Paginated +export interface CreateAttendanceUserApprovalResponse { + /** 审批信息 */ + user_approval?: Lark.UserApproval } -export interface SearchCorehrBasicInfoCityResponse extends BaseResponse { - data: Paginated +export interface ProcessAttendanceApprovalInfoResponse { + /** 审批信息 */ + approval_info?: Lark.ApprovalInfo } -export interface SearchCorehrBasicInfoDistrictResponse extends BaseResponse { - data: Paginated +export interface CreateAttendanceUserTaskRemedyResponse { + /** 补卡审批信息 */ + user_remedy?: Lark.UserTaskRemedy } -export interface CreateCorehrEmployeeTypeResponse extends BaseResponse { - data?: { - employee_type?: Lark.EmployeeType - } +export interface QueryUserAllowedRemedysAttendanceUserTaskRemedyResponse { + /** 用户可补卡时间 */ + user_allowed_remedys?: Lark.UserAllowedRemedy[] } -export interface PatchCorehrEmployeeTypeResponse extends BaseResponse { - data?: { - employee_type?: Lark.EmployeeType - } +export interface QueryAttendanceUserTaskRemedyResponse { + /** 补卡记录列表 */ + user_remedys?: Lark.UserTaskRemedy[] } -export interface GetCorehrEmployeeTypeResponse extends BaseResponse { - data?: { - /** 雇员类型 */ - employee_type?: Lark.EmployeeType - } +export interface BatchCreateAttendanceUserFlowResponse { + /** 打卡流水记录列表 */ + flow_records?: Lark.UserFlow[] +} +export interface GetAttendanceUserFlowResponse extends Lark.UserFlow {} +export interface QueryAttendanceUserFlowResponse { + /** 打卡记录列表 */ + user_flow_results?: Lark.UserFlow[] +} +export interface QueryAttendanceUserTaskResponse { + /** 打卡任务列表 */ + user_task_results?: Lark.UserTask[] + /** 无效用户工号列表 */ + invalid_user_ids?: string[] + /** 没有权限用户工号列表 */ + unauthorized_user_ids?: string[] +} +export interface ModifyAttendanceUserSettingResponse { + /** 用户设置 */ + user_setting?: Lark.UserSetting } -export interface ListCorehrEmployeeTypeResponse extends BaseResponse { - data?: { - /** 查询的雇员类型信息 */ - items?: Lark.EmployeeType[] - /** 是否有下一页 */ - has_more?: boolean - /** 下一页页码 */ - page_token?: string - } +export interface QueryAttendanceUserSettingResponse { + /** 用户设置信息列表 */ + user_settings?: Lark.UserSetting[] } -export interface CreateCorehrNationalIdTypeResponse extends BaseResponse { - data?: { - national_id_type?: Lark.NationalIdType - } +export interface UploadAttendanceFileResponse { + file?: Lark.File } -export interface PatchCorehrNationalIdTypeResponse extends BaseResponse { - data?: { - national_id_type?: Lark.NationalIdType - } +export interface GetAttendanceLeaveEmployExpireRecordResponse { + /** 员工过期日期的授予记录 */ + records: Lark.LeaveEmployExpireRecord[] } -export interface GetCorehrNationalIdTypeResponse extends BaseResponse { - data?: { - /** 国家证件类型信息 */ - national_id_type?: Lark.NationalIdType - } +export interface PatchAttendanceLeaveAccrualRecordResponse { + /** 员工过期日期的授予记录 */ + record: Lark.LeaveAccrualRecord } -export interface ListCorehrNationalIdTypeResponse extends BaseResponse { - data?: { - /** 查询的国家证件类型信息 */ - items?: Lark.NationalIdType[] - /** 是否有下一页 */ - has_more?: boolean - /** 下一页页码 */ - page_token?: string - } +export interface CreateApprovalResponse { + /** 审批定义 Code */ + approval_code?: string + /** 审批定义 id */ + approval_id?: string } -export interface CreateCorehrWorkingHoursTypeResponse extends BaseResponse { - data?: { - working_hours_type?: Lark.WorkingHoursType - } +export interface CreateApprovalInstanceResponse { + /** 审批实例 Code */ + instance_code: string } -export interface PatchCorehrWorkingHoursTypeResponse extends BaseResponse { - data?: { - working_hours_type?: Lark.WorkingHoursType - } +export interface PreviewApprovalInstanceResponse { + /** 预览节点信息 */ + preview_nodes?: Lark.PreviewNode[] } -export interface GetCorehrWorkingHoursTypeResponse extends BaseResponse { - data?: { - /** 工时制度信息 */ - working_hours_type?: Lark.WorkingHoursType - } +export interface GetApprovalInstanceResponse { + /** 审批名称 */ + approval_name: string + /** 审批创建时间 */ + start_time?: string + /** 审批完成时间,未完成为 0 */ + end_time: string + /** 发起审批用户 */ + user_id: string + /** 发起审批用户 open id */ + open_id: string + /** 审批单编号 */ + serial_number: string + /** 发起审批用户所在部门 */ + department_id: string + /** 审批实例状态 */ + status: string + /** 用户的唯一标识id */ + uuid: string + /** json字符串,控件值 */ + form: string + /** 审批任务列表 */ + task_list: Lark.InstanceTask[] + /** 评论列表 */ + comment_list: Lark.InstanceComment[] + /** 审批动态 */ + timeline: Lark.InstanceTimeline[] + /** 修改的原实例 code,仅在查询修改实例时显示该字段 */ + modified_instance_code?: string + /** 撤销的原实例 code,仅在查询撤销实例时显示该字段 */ + reverted_instance_code?: string + /** 审批定义 Code */ + approval_code: string + /** 单据是否被撤销 */ + reverted?: boolean + /** 审批实例 Code */ + instance_code: string } -export interface ListCorehrWorkingHoursTypeResponse extends BaseResponse { - data?: { - /** 查询的工时制度信息 */ - items?: Lark.WorkingHoursType[] - /** 是否有下一页 */ - has_more?: boolean - /** 下一页页码 */ - page_token?: string - } +export interface ListApprovalInstanceResponse extends Paginated {} +export interface CreateApprovalInstanceCommentResponse { + /** 保存成功的comment_id */ + comment_id: string } -export interface SearchCorehrBasicInfoCurrencyResponse extends BaseResponse { - data: Paginated +export interface DeleteApprovalInstanceCommentResponse { + /** 删除的评论ID */ + comment_id?: string } -export interface BatchGetCorehrEmployeeResponse extends BaseResponse { - data?: { - /** 查询的雇佣信息 */ - items?: Lark.Employee[] - } +export interface RemoveApprovalInstanceCommentResponse { + /** 审批实例code */ + instance_id?: string + /** 租户自定义审批实例ID */ + external_id?: string } -export interface SearchCorehrEmployeeResponse extends BaseResponse { - data: Paginated +export interface ListApprovalInstanceCommentResponse extends Paginated {} +export interface CreateApprovalExternalApprovalResponse { + /** 审批定义 code,用户自定义,定义的唯一标识 */ + approval_code: string } -export interface CreateCorehrEmploymentResponse extends BaseResponse { - data?: { - employment?: Lark.EmploymentCreate - } +export interface GetApprovalExternalApprovalResponse { + /** 审批定义名称 */ + approval_name: string + /** 审批定义code */ + approval_code: string + /** 审批定义所属分组 */ + group_code: string + /** 分组名称 */ + group_name?: string + /** 审批定义的说明 */ + description?: string + /** 三方审批定义相关 */ + external?: Lark.ApprovalCreateExternal + /** 可见人列表 */ + viewers?: Lark.ApprovalCreateViewers[] + /** 国际化文案 */ + i18n_resources?: Lark.I18nResource[] + /** 流程管理员 */ + managers?: string[] } -export interface PatchCorehrEmploymentResponse extends BaseResponse { - data?: { - employment?: Lark.Employment - } +export interface CreateApprovalExternalInstanceResponse { + /** 同步的实例数据 */ + data?: Lark.ExternalInstance +} +export interface CheckApprovalExternalInstanceResponse { + /** 更新时间不一致的实例信息 */ + diff_instances?: Lark.ExteranlInstanceCheckResponse[] +} +export interface ListApprovalExternalTaskResponse extends Paginated {} +export interface QueryApprovalInstanceResponse extends Paginated {} +export interface SearchCcApprovalInstanceResponse { + /** 查询返回条数 */ + count?: number + /** 审批实例列表 */ + cc_list?: Lark.CcSearchItem[] + /** 翻页 Token */ + page_token?: string + /** 是否有更多任务可供拉取 */ + has_more?: boolean } -export interface CreateCorehrPersonResponse extends BaseResponse { - data?: { - person?: Lark.PersonInfo - } +export interface SearchApprovalTaskResponse { + /** 查询返回条数 */ + count?: number + /** 审批任务列表 */ + task_list?: Lark.TaskSearchItem[] + /** 翻页 Token */ + page_token?: string + /** 是否有更多任务可供拉取 */ + has_more?: boolean } -export interface PatchCorehrPersonResponse extends BaseResponse { - data?: { - person?: Lark.PersonInfo - } +export interface QueryApprovalTaskResponse extends Paginated {} +export interface AgentEmailHelpdeskAgentResponse { + /** agent emails */ + agents?: string } -export interface UploadCorehrPersonResponse extends BaseResponse { - data?: { - /** 上传文件ID */ - id?: string - } +export interface GetHelpdeskAgentSchedulesResponse { + /** schedules of an agent */ + agent_schedule?: Lark.AgentSchedule } -export interface CreateCorehrJobDataResponse extends BaseResponse { - data?: { - job_data?: Lark.JobData - } +export interface ListHelpdeskAgentScheduleResponse { + /** schedule of all agent */ + agent_schedules?: Lark.AgentSchedule[] } -export interface PatchCorehrJobDataResponse extends BaseResponse { - data?: { - job_data?: Lark.JobData - } +export interface CreateHelpdeskAgentSkillResponse { + agent_skill_id?: string } -export interface GetCorehrJobDataResponse extends BaseResponse { - data?: { - /** 任职信息 */ - job_data?: Lark.JobData - } +export interface GetHelpdeskAgentSkillResponse { + /** agent skill */ + agent_skill?: Lark.AgentSkill } -export interface QueryCorehrEmployeesJobDataResponse extends BaseResponse { - data?: { - /** 任职信息 */ - items?: Lark.EmployeeJobData[] - /** 分页标记,当 has_more 为 true 时,会同时返回新的 page_token,否则不返回 page_token */ - page_token?: string - /** 是否还有更多项 */ - has_more?: boolean - } +export interface ListHelpdeskAgentSkillResponse { + /** list of agent groups */ + agent_skills?: Lark.AgentSkill[] } -export interface BatchGetCorehrEmployeesJobDataResponse extends BaseResponse { - data?: { - /** 查询的雇佣信息 */ - items?: Lark.EmployeeJobData[] - } +export interface ListHelpdeskAgentSkillRuleResponse { + /** all rules for agent skill */ + rules?: Lark.AgentSkillRule[] } -export interface ListCorehrJobDataResponse extends BaseResponse { - data?: { - /** 查询的任职信息 */ - items?: Lark.JobData[] - /** 是否有下一页 */ - has_more?: boolean - /** 下一页页码 */ - page_token?: string - } +export interface StartServiceHelpdeskTicketResponse { + /** chat id */ + chat_id: string } -export interface ParentsCorehrDepartmentResponse extends BaseResponse { - data: Paginated +export interface GetHelpdeskTicketResponse { + /** ticket detail */ + ticket?: Lark.Ticket +} +export interface ListHelpdeskTicketResponse { + /** the total count */ + total?: number + tickets?: Lark.Ticket[] +} +export interface CustomizedFieldsHelpdeskTicketResponse { + /** user customized fields */ + user_customized_fields?: Lark.UserCustomizedField[] + /** ticket customized fields */ + ticket_customized_fields?: Lark.TicketCustomizedField[] +} +export interface CreateHelpdeskTicketMessageResponse { + /** chat消息open ID */ + message_id?: string +} +export interface ListHelpdeskTicketMessageResponse { + /** list of ticket messages */ + messages?: Lark.TicketMessage[] + /** total number of messages */ + total?: number +} +export interface CreateHelpdeskBotMessageResponse { + message_id?: string +} +export interface GetHelpdeskTicketCustomizedFieldResponse extends Lark.TicketCustomizedField {} +export interface ListHelpdeskTicketCustomizedFieldResponse extends Paginated {} +export interface CreateHelpdeskFaqResponse { + /** faq detail */ + faq?: Lark.Faq +} +export interface GetHelpdeskFaqResponse { + /** faq detail */ + faq?: Lark.Faq +} +export interface ListHelpdeskFaqResponse extends Paginated {} +export interface SearchHelpdeskFaqResponse extends Paginated {} +export interface CreateHelpdeskCategoryResponse { + /** category */ + category?: Lark.Category +} +export interface GetHelpdeskCategoryResponse extends Lark.Category {} +export interface ListHelpdeskCategoryResponse { + /** list of categories */ + categories?: Lark.Category[] +} +export interface CreateHelpdeskNotificationResponse { + /** 创建成功后的唯一id */ + notification_id?: string + /** 当前状态 */ + status?: number } -export interface SearchCorehrDepartmentResponse extends BaseResponse { - data: Paginated +export interface GetHelpdeskNotificationResponse { + /** push任务详情 */ + notification?: Lark.Notification + /** 审批链接 */ + approval_app_link?: string +} +export interface SubmitApproveHelpdeskNotificationResponse { + /** 是否有权限创建或者管理审批流程 (有两种情况会导致没有权限: 1:用户没有安装服务台小程序,需要在https://app.feishu.cn/app/cli_9f9f8825d53b900d或者https://ftest.feishu.cn/admin/appCenter/manage/cli_9f9f8825d53b900d?lang=zh-CN 安装小程序 2:用户安装的服务台小程序版本过低) */ + has_access?: boolean +} +export interface CreateTaskv1Response { + /** 返回创建好的任务 */ + task?: Lark.Task +} +export interface PatchTaskv1Response { + /** 返回修改后的任务详情 */ + task?: Lark.Task +} +export interface GetTaskv1Response { + /** 返回任务资源详情 */ + task?: Lark.Task +} +export interface ListTaskv1Response extends Paginated {} +export interface CreateTaskv1TaskReminderResponse { + /** 返回创建成功的提醒时间 */ + reminder?: Lark.Reminder +} +export interface ListTaskv1TaskReminderResponse extends Paginated {} +export interface CreateTaskv1TaskCommentResponse { + /** 返回创建好的任务评论 */ + comment?: Lark.Comment +} +export interface UpdateTaskv1TaskCommentResponse { + /** 返回修改后的任务评论详情 */ + comment?: Lark.Comment +} +export interface GetTaskv1TaskCommentResponse { + /** 返回新的任务评论详情 */ + comment?: Lark.Comment +} +export interface ListTaskv1TaskCommentResponse extends Paginated {} +export interface CreateTaskv1TaskFollowerResponse { + /** 创建后的任务关注者 */ + follower: Lark.Follower +} +export interface BatchDeleteFollowerTaskv1Response { + /** 实际删除的关注人用户ID列表 */ + followers?: string[] +} +export interface ListTaskv1TaskFollowerResponse extends Paginated {} +export interface CreateTaskv1TaskCollaboratorResponse { + /** 返回创建成功后的任务协作者 */ + collaborator: Lark.Collaborator +} +export interface BatchDeleteCollaboratorTaskv1Response { + /** 实际删除的执行人用户ID列表 */ + collaborators?: string[] +} +export interface ListTaskv1TaskCollaboratorResponse extends Paginated {} +export interface CreateTaskv2Response { + /** 产生的任务 */ + task?: Lark.Task +} +export interface GetTaskv2Response { + /** 获得的任务实体 */ + task?: Lark.Task +} +export interface PatchTaskv2Response { + /** 更新后的任务 */ + task?: Lark.Task +} +export interface AddMembersTaskv2Response { + /** 更新完成后的任务实体数据 */ + task?: Lark.Task +} +export interface RemoveMembersTaskv2Response { + /** 移除成员后的任务数据 */ + task?: Lark.Task +} +export interface ListTaskv2Response extends Paginated {} +export interface TasklistsTaskv2Response { + /** 任务所在清单的摘要信息 */ + tasklists?: Lark.TaskInTasklistInfo[] } -export interface CreateCorehrDepartmentResponse extends BaseResponse { - data?: { - department?: Lark.DepartmentCreate - } +export interface AddTasklistTaskv2Response { + /** 添加后的任务详情 */ + task?: Lark.Task } -export interface PatchCorehrDepartmentResponse extends BaseResponse { - data?: { - department?: Lark.Department - } +export interface RemoveTasklistTaskv2Response { + /** 添加后的任务详情 */ + task?: Lark.Task } -export interface GetCorehrDepartmentResponse extends BaseResponse { - data?: { - /** 部门信息 */ - department?: Lark.Department - } +export interface AddRemindersTaskv2Response { + /** 更新完成后的任务实体 */ + task?: Lark.Task } -export interface BatchGetCorehrDepartmentResponse extends BaseResponse { - data?: { - /** 查询的部门信息 */ - items?: Lark.Department[] - } +export interface RemoveRemindersTaskv2Response { + /** 移除后任务的提醒列表 */ + task?: Lark.Task } -export interface ListCorehrDepartmentResponse extends BaseResponse { - data?: { - /** 查询的部门信息 */ - items?: Lark.Department[] - /** 是否有下一页 */ - has_more?: boolean - /** 下一页页码 */ - page_token?: string - } +export interface AddDependenciesTaskv2Response { + /** 被添加后任务的所有依赖 */ + dependencies?: Lark.TaskDependency[] } -export interface BatchGetCorehrLocationResponse extends BaseResponse { - data?: { - /** 查询的地点信息 */ - items?: Lark.Location[] - } +export interface RemoveDependenciesTaskv2Response { + /** 移除之后的任务GUID */ + dependencies?: Lark.TaskDependency[] } -export interface CreateCorehrLocationResponse extends BaseResponse { - data?: { - location?: Lark.Location - } +export interface CreateTaskv2TaskSubtaskResponse { + /** 创建的任务 */ + subtask?: Lark.Task } -export interface GetCorehrLocationResponse extends BaseResponse { - data?: { - /** 地点信息 */ - location?: Lark.Location - } +export interface ListTaskv2TaskSubtaskResponse extends Paginated {} +export interface CreateTaskv2TasklistResponse { + /** 创建的清单数据 */ + tasklist?: Lark.Tasklist } -export interface ListCorehrLocationResponse extends BaseResponse { - data?: { - /** 查询的地点信息 */ - items?: Lark.Location[] - /** 是否有下一页 */ - has_more?: boolean - /** 下一页页码 */ - page_token?: string - } +export interface GetTaskv2TasklistResponse { + /** 清单详情 */ + tasklist?: Lark.Tasklist } -export interface GetCorehrCompanyResponse extends BaseResponse { - data?: { - /** 公司信息 */ - company?: Lark.Company - } +export interface PatchTaskv2TasklistResponse { + /** 修改后的任务清单 */ + tasklist?: Lark.Tasklist } -export interface ListCorehrCompanyResponse extends BaseResponse { - data?: { - /** 查询的公司信息 */ - items?: Lark.Company[] - /** 是否有下一页 */ - has_more?: boolean - /** 下一页页码 */ - page_token?: string - } +export interface AddMembersTaskv2TasklistResponse { + /** 完成更新后的清单实体 */ + tasklist?: Lark.Tasklist } -export interface BatchGetCorehrCompanyResponse extends BaseResponse { - data?: { - /** 查询的公司信息 */ - items?: Lark.Company[] - } +export interface RemoveMembersTaskv2TasklistResponse { + /** 修改完成后的清单实体 */ + tasklist?: Lark.Tasklist } -export interface CreateCorehrCompanyResponse extends BaseResponse { - data?: { - company?: Lark.Company - } +export interface TasksTaskv2TasklistResponse { + /** 任务摘要数据 */ + items?: Lark.TaskSummary[] + /** 用于获取下一页的分页标记,最后一页时发返回空 */ + page_token?: string + /** 是否有更多数据 */ + has_more?: boolean } -export interface PatchCorehrCompanyResponse extends BaseResponse { - data?: { - company?: Lark.Company - } +export interface ListTaskv2TasklistResponse extends Paginated {} +export interface CreateTaskv2TasklistActivitySubscriptionResponse { + /** 清单动态订阅 */ + activity_subscription?: Lark.TasklistActivitySubscription +} +export interface GetTaskv2TasklistActivitySubscriptionResponse { + /** 订阅详情 */ + activity_subscription?: Lark.TasklistActivitySubscription +} +export interface ListTaskv2TasklistActivitySubscriptionResponse { + /** 清单的动态订阅数据 */ + items?: Lark.TasklistActivitySubscription[] +} +export interface PatchTaskv2TasklistActivitySubscriptionResponse { + /** 更新后的订阅 */ + activity_subscription?: Lark.TasklistActivitySubscription +} +export interface CreateTaskv2CommentResponse { + /** 创建的评论详情 */ + comment?: Lark.Comment +} +export interface GetTaskv2CommentResponse { + /** 评论详情 */ + comment?: Lark.Comment +} +export interface PatchTaskv2CommentResponse { + /** 更新后的评论 */ + comment?: Lark.Comment +} +export interface ListTaskv2CommentResponse extends Paginated {} +export interface UploadTaskv2AttachmentResponse { + /** 上传的附件列表 */ + items?: Lark.Attachment[] +} +export interface ListTaskv2AttachmentResponse extends Paginated {} +export interface GetTaskv2AttachmentResponse { + /** 附件详情 */ + attachment?: Lark.Attachment +} +export interface CreateTaskv2SectionResponse { + /** 创建的自定义分组数据 */ + section?: Lark.Section +} +export interface GetTaskv2SectionResponse { + /** 获取的自定义分组详情 */ + section?: Lark.Section +} +export interface PatchTaskv2SectionResponse { + /** 更新后的自定义分组 */ + section?: Lark.Section +} +export interface ListTaskv2SectionResponse extends Paginated {} +export interface TasksTaskv2SectionResponse extends Paginated {} +export interface CreateTaskv2CustomFieldResponse { + /** 创建的自定义字段 */ + custom_field?: Lark.CustomField +} +export interface GetTaskv2CustomFieldResponse { + /** 获取的自定义字段数据 */ + custom_field?: Lark.CustomField +} +export interface PatchTaskv2CustomFieldResponse { + /** 修改后的自定义字段设置 */ + custom_field?: Lark.CustomField +} +export interface ListTaskv2CustomFieldResponse extends Paginated {} +export interface CreateTaskv2CustomFieldOptionResponse { + /** 创建的选项 */ + option?: Lark.Option +} +export interface PatchTaskv2CustomFieldOptionResponse { + /** 更新后的option数据 */ + option?: Lark.Option +} +export interface CreateMailMailgroupResponse extends Lark.Mailgroup {} +export interface PatchMailMailgroupResponse extends Lark.Mailgroup {} +export interface UpdateMailMailgroupResponse extends Lark.Mailgroup {} +export interface GetMailMailgroupResponse extends Lark.Mailgroup {} +export interface ListMailMailgroupResponse extends Paginated {} +export interface ListMailMailgroupManagerResponse extends Paginated {} +export interface CreateMailMailgroupMemberResponse extends Lark.MailgroupMember {} +export interface GetMailMailgroupMemberResponse extends Lark.MailgroupMember {} +export interface ListMailMailgroupMemberResponse extends Paginated {} +export interface BatchCreateMailMailgroupMemberResponse { + /** 添加成功后的邮件组成员信息列表 */ + items?: Lark.MailgroupMember[] } -export interface CreateCorehrCostCenterResponse extends BaseResponse { - data?: { - cost_center?: Lark.CostCenter - } +export interface CreateMailMailgroupAliasResponse { + /** 邮件组别名 */ + mailgroup_alias?: Lark.EmailAlias } -export interface PatchCorehrCostCenterResponse extends BaseResponse { - data?: { - cost_center?: Lark.CostCenter - } +export interface ListMailMailgroupAliasResponse { + /** 邮件组别名 */ + items?: Lark.EmailAlias[] } -export interface SearchCorehrCostCenterResponse extends BaseResponse { - data?: { - /** 成本中心信息 */ - items?: Lark.CostCenterVersion[] - /** 下一页页码 */ - page_token?: string - /** 是否有下一页 */ - has_more?: boolean - } +export interface CreateMailMailgroupPermissionMemberResponse extends Lark.MailgroupPermissionMember {} +export interface GetMailMailgroupPermissionMemberResponse extends Lark.MailgroupPermissionMember {} +export interface ListMailMailgroupPermissionMemberResponse extends Paginated {} +export interface BatchCreateMailMailgroupPermissionMemberResponse { + /** 添加成功后的邮件组权限成员信息列表 */ + items?: Lark.MailgroupPermissionMember[] } -export interface CreateCorehrCostCenterVersionResponse extends BaseResponse { - data?: { - version?: Lark.CostCenterVersion - } +export interface CreateMailPublicMailboxResponse extends Lark.PublicMailbox {} +export interface PatchMailPublicMailboxResponse extends Lark.PublicMailbox {} +export interface UpdateMailPublicMailboxResponse extends Lark.PublicMailbox {} +export interface GetMailPublicMailboxResponse extends Lark.PublicMailbox {} +export interface ListMailPublicMailboxResponse extends Paginated {} +export interface CreateMailPublicMailboxMemberResponse extends Lark.PublicMailboxMember {} +export interface GetMailPublicMailboxMemberResponse extends Lark.PublicMailboxMember {} +export interface ListMailPublicMailboxMemberResponse extends Paginated {} +export interface BatchCreateMailPublicMailboxMemberResponse { + /** 添加成功后的公共邮箱成员信息列表 */ + items?: Lark.PublicMailboxMember[] +} +export interface CreateMailPublicMailboxAliasResponse { + /** 公共邮箱别名 */ + public_mailbox_alias?: Lark.EmailAlias +} +export interface ListMailPublicMailboxAliasResponse { + /** 公共邮箱别名 */ + items?: Lark.EmailAlias[] +} +export interface CreateMailUserMailboxAliasResponse { + /** 用户邮箱别名 */ + user_mailbox_alias?: Lark.EmailAlias +} +export interface ListMailUserMailboxAliasResponse extends Paginated {} +export interface QueryMailUserResponse { + /** 邮箱地址返回 */ + user_list?: Lark.User[] +} +export interface GetApplicationResponse { + /** 应用数据 */ + app?: Lark.Application +} +export interface GetApplicationApplicationAppVersionResponse { + app_version?: Lark.ApplicationAppVersion +} +export interface ListApplicationApplicationAppVersionResponse extends Paginated {} +export interface ContactsRangeSuggestApplicationApplicationAppVersionResponse { + contacts_range?: Lark.ApplicationAppContactsRange +} +export interface UnderauditlistApplicationResponse extends Paginated {} +export interface ContactsRangeConfigurationApplicationResponse { + contacts_range?: Lark.ApplicationAppContactsRange + /** 是否还有更多项 */ + has_more?: boolean + /** 分页标记,当 has_more 为 true 时,会同时返回新的 page_token,否则不返回 page_token */ + page_token?: string } -export interface PatchCorehrCostCenterVersionResponse extends BaseResponse { - data?: { - version?: Lark.CostCenterVersion - } +export interface CheckWhiteBlackListApplicationApplicationVisibilityResponse { + /** 用户可见性信息列表 */ + user_visibility_list?: Lark.ApplicationVisibilityUserWhiteBlackInfo[] + /** 部门可见性信息列表 */ + department_visibility_list?: Lark.ApplicationVisibilityDepartmentWhiteBlackInfo[] + /** 用户组可见性信息列表 */ + group_visibility_list?: Lark.ApplicationVisibilityGroupWhiteBlackInfo[] } -export interface BatchGetCorehrJobLevelResponse extends BaseResponse { - data?: { - /** 查询的职级信息 */ - items?: Lark.JobLevel[] - } +export interface DepartmentOverviewApplicationApplicationAppUsageResponse { + /** 分页查询时返回,代表是否还有更多数据 */ + has_more?: boolean + /** 分页标记,下一页分页的token */ + page_token?: string + /** 部门内员工使用应用的概览数据 */ + items?: Lark.ApplicationDepartmentAppUsage[] } -export interface CreateCorehrJobLevelResponse extends BaseResponse { - data?: { - job_level?: Lark.JobLevel - } +export interface OverviewApplicationApplicationAppUsageResponse { + /** 员工使用应用概览数据 */ + items?: Lark.ApplicationAppUsage[] } -export interface PatchCorehrJobLevelResponse extends BaseResponse { - data?: { - job_level?: Lark.JobLevel - } +export interface ListApplicationApplicationFeedbackResponse { + /** 应用的反馈列表 */ + feedback_list?: Lark.ApplicationFeedback[] + /** 是否还有更多用户反馈列表,true:是,false:否 */ + has_more: boolean + /** 拉取下一页应用反馈列表时使用的 page_token */ + page_token?: string } -export interface GetCorehrJobLevelResponse extends BaseResponse { - data?: { - /** 职务级别信息 */ - job_level?: Lark.JobLevel - } +export interface QueryTenantTenantProductAssignInfoResponse { + /** 租户待分配席位列表 */ + assign_info_list?: Lark.TenantAssignInfo[] } -export interface ListCorehrJobLevelResponse extends BaseResponse { - data?: { - /** 查询的职务级别信息 */ - items?: Lark.JobLevel[] - /** 是否有下一页 */ - has_more?: boolean - /** 下一页页码 */ - page_token?: string - } +export interface QueryTenantResponse { + /** 企业信息 */ + tenant?: Lark.Tenant } -export interface BatchGetCorehrJobFamilyResponse extends BaseResponse { - data?: { - /** 查询的序列信息 */ - items?: Lark.JobFamily[] - } +export interface GetVerificationResponse { + verification?: Lark.Verification } -export interface CreateCorehrJobFamilyResponse extends BaseResponse { - data?: { - job_family?: Lark.JobFamily - } +export interface CreatePersonalSettingsSystemStatusResponse { + /** 系统状态 */ + system_status?: Lark.SystemStatus } -export interface PatchCorehrJobFamilyResponse extends BaseResponse { - data?: { - job_family?: Lark.JobFamily - } +export interface PatchPersonalSettingsSystemStatusResponse { + /** 系统状态 */ + system_status?: Lark.SystemStatus } -export interface GetCorehrJobFamilyResponse extends BaseResponse { - data?: { - /** 职务序列信息 */ - job_family?: Lark.JobFamily - } +export interface ListPersonalSettingsSystemStatusResponse extends Paginated {} +export interface BatchOpenPersonalSettingsSystemStatusResponse { + /** 开启结果 */ + result_list: Lark.SystemStatusUserOpenResultEntity[] } -export interface ListCorehrJobFamilyResponse extends BaseResponse { - data?: { - /** 查询的职务序列信息 */ - items?: Lark.JobFamily[] - /** 是否有下一页 */ - has_more?: boolean - /** 下一页页码 */ - page_token?: string - } +export interface BatchClosePersonalSettingsSystemStatusResponse { + /** 关闭结果 */ + result_list: Lark.SystemStatusUserCloseResultEntity[] } -export interface CreateCorehrJobResponse extends BaseResponse { - data?: { - job?: Lark.Job - } +export interface CreateSearchMessageResponse { + /** 消息id列表 */ + items?: string[] + /** 翻页 token,传入返回下一页,首页不需要传入 */ + page_token?: string + /** 是否还有下一页 */ + has_more?: boolean } -export interface PatchCorehrJobResponse extends BaseResponse { - data?: { - job?: Lark.Job - } +export interface CreateSearchAppResponse { + /** app_id列表 */ + items?: string[] + /** 翻页 token,传入返回下一页,首页不需要传入 */ + page_token?: string + /** 是否还有下一页 */ + has_more?: boolean } -export interface GetCorehrJobResponse extends BaseResponse { - data?: { - /** 职务信息 */ - job?: Lark.Job - } +export interface CreateSearchDataSourceResponse { + /** 数据源实例 */ + data_source?: Lark.DataSource +} +export interface PatchSearchDataSourceResponse { + /** 数据源 */ + data_source?: Lark.DataSource +} +export interface GetSearchDataSourceResponse { + /** 数据源实例 */ + data_source?: Lark.DataSource +} +export interface ListSearchDataSourceResponse extends Paginated {} +export interface GetSearchDataSourceItemResponse { + /** 数据项实例 */ + item: Lark.Item +} +export interface CreateSearchSchemaResponse { + /** 数据范式实例 */ + schema?: Lark.Schema +} +export interface PatchSearchSchemaResponse { + /** 数据范式实例 */ + schema?: Lark.Schema +} +export interface GetSearchSchemaResponse { + /** 数据范式 */ + schema?: Lark.Schema +} +export interface ParseDocumentAiResumeResponse { + /** 简历信息 */ + resumes?: Lark.Resume[] +} +export interface RecognizeDocumentAiVehicleInvoiceResponse { + /** 机动车发票信息 */ + vehicle_invoice?: Lark.VehicleInvoice +} +export interface RecognizeDocumentAiHealthCertificateResponse { + /** 健康证信息 */ + health_certificate?: Lark.HealthCertificate +} +export interface RecognizeDocumentAiHkmMainlandTravelPermitResponse { + /** 港澳居民来往内地通行证信息 */ + hkm_mainland_travel_permit?: Lark.HkmMainlandTravelPermit +} +export interface RecognizeDocumentAiTwMainlandTravelPermitResponse { + /** 台湾居民来往大陆通行证信息 */ + tw_mainland_travel_permit?: Lark.TwMainlandTravelPermit +} +export interface RecognizeDocumentAiChinesePassportResponse { + /** 中国护照信息 */ + chinese_passport?: Lark.ChinesePassport +} +export interface RecognizeDocumentAiBankCardResponse { + /** 银行卡信息 */ + bank_card?: Lark.BankCard +} +export interface RecognizeDocumentAiVehicleLicenseResponse { + /** 行驶证信息 */ + vehicle_license?: Lark.VehicleLicense +} +export interface RecognizeDocumentAiTrainInvoiceResponse { + /** 火车票信息 */ + train_invoices?: Lark.TrainInvoice[] +} +export interface RecognizeDocumentAiTaxiInvoiceResponse { + /** 出租车票信息 */ + taxi_invoices?: Lark.TaxiInvoice[] +} +export interface RecognizeDocumentAiIdCardResponse { + /** 身份证信息 */ + id_card?: Lark.IdCard +} +export interface RecognizeDocumentAiFoodProduceLicenseResponse { + /** 食品生产许可证信息 */ + food_produce_license?: Lark.FoodProduceLicense +} +export interface RecognizeDocumentAiFoodManageLicenseResponse { + /** 食品经营许可证信息 */ + food_manage_license?: Lark.FoodManageLicense +} +export interface RecognizeDocumentAiDrivingLicenseResponse { + /** 驾驶证信息 */ + driving_license?: Lark.DrvingLicense +} +export interface RecognizeDocumentAiVatInvoiceResponse { + /** 增值税发票信息 */ + vat_invoices?: Lark.VatInvoice[] +} +export interface RecognizeDocumentAiBusinessLicenseResponse { + /** 营业执照信息 */ + business_license?: Lark.BusinessLicense +} +export interface FieldExtractionDocumentAiContractResponse { + /** 文件的唯一id */ + file_id?: string + /** 总交易金额 */ + price?: Lark.ExtractPrice + /** 期限相关信息,包括开始日期、结束日期、有效时长 */ + time?: Lark.ExtractTime + /** 盖章份数 */ + copy?: Lark.ExtractCopy + /** 币种 */ + currency?: Lark.ExtractCurrency + /** 合同标题 */ + header?: string + /** 主体信息 */ + body_info?: Lark.BodyInfo[] + /** 银行信息 */ + bank_info?: Lark.BankInfo[] +} +export interface RecognizeDocumentAiBusinessCardResponse { + /** 名片信息 */ + business_cards?: Lark.RecognizedEntities[] +} +export interface BasicRecognizeOpticalCharRecognitionImageResponse { + /** 按区域识别,返回文本列表 */ + text_list: string[] +} +export interface FileRecognizeSpeechToTextSpeechResponse { + /** 语音识别后的文本信息 */ + recognition_text: string +} +export interface StreamRecognizeSpeechToTextSpeechResponse { + /** 16 位 String 随机串作为同一数据流的标识 */ + stream_id: string + /** 数据流分片的序号,序号从 0 开始,每次请求递增 1 */ + sequence_id: number + /** 语音流识别后的文本信息 */ + recognition_text: string +} +export interface DetectTranslationTextResponse { + /** 识别的文本语种,返回符合 ISO 693-1 标准 */ + language: string +} +export interface TranslateTranslationTextResponse { + /** 翻译后的文本 */ + text: string } -export interface ListCorehrJobResponse extends BaseResponse { - data?: { - /** 查询的职务信息 */ - items?: Lark.Job[] - /** 是否有下一页 */ - has_more?: boolean - /** 下一页页码 */ - page_token?: string - } +export interface ListAdminAdminDeptStatResponse { + /** 是否有下一页数据 */ + has_more?: boolean + /** 下一页分页的token */ + page_token?: string + items?: Lark.AdminDeptStat[] } -export interface GetCorehrJobResponse extends BaseResponse { - data?: { - /** 职务信息 */ - job?: Lark.Job - } +export interface ListAdminAdminUserStatResponse { + /** 是否有下一页数据 */ + has_more?: boolean + /** 下一页分页的token */ + page_token?: string + items?: Lark.AdminUserStat[] +} +export interface CreateAdminBadgeResponse { + /** 勋章的信息 */ + badge?: Lark.Badge +} +export interface UpdateAdminBadgeResponse { + /** 勋章信息 */ + badge?: Lark.Badge +} +export interface CreateAdminBadgeImageResponse { + /** 图片的key */ + image_key?: string +} +export interface ListAdminBadgeResponse extends Paginated {} +export interface GetAdminBadgeResponse { + /** 勋章信息 */ + badge?: Lark.Badge +} +export interface CreateAdminBadgeGrantResponse { + /** 授予名单的信息 */ + grant?: Lark.Grant +} +export interface UpdateAdminBadgeGrantResponse { + /** 授予名单 */ + grant?: Lark.Grant +} +export interface ListAdminBadgeGrantResponse extends Paginated {} +export interface GetAdminBadgeGrantResponse { + /** 授予名单信息 */ + grant?: Lark.Grant +} +export interface ListEhrEmployeeResponse extends Paginated {} +export interface SearchCorehrBasicInfoNationalityResponse extends Paginated {} +export interface SearchCorehrBasicInfoBankResponse extends Paginated {} +export interface SearchCorehrBasicInfoBankBranchResponse extends Paginated {} +export interface GetByParamCorehrCustomFieldResponse { + /** 自定义字段详情 */ + data?: Lark.CustomField +} +export interface QueryCorehrCustomFieldResponse { + /** 自定义字段列表 */ + items?: Lark.CustomField[] } -export interface ListCorehrJobResponse extends BaseResponse { - data?: { - /** 查询的职务信息 */ - items?: Lark.Job[] - /** 是否有下一页 */ - has_more?: boolean - /** 下一页页码 */ - page_token?: string - } +export interface ListObjectApiNameCorehrCustomFieldResponse { + /** 对象列表 */ + items?: Lark.Object[] + /** 是否有下一页 */ + has_more?: boolean + /** 下一页页码 */ + page_token?: string } -export interface CreateCorehrPreHireResponse extends BaseResponse { - data?: { - /** 待入职 ID */ - pre_hire_id?: string - } +export interface SearchCorehrBasicInfoCountryRegionResponse extends Paginated {} +export interface SearchCorehrBasicInfoCountryRegionSubdivisionResponse extends Paginated {} +export interface SearchCorehrBasicInfoCityResponse extends Paginated {} +export interface SearchCorehrBasicInfoDistrictResponse extends Paginated {} +export interface CreateCorehrEmployeeTypeResponse { + employee_type?: Lark.EmployeeType } -export interface PatchCorehrPreHireResponse extends BaseResponse { - data?: { - pre_hire?: Lark.PreHire - } +export interface PatchCorehrEmployeeTypeResponse { + employee_type?: Lark.EmployeeType } -export interface GetCorehrPreHireResponse extends BaseResponse { - data?: { - /** 待入职信息 */ - pre_hire?: Lark.PreHire - } +export interface GetCorehrEmployeeTypeResponse { + /** 雇员类型 */ + employee_type?: Lark.EmployeeType } -export interface ListCorehrPreHireResponse extends BaseResponse { - data?: { - /** 查询的待入职信息 */ - items?: Lark.PreHireQuery[] - /** 是否有下一页 */ - has_more?: boolean - /** 下一页页码 */ - page_token?: string - } +export interface ListCorehrEmployeeTypeResponse { + /** 查询的雇员类型信息 */ + items?: Lark.EmployeeType[] + /** 是否有下一页 */ + has_more?: boolean + /** 下一页页码 */ + page_token?: string } -export interface SearchCorehrContractResponse extends BaseResponse { - data: Paginated +export interface CreateCorehrNationalIdTypeResponse { + national_id_type?: Lark.NationalIdType } -export interface CreateCorehrContractResponse extends BaseResponse { - data?: { - contract?: Lark.Contract - } +export interface PatchCorehrNationalIdTypeResponse { + national_id_type?: Lark.NationalIdType } -export interface PatchCorehrContractResponse extends BaseResponse { - data?: { - contract?: Lark.Contract - } +export interface GetCorehrNationalIdTypeResponse { + /** 国家证件类型信息 */ + national_id_type?: Lark.NationalIdType } -export interface GetCorehrContractResponse extends BaseResponse { - data?: { - /** 合同信息 */ - contract?: Lark.Contract - } +export interface ListCorehrNationalIdTypeResponse { + /** 查询的国家证件类型信息 */ + items?: Lark.NationalIdType[] + /** 是否有下一页 */ + has_more?: boolean + /** 下一页页码 */ + page_token?: string } -export interface ListCorehrContractResponse extends BaseResponse { - data?: { - /** 查询的合同信息 */ - items?: Lark.Contract[] - /** 是否有下一页 */ - has_more?: boolean - /** 下一页页码 */ - page_token?: string - } +export interface CreateCorehrWorkingHoursTypeResponse { + working_hours_type?: Lark.WorkingHoursType } -export interface SearchCorehrProbationResponse extends BaseResponse { - data: Paginated +export interface PatchCorehrWorkingHoursTypeResponse { + working_hours_type?: Lark.WorkingHoursType } -export interface CreateCorehrProbationAssessmentResponse extends BaseResponse { - data?: { - /** 创建的试用期考核记录 ID 列表,有序返回 */ - assessment_ids?: string[] - } +export interface GetCorehrWorkingHoursTypeResponse { + /** 工时制度信息 */ + working_hours_type?: Lark.WorkingHoursType } -export interface QueryCorehrTransferReasonResponse extends BaseResponse { - data?: { - /** 异动原因列表 */ - items?: Lark.TransferReason[] - } +export interface ListCorehrWorkingHoursTypeResponse { + /** 查询的工时制度信息 */ + items?: Lark.WorkingHoursType[] + /** 是否有下一页 */ + has_more?: boolean + /** 下一页页码 */ + page_token?: string } -export interface QueryCorehrTransferTypeResponse extends BaseResponse { - data?: { - /** 异动类型列表 */ - items?: Lark.TransferType[] - } +export interface SearchCorehrBasicInfoCurrencyResponse extends Paginated {} +export interface BatchGetCorehrEmployeeResponse { + /** 查询的雇佣信息 */ + items?: Lark.Employee[] } -export interface CreateCorehrJobChangeResponse extends BaseResponse { - data?: Lark.JobChange +export interface SearchCorehrEmployeeResponse extends Paginated {} +export interface CreateCorehrEmploymentResponse { + employment?: Lark.EmploymentCreate } -export interface SearchCorehrJobChangeResponse extends BaseResponse { - data: Paginated +export interface PatchCorehrEmploymentResponse { + employment?: Lark.Employment } -export interface QueryCorehrOffboardingResponse extends BaseResponse { - data?: { - /** 离职原因列表 */ - items?: Lark.OffboardingReason[] - } +export interface CreateCorehrPersonResponse { + person?: Lark.PersonInfo } -export interface SubmitCorehrOffboardingResponse extends BaseResponse { - data?: { - /** 离职记录 id */ - offboarding_id?: string - /** 雇员 id */ - employment_id?: string - /** 离职原因 */ - offboarding_reason_unique_identifier?: string - /** 离职日期 */ - offboarding_date?: string - /** 离职原因说明 */ - offboarding_reason_explanation?: string - /** 是否加入离职屏蔽名单 */ - add_block_list?: boolean - /** 屏蔽原因 */ - block_reason?: string - /** 屏蔽原因说明 */ - block_reason_explanation?: string - /** 创建时间 */ - created_time?: string - } +export interface PatchCorehrPersonResponse { + person?: Lark.PersonInfo } -export interface SearchCorehrOffboardingResponse extends BaseResponse { - data: Paginated +export interface UploadCorehrPersonResponse { + /** 上传文件ID */ + id?: string } -export interface CreateCorehrLeaveGrantingRecordResponse extends BaseResponse { - data?: { - /** 假期授予记录 */ - leave_granting_record?: Lark.LeaveGrantingRecord - } +export interface CreateCorehrJobDataResponse { + job_data?: Lark.JobData } -export interface LeaveTypesCorehrLeaveResponse extends BaseResponse { - data?: { - /** 假期类型列表 */ - leave_type_list?: Lark.LeaveType[] - /** 是否有下一页 */ - has_more?: boolean - /** 下一页页码 */ - page_token?: string - } +export interface PatchCorehrJobDataResponse { + job_data?: Lark.JobData } -export interface LeaveBalancesCorehrLeaveResponse extends BaseResponse { - data?: { - /** 员工假期余额信息列表 */ - employment_leave_balance_list?: Lark.EmploymentLeaveBalance[] - /** 是否有下一页 */ - has_more?: boolean - /** 下一页页码 */ - page_token?: string - } +export interface GetCorehrJobDataResponse { + /** 任职信息 */ + job_data?: Lark.JobData } -export interface LeaveRequestHistoryCorehrLeaveResponse extends BaseResponse { - data?: { - /** 请假记录信息列表 */ - leave_request_list?: Lark.LeaveRequest[] - /** 是否有下一页 */ - has_more?: boolean - /** 下一页页码 */ - page_token?: string - } +export interface QueryCorehrEmployeesJobDataResponse { + /** 任职信息 */ + items?: Lark.EmployeeJobData[] + /** 分页标记,当 has_more 为 true 时,会同时返回新的 page_token,否则不返回 page_token */ + page_token?: string + /** 是否还有更多项 */ + has_more?: boolean } -export interface BatchGetCorehrEmployeesBpResponse extends BaseResponse { - data?: { - /** 员工直属 BP 信息,当员工所在部门、属地无 BP 时,会上钻找到最近的 BP */ - employment_direct_bps?: Lark.EmploymentBp[] - /** 员工全部 BP 信息 */ - employment_all_bps?: Lark.EmploymentBp[] - } +export interface BatchGetCorehrEmployeesJobDataResponse { + /** 查询的雇佣信息 */ + items?: Lark.EmployeeJobData[] } -export interface GetByDepartmentCorehrBpResponse extends BaseResponse { - data?: { - /** 部门 HRBP 信息,依次为部门及各层级上级部门 */ - items?: Lark.DepartmentHrbp[] - } +export interface ListCorehrJobDataResponse { + /** 查询的任职信息 */ + items?: Lark.JobData[] + /** 是否有下一页 */ + has_more?: boolean + /** 下一页页码 */ + page_token?: string } -export interface ListCorehrBpResponse extends BaseResponse { - data: Paginated +export interface ParentsCorehrDepartmentResponse extends Paginated {} +export interface SearchCorehrDepartmentResponse extends Paginated {} +export interface CreateCorehrDepartmentResponse { + department?: Lark.DepartmentCreate } -export interface QueryCorehrSecurityGroupResponse extends BaseResponse { - data?: { - /** HRBP/属地 BP 信息 */ - hrbp_list?: Lark.Hrbp[] - } +export interface PatchCorehrDepartmentResponse { + department?: Lark.Department } -export interface SearchCorehrAssignedUserResponse extends BaseResponse { - data?: { - /** 用户授权信息 */ - items?: Lark.RoleAuthorization[] - /** 是否有下一页 */ - has_more?: boolean - /** 下一页页码 */ - page_token?: string - } +export interface GetCorehrDepartmentResponse { + /** 部门信息 */ + department?: Lark.Department } -export interface ListCorehrSecurityGroupResponse extends BaseResponse { - data?: { - /** 查询的用户角色信息 */ - items?: Lark.SecurityGroup[] - /** 是否有下一页 */ - has_more?: boolean - /** 下一页页码 */ - page_token?: string - } +export interface BatchGetCorehrDepartmentResponse { + /** 查询的部门信息 */ + items?: Lark.Department[] } -export interface ListCorehrProcessResponse extends BaseResponse { - data: Paginated -} -export interface GetCorehrProcessResponse extends BaseResponse { - data?: { - /** 流程实例ID */ - process_id?: string - /** 流程状态 */ - status?: number - /** 业务类型ID */ - flow_template_id?: string - /** 业务类型名称 */ - flow_template_name?: Lark.DataengineI18n - /** 流程定义ID */ - flow_definition_id?: string - /** 流程定义名称 */ - flow_definition_name?: Lark.DataengineI18n - /** 流程发起人ID */ - initiator_id?: string - /** 流程发起人姓名 */ - initiator_name?: Lark.DataengineI18n - /** 流程发起时间,Unix毫秒时间戳 */ - create_time?: string - /** 流程结束时间,Unix毫秒时间戳 */ - complete_time?: string - /** 发起单据地址 */ - start_links?: Lark.ProcessLink - /** 流程摘要,会随着流程流转发生变化 */ - abstracts?: Lark.ProcessAbstractItem[] - /** 待办列表 */ - todos?: Lark.ProcessTodoItem[] - /** 抄送列表 */ - cc_list?: Lark.ProcessCcItem[] - /** 已办列表 */ - done_list?: Lark.ProcessDoneItem[] - } +export interface ListCorehrDepartmentResponse { + /** 查询的部门信息 */ + items?: Lark.Department[] + /** 是否有下一页 */ + has_more?: boolean + /** 下一页页码 */ + page_token?: string } -export interface GetCorehrProcessFormVariableDataResponse extends BaseResponse { - data?: { - /** 流程变量 */ - field_variable_values?: Lark.FormFieldVariable[] - } +export interface BatchGetCorehrLocationResponse { + /** 查询的地点信息 */ + items?: Lark.Location[] } -export interface MatchCorehrCompensationStandardResponse extends BaseResponse { - data?: Lark.CpstMatchItem +export interface CreateCorehrLocationResponse { + location?: Lark.Location } -export interface CombinedCreateHireJobResponse extends BaseResponse { - data?: Lark.CombinedJobResult +export interface GetCorehrLocationResponse { + /** 地点信息 */ + location?: Lark.Location } -export interface GetHireJobResponse extends BaseResponse { - data?: { - /** 职位数据 */ - job?: Lark.Job - } +export interface ListCorehrLocationResponse { + /** 查询的地点信息 */ + items?: Lark.Location[] + /** 是否有下一页 */ + has_more?: boolean + /** 下一页页码 */ + page_token?: string } -export interface ConfigHireJobResponse extends BaseResponse { - data?: { - job_config?: Lark.JobConfigResult - } +export interface GetCorehrCompanyResponse { + /** 公司信息 */ + company?: Lark.Company } -export interface ListHireJobResponse extends BaseResponse { - data?: { - /** 是否还有更多项 */ - has_more?: boolean - /** 分页标记,当 has_more 为 true 时,会同时返回新的 page_token,否则不返回 page_token */ - page_token?: string - /** 列表 */ - items?: Lark.Job[] - } +export interface ListCorehrCompanyResponse { + /** 查询的公司信息 */ + items?: Lark.Company[] + /** 是否有下一页 */ + has_more?: boolean + /** 下一页页码 */ + page_token?: string } -export interface CombinedUpdateHireJobResponse extends BaseResponse { - data?: Lark.CombinedJobResult +export interface BatchGetCorehrCompanyResponse { + /** 查询的公司信息 */ + items?: Lark.Company[] } -export interface UpdateConfigHireJobResponse extends BaseResponse { - data?: { - job_config?: Lark.JobConfigResult - } +export interface CreateCorehrCompanyResponse { + company?: Lark.Company } -export interface ListHireJobTypeResponse extends BaseResponse { - data: Paginated +export interface PatchCorehrCompanyResponse { + company?: Lark.Company } -export interface RecruiterHireJobResponse extends BaseResponse { - data?: { - /** 职位负责人 */ - info?: Lark.JobRecruiter2 - } +export interface CreateCorehrCostCenterResponse { + cost_center?: Lark.CostCenter } -export interface CreateHireJobRequirementResponse extends BaseResponse { - data?: { - job_requirement?: Lark.JobRequirementDto - } +export interface PatchCorehrCostCenterResponse { + cost_center?: Lark.CostCenter } -export interface ListHireJobRequirementResponse extends BaseResponse { - data?: { - /** 是否有下一页 */ - has_more?: boolean - /** 下一页页码 */ - page_token?: string - /** 查询的招聘需求信息 */ - items?: Lark.JobRequirementDto[] - } +export interface SearchCorehrCostCenterResponse { + /** 成本中心信息 */ + items?: Lark.CostCenterVersion[] + /** 下一页页码 */ + page_token?: string + /** 是否有下一页 */ + has_more?: boolean } -export interface ListHireJobRequirementSchemaResponse extends BaseResponse { - data?: { - /** 列表 */ - items?: Lark.JobRequirementSchema[] - /** 是否有下一页 */ - has_more?: boolean - /** 下一页页码 */ - page_token?: string - } +export interface CreateCorehrCostCenterVersionResponse { + version?: Lark.CostCenterVersion } -export interface ListHireJobProcessResponse extends BaseResponse { - data?: { - /** 是否还有更多项 */ - has_more?: boolean - /** 分页标记,当 has_more 为 true 时,会同时返回新的 page_token,否则不返回 page_token */ - page_token?: string - /** 列表 */ - items?: Lark.JobProcesses[] - } +export interface PatchCorehrCostCenterVersionResponse { + version?: Lark.CostCenterVersion } -export interface ListHireRegistrationSchemaResponse extends BaseResponse { - data: Paginated +export interface BatchGetCorehrJobLevelResponse { + /** 查询的职级信息 */ + items?: Lark.JobLevel[] } -export interface ListHireReferralWebsiteJobPostResponse extends BaseResponse { - data: Paginated +export interface CreateCorehrJobLevelResponse { + job_level?: Lark.JobLevel } -export interface GetHireReferralWebsiteJobPostResponse extends BaseResponse { - data?: { - job_post?: Lark.PortalJobPost - } +export interface PatchCorehrJobLevelResponse { + job_level?: Lark.JobLevel } -export interface GetByApplicationHireReferralResponse extends BaseResponse { - data?: { - /** 内推信息 */ - referral?: Lark.Referral - } +export interface GetCorehrJobLevelResponse { + /** 职务级别信息 */ + job_level?: Lark.JobLevel } -export interface CreateHireExternalApplicationResponse extends BaseResponse { - data?: { - external_application?: Lark.ExternalApplication - } +export interface ListCorehrJobLevelResponse { + /** 查询的职务级别信息 */ + items?: Lark.JobLevel[] + /** 是否有下一页 */ + has_more?: boolean + /** 下一页页码 */ + page_token?: string } -export interface UpdateHireExternalApplicationResponse extends BaseResponse { - data?: { - external_application?: Lark.ExternalApplication - } +export interface BatchGetCorehrJobFamilyResponse { + /** 查询的序列信息 */ + items?: Lark.JobFamily[] } -export interface DeleteHireExternalApplicationResponse extends BaseResponse { - data?: { - external_application?: Lark.ExternalApplication - } +export interface CreateCorehrJobFamilyResponse { + job_family?: Lark.JobFamily } -export interface CreateHireExternalInterviewResponse extends BaseResponse { - data?: { - external_interview?: Lark.ExternalInterview - } +export interface PatchCorehrJobFamilyResponse { + job_family?: Lark.JobFamily } -export interface CreateHireExternalInterviewAssessmentResponse extends BaseResponse { - data?: { - external_interview_assessment?: Lark.ExternalInterviewAssessment - } +export interface GetCorehrJobFamilyResponse { + /** 职务序列信息 */ + job_family?: Lark.JobFamily } -export interface CreateHireExternalBackgroundCheckResponse extends BaseResponse { - data?: { - external_background_check?: Lark.ExternalBackgroundCheck - } +export interface ListCorehrJobFamilyResponse { + /** 查询的职务序列信息 */ + items?: Lark.JobFamily[] + /** 是否有下一页 */ + has_more?: boolean + /** 下一页页码 */ + page_token?: string } -export interface AddToFolderHireTalentResponse extends BaseResponse { - data?: { - /** 人才 ID 列表 */ - talent_id_list?: string[] - /** 文件夹 ID */ - folder_id?: string - } +export interface CreateCorehrJobResponse { + job?: Lark.Job } -export interface ListHireTalentFolderResponse extends BaseResponse { - data: Paginated +export interface PatchCorehrJobResponse { + job?: Lark.Job } -export interface BatchGetIdHireTalentResponse extends BaseResponse { - data?: { - /** 人才信息列表 */ - talent_list?: Lark.TalentBatchInfo[] - } +export interface GetCorehrJobResponse { + /** 职务信息 */ + job?: Lark.Job } -export interface ListHireTalentResponse extends BaseResponse { - data?: { - /** 是否还有更多项 */ - has_more?: boolean - /** 分页标记,当 has_more 为 true 时,会同时返回新的 page_token,否则不返回 page_token */ - page_token?: string - /** 列表 */ - items?: Lark.Talent[] - } +export interface ListCorehrJobResponse { + /** 查询的职务信息 */ + items?: Lark.Job[] + /** 是否有下一页 */ + has_more?: boolean + /** 下一页页码 */ + page_token?: string } -export interface QueryHireTalentObjectResponse extends BaseResponse { - data?: { - items?: Lark.CommonSchema[] - } +export interface GetCorehrJobResponse { + /** 职务信息 */ + job?: Lark.Job } -export interface GetHireTalentResponse extends BaseResponse { - data?: { - /** 人才信息 */ - talent?: Lark.Talent - } +export interface ListCorehrJobResponse { + /** 查询的职务信息 */ + items?: Lark.Job[] + /** 是否有下一页 */ + has_more?: boolean + /** 下一页页码 */ + page_token?: string } -export interface CreateHireApplicationResponse extends BaseResponse { - data?: { - /** 投递ID */ - id?: string - } +export interface CreateCorehrPreHireResponse { + /** 待入职 ID */ + pre_hire_id?: string } -export interface GetHireApplicationResponse extends BaseResponse { - data?: { - /** 投递数据 */ - application?: Lark.Application - } +export interface PatchCorehrPreHireResponse { + pre_hire?: Lark.PreHire } -export interface ListHireApplicationResponse extends BaseResponse { - data?: { - /** 投递数据列表 */ - items?: string[] - /** 游标, 翻下一页数据时使用 */ - page_token?: string - /** 是否还有下一页数据 */ - has_more?: boolean - } +export interface GetCorehrPreHireResponse { + /** 待入职信息 */ + pre_hire?: Lark.PreHire } -export interface ListHireEvaluationResponse extends BaseResponse { - data: Paginated -} -export interface ListHireQuestionnaireResponse extends BaseResponse { - data?: { - /** 是否有下一页 */ - has_more?: boolean - /** 下一页页码 */ - page_token?: string - /** 满意度评价列表 */ - items?: Lark.Questionnaire[] - } +export interface ListCorehrPreHireResponse { + /** 查询的待入职信息 */ + items?: Lark.PreHireQuery[] + /** 是否有下一页 */ + has_more?: boolean + /** 下一页页码 */ + page_token?: string } -export interface ListHireInterviewResponse extends BaseResponse { - data?: { - /** 面试列表 */ - items?: Lark.InterviewExtend[] - /** 是否有下一页 */ - has_more?: boolean - /** 下一页页码 */ - page_token?: string - } +export interface SearchCorehrContractResponse extends Paginated {} +export interface CreateCorehrContractResponse { + contract?: Lark.Contract } -export interface CreateHireOfferResponse extends BaseResponse { - data?: Lark.OfferInfo +export interface PatchCorehrContractResponse { + contract?: Lark.Contract } -export interface OfferHireApplicationResponse extends BaseResponse { - data?: { - offer?: Lark.ApplicationOffer - } +export interface GetCorehrContractResponse { + /** 合同信息 */ + contract?: Lark.Contract } -export interface GetHireOfferResponse extends BaseResponse { - data?: { - /** Offer 详情 */ - offer?: Lark.Offer - } +export interface ListCorehrContractResponse { + /** 查询的合同信息 */ + items?: Lark.Contract[] + /** 是否有下一页 */ + has_more?: boolean + /** 下一页页码 */ + page_token?: string } -export interface ListHireOfferResponse extends BaseResponse { - data?: { - /** 是否有下一页 */ - has_more?: boolean - /** 下一页页码 */ - page_token?: string - /** Offer 列表 */ - items?: Lark.OfferListInfo[] - } +export interface SearchCorehrProbationResponse extends Paginated {} +export interface CreateCorehrProbationAssessmentResponse { + /** 创建的试用期考核记录 ID 列表,有序返回 */ + assessment_ids?: string[] } -export interface InternOfferStatusHireOfferResponse extends BaseResponse { - data?: Lark.InternOfferStatus +export interface QueryCorehrTransferReasonResponse { + /** 异动原因列表 */ + items?: Lark.TransferReason[] } -export interface TransferOnboardHireApplicationResponse extends BaseResponse { - data?: { - /** employee */ - employee?: Lark.Employee - } +export interface QueryCorehrTransferTypeResponse { + /** 异动类型列表 */ + items?: Lark.TransferType[] } -export interface PatchHireEmployeeResponse extends BaseResponse { - data?: { - /** 员工信息 */ - employee?: Lark.Employee - } +export interface CreateCorehrJobChangeResponse extends Lark.JobChange {} +export interface SearchCorehrJobChangeResponse extends Paginated {} +export interface QueryCorehrOffboardingResponse { + /** 离职原因列表 */ + items?: Lark.OffboardingReason[] } -export interface GetByApplicationHireEmployeeResponse extends BaseResponse { - data?: { - /** 员工信息 */ - employee?: Lark.Employee - } +export interface SubmitCorehrOffboardingResponse { + /** 离职记录 id */ + offboarding_id?: string + /** 雇员 id */ + employment_id?: string + /** 离职原因 */ + offboarding_reason_unique_identifier?: string + /** 离职日期 */ + offboarding_date?: string + /** 离职原因说明 */ + offboarding_reason_explanation?: string + /** 是否加入离职屏蔽名单 */ + add_block_list?: boolean + /** 屏蔽原因 */ + block_reason?: string + /** 屏蔽原因说明 */ + block_reason_explanation?: string + /** 创建时间 */ + created_time?: string } -export interface GetHireEmployeeResponse extends BaseResponse { - data?: { - /** 员工信息 */ - employee?: Lark.Employee - } +export interface SearchCorehrOffboardingResponse extends Paginated {} +export interface CreateCorehrLeaveGrantingRecordResponse { + /** 假期授予记录 */ + leave_granting_record?: Lark.LeaveGrantingRecord } -export interface CreateHireNoteResponse extends BaseResponse { - data?: { - note?: Lark.Note - } +export interface LeaveTypesCorehrLeaveResponse { + /** 假期类型列表 */ + leave_type_list?: Lark.LeaveType[] + /** 是否有下一页 */ + has_more?: boolean + /** 下一页页码 */ + page_token?: string } -export interface PatchHireNoteResponse extends BaseResponse { - data?: { - /** 备注数据 */ - note?: Lark.Note - } +export interface LeaveBalancesCorehrLeaveResponse { + /** 员工假期余额信息列表 */ + employment_leave_balance_list?: Lark.EmploymentLeaveBalance[] + /** 是否有下一页 */ + has_more?: boolean + /** 下一页页码 */ + page_token?: string } -export interface GetHireNoteResponse extends BaseResponse { - data?: { - /** 备注数据 */ - note?: Lark.Note - } +export interface LeaveRequestHistoryCorehrLeaveResponse { + /** 请假记录信息列表 */ + leave_request_list?: Lark.LeaveRequest[] + /** 是否有下一页 */ + has_more?: boolean + /** 下一页页码 */ + page_token?: string } -export interface ListHireNoteResponse extends BaseResponse { - data?: { - /** 备注数据列表 */ - items?: Lark.Note[] - /** 是否还有下一页数据 */ - has_more?: boolean - /** 游标, 翻下一页数据时使用 */ - page_token?: string - } +export interface BatchGetCorehrEmployeesBpResponse { + /** 员工直属 BP 信息,当员工所在部门、属地无 BP 时,会上钻找到最近的 BP */ + employment_direct_bps?: Lark.EmploymentBp[] + /** 员工全部 BP 信息 */ + employment_all_bps?: Lark.EmploymentBp[] +} +export interface GetByDepartmentCorehrBpResponse { + /** 部门 HRBP 信息,依次为部门及各层级上级部门 */ + items?: Lark.DepartmentHrbp[] +} +export interface ListCorehrBpResponse extends Paginated {} +export interface QueryCorehrSecurityGroupResponse { + /** HRBP/属地 BP 信息 */ + hrbp_list?: Lark.Hrbp[] +} +export interface SearchCorehrAssignedUserResponse { + /** 用户授权信息 */ + items?: Lark.RoleAuthorization[] + /** 是否有下一页 */ + has_more?: boolean + /** 下一页页码 */ + page_token?: string } -export interface ListHireResumeSourceResponse extends BaseResponse { - data: Paginated +export interface ListCorehrSecurityGroupResponse { + /** 查询的用户角色信息 */ + items?: Lark.SecurityGroup[] + /** 是否有下一页 */ + has_more?: boolean + /** 下一页页码 */ + page_token?: string } -export interface CreateHireReferralAccountResponse extends BaseResponse { - data?: { - /** 账号信息 */ - account?: Lark.Account - } +export interface ListCorehrProcessResponse extends Paginated {} +export interface GetCorehrProcessResponse { + /** 流程实例ID */ + process_id?: string + /** 流程状态 */ + status?: number + /** 业务类型ID */ + flow_template_id?: string + /** 业务类型名称 */ + flow_template_name?: Lark.DataengineI18n + /** 流程定义ID */ + flow_definition_id?: string + /** 流程定义名称 */ + flow_definition_name?: Lark.DataengineI18n + /** 流程发起人ID */ + initiator_id?: string + /** 流程发起人姓名 */ + initiator_name?: Lark.DataengineI18n + /** 流程发起时间,Unix毫秒时间戳 */ + create_time?: string + /** 流程结束时间,Unix毫秒时间戳 */ + complete_time?: string + /** 发起单据地址 */ + start_links?: Lark.ProcessLink + /** 流程摘要,会随着流程流转发生变化 */ + abstracts?: Lark.ProcessAbstractItem[] + /** 待办列表 */ + todos?: Lark.ProcessTodoItem[] + /** 抄送列表 */ + cc_list?: Lark.ProcessCcItem[] + /** 已办列表 */ + done_list?: Lark.ProcessDoneItem[] } -export interface DeactivateHireReferralAccountResponse extends BaseResponse { - data?: { - /** 账号信息 */ - account?: Lark.Account - } +export interface GetCorehrProcessFormVariableDataResponse { + /** 流程变量 */ + field_variable_values?: Lark.FormFieldVariable[] } -export interface WithdrawHireReferralAccountResponse extends BaseResponse { - data?: { - /** 请求时传入的提现单ID */ - external_order_id?: string - /** 交易时间戳,需要保存,用于统一交易时间,方便对账 */ - trans_time?: string - /** 本次提现金额明细 */ - withdrawal_details?: Lark.BonusAmount - } +export interface MatchCorehrCompensationStandardResponse extends Lark.CpstMatchItem {} +export interface CombinedCreateHireJobResponse extends Lark.CombinedJobResult {} +export interface GetHireJobResponse { + /** 职位数据 */ + job?: Lark.Job } -export interface ReconciliationHireReferralAccountResponse extends BaseResponse { - data?: { - /** 核对失败的信息 */ - check_failed_list?: Lark.CheckFailedAccountInfo[] - } +export interface ConfigHireJobResponse { + job_config?: Lark.JobConfigResult } -export interface GetHireAttachmentResponse extends BaseResponse { - data?: { - /** 附件信息 */ - attachment?: Lark.Attachment - } +export interface ListHireJobResponse { + /** 是否还有更多项 */ + has_more?: boolean + /** 分页标记,当 has_more 为 true 时,会同时返回新的 page_token,否则不返回 page_token */ + page_token?: string + /** 列表 */ + items?: Lark.Job[] } -export interface PreviewHireAttachmentResponse extends BaseResponse { - data?: { - /** 预览链接 */ - url: string - } +export interface CombinedUpdateHireJobResponse extends Lark.CombinedJobResult {} +export interface UpdateConfigHireJobResponse { + job_config?: Lark.JobConfigResult } -export interface CreateOkrPeriodResponse extends BaseResponse { - data?: { - /** 周期id */ - period_id?: string - /** 周期起始年月 */ - start_month?: string - /** 周期结束年月 */ - end_month?: string - } +export interface ListHireJobTypeResponse extends Paginated {} +export interface RecruiterHireJobResponse { + /** 职位负责人 */ + info?: Lark.JobRecruiter2 } -export interface PatchOkrPeriodResponse extends BaseResponse { - data?: { - /** 周期规则id */ - period_id?: string - /** 周期显示状态 */ - status?: number - } +export interface CreateHireJobRequirementResponse { + job_requirement?: Lark.JobRequirementDto } -export interface ListOkrPeriodResponse extends BaseResponse { - data?: { - /** 分页标志 */ - page_token?: string - /** 是否有更多 */ - has_more?: boolean - /** 数据项 */ - items?: Lark.Period[] - } +export interface ListHireJobRequirementResponse { + /** 是否有下一页 */ + has_more?: boolean + /** 下一页页码 */ + page_token?: string + /** 查询的招聘需求信息 */ + items?: Lark.JobRequirementDto[] } -export interface ListOkrPeriodRuleResponse extends BaseResponse { - data?: { - /** 指标库列表 */ - period_rules?: Lark.PeriodRule[] - } +export interface ListHireJobRequirementSchemaResponse { + /** 列表 */ + items?: Lark.JobRequirementSchema[] + /** 是否有下一页 */ + has_more?: boolean + /** 下一页页码 */ + page_token?: string } -export interface ListOkrUserOkrResponse extends BaseResponse { - data?: { - /** OKR周期总数 */ - total?: number - /** OKR 列表 */ - okr_list?: Lark.OkrBatch[] - } +export interface ListHireJobProcessResponse { + /** 是否还有更多项 */ + has_more?: boolean + /** 分页标记,当 has_more 为 true 时,会同时返回新的 page_token,否则不返回 page_token */ + page_token?: string + /** 列表 */ + items?: Lark.JobProcesses[] } -export interface BatchGetOkrResponse extends BaseResponse { - data?: { - /** OKR 列表 */ - okr_list?: Lark.OkrBatch[] - } +export interface ListHireRegistrationSchemaResponse extends Paginated {} +export interface ListHireReferralWebsiteJobPostResponse extends Paginated {} +export interface GetHireReferralWebsiteJobPostResponse { + job_post?: Lark.PortalJobPost } -export interface CreateOkrProgressRecordResponse extends BaseResponse { - data?: Lark.ProgressRecord +export interface GetByApplicationHireReferralResponse { + /** 内推信息 */ + referral?: Lark.Referral } -export interface UpdateOkrProgressRecordResponse extends BaseResponse { - data?: Lark.ProgressRecord +export interface CreateHireExternalApplicationResponse { + external_application?: Lark.ExternalApplication } -export interface GetOkrProgressRecordResponse extends BaseResponse { - data?: Lark.ProgressRecord +export interface UpdateHireExternalApplicationResponse { + external_application?: Lark.ExternalApplication } -export interface UploadOkrImageResponse extends BaseResponse { - data?: Lark.ImageInfo +export interface DeleteHireExternalApplicationResponse { + external_application?: Lark.ExternalApplication } -export interface CreateHumanAuthenticationIdentityResponse extends BaseResponse { - data?: { - /** uid of user bind authentication */ - verify_uid: string - } +export interface CreateHireExternalInterviewResponse { + external_interview?: Lark.ExternalInterview } -export interface CreateAcsVisitorResponse extends BaseResponse { - data?: { - /** 访客的id */ - visitor_id: string - } +export interface CreateHireExternalInterviewAssessmentResponse { + external_interview_assessment?: Lark.ExternalInterviewAssessment } -export interface GetAcsRuleExternalResponse extends BaseResponse { - data?: { - /** 设备权限组信息 */ - rules: Lark.Rule[] - } +export interface CreateHireExternalBackgroundCheckResponse { + external_background_check?: Lark.ExternalBackgroundCheck } -export interface CreateAcsRuleExternalResponse extends BaseResponse { - data?: { - /** 权限组id */ - rule_id: string - } +export interface AddToFolderHireTalentResponse { + /** 人才 ID 列表 */ + talent_id_list?: string[] + /** 文件夹 ID */ + folder_id?: string } -export interface GetAcsUserResponse extends BaseResponse { - data?: { - /** 门禁用户信息 */ - user?: Lark.User - } +export interface ListHireTalentFolderResponse extends Paginated {} +export interface BatchGetIdHireTalentResponse { + /** 人才信息列表 */ + talent_list?: Lark.TalentBatchInfo[] } -export interface ListAcsUserResponse extends BaseResponse { - data: Paginated +export interface ListHireTalentResponse { + /** 是否还有更多项 */ + has_more?: boolean + /** 分页标记,当 has_more 为 true 时,会同时返回新的 page_token,否则不返回 page_token */ + page_token?: string + /** 列表 */ + items?: Lark.Talent[] } -export interface ListAcsDeviceResponse extends BaseResponse { - data?: { - items?: Lark.Device[] - } +export interface QueryHireTalentObjectResponse { + items?: Lark.CommonSchema[] } -export interface ListAcsAccessRecordResponse extends BaseResponse { - data: Paginated +export interface GetHireTalentResponse { + /** 人才信息 */ + talent?: Lark.Talent } -export interface ListPerformanceSemesterResponse extends BaseResponse { - data?: { - /** 周期meta信息列表 */ - items?: Lark.Semester[] - } +export interface CreateHireApplicationResponse { + /** 投递ID */ + id?: string } -export interface FindByUserListPerformanceStageTaskResponse extends BaseResponse { - data?: { - /** 周期基础信息 */ - base?: Lark.SemesterBaseInfo - /** 周期环节信息列表 */ - items?: Lark.StageTask[] - } +export interface GetHireApplicationResponse { + /** 投递数据 */ + application?: Lark.Application } -export interface FindByPagePerformanceStageTaskResponse extends BaseResponse { - data?: { - /** 周期基础信息 */ - base?: Lark.SemesterBaseInfo - /** 周期环节信息列表 */ - items?: Lark.StageTask[] - /** 是否有下一页数据 */ - has_more?: boolean - /** 下一页分页的token */ - page_token?: string - } +export interface ListHireApplicationResponse { + /** 投递数据列表 */ + items?: string[] + /** 游标, 翻下一页数据时使用 */ + page_token?: string + /** 是否还有下一页数据 */ + has_more?: boolean } -export interface QueryPerformanceReviewDataResponse extends BaseResponse { - data?: Lark.ReviewData +export interface ListHireEvaluationResponse extends Paginated {} +export interface ListHireQuestionnaireResponse { + /** 是否有下一页 */ + has_more?: boolean + /** 下一页页码 */ + page_token?: string + /** 满意度评价列表 */ + items?: Lark.Questionnaire[] } -export interface CreateLingoDraftResponse extends BaseResponse { - data?: { - draft?: Lark.Draft - } +export interface ListHireInterviewResponse { + /** 面试列表 */ + items?: Lark.InterviewExtend[] + /** 是否有下一页 */ + has_more?: boolean + /** 下一页页码 */ + page_token?: string } -export interface UpdateLingoDraftResponse extends BaseResponse { - data?: { - draft?: Lark.Draft - } +export interface CreateHireOfferResponse extends Lark.OfferInfo {} +export interface OfferHireApplicationResponse { + offer?: Lark.ApplicationOffer } -export interface CreateLingoEntityResponse extends BaseResponse { - data?: { - entity?: Lark.Entity - } +export interface GetHireOfferResponse { + /** Offer 详情 */ + offer?: Lark.Offer } -export interface UpdateLingoEntityResponse extends BaseResponse { - data?: { - entity?: Lark.Entity - } +export interface ListHireOfferResponse { + /** 是否有下一页 */ + has_more?: boolean + /** 下一页页码 */ + page_token?: string + /** Offer 列表 */ + items?: Lark.OfferListInfo[] } -export interface GetLingoEntityResponse extends BaseResponse { - data?: { - /** 实体词 */ - entity?: Lark.Entity - } +export interface InternOfferStatusHireOfferResponse extends Lark.InternOfferStatus {} +export interface TransferOnboardHireApplicationResponse { + /** employee */ + employee?: Lark.Employee } -export interface ListLingoEntityResponse extends BaseResponse { - data: Paginated +export interface PatchHireEmployeeResponse { + /** 员工信息 */ + employee?: Lark.Employee } -export interface MatchLingoEntityResponse extends BaseResponse { - data?: { - /** 匹配结果 */ - results?: Lark.MatchInfo[] - } +export interface GetByApplicationHireEmployeeResponse { + /** 员工信息 */ + employee?: Lark.Employee } -export interface SearchLingoEntityResponse extends BaseResponse { - data: Paginated +export interface GetHireEmployeeResponse { + /** 员工信息 */ + employee?: Lark.Employee } -export interface HighlightLingoEntityResponse extends BaseResponse { - data?: { - /** 返回识别到的实体词信息 */ - phrases?: Lark.Phrase[] - } +export interface CreateHireNoteResponse { + note?: Lark.Note } -export interface ListLingoClassificationResponse extends BaseResponse { - data: Paginated +export interface PatchHireNoteResponse { + /** 备注数据 */ + note?: Lark.Note } -export interface ListLingoRepoResponse extends BaseResponse { - data?: { - /** 词库列表 */ - items?: Lark.Repo[] - } +export interface GetHireNoteResponse { + /** 备注数据 */ + note?: Lark.Note } -export interface UploadLingoFileResponse extends BaseResponse { - data?: { - /** 文件 token */ - file_token?: string - } +export interface ListHireNoteResponse { + /** 备注数据列表 */ + items?: Lark.Note[] + /** 是否还有下一页数据 */ + has_more?: boolean + /** 游标, 翻下一页数据时使用 */ + page_token?: string } -export interface ListDataSecurityAndComplianceOpenapiLogResponse extends BaseResponse { - data?: { - /** openapi日志列表 */ - items?: Lark.OpenapiLog[] - /** 分页标记 */ - page_token?: string - /** 是否有更多数据 */ - has_more?: boolean - } +export interface ListHireResumeSourceResponse extends Paginated {} +export interface CreateHireReferralAccountResponse { + /** 账号信息 */ + account?: Lark.Account } -export interface ListAdminAuditInfoResponse extends BaseResponse { - data: Paginated +export interface DeactivateHireReferralAccountResponse { + /** 账号信息 */ + account?: Lark.Account } -export interface GetMinutesMinuteStatisticsResponse extends BaseResponse { - data?: { - /** 妙记浏览信息统计 */ - statistics?: Lark.Statictics - } +export interface WithdrawHireReferralAccountResponse { + /** 请求时传入的提现单ID */ + external_order_id?: string + /** 交易时间戳,需要保存,用于统一交易时间,方便对账 */ + trans_time?: string + /** 本次提现金额明细 */ + withdrawal_details?: Lark.BonusAmount +} +export interface ReconciliationHireReferralAccountResponse { + /** 核对失败的信息 */ + check_failed_list?: Lark.CheckFailedAccountInfo[] +} +export interface GetHireAttachmentResponse { + /** 附件信息 */ + attachment?: Lark.Attachment +} +export interface PreviewHireAttachmentResponse { + /** 预览链接 */ + url: string +} +export interface CreateOkrPeriodResponse { + /** 周期id */ + period_id?: string + /** 周期起始年月 */ + start_month?: string + /** 周期结束年月 */ + end_month?: string } -export interface GetMinutesMinuteResponse extends BaseResponse { - data?: { - /** 妙记基本信息 */ - minute?: Lark.Minute - } +export interface PatchOkrPeriodResponse { + /** 周期规则id */ + period_id?: string + /** 周期显示状态 */ + status?: number } -export interface SearchWorkplaceWorkplaceAccessDataResponse extends BaseResponse { - data?: { - /** 工作台访问数据 */ - items?: Lark.WorkplaceAccessData[] - /** 是否还有下一页数据 */ - has_more?: boolean - /** 分页标记,存在下一页时返回。 */ - page_token?: string - } +export interface ListOkrPeriodResponse { + /** 分页标志 */ + page_token?: string + /** 是否有更多 */ + has_more?: boolean + /** 数据项 */ + items?: Lark.Period[] +} +export interface ListOkrPeriodRuleResponse { + /** 指标库列表 */ + period_rules?: Lark.PeriodRule[] +} +export interface ListOkrUserOkrResponse { + /** OKR周期总数 */ + total?: number + /** OKR 列表 */ + okr_list?: Lark.OkrBatch[] +} +export interface BatchGetOkrResponse { + /** OKR 列表 */ + okr_list?: Lark.OkrBatch[] +} +export interface CreateOkrProgressRecordResponse extends Lark.ProgressRecord {} +export interface UpdateOkrProgressRecordResponse extends Lark.ProgressRecord {} +export interface GetOkrProgressRecordResponse extends Lark.ProgressRecord {} +export interface UploadOkrImageResponse extends Lark.ImageInfo {} +export interface CreateHumanAuthenticationIdentityResponse { + /** uid of user bind authentication */ + verify_uid: string +} +export interface CreateAcsVisitorResponse { + /** 访客的id */ + visitor_id: string +} +export interface GetAcsRuleExternalResponse { + /** 设备权限组信息 */ + rules: Lark.Rule[] +} +export interface CreateAcsRuleExternalResponse { + /** 权限组id */ + rule_id: string } -export interface SearchWorkplaceCustomWorkplaceAccessDataResponse extends BaseResponse { - data?: { - /** 定制工作台访问数据 */ - items?: Lark.CustomWorkplaceAccessData[] - /** 是否还有下一页数据 */ - has_more?: boolean - /** 分页标记,存在下一页时返回 */ - page_token?: string - } +export interface GetAcsUserResponse { + /** 门禁用户信息 */ + user?: Lark.User +} +export interface ListAcsUserResponse extends Paginated {} +export interface ListAcsDeviceResponse { + items?: Lark.Device[] +} +export interface ListAcsAccessRecordResponse extends Paginated {} +export interface ListPerformanceSemesterResponse { + /** 周期meta信息列表 */ + items?: Lark.Semester[] +} +export interface FindByUserListPerformanceStageTaskResponse { + /** 周期基础信息 */ + base?: Lark.SemesterBaseInfo + /** 周期环节信息列表 */ + items?: Lark.StageTask[] +} +export interface FindByPagePerformanceStageTaskResponse { + /** 周期基础信息 */ + base?: Lark.SemesterBaseInfo + /** 周期环节信息列表 */ + items?: Lark.StageTask[] + /** 是否有下一页数据 */ + has_more?: boolean + /** 下一页分页的token */ + page_token?: string } -export interface SearchWorkplaceWorkplaceBlockAccessDataResponse extends BaseResponse { - data?: { - /** 工作台中block的访问数据 */ - items?: Lark.BlockAccessData[] - /** 是否还有下一页数据 */ - has_more?: boolean - /** 分页标记,存在下一页时返回 */ - page_token?: string - } +export interface QueryPerformanceReviewDataResponse extends Lark.ReviewData {} +export interface CreateLingoDraftResponse { + draft?: Lark.Draft } -export interface FavouriteApplicationResponse extends BaseResponse { - data: Paginated +export interface UpdateLingoDraftResponse { + draft?: Lark.Draft } -export interface RecommendApplicationResponse extends BaseResponse { - data: Paginated +export interface CreateLingoEntityResponse { + entity?: Lark.Entity } -export interface ListApplicationAppRecommendRuleResponse extends BaseResponse { - data: Paginated +export interface UpdateLingoEntityResponse { + entity?: Lark.Entity } -export interface QueryReportRuleResponse extends BaseResponse { - data?: { - /** 规则列表 */ - rules?: Lark.Rule[] - } +export interface GetLingoEntityResponse { + /** 实体词 */ + entity?: Lark.Entity } -export interface QueryReportTaskResponse extends BaseResponse { - data?: { - /** 任务列表 */ - items?: Lark.Task[] - /** 是否有下一页数据 */ - has_more?: boolean - /** 下一页分页的token */ - page_token?: string - } +export interface ListLingoEntityResponse extends Paginated {} +export interface MatchLingoEntityResponse { + /** 匹配结果 */ + results?: Lark.MatchInfo[] } -export interface CreateAuthenAccessTokenResponse extends BaseResponse { - data?: Lark.UserAccessTokenInfo +export interface SearchLingoEntityResponse extends Paginated {} +export interface HighlightLingoEntityResponse { + /** 返回识别到的实体词信息 */ + phrases?: Lark.Phrase[] } -export interface CreateAuthenRefreshAccessTokenResponse extends BaseResponse { - data?: Lark.UserAccessTokenInfo +export interface ListLingoClassificationResponse extends Paginated {} +export interface ListLingoRepoResponse { + /** 词库列表 */ + items?: Lark.Repo[] } -export interface CreateBaikeDraftResponse extends BaseResponse { - data?: { - draft?: Lark.Draft - } +export interface UploadLingoFileResponse { + /** 文件 token */ + file_token?: string } -export interface UpdateBaikeDraftResponse extends BaseResponse { - data?: { - draft?: Lark.Draft - } +export interface ListDataSecurityAndComplianceOpenapiLogResponse { + /** openapi日志列表 */ + items?: Lark.OpenapiLog[] + /** 分页标记 */ + page_token?: string + /** 是否有更多数据 */ + has_more?: boolean } -export interface CreateBaikeEntityResponse extends BaseResponse { - data?: { - entity?: Lark.Entity - } +export interface ListAdminAuditInfoResponse extends Paginated {} +export interface GetMinutesMinuteStatisticsResponse { + /** 妙记浏览信息统计 */ + statistics?: Lark.Statictics } -export interface UpdateBaikeEntityResponse extends BaseResponse { - data?: { - entity?: Lark.Entity - } +export interface GetMinutesMinuteResponse { + /** 妙记基本信息 */ + minute?: Lark.Minute } -export interface GetBaikeEntityResponse extends BaseResponse { - data?: { - /** 实体词 */ - entity?: Lark.Entity - } +export interface SearchWorkplaceWorkplaceAccessDataResponse { + /** 工作台访问数据 */ + items?: Lark.WorkplaceAccessData[] + /** 是否还有下一页数据 */ + has_more?: boolean + /** 分页标记,存在下一页时返回。 */ + page_token?: string } -export interface ListBaikeEntityResponse extends BaseResponse { - data: Paginated +export interface SearchWorkplaceCustomWorkplaceAccessDataResponse { + /** 定制工作台访问数据 */ + items?: Lark.CustomWorkplaceAccessData[] + /** 是否还有下一页数据 */ + has_more?: boolean + /** 分页标记,存在下一页时返回 */ + page_token?: string } -export interface MatchBaikeEntityResponse extends BaseResponse { - data?: { - /** 匹配结果 */ - results?: Lark.MatchInfo[] - } +export interface SearchWorkplaceWorkplaceBlockAccessDataResponse { + /** 工作台中block的访问数据 */ + items?: Lark.BlockAccessData[] + /** 是否还有下一页数据 */ + has_more?: boolean + /** 分页标记,存在下一页时返回 */ + page_token?: string } -export interface SearchBaikeEntityResponse extends BaseResponse { - data: Paginated +export interface FavouriteApplicationResponse extends Paginated {} +export interface RecommendApplicationResponse extends Paginated {} +export interface ListApplicationAppRecommendRuleResponse extends Paginated {} +export interface QueryReportRuleResponse { + /** 规则列表 */ + rules?: Lark.Rule[] } -export interface HighlightBaikeEntityResponse extends BaseResponse { - data?: { - /** 返回识别到的实体词信息 */ - phrases?: Lark.Phrase[] - } +export interface QueryReportTaskResponse { + /** 任务列表 */ + items?: Lark.Task[] + /** 是否有下一页数据 */ + has_more?: boolean + /** 下一页分页的token */ + page_token?: string } -export interface ExtractBaikeEntityResponse extends BaseResponse { - data?: { - /** 文本中可能的成为百科词条的实体词 */ - entity_word: Lark.EntityWord[] - } +export interface CreateAuthenAccessTokenResponse extends Lark.UserAccessTokenInfo {} +export interface CreateAuthenRefreshAccessTokenResponse extends Lark.UserAccessTokenInfo {} +export interface CreateBaikeDraftResponse { + draft?: Lark.Draft } -export interface ListBaikeClassificationResponse extends BaseResponse { - data: Paginated +export interface UpdateBaikeDraftResponse { + draft?: Lark.Draft } -export interface UploadBaikeFileResponse extends BaseResponse { - data?: { - /** 文件 token */ - file_token?: string - } +export interface CreateBaikeEntityResponse { + entity?: Lark.Entity } -export interface ListContactUserResponse extends BaseResponse { - data: Paginated +export interface UpdateBaikeEntityResponse { + entity?: Lark.Entity } -export interface UpdateContactUserResponse extends BaseResponse { - data?: { - user?: Lark.User - } +export interface GetBaikeEntityResponse { + /** 实体词 */ + entity?: Lark.Entity } -export interface ListContactDepartmentResponse extends BaseResponse { - data: Paginated +export interface ListBaikeEntityResponse extends Paginated {} +export interface MatchBaikeEntityResponse { + /** 匹配结果 */ + results?: Lark.MatchInfo[] } -export interface ListBitableAppTableRecordResponse extends BaseResponse { - data: Paginated +export interface SearchBaikeEntityResponse extends Paginated {} +export interface HighlightBaikeEntityResponse { + /** 返回识别到的实体词信息 */ + phrases?: Lark.Phrase[] } -export interface ListHireApplicationInterviewResponse extends BaseResponse { - data?: { - /** 分页标志 */ - page_token?: string - /** 是否有更多 */ - has_more?: boolean - /** 面试列表 */ - items?: Lark.Interview[] - } +export interface ExtractBaikeEntityResponse { + /** 文本中可能的成为百科词条的实体词 */ + entity_word: Lark.EntityWord[] } -export interface GetHireJobManagerResponse extends BaseResponse { - data?: { - /** 职位负责人 */ - info?: Lark.JobManager - } +export interface ListBaikeClassificationResponse extends Paginated {} +export interface UploadBaikeFileResponse { + /** 文件 token */ + file_token?: string } -export interface GetHireOfferSchemaResponse extends BaseResponse { - data?: Lark.OfferSchema -} -export interface ListCorehrSubregionResponse extends BaseResponse { - data?: { - /** 城市/区域信息 */ - items?: Lark.Subregion[] - /** 是否有下一页 */ - has_more?: boolean - /** 下一页页码 */ - page_token?: string - } +export interface ListContactUserResponse extends Paginated {} +export interface UpdateContactUserResponse { + user?: Lark.User } -export interface GetCorehrSubregionResponse extends BaseResponse { - data?: { - /** 城市/区域信息 */ - subregion?: Lark.Subregion - } +export interface ListContactDepartmentResponse extends Paginated {} +export interface ListBitableAppTableRecordResponse extends Paginated {} +export interface ListHireApplicationInterviewResponse { + /** 分页标志 */ + page_token?: string + /** 是否有更多 */ + has_more?: boolean + /** 面试列表 */ + items?: Lark.Interview[] +} +export interface GetHireJobManagerResponse { + /** 职位负责人 */ + info?: Lark.JobManager +} +export interface GetHireOfferSchemaResponse extends Lark.OfferSchema {} +export interface ListCorehrSubregionResponse { + /** 城市/区域信息 */ + items?: Lark.Subregion[] + /** 是否有下一页 */ + has_more?: boolean + /** 下一页页码 */ + page_token?: string } -export interface ListCorehrSubdivisionResponse extends BaseResponse { - data?: { - /** 省份/行政区信息 */ - items?: Lark.Subdivision[] - /** 是否有下一页 */ - has_more?: boolean - /** 下一页页码 */ - page_token?: string - } +export interface GetCorehrSubregionResponse { + /** 城市/区域信息 */ + subregion?: Lark.Subregion } -export interface GetCorehrSubdivisionResponse extends BaseResponse { - data?: { - /** 国家/地址信息 */ - subdivision?: Lark.Subdivision - } +export interface ListCorehrSubdivisionResponse { + /** 省份/行政区信息 */ + items?: Lark.Subdivision[] + /** 是否有下一页 */ + has_more?: boolean + /** 下一页页码 */ + page_token?: string } -export interface ListCorehrCountryRegionResponse extends BaseResponse { - data?: { - /** 国家/地址信息 */ - items?: Lark.CountryRegion[] - /** 是否有下一页 */ - has_more?: boolean - /** 下一页页码 */ - page_token?: string - } +export interface GetCorehrSubdivisionResponse { + /** 国家/地址信息 */ + subdivision?: Lark.Subdivision } -export interface GetCorehrCountryRegionResponse extends BaseResponse { - data?: { - /** 国家/地址信息 */ - country_region?: Lark.CountryRegion - } +export interface ListCorehrCountryRegionResponse { + /** 国家/地址信息 */ + items?: Lark.CountryRegion[] + /** 是否有下一页 */ + has_more?: boolean + /** 下一页页码 */ + page_token?: string } -export interface ListCorehrCurrencyResponse extends BaseResponse { - data?: { - /** 货币信息 */ - items?: Lark.Currency[] - /** 是否有下一页 */ - has_more?: boolean - /** 下一页页码 */ - page_token?: string - } +export interface GetCorehrCountryRegionResponse { + /** 国家/地址信息 */ + country_region?: Lark.CountryRegion } -export interface GetCorehrCurrencyResponse extends BaseResponse { - data?: { - /** 货币信息 */ - currency?: Lark.Currency - } +export interface ListCorehrCurrencyResponse { + /** 货币信息 */ + items?: Lark.Currency[] + /** 是否有下一页 */ + has_more?: boolean + /** 下一页页码 */ + page_token?: string } -export interface GetCorehrPersonResponse extends BaseResponse { - data?: { - /** 个人信息 */ - person?: Lark.Person - } +export interface GetCorehrCurrencyResponse { + /** 货币信息 */ + currency?: Lark.Currency } -export interface SetCheckboardAccessCodeVcRoomConfigResponse extends BaseResponse { - data?: { - /** 部署访问码 */ - access_code?: string - } +export interface GetCorehrPersonResponse { + /** 个人信息 */ + person?: Lark.Person } -export interface SetRoomAccessCodeVcRoomConfigResponse extends BaseResponse { - data?: { - /** 部署访问码 */ - access_code?: string - } +export interface SetCheckboardAccessCodeVcRoomConfigResponse { + /** 部署访问码 */ + access_code?: string } -export interface QueryVcRoomConfigResponse extends BaseResponse { - data?: Lark.RoomConfig +export interface SetRoomAccessCodeVcRoomConfigResponse { + /** 部署访问码 */ + access_code?: string } +export interface QueryVcRoomConfigResponse extends Lark.RoomConfig {} Internal.define({ - '/event/v1/outbound_ip': { - GET: 'listEventOutboundIp', - }, '/auth/v3/tenant_access_token/internal': { POST: 'tenantAccessTokenInternalAuth', }, @@ -29539,15 +28052,21 @@ Internal.define({ '/auth/v3/tenant_access_token': { POST: 'tenantAccessTokenAuth', }, + '/auth/v3/app_ticket/resend': { + POST: 'appTicketResendAuth', + }, +}, false) + +Internal.define({ + '/event/v1/outbound_ip': { + GET: 'listEventOutboundIp', + }, '/authen/v1/oidc/access_token': { POST: 'createAuthenOidcAccessToken', }, '/authen/v1/oidc/refresh_access_token': { POST: 'createAuthenOidcRefreshAccessToken', }, - '/auth/v3/app_ticket/resend': { - POST: 'appTicketResendAuth', - }, '/authen/v1/user_info': { GET: 'getAuthenUserInfo', }, diff --git a/adapters/lark/src/types/internal.ts b/adapters/lark/src/types/internal.ts index 64256bba..66420106 100644 --- a/adapters/lark/src/types/internal.ts +++ b/adapters/lark/src/types/internal.ts @@ -15,17 +15,15 @@ type Method = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' export class Internal { constructor(private bot: LarkBot) {} - private processReponse(response: any): BaseResponse { - const { code, msg } = response - if (code === 0) { - return response - } else { - this.bot.logger.debug('response: %o', response) - throw new Error(`HTTP response with non-zero status (${code}) with message "${msg}"`) - } + private assertResponse(response: HTTP.Response) { + if (!response.data.code) return + this.bot.logger.debug('response: %o', response.data) + const error = new HTTP.Error(`request failed`) + error.response = response + throw error } - static define(routes: Dict>>) { + static define(routes: Dict>>, extractData = true) { for (const path in routes) { for (const key in routes[path]) { const method = key as Method @@ -49,7 +47,9 @@ export class Internal { } else if (args.length > 1) { throw new Error(`too many arguments for ${path}, received ${raw}`) } - return this.processReponse((await this.bot.http(method, url, config)).data) + const response = await this.bot.http(method, url, config) + this.assertResponse(response.data) + return extractData ? response.data.data : response.data } } } diff --git a/adapters/lark/src/utils.ts b/adapters/lark/src/utils.ts index 688d4bcb..27a8d01b 100644 --- a/adapters/lark/src/utils.ts +++ b/adapters/lark/src/utils.ts @@ -123,9 +123,9 @@ export async function adaptSession(bot: LarkBot, body: Eve session.channelId = body.event.context.open_chat_id session.guildId = body.event.context.open_chat_id session.userId = body.event.operator.open_id - const { data } = await bot.internal.getImChat(session.channelId) + const chat = await bot.internal.getImChat(session.channelId) // TODO: add channel data - session.isDirect = data.chat_mode === 'p2p' + session.isDirect = chat.chat_mode === 'p2p' } break } @@ -201,7 +201,7 @@ export function extractIdType(id: string): Lark.ReceiveIdType { return 'user_id' } -export function decodeChannel(channelId: string, guild: GetImChatResponse['data']): Universal.Channel { +export function decodeChannel(channelId: string, guild: GetImChatResponse): Universal.Channel { return { id: channelId, type: Universal.Channel.Type.TEXT, From e8e76d75b744aefafa965738ec0a01dfa6ef7824 Mon Sep 17 00:00:00 2001 From: Shigma Date: Mon, 25 Nov 2024 11:10:02 +0800 Subject: [PATCH 02/10] feat(lark): support lark favored button attrs --- adapters/lark/package.json | 2 +- adapters/lark/src/message.ts | 15 +++++++++++++++ adapters/lark/src/types/internal.ts | 2 +- package.json | 2 +- yakumo.yml | 4 ++++ 5 files changed, 22 insertions(+), 3 deletions(-) diff --git a/adapters/lark/package.json b/adapters/lark/package.json index 7f1f2689..52d9a79d 100644 --- a/adapters/lark/package.json +++ b/adapters/lark/package.json @@ -1,7 +1,7 @@ { "name": "@satorijs/adapter-lark", "description": "Lark (飞书) Adapter for Satorijs", - "version": "3.6.2", + "version": "3.7.1", "type": "module", "main": "lib/index.cjs", "types": "lib/index.d.ts", diff --git a/adapters/lark/src/message.ts b/adapters/lark/src/message.ts index 2502ee85..77853b13 100644 --- a/adapters/lark/src/message.ts +++ b/adapters/lark/src/message.ts @@ -236,6 +236,21 @@ export class LarkMessageEncoder extends MessageEnco }, disabled: attrs.disabled, behaviors: this.createBehavior(attrs), + type: attrs['lark:type'], + size: attrs['lark:size'], + width: attrs['lark:width'], + icon: attrs['lark:icon'] && { + tag: 'standard_icon', + token: attrs['lark:icon'], + }, + hover_tips: attrs['lark:hover-tips'] && { + tag: 'plain_text', + content: attrs['lark:hover-tips'], + }, + disabled_tips: attrs['lark:disabled-tips'] && { + tag: 'plain_text', + content: attrs['lark:disabled-tips'], + }, }) this.textContent = '' } else if (type === 'button-group') { diff --git a/adapters/lark/src/types/internal.ts b/adapters/lark/src/types/internal.ts index 66420106..59c62cd6 100644 --- a/adapters/lark/src/types/internal.ts +++ b/adapters/lark/src/types/internal.ts @@ -48,7 +48,7 @@ export class Internal { throw new Error(`too many arguments for ${path}, received ${raw}`) } const response = await this.bot.http(method, url, config) - this.assertResponse(response.data) + this.assertResponse(response) return extractData ? response.data.data : response.data } } diff --git a/package.json b/package.json index d04997da..cb89f867 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "packages/*" ], "scripts": { - "build": "yakumo esbuild && yakumo tsc", + "build": "yakumo build", "bump": "yakumo version", "dep": "yakumo upgrade", "pub": "yakumo publish", diff --git a/yakumo.yml b/yakumo.yml index 96724ca8..60b5c89e 100644 --- a/yakumo.yml +++ b/yakumo.yml @@ -13,3 +13,7 @@ name: yakumo-tsc - id: qrzdog name: yakumo/run +- id: g61i7p + name: yakumo/version +- id: 16co8h + name: yakumo/publish From 32320111243998d2b28c2a9b253a253e955530a7 Mon Sep 17 00:00:00 2001 From: Shigma Date: Mon, 25 Nov 2024 13:39:43 +0800 Subject: [PATCH 03/10] feat(lark): internal api use object instead of form data --- adapters/lark/package.json | 2 +- adapters/lark/src/message.ts | 37 +-- adapters/lark/src/types/api.ts | 402 ++++++++++++++++++++++++---- adapters/lark/src/types/internal.ts | 22 +- 4 files changed, 387 insertions(+), 76 deletions(-) diff --git a/adapters/lark/package.json b/adapters/lark/package.json index 52d9a79d..7f7a12f5 100644 --- a/adapters/lark/package.json +++ b/adapters/lark/package.json @@ -1,7 +1,7 @@ { "name": "@satorijs/adapter-lark", "description": "Lark (飞书) Adapter for Satorijs", - "version": "3.7.1", + "version": "3.7.2", "type": "module", "main": "lib/index.cjs", "types": "lib/index.d.ts", diff --git a/adapters/lark/src/message.ts b/adapters/lark/src/message.ts index 77853b13..8ed5d3a1 100644 --- a/adapters/lark/src/message.ts +++ b/adapters/lark/src/message.ts @@ -1,6 +1,6 @@ import { Context, Dict, h, MessageEncoder } from '@satorijs/core' import { LarkBot } from './bot' -import { Lark, MessageContent } from './types' +import { CreateImFileForm, Lark, MessageContent } from './types' import { extractIdType } from './utils' export class LarkMessageEncoder extends MessageEncoder> { @@ -93,40 +93,43 @@ export class LarkMessageEncoder extends MessageEnco async createImage(url: string) { const { filename, type, data } = await this.bot.assetsQuester.file(url) - const payload = new FormData() - payload.append('image', new Blob([data], { type }), filename) - payload.append('image_type', 'message') - const { image_key } = await this.bot.internal.createImImage(payload) + const { image_key } = await this.bot.internal.createImImage({ + image_type: 'message', + image: new File([data], filename, { type }), + }) return image_key } async sendFile(_type: 'video' | 'audio' | 'file', attrs: any) { const url = attrs.src || attrs.url - const payload = new FormData() const { filename, type, data } = await this.bot.assetsQuester.file(url) - payload.append('file', new Blob([data], { type }), filename) - payload.append('file_name', filename) - - if (attrs.duration) { - payload.append('duration', attrs.duration) - } + let file_type: CreateImFileForm['file_type'] if (_type === 'audio') { // FIXME: only support opus - payload.append('file_type', 'opus') + file_type = 'opus' } else if (_type === 'video') { // FIXME: only support mp4 - payload.append('file_type', 'mp4') + file_type = 'mp4' } else { const ext = filename.split('.').pop() if (['doc', 'xls', 'ppt', 'pdf'].includes(ext)) { - payload.append('file_type', ext) + file_type = ext } else { - payload.append('file_type', 'stream') + file_type = 'stream' } } - const { file_key } = await this.bot.internal.createImFile(payload) + const form: CreateImFileForm = { + file_type, + file: new File([data], filename, { type }), + file_name: filename, + } + if (attrs.duration) { + form.duration = attrs.duration + } + + const { file_key } = await this.bot.internal.createImFile(form) await this.post({ msg_type: _type === 'video' ? 'media' : _type, content: JSON.stringify({ file_key }), diff --git a/adapters/lark/src/types/api.ts b/adapters/lark/src/types/api.ts index 7eddc2b4..5cc263ca 100644 --- a/adapters/lark/src/types/api.ts +++ b/adapters/lark/src/types/api.ts @@ -486,7 +486,7 @@ declare module './internal' { * 上传图片 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/image/create */ - createImImage(form: FormData): Promise + createImImage(form: CreateImImageForm): Promise /** * 下载图片 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/image/get @@ -496,7 +496,7 @@ declare module './internal' { * 上传文件 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/file/create */ - createImFile(form: FormData): Promise + createImFile(form: CreateImFileForm): Promise /** * 下载文件 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/file/get @@ -736,7 +736,7 @@ declare module './internal' { * 上传素材 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/media/upload_all */ - uploadAllDrivev1Media(form: FormData): Promise + uploadAllDrivev1Media(form: UploadAllDrivev1MediaForm): Promise /** * 下载素材 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/media/download @@ -756,7 +756,7 @@ declare module './internal' { * 分片上传素材(上传分片) * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/media/upload_part */ - uploadPartDrivev1Media(form: FormData): Promise + uploadPartDrivev1Media(form: UploadPartDrivev1MediaForm): Promise /** * 分片上传素材(完成上传) * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/media/upload_finish @@ -781,7 +781,7 @@ declare module './internal' { * 上传文件 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/upload_all */ - uploadAllDrivev1File(form: FormData): Promise + uploadAllDrivev1File(form: UploadAllDrivev1FileForm): Promise /** * 分片上传文件(预上传) * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/upload_prepare @@ -791,7 +791,7 @@ declare module './internal' { * 分片上传文件(上传分片) * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/upload_part */ - uploadPartDrivev1File(form: FormData): Promise + uploadPartDrivev1File(form: UploadPartDrivev1FileForm): Promise /** * 分片上传文件(完成上传) * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/upload_finish @@ -2046,7 +2046,7 @@ declare module './internal' { * 上传用户人脸识别照片 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/file/upload */ - uploadAttendanceFile(form: FormData, query?: UploadAttendanceFileQuery): Promise + uploadAttendanceFile(form: UploadAttendanceFileForm, query?: UploadAttendanceFileQuery): Promise /** * 下载用户人脸识别照片 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/file/download @@ -2741,7 +2741,7 @@ declare module './internal' { * 上传附件 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/task-v2/attachment/upload */ - uploadTaskv2Attachment(form: FormData, query?: UploadTaskv2AttachmentQuery): Promise + uploadTaskv2Attachment(form: UploadTaskv2AttachmentForm, query?: UploadTaskv2AttachmentQuery): Promise /** * 列取附件 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/task-v2/attachment/list @@ -3256,92 +3256,92 @@ declare module './internal' { * 识别文件中的简历信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/resume/parse */ - parseDocumentAiResume(form: FormData): Promise + parseDocumentAiResume(form: ParseDocumentAiResumeForm): Promise /** * 识别文件中的机动车发票 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/vehicle_invoice/recognize */ - recognizeDocumentAiVehicleInvoice(form: FormData): Promise + recognizeDocumentAiVehicleInvoice(form: RecognizeDocumentAiVehicleInvoiceForm): Promise /** * 识别文件中的健康证 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/health_certificate/recognize */ - recognizeDocumentAiHealthCertificate(form: FormData): Promise + recognizeDocumentAiHealthCertificate(form: RecognizeDocumentAiHealthCertificateForm): Promise /** * 识别文件中的港澳居民来往内地通行证 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/hkm_mainland_travel_permit/recognize */ - recognizeDocumentAiHkmMainlandTravelPermit(form: FormData): Promise + recognizeDocumentAiHkmMainlandTravelPermit(form: RecognizeDocumentAiHkmMainlandTravelPermitForm): Promise /** * 识别文件中的台湾居民来往大陆通行证 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/tw_mainland_travel_permit/recognize */ - recognizeDocumentAiTwMainlandTravelPermit(form: FormData): Promise + recognizeDocumentAiTwMainlandTravelPermit(form: RecognizeDocumentAiTwMainlandTravelPermitForm): Promise /** * 识别文件中的中国护照 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/chinese_passport/recognize */ - recognizeDocumentAiChinesePassport(form: FormData): Promise + recognizeDocumentAiChinesePassport(form: RecognizeDocumentAiChinesePassportForm): Promise /** * 识别文件中的银行卡 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/bank_card/recognize */ - recognizeDocumentAiBankCard(form: FormData): Promise + recognizeDocumentAiBankCard(form: RecognizeDocumentAiBankCardForm): Promise /** * 识别文件中的行驶证 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/vehicle_license/recognize */ - recognizeDocumentAiVehicleLicense(form: FormData): Promise + recognizeDocumentAiVehicleLicense(form: RecognizeDocumentAiVehicleLicenseForm): Promise /** * 识别文件中的火车票 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/train_invoice/recognize */ - recognizeDocumentAiTrainInvoice(form: FormData): Promise + recognizeDocumentAiTrainInvoice(form: RecognizeDocumentAiTrainInvoiceForm): Promise /** * 识别文件中的出租车发票 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/taxi_invoice/recognize */ - recognizeDocumentAiTaxiInvoice(form: FormData): Promise + recognizeDocumentAiTaxiInvoice(form: RecognizeDocumentAiTaxiInvoiceForm): Promise /** * 识别文件中的身份证 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/id_card/recognize */ - recognizeDocumentAiIdCard(form: FormData): Promise + recognizeDocumentAiIdCard(form: RecognizeDocumentAiIdCardForm): Promise /** * 识别文件中的食品生产许可证 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/food_produce_license/recognize */ - recognizeDocumentAiFoodProduceLicense(form: FormData): Promise + recognizeDocumentAiFoodProduceLicense(form: RecognizeDocumentAiFoodProduceLicenseForm): Promise /** * 识别文件中的食品经营许可证 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/food_manage_license/recognize */ - recognizeDocumentAiFoodManageLicense(form: FormData): Promise + recognizeDocumentAiFoodManageLicense(form: RecognizeDocumentAiFoodManageLicenseForm): Promise /** * 识别文件中的驾驶证 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/driving_license/recognize */ - recognizeDocumentAiDrivingLicense(form: FormData): Promise + recognizeDocumentAiDrivingLicense(form: RecognizeDocumentAiDrivingLicenseForm): Promise /** * 识别文件中的增值税发票 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/vat_invoice/recognize */ - recognizeDocumentAiVatInvoice(form: FormData): Promise + recognizeDocumentAiVatInvoice(form: RecognizeDocumentAiVatInvoiceForm): Promise /** * 识别文件中的营业执照 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/business_license/recognize */ - recognizeDocumentAiBusinessLicense(form: FormData): Promise + recognizeDocumentAiBusinessLicense(form: RecognizeDocumentAiBusinessLicenseForm): Promise /** * 提取文件中的合同字段 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/contract/field_extraction */ - fieldExtractionDocumentAiContract(form: FormData): Promise + fieldExtractionDocumentAiContract(form: FieldExtractionDocumentAiContractForm): Promise /** * 识别文件中的名片 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/document_ai-v1/business_card/recognize */ - recognizeDocumentAiBusinessCard(form: FormData): Promise + recognizeDocumentAiBusinessCard(form: RecognizeDocumentAiBusinessCardForm): Promise /** * 识别图片中的文字 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/ai/optical_char_recognition-v1/image/basic_recognize @@ -3416,7 +3416,7 @@ declare module './internal' { * 上传勋章图片 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge_image/create */ - createAdminBadgeImage(form: FormData): Promise + createAdminBadgeImage(form: CreateAdminBadgeImageForm): Promise /** * 获取勋章列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge/list @@ -3636,7 +3636,7 @@ declare module './internal' { * 上传文件 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/person/upload */ - uploadCorehrPerson(form: FormData): Promise + uploadCorehrPerson(form: UploadCorehrPersonForm): Promise /** * 下载文件 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/file/get @@ -4531,7 +4531,7 @@ declare module './internal' { * 上传进展记录图片 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/image/upload */ - uploadOkrImage(form: FormData): Promise + uploadOkrImage(form: UploadOkrImageForm): Promise /** * 录入身份信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/human_authentication-v1/identity/create @@ -4691,7 +4691,7 @@ declare module './internal' { * 上传图片 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/lingo-v1/file/upload */ - uploadLingoFile(form: FormData): Promise + uploadLingoFile(form: UploadLingoFileForm): Promise /** * 下载图片 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/lingo-v1/file/download @@ -4841,7 +4841,7 @@ declare module './internal' { * 上传图片 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/file/upload */ - uploadBaikeFile(form: FormData): Promise + uploadBaikeFile(form: UploadBaikeFileForm): Promise /** * 下载图片 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/file/download @@ -16776,6 +16776,50 @@ export interface UrgentPhoneImMessageQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type: string } +export interface CreateImImageForm { + /** 图片类型 */ + image_type: 'message' | 'avatar' + /** + * 图片内容。传值方式可以参考请求体示例。 + * + * 注意: + * + * - 上传的图片大小不能超过 10 MB,也不能上传大小为 0 的图片。 + * - 分辨率限制: + * - GIF 图片分辨率不能超过 2000 x 2000,其他图片分辨率不能超过 12000 x 12000。 + * - 用于设置头像的图片分辨率不能超过 4096 x 4096。 + */ + image: Blob +} +export interface CreateImFileForm { + /** + * 待上传的文件类型 + * + * 可选值有: + * + * - opus:OPUS 音频文件。其他格式的音频文件,请转为 OPUS 格式后上传。可使用 ffmpeg 转换格式: + * ```sh + * ffmpeg -i SourceFile.mp3 -acodec libopus -ac 1 -ar 16000 TargetFile.opus + * ``` + * - mp4:MP4 格式视频文件 + * - pdf:PDF 格式文件 + * - doc:DOC 格式文件 + * - xls:XLS 格式文件 + * - ppt:PPT 格式文件 + * - stream:stream 格式文件。若上传文件不属于以上枚举类型,可以使用 stream 格式 + */ + file_type: string + /** 带后缀的文件名 */ + file_name: string + /** 文件的时长(视频、音频),单位:毫秒。不传值时无法显示文件的具体时长。 */ + duration?: number + /** + * 文件内容,具体的传值方式可参考请求体示例。 + * + * 注意:文件大小不得超过 30 MB,且不允许上传空文件。 + */ + file: Blob +} export interface PatchImMessageRequest { /** 消息内容 json 格式,[发送消息 content 说明](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/im-v1/message/create_json),参考文档中的卡片格式 */ content: string @@ -17137,6 +17181,44 @@ export interface TaskCheckDrivev1FileQuery { /** 文件相关异步任务id */ task_id: string } +export interface UploadAllDrivev1MediaForm { + /** + * 要上传的素材的名称 + * + * 数据校验规则: + * + * - 最大长度:250 字符 + */ + file_name: string + /** + * 上传点的类型。你可根据上传的素材类型与云文档类型确定上传点类型。例如,要将一张图片插入到新版文档(文件类型为 docx)中,需指定上传点为 docx_image;要将一个附件上传到新版文档中,需指定上传点为 docx_file。 + * + * 可选值有: + * + * - doc_image:旧版文档图片 + * - docx_image:新版文档图片 + * - sheet_image:电子表格图片 + * - doc_file:旧版文档文件 + * - docx_file:新版文档文件 + */ + parent_type: string + /** 上传点的 token,即要上传的云文档的 token,用于指定素材将要上传到的云文档或位置。参考素材概述了解上传点类型与上传点 token 的对应关系 */ + parent_node: string + /** + * 文件的大小,单位为字节 + * + * 数据校验规则: + * + * - 最大值:20971520 + */ + size: number + /** 文件的 Adler-32 校验和 */ + checksum?: string + /** 其它扩展信息。详情参考素材概述。如果需要跨域路由,需要填写路由的云文档 token,格式为 {"drive_route_token":"需要路由的云文档的 token"} */ + extra?: string + /** 文件的二进制内容 */ + file: Blob +} export interface DownloadDrivev1MediaQuery { /** 扩展信息 */ extra?: string @@ -17159,6 +17241,18 @@ export interface UploadPrepareDrivev1MediaRequest { /** 扩展信息(可选) */ extra?: string } +export interface UploadPartDrivev1MediaForm { + /** 分片上传事务的 ID。通过调用分片上传素材(预上传)接口获取。 */ + upload_id: string + /** 块号,从 0 开始计数。 */ + seq: number + /** 块的大小,单位为字节。 */ + size: number + /** 素材文件的 Adler-32 校验和 */ + checksum?: string + /** 素材文件分片的二进制内容 */ + file: Blob +} export interface UploadFinishDrivev1MediaRequest { /** 分片上传事务ID */ upload_id: string @@ -17177,6 +17271,38 @@ export interface GetSubscribeDrivev1FileQuery { /** 文档类型 */ file_type: string } +export interface UploadAllDrivev1FileForm { + /** + * 要上传的文件的名称。 + * + * 数据校验规则: + * + * - 最大长度:250 字符 + */ + file_name: string + /** + * 上传点的类型。取固定值 explorer,表示将文件上传至云空间中。 + * + * 可选值有: + * + * - explorer:云空间 + */ + parent_type: string + /** 云空间中文件夹的 token。获取方式见文件夹概述。 */ + parent_node: string + /** + * 文件的大小,单位为字节。 + * + * 数据校验规则: + * + * - 最大值:20971520 + */ + size: number + /** 文件的 Adler-32 校验和 */ + checksum?: string + /** 文件的二进制内容 */ + file: Blob +} export interface UploadPrepareDrivev1FileRequest { /** 文件名 */ file_name: string @@ -17187,6 +17313,18 @@ export interface UploadPrepareDrivev1FileRequest { /** 文件大小 */ size: number } +export interface UploadPartDrivev1FileForm { + /** 分片上传事务 ID。通过调用分片上传文件-预上传接口获取。 */ + upload_id: string + /** 文件分片的序号,从 0 开始计数。 */ + seq: number + /** 分片的大小,单位为字节。 */ + size: number + /** 文件分片的 Adler-32 校验和 */ + checksum?: string + /** 文件分片的二进制内容 */ + file: Blob +} export interface UploadFinishDrivev1FileRequest { /** 分片上传事务ID */ upload_id: string @@ -19186,6 +19324,10 @@ export interface QueryAttendanceUserSettingQuery { /** 请求体中的 user_ids 和响应体中的 user_id 的员工工号类型 */ employee_type: string } +export interface UploadAttendanceFileForm { + /** 文件内容 */ + file?: Blob +} export interface UploadAttendanceFileQuery { /** 带后缀的文件名 */ file_name: string @@ -20538,6 +20680,24 @@ export interface ListTaskv2CommentQuery { /** 表示user的ID的类型,支持open_id, user_id, union_id */ user_id_type?: string } +export interface UploadTaskv2AttachmentForm { + /** + * 附件归属资源的类型 + * + * 默认值:task + */ + resource_type?: string + /** + * 附件要归属资源的id。例如,要给任务添加附件,这里要填入任务GUID。任务GUID可以通过任务相关接口获得。 + * + * 数据校验规则: + * + * - 最大长度:100 字符 + */ + resource_id: string + /** 要上传的文件,单请求支持最多5个文件。上传结果的顺序将和请求中文件的顺序保持一致。 */ + file: Blob +} export interface UploadTaskv2AttachmentQuery { /** 表示user的ID的类型,支持open_id, user_id, union_id */ user_id_type?: string @@ -21310,6 +21470,90 @@ export interface PatchSearchSchemaRequest { /** 数据展示相关配置 */ display?: Lark.SchemaDisplay } +export interface ParseDocumentAiResumeForm { + /** 简历文件,支持 PDF / DOCX / PNG / JPG */ + file: Blob +} +export interface RecognizeDocumentAiVehicleInvoiceForm { + /** 识别的机动车发票源文件 */ + file: Blob +} +export interface RecognizeDocumentAiHealthCertificateForm { + /** 识别的健康证源文件 */ + file: Blob +} +export interface RecognizeDocumentAiHkmMainlandTravelPermitForm { + /** 识别的港澳居民来往内地通行证源文件 */ + file: Blob +} +export interface RecognizeDocumentAiTwMainlandTravelPermitForm { + /** 识别的台湾居民来往大陆通行证源文件 */ + file: Blob +} +export interface RecognizeDocumentAiChinesePassportForm { + /** 识别的中国护照源文件 */ + file: Blob +} +export interface RecognizeDocumentAiBankCardForm { + /** 识别的银行卡源文件 */ + file: Blob +} +export interface RecognizeDocumentAiVehicleLicenseForm { + /** 识别的行驶证源文件 */ + file: Blob +} +export interface RecognizeDocumentAiTrainInvoiceForm { + /** 识别的火车票源文件 */ + file: Blob +} +export interface RecognizeDocumentAiTaxiInvoiceForm { + /** 识别的出租车票源文件 */ + file: Blob +} +export interface RecognizeDocumentAiIdCardForm { + /** 识别身份证的源文件 */ + file: Blob +} +export interface RecognizeDocumentAiFoodProduceLicenseForm { + /** 识别的食品生产许可证源文件 */ + file: Blob +} +export interface RecognizeDocumentAiFoodManageLicenseForm { + /** 识别的食品经营许可证源文件 */ + file: Blob +} +export interface RecognizeDocumentAiDrivingLicenseForm { + /** 识别的驾驶证源文件 */ + file: Blob +} +export interface RecognizeDocumentAiVatInvoiceForm { + /** 识别的增值税发票文件(支持JPG/JPEG/PNG/PDF/BMP/OFD) */ + file: Blob +} +export interface RecognizeDocumentAiBusinessLicenseForm { + /** 识别的营业执照源文件 */ + file: Blob +} +export interface FieldExtractionDocumentAiContractForm { + /** 合同字段解析的源文件,当前只支持pdf, doc, docx三种类型的文件 */ + file: Blob + /** pdf页数限制,太长会导致latency增加,最大允许100页 */ + pdf_page_limit: number + /** + * ocr 参数,当前支持force, pdf, unused三种格式 + * + * 可选值有: + * + * - force:pdf类型文件直接走OCR解析 + * - auto:pdf类型文件先走本地解析,无法解析(扫描/图片版)再走OCR + * - unused:不调用OCR,扫描/图片PDF返回不可解析信息 + */ + ocr_mode: string +} +export interface RecognizeDocumentAiBusinessCardForm { + /** 识别名片的源文件(支持 JPG / PNG / PDF) */ + file: Blob +} export interface BasicRecognizeOpticalCharRecognitionImageRequest { /** base64 后的图片数据 */ image?: string @@ -21444,6 +21688,19 @@ export interface UpdateAdminBadgeRequest { /** 勋章的多语言描述文案,同explanation字段限制,最多100个字符。 */ i18n_explanation?: Lark.I18n } +export interface CreateAdminBadgeImageForm { + /** 勋章图片的文件,仅支持 PNG 格式,320 x 320 像素,大小不超过 1024 KB。 */ + image_file: Blob + /** + * 图片的类型 + * + * 可选值有: + * + * - 1:勋章详情图 + * - 2:勋章挂饰图 + */ + image_type: 1 | 2 +} export interface ListAdminBadgeQuery { /** 分页大小 */ page_size: number @@ -22090,6 +22347,12 @@ export interface PatchCorehrPersonQuery { /** 根据client_token是否一致来判断是否为同一请求 */ client_token?: string } +export interface UploadCorehrPersonForm { + /** 文件二进制内容,大小不超过50M */ + file_content: Blob + /** 文件名称(需带有文件后缀) */ + file_name: string +} export interface CreateCorehrJobDataRequest { /** 级别 */ job_level_id?: string @@ -23125,27 +23388,21 @@ export interface LeaveRequestHistoryCorehrLeaveQuery { employment_id_list?: string[] /** 休假发起人 ID 列表,最大 100 个 */ initiator_id_list?: string[] - /** 请假记录的状态 - - 可选值有: - - - 1:已通过 - - - 2:审批中 - - - 3:审批中(更正) - - - 4:审批中(取消休假) - - - 5:审批中(返岗) - - - 6:已返岗 - - - 7:已拒绝 - - - 8:已取消 - - - 9:已撤回 */ + /** + * 请假记录的状态 + * + * 可选值有: + * + * - 1:已通过 + * - 2:审批中 + * - 3:审批中(更正) + * - 4:审批中(取消休假) + * - 5:审批中(返岗) + * - 6:已返岗 + * - 7:已拒绝 + * - 8:已取消 + * - 9:已撤回 + */ leave_request_status?: string[] /** 假期类型 ID 列表,枚举值可通过【获取假期类型列表】接口获取 */ leave_type_id_list?: string[] @@ -24264,6 +24521,21 @@ export interface GetOkrProgressRecordQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type?: string } +export interface UploadOkrImageForm { + /** 图片 */ + data: Blob + /** 图片的目标ID */ + target_id: string + /** + * 图片使用的目标类型 + * + * 可选值有: + * + * - 2:okr的O + * - 3:okr的KR + */ + target_type: 2 | 3 +} export interface CreateHumanAuthenticationIdentityRequest { /** 姓名 */ identity_name: string @@ -24583,6 +24855,18 @@ export interface ListLingoClassificationQuery { /** 词库ID */ repo_id?: string } +export interface UploadLingoFileForm { + /** + * 文件名称,当前仅支持上传图片且图片格式为以下六种:icon、bmp、gif、png、jpeg、webp + * + * 数据校验规则: + * + * - 长度范围:1 字符 ~ 100 字符 + */ + name: string + /** 二进制文件内容,高宽像素在 320-4096 像素之间,大小在 3KB-10MB 的图片 */ + file: Blob +} export interface ListDataSecurityAndComplianceOpenapiLogRequest { /** 飞书开放平台定义的API */ api_keys?: string[] @@ -24886,6 +25170,18 @@ export interface ListBaikeClassificationQuery { /** 分页标记,第一次请求不填,表示从头开始遍历;分页查询结果还有更多项时会同时返回新的 page_token,下次遍历可采用该 page_token 获取查询结果 */ page_token?: string } +export interface UploadBaikeFileForm { + /** + * 文件名称,当前仅支持上传图片且图片格式为以下六种:icon、bmp、gif、png、jpeg、webp + * + * 数据校验规则: + * + * - 长度范围:1 字符 ~ 100 字符 + */ + name: string + /** 二进制文件内容,高宽像素在 320-4096 像素之间,大小在 3KB-10MB 的图片 */ + file: Blob +} export interface ListContactUserQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type?: string @@ -28055,7 +28351,7 @@ Internal.define({ '/auth/v3/app_ticket/resend': { POST: 'appTicketResendAuth', }, -}, false) +}, { noExtractData: true }) Internal.define({ '/event/v1/outbound_ip': { diff --git a/adapters/lark/src/types/internal.ts b/adapters/lark/src/types/internal.ts index 59c62cd6..e6388943 100644 --- a/adapters/lark/src/types/internal.ts +++ b/adapters/lark/src/types/internal.ts @@ -10,7 +10,10 @@ export interface BaseResponse { msg: string } -type Method = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' +export interface InternalConfig { + multipart?: boolean + noExtractData?: boolean +} export class Internal { constructor(private bot: LarkBot) {} @@ -23,10 +26,10 @@ export class Internal { throw error } - static define(routes: Dict>>, extractData = true) { + static define(routes: Dict>>, options: InternalConfig = {}) { for (const path in routes) { for (const key in routes[path]) { - const method = key as Method + const method = key as HTTP.Method for (const name of makeArray(routes[path][method])) { Internal.prototype[name] = async function (this: Internal, ...args: any[]) { const raw = args.join(', ') @@ -42,14 +45,23 @@ export class Internal { config.data = args[0] } } else if (args.length === 2 && method !== 'GET' && method !== 'DELETE') { - config.data = args[0] + if (options.multipart) { + const form = new FormData() + for (const key in args[0]) { + const value = args[0][key] + form.append(key, value, value instanceof File ? value.name : undefined) + } + config.data = form + } else { + config.data = args[0] + } config.params = args[1] } else if (args.length > 1) { throw new Error(`too many arguments for ${path}, received ${raw}`) } const response = await this.bot.http(method, url, config) this.assertResponse(response) - return extractData ? response.data.data : response.data + return options.noExtractData ? response.data : response.data.data } } } From 945b34e7de150934666fe66d91b56229324ed78f Mon Sep 17 00:00:00 2001 From: Shigma Date: Mon, 25 Nov 2024 13:58:30 +0800 Subject: [PATCH 04/10] fix(server): forward error data, status and headers --- packages/server/src/index.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/server/src/index.ts b/packages/server/src/index.ts index 47d617a6..6d53f272 100644 --- a/packages/server/src/index.ts +++ b/packages/server/src/index.ts @@ -121,9 +121,18 @@ class SatoriServer extends Service { koa.status = 404 return } - const result = await bot.internal[name](...koa.request.body) - koa.body = result - koa.status = 200 + try { + const result = await bot.internal[name](...koa.request.body) + koa.body = result + koa.status = 200 + } catch (error) { + if (!ctx.http.isError(error) || !error.response) throw error + koa.status = error.response.status + koa.body = error.response.data + for (const [key, value] of error.response.headers) { + koa.set(key, value) + } + } }) ctx.server.get(path + '/v1/proxy/:url(.+)', async (koa) => { From 2a3be18e8dfaf75fbc46b227addb73b6d8e8f332 Mon Sep 17 00:00:00 2001 From: Shigma Date: Mon, 25 Nov 2024 14:12:28 +0800 Subject: [PATCH 05/10] fix(satori): ensure message.content in json format --- packages/core/src/session.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/core/src/session.ts b/packages/core/src/session.ts index c0e0cdac..bd19bc55 100644 --- a/packages/core/src/session.ts +++ b/packages/core/src/session.ts @@ -1,5 +1,5 @@ import { Channel, Event, GuildMember, Login, Message, User } from '@satorijs/protocol' -import { defineProperty, isNullable } from 'cosmokit' +import { clone, defineProperty, isNullable } from 'cosmokit' import { Context, Service } from 'cordis' import { Bot } from './bot' import h from '@satorijs/element' @@ -138,15 +138,20 @@ export class Session { }, this) } - toJSON(): Event { - return { + toJSON() { + const event: Event = { login: { platform: this.platform, user: { id: this.selfId }, } as Login, - ...this.event, + ...clone(this.event), id: this.id, } + if (event.message?.elements) { + event.message.content = this.content + delete event.message.elements + } + return event } } From af2d019d37ea7f2c00f33fc169b87458cd988915 Mon Sep 17 00:00:00 2001 From: Shigma Date: Mon, 25 Nov 2024 14:12:34 +0800 Subject: [PATCH 06/10] chore: bump versions --- adapters/dingtalk/package.json | 4 ++-- adapters/discord/package.json | 4 ++-- adapters/kook/package.json | 4 ++-- adapters/lark/package.json | 4 ++-- adapters/line/package.json | 4 ++-- adapters/mail/package.json | 4 ++-- adapters/matrix/package.json | 4 ++-- adapters/qq/package.json | 4 ++-- adapters/satori/package.json | 4 ++-- adapters/slack/package.json | 4 ++-- adapters/telegram/package.json | 4 ++-- adapters/wechat-official/package.json | 4 ++-- adapters/wecom/package.json | 4 ++-- adapters/whatsapp/package.json | 4 ++-- adapters/zulip/package.json | 4 ++-- packages/core/package.json | 2 +- packages/satori/package.json | 2 +- packages/server/package.json | 6 +++--- 18 files changed, 35 insertions(+), 35 deletions(-) diff --git a/adapters/dingtalk/package.json b/adapters/dingtalk/package.json index dae07877..c1920436 100644 --- a/adapters/dingtalk/package.json +++ b/adapters/dingtalk/package.json @@ -33,10 +33,10 @@ "devDependencies": { "@cordisjs/plugin-server": "^0.2.4", "@cordisjs/plugin-server-temp": "^0.5.0", - "@satorijs/core": "^4.2.11", + "@satorijs/core": "^4.2.12", "cordis": "^3.18.1" }, "peerDependencies": { - "@satorijs/core": "^4.2.11" + "@satorijs/core": "^4.2.12" } } diff --git a/adapters/discord/package.json b/adapters/discord/package.json index 8812cefd..b57034da 100644 --- a/adapters/discord/package.json +++ b/adapters/discord/package.json @@ -33,10 +33,10 @@ "chat" ], "devDependencies": { - "@satorijs/core": "^4.2.11", + "@satorijs/core": "^4.2.12", "cordis": "^3.18.1" }, "peerDependencies": { - "@satorijs/core": "^4.2.11" + "@satorijs/core": "^4.2.12" } } diff --git a/adapters/kook/package.json b/adapters/kook/package.json index 78b32a1f..716bbc4c 100644 --- a/adapters/kook/package.json +++ b/adapters/kook/package.json @@ -31,10 +31,10 @@ ], "devDependencies": { "@cordisjs/plugin-server": "^0.2.4", - "@satorijs/core": "^4.2.11", + "@satorijs/core": "^4.2.12", "cordis": "^3.18.1" }, "peerDependencies": { - "@satorijs/core": "^4.2.11" + "@satorijs/core": "^4.2.12" } } diff --git a/adapters/lark/package.json b/adapters/lark/package.json index 7f7a12f5..c97a9eb5 100644 --- a/adapters/lark/package.json +++ b/adapters/lark/package.json @@ -35,10 +35,10 @@ ], "devDependencies": { "@cordisjs/plugin-server": "^0.2.4", - "@satorijs/core": "^4.2.11", + "@satorijs/core": "^4.2.12", "cordis": "^3.18.1" }, "peerDependencies": { - "@satorijs/core": "^4.2.11" + "@satorijs/core": "^4.2.12" } } diff --git a/adapters/line/package.json b/adapters/line/package.json index da512248..87a6257f 100644 --- a/adapters/line/package.json +++ b/adapters/line/package.json @@ -31,10 +31,10 @@ ], "devDependencies": { "@cordisjs/plugin-server": "^0.2.4", - "@satorijs/core": "^4.2.11", + "@satorijs/core": "^4.2.12", "cordis": "^3.18.1" }, "peerDependencies": { - "@satorijs/core": "^4.2.11" + "@satorijs/core": "^4.2.12" } } diff --git a/adapters/mail/package.json b/adapters/mail/package.json index 6d266cf5..75668285 100644 --- a/adapters/mail/package.json +++ b/adapters/mail/package.json @@ -32,13 +32,13 @@ "chat" ], "devDependencies": { - "@satorijs/core": "^4.2.11", + "@satorijs/core": "^4.2.12", "@types/node-imap": "^0.9.3", "@types/nodemailer": "^6.4.14", "cordis": "^3.18.1" }, "peerDependencies": { - "@satorijs/core": "^4.2.11" + "@satorijs/core": "^4.2.12" }, "dependencies": { "@types/mailparser": "^3.4.4", diff --git a/adapters/matrix/package.json b/adapters/matrix/package.json index a5d1a6a9..6b1b9b6f 100644 --- a/adapters/matrix/package.json +++ b/adapters/matrix/package.json @@ -29,11 +29,11 @@ ], "devDependencies": { "@cordisjs/plugin-server": "^0.2.4", - "@satorijs/core": "^4.2.11", + "@satorijs/core": "^4.2.12", "cordis": "^3.18.1" }, "peerDependencies": { - "@satorijs/core": "^4.2.11" + "@satorijs/core": "^4.2.12" }, "dependencies": { "html5parser": "^2.0.2", diff --git a/adapters/qq/package.json b/adapters/qq/package.json index 0ed46641..ffdab388 100644 --- a/adapters/qq/package.json +++ b/adapters/qq/package.json @@ -31,10 +31,10 @@ "chat" ], "devDependencies": { - "@satorijs/core": "^4.2.11", + "@satorijs/core": "^4.2.12", "cordis": "^3.18.1" }, "peerDependencies": { - "@satorijs/core": "^4.2.11" + "@satorijs/core": "^4.2.12" } } diff --git a/adapters/satori/package.json b/adapters/satori/package.json index c9d3bf7f..9760cc96 100644 --- a/adapters/satori/package.json +++ b/adapters/satori/package.json @@ -36,10 +36,10 @@ "chat" ], "devDependencies": { - "@satorijs/core": "^4.2.11", + "@satorijs/core": "^4.2.12", "cordis": "^3.18.1" }, "peerDependencies": { - "@satorijs/core": "^4.2.11" + "@satorijs/core": "^4.2.12" } } diff --git a/adapters/slack/package.json b/adapters/slack/package.json index 6d3335dc..af0bc728 100644 --- a/adapters/slack/package.json +++ b/adapters/slack/package.json @@ -31,11 +31,11 @@ ], "devDependencies": { "@cordisjs/plugin-server": "^0.2.4", - "@satorijs/core": "^4.2.11", + "@satorijs/core": "^4.2.12", "cordis": "^3.18.1" }, "peerDependencies": { - "@satorijs/core": "^4.2.11" + "@satorijs/core": "^4.2.12" }, "dependencies": { "@slack/types": "^2.11.0" diff --git a/adapters/telegram/package.json b/adapters/telegram/package.json index 59291f42..c7344d64 100644 --- a/adapters/telegram/package.json +++ b/adapters/telegram/package.json @@ -35,11 +35,11 @@ ], "devDependencies": { "@cordisjs/plugin-server": "^0.2.4", - "@satorijs/core": "^4.2.11", + "@satorijs/core": "^4.2.12", "cordis": "^3.18.1" }, "peerDependencies": { - "@satorijs/core": "^4.2.11" + "@satorijs/core": "^4.2.12" }, "dependencies": { "file-type": "^16.5.4" diff --git a/adapters/wechat-official/package.json b/adapters/wechat-official/package.json index ea5e2946..4ed9cb1c 100644 --- a/adapters/wechat-official/package.json +++ b/adapters/wechat-official/package.json @@ -31,12 +31,12 @@ ], "devDependencies": { "@cordisjs/plugin-server": "^0.2.4", - "@satorijs/core": "^4.2.11", + "@satorijs/core": "^4.2.12", "@types/xml2js": "^0.4.14", "cordis": "^3.18.1" }, "peerDependencies": { - "@satorijs/core": "^4.2.11" + "@satorijs/core": "^4.2.12" }, "dependencies": { "@wecom/crypto": "^1.0.1", diff --git a/adapters/wecom/package.json b/adapters/wecom/package.json index a02bd465..c91d1539 100644 --- a/adapters/wecom/package.json +++ b/adapters/wecom/package.json @@ -31,12 +31,12 @@ ], "devDependencies": { "@cordisjs/plugin-server": "^0.2.4", - "@satorijs/core": "^4.2.11", + "@satorijs/core": "^4.2.12", "@types/xml2js": "^0.4.14", "cordis": "^3.18.1" }, "peerDependencies": { - "@satorijs/core": "^4.2.11" + "@satorijs/core": "^4.2.12" }, "dependencies": { "@wecom/crypto": "^1.0.1", diff --git a/adapters/whatsapp/package.json b/adapters/whatsapp/package.json index e6b38106..7c8d4686 100644 --- a/adapters/whatsapp/package.json +++ b/adapters/whatsapp/package.json @@ -29,10 +29,10 @@ ], "devDependencies": { "@cordisjs/plugin-server": "^0.2.4", - "@satorijs/core": "^4.2.11", + "@satorijs/core": "^4.2.12", "cordis": "^3.18.1" }, "peerDependencies": { - "@satorijs/core": "^4.2.11" + "@satorijs/core": "^4.2.12" } } diff --git a/adapters/zulip/package.json b/adapters/zulip/package.json index a6e5dd3d..7c67a4f1 100644 --- a/adapters/zulip/package.json +++ b/adapters/zulip/package.json @@ -30,11 +30,11 @@ "chat" ], "devDependencies": { - "@satorijs/core": "^4.2.11", + "@satorijs/core": "^4.2.12", "cordis": "^3.18.1" }, "peerDependencies": { - "@satorijs/core": "^4.2.11" + "@satorijs/core": "^4.2.12" }, "dependencies": { "marked": "^9.1.6" diff --git a/packages/core/package.json b/packages/core/package.json index 0fa116b4..d2fe2984 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,7 +1,7 @@ { "name": "@satorijs/core", "description": "Core components of Satorijs", - "version": "4.2.11", + "version": "4.2.12", "type": "module", "main": "lib/index.cjs", "module": "lib/index.mjs", diff --git a/packages/satori/package.json b/packages/satori/package.json index aeda0ca6..4c51e914 100644 --- a/packages/satori/package.json +++ b/packages/satori/package.json @@ -41,7 +41,7 @@ "cordis": "^3.18.1" }, "dependencies": { - "@satorijs/core": "4.2.11", + "@satorijs/core": "4.2.12", "cosmokit": "^1.6.3" } } diff --git a/packages/server/package.json b/packages/server/package.json index af737d50..ef671fc4 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@satorijs/plugin-server", "description": "Basic API server for Satori protocol", - "version": "2.7.2", + "version": "2.7.3", "type": "module", "exports": { ".": { @@ -36,11 +36,11 @@ ], "devDependencies": { "@cordisjs/plugin-server": "^0.2.4", - "@satorijs/core": "^4.2.11", + "@satorijs/core": "^4.2.12", "@types/node": "^22.7.5", "cordis": "^3.18.1" }, "peerDependencies": { - "@satorijs/core": "^4.2.11" + "@satorijs/core": "^4.2.12" } } From ea5156f6e09a60be77fd1f39a4cf4a7c03cc9316 Mon Sep 17 00:00:00 2001 From: Shigma Date: Mon, 25 Nov 2024 15:31:58 +0800 Subject: [PATCH 07/10] feat(lark): support multipart internal apis --- adapters/lark/package.json | 2 +- adapters/lark/src/types/api.ts | 189 ++++++++++++++-------------- adapters/lark/src/types/internal.ts | 33 +++-- 3 files changed, 117 insertions(+), 107 deletions(-) diff --git a/adapters/lark/package.json b/adapters/lark/package.json index c97a9eb5..d55ae951 100644 --- a/adapters/lark/package.json +++ b/adapters/lark/package.json @@ -1,7 +1,7 @@ { "name": "@satorijs/adapter-lark", "description": "Lark (飞书) Adapter for Satorijs", - "version": "3.7.2", + "version": "3.7.4", "type": "module", "main": "lib/index.cjs", "types": "lib/index.d.ts", diff --git a/adapters/lark/src/types/api.ts b/adapters/lark/src/types/api.ts index 5cc263ca..c5c2882c 100644 --- a/adapters/lark/src/types/api.ts +++ b/adapters/lark/src/types/api.ts @@ -28581,15 +28581,9 @@ Internal.define({ '/im/v1/batch_messages/{batch_message_id}/get_progress': { GET: 'getProgressImBatchMessage', }, - '/im/v1/images': { - POST: 'createImImage', - }, '/im/v1/images/{image_key}': { GET: 'getImImage', }, - '/im/v1/files': { - POST: 'createImFile', - }, '/im/v1/files/{file_key}': { GET: 'getImFile', }, @@ -28706,9 +28700,6 @@ Internal.define({ '/drive/v1/files/task_check': { GET: 'taskCheckDrivev1File', }, - '/drive/v1/medias/upload_all': { - POST: 'uploadAllDrivev1Media', - }, '/drive/v1/medias/{file_token}/download': { GET: 'downloadDrivev1Media', }, @@ -28718,9 +28709,6 @@ Internal.define({ '/drive/v1/medias/upload_prepare': { POST: 'uploadPrepareDrivev1Media', }, - '/drive/v1/medias/upload_part': { - POST: 'uploadPartDrivev1Media', - }, '/drive/v1/medias/upload_finish': { POST: 'uploadFinishDrivev1Media', }, @@ -28733,15 +28721,9 @@ Internal.define({ '/drive/v1/files/{file_token}/get_subscribe': { GET: 'getSubscribeDrivev1File', }, - '/drive/v1/files/upload_all': { - POST: 'uploadAllDrivev1File', - }, '/drive/v1/files/upload_prepare': { POST: 'uploadPrepareDrivev1File', }, - '/drive/v1/files/upload_part': { - POST: 'uploadPartDrivev1File', - }, '/drive/v1/files/upload_finish': { POST: 'uploadFinishDrivev1File', }, @@ -29366,9 +29348,6 @@ Internal.define({ '/attendance/v1/user_settings/query': { GET: 'queryAttendanceUserSetting', }, - '/attendance/v1/files/upload': { - POST: 'uploadAttendanceFile', - }, '/attendance/v1/files/{file_id}/download': { GET: 'downloadAttendanceFile', }, @@ -29702,9 +29681,6 @@ Internal.define({ PATCH: 'patchTaskv2Comment', DELETE: 'deleteTaskv2Comment', }, - '/task/v2/attachments/upload': { - POST: 'uploadTaskv2Attachment', - }, '/task/v2/attachments': { GET: 'listTaskv2Attachment', }, @@ -29945,60 +29921,6 @@ Internal.define({ PATCH: 'patchSearchSchema', GET: 'getSearchSchema', }, - '/document_ai/v1/resume/parse': { - POST: 'parseDocumentAiResume', - }, - '/document_ai/v1/vehicle_invoice/recognize': { - POST: 'recognizeDocumentAiVehicleInvoice', - }, - '/document_ai/v1/health_certificate/recognize': { - POST: 'recognizeDocumentAiHealthCertificate', - }, - '/document_ai/v1/hkm_mainland_travel_permit/recognize': { - POST: 'recognizeDocumentAiHkmMainlandTravelPermit', - }, - '/document_ai/v1/tw_mainland_travel_permit/recognize': { - POST: 'recognizeDocumentAiTwMainlandTravelPermit', - }, - '/document_ai/v1/chinese_passport/recognize': { - POST: 'recognizeDocumentAiChinesePassport', - }, - '/document_ai/v1/bank_card/recognize': { - POST: 'recognizeDocumentAiBankCard', - }, - '/document_ai/v1/vehicle_license/recognize': { - POST: 'recognizeDocumentAiVehicleLicense', - }, - '/document_ai/v1/train_invoice/recognize': { - POST: 'recognizeDocumentAiTrainInvoice', - }, - '/document_ai/v1/taxi_invoice/recognize': { - POST: 'recognizeDocumentAiTaxiInvoice', - }, - '/document_ai/v1/id_card/recognize': { - POST: 'recognizeDocumentAiIdCard', - }, - '/document_ai/v1/food_produce_license/recognize': { - POST: 'recognizeDocumentAiFoodProduceLicense', - }, - '/document_ai/v1/food_manage_license/recognize': { - POST: 'recognizeDocumentAiFoodManageLicense', - }, - '/document_ai/v1/driving_license/recognize': { - POST: 'recognizeDocumentAiDrivingLicense', - }, - '/document_ai/v1/vat_invoice/recognize': { - POST: 'recognizeDocumentAiVatInvoice', - }, - '/document_ai/v1/business_license/recognize': { - POST: 'recognizeDocumentAiBusinessLicense', - }, - '/document_ai/v1/contract/field_extraction': { - POST: 'fieldExtractionDocumentAiContract', - }, - '/document_ai/v1/business_card/recognize': { - POST: 'recognizeDocumentAiBusinessCard', - }, '/optical_char_recognition/v1/image/basic_recognize': { POST: 'basicRecognizeOpticalCharRecognitionImage', }, @@ -30043,9 +29965,6 @@ Internal.define({ PUT: 'updateAdminBadge', GET: 'getAdminBadge', }, - '/admin/v1/badge_images': { - POST: 'createAdminBadgeImage', - }, '/admin/v1/badges/{badge_id}/grants': { POST: 'createAdminBadgeGrant', GET: 'listAdminBadgeGrant', @@ -30144,9 +30063,6 @@ Internal.define({ DELETE: 'deleteCorehrPerson', GET: 'getCorehrPerson', }, - '/corehr/v1/persons/upload': { - POST: 'uploadCorehrPerson', - }, '/corehr/v1/files/{id}': { GET: 'getCorehrFile', }, @@ -30604,9 +30520,6 @@ Internal.define({ PUT: 'updateOkrProgressRecord', GET: 'getOkrProgressRecord', }, - '/okr/v1/images/upload': { - POST: 'uploadOkrImage', - }, '/human_authentication/v1/identities': { POST: 'createHumanAuthenticationIdentity', }, @@ -30686,9 +30599,6 @@ Internal.define({ '/lingo/v1/repos': { GET: 'listLingoRepo', }, - '/lingo/v1/files/upload': { - POST: 'uploadLingoFile', - }, '/lingo/v1/files/{file_token}/download': { GET: 'downloadLingoFile', }, @@ -30772,9 +30682,6 @@ Internal.define({ '/baike/v1/classifications': { GET: 'listBaikeClassification', }, - '/baike/v1/files/upload': { - POST: 'uploadBaikeFile', - }, '/baike/v1/files/{file_token}/download': { GET: 'downloadBaikeFile', }, @@ -30824,3 +30731,99 @@ Internal.define({ POST: 'setVcRoomConfig', }, }) + +Internal.define({ + '/im/v1/images': { + POST: 'createImImage', + }, + '/im/v1/files': { + POST: 'createImFile', + }, + '/drive/v1/medias/upload_all': { + POST: 'uploadAllDrivev1Media', + }, + '/drive/v1/medias/upload_part': { + POST: 'uploadPartDrivev1Media', + }, + '/drive/v1/files/upload_all': { + POST: 'uploadAllDrivev1File', + }, + '/drive/v1/files/upload_part': { + POST: 'uploadPartDrivev1File', + }, + '/attendance/v1/files/upload': { + POST: 'uploadAttendanceFile', + }, + '/task/v2/attachments/upload': { + POST: 'uploadTaskv2Attachment', + }, + '/document_ai/v1/resume/parse': { + POST: 'parseDocumentAiResume', + }, + '/document_ai/v1/vehicle_invoice/recognize': { + POST: 'recognizeDocumentAiVehicleInvoice', + }, + '/document_ai/v1/health_certificate/recognize': { + POST: 'recognizeDocumentAiHealthCertificate', + }, + '/document_ai/v1/hkm_mainland_travel_permit/recognize': { + POST: 'recognizeDocumentAiHkmMainlandTravelPermit', + }, + '/document_ai/v1/tw_mainland_travel_permit/recognize': { + POST: 'recognizeDocumentAiTwMainlandTravelPermit', + }, + '/document_ai/v1/chinese_passport/recognize': { + POST: 'recognizeDocumentAiChinesePassport', + }, + '/document_ai/v1/bank_card/recognize': { + POST: 'recognizeDocumentAiBankCard', + }, + '/document_ai/v1/vehicle_license/recognize': { + POST: 'recognizeDocumentAiVehicleLicense', + }, + '/document_ai/v1/train_invoice/recognize': { + POST: 'recognizeDocumentAiTrainInvoice', + }, + '/document_ai/v1/taxi_invoice/recognize': { + POST: 'recognizeDocumentAiTaxiInvoice', + }, + '/document_ai/v1/id_card/recognize': { + POST: 'recognizeDocumentAiIdCard', + }, + '/document_ai/v1/food_produce_license/recognize': { + POST: 'recognizeDocumentAiFoodProduceLicense', + }, + '/document_ai/v1/food_manage_license/recognize': { + POST: 'recognizeDocumentAiFoodManageLicense', + }, + '/document_ai/v1/driving_license/recognize': { + POST: 'recognizeDocumentAiDrivingLicense', + }, + '/document_ai/v1/vat_invoice/recognize': { + POST: 'recognizeDocumentAiVatInvoice', + }, + '/document_ai/v1/business_license/recognize': { + POST: 'recognizeDocumentAiBusinessLicense', + }, + '/document_ai/v1/contract/field_extraction': { + POST: 'fieldExtractionDocumentAiContract', + }, + '/document_ai/v1/business_card/recognize': { + POST: 'recognizeDocumentAiBusinessCard', + }, + '/admin/v1/badge_images': { + POST: 'createAdminBadgeImage', + }, + '/corehr/v1/persons/upload': { + POST: 'uploadCorehrPerson', + }, + '/okr/v1/images/upload': { + POST: 'uploadOkrImage', + }, + '/lingo/v1/files/upload': { + POST: 'uploadLingoFile', + }, + '/baike/v1/files/upload': { + POST: 'uploadBaikeFile', + }, +}, { multipart: true }) diff --git a/adapters/lark/src/types/internal.ts b/adapters/lark/src/types/internal.ts index e6388943..cbd1fd02 100644 --- a/adapters/lark/src/types/internal.ts +++ b/adapters/lark/src/types/internal.ts @@ -18,7 +18,7 @@ export interface InternalConfig { export class Internal { constructor(private bot: LarkBot) {} - private assertResponse(response: HTTP.Response) { + private _assertResponse(response: HTTP.Response) { if (!response.data.code) return this.bot.logger.debug('response: %o', response.data) const error = new HTTP.Error(`request failed`) @@ -26,6 +26,22 @@ export class Internal { throw error } + private _buildData(arg: object, options: InternalConfig) { + if (options.multipart) { + const form = new FormData() + for (const [key, value] of Object.entries(arg)) { + if (value instanceof File) { + form.append(key, value, value.name) + } else { + form.append(key, value) + } + } + return form + } else { + return arg + } + } + static define(routes: Dict>>, options: InternalConfig = {}) { for (const path in routes) { for (const key in routes[path]) { @@ -42,25 +58,16 @@ export class Internal { if (method === 'GET' || method === 'DELETE') { config.params = args[0] } else { - config.data = args[0] + config.data = this._buildData(args[0], options) } } else if (args.length === 2 && method !== 'GET' && method !== 'DELETE') { - if (options.multipart) { - const form = new FormData() - for (const key in args[0]) { - const value = args[0][key] - form.append(key, value, value instanceof File ? value.name : undefined) - } - config.data = form - } else { - config.data = args[0] - } + config.data = this._buildData(args[0], options) config.params = args[1] } else if (args.length > 1) { throw new Error(`too many arguments for ${path}, received ${raw}`) } const response = await this.bot.http(method, url, config) - this.assertResponse(response) + this._assertResponse(response) return options.noExtractData ? response.data : response.data.data } } From c9fa47cfe0ea4a3f1d4f90108a2732d1b5ad6bad Mon Sep 17 00:00:00 2001 From: Shigma Date: Mon, 25 Nov 2024 15:32:34 +0800 Subject: [PATCH 08/10] feat(satori): support blobs in internal apis --- adapters/satori/package.json | 2 +- adapters/satori/src/bot.ts | 32 ++++++++++++++++++++++++++++++-- packages/server/package.json | 2 +- packages/server/src/index.ts | 32 ++++++++++++++++++++++++++++++-- 4 files changed, 62 insertions(+), 6 deletions(-) diff --git a/adapters/satori/package.json b/adapters/satori/package.json index 9760cc96..ef139da3 100644 --- a/adapters/satori/package.json +++ b/adapters/satori/package.json @@ -1,7 +1,7 @@ { "name": "@satorijs/adapter-satori", "description": "Satori Adapter for Satorijs", - "version": "1.3.1", + "version": "1.4.0", "type": "module", "exports": { ".": { diff --git a/adapters/satori/src/bot.ts b/adapters/satori/src/bot.ts index 0940fc40..8896dd4f 100644 --- a/adapters/satori/src/bot.ts +++ b/adapters/satori/src/bot.ts @@ -1,4 +1,4 @@ -import { Bot, camelCase, Context, h, HTTP, snakeCase, Universal } from '@satorijs/core' +import { Bot, camelCase, Context, Dict, h, HTTP, snakeCase, Universal, valueMap } from '@satorijs/core' export function transformKey(source: any, callback: (key: string) => string) { if (!source || typeof source !== 'object') return source @@ -9,12 +9,40 @@ export function transformKey(source: any, callback: (key: string) => string) { })) } +function serialize(data: any, path: string, blobs: Dict) { + if (!data || typeof data !== 'object') return data + if (data instanceof Blob) { + blobs[path] = data + return null + } + if (Array.isArray(data)) { + return data.map((value, index) => serialize(value, `${path}.${index}`, blobs)) + } + return valueMap(data, (value, key) => { + return serialize(value, `${path}.${key}`, blobs) + }) +} + function createInternal(bot: SatoriBot, prefix = '') { return new Proxy(() => {}, { apply(target, thisArg, args) { const key = snakeCase(prefix.slice(1)) bot.logger.debug('[request.internal]', key, args) - return bot.http.post('/v1/internal/' + key, args) + const blobs: Dict = Object.create(null) + const data = serialize(args, '$', blobs) + if (!Object.keys(blobs).length) { + return bot.http.post('/v1/internal/' + key, args) + } + const form = new FormData() + form.append('$', new Blob([JSON.stringify(data)], { type: 'application/json' })) + for (const [key, value] of Object.entries(blobs)) { + if (value instanceof File) { + form.append(key, value, value.name) + } else { + form.append(key, value) + } + } + return bot.http.post('/v1/internal/' + key, form) }, get(target, key, receiver) { if (typeof key === 'symbol' || key in target) { diff --git a/packages/server/package.json b/packages/server/package.json index ef671fc4..31bd5aa2 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@satorijs/plugin-server", "description": "Basic API server for Satori protocol", - "version": "2.7.3", + "version": "2.8.0", "type": "module", "exports": { ".": { diff --git a/packages/server/src/index.ts b/packages/server/src/index.ts index 6d53f272..f2370fde 100644 --- a/packages/server/src/index.ts +++ b/packages/server/src/index.ts @@ -1,4 +1,4 @@ -import { Binary, camelCase, Context, makeArray, sanitize, Schema, Service, Session, snakeCase, Time, Universal } from '@satorijs/core' +import { Binary, camelCase, Context, Dict, makeArray, sanitize, Schema, Service, Session, snakeCase, Time, Universal, valueMap } from '@satorijs/core' import {} from '@cordisjs/plugin-server' import WebSocket from 'ws' import { Readable } from 'node:stream' @@ -33,6 +33,17 @@ function transformKey(source: any, callback: (key: string) => string) { })) } +function deserialize(data: any, path: string, blobs: Dict) { + if (path in blobs) return blobs[path] + if (!data || typeof data !== 'object') return data + if (Array.isArray(data)) { + return data.map((value, index) => deserialize(value, `${path}.${index}`, blobs)) + } + return valueMap(data, (value, key) => { + return deserialize(value, `${path}.${key}`, blobs) + }) +} + class SatoriServer extends Service { static inject = ['server', 'http'] @@ -122,7 +133,21 @@ class SatoriServer extends Service { return } try { - const result = await bot.internal[name](...koa.request.body) + let args = koa.request.body + if (koa.request.files) { + const blobs: Dict = Object.create(null) + const { $, ...files } = koa.request.files + const [json] = await Promise.all([ + readFile(makeArray($)[0].filepath, 'utf8'), + Promise.all(Object.entries(files).map(async ([key, value]) => { + value = makeArray(value)[0] + const buffer = await readFile(value.filepath) + return [key, new File([buffer], value.originalFilename!, { type: value.mimetype! })] + })), + ]) + args = deserialize(JSON.parse(json), '$', blobs) + } + const result = await bot.internal[name](...args) koa.body = result koa.status = 200 } catch (error) { @@ -171,6 +196,9 @@ class SatoriServer extends Service { if (!ctx.http.isError(error) || !error.response) throw error koa.status = error.response.status koa.body = error.response.data + for (const [key, value] of error.response.headers) { + koa.set(key, value) + } } } }) From fab90c8750834cd88a791bd924e7a265b93ede0d Mon Sep 17 00:00:00 2001 From: Shigma Date: Mon, 25 Nov 2024 15:58:52 +0800 Subject: [PATCH 09/10] chore: set yarn berry --- .github/workflows/build.yaml | 12 +++++++++--- .yarnrc.yml | 1 + package.json | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 .yarnrc.yml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1612b508..2a072b2c 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -13,8 +13,10 @@ jobs: uses: actions/checkout@v4 - name: Set up Node uses: actions/setup-node@v4 + - name: Enable Corepack + run: corepack enable - name: Install - run: yarn + run: yarn --no-immutable - name: Lint run: yarn lint @@ -26,8 +28,10 @@ jobs: uses: actions/checkout@v4 - name: Set up Node uses: actions/setup-node@v4 + - name: Enable Corepack + run: corepack enable - name: Install - run: yarn + run: yarn --no-immutable - name: Build run: yarn build @@ -46,8 +50,10 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} + - name: Enable Corepack + run: corepack enable - name: Install - run: yarn + run: yarn --no-immutable - name: Unit Test run: yarn test:json - name: Report Coverage diff --git a/.yarnrc.yml b/.yarnrc.yml new file mode 100644 index 00000000..3186f3f0 --- /dev/null +++ b/.yarnrc.yml @@ -0,0 +1 @@ +nodeLinker: node-modules diff --git a/package.json b/package.json index cb89f867..eb61a9fd 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "1.0.0", "type": "module", "private": true, - "packageManager": "yarn@1.22.19", + "packageManager": "yarn@4.5.2", "workspaces": [ "docs", "external/*", From 8b20e2a46c9ba0a20799d94700a311ac8ddcb50c Mon Sep 17 00:00:00 2001 From: Shigma Date: Mon, 25 Nov 2024 17:00:47 +0800 Subject: [PATCH 10/10] feat(satori): enhance blob support for internal api --- adapters/satori/package.json | 2 +- adapters/satori/src/bot.ts | 2 +- packages/server/package.json | 2 +- packages/server/src/index.ts | 17 ++++++----------- 4 files changed, 9 insertions(+), 14 deletions(-) diff --git a/adapters/satori/package.json b/adapters/satori/package.json index ef139da3..136d018d 100644 --- a/adapters/satori/package.json +++ b/adapters/satori/package.json @@ -1,7 +1,7 @@ { "name": "@satorijs/adapter-satori", "description": "Satori Adapter for Satorijs", - "version": "1.4.0", + "version": "1.4.1", "type": "module", "exports": { ".": { diff --git a/adapters/satori/src/bot.ts b/adapters/satori/src/bot.ts index 8896dd4f..e96785bc 100644 --- a/adapters/satori/src/bot.ts +++ b/adapters/satori/src/bot.ts @@ -34,7 +34,7 @@ function createInternal(bot: SatoriBot, prefix = '') { return bot.http.post('/v1/internal/' + key, args) } const form = new FormData() - form.append('$', new Blob([JSON.stringify(data)], { type: 'application/json' })) + form.append('$', JSON.stringify(data)) for (const [key, value] of Object.entries(blobs)) { if (value instanceof File) { form.append(key, value, value.name) diff --git a/packages/server/package.json b/packages/server/package.json index 31bd5aa2..86f49f04 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,7 +1,7 @@ { "name": "@satorijs/plugin-server", "description": "Basic API server for Satori protocol", - "version": "2.8.0", + "version": "2.8.2", "type": "module", "exports": { ".": { diff --git a/packages/server/src/index.ts b/packages/server/src/index.ts index f2370fde..79ca76ba 100644 --- a/packages/server/src/index.ts +++ b/packages/server/src/index.ts @@ -135,17 +135,12 @@ class SatoriServer extends Service { try { let args = koa.request.body if (koa.request.files) { - const blobs: Dict = Object.create(null) - const { $, ...files } = koa.request.files - const [json] = await Promise.all([ - readFile(makeArray($)[0].filepath, 'utf8'), - Promise.all(Object.entries(files).map(async ([key, value]) => { - value = makeArray(value)[0] - const buffer = await readFile(value.filepath) - return [key, new File([buffer], value.originalFilename!, { type: value.mimetype! })] - })), - ]) - args = deserialize(JSON.parse(json), '$', blobs) + const blobs = Object.fromEntries(await Promise.all(Object.entries(koa.request.files).map(async ([key, value]) => { + value = makeArray(value)[0] + const buffer = await readFile(value.filepath) + return [key, new File([buffer], value.originalFilename!, { type: value.mimetype! })] as const + }))) + args = deserialize(JSON.parse(koa.request.body.$), '$', blobs) } const result = await bot.internal[name](...args) koa.body = result