From 03d255c55d526283a91598f0e313af9586b34bd4 Mon Sep 17 00:00:00 2001 From: Shigma Date: Tue, 7 Jan 2025 10:42:26 +0800 Subject: [PATCH] feat(lark): support async iterator --- adapters/lark/scripts/types.ts | 63 +- adapters/lark/src/internal.ts | 27 + adapters/lark/src/types/acs.ts | 22 +- adapters/lark/src/types/admin.ts | 55 +- adapters/lark/src/types/aily.ts | 57 +- adapters/lark/src/types/application.ts | 60 +- adapters/lark/src/types/approval.ts | 43 +- adapters/lark/src/types/attendance.ts | 47 +- adapters/lark/src/types/baike.ts | 13 +- adapters/lark/src/types/bitable.ts | 53 +- adapters/lark/src/types/calendar.ts | 61 +- adapters/lark/src/types/compensation.ts | 70 ++- adapters/lark/src/types/contact.ts | 207 ++++-- adapters/lark/src/types/corehr.ts | 625 ++++++++++++------- adapters/lark/src/types/docx.ts | 44 +- adapters/lark/src/types/drive.ts | 75 ++- adapters/lark/src/types/ehr.ts | 11 +- adapters/lark/src/types/event.ts | 12 +- adapters/lark/src/types/helpdesk.ts | 36 +- adapters/lark/src/types/hire.ts | 588 +++++++++++------ adapters/lark/src/types/im.ts | 74 ++- adapters/lark/src/types/lingo.ts | 33 +- adapters/lark/src/types/mail.ts | 72 ++- adapters/lark/src/types/okr.ts | 12 +- adapters/lark/src/types/payroll.ts | 39 +- adapters/lark/src/types/performance.ts | 84 ++- adapters/lark/src/types/personal_settings.ts | 12 +- adapters/lark/src/types/search.ts | 33 +- adapters/lark/src/types/task.ts | 155 +++-- adapters/lark/src/types/vc.ts | 88 ++- adapters/lark/src/types/wiki.ts | 46 +- adapters/lark/src/types/workplace.ts | 33 +- 32 files changed, 1901 insertions(+), 949 deletions(-) diff --git a/adapters/lark/scripts/types.ts b/adapters/lark/scripts/types.ts index 999460c9..e07066b9 100644 --- a/adapters/lark/scripts/types.ts +++ b/adapters/lark/scripts/types.ts @@ -228,6 +228,7 @@ async function start() { const extras: string[] = [] let returnType = `${apiType}Response` + let paginationRequest: { queryType?: string } | undefined for (const property of detail.request.path?.properties || []) { args.push(`${property.name}: ${formatType(property, project.imports)}`) } @@ -242,20 +243,27 @@ async function start() { args.push(`body: ${name}`) } if (detail.request.query?.properties?.length) { - const name = `${apiType}Query` + let queryType = `${apiType}Query` const keys = detail.request.query.properties.map(s => s.name) if (keys.includes('page_token') && keys.includes('page_size')) { const properties = detail.request.query.properties.filter(s => s.name !== 'page_token' && s.name !== 'page_size') - project.requests.push(`export interface ${name} extends Pagination {\n${generateParams(properties, project.imports)}}`) + if (properties.length) { + project.requests.push(`export interface ${queryType} {\n${generateParams(properties, project.imports)}}`) + paginationRequest = { queryType } + queryType = `${queryType} & Pagination` + } else { + queryType = 'Pagination' + paginationRequest = {} + } project.internalImports.add('Pagination') } else { - project.requests.push(`export interface ${name} {\n${generateParams(detail.request.query.properties, project.imports)}}`) + project.requests.push(`export interface ${queryType} {\n${generateParams(detail.request.query.properties, project.imports)}}`) } - args.push(`query?: ${name}`) + args.push(`query?: ${queryType}`) } + let paginationResponse: { innerType: string; tokenKey: string; itemsKey: string } | undefined if (detail.supportFileDownload) { - // detail.response.contentType === '' returnType = 'ArrayBuffer' extras.push(`type: 'binary'`) } else { @@ -271,23 +279,25 @@ async function start() { returnType = 'void' } else { const keys = (data.properties || []).map(v => v.name) - let pagination: [string, Schema] | undefined - if (keys.includes('has_more') && keys.includes('page_token') && keys.length === 3) { - const list = (data.properties || []).find(v => v.name !== 'has_more' && v.name !== 'page_token')! + let pagination: [string, string, Schema] | undefined + if (keys.includes('has_more') && (keys.includes('page_token') || keys.includes('next_page_token')) && keys.length === 3) { + const list = (data.properties || []).find(v => !['has_more', 'page_token', 'next_page_token'].includes(v.name))! if (list.type === 'list') { - pagination = [list.name, list.items!] + const tokenKey = keys.includes('page_token') ? 'page_token' : 'next_page_token' + pagination = [list.name, tokenKey, list.items!] } } if (pagination) { - const [key, item] = pagination - let inner = formatType(item, project.imports) - if (item.type === 'object' && item.properties && !item.ref) { + const [itemsKey, tokenKey, schema] = pagination + let innerType = formatType(schema, project.imports) + if (schema.type === 'object' && schema.properties && !schema.ref) { const name = `${apiType}Item` - project.responses.push(`export interface ${name} ${inner}`) - inner = name + project.responses.push(`export interface ${name} ${innerType}`) + innerType = name } - returnType = key === 'items' ? `Paginated<${inner}>` : `Paginated<${inner}, '${key}'>` + returnType = itemsKey === 'items' ? `Paginated<${innerType}>` : `Paginated<${innerType}, '${itemsKey}'>` project.internalImports.add('Paginated') + paginationResponse = { innerType, tokenKey, itemsKey } } else { if (detail.pagination) { console.log(`unsupported pagination (${keys.join(', ')}), see https://open.feishu.cn${summary.fullPath}}`) @@ -309,6 +319,29 @@ async function start() { ${method}(${args.join(', ')}): Promise<${returnType}> `) + if (paginationRequest && paginationResponse) { + const paginationArgs = args.slice(0, -1) + const argIndex = paginationArgs.length + if (paginationRequest.queryType) { + paginationArgs.push(`query?: ${paginationRequest.queryType}`) + } + project.methods.push(dedent` + /** + * ${summary.name} + * @see https://open.feishu.cn${summary.fullPath} + */ + ${method}Iter(${paginationArgs.join(', ')}): AsyncIterator<${paginationResponse.innerType}> + `) + const props: string[] = [`argIndex: ${argIndex}`] + if (paginationResponse.itemsKey !== 'items') { + props.push(`itemsKey: '${paginationResponse.itemsKey}'`) + } + if (paginationResponse.tokenKey !== 'page_token') { + props.push(`tokenKey: '${paginationResponse.tokenKey}'`) + } + extras.push(`pagination: { ${props.join(', ')} }`) + } + const path = detail.apiPath.replace(/:([0-9a-zA-Z_]+)/g, '{$1}') project.defines[path] ||= {} project.defines[path][detail.httpMethod] = extras.length diff --git a/adapters/lark/src/internal.ts b/adapters/lark/src/internal.ts index 8861dadc..9e2a90b9 100644 --- a/adapters/lark/src/internal.ts +++ b/adapters/lark/src/internal.ts @@ -24,6 +24,11 @@ export type Paginated = { export interface InternalRoute { name: string + pagination?: { + argIndex: number + itemsKey?: string + tokenKey?: string + } multipart?: boolean type?: 'raw-json' | 'binary' } @@ -93,6 +98,28 @@ export class Internal { return response.data.data } } + + if (route.pagination) { + const { argIndex, itemsKey = 'items', tokenKey = 'page_token' } = route.pagination + Internal.prototype[route.name + 'Iter'] = async function (this: Internal, ...args: any[]) { + let list: Paginated + const getList = async () => { + args[argIndex] = { ...args[argIndex], page_token: list?.[tokenKey] } + list = await this[route.name](...args) + } + return { + async next() { + if (list?.[itemsKey].length) return { done: false, value: list[itemsKey].shift() } + if (!list.has_more) return { done: true, value: undefined } + await getList() + return this.next() + }, + [Symbol.asyncIterator]() { + return this + }, + } + } + } } } } diff --git a/adapters/lark/src/types/acs.ts b/adapters/lark/src/types/acs.ts index a9bb16f9..a9a44199 100644 --- a/adapters/lark/src/types/acs.ts +++ b/adapters/lark/src/types/acs.ts @@ -17,7 +17,12 @@ declare module '../internal' { * 获取用户列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/acs-v1/user/list */ - listAcsUser(query?: ListAcsUserQuery): Promise> + listAcsUser(query?: ListAcsUserQuery & Pagination): Promise> + /** + * 获取用户列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/acs-v1/user/list + */ + listAcsUserIter(query?: ListAcsUserQuery): AsyncIterator /** * 上传人脸图片 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/acs-v1/user-face/update @@ -67,7 +72,12 @@ declare module '../internal' { * 获取门禁记录列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/acs-v1/access_record/list */ - listAcsAccessRecord(query?: ListAcsAccessRecordQuery): Promise> + listAcsAccessRecord(query?: ListAcsAccessRecordQuery & Pagination): Promise> + /** + * 获取门禁记录列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/acs-v1/access_record/list + */ + listAcsAccessRecordIter(query?: ListAcsAccessRecordQuery): AsyncIterator /** * 下载开门时的人脸识别图片 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/acs-v1/access_record-access_photo/get @@ -91,7 +101,7 @@ export interface GetAcsUserQuery { user_id_type?: 'user_id' | 'union_id' | 'open_id' } -export interface ListAcsUserQuery extends Pagination { +export interface ListAcsUserQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' } @@ -163,7 +173,7 @@ export interface CreateAcsVisitorQuery { user_id_type?: 'user_id' | 'union_id' | 'open_id' } -export interface ListAcsAccessRecordQuery extends Pagination { +export interface ListAcsAccessRecordQuery { /** 记录开始时间,单位秒 */ from: number /** 记录结束时间,单位秒,时间跨度不能超过30天 */ @@ -204,7 +214,7 @@ Internal.define({ GET: 'getAcsUser', }, '/open-apis/acs/v1/users': { - GET: 'listAcsUser', + GET: { name: 'listAcsUser', pagination: { argIndex: 0 } }, }, '/open-apis/acs/v1/users/{user_id}/face': { PUT: { name: 'updateAcsUserFace', multipart: true }, @@ -228,7 +238,7 @@ Internal.define({ GET: 'listAcsDevice', }, '/open-apis/acs/v1/access_records': { - GET: 'listAcsAccessRecord', + GET: { name: 'listAcsAccessRecord', pagination: { argIndex: 0 } }, }, '/open-apis/acs/v1/access_records/{access_record_id}/access_photo': { GET: { name: 'getAcsAccessRecordAccessPhoto', type: 'binary' }, diff --git a/adapters/lark/src/types/admin.ts b/adapters/lark/src/types/admin.ts index f20e31f0..0659b282 100644 --- a/adapters/lark/src/types/admin.ts +++ b/adapters/lark/src/types/admin.ts @@ -12,12 +12,22 @@ declare module '../internal' { * 获取部门维度的用户活跃和功能使用数据 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/admin_dept_stat/list */ - listAdminAdminDeptStat(query?: ListAdminAdminDeptStatQuery): Promise> + listAdminAdminDeptStat(query?: ListAdminAdminDeptStatQuery & Pagination): Promise> + /** + * 获取部门维度的用户活跃和功能使用数据 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/admin_dept_stat/list + */ + listAdminAdminDeptStatIter(query?: ListAdminAdminDeptStatQuery): AsyncIterator + /** + * 获取用户维度的用户活跃和功能使用数据 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/admin_user_stat/list + */ + listAdminAdminUserStat(query?: ListAdminAdminUserStatQuery & Pagination): Promise> /** * 获取用户维度的用户活跃和功能使用数据 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/admin_user_stat/list */ - listAdminAdminUserStat(query?: ListAdminAdminUserStatQuery): Promise> + listAdminAdminUserStatIter(query?: ListAdminAdminUserStatQuery): AsyncIterator /** * 创建勋章 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge/create @@ -37,7 +47,12 @@ declare module '../internal' { * 获取勋章列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge/list */ - listAdminBadge(query?: ListAdminBadgeQuery): Promise> + listAdminBadge(query?: ListAdminBadgeQuery & Pagination): Promise> + /** + * 获取勋章列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge/list + */ + listAdminBadgeIter(query?: ListAdminBadgeQuery): AsyncIterator /** * 获取勋章详情 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge/get @@ -62,7 +77,12 @@ declare module '../internal' { * 获取授予名单列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge-grant/list */ - listAdminBadgeGrant(badge_id: string, query?: ListAdminBadgeGrantQuery): Promise> + listAdminBadgeGrant(badge_id: string, query?: ListAdminBadgeGrantQuery & Pagination): Promise> + /** + * 获取授予名单列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge-grant/list + */ + listAdminBadgeGrantIter(badge_id: string, query?: ListAdminBadgeGrantQuery): AsyncIterator /** * 获取授予名单详情 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/admin-v1/badge-grant/get @@ -72,7 +92,12 @@ declare module '../internal' { * 获取行为审计日志数据 * @see https://open.feishu.cn/document/ukTMukTMukTM/uQjM5YjL0ITO24CNykjN/audit_log/audit_data_get */ - listAdminAuditInfo(query?: ListAdminAuditInfoQuery): Promise> + listAdminAuditInfo(query?: ListAdminAuditInfoQuery & Pagination): Promise> + /** + * 获取行为审计日志数据 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uQjM5YjL0ITO24CNykjN/audit_log/audit_data_get + */ + listAdminAuditInfoIter(query?: ListAdminAuditInfoQuery): AsyncIterator } } @@ -88,7 +113,7 @@ export interface ResetAdminPasswordQuery { user_id_type: 'open_id' | 'union_id' | 'user_id' } -export interface ListAdminAdminDeptStatQuery extends Pagination { +export interface ListAdminAdminDeptStatQuery { /** 部门ID类型 */ department_id_type: 'department_id' | 'open_department_id' /** 起始日期(包含),格式是YYYY-mm-dd */ @@ -105,7 +130,7 @@ export interface ListAdminAdminDeptStatQuery extends Pagination { with_product_version?: boolean } -export interface ListAdminAdminUserStatQuery extends Pagination { +export interface ListAdminAdminUserStatQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' /** 部门ID类型 */ @@ -159,7 +184,7 @@ export interface CreateAdminBadgeImageForm { image_type: 1 | 2 } -export interface ListAdminBadgeQuery extends Pagination { +export interface ListAdminBadgeQuery { /** 租户内唯一的勋章名称,精确匹配。 */ name?: string } @@ -216,7 +241,7 @@ export interface UpdateAdminBadgeGrantQuery { department_id_type?: 'department_id' | 'open_department_id' } -export interface ListAdminBadgeGrantQuery extends Pagination { +export interface ListAdminBadgeGrantQuery { /** 用户 ID 类型 */ user_id_type?: 'open_id' | 'union_id' | 'user_id' /** 此次调用中使用的部门ID的类型。 */ @@ -232,7 +257,7 @@ export interface GetAdminBadgeGrantQuery { department_id_type?: 'department_id' | 'open_department_id' } -export interface ListAdminAuditInfoQuery extends Pagination { +export interface ListAdminAuditInfoQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' /** 日志时间范围: 结束时间. 格式: 秒级时间戳. 默认值: 此刻 */ @@ -297,14 +322,14 @@ Internal.define({ POST: 'resetAdminPassword', }, '/open-apis/admin/v1/admin_dept_stats': { - GET: 'listAdminAdminDeptStat', + GET: { name: 'listAdminAdminDeptStat', pagination: { argIndex: 0 } }, }, '/open-apis/admin/v1/admin_user_stats': { - GET: 'listAdminAdminUserStat', + GET: { name: 'listAdminAdminUserStat', pagination: { argIndex: 0 } }, }, '/open-apis/admin/v1/badges': { POST: 'createAdminBadge', - GET: 'listAdminBadge', + GET: { name: 'listAdminBadge', pagination: { argIndex: 0, itemsKey: 'badges' } }, }, '/open-apis/admin/v1/badges/{badge_id}': { PUT: 'updateAdminBadge', @@ -315,7 +340,7 @@ Internal.define({ }, '/open-apis/admin/v1/badges/{badge_id}/grants': { POST: 'createAdminBadgeGrant', - GET: 'listAdminBadgeGrant', + GET: { name: 'listAdminBadgeGrant', pagination: { argIndex: 1, itemsKey: 'grants' } }, }, '/open-apis/admin/v1/badges/{badge_id}/grants/{grant_id}': { DELETE: 'deleteAdminBadgeGrant', @@ -323,6 +348,6 @@ Internal.define({ GET: 'getAdminBadgeGrant', }, '/open-apis/admin/v1/audit_infos': { - GET: 'listAdminAuditInfo', + GET: { name: 'listAdminAuditInfo', pagination: { argIndex: 0 } }, }, }) diff --git a/adapters/lark/src/types/aily.ts b/adapters/lark/src/types/aily.ts index ef236717..6d02f505 100644 --- a/adapters/lark/src/types/aily.ts +++ b/adapters/lark/src/types/aily.ts @@ -37,7 +37,12 @@ declare module '../internal' { * 列出智能伙伴消息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/aily_session-aily_message/list */ - listAilyAilySessionAilyMessage(aily_session_id: string, query?: ListAilyAilySessionAilyMessageQuery): Promise> + listAilyAilySessionAilyMessage(aily_session_id: string, query?: ListAilyAilySessionAilyMessageQuery & Pagination): Promise> + /** + * 列出智能伙伴消息 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/aily_session-aily_message/list + */ + listAilyAilySessionAilyMessageIter(aily_session_id: string, query?: ListAilyAilySessionAilyMessageQuery): AsyncIterator /** * 创建运行 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/aily_session-run/create @@ -52,7 +57,12 @@ declare module '../internal' { * 列出运行 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/aily_session-run/list */ - listAilyAilySessionRun(aily_session_id: string, query?: ListAilyAilySessionRunQuery): Promise> + listAilyAilySessionRun(aily_session_id: string, query?: Pagination): Promise> + /** + * 列出运行 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/aily_session-run/list + */ + listAilyAilySessionRunIter(aily_session_id: string): AsyncIterator /** * 取消运行 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/aily_session-run/cancel @@ -72,7 +82,12 @@ declare module '../internal' { * 查询技能列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/app-skill/list */ - listAilyAppSkill(app_id: string, query?: ListAilyAppSkillQuery): Promise> + listAilyAppSkill(app_id: string, query?: Pagination): Promise> + /** + * 查询技能列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/app-skill/list + */ + listAilyAppSkillIter(app_id: string): AsyncIterator /** * 执行数据知识问答 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/app-knowledge/ask @@ -82,12 +97,22 @@ declare module '../internal' { * 查询数据知识列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/app-data_asset/list */ - listAilyAppDataAsset(app_id: string, query?: ListAilyAppDataAssetQuery): Promise> + listAilyAppDataAsset(app_id: string, query?: ListAilyAppDataAssetQuery & Pagination): Promise> + /** + * 查询数据知识列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/app-data_asset/list + */ + listAilyAppDataAssetIter(app_id: string, query?: ListAilyAppDataAssetQuery): AsyncIterator + /** + * 获取数据知识分类列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/app-data_asset_tag/list + */ + listAilyAppDataAssetTag(app_id: string, query?: ListAilyAppDataAssetTagQuery & Pagination): Promise> /** * 获取数据知识分类列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/aily-v1/app-data_asset_tag/list */ - listAilyAppDataAssetTag(app_id: string, query?: ListAilyAppDataAssetTagQuery): Promise> + listAilyAppDataAssetTagIter(app_id: string, query?: ListAilyAppDataAssetTagQuery): AsyncIterator } } @@ -120,7 +145,7 @@ export interface CreateAilyAilySessionAilyMessageRequest { mentions?: AilyMention[] } -export interface ListAilyAilySessionAilyMessageQuery extends Pagination { +export interface ListAilyAilySessionAilyMessageQuery { /** 运行 ID */ run_id?: string /** 返回生成中的消息 */ @@ -138,9 +163,6 @@ export interface CreateAilyAilySessionRunRequest { metadata?: string } -export interface ListAilyAilySessionRunQuery extends Pagination { -} - export interface StartAilyAppSkillRequest { /** 技能的全局变量 */ global_variable?: SkillGlobalVariable @@ -148,9 +170,6 @@ export interface StartAilyAppSkillRequest { input?: string } -export interface ListAilyAppSkillQuery extends Pagination { -} - export interface AskAilyAppKnowledgeRequest { /** 输入消息(当前仅支持纯文本输入) */ message: AilyKnowledgeMessage @@ -160,7 +179,7 @@ export interface AskAilyAppKnowledgeRequest { data_asset_tag_ids?: string[] } -export interface ListAilyAppDataAssetQuery extends Pagination { +export interface ListAilyAppDataAssetQuery { /** 模糊匹配关键词 */ keyword?: string /** 根据数据知识 ID 进行过滤 */ @@ -173,7 +192,7 @@ export interface ListAilyAppDataAssetQuery extends Pagination { with_connect_status?: boolean } -export interface ListAilyAppDataAssetTagQuery extends Pagination { +export interface ListAilyAppDataAssetTagQuery { /** 模糊匹配分类名称 */ keyword?: string /** 模糊匹配分类名称 */ @@ -258,14 +277,14 @@ Internal.define({ }, '/open-apis/aily/v1/sessions/{aily_session_id}/messages': { POST: 'createAilyAilySessionAilyMessage', - GET: 'listAilyAilySessionAilyMessage', + GET: { name: 'listAilyAilySessionAilyMessage', pagination: { argIndex: 1, itemsKey: 'messages' } }, }, '/open-apis/aily/v1/sessions/{aily_session_id}/messages/{aily_message_id}': { GET: 'getAilyAilySessionAilyMessage', }, '/open-apis/aily/v1/sessions/{aily_session_id}/runs': { POST: 'createAilyAilySessionRun', - GET: 'listAilyAilySessionRun', + GET: { name: 'listAilyAilySessionRun', pagination: { argIndex: 1, itemsKey: 'runs' } }, }, '/open-apis/aily/v1/sessions/{aily_session_id}/runs/{run_id}': { GET: 'getAilyAilySessionRun', @@ -280,15 +299,15 @@ Internal.define({ GET: 'getAilyAppSkill', }, '/open-apis/aily/v1/apps/{app_id}/skills': { - GET: 'listAilyAppSkill', + GET: { name: 'listAilyAppSkill', pagination: { argIndex: 1, itemsKey: 'skills' } }, }, '/open-apis/aily/v1/apps/{app_id}/knowledges/ask': { POST: 'askAilyAppKnowledge', }, '/open-apis/aily/v1/apps/{app_id}/data_assets': { - GET: 'listAilyAppDataAsset', + GET: { name: 'listAilyAppDataAsset', pagination: { argIndex: 1 } }, }, '/open-apis/aily/v1/apps/{app_id}/data_asset_tags': { - GET: 'listAilyAppDataAssetTag', + GET: { name: 'listAilyAppDataAssetTag', pagination: { argIndex: 1 } }, }, }) diff --git a/adapters/lark/src/types/application.ts b/adapters/lark/src/types/application.ts index a6549b3d..160f9ea1 100644 --- a/adapters/lark/src/types/application.ts +++ b/adapters/lark/src/types/application.ts @@ -17,7 +17,12 @@ declare module '../internal' { * 获取应用版本列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-app_version/list */ - listApplicationApplicationAppVersion(app_id: string, query?: ListApplicationApplicationAppVersionQuery): Promise> + listApplicationApplicationAppVersion(app_id: string, query?: ListApplicationApplicationAppVersionQuery & Pagination): Promise> + /** + * 获取应用版本列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-app_version/list + */ + listApplicationApplicationAppVersionIter(app_id: string, query?: ListApplicationApplicationAppVersionQuery): AsyncIterator /** * 获取应用版本中开发者申请的通讯录权限范围 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-app_version/contacts_range_suggest @@ -37,12 +42,17 @@ declare module '../internal' { * 获取企业安装的应用 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application/list */ - listApplication(query?: ListApplicationQuery): Promise + listApplication(query?: ListApplicationQuery & Pagination): Promise + /** + * 查看待审核的应用列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application/underauditlist + */ + underauditlistApplication(query?: UnderauditlistApplicationQuery & Pagination): Promise> /** * 查看待审核的应用列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application/underauditlist */ - underauditlistApplication(query?: UnderauditlistApplicationQuery): Promise> + underauditlistApplicationIter(query?: UnderauditlistApplicationQuery): AsyncIterator /** * 更新应用审核状态 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-app_version/patch @@ -57,7 +67,7 @@ declare module '../internal' { * 获取应用通讯录权限范围配置 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application/contacts_range_configuration */ - contactsRangeConfigurationApplication(app_id: string, query?: ContactsRangeConfigurationApplicationQuery): Promise + contactsRangeConfigurationApplication(app_id: string, query?: ContactsRangeConfigurationApplicationQuery & Pagination): Promise /** * 更新应用通讯录权限范围配置 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-contacts_range/patch @@ -102,7 +112,12 @@ declare module '../internal' { * 获取应用反馈列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-feedback/list */ - listApplicationApplicationFeedback(app_id: string, query?: ListApplicationApplicationFeedbackQuery): Promise> + listApplicationApplicationFeedback(app_id: string, query?: ListApplicationApplicationFeedbackQuery & Pagination): Promise> + /** + * 获取应用反馈列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/application-feedback/list + */ + listApplicationApplicationFeedbackIter(app_id: string, query?: ListApplicationApplicationFeedbackQuery): AsyncIterator /** * 更新应用红点 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/app_badge/set @@ -112,17 +127,22 @@ declare module '../internal' { * 获取用户自定义常用的应用 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v5/application/favourite */ - favouriteApplication(query?: FavouriteApplicationQuery): Promise + favouriteApplication(query?: FavouriteApplicationQuery & Pagination): Promise /** * 获取管理员推荐的应用 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v5/application/recommend */ - recommendApplication(query?: RecommendApplicationQuery): Promise + recommendApplication(query?: RecommendApplicationQuery & Pagination): Promise + /** + * 获取当前设置的推荐规则列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/app_recommend_rule/list + */ + listApplicationAppRecommendRule(query?: ListApplicationAppRecommendRuleQuery & Pagination): Promise> /** * 获取当前设置的推荐规则列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/application-v6/app_recommend_rule/list */ - listApplicationAppRecommendRule(query?: ListApplicationAppRecommendRuleQuery): Promise> + listApplicationAppRecommendRuleIter(query?: ListApplicationAppRecommendRuleQuery): AsyncIterator } } @@ -140,7 +160,7 @@ export interface GetApplicationApplicationAppVersionQuery { user_id_type?: 'user_id' | 'union_id' | 'open_id' } -export interface ListApplicationApplicationAppVersionQuery extends Pagination { +export interface ListApplicationApplicationAppVersionQuery { /** 应用信息的语言版本 */ lang: 'zh_cn' | 'en_us' | 'ja_jp' /** 0:按照时间倒序 1:按照时间正序 */ @@ -156,7 +176,7 @@ export interface ContactsRangeSuggestApplicationApplicationAppVersionQuery { user_id_type?: 'user_id' | 'union_id' | 'open_id' } -export interface ListApplicationQuery extends Pagination { +export interface ListApplicationQuery { /** 用户 ID 类型 */ user_id_type?: string /** 应用的图标、描述、帮助文档链接是按照应用的主语言返回;其他内容(如应用权限、应用分类)按照该参数设定返回对应的语言。可选值有: zh_cn:中文 en_us:英文 ja_jp:日文 如不填写,则按照应用的主语言返回 */ @@ -169,7 +189,7 @@ export interface ListApplicationQuery extends Pagination { owner_type?: 0 | 1 | 2 } -export interface UnderauditlistApplicationQuery extends Pagination { +export interface UnderauditlistApplicationQuery { /** 指定返回的语言 */ lang: 'zh_cn' | 'en_us' | 'ja_jp' /** 此次调用中使用的用户ID的类型 */ @@ -200,7 +220,7 @@ export interface PatchApplicationQuery { lang: 'zh_cn' | 'en_us' | 'ja_jp' } -export interface ContactsRangeConfigurationApplicationQuery extends Pagination { +export interface ContactsRangeConfigurationApplicationQuery { /** 返回值的部门ID的类型 */ department_id_type?: 'department_id' | 'open_department_id' /** 此次调用中使用的用户ID的类型 */ @@ -322,7 +342,7 @@ export interface PatchApplicationApplicationFeedbackQuery { operator_id: string } -export interface ListApplicationApplicationFeedbackQuery extends Pagination { +export interface ListApplicationApplicationFeedbackQuery { /** 查询的起始日期,格式为yyyy-mm-dd。不填则默认为当前日期减去180天。 */ from_date?: string /** 查询的结束日期,格式为yyyy-mm-dd。不填默认为当前日期。只能查询 180 天内的数据。 */ @@ -352,19 +372,19 @@ export interface SetApplicationAppBadgeQuery { user_id_type?: 'user_id' | 'union_id' | 'open_id' } -export interface FavouriteApplicationQuery extends Pagination { +export interface FavouriteApplicationQuery { /** 应用信息的语言版本 */ language?: 'zh_cn' | 'en_us' | 'ja_jp' } -export interface RecommendApplicationQuery extends Pagination { +export interface RecommendApplicationQuery { /** 应用信息的语言版本 */ language?: 'zh_cn' | 'en_us' | 'ja_jp' /** 推荐应用类型,默认为用户不可移除的推荐应用列表 */ recommend_type?: 'user_unremovable' | 'user_removable' } -export interface ListApplicationAppRecommendRuleQuery extends Pagination { +export interface ListApplicationAppRecommendRuleQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' } @@ -458,7 +478,7 @@ Internal.define({ PATCH: 'patchApplicationApplicationAppVersion', }, '/open-apis/application/v6/applications/{app_id}/app_versions': { - GET: 'listApplicationApplicationAppVersion', + GET: { name: 'listApplicationApplicationAppVersion', pagination: { argIndex: 1 } }, }, '/open-apis/application/v6/applications/{app_id}/app_versions/{version_id}/contacts_range_suggest': { GET: 'contactsRangeSuggestApplicationApplicationAppVersion', @@ -473,7 +493,7 @@ Internal.define({ GET: 'listApplication', }, '/open-apis/application/v6/applications/underauditlist': { - GET: 'underauditlistApplication', + GET: { name: 'underauditlistApplication', pagination: { argIndex: 0 } }, }, '/open-apis/application/v6/applications/{app_id}/contacts_range_configuration': { GET: 'contactsRangeConfigurationApplication', @@ -503,7 +523,7 @@ Internal.define({ PATCH: 'patchApplicationApplicationFeedback', }, '/open-apis/application/v6/applications/{app_id}/feedbacks': { - GET: 'listApplicationApplicationFeedback', + GET: { name: 'listApplicationApplicationFeedback', pagination: { argIndex: 1, itemsKey: 'feedback_list' } }, }, '/open-apis/application/v6/app_badge/set': { POST: 'setApplicationAppBadge', @@ -515,6 +535,6 @@ Internal.define({ GET: 'recommendApplication', }, '/open-apis/application/v6/app_recommend_rules': { - GET: 'listApplicationAppRecommendRule', + GET: { name: 'listApplicationAppRecommendRule', pagination: { argIndex: 0, itemsKey: 'rules' } }, }, }) diff --git a/adapters/lark/src/types/approval.ts b/adapters/lark/src/types/approval.ts index 7662d705..31ba4bc2 100644 --- a/adapters/lark/src/types/approval.ts +++ b/adapters/lark/src/types/approval.ts @@ -42,7 +42,12 @@ declare module '../internal' { * 批量获取审批实例 ID * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/list */ - listApprovalInstance(query?: ListApprovalInstanceQuery): Promise> + listApprovalInstance(query?: ListApprovalInstanceQuery & Pagination): Promise> + /** + * 批量获取审批实例 ID + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/list + */ + listApprovalInstanceIter(query?: ListApprovalInstanceQuery): AsyncIterator /** * 同意审批任务 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/task/approve @@ -92,7 +97,7 @@ declare module '../internal' { * 获取评论 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance-comment/list */ - listApprovalInstanceComment(instance_id: string, query?: ListApprovalInstanceCommentQuery): Promise + listApprovalInstanceComment(instance_id: string, query?: ListApprovalInstanceCommentQuery & Pagination): Promise /** * 创建三方审批定义 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/external_approval/create @@ -117,27 +122,32 @@ declare module '../internal' { * 获取三方审批任务状态 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/external_task/list */ - listApprovalExternalTask(body: ListApprovalExternalTaskRequest, query?: ListApprovalExternalTaskQuery): Promise> + listApprovalExternalTask(body: ListApprovalExternalTaskRequest, query?: Pagination): Promise> + /** + * 获取三方审批任务状态 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/external_task/list + */ + listApprovalExternalTaskIter(body: ListApprovalExternalTaskRequest): AsyncIterator /** * 查询实例列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/query */ - queryApprovalInstance(body: QueryApprovalInstanceRequest, query?: QueryApprovalInstanceQuery): Promise + queryApprovalInstance(body: QueryApprovalInstanceRequest, query?: QueryApprovalInstanceQuery & Pagination): Promise /** * 查询抄送列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/instance/search_cc */ - searchCcApprovalInstance(body: SearchCcApprovalInstanceRequest, query?: SearchCcApprovalInstanceQuery): Promise + searchCcApprovalInstance(body: SearchCcApprovalInstanceRequest, query?: SearchCcApprovalInstanceQuery & Pagination): Promise /** * 查询任务列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/task/search */ - searchApprovalTask(body: SearchApprovalTaskRequest, query?: SearchApprovalTaskQuery): Promise + searchApprovalTask(body: SearchApprovalTaskRequest, query?: SearchApprovalTaskQuery & Pagination): Promise /** * 查询用户的任务列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/task/query */ - queryApprovalTask(query?: QueryApprovalTaskQuery): Promise + queryApprovalTask(query?: QueryApprovalTaskQuery & Pagination): Promise /** * 订阅审批事件 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/approval-v4/approval/subscribe @@ -294,7 +304,7 @@ export interface GetApprovalInstanceQuery { user_id_type?: 'user_id' | 'open_id' | 'union_id' } -export interface ListApprovalInstanceQuery extends Pagination { +export interface ListApprovalInstanceQuery { /** 审批定义唯一标识 */ approval_code: string /** 审批实例创建时间区间(毫秒) */ @@ -456,7 +466,7 @@ export interface RemoveApprovalInstanceCommentQuery { user_id?: string } -export interface ListApprovalInstanceCommentQuery extends Pagination { +export interface ListApprovalInstanceCommentQuery { /** 用户ID类型,不填默认为open_id */ user_id_type?: 'open_id' | 'user_id' | 'union_id' /** 用户ID */ @@ -565,9 +575,6 @@ export interface ListApprovalExternalTaskRequest { status?: 'PENDING' | 'APPROVED' | 'REJECTED' | 'TRANSFERRED' | 'DONE' } -export interface ListApprovalExternalTaskQuery extends Pagination { -} - export interface QueryApprovalInstanceRequest { /** 根据x_user_type填写用户 id */ user_id?: string @@ -591,7 +598,7 @@ export interface QueryApprovalInstanceRequest { locale?: 'zh-CN' | 'en-US' | 'ja-JP' } -export interface QueryApprovalInstanceQuery extends Pagination { +export interface QueryApprovalInstanceQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' } @@ -619,7 +626,7 @@ export interface SearchCcApprovalInstanceRequest { locale?: 'zh-CN' | 'en-US' | 'ja-JP' } -export interface SearchCcApprovalInstanceQuery extends Pagination { +export interface SearchCcApprovalInstanceQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' } @@ -651,12 +658,12 @@ export interface SearchApprovalTaskRequest { order?: 0 | 1 | 2 | 3 } -export interface SearchApprovalTaskQuery extends Pagination { +export interface SearchApprovalTaskQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' } -export interface QueryApprovalTaskQuery extends Pagination { +export interface QueryApprovalTaskQuery { /** 需要查询的 User ID */ user_id: string /** 需要查询的任务分组主题,如「待办」、「已办」等 */ @@ -849,7 +856,7 @@ Internal.define({ }, '/open-apis/approval/v4/instances': { POST: 'createApprovalInstance', - GET: 'listApprovalInstance', + GET: { name: 'listApprovalInstance', pagination: { argIndex: 0, itemsKey: 'instance_code_list' } }, }, '/open-apis/approval/v4/instances/cancel': { POST: 'cancelApprovalInstance', @@ -904,7 +911,7 @@ Internal.define({ POST: 'checkApprovalExternalInstance', }, '/open-apis/approval/v4/external_tasks': { - GET: 'listApprovalExternalTask', + GET: { name: 'listApprovalExternalTask', pagination: { argIndex: 1, itemsKey: 'data' } }, }, '/open-apis/approval/v4/instances/query': { POST: 'queryApprovalInstance', diff --git a/adapters/lark/src/types/attendance.ts b/adapters/lark/src/types/attendance.ts index affbceaa..b8e591b3 100644 --- a/adapters/lark/src/types/attendance.ts +++ b/adapters/lark/src/types/attendance.ts @@ -27,7 +27,12 @@ declare module '../internal' { * 查询所有班次 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/shift/list */ - listAttendanceShift(query?: ListAttendanceShiftQuery): Promise> + listAttendanceShift(query?: Pagination): Promise> + /** + * 查询所有班次 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/shift/list + */ + listAttendanceShiftIter(): AsyncIterator /** * 创建或修改排班表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_daily_shift/batch_create @@ -47,7 +52,12 @@ declare module '../internal' { * 查询考勤组下所有成员 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/group/list_user */ - listUserAttendanceGroup(group_id: string, query?: ListUserAttendanceGroupQuery): Promise> + listUserAttendanceGroup(group_id: string, query?: ListUserAttendanceGroupQuery & Pagination): Promise> + /** + * 查询考勤组下所有成员 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/group/list_user + */ + listUserAttendanceGroupIter(group_id: string, query?: ListUserAttendanceGroupQuery): AsyncIterator /** * 创建或修改考勤组 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/group/create @@ -72,7 +82,12 @@ declare module '../internal' { * 查询所有考勤组 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/group/list */ - listAttendanceGroup(query?: ListAttendanceGroupQuery): Promise> + listAttendanceGroup(query?: Pagination): Promise> + /** + * 查询所有考勤组 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/group/list + */ + listAttendanceGroupIter(): AsyncIterator /** * 修改用户人脸识别信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_setting/modify @@ -162,7 +177,12 @@ declare module '../internal' { * 查询所有归档规则 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/archive_rule/list */ - listAttendanceArchiveRule(query?: ListAttendanceArchiveRuleQuery): Promise> + listAttendanceArchiveRule(query?: Pagination): Promise> + /** + * 查询所有归档规则 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/archive_rule/list + */ + listAttendanceArchiveRuleIter(): AsyncIterator /** * 导入打卡流水 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/attendance-v1/user_flow/batch_create @@ -247,9 +267,6 @@ export interface QueryAttendanceShiftQuery { shift_name: string } -export interface ListAttendanceShiftQuery extends Pagination { -} - export interface BatchCreateAttendanceUserDailyShiftRequest { /** 班表信息列表 */ user_daily_shifts: UserDailyShift[] @@ -288,7 +305,7 @@ export interface BatchCreateTempAttendanceUserDailyShiftQuery { employee_type: 'employee_id' | 'employee_no' } -export interface ListUserAttendanceGroupQuery extends Pagination { +export interface ListUserAttendanceGroupQuery { /** 用户 ID 的类型 */ employee_type: string /** 部门 ID 的类型 */ @@ -323,9 +340,6 @@ export interface SearchAttendanceGroupRequest { group_name: string } -export interface ListAttendanceGroupQuery extends Pagination { -} - export interface ModifyAttendanceUserSettingRequest { /** 用户设置 */ user_setting?: UserSetting @@ -561,9 +575,6 @@ export interface DelReportAttendanceArchiveRuleQuery { employee_type: string } -export interface ListAttendanceArchiveRuleQuery extends Pagination { -} - export interface BatchCreateAttendanceUserFlowRequest { /** 打卡流水记录列表 */ flow_records: UserFlow[] @@ -1055,7 +1066,7 @@ export interface PatchAttendanceLeaveAccrualRecordResponse { Internal.define({ '/open-apis/attendance/v1/shifts': { POST: 'createAttendanceShift', - GET: 'listAttendanceShift', + GET: { name: 'listAttendanceShift', pagination: { argIndex: 0, itemsKey: 'shift_list' } }, }, '/open-apis/attendance/v1/shifts/{shift_id}': { DELETE: 'deleteAttendanceShift', @@ -1074,11 +1085,11 @@ Internal.define({ POST: 'batchCreateTempAttendanceUserDailyShift', }, '/open-apis/attendance/v1/groups/{group_id}/list_user': { - GET: 'listUserAttendanceGroup', + GET: { name: 'listUserAttendanceGroup', pagination: { argIndex: 1, itemsKey: 'users' } }, }, '/open-apis/attendance/v1/groups': { POST: 'createAttendanceGroup', - GET: 'listAttendanceGroup', + GET: { name: 'listAttendanceGroup', pagination: { argIndex: 0, itemsKey: 'group_list' } }, }, '/open-apis/attendance/v1/groups/{group_id}': { DELETE: 'deleteAttendanceGroup', @@ -1139,7 +1150,7 @@ Internal.define({ POST: 'delReportAttendanceArchiveRule', }, '/open-apis/attendance/v1/archive_rule': { - GET: 'listAttendanceArchiveRule', + GET: { name: 'listAttendanceArchiveRule', pagination: { argIndex: 0 } }, }, '/open-apis/attendance/v1/user_flows/batch_create': { POST: 'batchCreateAttendanceUserFlow', diff --git a/adapters/lark/src/types/baike.ts b/adapters/lark/src/types/baike.ts index c38e5d5d..54987a6b 100644 --- a/adapters/lark/src/types/baike.ts +++ b/adapters/lark/src/types/baike.ts @@ -32,7 +32,7 @@ declare module '../internal' { * 获取词条列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/list */ - listBaikeEntity(query?: ListBaikeEntityQuery): Promise + listBaikeEntity(query?: ListBaikeEntityQuery & Pagination): Promise /** * 精准搜索词条 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/match @@ -42,7 +42,7 @@ declare module '../internal' { * 模糊搜索词条 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/search */ - searchBaikeEntity(body: SearchBaikeEntityRequest, query?: SearchBaikeEntityQuery): Promise + searchBaikeEntity(body: SearchBaikeEntityRequest, query?: SearchBaikeEntityQuery & Pagination): Promise /** * 词条高亮 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/entity/highlight @@ -57,7 +57,7 @@ declare module '../internal' { * 获取词典分类 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/classification/list */ - listBaikeClassification(query?: ListBaikeClassificationQuery): Promise + listBaikeClassification(query?: Pagination): Promise /** * 上传图片 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/baike-v1/file/upload @@ -162,7 +162,7 @@ export interface GetBaikeEntityQuery { user_id_type?: 'user_id' | 'union_id' | 'open_id' } -export interface ListBaikeEntityQuery extends Pagination { +export interface ListBaikeEntityQuery { /** 相关外部系统【可用来过滤词条数据】 */ provider?: string /** 此次调用中使用的用户ID的类型 */ @@ -185,7 +185,7 @@ export interface SearchBaikeEntityRequest { creators?: string[] } -export interface SearchBaikeEntityQuery extends Pagination { +export interface SearchBaikeEntityQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' } @@ -200,9 +200,6 @@ export interface ExtractBaikeEntityRequest { text?: string } -export interface ListBaikeClassificationQuery extends Pagination { -} - export interface UploadBaikeFileForm { /** 文件名称,当前仅支持上传图片且图片格式为以下六种:icon、bmp、gif、png、jpeg、webp */ name: string diff --git a/adapters/lark/src/types/bitable.ts b/adapters/lark/src/types/bitable.ts index e306b6e9..44544d82 100644 --- a/adapters/lark/src/types/bitable.ts +++ b/adapters/lark/src/types/bitable.ts @@ -42,7 +42,7 @@ declare module '../internal' { * 列出数据表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table/list */ - listBitableAppTable(app_token: string, query?: ListBitableAppTableQuery): Promise + listBitableAppTable(app_token: string, query?: Pagination): Promise /** * 删除一个数据表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table/delete @@ -67,7 +67,7 @@ declare module '../internal' { * 列出视图 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-view/list */ - listBitableAppTableView(app_token: string, table_id: string, query?: ListBitableAppTableViewQuery): Promise + listBitableAppTableView(app_token: string, table_id: string, query?: ListBitableAppTableViewQuery & Pagination): Promise /** * 获取视图 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-view/get @@ -92,7 +92,7 @@ declare module '../internal' { * 查询记录 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-record/search */ - searchBitableAppTableRecord(app_token: string, table_id: string, body: SearchBitableAppTableRecordRequest, query?: SearchBitableAppTableRecordQuery): Promise + searchBitableAppTableRecord(app_token: string, table_id: string, body: SearchBitableAppTableRecordRequest, query?: SearchBitableAppTableRecordQuery & Pagination): Promise /** * 删除记录 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-record/delete @@ -132,7 +132,7 @@ declare module '../internal' { * 列出字段 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-field/list */ - listBitableAppTableField(app_token: string, table_id: string, query?: ListBitableAppTableFieldQuery): Promise + listBitableAppTableField(app_token: string, table_id: string, query?: ListBitableAppTableFieldQuery & Pagination): Promise /** * 删除字段 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-field/delete @@ -147,7 +147,12 @@ declare module '../internal' { * 列出仪表盘 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-dashboard/list */ - listBitableAppDashboard(app_token: string, query?: ListBitableAppDashboardQuery): Promise> + listBitableAppDashboard(app_token: string, query?: Pagination): Promise> + /** + * 列出仪表盘 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-dashboard/list + */ + listBitableAppDashboardIter(app_token: string): AsyncIterator /** * 更新表单元数据 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-form/patch @@ -167,12 +172,12 @@ declare module '../internal' { * 列出表单问题 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-form-field/list */ - listBitableAppTableFormField(app_token: string, table_id: string, form_id: string, query?: ListBitableAppTableFormFieldQuery): Promise + listBitableAppTableFormField(app_token: string, table_id: string, form_id: string, query?: Pagination): Promise /** * 列出自定义角色 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-role/list */ - listBitableAppRole(app_token: string, query?: ListBitableAppRoleQuery): Promise + listBitableAppRole(app_token: string, query?: Pagination): Promise /** * 新增自定义角色 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-role/create @@ -202,7 +207,7 @@ declare module '../internal' { * 列出协作者 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-role-member/list */ - listBitableAppRoleMember(app_token: string, role_id: string, query?: ListBitableAppRoleMemberQuery): Promise + listBitableAppRoleMember(app_token: string, role_id: string, query?: Pagination): Promise /** * 新增协作者 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-role-member/create @@ -217,7 +222,7 @@ declare module '../internal' { * 列出自动化流程 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-workflow/list */ - listBitableAppWorkflow(app_token: string, query?: ListBitableAppWorkflowQuery): Promise + listBitableAppWorkflow(app_token: string, query?: Pagination): Promise /** * 更新自动化流程状态 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-workflow/update @@ -232,7 +237,7 @@ declare module '../internal' { * 列出记录 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/app-table-record/list */ - listBitableAppTableRecord(app_token: string, table_id: string, query?: ListBitableAppTableRecordQuery): Promise + listBitableAppTableRecord(app_token: string, table_id: string, query?: ListBitableAppTableRecordQuery & Pagination): Promise } } @@ -283,9 +288,6 @@ export interface PatchBitableAppTableRequest { name?: string } -export interface ListBitableAppTableQuery extends Pagination { -} - export interface BatchDeleteBitableAppTableRequest { /** 删除的多条tableid列表 */ table_ids?: string[] @@ -305,7 +307,7 @@ export interface PatchBitableAppTableViewRequest { property?: AppTableViewProperty } -export interface ListBitableAppTableViewQuery extends Pagination { +export interface ListBitableAppTableViewQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' } @@ -349,7 +351,7 @@ export interface SearchBitableAppTableRecordRequest { automatic_fields?: boolean } -export interface SearchBitableAppTableRecordQuery extends Pagination { +export interface SearchBitableAppTableRecordQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' } @@ -427,7 +429,7 @@ export interface UpdateBitableAppTableFieldRequest { ui_type?: 'Text' | 'Email' | 'Barcode' | 'Number' | 'Progress' | 'Currency' | 'Rating' | 'SingleSelect' | 'MultiSelect' | 'DateTime' | 'Checkbox' | 'User' | 'GroupChat' | 'Phone' | 'Url' | 'Attachment' | 'SingleLink' | 'Formula' | 'DuplexLink' | 'Location' | 'CreatedTime' | 'ModifiedTime' | 'CreatedUser' | 'ModifiedUser' | 'AutoNumber' } -export interface ListBitableAppTableFieldQuery extends Pagination { +export interface ListBitableAppTableFieldQuery { /** 视图 ID */ view_id?: string /** 控制字段描述(多行文本格式)数据的返回格式, true 表示以数组富文本形式返回 */ @@ -439,9 +441,6 @@ export interface CopyBitableAppDashboardRequest { name: string } -export interface ListBitableAppDashboardQuery extends Pagination { -} - export interface PatchBitableAppTableFormRequest { /** 表单名称 */ name?: string @@ -468,12 +467,6 @@ export interface PatchBitableAppTableFormFieldRequest { visible?: boolean } -export interface ListBitableAppTableFormFieldQuery extends Pagination { -} - -export interface ListBitableAppRoleQuery extends Pagination { -} - export interface CreateBitableAppRoleRequest { /** 自定义权限的名字 */ role_name: string @@ -502,9 +495,6 @@ export interface BatchCreateBitableAppRoleMemberRequest { member_list: AppRoleMemberId[] } -export interface ListBitableAppRoleMemberQuery extends Pagination { -} - export interface CreateBitableAppRoleMemberRequest { /** 协作者id */ member_id: string @@ -520,9 +510,6 @@ export interface DeleteBitableAppRoleMemberQuery { member_id_type?: 'open_id' | 'union_id' | 'user_id' | 'chat_id' | 'department_id' | 'open_department_id' } -export interface ListBitableAppWorkflowQuery extends Pagination { -} - export interface UpdateBitableAppWorkflowRequest { /** 自动化状态 */ status: string @@ -541,7 +528,7 @@ export interface GetBitableAppTableRecordQuery { automatic_fields?: boolean } -export interface ListBitableAppTableRecordQuery extends Pagination { +export interface ListBitableAppTableRecordQuery { /** 视图 id注意:如 filter 或 sort 有值,view_id 会被忽略。 */ view_id?: string /** 筛选参数注意:1.筛选记录的表达式不超过2000个字符。2.不支持对“人员”以及“关联字段”的属性进行过滤筛选,如人员的 OpenID。3.仅支持字段在页面展示字符值进行筛选。详细请参考[记录筛选开发指南](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/reference/bitable-v1/filter) */ @@ -855,7 +842,7 @@ Internal.define({ POST: 'copyBitableAppDashboard', }, '/open-apis/bitable/v1/apps/{app_token}/dashboards': { - GET: 'listBitableAppDashboard', + GET: { name: 'listBitableAppDashboard', pagination: { argIndex: 1, itemsKey: 'dashboards' } }, }, '/open-apis/bitable/v1/apps/{app_token}/tables/{table_id}/forms/{form_id}': { PATCH: 'patchBitableAppTableForm', diff --git a/adapters/lark/src/types/calendar.ts b/adapters/lark/src/types/calendar.ts index 55d16721..1ac55515 100644 --- a/adapters/lark/src/types/calendar.ts +++ b/adapters/lark/src/types/calendar.ts @@ -32,7 +32,7 @@ declare module '../internal' { * 查询日历列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/list */ - listCalendar(query?: ListCalendarQuery): Promise + listCalendar(query?: ListCalendarQuery & Pagination): Promise /** * 更新日历信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/patch @@ -42,7 +42,7 @@ declare module '../internal' { * 搜索日历 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/search */ - searchCalendar(body: SearchCalendarRequest, query?: SearchCalendarQuery): Promise + searchCalendar(body: SearchCalendarRequest, query?: Pagination): Promise /** * 订阅日历 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar/subscribe @@ -77,7 +77,12 @@ declare module '../internal' { * 获取访问控制列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-acl/list */ - listCalendarCalendarAcl(calendar_id: string, query?: ListCalendarCalendarAclQuery): Promise> + listCalendarCalendarAcl(calendar_id: string, query?: ListCalendarCalendarAclQuery & Pagination): Promise> + /** + * 获取访问控制列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-acl/list + */ + listCalendarCalendarAclIter(calendar_id: string, query?: ListCalendarCalendarAclQuery): AsyncIterator /** * 订阅日历访问控制变更事件 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-acl/subscription @@ -112,12 +117,12 @@ declare module '../internal' { * 获取日程列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/list */ - listCalendarCalendarEvent(calendar_id: string, query?: ListCalendarCalendarEventQuery): Promise + listCalendarCalendarEvent(calendar_id: string, query?: ListCalendarCalendarEventQuery & Pagination): Promise /** * 搜索日程 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/search */ - searchCalendarCalendarEvent(calendar_id: string, body: SearchCalendarCalendarEventRequest, query?: SearchCalendarCalendarEventQuery): Promise + searchCalendarCalendarEvent(calendar_id: string, body: SearchCalendarCalendarEventRequest, query?: SearchCalendarCalendarEventQuery & Pagination): Promise /** * 订阅日程变更事件 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/subscription @@ -137,7 +142,12 @@ declare module '../internal' { * 获取重复日程实例 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/instances */ - instancesCalendarCalendarEvent(calendar_id: string, event_id: string, query?: InstancesCalendarCalendarEventQuery): Promise> + instancesCalendarCalendarEvent(calendar_id: string, event_id: string, query?: InstancesCalendarCalendarEventQuery & Pagination): Promise> + /** + * 获取重复日程实例 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/instances + */ + instancesCalendarCalendarEventIter(calendar_id: string, event_id: string, query?: InstancesCalendarCalendarEventQuery): AsyncIterator /** * 查询日程视图 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event/instance_view @@ -182,12 +192,22 @@ declare module '../internal' { * 获取日程参与人列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event-attendee/list */ - listCalendarCalendarEventAttendee(calendar_id: string, event_id: string, query?: ListCalendarCalendarEventAttendeeQuery): Promise> + listCalendarCalendarEventAttendee(calendar_id: string, event_id: string, query?: ListCalendarCalendarEventAttendeeQuery & Pagination): Promise> + /** + * 获取日程参与人列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event-attendee/list + */ + listCalendarCalendarEventAttendeeIter(calendar_id: string, event_id: string, query?: ListCalendarCalendarEventAttendeeQuery): AsyncIterator /** * 获取日程参与群成员列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event-attendee-chat_member/list */ - listCalendarCalendarEventAttendeeChatMember(calendar_id: string, event_id: string, attendee_id: string, query?: ListCalendarCalendarEventAttendeeChatMemberQuery): Promise> + listCalendarCalendarEventAttendeeChatMember(calendar_id: string, event_id: string, attendee_id: string, query?: ListCalendarCalendarEventAttendeeChatMemberQuery & Pagination): Promise> + /** + * 获取日程参与群成员列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/calendar-event-attendee-chat_member/list + */ + listCalendarCalendarEventAttendeeChatMemberIter(calendar_id: string, event_id: string, attendee_id: string, query?: ListCalendarCalendarEventAttendeeChatMemberQuery): AsyncIterator /** * 生成 CalDAV 配置 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/calendar-v4/setting/generate_caldav_conf @@ -249,7 +269,7 @@ export interface ListCalendarFreebusyQuery { user_id_type?: 'user_id' | 'union_id' | 'open_id' } -export interface ListCalendarQuery extends Pagination { +export interface ListCalendarQuery { /** 上次请求Response返回的增量同步标记,分页请求未结束时为空 */ sync_token?: string } @@ -272,9 +292,6 @@ export interface SearchCalendarRequest { query: string } -export interface SearchCalendarQuery extends Pagination { -} - export interface CreateCalendarCalendarAclRequest { /** 对日历的访问权限 */ role: 'unknown' | 'free_busy_reader' | 'reader' | 'writer' | 'owner' @@ -287,7 +304,7 @@ export interface CreateCalendarCalendarAclQuery { user_id_type?: 'user_id' | 'union_id' | 'open_id' } -export interface ListCalendarCalendarAclQuery extends Pagination { +export interface ListCalendarCalendarAclQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' } @@ -386,7 +403,7 @@ export interface GetCalendarCalendarEventQuery { user_id_type?: 'user_id' | 'union_id' | 'open_id' } -export interface ListCalendarCalendarEventQuery extends Pagination { +export interface ListCalendarCalendarEventQuery { /** 拉取anchor_time之后的日程,为timestamp */ anchor_time?: string /** 上次请求Response返回的增量同步标记,分页请求未结束时为空 */ @@ -406,7 +423,7 @@ export interface SearchCalendarCalendarEventRequest { filter?: EventSearchFilter } -export interface SearchCalendarCalendarEventQuery extends Pagination { +export interface SearchCalendarCalendarEventQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' } @@ -416,7 +433,7 @@ export interface ReplyCalendarCalendarEventRequest { rsvp_status: 'accept' | 'decline' | 'tentative' } -export interface InstancesCalendarCalendarEventQuery extends Pagination { +export interface InstancesCalendarCalendarEventQuery { /** 日程实例开始Unix时间戳,单位为秒,日程的end_time的下限(不包含) */ start_time: string /** 日程实例结束Unix时间戳,单位为秒,日程的start_time上限(不包含) */ @@ -493,14 +510,14 @@ export interface BatchDeleteCalendarCalendarEventAttendeeQuery { user_id_type?: 'user_id' | 'union_id' | 'open_id' } -export interface ListCalendarCalendarEventAttendeeQuery extends Pagination { +export interface ListCalendarCalendarEventAttendeeQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' /** 是否需要会议室表单信息 */ need_resource_customization?: boolean } -export interface ListCalendarCalendarEventAttendeeChatMemberQuery extends Pagination { +export interface ListCalendarCalendarEventAttendeeChatMemberQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' } @@ -746,7 +763,7 @@ Internal.define({ }, '/open-apis/calendar/v4/calendars/{calendar_id}/acls': { POST: 'createCalendarCalendarAcl', - GET: 'listCalendarCalendarAcl', + GET: { name: 'listCalendarCalendarAcl', pagination: { argIndex: 1, itemsKey: 'acls' } }, }, '/open-apis/calendar/v4/calendars/{calendar_id}/acls/{acl_id}': { DELETE: 'deleteCalendarCalendarAcl', @@ -779,7 +796,7 @@ Internal.define({ POST: 'replyCalendarCalendarEvent', }, '/open-apis/calendar/v4/calendars/{calendar_id}/events/{event_id}/instances': { - GET: 'instancesCalendarCalendarEvent', + GET: { name: 'instancesCalendarCalendarEvent', pagination: { argIndex: 2 } }, }, '/open-apis/calendar/v4/calendars/{calendar_id}/events/instance_view': { GET: 'instanceViewCalendarCalendarEvent', @@ -799,13 +816,13 @@ Internal.define({ }, '/open-apis/calendar/v4/calendars/{calendar_id}/events/{event_id}/attendees': { POST: 'createCalendarCalendarEventAttendee', - GET: 'listCalendarCalendarEventAttendee', + GET: { name: 'listCalendarCalendarEventAttendee', pagination: { argIndex: 2 } }, }, '/open-apis/calendar/v4/calendars/{calendar_id}/events/{event_id}/attendees/batch_delete': { POST: 'batchDeleteCalendarCalendarEventAttendee', }, '/open-apis/calendar/v4/calendars/{calendar_id}/events/{event_id}/attendees/{attendee_id}/chat_members': { - GET: 'listCalendarCalendarEventAttendeeChatMember', + GET: { name: 'listCalendarCalendarEventAttendeeChatMember', pagination: { argIndex: 3 } }, }, '/open-apis/calendar/v4/settings/generate_caldav_conf': { POST: 'generateCaldavConfCalendarSetting', diff --git a/adapters/lark/src/types/compensation.ts b/adapters/lark/src/types/compensation.ts index 474784db..fb9b3b2a 100644 --- a/adapters/lark/src/types/compensation.ts +++ b/adapters/lark/src/types/compensation.ts @@ -7,32 +7,62 @@ declare module '../internal' { * 批量查询员工薪资档案 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/compensation-v1/archive/query */ - queryCompensationArchive(body: QueryCompensationArchiveRequest, query?: QueryCompensationArchiveQuery): Promise> + queryCompensationArchive(body: QueryCompensationArchiveRequest, query?: QueryCompensationArchiveQuery & Pagination): Promise> + /** + * 批量查询员工薪资档案 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/compensation-v1/archive/query + */ + queryCompensationArchiveIter(body: QueryCompensationArchiveRequest, query?: QueryCompensationArchiveQuery): AsyncIterator + /** + * 批量查询薪资项 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/compensation-v1/item/list + */ + listCompensationItem(query?: ListCompensationItemQuery & Pagination): Promise> /** * 批量查询薪资项 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/compensation-v1/item/list */ - listCompensationItem(query?: ListCompensationItemQuery): Promise> + listCompensationItemIter(query?: ListCompensationItemQuery): AsyncIterator /** * 批量查询薪资统计指标 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/compensation-v1/indicator/list */ - listCompensationIndicator(query?: ListCompensationIndicatorQuery): Promise> + listCompensationIndicator(query?: Pagination): Promise> + /** + * 批量查询薪资统计指标 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/compensation-v1/indicator/list + */ + listCompensationIndicatorIter(): AsyncIterator + /** + * 批量获取薪资项分类信息 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/compensation-v1/item_category/list + */ + listCompensationItemCategory(query?: Pagination): Promise> /** * 批量获取薪资项分类信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/compensation-v1/item_category/list */ - listCompensationItemCategory(query?: ListCompensationItemCategoryQuery): Promise> + listCompensationItemCategoryIter(): AsyncIterator /** * 批量查询薪资方案 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/compensation-v1/plan/list */ - listCompensationPlan(query?: ListCompensationPlanQuery): Promise> + listCompensationPlan(query?: Pagination): Promise> + /** + * 批量查询薪资方案 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/compensation-v1/plan/list + */ + listCompensationPlanIter(): AsyncIterator + /** + * 批量查询定调薪原因 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/compensation-v1/change_reason/list + */ + listCompensationChangeReason(query?: Pagination): Promise> /** * 批量查询定调薪原因 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/compensation-v1/change_reason/list */ - listCompensationChangeReason(query?: ListCompensationChangeReasonQuery): Promise> + listCompensationChangeReasonIter(): AsyncIterator } } @@ -47,45 +77,33 @@ export interface QueryCompensationArchiveRequest { effective_end_date?: string } -export interface QueryCompensationArchiveQuery extends Pagination { +export interface QueryCompensationArchiveQuery { /** 用户ID类型 */ user_id_type: 'user_id' | 'union_id' | 'open_id' | 'people_corehr_id' } -export interface ListCompensationItemQuery extends Pagination { +export interface ListCompensationItemQuery { /** 薪酬项类型(不传则认为查询所有类型薪酬项) */ item_type?: 'salary' | 'bonus' | 'recurring_payment' } -export interface ListCompensationIndicatorQuery extends Pagination { -} - -export interface ListCompensationItemCategoryQuery extends Pagination { -} - -export interface ListCompensationPlanQuery extends Pagination { -} - -export interface ListCompensationChangeReasonQuery extends Pagination { -} - Internal.define({ '/open-apis/compensation/v1/archives/query': { - POST: 'queryCompensationArchive', + POST: { name: 'queryCompensationArchive', pagination: { argIndex: 1 } }, }, '/open-apis/compensation/v1/items': { - GET: 'listCompensationItem', + GET: { name: 'listCompensationItem', pagination: { argIndex: 0 } }, }, '/open-apis/compensation/v1/indicators': { - GET: 'listCompensationIndicator', + GET: { name: 'listCompensationIndicator', pagination: { argIndex: 0 } }, }, '/open-apis/compensation/v1/item_categories': { - GET: 'listCompensationItemCategory', + GET: { name: 'listCompensationItemCategory', pagination: { argIndex: 0 } }, }, '/open-apis/compensation/v1/plans': { - GET: 'listCompensationPlan', + GET: { name: 'listCompensationPlan', pagination: { argIndex: 0 } }, }, '/open-apis/compensation/v1/change_reasons': { - GET: 'listCompensationChangeReason', + GET: { name: 'listCompensationChangeReason', pagination: { argIndex: 0 } }, }, }) diff --git a/adapters/lark/src/types/contact.ts b/adapters/lark/src/types/contact.ts index 41473114..073d7ca3 100644 --- a/adapters/lark/src/types/contact.ts +++ b/adapters/lark/src/types/contact.ts @@ -7,7 +7,7 @@ declare module '../internal' { * 获取通讯录授权范围 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/scope/list */ - listContactScope(query?: ListContactScopeQuery): Promise + listContactScope(query?: ListContactScopeQuery & Pagination): Promise /** * 创建用户 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/user/create @@ -37,7 +37,12 @@ declare module '../internal' { * 获取部门直属用户列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/user/find_by_department */ - findByDepartmentContactUser(query?: FindByDepartmentContactUserQuery): Promise> + findByDepartmentContactUser(query?: FindByDepartmentContactUserQuery & Pagination): Promise> + /** + * 获取部门直属用户列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/user/find_by_department + */ + findByDepartmentContactUserIter(query?: FindByDepartmentContactUserQuery): AsyncIterator /** * 通过手机号或邮箱获取用户 ID * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/user/batch_get_id @@ -72,12 +77,22 @@ declare module '../internal' { * 查询用户组列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group/simplelist */ - simplelistContactGroup(query?: SimplelistContactGroupQuery): Promise> + simplelistContactGroup(query?: SimplelistContactGroupQuery & Pagination): Promise> + /** + * 查询用户组列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group/simplelist + */ + simplelistContactGroupIter(query?: SimplelistContactGroupQuery): AsyncIterator /** * 查询用户所属用户组 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group/member_belong */ - memberBelongContactGroup(query?: MemberBelongContactGroupQuery): Promise> + memberBelongContactGroup(query?: MemberBelongContactGroupQuery & Pagination): Promise> + /** + * 查询用户所属用户组 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group/member_belong + */ + memberBelongContactGroupIter(query?: MemberBelongContactGroupQuery): AsyncIterator /** * 删除用户组 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group/delete @@ -87,7 +102,12 @@ declare module '../internal' { * 获取企业自定义用户字段 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/custom_attr/list */ - listContactCustomAttr(query?: ListContactCustomAttrQuery): Promise> + listContactCustomAttr(query?: Pagination): Promise> + /** + * 获取企业自定义用户字段 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/custom_attr/list + */ + listContactCustomAttrIter(): AsyncIterator /** * 新增人员类型 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/employee_type_enum/create @@ -102,7 +122,12 @@ declare module '../internal' { * 查询人员类型 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/employee_type_enum/list */ - listContactEmployeeTypeEnum(query?: ListContactEmployeeTypeEnumQuery): Promise> + listContactEmployeeTypeEnum(query?: Pagination): Promise> + /** + * 查询人员类型 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/employee_type_enum/list + */ + listContactEmployeeTypeEnumIter(): AsyncIterator /** * 删除人员类型 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/employee_type_enum/delete @@ -147,17 +172,32 @@ declare module '../internal' { * 获取子部门列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/children */ - childrenContactDepartment(department_id: string, query?: ChildrenContactDepartmentQuery): Promise> + childrenContactDepartment(department_id: string, query?: ChildrenContactDepartmentQuery & Pagination): Promise> + /** + * 获取子部门列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/children + */ + childrenContactDepartmentIter(department_id: string, query?: ChildrenContactDepartmentQuery): AsyncIterator + /** + * 获取父部门信息 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/parent + */ + parentContactDepartment(query?: ParentContactDepartmentQuery & Pagination): Promise> /** * 获取父部门信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/parent */ - parentContactDepartment(query?: ParentContactDepartmentQuery): Promise> + parentContactDepartmentIter(query?: ParentContactDepartmentQuery): AsyncIterator + /** + * 搜索部门 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/search + */ + searchContactDepartment(body: SearchContactDepartmentRequest, query?: SearchContactDepartmentQuery & Pagination): Promise> /** * 搜索部门 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/search */ - searchContactDepartment(body: SearchContactDepartmentRequest, query?: SearchContactDepartmentQuery): Promise> + searchContactDepartmentIter(body: SearchContactDepartmentRequest, query?: SearchContactDepartmentQuery): AsyncIterator /** * 删除部门 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/delete @@ -187,7 +227,12 @@ declare module '../internal' { * 获取单位绑定的部门列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/unit/list_department */ - listDepartmentContactUnit(query?: ListDepartmentContactUnitQuery): Promise> + listDepartmentContactUnit(query?: ListDepartmentContactUnitQuery & Pagination): Promise> + /** + * 获取单位绑定的部门列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/unit/list_department + */ + listDepartmentContactUnitIter(query?: ListDepartmentContactUnitQuery): AsyncIterator /** * 获取单位信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/unit/get @@ -197,7 +242,12 @@ declare module '../internal' { * 获取单位列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/unit/list */ - listContactUnit(query?: ListContactUnitQuery): Promise> + listContactUnit(query?: Pagination): Promise> + /** + * 获取单位列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/unit/list + */ + listContactUnitIter(): AsyncIterator /** * 删除单位 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/unit/delete @@ -217,7 +267,12 @@ declare module '../internal' { * 查询用户组成员列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group-member/simplelist */ - simplelistContactGroupMember(group_id: string, query?: SimplelistContactGroupMemberQuery): Promise> + simplelistContactGroupMember(group_id: string, query?: SimplelistContactGroupMemberQuery & Pagination): Promise> + /** + * 查询用户组成员列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group-member/simplelist + */ + simplelistContactGroupMemberIter(group_id: string, query?: SimplelistContactGroupMemberQuery): AsyncIterator /** * 移除用户组成员 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/group-member/remove @@ -262,7 +317,12 @@ declare module '../internal' { * 查询角色下的所有成员信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/functional_role-member/list */ - listContactFunctionalRoleMember(role_id: string, query?: ListContactFunctionalRoleMemberQuery): Promise> + listContactFunctionalRoleMember(role_id: string, query?: ListContactFunctionalRoleMemberQuery & Pagination): Promise> + /** + * 查询角色下的所有成员信息 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/functional_role-member/list + */ + listContactFunctionalRoleMemberIter(role_id: string, query?: ListContactFunctionalRoleMemberQuery): AsyncIterator /** * 删除角色下的成员 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/functional_role-member/batch_delete @@ -287,7 +347,12 @@ declare module '../internal' { * 获取租户职级列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/job_level/list */ - listContactJobLevel(query?: ListContactJobLevelQuery): Promise> + listContactJobLevel(query?: ListContactJobLevelQuery & Pagination): Promise> + /** + * 获取租户职级列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/job_level/list + */ + listContactJobLevelIter(query?: ListContactJobLevelQuery): AsyncIterator /** * 删除职级 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/job_level/delete @@ -312,7 +377,12 @@ declare module '../internal' { * 获取租户序列列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/job_family/list */ - listContactJobFamily(query?: ListContactJobFamilyQuery): Promise> + listContactJobFamily(query?: ListContactJobFamilyQuery & Pagination): Promise> + /** + * 获取租户序列列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/job_family/list + */ + listContactJobFamilyIter(query?: ListContactJobFamilyQuery): AsyncIterator /** * 删除序列 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/job_family/delete @@ -327,7 +397,12 @@ declare module '../internal' { * 获取租户职务列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/job_title/list */ - listContactJobTitle(query?: ListContactJobTitleQuery): Promise> + listContactJobTitle(query?: Pagination): Promise> + /** + * 获取租户职务列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/job_title/list + */ + listContactJobTitleIter(): AsyncIterator /** * 获取单个工作城市信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/work_city/get @@ -337,12 +412,22 @@ declare module '../internal' { * 获取租户工作城市列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/work_city/list */ - listContactWorkCity(query?: ListContactWorkCityQuery): Promise> + listContactWorkCity(query?: Pagination): Promise> + /** + * 获取租户工作城市列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/work_city/list + */ + listContactWorkCityIter(): AsyncIterator + /** + * 获取用户列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/user/list + */ + listContactUser(query?: ListContactUserQuery & Pagination): Promise> /** * 获取用户列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/user/list */ - listContactUser(query?: ListContactUserQuery): Promise> + listContactUserIter(query?: ListContactUserQuery): AsyncIterator /** * 更新用户所有信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/user/update @@ -352,11 +437,16 @@ declare module '../internal' { * 获取部门信息列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/list */ - listContactDepartment(query?: ListContactDepartmentQuery): Promise> + listContactDepartment(query?: ListContactDepartmentQuery & Pagination): Promise> + /** + * 获取部门信息列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/list + */ + listContactDepartmentIter(query?: ListContactDepartmentQuery): AsyncIterator } } -export interface ListContactScopeQuery extends Pagination { +export interface ListContactScopeQuery { /** 返回值的用户ID的类型 */ user_id_type?: 'open_id' | 'union_id' | 'user_id' /** 返回值的部门ID的类型 */ @@ -513,7 +603,7 @@ export interface BatchContactUserQuery { department_id_type?: 'open_department_id' | 'department_id' } -export interface FindByDepartmentContactUserQuery extends Pagination { +export interface FindByDepartmentContactUserQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' /** 此次调用中使用的部门ID的类型部门ID类型的区别参见[部门ID说明](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/field-overview#23857fe0) */ @@ -615,12 +705,12 @@ export interface GetContactGroupQuery { department_id_type?: 'open_department_id' | 'department_id' } -export interface SimplelistContactGroupQuery extends Pagination { +export interface SimplelistContactGroupQuery { /** 用户组类型 */ type?: 1 | 2 } -export interface MemberBelongContactGroupQuery extends Pagination { +export interface MemberBelongContactGroupQuery { /** 成员ID */ member_id: string /** 成员ID类型 */ @@ -629,9 +719,6 @@ export interface MemberBelongContactGroupQuery extends Pagination { group_type?: 1 | 2 } -export interface ListContactCustomAttrQuery extends Pagination { -} - export interface CreateContactEmployeeTypeEnumRequest { /** 枚举内容 */ content: string @@ -654,9 +741,6 @@ export interface UpdateContactEmployeeTypeEnumRequest { i18n_content?: I18nContent[] } -export interface ListContactEmployeeTypeEnumQuery extends Pagination { -} - export interface CreateContactDepartmentRequest { /** 部门名称 */ name: string @@ -779,7 +863,7 @@ export interface BatchContactDepartmentQuery { user_id_type?: 'open_id' | 'union_id' | 'user_id' } -export interface ChildrenContactDepartmentQuery extends Pagination { +export interface ChildrenContactDepartmentQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' /** 此次调用中使用的部门ID的类型不同 ID 的说明与department_id的获取方式参见 [部门ID说明](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/reference/contact-v3/department/field-overview#23857fe0) */ @@ -788,7 +872,7 @@ export interface ChildrenContactDepartmentQuery extends Pagination { fetch_child?: boolean } -export interface ParentContactDepartmentQuery extends Pagination { +export interface ParentContactDepartmentQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' /** 此次调用中使用的部门ID的类型 */ @@ -802,7 +886,7 @@ export interface SearchContactDepartmentRequest { query: string } -export interface SearchContactDepartmentQuery extends Pagination { +export interface SearchContactDepartmentQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' /** 此次调用中使用的部门ID的类型 */ @@ -846,16 +930,13 @@ export interface UnbindDepartmentContactUnitRequest { department_id_type?: 'department_id' | 'open_department_id' } -export interface ListDepartmentContactUnitQuery extends Pagination { +export interface ListDepartmentContactUnitQuery { /** 单位ID */ unit_id: string /** 此次调用中预获取的部门ID的类型 */ department_id_type?: 'department_id' | 'open_department_id' } -export interface ListContactUnitQuery extends Pagination { -} - export interface AddContactGroupMemberRequest { /** 用户组成员的类型,取值为 user */ member_type: 'user' @@ -870,7 +951,7 @@ export interface BatchAddContactGroupMemberRequest { members?: Memberlist[] } -export interface SimplelistContactGroupMemberQuery extends Pagination { +export interface SimplelistContactGroupMemberQuery { /** 欲获取成员ID类型。当member_type=user时候,member_id_type表示user_id_type,枚举值open_id, union_id和user_id。当member_type=department时候,member_id_type表示department_id_type,枚举值open_id和department_id。 */ member_id_type?: 'open_id' | 'union_id' | 'user_id' | 'department_id' /** 欲获取的用户组成员类型。 */ @@ -932,7 +1013,7 @@ export interface GetContactFunctionalRoleMemberQuery { department_id_type?: 'department_id' | 'open_department_id' } -export interface ListContactFunctionalRoleMemberQuery extends Pagination { +export interface ListContactFunctionalRoleMemberQuery { /** 用户 ID 类型 */ user_id_type?: 'open_id' | 'union_id' | 'user_id' /** 此次调用中使用的部门ID的类型 */ @@ -979,7 +1060,7 @@ export interface UpdateContactJobLevelRequest { i18n_description?: I18nContent[] } -export interface ListContactJobLevelQuery extends Pagination { +export interface ListContactJobLevelQuery { /** 传入该字段时,可查询指定职级名称对应的职级信息。 */ name?: string } @@ -1014,18 +1095,12 @@ export interface UpdateContactJobFamilyRequest { i18n_description?: I18nContent[] } -export interface ListContactJobFamilyQuery extends Pagination { +export interface ListContactJobFamilyQuery { /** 序列名称,传入该字段时,可查询指定序列名称对应的序列信息 */ name?: string } -export interface ListContactJobTitleQuery extends Pagination { -} - -export interface ListContactWorkCityQuery extends Pagination { -} - -export interface ListContactUserQuery extends Pagination { +export interface ListContactUserQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' /** 此次调用中使用的部门ID的类型 */ @@ -1086,7 +1161,7 @@ export interface UpdateContactUserQuery { department_id_type?: 'department_id' | 'open_department_id' } -export interface ListContactDepartmentQuery extends Pagination { +export interface ListContactDepartmentQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' /** 此次调用中使用的部门ID的类型 */ @@ -1262,7 +1337,7 @@ Internal.define({ }, '/open-apis/contact/v3/users': { POST: 'createContactUser', - GET: 'listContactUser', + GET: { name: 'listContactUser', pagination: { argIndex: 0 } }, }, '/open-apis/contact/v3/users/{user_id}': { PATCH: 'patchContactUser', @@ -1277,7 +1352,7 @@ Internal.define({ GET: 'batchContactUser', }, '/open-apis/contact/v3/users/find_by_department': { - GET: 'findByDepartmentContactUser', + GET: { name: 'findByDepartmentContactUser', pagination: { argIndex: 0 } }, }, '/open-apis/contact/v3/users/batch_get_id': { POST: 'batchGetIdContactUser', @@ -1294,17 +1369,17 @@ Internal.define({ DELETE: 'deleteContactGroup', }, '/open-apis/contact/v3/group/simplelist': { - GET: 'simplelistContactGroup', + GET: { name: 'simplelistContactGroup', pagination: { argIndex: 0, itemsKey: 'grouplist' } }, }, '/open-apis/contact/v3/group/member_belong': { - GET: 'memberBelongContactGroup', + GET: { name: 'memberBelongContactGroup', pagination: { argIndex: 0, itemsKey: 'group_list' } }, }, '/open-apis/contact/v3/custom_attrs': { - GET: 'listContactCustomAttr', + GET: { name: 'listContactCustomAttr', pagination: { argIndex: 0 } }, }, '/open-apis/contact/v3/employee_type_enums': { POST: 'createContactEmployeeTypeEnum', - GET: 'listContactEmployeeTypeEnum', + GET: { name: 'listContactEmployeeTypeEnum', pagination: { argIndex: 0 } }, }, '/open-apis/contact/v3/employee_type_enums/{enum_id}': { PUT: 'updateContactEmployeeTypeEnum', @@ -1312,7 +1387,7 @@ Internal.define({ }, '/open-apis/contact/v3/departments': { POST: 'createContactDepartment', - GET: 'listContactDepartment', + GET: { name: 'listContactDepartment', pagination: { argIndex: 0 } }, }, '/open-apis/contact/v3/departments/{department_id}': { PATCH: 'patchContactDepartment', @@ -1330,17 +1405,17 @@ Internal.define({ GET: 'batchContactDepartment', }, '/open-apis/contact/v3/departments/{department_id}/children': { - GET: 'childrenContactDepartment', + GET: { name: 'childrenContactDepartment', pagination: { argIndex: 1 } }, }, '/open-apis/contact/v3/departments/parent': { - GET: 'parentContactDepartment', + GET: { name: 'parentContactDepartment', pagination: { argIndex: 0 } }, }, '/open-apis/contact/v3/departments/search': { - POST: 'searchContactDepartment', + POST: { name: 'searchContactDepartment', pagination: { argIndex: 1 } }, }, '/open-apis/contact/v3/unit': { POST: 'createContactUnit', - GET: 'listContactUnit', + GET: { name: 'listContactUnit', pagination: { argIndex: 0, itemsKey: 'unitlist' } }, }, '/open-apis/contact/v3/unit/{unit_id}': { PATCH: 'patchContactUnit', @@ -1354,7 +1429,7 @@ Internal.define({ POST: 'unbindDepartmentContactUnit', }, '/open-apis/contact/v3/unit/list_department': { - GET: 'listDepartmentContactUnit', + GET: { name: 'listDepartmentContactUnit', pagination: { argIndex: 0, itemsKey: 'departmentlist' } }, }, '/open-apis/contact/v3/group/{group_id}/member/add': { POST: 'addContactGroupMember', @@ -1363,7 +1438,7 @@ Internal.define({ POST: 'batchAddContactGroupMember', }, '/open-apis/contact/v3/group/{group_id}/member/simplelist': { - GET: 'simplelistContactGroupMember', + GET: { name: 'simplelistContactGroupMember', pagination: { argIndex: 1, itemsKey: 'memberlist' } }, }, '/open-apis/contact/v3/group/{group_id}/member/remove': { POST: 'removeContactGroupMember', @@ -1388,14 +1463,14 @@ Internal.define({ GET: 'getContactFunctionalRoleMember', }, '/open-apis/contact/v3/functional_roles/{role_id}/members': { - GET: 'listContactFunctionalRoleMember', + GET: { name: 'listContactFunctionalRoleMember', pagination: { argIndex: 1, itemsKey: 'members' } }, }, '/open-apis/contact/v3/functional_roles/{role_id}/members/batch_delete': { PATCH: 'batchDeleteContactFunctionalRoleMember', }, '/open-apis/contact/v3/job_levels': { POST: 'createContactJobLevel', - GET: 'listContactJobLevel', + GET: { name: 'listContactJobLevel', pagination: { argIndex: 0 } }, }, '/open-apis/contact/v3/job_levels/{job_level_id}': { PUT: 'updateContactJobLevel', @@ -1404,7 +1479,7 @@ Internal.define({ }, '/open-apis/contact/v3/job_families': { POST: 'createContactJobFamily', - GET: 'listContactJobFamily', + GET: { name: 'listContactJobFamily', pagination: { argIndex: 0 } }, }, '/open-apis/contact/v3/job_families/{job_family_id}': { PUT: 'updateContactJobFamily', @@ -1415,12 +1490,12 @@ Internal.define({ GET: 'getContactJobTitle', }, '/open-apis/contact/v3/job_titles': { - GET: 'listContactJobTitle', + GET: { name: 'listContactJobTitle', pagination: { argIndex: 0 } }, }, '/open-apis/contact/v3/work_cities/{work_city_id}': { GET: 'getContactWorkCity', }, '/open-apis/contact/v3/work_cities': { - GET: 'listContactWorkCity', + GET: { name: 'listContactWorkCity', pagination: { argIndex: 0 } }, }, }) diff --git a/adapters/lark/src/types/corehr.ts b/adapters/lark/src/types/corehr.ts index 4f0db7a6..a69cfa7f 100644 --- a/adapters/lark/src/types/corehr.ts +++ b/adapters/lark/src/types/corehr.ts @@ -7,7 +7,12 @@ declare module '../internal' { * 获取飞书人事对象列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/custom_field/list_object_api_name */ - listObjectApiNameCorehrCustomField(query?: ListObjectApiNameCorehrCustomFieldQuery): Promise> + listObjectApiNameCorehrCustomField(query?: Pagination): Promise> + /** + * 获取飞书人事对象列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/custom_field/list_object_api_name + */ + listObjectApiNameCorehrCustomFieldIter(): AsyncIterator /** * 获取自定义字段列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/custom_field/query @@ -32,27 +37,52 @@ declare module '../internal' { * 查询国家/地区信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/basic_info-country_region/search */ - searchCorehrBasicInfoCountryRegion(body: SearchCorehrBasicInfoCountryRegionRequest, query?: SearchCorehrBasicInfoCountryRegionQuery): Promise> + searchCorehrBasicInfoCountryRegion(body: SearchCorehrBasicInfoCountryRegionRequest, query?: Pagination): Promise> + /** + * 查询国家/地区信息 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/basic_info-country_region/search + */ + searchCorehrBasicInfoCountryRegionIter(body: SearchCorehrBasicInfoCountryRegionRequest): AsyncIterator /** * 查询省份/主要行政区信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/basic_info-country_region_subdivision/search */ - searchCorehrBasicInfoCountryRegionSubdivision(body: SearchCorehrBasicInfoCountryRegionSubdivisionRequest, query?: SearchCorehrBasicInfoCountryRegionSubdivisionQuery): Promise> + searchCorehrBasicInfoCountryRegionSubdivision(body: SearchCorehrBasicInfoCountryRegionSubdivisionRequest, query?: Pagination): Promise> + /** + * 查询省份/主要行政区信息 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/basic_info-country_region_subdivision/search + */ + searchCorehrBasicInfoCountryRegionSubdivisionIter(body: SearchCorehrBasicInfoCountryRegionSubdivisionRequest): AsyncIterator + /** + * 查询城市信息 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/basic_info-city/search + */ + searchCorehrBasicInfoCity(body: SearchCorehrBasicInfoCityRequest, query?: Pagination): Promise> /** * 查询城市信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/basic_info-city/search */ - searchCorehrBasicInfoCity(body: SearchCorehrBasicInfoCityRequest, query?: SearchCorehrBasicInfoCityQuery): Promise> + searchCorehrBasicInfoCityIter(body: SearchCorehrBasicInfoCityRequest): AsyncIterator /** * 查询区/县信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/basic_info-district/search */ - searchCorehrBasicInfoDistrict(body: SearchCorehrBasicInfoDistrictRequest, query?: SearchCorehrBasicInfoDistrictQuery): Promise> + searchCorehrBasicInfoDistrict(body: SearchCorehrBasicInfoDistrictRequest, query?: Pagination): Promise> + /** + * 查询区/县信息 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/basic_info-district/search + */ + searchCorehrBasicInfoDistrictIter(body: SearchCorehrBasicInfoDistrictRequest): AsyncIterator + /** + * 查询国籍信息 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/basic_info-nationality/search + */ + searchCorehrBasicInfoNationality(body: SearchCorehrBasicInfoNationalityRequest, query?: Pagination): Promise> /** * 查询国籍信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/basic_info-nationality/search */ - searchCorehrBasicInfoNationality(body: SearchCorehrBasicInfoNationalityRequest, query?: SearchCorehrBasicInfoNationalityQuery): Promise> + searchCorehrBasicInfoNationalityIter(body: SearchCorehrBasicInfoNationalityRequest): AsyncIterator /** * 创建国家证件类型 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/national_id_type/create @@ -77,32 +107,62 @@ declare module '../internal' { * 批量查询国家证件类型 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/national_id_type/list */ - listCorehrNationalIdType(query?: ListCorehrNationalIdTypeQuery): Promise> + listCorehrNationalIdType(query?: ListCorehrNationalIdTypeQuery & Pagination): Promise> + /** + * 批量查询国家证件类型 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/national_id_type/list + */ + listCorehrNationalIdTypeIter(query?: ListCorehrNationalIdTypeQuery): AsyncIterator + /** + * 查询银行信息 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/basic_info-bank/search + */ + searchCorehrBasicInfoBank(body: SearchCorehrBasicInfoBankRequest, query?: Pagination): Promise> /** * 查询银行信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/basic_info-bank/search */ - searchCorehrBasicInfoBank(body: SearchCorehrBasicInfoBankRequest, query?: SearchCorehrBasicInfoBankQuery): Promise> + searchCorehrBasicInfoBankIter(body: SearchCorehrBasicInfoBankRequest): AsyncIterator /** * 查询支行信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/basic_info-bank_branch/search */ - searchCorehrBasicInfoBankBranch(body: SearchCorehrBasicInfoBankBranchRequest, query?: SearchCorehrBasicInfoBankBranchQuery): Promise> + searchCorehrBasicInfoBankBranch(body: SearchCorehrBasicInfoBankBranchRequest, query?: Pagination): Promise> + /** + * 查询支行信息 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/basic_info-bank_branch/search + */ + searchCorehrBasicInfoBankBranchIter(body: SearchCorehrBasicInfoBankBranchRequest): AsyncIterator + /** + * 查询货币信息 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/basic_info-currency/search + */ + searchCorehrBasicInfoCurrency(body: SearchCorehrBasicInfoCurrencyRequest, query?: Pagination): Promise> /** * 查询货币信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/basic_info-currency/search */ - searchCorehrBasicInfoCurrency(body: SearchCorehrBasicInfoCurrencyRequest, query?: SearchCorehrBasicInfoCurrencyQuery): Promise> + searchCorehrBasicInfoCurrencyIter(body: SearchCorehrBasicInfoCurrencyRequest): AsyncIterator /** * 查询时区信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/basic_info-time_zone/search */ - searchCorehrBasicInfoTimeZone(body: SearchCorehrBasicInfoTimeZoneRequest, query?: SearchCorehrBasicInfoTimeZoneQuery): Promise> + searchCorehrBasicInfoTimeZone(body: SearchCorehrBasicInfoTimeZoneRequest, query?: Pagination): Promise> + /** + * 查询时区信息 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/basic_info-time_zone/search + */ + searchCorehrBasicInfoTimeZoneIter(body: SearchCorehrBasicInfoTimeZoneRequest): AsyncIterator + /** + * 查询语言信息 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/basic_info-language/search + */ + searchCorehrBasicInfoLanguage(body: SearchCorehrBasicInfoLanguageRequest, query?: Pagination): Promise> /** * 查询语言信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/basic_info-language/search */ - searchCorehrBasicInfoLanguage(body: SearchCorehrBasicInfoLanguageRequest, query?: SearchCorehrBasicInfoLanguageQuery): Promise> + searchCorehrBasicInfoLanguageIter(body: SearchCorehrBasicInfoLanguageRequest): AsyncIterator /** * 创建人员类型 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employee_type/create @@ -127,7 +187,12 @@ declare module '../internal' { * 批量查询人员类型 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employee_type/list */ - listCorehrEmployeeType(query?: ListCorehrEmployeeTypeQuery): Promise> + listCorehrEmployeeType(query?: Pagination): Promise> + /** + * 批量查询人员类型 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/employee_type/list + */ + listCorehrEmployeeTypeIter(): AsyncIterator /** * 创建工时制度 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/working_hours_type/create @@ -152,7 +217,12 @@ declare module '../internal' { * 批量查询工时制度 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/working_hours_type/list */ - listCorehrWorkingHoursType(query?: ListCorehrWorkingHoursTypeQuery): Promise> + listCorehrWorkingHoursType(query?: Pagination): Promise> + /** + * 批量查询工时制度 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/working_hours_type/list + */ + listCorehrWorkingHoursTypeIter(): AsyncIterator /** * ID 转换 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/common_data-id/convert @@ -167,7 +237,12 @@ declare module '../internal' { * 搜索员工信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/employee/search */ - searchCorehrEmployee(body: SearchCorehrEmployeeRequest, query?: SearchCorehrEmployeeQuery): Promise> + searchCorehrEmployee(body: SearchCorehrEmployeeRequest, query?: SearchCorehrEmployeeQuery & Pagination): Promise> + /** + * 搜索员工信息 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/employee/search + */ + searchCorehrEmployeeIter(body: SearchCorehrEmployeeRequest, query?: SearchCorehrEmployeeQuery): AsyncIterator /** * 添加人员 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/employee/create @@ -232,7 +307,12 @@ declare module '../internal' { * 获取任职信息列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/employees-job_data/query */ - queryCorehrEmployeesJobData(body: QueryCorehrEmployeesJobDataRequest, query?: QueryCorehrEmployeesJobDataQuery): Promise> + queryCorehrEmployeesJobData(body: QueryCorehrEmployeesJobDataRequest, query?: QueryCorehrEmployeesJobDataQuery & Pagination): Promise> + /** + * 获取任职信息列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/employees-job_data/query + */ + queryCorehrEmployeesJobDataIter(body: QueryCorehrEmployeesJobDataRequest, query?: QueryCorehrEmployeesJobDataQuery): AsyncIterator /** * 批量查询员工任职信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/employees-job_data/batch_get @@ -242,7 +322,12 @@ declare module '../internal' { * 批量查询任职信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_data/list */ - listCorehrJobData(query?: ListCorehrJobDataQuery): Promise> + listCorehrJobData(query?: ListCorehrJobDataQuery & Pagination): Promise> + /** + * 批量查询任职信息 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_data/list + */ + listCorehrJobDataIter(query?: ListCorehrJobDataQuery): AsyncIterator /** * 查询单个任职信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_data/get @@ -267,12 +352,22 @@ declare module '../internal' { * 批量查询兼职信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/employees-additional_job/batch */ - batchCorehrEmployeesAdditionalJob(body: BatchCorehrEmployeesAdditionalJobRequest, query?: BatchCorehrEmployeesAdditionalJobQuery): Promise> + batchCorehrEmployeesAdditionalJob(body: BatchCorehrEmployeesAdditionalJobRequest, query?: BatchCorehrEmployeesAdditionalJobQuery & Pagination): Promise> + /** + * 批量查询兼职信息 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/employees-additional_job/batch + */ + batchCorehrEmployeesAdditionalJobIter(body: BatchCorehrEmployeesAdditionalJobRequest, query?: BatchCorehrEmployeesAdditionalJobQuery): AsyncIterator /** * 批量查询部门操作日志 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/department/query_operation_logs */ - queryOperationLogsCorehrDepartment(body: QueryOperationLogsCorehrDepartmentRequest, query?: QueryOperationLogsCorehrDepartmentQuery): Promise + queryOperationLogsCorehrDepartment(body: QueryOperationLogsCorehrDepartmentRequest, query?: QueryOperationLogsCorehrDepartmentQuery & Pagination): Promise> + /** + * 批量查询部门操作日志 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/department/query_operation_logs + */ + queryOperationLogsCorehrDepartmentIter(body: QueryOperationLogsCorehrDepartmentRequest, query?: QueryOperationLogsCorehrDepartmentQuery): AsyncIterator /** * 创建部门 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/department/create @@ -297,7 +392,7 @@ declare module '../internal' { * 查询指定时间范围内当前生效信息发生变更的部门 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/department/query_recent_change */ - queryRecentChangeCorehrDepartment(query?: QueryRecentChangeCorehrDepartmentQuery): Promise + queryRecentChangeCorehrDepartment(query?: QueryRecentChangeCorehrDepartmentQuery & Pagination): Promise /** * 查询指定生效日期的部门基本信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/department/query_timeline @@ -307,17 +402,32 @@ declare module '../internal' { * 查询指定生效日期的部门架构树 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/department/tree */ - treeCorehrDepartment(body: TreeCorehrDepartmentRequest, query?: TreeCorehrDepartmentQuery): Promise> + treeCorehrDepartment(body: TreeCorehrDepartmentRequest, query?: TreeCorehrDepartmentQuery & Pagination): Promise> + /** + * 查询指定生效日期的部门架构树 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/department/tree + */ + treeCorehrDepartmentIter(body: TreeCorehrDepartmentRequest, query?: TreeCorehrDepartmentQuery): AsyncIterator /** * 批量查询部门版本信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/department/query_multi_timeline */ - queryMultiTimelineCorehrDepartment(body: QueryMultiTimelineCorehrDepartmentRequest, query?: QueryMultiTimelineCorehrDepartmentQuery): Promise> + queryMultiTimelineCorehrDepartment(body: QueryMultiTimelineCorehrDepartmentRequest, query?: QueryMultiTimelineCorehrDepartmentQuery & Pagination): Promise> + /** + * 批量查询部门版本信息 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/department/query_multi_timeline + */ + queryMultiTimelineCorehrDepartmentIter(body: QueryMultiTimelineCorehrDepartmentRequest, query?: QueryMultiTimelineCorehrDepartmentQuery): AsyncIterator + /** + * 搜索部门信息 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/department/search + */ + searchCorehrDepartment(body: SearchCorehrDepartmentRequest, query?: SearchCorehrDepartmentQuery & Pagination): Promise> /** * 搜索部门信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/department/search */ - searchCorehrDepartment(body: SearchCorehrDepartmentRequest, query?: SearchCorehrDepartmentQuery): Promise> + searchCorehrDepartmentIter(body: SearchCorehrDepartmentRequest, query?: SearchCorehrDepartmentQuery): AsyncIterator /** * 删除部门 V2 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/department/delete @@ -342,7 +452,7 @@ declare module '../internal' { * 查询当前生效信息发生变更的地点 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/location/query_recent_change */ - queryRecentChangeCorehrLocation(query?: QueryRecentChangeCorehrLocationQuery): Promise + queryRecentChangeCorehrLocation(query?: QueryRecentChangeCorehrLocationQuery & Pagination): Promise /** * 通过地点 ID 批量获取地点信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/location/batch_get @@ -352,7 +462,12 @@ declare module '../internal' { * 批量分页查询地点信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/location/list */ - listCorehrLocation(query?: ListCorehrLocationQuery): Promise> + listCorehrLocation(query?: Pagination): Promise> + /** + * 批量分页查询地点信息 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/location/list + */ + listCorehrLocationIter(): AsyncIterator /** * 启用/停用地点 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/location/active @@ -402,12 +517,17 @@ declare module '../internal' { * 批量查询公司 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/company/list */ - listCorehrCompany(query?: ListCorehrCompanyQuery): Promise> + listCorehrCompany(query?: Pagination): Promise> + /** + * 批量查询公司 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/company/list + */ + listCorehrCompanyIter(): AsyncIterator /** * 查询指定时间范围内当前生效信息发生变更的公司 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/company/query_recent_change */ - queryRecentChangeCorehrCompany(query?: QueryRecentChangeCorehrCompanyQuery): Promise + queryRecentChangeCorehrCompany(query?: QueryRecentChangeCorehrCompanyQuery & Pagination): Promise /** * 通过公司 ID 批量获取公司信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/company/batch_get @@ -432,12 +552,17 @@ declare module '../internal' { * 查询当前生效信息发生变更的成本中心 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/cost_center/query_recent_change */ - queryRecentChangeCorehrCostCenter(query?: QueryRecentChangeCorehrCostCenterQuery): Promise + queryRecentChangeCorehrCostCenter(query?: QueryRecentChangeCorehrCostCenterQuery & Pagination): Promise /** * 搜索成本中心信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/cost_center/search */ - searchCorehrCostCenter(body: SearchCorehrCostCenterRequest, query?: SearchCorehrCostCenterQuery): Promise> + searchCorehrCostCenter(body: SearchCorehrCostCenterRequest, query?: SearchCorehrCostCenterQuery & Pagination): Promise> + /** + * 搜索成本中心信息 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/cost_center/search + */ + searchCorehrCostCenterIter(body: SearchCorehrCostCenterRequest, query?: SearchCorehrCostCenterQuery): AsyncIterator /** * 删除成本中心 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/cost_center/delete @@ -492,12 +617,17 @@ declare module '../internal' { * 批量查询序列 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_family/list */ - listCorehrJobFamily(query?: ListCorehrJobFamilyQuery): Promise> + listCorehrJobFamily(query?: Pagination): Promise> + /** + * 批量查询序列 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_family/list + */ + listCorehrJobFamilyIter(): AsyncIterator /** * 查询当前生效信息发生变更的序列 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/job_family/query_recent_change */ - queryRecentChangeCorehrJobFamily(query?: QueryRecentChangeCorehrJobFamilyQuery): Promise + queryRecentChangeCorehrJobFamily(query?: QueryRecentChangeCorehrJobFamilyQuery & Pagination): Promise /** * 通过序列 ID 批量获取序列信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/job_family/batch_get @@ -527,12 +657,17 @@ declare module '../internal' { * 批量查询职级 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_level/list */ - listCorehrJobLevel(query?: ListCorehrJobLevelQuery): Promise> + listCorehrJobLevel(query?: Pagination): Promise> + /** + * 批量查询职级 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job_level/list + */ + listCorehrJobLevelIter(): AsyncIterator /** * 查询当前生效信息发生变更的职级 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/job_level/query_recent_change */ - queryRecentChangeCorehrJobLevel(query?: QueryRecentChangeCorehrJobLevelQuery): Promise + queryRecentChangeCorehrJobLevel(query?: QueryRecentChangeCorehrJobLevelQuery & Pagination): Promise /** * 通过职级 ID 批量获取职级信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/job_level/batch_get @@ -557,12 +692,17 @@ declare module '../internal' { * 查询职等 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/job_grade/query */ - queryCorehrJobGrade(body: QueryCorehrJobGradeRequest, query?: QueryCorehrJobGradeQuery): Promise> + queryCorehrJobGrade(body: QueryCorehrJobGradeRequest, query?: Pagination): Promise> + /** + * 查询职等 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/job_grade/query + */ + queryCorehrJobGradeIter(body: QueryCorehrJobGradeRequest): AsyncIterator /** * 查询当前生效信息发生变更的职等 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/job_grade/query_recent_change */ - queryRecentChangeCorehrJobGrade(query?: QueryRecentChangeCorehrJobGradeQuery): Promise + queryRecentChangeCorehrJobGrade(query?: QueryRecentChangeCorehrJobGradeQuery & Pagination): Promise /** * 删除职等 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/job_grade/delete @@ -592,7 +732,12 @@ declare module '../internal' { * 批量查询职务 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/job/list */ - listCorehrJob(query?: ListCorehrJobQuery): Promise> + listCorehrJob(query?: ListCorehrJobQuery & Pagination): Promise> + /** + * 批量查询职务 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/job/list + */ + listCorehrJobIter(query?: ListCorehrJobQuery): AsyncIterator /** * 撤销入职 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/pre_hire/withdraw_onboarding @@ -622,7 +767,12 @@ declare module '../internal' { * 查询待入职信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/pre_hire/query */ - queryCorehrPreHire(body: QueryCorehrPreHireRequest, query?: QueryCorehrPreHireQuery): Promise> + queryCorehrPreHire(body: QueryCorehrPreHireRequest, query?: QueryCorehrPreHireQuery & Pagination): Promise> + /** + * 查询待入职信息 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/pre_hire/query + */ + queryCorehrPreHireIter(body: QueryCorehrPreHireRequest, query?: QueryCorehrPreHireQuery): AsyncIterator /** * 查询单个待入职信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/pre_hire/get @@ -632,12 +782,22 @@ declare module '../internal' { * 批量查询待入职信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/pre_hire/list */ - listCorehrPreHire(query?: ListCorehrPreHireQuery): Promise> + listCorehrPreHire(query?: ListCorehrPreHireQuery & Pagination): Promise> + /** + * 批量查询待入职信息 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/pre_hire/list + */ + listCorehrPreHireIter(query?: ListCorehrPreHireQuery): AsyncIterator + /** + * 搜索待入职信息 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/pre_hire/search + */ + searchCorehrPreHire(body: SearchCorehrPreHireRequest, query?: SearchCorehrPreHireQuery & Pagination): Promise> /** * 搜索待入职信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/pre_hire/search */ - searchCorehrPreHire(body: SearchCorehrPreHireRequest, query?: SearchCorehrPreHireQuery): Promise> + searchCorehrPreHireIter(body: SearchCorehrPreHireRequest, query?: SearchCorehrPreHireQuery): AsyncIterator /** * 流转入职任务 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/pre_hire/transit_task @@ -677,7 +837,12 @@ declare module '../internal' { * 搜索试用期信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/probation/search */ - searchCorehrProbation(body: SearchCorehrProbationRequest, query?: SearchCorehrProbationQuery): Promise> + searchCorehrProbation(body: SearchCorehrProbationRequest, query?: SearchCorehrProbationQuery & Pagination): Promise> + /** + * 搜索试用期信息 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/probation/search + */ + searchCorehrProbationIter(body: SearchCorehrProbationRequest, query?: SearchCorehrProbationQuery): AsyncIterator /** * 删除试用期考核信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/probation-assessment/delete @@ -712,7 +877,12 @@ declare module '../internal' { * 搜索员工异动信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/job_change/search */ - searchCorehrJobChange(body: SearchCorehrJobChangeRequest, query?: SearchCorehrJobChangeQuery): Promise> + searchCorehrJobChange(body: SearchCorehrJobChangeRequest, query?: SearchCorehrJobChangeQuery & Pagination): Promise> + /** + * 搜索员工异动信息 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/job_change/search + */ + searchCorehrJobChangeIter(body: SearchCorehrJobChangeRequest, query?: SearchCorehrJobChangeQuery): AsyncIterator /** * 撤销异动 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/job_change/revoke @@ -747,7 +917,12 @@ declare module '../internal' { * 搜索离职信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/offboarding/search */ - searchCorehrOffboarding(body: SearchCorehrOffboardingRequest, query?: SearchCorehrOffboardingQuery): Promise> + searchCorehrOffboarding(body: SearchCorehrOffboardingRequest, query?: SearchCorehrOffboardingQuery & Pagination): Promise> + /** + * 搜索离职信息 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/offboarding/search + */ + searchCorehrOffboardingIter(body: SearchCorehrOffboardingRequest, query?: SearchCorehrOffboardingQuery): AsyncIterator /** * 新建合同 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/contract/create @@ -772,12 +947,22 @@ declare module '../internal' { * 批量查询合同 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/contract/list */ - listCorehrContract(query?: ListCorehrContractQuery): Promise> + listCorehrContract(query?: Pagination): Promise> + /** + * 批量查询合同 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/contract/list + */ + listCorehrContractIter(): AsyncIterator + /** + * 搜索合同 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/contract/search + */ + searchCorehrContract(body: SearchCorehrContractRequest, query?: SearchCorehrContractQuery & Pagination): Promise> /** * 搜索合同 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/contract/search */ - searchCorehrContract(body: SearchCorehrContractRequest, query?: SearchCorehrContractQuery): Promise> + searchCorehrContractIter(body: SearchCorehrContractRequest, query?: SearchCorehrContractQuery): AsyncIterator /** * 批量创建/更新明细行 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/workforce_plan_detail_row/batchSave @@ -807,7 +992,7 @@ declare module '../internal' { * 查询编制规划明细信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/workforce_plan_detail/batch */ - batchCorehrWorkforcePlanDetail(body: BatchCorehrWorkforcePlanDetailRequest, query?: BatchCorehrWorkforcePlanDetailQuery): Promise + batchCorehrWorkforcePlanDetail(body: BatchCorehrWorkforcePlanDetailRequest, query?: Pagination): Promise /** * 创建假期发放记录 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/leave_granting_record/create @@ -822,17 +1007,32 @@ declare module '../internal' { * 获取假期类型列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/leave/leave_types */ - leaveTypesCorehrLeave(query?: LeaveTypesCorehrLeaveQuery): Promise> + leaveTypesCorehrLeave(query?: LeaveTypesCorehrLeaveQuery & Pagination): Promise> + /** + * 获取假期类型列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/leave/leave_types + */ + leaveTypesCorehrLeaveIter(query?: LeaveTypesCorehrLeaveQuery): AsyncIterator + /** + * 批量查询员工假期余额 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/leave/leave_balances + */ + leaveBalancesCorehrLeave(query?: LeaveBalancesCorehrLeaveQuery & Pagination): Promise> /** * 批量查询员工假期余额 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/leave/leave_balances */ - leaveBalancesCorehrLeave(query?: LeaveBalancesCorehrLeaveQuery): Promise> + leaveBalancesCorehrLeaveIter(query?: LeaveBalancesCorehrLeaveQuery): AsyncIterator + /** + * 批量查询员工请假记录 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/leave/leave_request_history + */ + leaveRequestHistoryCorehrLeave(query?: LeaveRequestHistoryCorehrLeaveQuery & Pagination): Promise> /** * 批量查询员工请假记录 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/leave/leave_request_history */ - leaveRequestHistoryCorehrLeave(query?: LeaveRequestHistoryCorehrLeaveQuery): Promise> + leaveRequestHistoryCorehrLeaveIter(query?: LeaveRequestHistoryCorehrLeaveQuery): AsyncIterator /** * 获取工作日历 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/leave/work_calendar @@ -852,7 +1052,12 @@ declare module '../internal' { * 批量查询用户授权 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/authorization/query */ - queryCorehrAuthorization(query?: QueryCorehrAuthorizationQuery): Promise> + queryCorehrAuthorization(query?: QueryCorehrAuthorizationQuery & Pagination): Promise> + /** + * 批量查询用户授权 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/authorization/query + */ + queryCorehrAuthorizationIter(query?: QueryCorehrAuthorizationQuery): AsyncIterator /** * 查询单个用户授权 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/authorization/get_by_param @@ -862,7 +1067,12 @@ declare module '../internal' { * 批量获取角色列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/security_group/list */ - listCorehrSecurityGroup(query?: ListCorehrSecurityGroupQuery): Promise> + listCorehrSecurityGroup(query?: Pagination): Promise> + /** + * 批量获取角色列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/security_group/list + */ + listCorehrSecurityGroupIter(): AsyncIterator /** * 为用户授权角色 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/authorization/add_role_assign @@ -897,7 +1107,12 @@ declare module '../internal' { * 获取 HRBP 列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/bp/list */ - listCorehrBp(query?: ListCorehrBpQuery): Promise> + listCorehrBp(query?: ListCorehrBpQuery & Pagination): Promise> + /** + * 获取 HRBP 列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/bp/list + */ + listCorehrBpIter(query?: ListCorehrBpQuery): AsyncIterator /** * 获取组织类角色授权列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/assigned_user/search @@ -907,7 +1122,12 @@ declare module '../internal' { * 查询流程实例列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/process/list */ - listCorehrProcess(query?: ListCorehrProcessQuery): Promise> + listCorehrProcess(query?: ListCorehrProcessQuery & Pagination): Promise> + /** + * 查询流程实例列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/process/list + */ + listCorehrProcessIter(query?: ListCorehrProcessQuery): AsyncIterator /** * 获取单个流程详情 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/process/get @@ -932,7 +1152,12 @@ declare module '../internal' { * 获取指定人员审批任务列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/approver/list */ - listCorehrApprover(query?: ListCorehrApproverQuery): Promise> + listCorehrApprover(query?: ListCorehrApproverQuery & Pagination): Promise> + /** + * 获取指定人员审批任务列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/approver/list + */ + listCorehrApproverIter(query?: ListCorehrApproverQuery): AsyncIterator /** * 通过/拒绝审批任务 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/corehr-v2/process-approver/update @@ -962,7 +1187,12 @@ declare module '../internal' { * 批量查询城市/区域信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/subregion/list */ - listCorehrSubregion(query?: ListCorehrSubregionQuery): Promise> + listCorehrSubregion(query?: ListCorehrSubregionQuery & Pagination): Promise> + /** + * 批量查询城市/区域信息 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/subregion/list + */ + listCorehrSubregionIter(query?: ListCorehrSubregionQuery): AsyncIterator /** * 查询单条城市/区域信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/subregion/get @@ -972,7 +1202,12 @@ declare module '../internal' { * 批量查询省份/行政区信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/subdivision/list */ - listCorehrSubdivision(query?: ListCorehrSubdivisionQuery): Promise> + listCorehrSubdivision(query?: ListCorehrSubdivisionQuery & Pagination): Promise> + /** + * 批量查询省份/行政区信息 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/subdivision/list + */ + listCorehrSubdivisionIter(query?: ListCorehrSubdivisionQuery): AsyncIterator /** * 查询单条省份/行政区信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/subdivision/get @@ -982,7 +1217,12 @@ declare module '../internal' { * 批量查询国家/地区信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/country_region/list */ - listCorehrCountryRegion(query?: ListCorehrCountryRegionQuery): Promise> + listCorehrCountryRegion(query?: Pagination): Promise> + /** + * 批量查询国家/地区信息 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/country_region/list + */ + listCorehrCountryRegionIter(): AsyncIterator /** * 查询单条国家/地区信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/country_region/get @@ -992,7 +1232,12 @@ declare module '../internal' { * 批量查询货币信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/currency/list */ - listCorehrCurrency(query?: ListCorehrCurrencyQuery): Promise> + listCorehrCurrency(query?: Pagination): Promise> + /** + * 批量查询货币信息 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/currency/list + */ + listCorehrCurrencyIter(): AsyncIterator /** * 查询单个货币信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/currency/get @@ -1022,12 +1267,22 @@ declare module '../internal' { * 批量查询职务 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job/list */ - listCorehrJob(query?: ListCorehrJobQuery): Promise> + listCorehrJob(query?: ListCorehrJobQuery & Pagination): Promise> + /** + * 批量查询职务 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/job/list + */ + listCorehrJobIter(query?: ListCorehrJobQuery): AsyncIterator + /** + * 批量查询部门 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/department/list + */ + listCorehrDepartment(query?: ListCorehrDepartmentQuery & Pagination): Promise> /** * 批量查询部门 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/department/list */ - listCorehrDepartment(query?: ListCorehrDepartmentQuery): Promise> + listCorehrDepartmentIter(query?: ListCorehrDepartmentQuery): AsyncIterator /** * 更新个人信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/person/patch @@ -1051,9 +1306,6 @@ declare module '../internal' { } } -export interface ListObjectApiNameCorehrCustomFieldQuery extends Pagination { -} - export interface QueryCorehrCustomFieldQuery { /** 所属对象 apiname,支持一个或多个当前数量限制为 20 个 */ object_api_name_list: string[] @@ -1101,9 +1353,6 @@ export interface SearchCorehrBasicInfoCountryRegionRequest { status_list?: 1 | 0[] } -export interface SearchCorehrBasicInfoCountryRegionQuery extends Pagination { -} - export interface SearchCorehrBasicInfoCountryRegionSubdivisionRequest { /** 国家/地区 ID 列表,可通过【查询国家/地区信息】接口获取 */ country_region_id_list?: string[] @@ -1113,9 +1362,6 @@ export interface SearchCorehrBasicInfoCountryRegionSubdivisionRequest { status_list?: 1 | 0[] } -export interface SearchCorehrBasicInfoCountryRegionSubdivisionQuery extends Pagination { -} - export interface SearchCorehrBasicInfoCityRequest { /** 省份/主要行政区 ID 列表,可通过[查询省份/主要行政区信息](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/corehr-v2/basic_info-country_region_subdivision/search)接口列举,或从[批量查询地点](/ssl:ttdoc/server-docs/corehr-v1/organization-management/location/list)接口返回的 `location.address.region_id`、[搜索员工信息](/ssl:ttdoc/server-docs/corehr-v1/employee/search)接口返回的 `person_info.address_list.region_id` 等字段中获取 */ country_region_subdivision_id_list?: string[] @@ -1125,9 +1371,6 @@ export interface SearchCorehrBasicInfoCityRequest { status_list?: 1 | 0[] } -export interface SearchCorehrBasicInfoCityQuery extends Pagination { -} - export interface SearchCorehrBasicInfoDistrictRequest { /** 所属城市 ID 列表,可通过[查询城市信息](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/corehr-v2/basic_info-city/search)接口列举,或从[批量查询地点](/ssl:ttdoc/server-docs/corehr-v1/organization-management/location/list)接口返回的 `location.address.city_v2_id`、[搜索员工信息](/ssl:ttdoc/server-docs/corehr-v1/employee/search)接口返回的 `person_info.address_list.city_v2_id` 等字段中获取 */ city_id_list?: string[] @@ -1137,9 +1380,6 @@ export interface SearchCorehrBasicInfoDistrictRequest { status_list?: 1 | 0[] } -export interface SearchCorehrBasicInfoDistrictQuery extends Pagination { -} - export interface SearchCorehrBasicInfoNationalityRequest { /** 国籍 ID 列表,可从[搜索员工信息](/ssl:ttdoc/server-docs/corehr-v1/employee/search)接口返回的 `person_info.nationality_id_v2` 等字段中获取 */ nationality_id_list?: string[] @@ -1149,9 +1389,6 @@ export interface SearchCorehrBasicInfoNationalityRequest { status_list?: 1 | 0[] } -export interface SearchCorehrBasicInfoNationalityQuery extends Pagination { -} - export interface CreateCorehrNationalIdTypeRequest { /** 国家 / 地区 */ country_region_id: string @@ -1200,7 +1437,7 @@ export interface PatchCorehrNationalIdTypeQuery { client_token?: string } -export interface ListCorehrNationalIdTypeQuery extends Pagination { +export interface ListCorehrNationalIdTypeQuery { /** 证件类型 */ identification_type?: string /** 证件类型编码 */ @@ -1222,9 +1459,6 @@ export interface SearchCorehrBasicInfoBankRequest { update_end_time?: string } -export interface SearchCorehrBasicInfoBankQuery extends Pagination { -} - export interface SearchCorehrBasicInfoBankBranchRequest { /** 银行 ID 列表,可通过[查询银行信息](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/corehr-v2/basic_info-bank/search)列举,或从[搜索员工信息](/ssl:ttdoc/server-docs/corehr-v1/employee/search)、[批量查询员工信息](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/corehr-v2/employee/batch_get)等接口返回的 `person_info.bank_account_list.bank_id_v2` 字段中获取 */ bank_id_list?: string[] @@ -1242,9 +1476,6 @@ export interface SearchCorehrBasicInfoBankBranchRequest { update_end_time?: string } -export interface SearchCorehrBasicInfoBankBranchQuery extends Pagination { -} - export interface SearchCorehrBasicInfoCurrencyRequest { /** 货币 ID 列表,可通过[批量查询薪资方案](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/compensation-v1/plan/list)、[批量查询员工薪资档案](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/compensation-v1/archive/query)等接口返回的 `currency_id` 字段获取 */ currency_id_list?: string[] @@ -1252,9 +1483,6 @@ export interface SearchCorehrBasicInfoCurrencyRequest { status_list?: 1 | 0[] } -export interface SearchCorehrBasicInfoCurrencyQuery extends Pagination { -} - export interface SearchCorehrBasicInfoTimeZoneRequest { /** 时区 ID 列表 */ time_zone_id_list?: string[] @@ -1262,9 +1490,6 @@ export interface SearchCorehrBasicInfoTimeZoneRequest { status_list?: 1 | 0[] } -export interface SearchCorehrBasicInfoTimeZoneQuery extends Pagination { -} - export interface SearchCorehrBasicInfoLanguageRequest { /** 语言 ID 列表 */ language_id_list?: string[] @@ -1272,9 +1497,6 @@ export interface SearchCorehrBasicInfoLanguageRequest { status_list?: 1 | 0[] } -export interface SearchCorehrBasicInfoLanguageQuery extends Pagination { -} - export interface CreateCorehrEmployeeTypeRequest { /** 名称 */ name: I18n[] @@ -1311,9 +1533,6 @@ export interface PatchCorehrEmployeeTypeQuery { client_token?: string } -export interface ListCorehrEmployeeTypeQuery extends Pagination { -} - export interface CreateCorehrWorkingHoursTypeRequest { /** 编码 */ code?: string @@ -1354,9 +1573,6 @@ export interface PatchCorehrWorkingHoursTypeQuery { client_token?: string } -export interface ListCorehrWorkingHoursTypeQuery extends Pagination { -} - export interface ConvertCorehrCommonDataIdRequest { /** ID 列表(最多传入 100 个 ID,ID 长度限制 50 个字符) */ ids: string[] @@ -1474,7 +1690,7 @@ export interface SearchCorehrEmployeeRequest { archive_cpst_plan_id_list?: string[] } -export interface SearchCorehrEmployeeQuery extends Pagination { +export interface SearchCorehrEmployeeQuery { /** 用户 ID 类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_corehr_id' /** 此次调用中使用的部门 ID 类型 */ @@ -1875,7 +2091,7 @@ export interface QueryCorehrEmployeesJobDataRequest { assignment_start_reasons?: string[] } -export interface QueryCorehrEmployeesJobDataQuery extends Pagination { +export interface QueryCorehrEmployeesJobDataQuery { /** 用户 ID 类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_corehr_id' /** 此次调用中使用的部门 ID 类型 */ @@ -1906,7 +2122,7 @@ export interface BatchGetCorehrEmployeesJobDataQuery { department_id_type?: 'open_department_id' | 'department_id' | 'people_corehr_department_id' } -export interface ListCorehrJobDataQuery extends Pagination { +export interface ListCorehrJobDataQuery { /** 雇佣 ID */ employment_id?: string /** 任职信息 ID 列表,最大 100 个(不传则默认查询全部任职信息) */ @@ -2043,7 +2259,7 @@ export interface BatchCorehrEmployeesAdditionalJobRequest { is_effective?: boolean } -export interface BatchCorehrEmployeesAdditionalJobQuery extends Pagination { +export interface BatchCorehrEmployeesAdditionalJobQuery { /** 用户 ID 类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_corehr_id' /** 此次调用中使用的部门 ID 类型 */ @@ -2059,7 +2275,7 @@ export interface QueryOperationLogsCorehrDepartmentRequest { end_date: string } -export interface QueryOperationLogsCorehrDepartmentQuery extends Pagination { +export interface QueryOperationLogsCorehrDepartmentQuery { /** 此次调用中使用的部门 ID 类型 */ department_id_type?: 'open_department_id' | 'department_id' | 'people_corehr_department_id' } @@ -2148,7 +2364,7 @@ export interface BatchGetCorehrDepartmentQuery { department_id_type?: 'open_department_id' | 'department_id' | 'people_corehr_department_id' } -export interface QueryRecentChangeCorehrDepartmentQuery extends Pagination { +export interface QueryRecentChangeCorehrDepartmentQuery { /** 查询的开始时间,格式 "yyyy-MM-dd",不带时分秒,包含 start_date 传入的时间, 系统会以 start_date 的 00:00:00 查询。 */ start_date: string /** 查询的结束时间,格式 "yyyy-MM-dd",不带时分秒, 查询日期小于 end_data + 1 天的 00:00:00。 */ @@ -2182,7 +2398,7 @@ export interface TreeCorehrDepartmentRequest { effective_date?: string } -export interface TreeCorehrDepartmentQuery extends Pagination { +export interface TreeCorehrDepartmentQuery { /** 此次调用中使用的部门 ID 类型 */ department_id_type?: 'open_department_id' | 'department_id' | 'people_corehr_department_id' } @@ -2198,7 +2414,7 @@ export interface QueryMultiTimelineCorehrDepartmentRequest { fields?: string[] } -export interface QueryMultiTimelineCorehrDepartmentQuery extends Pagination { +export interface QueryMultiTimelineCorehrDepartmentQuery { /** 用户 ID 类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_corehr_id' /** 此次调用中使用的部门 ID 类型 */ @@ -2224,7 +2440,7 @@ export interface SearchCorehrDepartmentRequest { fields?: string[] } -export interface SearchCorehrDepartmentQuery extends Pagination { +export interface SearchCorehrDepartmentQuery { /** 用户 ID 类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_corehr_id' /** 此次调用中使用的部门 ID 类型 */ @@ -2290,7 +2506,7 @@ export interface PatchCorehrLocationQuery { client_token?: string } -export interface QueryRecentChangeCorehrLocationQuery extends Pagination { +export interface QueryRecentChangeCorehrLocationQuery { /** 查询的开始时间,支持"yyyy-MM-dd HH:MM:SS" */ start_date: string /** 查询的结束时间,格式 "yyyy-MM-dd HH:MM:SS" */ @@ -2302,9 +2518,6 @@ export interface BatchGetCorehrLocationRequest { location_ids: string[] } -export interface ListCorehrLocationQuery extends Pagination { -} - export interface ActiveCorehrLocationRequest { /** 地点 ID */ location_id: string @@ -2489,10 +2702,7 @@ export interface ActiveCorehrCompanyRequest { operation_reason: string } -export interface ListCorehrCompanyQuery extends Pagination { -} - -export interface QueryRecentChangeCorehrCompanyQuery extends Pagination { +export interface QueryRecentChangeCorehrCompanyQuery { /** 查询的开始时间,支持"yyyy-MM-dd HH:MM:SS" */ start_date: string /** 查询的结束时间,格式 "yyyy-MM-dd HH:MM:SS" */ @@ -2538,7 +2748,7 @@ export interface PatchCorehrCostCenterQuery { user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_corehr_id' } -export interface QueryRecentChangeCorehrCostCenterQuery extends Pagination { +export interface QueryRecentChangeCorehrCostCenterQuery { /** 查询的开始时间,支持"yyyy-MM-dd HH:MM:SS" */ start_date: string /** 查询的结束时间,格式 "yyyy-MM-dd HH:MM:SS" */ @@ -2558,7 +2768,7 @@ export interface SearchCorehrCostCenterRequest { get_all_version?: boolean } -export interface SearchCorehrCostCenterQuery extends Pagination { +export interface SearchCorehrCostCenterQuery { /** 用户 ID 类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_corehr_id' } @@ -2690,10 +2900,7 @@ export interface PatchCorehrJobFamilyQuery { client_token?: string } -export interface ListCorehrJobFamilyQuery extends Pagination { -} - -export interface QueryRecentChangeCorehrJobFamilyQuery extends Pagination { +export interface QueryRecentChangeCorehrJobFamilyQuery { /** 查询的开始时间,支持"yyyy-MM-dd HH:MM:SS" */ start_date: string /** 查询的结束时间,格式 "yyyy-MM-dd HH:MM:SS" */ @@ -2749,10 +2956,7 @@ export interface PatchCorehrJobLevelQuery { client_token?: string } -export interface ListCorehrJobLevelQuery extends Pagination { -} - -export interface QueryRecentChangeCorehrJobLevelQuery extends Pagination { +export interface QueryRecentChangeCorehrJobLevelQuery { /** 查询的开始时间,支持"yyyy-MM-dd HH:MM:SS" */ start_date: string /** 查询的结束时间,格式 "yyyy-MM-dd HH:MM:SS" */ @@ -2807,10 +3011,7 @@ export interface QueryCorehrJobGradeRequest { active?: boolean } -export interface QueryCorehrJobGradeQuery extends Pagination { -} - -export interface QueryRecentChangeCorehrJobGradeQuery extends Pagination { +export interface QueryRecentChangeCorehrJobGradeQuery { /** 查询的开始时间,支持"yyyy-MM-dd HH:MM:SS" */ start_date: string /** 查询的结束时间,格式 "yyyy-MM-dd HH:MM:SS" */ @@ -2873,7 +3074,7 @@ export interface PatchCorehrJobQuery { client_token?: string } -export interface ListCorehrJobQuery extends Pagination { +export interface ListCorehrJobQuery { /** 名称 */ name?: string /** 语言 */ @@ -2929,14 +3130,14 @@ export interface QueryCorehrPreHireRequest { fields?: string[] } -export interface QueryCorehrPreHireQuery extends Pagination { +export interface QueryCorehrPreHireQuery { /** 用户 ID 类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_corehr_id' /** 此次调用中使用的部门 ID 类型 */ department_id_type?: 'open_department_id' | 'department_id' | 'people_corehr_department_id' } -export interface ListCorehrPreHireQuery extends Pagination { +export interface ListCorehrPreHireQuery { /** 待入职ID列表 */ pre_hire_ids?: string[] } @@ -2978,7 +3179,7 @@ export interface SearchCorehrPreHireRequest { fields?: string[] } -export interface SearchCorehrPreHireQuery extends Pagination { +export interface SearchCorehrPreHireQuery { /** 用户 ID 类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_corehr_id' /** 此次调用中使用的部门 ID 类型 */ @@ -3088,7 +3289,7 @@ export interface SearchCorehrProbationRequest { final_assessment_grade?: string } -export interface SearchCorehrProbationQuery extends Pagination { +export interface SearchCorehrProbationQuery { /** 用户 ID 类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_corehr_id' /** 此次调用中使用的部门 ID 类型 */ @@ -3194,7 +3395,7 @@ export interface SearchCorehrJobChangeRequest { target_department_ids?: string[] } -export interface SearchCorehrJobChangeQuery extends Pagination { +export interface SearchCorehrJobChangeQuery { /** 用户 ID 类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_corehr_id' /** 此次调用中使用的部门 ID 类型 */ @@ -3329,7 +3530,7 @@ export interface SearchCorehrOffboardingRequest { employee_reasons?: string[] } -export interface SearchCorehrOffboardingQuery extends Pagination { +export interface SearchCorehrOffboardingQuery { /** 用户 ID 类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_corehr_id' } @@ -3394,9 +3595,6 @@ export interface PatchCorehrContractQuery { client_token?: string } -export interface ListCorehrContractQuery extends Pagination { -} - export interface SearchCorehrContractRequest { /** 雇佣 ID 列表 */ employment_id_list?: string[] @@ -3404,7 +3602,7 @@ export interface SearchCorehrContractRequest { contract_id_list?: string[] } -export interface SearchCorehrContractQuery extends Pagination { +export interface SearchCorehrContractQuery { /** 用户 ID 类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_corehr_id' } @@ -3471,9 +3669,6 @@ export interface BatchCorehrWorkforcePlanDetailRequest { cost_center_ids?: string[] } -export interface BatchCorehrWorkforcePlanDetailQuery extends Pagination { -} - export interface CreateCorehrLeaveGrantingRecordRequest { /** 假期类型 ID,枚举值可通过【获取假期类型列表】接口获取(若假期类型下存在假期子类,此处仅支持传入假期子类的 ID) */ leave_type_id: string @@ -3500,14 +3695,14 @@ export interface CreateCorehrLeaveGrantingRecordQuery { user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_corehr_id' } -export interface LeaveTypesCorehrLeaveQuery extends Pagination { +export interface LeaveTypesCorehrLeaveQuery { /** 假期类型状态(不传则为全部)可选值有:- 1:已启用- 2:已停用 */ status?: string /** 用户 ID 类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_corehr_id' } -export interface LeaveBalancesCorehrLeaveQuery extends Pagination { +export interface LeaveBalancesCorehrLeaveQuery { /** 查询截止日期,即截止到某天余额数据的日期(不传则默认为当天) */ as_of_date?: string /** 员工 ID 列表,最大 100 个(不传则默认查询全部员工) */ @@ -3520,7 +3715,7 @@ export interface LeaveBalancesCorehrLeaveQuery extends Pagination { include_offboard?: boolean } -export interface LeaveRequestHistoryCorehrLeaveQuery extends Pagination { +export interface LeaveRequestHistoryCorehrLeaveQuery { /** 员工 ID 列表,最大 100 个(不传则默认查询全部员工) */ employment_id_list?: string[] /** 休假发起人 ID 列表,最大 100 个 */ @@ -3612,7 +3807,7 @@ export interface WorkCalendarDateCorehrLeaveRequest { ids?: string[] } -export interface QueryCorehrAuthorizationQuery extends Pagination { +export interface QueryCorehrAuthorizationQuery { /** 员工ID列表,最大100个(不传则默认查询全部员工) */ employment_id_list?: string[] /** 角色 ID 列表,最大 100 个 */ @@ -3632,9 +3827,6 @@ export interface GetByParamCorehrAuthorizationQuery { user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_corehr_id' } -export interface ListCorehrSecurityGroupQuery extends Pagination { -} - export interface AddRoleAssignCorehrAuthorizationRequest { /** 授权 */ assigned_organization_items: AssignedOrganizationWithCode[][] @@ -3710,7 +3902,7 @@ export interface QueryCorehrSecurityGroupQuery { department_id_type?: 'open_department_id' | 'department_id' | 'people_corehr_department_id' } -export interface ListCorehrBpQuery extends Pagination { +export interface ListCorehrBpQuery { /** 用户 ID 类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_corehr_id' /** 此次调用中使用的部门 ID 类型 */ @@ -3735,7 +3927,7 @@ export interface SearchCorehrAssignedUserQuery { user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_corehr_id' } -export interface ListCorehrProcessQuery extends Pagination { +export interface ListCorehrProcessQuery { /** 查询流程状态列表。 */ statuses?: number[] /** 查询开始时间(unix毫秒时间戳),闭区间,开始时间和结束时间跨度不能超过31天 */ @@ -3786,7 +3978,7 @@ export interface UpdateCorehrProcessWithdrawQuery { user_id_type?: 'open_id' | 'union_id' | 'user_id' | 'people_corehr_id' } -export interface ListCorehrApproverQuery extends Pagination { +export interface ListCorehrApproverQuery { /** 用户 ID 类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_corehr_id' /** 按user_id_type类型传递。如果system_approval为false,则必填。否则非必填。 */ @@ -3892,22 +4084,16 @@ export interface MatchCorehrCompensationStandardQuery { effective_time?: string } -export interface ListCorehrSubregionQuery extends Pagination { +export interface ListCorehrSubregionQuery { /** 省份/行政区id,填写后只查询该省份/行政区下的城市/区域 */ subdivision_id?: string } -export interface ListCorehrSubdivisionQuery extends Pagination { +export interface ListCorehrSubdivisionQuery { /** 国家/地区id,填写后只查询该国家/地区下的省份/行政区 */ country_region_id?: string } -export interface ListCorehrCountryRegionQuery extends Pagination { -} - -export interface ListCorehrCurrencyQuery extends Pagination { -} - export interface PatchCorehrDepartmentRequest { /** 实体在CoreHR内部的唯一键 */ id?: string @@ -3945,14 +4131,14 @@ export interface GetCorehrDepartmentQuery { department_id_type?: 'open_department_id' | 'department_id' | 'people_corehr_department_id' } -export interface ListCorehrJobQuery extends Pagination { +export interface ListCorehrJobQuery { /** 名称 */ name?: string /** 语言 */ query_language?: string } -export interface ListCorehrDepartmentQuery extends Pagination { +export interface ListCorehrDepartmentQuery { /** 部门ID列表 */ department_id_list?: string[] /** 部门名称列表,需精确匹配 */ @@ -4225,15 +4411,6 @@ export interface PatchCorehrEmployeesAdditionalJobResponse { additional_job?: EmployeesAdditionalJobWriteResp } -export interface QueryOperationLogsCorehrDepartmentResponse { - /** 操作日志列表 */ - op_logs?: OrganizationOpLog[] - /** 下一页token */ - next_page_token?: string - /** 是否有下一页 */ - has_more?: boolean -} - export interface CreateCorehrDepartmentResponse { department?: DepartmentCreate } @@ -4827,7 +5004,7 @@ export interface SubmitCorehrOffboardingResponse { Internal.define({ '/open-apis/corehr/v1/custom_fields/list_object_api_name': { - GET: 'listObjectApiNameCorehrCustomField', + GET: { name: 'listObjectApiNameCorehrCustomField', pagination: { argIndex: 0 } }, }, '/open-apis/corehr/v1/custom_fields/query': { GET: 'queryCorehrCustomField', @@ -4842,23 +5019,23 @@ Internal.define({ POST: 'editEnumOptionCorehrCommonDataMetaData', }, '/open-apis/corehr/v2/basic_info/country_regions/search': { - POST: 'searchCorehrBasicInfoCountryRegion', + POST: { name: 'searchCorehrBasicInfoCountryRegion', pagination: { argIndex: 1 } }, }, '/open-apis/corehr/v2/basic_info/country_region_subdivisions/search': { - POST: 'searchCorehrBasicInfoCountryRegionSubdivision', + POST: { name: 'searchCorehrBasicInfoCountryRegionSubdivision', pagination: { argIndex: 1 } }, }, '/open-apis/corehr/v2/basic_info/cities/search': { - POST: 'searchCorehrBasicInfoCity', + POST: { name: 'searchCorehrBasicInfoCity', pagination: { argIndex: 1 } }, }, '/open-apis/corehr/v2/basic_info/districts/search': { - POST: 'searchCorehrBasicInfoDistrict', + POST: { name: 'searchCorehrBasicInfoDistrict', pagination: { argIndex: 1 } }, }, '/open-apis/corehr/v2/basic_info/nationalities/search': { - POST: 'searchCorehrBasicInfoNationality', + POST: { name: 'searchCorehrBasicInfoNationality', pagination: { argIndex: 1 } }, }, '/open-apis/corehr/v1/national_id_types': { POST: 'createCorehrNationalIdType', - GET: 'listCorehrNationalIdType', + GET: { name: 'listCorehrNationalIdType', pagination: { argIndex: 0 } }, }, '/open-apis/corehr/v1/national_id_types/{national_id_type_id}': { DELETE: 'deleteCorehrNationalIdType', @@ -4866,23 +5043,23 @@ Internal.define({ GET: 'getCorehrNationalIdType', }, '/open-apis/corehr/v2/basic_info/banks/search': { - POST: 'searchCorehrBasicInfoBank', + POST: { name: 'searchCorehrBasicInfoBank', pagination: { argIndex: 1 } }, }, '/open-apis/corehr/v2/basic_info/bank_branchs/search': { - POST: 'searchCorehrBasicInfoBankBranch', + POST: { name: 'searchCorehrBasicInfoBankBranch', pagination: { argIndex: 1 } }, }, '/open-apis/corehr/v2/basic_info/currencies/search': { - POST: 'searchCorehrBasicInfoCurrency', + POST: { name: 'searchCorehrBasicInfoCurrency', pagination: { argIndex: 1 } }, }, '/open-apis/corehr/v2/basic_info/time_zones/search': { - POST: 'searchCorehrBasicInfoTimeZone', + POST: { name: 'searchCorehrBasicInfoTimeZone', pagination: { argIndex: 1 } }, }, '/open-apis/corehr/v2/basic_info/languages/search': { - POST: 'searchCorehrBasicInfoLanguage', + POST: { name: 'searchCorehrBasicInfoLanguage', pagination: { argIndex: 1 } }, }, '/open-apis/corehr/v1/employee_types': { POST: 'createCorehrEmployeeType', - GET: 'listCorehrEmployeeType', + GET: { name: 'listCorehrEmployeeType', pagination: { argIndex: 0 } }, }, '/open-apis/corehr/v1/employee_types/{employee_type_id}': { DELETE: 'deleteCorehrEmployeeType', @@ -4891,7 +5068,7 @@ Internal.define({ }, '/open-apis/corehr/v1/working_hours_types': { POST: 'createCorehrWorkingHoursType', - GET: 'listCorehrWorkingHoursType', + GET: { name: 'listCorehrWorkingHoursType', pagination: { argIndex: 0 } }, }, '/open-apis/corehr/v1/working_hours_types/{working_hours_type_id}': { DELETE: 'deleteCorehrWorkingHoursType', @@ -4905,7 +5082,7 @@ Internal.define({ POST: 'batchGetCorehrEmployee', }, '/open-apis/corehr/v2/employees/search': { - POST: 'searchCorehrEmployee', + POST: { name: 'searchCorehrEmployee', pagination: { argIndex: 1 } }, }, '/open-apis/corehr/v2/employees': { POST: 'createCorehrEmployee', @@ -4936,7 +5113,7 @@ Internal.define({ }, '/open-apis/corehr/v1/job_datas': { POST: 'createCorehrJobData', - GET: 'listCorehrJobData', + GET: { name: 'listCorehrJobData', pagination: { argIndex: 0 } }, }, '/open-apis/corehr/v1/job_datas/{job_data_id}': { DELETE: 'deleteCorehrJobData', @@ -4944,7 +5121,7 @@ Internal.define({ GET: 'getCorehrJobData', }, '/open-apis/corehr/v2/employees/job_datas/query': { - POST: 'queryCorehrEmployeesJobData', + POST: { name: 'queryCorehrEmployeesJobData', pagination: { argIndex: 1 } }, }, '/open-apis/corehr/v2/employees/job_datas/batch_get': { POST: 'batchGetCorehrEmployeesJobData', @@ -4957,14 +5134,14 @@ Internal.define({ DELETE: 'deleteCorehrEmployeesAdditionalJob', }, '/open-apis/corehr/v2/employees/additional_jobs/batch': { - POST: 'batchCorehrEmployeesAdditionalJob', + POST: { name: 'batchCorehrEmployeesAdditionalJob', pagination: { argIndex: 1 } }, }, '/open-apis/corehr/v2/departments/query_operation_logs': { - POST: 'queryOperationLogsCorehrDepartment', + POST: { name: 'queryOperationLogsCorehrDepartment', pagination: { argIndex: 1, itemsKey: 'op_logs', tokenKey: 'next_page_token' } }, }, '/open-apis/corehr/v1/departments': { POST: 'createCorehrDepartment', - GET: 'listCorehrDepartment', + GET: { name: 'listCorehrDepartment', pagination: { argIndex: 0 } }, }, '/open-apis/corehr/v2/departments/{department_id}': { PATCH: 'patchCorehrDepartment', @@ -4983,17 +5160,17 @@ Internal.define({ POST: 'queryTimelineCorehrDepartment', }, '/open-apis/corehr/v2/departments/tree': { - POST: 'treeCorehrDepartment', + POST: { name: 'treeCorehrDepartment', pagination: { argIndex: 1 } }, }, '/open-apis/corehr/v2/departments/query_multi_timeline': { - POST: 'queryMultiTimelineCorehrDepartment', + POST: { name: 'queryMultiTimelineCorehrDepartment', pagination: { argIndex: 1 } }, }, '/open-apis/corehr/v2/departments/search': { - POST: 'searchCorehrDepartment', + POST: { name: 'searchCorehrDepartment', pagination: { argIndex: 1 } }, }, '/open-apis/corehr/v1/locations': { POST: 'createCorehrLocation', - GET: 'listCorehrLocation', + GET: { name: 'listCorehrLocation', pagination: { argIndex: 0 } }, }, '/open-apis/corehr/v2/locations/{location_id}': { PATCH: 'patchCorehrLocation', @@ -5020,7 +5197,7 @@ Internal.define({ }, '/open-apis/corehr/v1/companies': { POST: 'createCorehrCompany', - GET: 'listCorehrCompany', + GET: { name: 'listCorehrCompany', pagination: { argIndex: 0 } }, }, '/open-apis/corehr/v1/companies/{company_id}': { PATCH: 'patchCorehrCompany', @@ -5047,7 +5224,7 @@ Internal.define({ GET: 'queryRecentChangeCorehrCostCenter', }, '/open-apis/corehr/v2/cost_centers/search': { - POST: 'searchCorehrCostCenter', + POST: { name: 'searchCorehrCostCenter', pagination: { argIndex: 1 } }, }, '/open-apis/corehr/v2/cost_centers/{cost_center_id}/versions': { POST: 'createCorehrCostCenterVersion', @@ -5067,7 +5244,7 @@ Internal.define({ }, '/open-apis/corehr/v1/job_families': { POST: 'createCorehrJobFamily', - GET: 'listCorehrJobFamily', + GET: { name: 'listCorehrJobFamily', pagination: { argIndex: 0 } }, }, '/open-apis/corehr/v1/job_families/{job_family_id}': { PATCH: 'patchCorehrJobFamily', @@ -5082,7 +5259,7 @@ Internal.define({ }, '/open-apis/corehr/v1/job_levels': { POST: 'createCorehrJobLevel', - GET: 'listCorehrJobLevel', + GET: { name: 'listCorehrJobLevel', pagination: { argIndex: 0 } }, }, '/open-apis/corehr/v1/job_levels/{job_level_id}': { PATCH: 'patchCorehrJobLevel', @@ -5103,14 +5280,14 @@ Internal.define({ DELETE: 'deleteCorehrJobGrade', }, '/open-apis/corehr/v2/job_grades/query': { - POST: 'queryCorehrJobGrade', + POST: { name: 'queryCorehrJobGrade', pagination: { argIndex: 1 } }, }, '/open-apis/corehr/v2/job_grades/query_recent_change': { GET: 'queryRecentChangeCorehrJobGrade', }, '/open-apis/corehr/v1/jobs': { POST: 'createCorehrJob', - GET: 'listCorehrJob', + GET: { name: 'listCorehrJob', pagination: { argIndex: 0 } }, }, '/open-apis/corehr/v1/jobs/{job_id}': { DELETE: 'deleteCorehrJob', @@ -5121,7 +5298,7 @@ Internal.define({ GET: 'getCorehrJob', }, '/open-apis/corehr/v2/jobs': { - GET: 'listCorehrJob', + GET: { name: 'listCorehrJob', pagination: { argIndex: 0 } }, }, '/open-apis/corehr/v2/pre_hires/withdraw_onboarding': { POST: 'withdrawOnboardingCorehrPreHire', @@ -5137,7 +5314,7 @@ Internal.define({ DELETE: 'deleteCorehrPreHire', }, '/open-apis/corehr/v2/pre_hires/query': { - POST: 'queryCorehrPreHire', + POST: { name: 'queryCorehrPreHire', pagination: { argIndex: 1 } }, }, '/open-apis/corehr/v1/pre_hires/{pre_hire_id}': { GET: 'getCorehrPreHire', @@ -5145,10 +5322,10 @@ Internal.define({ PATCH: 'patchCorehrPreHire', }, '/open-apis/corehr/v1/pre_hires': { - GET: 'listCorehrPreHire', + GET: { name: 'listCorehrPreHire', pagination: { argIndex: 0 } }, }, '/open-apis/corehr/v2/pre_hires/search': { - POST: 'searchCorehrPreHire', + POST: { name: 'searchCorehrPreHire', pagination: { argIndex: 1 } }, }, '/open-apis/corehr/v2/pre_hires/{pre_hire_id}/transit_task': { POST: 'transitTaskCorehrPreHire', @@ -5167,7 +5344,7 @@ Internal.define({ DELETE: 'deleteCorehrProbationAssessment', }, '/open-apis/corehr/v2/probation/search': { - POST: 'searchCorehrProbation', + POST: { name: 'searchCorehrProbation', pagination: { argIndex: 1 } }, }, '/open-apis/corehr/v2/probation/submit': { POST: 'submitCorehrProbation', @@ -5185,7 +5362,7 @@ Internal.define({ GET: 'queryCorehrTransferReason', }, '/open-apis/corehr/v2/job_changes/search': { - POST: 'searchCorehrJobChange', + POST: { name: 'searchCorehrJobChange', pagination: { argIndex: 1 } }, }, '/open-apis/corehr/v2/job_changes/{job_change_id}/revoke': { POST: 'revokeCorehrJobChange', @@ -5206,11 +5383,11 @@ Internal.define({ POST: 'revokeCorehrOffboarding', }, '/open-apis/corehr/v1/offboardings/search': { - POST: 'searchCorehrOffboarding', + POST: { name: 'searchCorehrOffboarding', pagination: { argIndex: 1 } }, }, '/open-apis/corehr/v1/contracts': { POST: 'createCorehrContract', - GET: 'listCorehrContract', + GET: { name: 'listCorehrContract', pagination: { argIndex: 0 } }, }, '/open-apis/corehr/v1/contracts/{contract_id}': { PATCH: 'patchCorehrContract', @@ -5218,7 +5395,7 @@ Internal.define({ GET: 'getCorehrContract', }, '/open-apis/corehr/v2/contracts/search': { - POST: 'searchCorehrContract', + POST: { name: 'searchCorehrContract', pagination: { argIndex: 1 } }, }, '/open-apis/corehr/v2/workforce_plan_detail_row/batchSave': { POST: 'batchSaveCorehrWorkforcePlanDetailRow', @@ -5245,13 +5422,13 @@ Internal.define({ DELETE: 'deleteCorehrLeaveGrantingRecord', }, '/open-apis/corehr/v1/leaves/leave_types': { - GET: 'leaveTypesCorehrLeave', + GET: { name: 'leaveTypesCorehrLeave', pagination: { argIndex: 0, itemsKey: 'leave_type_list' } }, }, '/open-apis/corehr/v1/leaves/leave_balances': { - GET: 'leaveBalancesCorehrLeave', + GET: { name: 'leaveBalancesCorehrLeave', pagination: { argIndex: 0, itemsKey: 'employment_leave_balance_list' } }, }, '/open-apis/corehr/v1/leaves/leave_request_history': { - GET: 'leaveRequestHistoryCorehrLeave', + GET: { name: 'leaveRequestHistoryCorehrLeave', pagination: { argIndex: 0, itemsKey: 'leave_request_list' } }, }, '/open-apis/corehr/v1/leaves/work_calendar': { POST: 'workCalendarCorehrLeave', @@ -5263,13 +5440,13 @@ Internal.define({ POST: 'workCalendarDateCorehrLeave', }, '/open-apis/corehr/v1/authorizations/query': { - GET: 'queryCorehrAuthorization', + GET: { name: 'queryCorehrAuthorization', pagination: { argIndex: 0 } }, }, '/open-apis/corehr/v1/authorizations/get_by_param': { GET: 'getByParamCorehrAuthorization', }, '/open-apis/corehr/v1/security_groups': { - GET: 'listCorehrSecurityGroup', + GET: { name: 'listCorehrSecurityGroup', pagination: { argIndex: 0 } }, }, '/open-apis/corehr/v1/authorizations/add_role_assign': { POST: 'addRoleAssignCorehrAuthorization', @@ -5290,13 +5467,13 @@ Internal.define({ POST: 'queryCorehrSecurityGroup', }, '/open-apis/corehr/v2/bps': { - GET: 'listCorehrBp', + GET: { name: 'listCorehrBp', pagination: { argIndex: 0 } }, }, '/open-apis/corehr/v1/assigned_users/search': { POST: 'searchCorehrAssignedUser', }, '/open-apis/corehr/v2/processes': { - GET: 'listCorehrProcess', + GET: { name: 'listCorehrProcess', pagination: { argIndex: 0, itemsKey: 'process_ids' } }, }, '/open-apis/corehr/v2/processes/{process_id}': { GET: 'getCorehrProcess', @@ -5311,7 +5488,7 @@ Internal.define({ PUT: 'updateCorehrProcessWithdraw', }, '/open-apis/corehr/v2/approvers': { - GET: 'listCorehrApprover', + GET: { name: 'listCorehrApprover', pagination: { argIndex: 0, itemsKey: 'approver_list' } }, }, '/open-apis/corehr/v2/processes/{process_id}/approvers/{approver_id}': { PUT: 'updateCorehrProcessApprover', @@ -5329,25 +5506,25 @@ Internal.define({ GET: 'getCorehrProcessFormVariableData', }, '/open-apis/corehr/v1/subregions': { - GET: 'listCorehrSubregion', + GET: { name: 'listCorehrSubregion', pagination: { argIndex: 0 } }, }, '/open-apis/corehr/v1/subregions/{subregion_id}': { GET: 'getCorehrSubregion', }, '/open-apis/corehr/v1/subdivisions': { - GET: 'listCorehrSubdivision', + GET: { name: 'listCorehrSubdivision', pagination: { argIndex: 0 } }, }, '/open-apis/corehr/v1/subdivisions/{subdivision_id}': { GET: 'getCorehrSubdivision', }, '/open-apis/corehr/v1/country_regions': { - GET: 'listCorehrCountryRegion', + GET: { name: 'listCorehrCountryRegion', pagination: { argIndex: 0 } }, }, '/open-apis/corehr/v1/country_regions/{country_region_id}': { GET: 'getCorehrCountryRegion', }, '/open-apis/corehr/v1/currencies': { - GET: 'listCorehrCurrency', + GET: { name: 'listCorehrCurrency', pagination: { argIndex: 0 } }, }, '/open-apis/corehr/v1/currencies/{currency_id}': { GET: 'getCorehrCurrency', diff --git a/adapters/lark/src/types/docx.ts b/adapters/lark/src/types/docx.ts index 470c0d38..c8eca599 100644 --- a/adapters/lark/src/types/docx.ts +++ b/adapters/lark/src/types/docx.ts @@ -12,7 +12,12 @@ declare module '../internal' { * 获取群公告所有块 * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/chat-announcement-block/list */ - listDocxChatAnnouncementBlock(chat_id: string, query?: ListDocxChatAnnouncementBlockQuery): Promise> + listDocxChatAnnouncementBlock(chat_id: string, query?: ListDocxChatAnnouncementBlockQuery & Pagination): Promise> + /** + * 获取群公告所有块 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/chat-announcement-block/list + */ + listDocxChatAnnouncementBlockIter(chat_id: string, query?: ListDocxChatAnnouncementBlockQuery): AsyncIterator /** * 在群公告中创建块 * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/chat-announcement-block-children/create @@ -32,7 +37,12 @@ declare module '../internal' { * 获取所有子块 * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/chat-announcement-block-children/get */ - getDocxChatAnnouncementBlockChildren(chat_id: string, block_id: string, query?: GetDocxChatAnnouncementBlockChildrenQuery): Promise> + getDocxChatAnnouncementBlockChildren(chat_id: string, block_id: string, query?: GetDocxChatAnnouncementBlockChildrenQuery & Pagination): Promise> + /** + * 获取所有子块 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/chat-announcement-block-children/get + */ + getDocxChatAnnouncementBlockChildrenIter(chat_id: string, block_id: string, query?: GetDocxChatAnnouncementBlockChildrenQuery): AsyncIterator /** * 删除群公告中的块 * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/chat-announcement-block-children/batch_delete @@ -57,7 +67,12 @@ declare module '../internal' { * 获取文档所有块 * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block/list */ - listDocxDocumentBlock(document_id: string, query?: ListDocxDocumentBlockQuery): Promise> + listDocxDocumentBlock(document_id: string, query?: ListDocxDocumentBlockQuery & Pagination): Promise> + /** + * 获取文档所有块 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block/list + */ + listDocxDocumentBlockIter(document_id: string, query?: ListDocxDocumentBlockQuery): AsyncIterator /** * 创建块 * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block-children/create @@ -87,7 +102,12 @@ declare module '../internal' { * 获取所有子块 * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block-children/get */ - getDocxDocumentBlockChildren(document_id: string, block_id: string, query?: GetDocxDocumentBlockChildrenQuery): Promise> + getDocxDocumentBlockChildren(document_id: string, block_id: string, query?: GetDocxDocumentBlockChildrenQuery & Pagination): Promise> + /** + * 获取所有子块 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block-children/get + */ + getDocxDocumentBlockChildrenIter(document_id: string, block_id: string, query?: GetDocxDocumentBlockChildrenQuery): AsyncIterator /** * 删除块 * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/document-docx/docx-v1/document-block-children/batch_delete @@ -101,7 +121,7 @@ export interface GetDocxChatAnnouncementQuery { user_id_type?: 'user_id' | 'union_id' | 'open_id' } -export interface ListDocxChatAnnouncementBlockQuery extends Pagination { +export interface ListDocxChatAnnouncementBlockQuery { /** 查询的群公告版本,-1 表示群公告最新版本。群公告创建后,版本为 1。若查询的版本为群公告最新版本,则需要持有群公告的阅读权限;若查询的版本为群公告的历史版本,则需要持有群公告的编辑权限。 */ revision_id?: number /** 此次调用中使用的用户ID的类型 */ @@ -145,7 +165,7 @@ export interface GetDocxChatAnnouncementBlockQuery { user_id_type?: 'user_id' | 'union_id' | 'open_id' } -export interface GetDocxChatAnnouncementBlockChildrenQuery extends Pagination { +export interface GetDocxChatAnnouncementBlockChildrenQuery { /** 查询的群公告版本,-1 表示群公告最新版本。群公告创建后,版本为 1。若查询的版本为群公告最新版本,则需要持有群公告的阅读权限;若查询的版本为群公告的历史版本,则需要持有群公告的更新权限。 */ revision_id?: number /** 此次调用中使用的用户ID的类型 */ @@ -178,7 +198,7 @@ export interface RawContentDocxDocumentQuery { lang?: 0 | 1 | 2 } -export interface ListDocxDocumentBlockQuery extends Pagination { +export interface ListDocxDocumentBlockQuery { /** 查询的文档版本,-1表示文档最新版本。若此时查询的版本为文档最新版本,则需要持有文档的阅读权限;若此时查询的版本为文档的历史版本,则需要持有文档的编辑权限。 */ document_revision_id?: number /** 此次调用中使用的用户ID的类型 */ @@ -284,7 +304,7 @@ export interface BatchUpdateDocxDocumentBlockQuery { user_id_type?: 'user_id' | 'union_id' | 'open_id' } -export interface GetDocxDocumentBlockChildrenQuery extends Pagination { +export interface GetDocxDocumentBlockChildrenQuery { /** 操作的文档版本,-1表示文档最新版本。若此时操作的版本为文档最新版本,则需要持有文档的阅读权限;若此时操作的版本为文档的历史版本,则需要持有文档的编辑权限。 */ document_revision_id?: number /** 此次调用中使用的用户ID的类型 */ @@ -424,11 +444,11 @@ Internal.define({ GET: 'getDocxChatAnnouncement', }, '/open-apis/docx/v1/chats/{chat_id}/announcement/blocks': { - GET: 'listDocxChatAnnouncementBlock', + GET: { name: 'listDocxChatAnnouncementBlock', pagination: { argIndex: 1 } }, }, '/open-apis/docx/v1/chats/{chat_id}/announcement/blocks/{block_id}/children': { POST: 'createDocxChatAnnouncementBlockChildren', - GET: 'getDocxChatAnnouncementBlockChildren', + GET: { name: 'getDocxChatAnnouncementBlockChildren', pagination: { argIndex: 2 } }, }, '/open-apis/docx/v1/chats/{chat_id}/announcement/blocks/batch_update': { PATCH: 'batchUpdateDocxChatAnnouncementBlock', @@ -449,11 +469,11 @@ Internal.define({ GET: 'rawContentDocxDocument', }, '/open-apis/docx/v1/documents/{document_id}/blocks': { - GET: 'listDocxDocumentBlock', + GET: { name: 'listDocxDocumentBlock', pagination: { argIndex: 1 } }, }, '/open-apis/docx/v1/documents/{document_id}/blocks/{block_id}/children': { POST: 'createDocxDocumentBlockChildren', - GET: 'getDocxDocumentBlockChildren', + GET: { name: 'getDocxDocumentBlockChildren', pagination: { argIndex: 2 } }, }, '/open-apis/docx/v1/documents/{document_id}/blocks/{block_id}/descendant': { POST: 'createDocxDocumentBlockDescendant', diff --git a/adapters/lark/src/types/drive.ts b/adapters/lark/src/types/drive.ts index 8b51d81a..57b7e662 100644 --- a/adapters/lark/src/types/drive.ts +++ b/adapters/lark/src/types/drive.ts @@ -7,7 +7,12 @@ declare module '../internal' { * 获取文件夹中的文件清单 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/list */ - listDriveV1File(query?: ListDriveV1FileQuery): Promise + listDriveV1File(query?: ListDriveV1FileQuery & Pagination): Promise> + /** + * 获取文件夹中的文件清单 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/list + */ + listDriveV1FileIter(query?: ListDriveV1FileQuery): AsyncIterator /** * 新建文件夹 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/create_folder @@ -32,7 +37,12 @@ declare module '../internal' { * 获取文件访问记录 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-view_record/list */ - listDriveV1FileViewRecord(file_token: string, query?: ListDriveV1FileViewRecordQuery): Promise> + listDriveV1FileViewRecord(file_token: string, query?: ListDriveV1FileViewRecordQuery & Pagination): Promise> + /** + * 获取文件访问记录 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-view_record/list + */ + listDriveV1FileViewRecordIter(file_token: string, query?: ListDriveV1FileViewRecordQuery): AsyncIterator /** * 复制文件 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/copy @@ -142,7 +152,12 @@ declare module '../internal' { * 获取文档版本列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-version/list */ - listDriveV1FileVersion(file_token: string, query?: ListDriveV1FileVersionQuery): Promise> + listDriveV1FileVersion(file_token: string, query?: ListDriveV1FileVersionQuery & Pagination): Promise> + /** + * 获取文档版本列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-version/list + */ + listDriveV1FileVersionIter(file_token: string, query?: ListDriveV1FileVersionQuery): AsyncIterator /** * 获取文档版本信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-version/get @@ -157,7 +172,12 @@ declare module '../internal' { * 获取云文档的点赞者列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uIzNzUjLyczM14iM3MTN/drive-v2/file-like/list */ - listDriveV2FileLike(file_token: string, query?: ListDriveV2FileLikeQuery): Promise> + listDriveV2FileLike(file_token: string, query?: ListDriveV2FileLikeQuery & Pagination): Promise> + /** + * 获取云文档的点赞者列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uIzNzUjLyczM14iM3MTN/drive-v2/file-like/list + */ + listDriveV2FileLikeIter(file_token: string, query?: ListDriveV2FileLikeQuery): AsyncIterator /** * 订阅云文档事件 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file/subscribe @@ -247,7 +267,12 @@ declare module '../internal' { * 获取云文档所有评论 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment/list */ - listDriveV1FileComment(file_token: string, query?: ListDriveV1FileCommentQuery): Promise> + listDriveV1FileComment(file_token: string, query?: ListDriveV1FileCommentQuery & Pagination): Promise> + /** + * 获取云文档所有评论 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment/list + */ + listDriveV1FileCommentIter(file_token: string, query?: ListDriveV1FileCommentQuery): AsyncIterator /** * 批量获取评论 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment/batch_query @@ -272,7 +297,12 @@ declare module '../internal' { * 获取回复信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment-reply/list */ - listDriveV1FileCommentReply(file_token: string, comment_id: string, query?: ListDriveV1FileCommentReplyQuery): Promise> + listDriveV1FileCommentReply(file_token: string, comment_id: string, query?: ListDriveV1FileCommentReplyQuery & Pagination): Promise> + /** + * 获取回复信息 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment-reply/list + */ + listDriveV1FileCommentReplyIter(file_token: string, comment_id: string, query?: ListDriveV1FileCommentReplyQuery): AsyncIterator /** * 更新回复的内容 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/drive-v1/file-comment-reply/update @@ -301,7 +331,7 @@ declare module '../internal' { } } -export interface ListDriveV1FileQuery extends Pagination { +export interface ListDriveV1FileQuery { /** 文件夹的token(若不填写该参数或填写空字符串,则默认获取用户云空间下的清单,且不支持分页) */ folder_token?: string /** 排序规则 */ @@ -341,7 +371,7 @@ export interface GetDriveV1FileStatisticsQuery { file_type: 'doc' | 'sheet' | 'mindnote' | 'bitable' | 'wiki' | 'file' | 'docx' } -export interface ListDriveV1FileViewRecordQuery extends Pagination { +export interface ListDriveV1FileViewRecordQuery { /** 文档类型 */ file_type: 'doc' | 'docx' | 'sheet' | 'bitable' | 'mindnote' | 'wiki' | 'file' /** 此次调用中使用的访问者 ID 的类型 */ @@ -537,7 +567,7 @@ export interface CreateDriveV1FileVersionQuery { user_id_type?: 'user_id' | 'union_id' | 'open_id' } -export interface ListDriveV1FileVersionQuery extends Pagination { +export interface ListDriveV1FileVersionQuery { /** 原文档类型 */ obj_type: 'docx' | 'sheet' /** 用户id类型 */ @@ -558,7 +588,7 @@ export interface DeleteDriveV1FileVersionQuery { user_id_type?: 'open_id' | 'union_id' | 'user_id' } -export interface ListDriveV2FileLikeQuery extends Pagination { +export interface ListDriveV2FileLikeQuery { /** 文件类型,如果该值为空或者与文件实际类型不匹配,接口会返回失败。 */ file_type: 'doc' | 'docx' | 'file' /** 此次调用中使用的用户ID的类型 */ @@ -753,7 +783,7 @@ export interface PatchDriveV2PermissionPublicQuery { type: 'doc' | 'sheet' | 'file' | 'wiki' | 'bitable' | 'docx' | 'mindnote' | 'minutes' | 'slides' } -export interface ListDriveV1FileCommentQuery extends Pagination { +export interface ListDriveV1FileCommentQuery { /** 文档类型 */ file_type: 'doc' | 'sheet' | 'file' | 'docx' /** 是否全文评论 */ @@ -805,7 +835,7 @@ export interface GetDriveV1FileCommentQuery { user_id_type?: 'user_id' | 'union_id' | 'open_id' } -export interface ListDriveV1FileCommentReplyQuery extends Pagination { +export interface ListDriveV1FileCommentReplyQuery { /** 文档类型 */ file_type: 'doc' | 'sheet' | 'file' | 'docx' /** 此次调用中使用的用户ID的类型 */ @@ -852,15 +882,6 @@ export interface PatchDriveV1FileSubscriptionRequest { file_type: 'doc' | 'docx' | 'wiki' } -export interface ListDriveV1FileResponse { - /** 文档详细信息 */ - files?: File[] - /** 下一页分页参数 */ - next_page_token?: string - /** 是否有下一页 */ - has_more?: boolean -} - export interface CreateFolderDriveV1FileResponse { /** 新创建的文件夹 Token */ token?: string @@ -1166,7 +1187,7 @@ export interface PatchDriveV1FileSubscriptionResponse { Internal.define({ '/open-apis/drive/v1/files': { - GET: 'listDriveV1File', + GET: { name: 'listDriveV1File', pagination: { argIndex: 0, itemsKey: 'files', tokenKey: 'next_page_token' } }, }, '/open-apis/drive/v1/files/create_folder': { POST: 'createFolderDriveV1File', @@ -1181,7 +1202,7 @@ Internal.define({ GET: 'getDriveV1FileStatistics', }, '/open-apis/drive/v1/files/{file_token}/view_records': { - GET: 'listDriveV1FileViewRecord', + GET: { name: 'listDriveV1FileViewRecord', pagination: { argIndex: 1 } }, }, '/open-apis/drive/v1/files/{file_token}/copy': { POST: 'copyDriveV1File', @@ -1245,14 +1266,14 @@ Internal.define({ }, '/open-apis/drive/v1/files/{file_token}/versions': { POST: 'createDriveV1FileVersion', - GET: 'listDriveV1FileVersion', + GET: { name: 'listDriveV1FileVersion', pagination: { argIndex: 1 } }, }, '/open-apis/drive/v1/files/{file_token}/versions/{version_id}': { GET: 'getDriveV1FileVersion', DELETE: 'deleteDriveV1FileVersion', }, '/open-apis/drive/v2/files/{file_token}/likes': { - GET: 'listDriveV2FileLike', + GET: { name: 'listDriveV2FileLike', pagination: { argIndex: 1 } }, }, '/open-apis/drive/v1/files/{file_token}/subscribe': { POST: 'subscribeDriveV1File', @@ -1294,7 +1315,7 @@ Internal.define({ PATCH: 'patchDriveV2PermissionPublic', }, '/open-apis/drive/v1/files/{file_token}/comments': { - GET: 'listDriveV1FileComment', + GET: { name: 'listDriveV1FileComment', pagination: { argIndex: 1 } }, POST: 'createDriveV1FileComment', }, '/open-apis/drive/v1/files/{file_token}/comments/batch_query': { @@ -1305,7 +1326,7 @@ Internal.define({ GET: 'getDriveV1FileComment', }, '/open-apis/drive/v1/files/{file_token}/comments/{comment_id}/replies': { - GET: 'listDriveV1FileCommentReply', + GET: { name: 'listDriveV1FileCommentReply', pagination: { argIndex: 2 } }, }, '/open-apis/drive/v1/files/{file_token}/comments/{comment_id}/replies/{reply_id}': { PUT: 'updateDriveV1FileCommentReply', diff --git a/adapters/lark/src/types/ehr.ts b/adapters/lark/src/types/ehr.ts index f18fbdc5..bc00bbbd 100644 --- a/adapters/lark/src/types/ehr.ts +++ b/adapters/lark/src/types/ehr.ts @@ -7,7 +7,12 @@ declare module '../internal' { * 批量获取员工花名册信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/ehr/ehr-v1/employee/list */ - listEhrEmployee(query?: ListEhrEmployeeQuery): Promise> + listEhrEmployee(query?: ListEhrEmployeeQuery & Pagination): Promise> + /** + * 批量获取员工花名册信息 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/ehr/ehr-v1/employee/list + */ + listEhrEmployeeIter(query?: ListEhrEmployeeQuery): AsyncIterator /** * 下载人员的附件 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/ehr/ehr-v1/attachment/get @@ -16,7 +21,7 @@ declare module '../internal' { } } -export interface ListEhrEmployeeQuery extends Pagination { +export interface ListEhrEmployeeQuery { /** 返回数据类型 */ view?: 'basic' | 'full' /** 员工状态,不传代表查询所有员工状态实际在职 = 2&4可同时查询多个状态的记录,如 status=2&status=4 */ @@ -35,7 +40,7 @@ export interface ListEhrEmployeeQuery extends Pagination { Internal.define({ '/open-apis/ehr/v1/employees': { - GET: 'listEhrEmployee', + GET: { name: 'listEhrEmployee', pagination: { argIndex: 0 } }, }, '/open-apis/ehr/v1/attachments/{token}': { GET: { name: 'getEhrAttachment', type: 'binary' }, diff --git a/adapters/lark/src/types/event.ts b/adapters/lark/src/types/event.ts index 900f75c1..19d7c2f7 100644 --- a/adapters/lark/src/types/event.ts +++ b/adapters/lark/src/types/event.ts @@ -6,15 +6,17 @@ declare module '../internal' { * 获取事件出口 IP * @see https://open.feishu.cn/document/ukTMukTMukTM/uYDNxYjL2QTM24iN0EjN/event-v1/outbound_ip/list */ - listEventOutboundIp(query?: ListEventOutboundIpQuery): Promise> + listEventOutboundIp(query?: Pagination): Promise> + /** + * 获取事件出口 IP + * @see https://open.feishu.cn/document/ukTMukTMukTM/uYDNxYjL2QTM24iN0EjN/event-v1/outbound_ip/list + */ + listEventOutboundIpIter(): AsyncIterator } } -export interface ListEventOutboundIpQuery extends Pagination { -} - Internal.define({ '/open-apis/event/v1/outbound_ip': { - GET: 'listEventOutboundIp', + GET: { name: 'listEventOutboundIp', pagination: { argIndex: 0, itemsKey: 'ip_list' } }, }, }) diff --git a/adapters/lark/src/types/helpdesk.ts b/adapters/lark/src/types/helpdesk.ts index fb6341f5..f5d475a9 100644 --- a/adapters/lark/src/types/helpdesk.ts +++ b/adapters/lark/src/types/helpdesk.ts @@ -142,7 +142,12 @@ declare module '../internal' { * 获取全部工单自定义字段 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/ticket_customized_field/list-ticket-customized-fields */ - listHelpdeskTicketCustomizedField(body: ListHelpdeskTicketCustomizedFieldRequest, query?: ListHelpdeskTicketCustomizedFieldQuery): Promise + listHelpdeskTicketCustomizedField(body: ListHelpdeskTicketCustomizedFieldRequest, query?: Pagination): Promise> + /** + * 获取全部工单自定义字段 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/ticket_customized_field/list-ticket-customized-fields + */ + listHelpdeskTicketCustomizedFieldIter(body: ListHelpdeskTicketCustomizedFieldRequest): AsyncIterator /** * 创建知识库 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/faq/create @@ -167,7 +172,7 @@ declare module '../internal' { * 获取全部知识库详情 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/faq/list */ - listHelpdeskFaq(query?: ListHelpdeskFaqQuery): Promise + listHelpdeskFaq(query?: ListHelpdeskFaqQuery & Pagination): Promise /** * 获取知识库图像 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/faq/faq_image @@ -177,7 +182,12 @@ declare module '../internal' { * 搜索知识库 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/faq/search */ - searchHelpdeskFaq(query?: SearchHelpdeskFaqQuery): Promise> + searchHelpdeskFaq(query?: SearchHelpdeskFaqQuery & Pagination): Promise> + /** + * 搜索知识库 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/faq/search + */ + searchHelpdeskFaqIter(query?: SearchHelpdeskFaqQuery): AsyncIterator /** * 创建知识库分类 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/helpdesk-v1/category/create @@ -451,9 +461,6 @@ export interface ListHelpdeskTicketCustomizedFieldRequest { visible?: boolean } -export interface ListHelpdeskTicketCustomizedFieldQuery extends Pagination { -} - export interface CreateHelpdeskFaqRequest { /** 知识库详情 */ faq?: FaqCreateInfo @@ -464,7 +471,7 @@ export interface PatchHelpdeskFaqRequest { faq?: FaqUpdateInfo } -export interface ListHelpdeskFaqQuery extends Pagination { +export interface ListHelpdeskFaqQuery { /** 知识库分类ID */ category_id?: string /** 搜索条件: 知识库状态 1:在线 0:删除,可恢复 2:删除,不可恢复 */ @@ -473,7 +480,7 @@ export interface ListHelpdeskFaqQuery extends Pagination { search?: string } -export interface SearchHelpdeskFaqQuery extends Pagination { +export interface SearchHelpdeskFaqQuery { /** 搜索query,query内容如果不是英文,包含中文空格等有两种编码策略:1. url编码 2. base64编码,同时加上base64=true参数 */ query: string /** 是否转换为base64,输入true表示是,不填写表示否,中文需要转换为base64 */ @@ -737,15 +744,6 @@ export interface GetHelpdeskTicketCustomizedFieldResponse { dropdown_allow_multiple?: boolean } -export interface ListHelpdeskTicketCustomizedFieldResponse { - /** whether there is more data */ - has_more?: boolean - /** the next page token */ - next_page_token?: string - /** all the ticket customized fields */ - items?: TicketCustomizedField[] -} - export interface CreateHelpdeskFaqResponse { /** faq detail */ faq?: Faq @@ -866,7 +864,7 @@ Internal.define({ }, '/open-apis/helpdesk/v1/ticket_customized_fields': { POST: 'createHelpdeskTicketCustomizedField', - GET: 'listHelpdeskTicketCustomizedField', + GET: { name: 'listHelpdeskTicketCustomizedField', pagination: { argIndex: 1, tokenKey: 'next_page_token' } }, }, '/open-apis/helpdesk/v1/ticket_customized_fields/{ticket_customized_field_id}': { DELETE: 'deleteHelpdeskTicketCustomizedField', @@ -886,7 +884,7 @@ Internal.define({ GET: { name: 'faqImageHelpdeskFaq', type: 'binary' }, }, '/open-apis/helpdesk/v1/faqs/search': { - GET: 'searchHelpdeskFaq', + GET: { name: 'searchHelpdeskFaq', pagination: { argIndex: 0 } }, }, '/open-apis/helpdesk/v1/categories': { POST: 'createHelpdeskCategory', diff --git a/adapters/lark/src/types/hire.ts b/adapters/lark/src/types/hire.ts index 3dfb41b0..b424efd3 100644 --- a/adapters/lark/src/types/hire.ts +++ b/adapters/lark/src/types/hire.ts @@ -7,12 +7,22 @@ declare module '../internal' { * 查询地点列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/location/query */ - queryHireLocation(body: QueryHireLocationRequest, query?: QueryHireLocationQuery): Promise> + queryHireLocation(body: QueryHireLocationRequest, query?: Pagination): Promise> + /** + * 查询地点列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/location/query + */ + queryHireLocationIter(body: QueryHireLocationRequest): AsyncIterator + /** + * 获取地址列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/location/list + */ + listHireLocation(query?: ListHireLocationQuery & Pagination): Promise> /** * 获取地址列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/location/list */ - listHireLocation(query?: ListHireLocationQuery): Promise> + listHireLocationIter(query?: ListHireLocationQuery): AsyncIterator /** * 获取角色详情 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/role/get @@ -22,12 +32,22 @@ declare module '../internal' { * 获取角色列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/role/list */ - listHireRole(query?: ListHireRoleQuery): Promise> + listHireRole(query?: Pagination): Promise> + /** + * 获取角色列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/role/list + */ + listHireRoleIter(): AsyncIterator /** * 获取用户角色列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/user_role/list */ - listHireUserRole(query?: ListHireUserRoleQuery): Promise> + listHireUserRole(query?: ListHireUserRoleQuery & Pagination): Promise> + /** + * 获取用户角色列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/user_role/list + */ + listHireUserRoleIter(query?: ListHireUserRoleQuery): AsyncIterator /** * 新建职位 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job/combined_create @@ -72,7 +92,12 @@ declare module '../internal' { * 获取职位列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job/list */ - listHireJob(query?: ListHireJobQuery): Promise> + listHireJob(query?: ListHireJobQuery & Pagination): Promise> + /** + * 获取职位列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job/list + */ + listHireJobIter(query?: ListHireJobQuery): AsyncIterator /** * 关闭职位 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job/close @@ -87,7 +112,12 @@ declare module '../internal' { * 获取职位模板 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_schema/list */ - listHireJobSchema(query?: ListHireJobSchemaQuery): Promise> + listHireJobSchema(query?: ListHireJobSchemaQuery & Pagination): Promise> + /** + * 获取职位模板 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_schema/list + */ + listHireJobSchemaIter(query?: ListHireJobSchemaQuery): AsyncIterator /** * 发布职位广告 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/advertisement/publish @@ -97,17 +127,32 @@ declare module '../internal' { * 获取职位广告发布记录 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_publish_record/search */ - searchHireJobPublishRecord(body: SearchHireJobPublishRecordRequest, query?: SearchHireJobPublishRecordQuery): Promise> + searchHireJobPublishRecord(body: SearchHireJobPublishRecordRequest, query?: SearchHireJobPublishRecordQuery & Pagination): Promise> + /** + * 获取职位广告发布记录 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_publish_record/search + */ + searchHireJobPublishRecordIter(body: SearchHireJobPublishRecordRequest, query?: SearchHireJobPublishRecordQuery): AsyncIterator + /** + * 获取职能分类列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_function/list + */ + listHireJobFunction(query?: Pagination): Promise> /** * 获取职能分类列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_function/list */ - listHireJobFunction(query?: ListHireJobFunctionQuery): Promise> + listHireJobFunctionIter(): AsyncIterator + /** + * 获取职位类别列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_type/list + */ + listHireJobType(query?: Pagination): Promise> /** * 获取职位类别列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_type/list */ - listHireJobType(query?: ListHireJobTypeQuery): Promise> + listHireJobTypeIter(): AsyncIterator /** * 创建招聘需求 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_requirement/create @@ -127,7 +172,12 @@ declare module '../internal' { * 获取招聘需求列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_requirement/list */ - listHireJobRequirement(query?: ListHireJobRequirementQuery): Promise> + listHireJobRequirement(query?: ListHireJobRequirementQuery & Pagination): Promise> + /** + * 获取招聘需求列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_requirement/list + */ + listHireJobRequirementIter(query?: ListHireJobRequirementQuery): AsyncIterator /** * 删除招聘需求 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_requirement/delete @@ -137,32 +187,62 @@ declare module '../internal' { * 获取招聘需求模板列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_requirement_schema/list */ - listHireJobRequirementSchema(query?: ListHireJobRequirementSchemaQuery): Promise> + listHireJobRequirementSchema(query?: Pagination): Promise> + /** + * 获取招聘需求模板列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_requirement_schema/list + */ + listHireJobRequirementSchemaIter(): AsyncIterator /** * 获取招聘流程信息 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_process/list */ - listHireJobProcess(query?: ListHireJobProcessQuery): Promise> + listHireJobProcess(query?: Pagination): Promise> + /** + * 获取招聘流程信息 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job_process/list + */ + listHireJobProcessIter(): AsyncIterator + /** + * 获取项目列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/subject/list + */ + listHireSubject(query?: ListHireSubjectQuery & Pagination): Promise> /** * 获取项目列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/subject/list */ - listHireSubject(query?: ListHireSubjectQuery): Promise> + listHireSubjectIter(query?: ListHireSubjectQuery): AsyncIterator /** * 获取人才标签信息列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent_tag/list */ - listHireTalentTag(query?: ListHireTalentTagQuery): Promise> + listHireTalentTag(query?: ListHireTalentTagQuery & Pagination): Promise> + /** + * 获取人才标签信息列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent_tag/list + */ + listHireTalentTagIter(query?: ListHireTalentTagQuery): AsyncIterator + /** + * 获取信息登记表列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/registration_schema/list + */ + listHireRegistrationSchema(query?: ListHireRegistrationSchemaQuery & Pagination): Promise> /** * 获取信息登记表列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/registration_schema/list */ - listHireRegistrationSchema(query?: ListHireRegistrationSchemaQuery): Promise> + listHireRegistrationSchemaIter(query?: ListHireRegistrationSchemaQuery): AsyncIterator + /** + * 获取面试评价表列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/interview_feedback_form/list + */ + listHireInterviewFeedbackForm(query?: ListHireInterviewFeedbackFormQuery & Pagination): Promise> /** * 获取面试评价表列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/interview_feedback_form/list */ - listHireInterviewFeedbackForm(query?: ListHireInterviewFeedbackFormQuery): Promise> + listHireInterviewFeedbackFormIter(query?: ListHireInterviewFeedbackFormQuery): AsyncIterator /** * 获取面试轮次类型列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/interview_round_type/list @@ -172,12 +252,22 @@ declare module '../internal' { * 获取面试登记表列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/interview_registration_schema/list */ - listHireInterviewRegistrationSchema(query?: ListHireInterviewRegistrationSchemaQuery): Promise> + listHireInterviewRegistrationSchema(query?: Pagination): Promise> + /** + * 获取面试登记表列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/interview_registration_schema/list + */ + listHireInterviewRegistrationSchemaIter(): AsyncIterator /** * 查询面试官信息列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/interviewer/list */ - listHireInterviewer(query?: ListHireInterviewerQuery): Promise> + listHireInterviewer(query?: ListHireInterviewerQuery & Pagination): Promise> + /** + * 查询面试官信息列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/interviewer/list + */ + listHireInterviewerIter(query?: ListHireInterviewerQuery): AsyncIterator /** * 更新面试官信息 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/interviewer/patch @@ -197,7 +287,12 @@ declare module '../internal' { * 获取 Offer 申请表列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/offer_application_form/list */ - listHireOfferApplicationForm(query?: ListHireOfferApplicationFormQuery): Promise> + listHireOfferApplicationForm(query?: Pagination): Promise> + /** + * 获取 Offer 申请表列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/offer_application_form/list + */ + listHireOfferApplicationFormIter(): AsyncIterator /** * 查询人才内推信息 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/referral/search @@ -207,7 +302,12 @@ declare module '../internal' { * 获取内推官网下职位广告列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/referral_website-job_post/list */ - listHireReferralWebsiteJobPost(query?: ListHireReferralWebsiteJobPostQuery): Promise> + listHireReferralWebsiteJobPost(query?: ListHireReferralWebsiteJobPostQuery & Pagination): Promise> + /** + * 获取内推官网下职位广告列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/referral_website-job_post/list + */ + listHireReferralWebsiteJobPostIter(query?: ListHireReferralWebsiteJobPostQuery): AsyncIterator /** * 获取内推官网下职位广告详情 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/referral_website-job_post/get @@ -237,7 +337,12 @@ declare module '../internal' { * 获取招聘官网推广渠道列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/website-channel/list */ - listHireWebsiteChannel(website_id: string, query?: ListHireWebsiteChannelQuery): Promise> + listHireWebsiteChannel(website_id: string, query?: Pagination): Promise> + /** + * 获取招聘官网推广渠道列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/website-channel/list + */ + listHireWebsiteChannelIter(website_id: string): AsyncIterator /** * 新建招聘官网用户 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/website-site_user/create @@ -252,12 +357,22 @@ declare module '../internal' { * 搜索招聘官网下的职位广告列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/website-job_post/search */ - searchHireWebsiteJobPost(website_id: string, body: SearchHireWebsiteJobPostRequest, query?: SearchHireWebsiteJobPostQuery): Promise> + searchHireWebsiteJobPost(website_id: string, body: SearchHireWebsiteJobPostRequest, query?: SearchHireWebsiteJobPostQuery & Pagination): Promise> + /** + * 搜索招聘官网下的职位广告列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/website-job_post/search + */ + searchHireWebsiteJobPostIter(website_id: string, body: SearchHireWebsiteJobPostRequest, query?: SearchHireWebsiteJobPostQuery): AsyncIterator + /** + * 获取招聘官网下的职位广告列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/website-job_post/list + */ + listHireWebsiteJobPost(website_id: string, query?: ListHireWebsiteJobPostQuery & Pagination): Promise> /** * 获取招聘官网下的职位广告列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/website-job_post/list */ - listHireWebsiteJobPost(website_id: string, query?: ListHireWebsiteJobPostQuery): Promise> + listHireWebsiteJobPostIter(website_id: string, query?: ListHireWebsiteJobPostQuery): AsyncIterator /** * 新建招聘官网投递 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/website-delivery/create_by_resume @@ -277,7 +392,12 @@ declare module '../internal' { * 获取招聘官网列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/website/list */ - listHireWebsite(query?: ListHireWebsiteQuery): Promise> + listHireWebsite(query?: Pagination): Promise> + /** + * 获取招聘官网列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/website/list + */ + listHireWebsiteIter(): AsyncIterator /** * 设置猎头保护期 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/agency/protect @@ -302,12 +422,22 @@ declare module '../internal' { * 查询猎头供应商下猎头列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/agency/get_agency_account */ - getAgencyAccountHireAgency(body: GetAgencyAccountHireAgencyRequest, query?: GetAgencyAccountHireAgencyQuery): Promise> + getAgencyAccountHireAgency(body: GetAgencyAccountHireAgencyRequest, query?: GetAgencyAccountHireAgencyQuery & Pagination): Promise> + /** + * 查询猎头供应商下猎头列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/agency/get_agency_account + */ + getAgencyAccountHireAgencyIter(body: GetAgencyAccountHireAgencyRequest, query?: GetAgencyAccountHireAgencyQuery): AsyncIterator /** * 搜索猎头供应商列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/agency/batch_query */ - batchQueryHireAgency(body: BatchQueryHireAgencyRequest, query?: BatchQueryHireAgencyQuery): Promise> + batchQueryHireAgency(body: BatchQueryHireAgencyRequest, query?: BatchQueryHireAgencyQuery & Pagination): Promise> + /** + * 搜索猎头供应商列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/agency/batch_query + */ + batchQueryHireAgencyIter(body: BatchQueryHireAgencyRequest, query?: BatchQueryHireAgencyQuery): AsyncIterator /** * 禁用/取消禁用猎头 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/agency/operate_agency_account @@ -337,7 +467,12 @@ declare module '../internal' { * 查询外部投递列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/external_application/list */ - listHireExternalApplication(query?: ListHireExternalApplicationQuery): Promise> + listHireExternalApplication(query?: ListHireExternalApplicationQuery & Pagination): Promise> + /** + * 查询外部投递列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/external_application/list + */ + listHireExternalApplicationIter(query?: ListHireExternalApplicationQuery): AsyncIterator /** * 删除外部投递 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/external_application/delete @@ -357,7 +492,12 @@ declare module '../internal' { * 查询外部面试列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/external_interview/batch_query */ - batchQueryHireExternalInterview(body: BatchQueryHireExternalInterviewRequest, query?: BatchQueryHireExternalInterviewQuery): Promise> + batchQueryHireExternalInterview(body: BatchQueryHireExternalInterviewRequest, query?: BatchQueryHireExternalInterviewQuery & Pagination): Promise> + /** + * 查询外部面试列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/external_interview/batch_query + */ + batchQueryHireExternalInterviewIter(body: BatchQueryHireExternalInterviewRequest, query?: BatchQueryHireExternalInterviewQuery): AsyncIterator /** * 删除外部面试 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/external_interview/delete @@ -387,7 +527,12 @@ declare module '../internal' { * 查询外部 Offer 列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/external_offer/batch_query */ - batchQueryHireExternalOffer(body: BatchQueryHireExternalOfferRequest, query?: BatchQueryHireExternalOfferQuery): Promise> + batchQueryHireExternalOffer(body: BatchQueryHireExternalOfferRequest, query?: BatchQueryHireExternalOfferQuery & Pagination): Promise> + /** + * 查询外部 Offer 列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/external_offer/batch_query + */ + batchQueryHireExternalOfferIter(body: BatchQueryHireExternalOfferRequest, query?: BatchQueryHireExternalOfferQuery): AsyncIterator /** * 删除外部 Offer * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/external_offer/delete @@ -407,7 +552,12 @@ declare module '../internal' { * 查询外部背调列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/external_background_check/batch_query */ - batchQueryHireExternalBackgroundCheck(body: BatchQueryHireExternalBackgroundCheckRequest, query?: BatchQueryHireExternalBackgroundCheckQuery): Promise> + batchQueryHireExternalBackgroundCheck(body: BatchQueryHireExternalBackgroundCheckRequest, query?: BatchQueryHireExternalBackgroundCheckQuery & Pagination): Promise> + /** + * 查询外部背调列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/external_background_check/batch_query + */ + batchQueryHireExternalBackgroundCheckIter(body: BatchQueryHireExternalBackgroundCheckRequest, query?: BatchQueryHireExternalBackgroundCheckQuery): AsyncIterator /** * 删除外部背调 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/external_background_check/delete @@ -432,7 +582,12 @@ declare module '../internal' { * 获取人才库列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent_pool/search */ - searchHireTalentPool(query?: SearchHireTalentPoolQuery): Promise> + searchHireTalentPool(query?: SearchHireTalentPoolQuery & Pagination): Promise> + /** + * 获取人才库列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent_pool/search + */ + searchHireTalentPoolIter(query?: SearchHireTalentPoolQuery): AsyncIterator /** * 将人才加入人才库 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent_pool/move_talent @@ -467,7 +622,12 @@ declare module '../internal' { * 获取人才文件夹列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent_folder/list */ - listHireTalentFolder(query?: ListHireTalentFolderQuery): Promise> + listHireTalentFolder(query?: ListHireTalentFolderQuery & Pagination): Promise> + /** + * 获取人才文件夹列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent_folder/list + */ + listHireTalentFolderIter(query?: ListHireTalentFolderQuery): AsyncIterator /** * 批量获取人才ID * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent/batch_get_id @@ -477,7 +637,12 @@ declare module '../internal' { * 获取人才列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent/list */ - listHireTalent(query?: ListHireTalentQuery): Promise> + listHireTalent(query?: ListHireTalentQuery & Pagination): Promise> + /** + * 获取人才列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent/list + */ + listHireTalentIter(query?: ListHireTalentQuery): AsyncIterator /** * 获取人才字段 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent_object/query @@ -532,7 +697,12 @@ declare module '../internal' { * 获取终止投递原因 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/termination_reason/list */ - listHireTerminationReason(query?: ListHireTerminationReasonQuery): Promise> + listHireTerminationReason(query?: Pagination): Promise> + /** + * 获取终止投递原因 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/termination_reason/list + */ + listHireTerminationReasonIter(): AsyncIterator /** * 获取投递信息 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/application/get @@ -542,7 +712,12 @@ declare module '../internal' { * 获取投递列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/application/list */ - listHireApplication(query?: ListHireApplicationQuery): Promise> + listHireApplication(query?: ListHireApplicationQuery & Pagination): Promise> + /** + * 获取投递列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/application/list + */ + listHireApplicationIter(query?: ListHireApplicationQuery): AsyncIterator /** * 获取申请表附加信息 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/diversity_inclusion/search @@ -552,7 +727,12 @@ declare module '../internal' { * 获取简历评估信息列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/evaluation/list */ - listHireEvaluation(query?: ListHireEvaluationQuery): Promise> + listHireEvaluation(query?: ListHireEvaluationQuery & Pagination): Promise> + /** + * 获取简历评估信息列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/evaluation/list + */ + listHireEvaluationIter(query?: ListHireEvaluationQuery): AsyncIterator /** * 添加笔试结果 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/exam/create @@ -562,12 +742,22 @@ declare module '../internal' { * 获取笔试列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/test/search */ - searchHireTest(body: SearchHireTestRequest, query?: SearchHireTestQuery): Promise> + searchHireTest(body: SearchHireTestRequest, query?: SearchHireTestQuery & Pagination): Promise> + /** + * 获取笔试列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/test/search + */ + searchHireTestIter(body: SearchHireTestRequest, query?: SearchHireTestQuery): AsyncIterator + /** + * 获取面试信息 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/interview/list + */ + listHireInterview(query?: ListHireInterviewQuery & Pagination): Promise> /** * 获取面试信息 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/interview/list */ - listHireInterview(query?: ListHireInterviewQuery): Promise> + listHireInterviewIter(query?: ListHireInterviewQuery): AsyncIterator /** * 获取人才面试信息 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/interview/get_by_talent @@ -587,12 +777,22 @@ declare module '../internal' { * 批量获取面试评价详细信息 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/interview_record/list */ - listHireInterviewRecord(query?: ListHireInterviewRecordQuery): Promise> + listHireInterviewRecord(query?: ListHireInterviewRecordQuery & Pagination): Promise> + /** + * 批量获取面试评价详细信息 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/interview_record/list + */ + listHireInterviewRecordIter(query?: ListHireInterviewRecordQuery): AsyncIterator + /** + * 批量获取面试评价详细信息(新版) + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/hire-v2/interview_record/list + */ + listHireInterviewRecord(query?: ListHireInterviewRecordQuery & Pagination): Promise> /** * 批量获取面试评价详细信息(新版) * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/hire-v2/interview_record/list */ - listHireInterviewRecord(query?: ListHireInterviewRecordQuery): Promise> + listHireInterviewRecordIter(query?: ListHireInterviewRecordQuery): AsyncIterator /** * 获取面试记录附件 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/interview_record-attachment/get @@ -602,12 +802,17 @@ declare module '../internal' { * 获取面试速记明细 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/minutes/get */ - getHireMinutes(query?: GetHireMinutesQuery): Promise + getHireMinutes(query?: GetHireMinutesQuery & Pagination): Promise /** * 获取面试满意度问卷列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/questionnaire/list */ - listHireQuestionnaire(query?: ListHireQuestionnaireQuery): Promise> + listHireQuestionnaire(query?: ListHireQuestionnaireQuery & Pagination): Promise> + /** + * 获取面试满意度问卷列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/questionnaire/list + */ + listHireQuestionnaireIter(query?: ListHireQuestionnaireQuery): AsyncIterator /** * 创建 Offer * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/offer/create @@ -632,7 +837,12 @@ declare module '../internal' { * 获取 Offer 列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/offer/list */ - listHireOffer(query?: ListHireOfferQuery): Promise> + listHireOffer(query?: ListHireOfferQuery & Pagination): Promise> + /** + * 获取 Offer 列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/offer/list + */ + listHireOfferIter(query?: ListHireOfferQuery): AsyncIterator /** * 更新 Offer 状态 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/offer/offer_status @@ -647,7 +857,12 @@ declare module '../internal' { * 获取背调信息列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/background_check_order/list */ - listHireBackgroundCheckOrder(query?: ListHireBackgroundCheckOrderQuery): Promise> + listHireBackgroundCheckOrder(query?: ListHireBackgroundCheckOrderQuery & Pagination): Promise> + /** + * 获取背调信息列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/background_check_order/list + */ + listHireBackgroundCheckOrderIter(query?: ListHireBackgroundCheckOrderQuery): AsyncIterator /** * 创建三方协议 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/tripartite_agreement/create @@ -657,7 +872,12 @@ declare module '../internal' { * 获取三方协议 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/tripartite_agreement/list */ - listHireTripartiteAgreement(query?: ListHireTripartiteAgreementQuery): Promise> + listHireTripartiteAgreement(query?: ListHireTripartiteAgreementQuery & Pagination): Promise> + /** + * 获取三方协议 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/tripartite_agreement/list + */ + listHireTripartiteAgreementIter(query?: ListHireTripartiteAgreementQuery): AsyncIterator /** * 更新三方协议 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/tripartite_agreement/update @@ -697,22 +917,42 @@ declare module '../internal' { * 批量获取待办事项 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/todo/list */ - listHireTodo(query?: ListHireTodoQuery): Promise> + listHireTodo(query?: ListHireTodoQuery & Pagination): Promise> + /** + * 批量获取待办事项 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/todo/list + */ + listHireTodoIter(query?: ListHireTodoQuery): AsyncIterator /** * 获取简历评估任务列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/evaluation_task/list */ - listHireEvaluationTask(query?: ListHireEvaluationTaskQuery): Promise> + listHireEvaluationTask(query?: ListHireEvaluationTaskQuery & Pagination): Promise> + /** + * 获取简历评估任务列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/evaluation_task/list + */ + listHireEvaluationTaskIter(query?: ListHireEvaluationTaskQuery): AsyncIterator /** * 获取笔试阅卷任务列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/exam_marking_task/list */ - listHireExamMarkingTask(query?: ListHireExamMarkingTaskQuery): Promise> + listHireExamMarkingTask(query?: ListHireExamMarkingTaskQuery & Pagination): Promise> + /** + * 获取笔试阅卷任务列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/exam_marking_task/list + */ + listHireExamMarkingTaskIter(query?: ListHireExamMarkingTaskQuery): AsyncIterator /** * 获取面试任务列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/interview_task/list */ - listHireInterviewTask(query?: ListHireInterviewTaskQuery): Promise> + listHireInterviewTask(query?: ListHireInterviewTaskQuery & Pagination): Promise> + /** + * 获取面试任务列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/interview_task/list + */ + listHireInterviewTaskIter(query?: ListHireInterviewTaskQuery): AsyncIterator /** * 创建备注 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/note/create @@ -732,7 +972,12 @@ declare module '../internal' { * 获取备注列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/note/list */ - listHireNote(query?: ListHireNoteQuery): Promise> + listHireNote(query?: ListHireNoteQuery & Pagination): Promise> + /** + * 获取备注列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/note/list + */ + listHireNoteIter(query?: ListHireNoteQuery): AsyncIterator /** * 删除备注 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/note/delete @@ -742,7 +987,12 @@ declare module '../internal' { * 获取简历来源列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/resume_source/list */ - listHireResumeSource(query?: ListHireResumeSourceQuery): Promise> + listHireResumeSource(query?: Pagination): Promise> + /** + * 获取简历来源列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/resume_source/list + */ + listHireResumeSourceIter(): AsyncIterator /** * 创建账号自定义字段 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/eco_account_custom_field/create @@ -877,12 +1127,22 @@ declare module '../internal' { * 获取面试记录列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/application-interview/list */ - listHireApplicationInterview(application_id: string, query?: ListHireApplicationInterviewQuery): Promise> + listHireApplicationInterview(application_id: string, query?: ListHireApplicationInterviewQuery & Pagination): Promise> + /** + * 获取面试记录列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/application-interview/list + */ + listHireApplicationInterviewIter(application_id: string, query?: ListHireApplicationInterviewQuery): AsyncIterator + /** + * 查询人才操作记录 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent/talent_operation_log/search + */ + searchHireTalentOperationLog(body: SearchHireTalentOperationLogRequest, query?: SearchHireTalentOperationLogQuery & Pagination): Promise> /** * 查询人才操作记录 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/talent/talent_operation_log/search */ - searchHireTalentOperationLog(body: SearchHireTalentOperationLogRequest, query?: SearchHireTalentOperationLogQuery): Promise> + searchHireTalentOperationLogIter(body: SearchHireTalentOperationLogRequest, query?: SearchHireTalentOperationLogQuery): AsyncIterator /** * 获取职位上的招聘人员信息 * @see https://open.feishu.cn/document/ukTMukTMukTM/uMzM1YjLzMTN24yMzUjN/hire-v1/job-manager/get @@ -903,18 +1163,12 @@ export interface QueryHireLocationRequest { location_type: 1 | 2 | 3 | 4 } -export interface QueryHireLocationQuery extends Pagination { -} - -export interface ListHireLocationQuery extends Pagination { +export interface ListHireLocationQuery { /** 地址类型 */ usage: 'position_location' | 'interview_location' | 'store_location' } -export interface ListHireRoleQuery extends Pagination { -} - -export interface ListHireUserRoleQuery extends Pagination { +export interface ListHireUserRoleQuery { /** 用户 ID */ user_id?: string /** 角色 ID */ @@ -1153,7 +1407,7 @@ export interface ConfigHireJobQuery { user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id' } -export interface ListHireJobQuery extends Pagination { +export interface ListHireJobQuery { /** 最早更新时间,毫秒级时间戳 */ update_start_time?: string /** 最晚更新时间,毫秒级时间戳 */ @@ -1175,7 +1429,7 @@ export interface OpenHireJobRequest { is_never_expired: boolean } -export interface ListHireJobSchemaQuery extends Pagination { +export interface ListHireJobSchemaQuery { /** 职位模板类型 */ scenario?: 1 | 2 } @@ -1190,7 +1444,7 @@ export interface SearchHireJobPublishRecordRequest { job_channel_id: string } -export interface SearchHireJobPublishRecordQuery extends Pagination { +export interface SearchHireJobPublishRecordQuery { /** 用户 ID 类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' /** 此次调用中使用的部门 ID 的类型 */ @@ -1201,12 +1455,6 @@ export interface SearchHireJobPublishRecordQuery extends Pagination { job_family_id_type?: 'people_admin_job_category_id' | 'job_family_id' } -export interface ListHireJobFunctionQuery extends Pagination { -} - -export interface ListHireJobTypeQuery extends Pagination { -} - export interface CreateHireJobRequirementRequest { /** 招聘需求编号 */ short_code: string @@ -1369,7 +1617,7 @@ export interface ListByIdHireJobRequirementQuery { employee_type_id_type?: 'people_admin_employee_type_id' | 'employee_type_enum_id' } -export interface ListHireJobRequirementQuery extends Pagination { +export interface ListHireJobRequirementQuery { /** 职位ID */ job_id?: string /** 起始创建时间,传入毫秒级时间戳 */ @@ -1392,20 +1640,14 @@ export interface ListHireJobRequirementQuery extends Pagination { employee_type_id_type?: 'people_admin_employee_type_id' | 'employee_type_enum_id' } -export interface ListHireJobRequirementSchemaQuery extends Pagination { -} - -export interface ListHireJobProcessQuery extends Pagination { -} - -export interface ListHireSubjectQuery extends Pagination { +export interface ListHireSubjectQuery { /** 用户 ID 类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' /** 项目ID列表 */ subject_ids?: string[] } -export interface ListHireTalentTagQuery extends Pagination { +export interface ListHireTalentTagQuery { /** 搜索关键词 */ keyword?: string /** ID 列表 */ @@ -1416,12 +1658,12 @@ export interface ListHireTalentTagQuery extends Pagination { include_inactive?: boolean } -export interface ListHireRegistrationSchemaQuery extends Pagination { +export interface ListHireRegistrationSchemaQuery { /** 登记表适用场景;不填表示获取全部类型信息登记表 */ scenario?: 5 | 6 | 14 } -export interface ListHireInterviewFeedbackFormQuery extends Pagination { +export interface ListHireInterviewFeedbackFormQuery { /** 面试评价表ID列表, 如果使用此字段则会忽略其他参数 */ interview_feedback_form_ids?: string[] } @@ -1431,10 +1673,7 @@ export interface ListHireInterviewRoundTypeQuery { process_type?: 1 | 2 } -export interface ListHireInterviewRegistrationSchemaQuery extends Pagination { -} - -export interface ListHireInterviewerQuery extends Pagination { +export interface ListHireInterviewerQuery { /** 面试官userID列表 */ user_ids?: string[] /** 认证状态 */ @@ -1464,9 +1703,6 @@ export interface UpdateHireOfferCustomFieldRequest { config?: OfferCustomFieldConfig } -export interface ListHireOfferApplicationFormQuery extends Pagination { -} - export interface SearchHireReferralRequest { /** 人才id */ talent_id: string @@ -1481,7 +1717,7 @@ export interface SearchHireReferralQuery { user_id_type?: 'user_id' | 'union_id' | 'open_id' } -export interface ListHireReferralWebsiteJobPostQuery extends Pagination { +export interface ListHireReferralWebsiteJobPostQuery { /** 招聘流程类型 */ process_type?: 1 | 2 /** 用户 ID 类型 */ @@ -1518,9 +1754,6 @@ export interface UpdateHireWebsiteChannelRequest { channel_name: string } -export interface ListHireWebsiteChannelQuery extends Pagination { -} - export interface CreateHireWebsiteSiteUserRequest { /** 姓名 */ name?: string @@ -1564,7 +1797,7 @@ export interface SearchHireWebsiteJobPostRequest { create_end_time?: string } -export interface SearchHireWebsiteJobPostQuery extends Pagination { +export interface SearchHireWebsiteJobPostQuery { /** 用户 ID 类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' /** 此次调用中使用的部门 ID 的类型 */ @@ -1573,7 +1806,7 @@ export interface SearchHireWebsiteJobPostQuery extends Pagination { job_level_id_type?: 'people_admin_job_level_id' | 'job_level_id' } -export interface ListHireWebsiteJobPostQuery extends Pagination { +export interface ListHireWebsiteJobPostQuery { /** 用户 ID 类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' /** 此次调用中使用的部门 ID 的类型 */ @@ -1629,9 +1862,6 @@ export interface CreateByAttachmentHireWebsiteDeliveryRequest { identification?: WebsiteDeliveryAttachmentIndentification } -export interface ListHireWebsiteQuery extends Pagination { -} - export interface ProtectHireAgencyRequest { /** 人才ID */ talent_id: string @@ -1682,7 +1912,7 @@ export interface GetAgencyAccountHireAgencyRequest { role?: 0 | 1 } -export interface GetAgencyAccountHireAgencyQuery extends Pagination { +export interface GetAgencyAccountHireAgencyQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type?: 'union_id' | 'open_id' } @@ -1696,7 +1926,7 @@ export interface BatchQueryHireAgencyRequest { filter_list?: CommonFilter[] } -export interface BatchQueryHireAgencyQuery extends Pagination { +export interface BatchQueryHireAgencyQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' } @@ -1766,7 +1996,7 @@ export interface UpdateHireExternalApplicationRequest { termination_type?: string } -export interface ListHireExternalApplicationQuery extends Pagination { +export interface ListHireExternalApplicationQuery { /** 人才ID */ talent_id: string } @@ -1809,7 +2039,7 @@ export interface BatchQueryHireExternalInterviewRequest { external_interview_id_list?: string[] } -export interface BatchQueryHireExternalInterviewQuery extends Pagination { +export interface BatchQueryHireExternalInterviewQuery { /** 外部投递 ID */ external_application_id?: string } @@ -1873,7 +2103,7 @@ export interface BatchQueryHireExternalOfferRequest { external_offer_id_list?: string[] } -export interface BatchQueryHireExternalOfferQuery extends Pagination { +export interface BatchQueryHireExternalOfferQuery { /** 外部投递 ID */ external_application_id?: string } @@ -1911,7 +2141,7 @@ export interface BatchQueryHireExternalBackgroundCheckRequest { external_background_check_id_list?: string[] } -export interface BatchQueryHireExternalBackgroundCheckQuery extends Pagination { +export interface BatchQueryHireExternalBackgroundCheckQuery { /** 外部投递 ID */ external_application_id?: string } @@ -1967,7 +2197,7 @@ export interface BatchChangeTalentPoolHireTalentPoolRequest { option_type: 1 | 2 } -export interface SearchHireTalentPoolQuery extends Pagination { +export interface SearchHireTalentPoolQuery { /** 人才库ID列表 */ id_list?: string[] } @@ -2084,7 +2314,7 @@ export interface RemoveToFolderHireTalentRequest { folder_id: string } -export interface ListHireTalentFolderQuery extends Pagination { +export interface ListHireTalentFolderQuery { /** 用户ID类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id' } @@ -2102,7 +2332,7 @@ export interface BatchGetIdHireTalentRequest { identification_number_list?: string[] } -export interface ListHireTalentQuery extends Pagination { +export interface ListHireTalentQuery { /** 搜索关键词,支持布尔语言(使用 and、or、not 连接关键词) */ keyword?: string /** 最早更新时间,毫秒级时间戳 */ @@ -2192,9 +2422,6 @@ export interface TransferStageHireApplicationRequest { stage_id: string } -export interface ListHireTerminationReasonQuery extends Pagination { -} - export interface GetHireApplicationQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' @@ -2202,7 +2429,7 @@ export interface GetHireApplicationQuery { options?: 'get_latest_application_on_chain'[] } -export interface ListHireApplicationQuery extends Pagination { +export interface ListHireApplicationQuery { /** 按流程过滤,招聘流程 ID,枚举值通过接口「获取招聘流程信息」接口获取 */ process_id?: string /** 按招聘阶段过滤,招聘阶段 ID,枚举值通过「获取招聘流程信息」接口获取 */ @@ -2228,7 +2455,7 @@ export interface SearchHireDiversityInclusionRequest { application_ids?: string[] } -export interface ListHireEvaluationQuery extends Pagination { +export interface ListHireEvaluationQuery { /** 投递 ID */ application_id?: string /** 最早更新时间,毫秒级时间戳 */ @@ -2266,12 +2493,12 @@ export interface SearchHireTestRequest { test_start_time_max?: string } -export interface SearchHireTestQuery extends Pagination { +export interface SearchHireTestQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' } -export interface ListHireInterviewQuery extends Pagination { +export interface ListHireInterviewQuery { /** 投递 ID */ application_id?: string /** 面试 ID */ @@ -2305,14 +2532,14 @@ export interface GetHireInterviewRecordQuery { user_id_type?: 'user_id' | 'union_id' | 'open_id' } -export interface ListHireInterviewRecordQuery extends Pagination { +export interface ListHireInterviewRecordQuery { /** 面试评价ID列表,使用该筛选项时不会分页 */ ids?: string[] /** 此次调用中使用的用户ID的类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' } -export interface ListHireInterviewRecordQuery extends Pagination { +export interface ListHireInterviewRecordQuery { /** 面试评价ID列表,使用该筛选项时不会分页 */ ids?: string[] /** 此次调用中使用的用户ID的类型 */ @@ -2328,12 +2555,12 @@ export interface GetHireInterviewRecordAttachmentQuery { language?: 1 | 2 } -export interface GetHireMinutesQuery extends Pagination { +export interface GetHireMinutesQuery { /** 面试ID */ interview_id: string } -export interface ListHireQuestionnaireQuery extends Pagination { +export interface ListHireQuestionnaireQuery { /** 投递 ID */ application_id?: string /** 面试 ID */ @@ -2422,7 +2649,7 @@ export interface GetHireOfferQuery { employee_type_id_type?: 'people_admin_employee_type_id' | 'employee_type_enum_id' } -export interface ListHireOfferQuery extends Pagination { +export interface ListHireOfferQuery { /** 人才 ID */ talent_id: string /** 此次调用中使用的用户ID的类型 */ @@ -2451,7 +2678,7 @@ export interface InternOfferStatusHireOfferRequest { offboarding_info?: InternOfferOffboardingInfo } -export interface ListHireBackgroundCheckOrderQuery extends Pagination { +export interface ListHireBackgroundCheckOrderQuery { /** 用户 ID 类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' /** 投递 ID */ @@ -2471,7 +2698,7 @@ export interface CreateHireTripartiteAgreementRequest { create_time: string } -export interface ListHireTripartiteAgreementQuery extends Pagination { +export interface ListHireTripartiteAgreementQuery { /** 投递 ID,必填投递 id 与三方协议 ID 其中之一 */ application_id?: string /** 三方协议 ID,必填投递 id 与三方协议 ID 其中之一 */ @@ -2578,7 +2805,7 @@ export interface GetHireEmployeeQuery { employee_type_id_type?: 'people_admin_employee_type_id' | 'employee_type_enum_id' } -export interface ListHireTodoQuery extends Pagination { +export interface ListHireTodoQuery { /** 用户 ID,当 token 为租户 token 时,必须传入该字段,当 token 为用户 token 时,不传该字段 */ user_id?: string /** 用户 ID 类型 */ @@ -2587,7 +2814,7 @@ export interface ListHireTodoQuery extends Pagination { type: 'evaluation' | 'offer' | 'exam' | 'interview' } -export interface ListHireEvaluationTaskQuery extends Pagination { +export interface ListHireEvaluationTaskQuery { /** 用户 ID */ user_id: string /** 任务状态 */ @@ -2596,7 +2823,7 @@ export interface ListHireEvaluationTaskQuery extends Pagination { user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id' } -export interface ListHireExamMarkingTaskQuery extends Pagination { +export interface ListHireExamMarkingTaskQuery { /** 用户 ID */ user_id: string /** 任务状态 */ @@ -2605,7 +2832,7 @@ export interface ListHireExamMarkingTaskQuery extends Pagination { user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id' } -export interface ListHireInterviewTaskQuery extends Pagination { +export interface ListHireInterviewTaskQuery { /** 用户 ID */ user_id: string /** 任务状态 */ @@ -2657,16 +2884,13 @@ export interface GetHireNoteQuery { user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id' } -export interface ListHireNoteQuery extends Pagination { +export interface ListHireNoteQuery { /** 人才ID */ talent_id: string /** 此次调用中使用的用户ID的类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id' } -export interface ListHireResumeSourceQuery extends Pagination { -} - export interface CreateHireEcoAccountCustomFieldRequest { /** 适用范围 */ scope: 1 | 2 @@ -2867,7 +3091,7 @@ export interface GetHireAttachmentQuery { type?: 1 | 2 | 3 } -export interface ListHireApplicationInterviewQuery extends Pagination { +export interface ListHireApplicationInterviewQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id' /** 此次调用中使用的「职级 ID」的类型 */ @@ -2883,7 +3107,7 @@ export interface SearchHireTalentOperationLogRequest { operation_list: number[] } -export interface SearchHireTalentOperationLogQuery extends Pagination { +export interface SearchHireTalentOperationLogQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' } @@ -3456,19 +3680,19 @@ export interface GetHireOfferSchemaResponse { Internal.define({ '/open-apis/hire/v1/locations/query': { - POST: 'queryHireLocation', + POST: { name: 'queryHireLocation', pagination: { argIndex: 1 } }, }, '/open-apis/hire/v1/locations': { - GET: 'listHireLocation', + GET: { name: 'listHireLocation', pagination: { argIndex: 0 } }, }, '/open-apis/hire/v1/roles/{role_id}': { GET: 'getHireRole', }, '/open-apis/hire/v1/roles': { - GET: 'listHireRole', + GET: { name: 'listHireRole', pagination: { argIndex: 0 } }, }, '/open-apis/hire/v1/user_roles': { - GET: 'listHireUserRole', + GET: { name: 'listHireUserRole', pagination: { argIndex: 0 } }, }, '/open-apis/hire/v1/jobs/combined_create': { POST: 'combinedCreateHireJob', @@ -3495,7 +3719,7 @@ Internal.define({ GET: 'configHireJob', }, '/open-apis/hire/v1/jobs': { - GET: 'listHireJob', + GET: { name: 'listHireJob', pagination: { argIndex: 0 } }, }, '/open-apis/hire/v1/jobs/{job_id}/close': { POST: 'closeHireJob', @@ -3504,23 +3728,23 @@ Internal.define({ POST: 'openHireJob', }, '/open-apis/hire/v1/job_schemas': { - GET: 'listHireJobSchema', + GET: { name: 'listHireJobSchema', pagination: { argIndex: 0 } }, }, '/open-apis/hire/v1/advertisements/{advertisement_id}/publish': { POST: 'publishHireAdvertisement', }, '/open-apis/hire/v1/job_publish_records/search': { - POST: 'searchHireJobPublishRecord', + POST: { name: 'searchHireJobPublishRecord', pagination: { argIndex: 1 } }, }, '/open-apis/hire/v1/job_functions': { - GET: 'listHireJobFunction', + GET: { name: 'listHireJobFunction', pagination: { argIndex: 0 } }, }, '/open-apis/hire/v1/job_types': { - GET: 'listHireJobType', + GET: { name: 'listHireJobType', pagination: { argIndex: 0 } }, }, '/open-apis/hire/v1/job_requirements': { POST: 'createHireJobRequirement', - GET: 'listHireJobRequirement', + GET: { name: 'listHireJobRequirement', pagination: { argIndex: 0 } }, }, '/open-apis/hire/v1/job_requirements/{job_requirement_id}': { PUT: 'updateHireJobRequirement', @@ -3530,31 +3754,31 @@ Internal.define({ POST: 'listByIdHireJobRequirement', }, '/open-apis/hire/v1/job_requirement_schemas': { - GET: 'listHireJobRequirementSchema', + GET: { name: 'listHireJobRequirementSchema', pagination: { argIndex: 0 } }, }, '/open-apis/hire/v1/job_processes': { - GET: 'listHireJobProcess', + GET: { name: 'listHireJobProcess', pagination: { argIndex: 0 } }, }, '/open-apis/hire/v1/subjects': { - GET: 'listHireSubject', + GET: { name: 'listHireSubject', pagination: { argIndex: 0 } }, }, '/open-apis/hire/v1/talent_tags': { - GET: 'listHireTalentTag', + GET: { name: 'listHireTalentTag', pagination: { argIndex: 0 } }, }, '/open-apis/hire/v1/registration_schemas': { - GET: 'listHireRegistrationSchema', + GET: { name: 'listHireRegistrationSchema', pagination: { argIndex: 0 } }, }, '/open-apis/hire/v1/interview_feedback_forms': { - GET: 'listHireInterviewFeedbackForm', + GET: { name: 'listHireInterviewFeedbackForm', pagination: { argIndex: 0 } }, }, '/open-apis/hire/v1/interview_round_types': { GET: 'listHireInterviewRoundType', }, '/open-apis/hire/v1/interview_registration_schemas': { - GET: 'listHireInterviewRegistrationSchema', + GET: { name: 'listHireInterviewRegistrationSchema', pagination: { argIndex: 0 } }, }, '/open-apis/hire/v1/interviewers': { - GET: 'listHireInterviewer', + GET: { name: 'listHireInterviewer', pagination: { argIndex: 0 } }, }, '/open-apis/hire/v1/interviewers/{interviewer_id}': { PATCH: 'patchHireInterviewer', @@ -3566,13 +3790,13 @@ Internal.define({ GET: 'getHireOfferApplicationForm', }, '/open-apis/hire/v1/offer_application_forms': { - GET: 'listHireOfferApplicationForm', + GET: { name: 'listHireOfferApplicationForm', pagination: { argIndex: 0 } }, }, '/open-apis/hire/v1/referrals/search': { POST: 'searchHireReferral', }, '/open-apis/hire/v1/referral_websites/job_posts': { - GET: 'listHireReferralWebsiteJobPost', + GET: { name: 'listHireReferralWebsiteJobPost', pagination: { argIndex: 0 } }, }, '/open-apis/hire/v1/referral_websites/job_posts/{job_post_id}': { GET: 'getHireReferralWebsiteJobPost', @@ -3582,7 +3806,7 @@ Internal.define({ }, '/open-apis/hire/v1/websites/{website_id}/channels': { POST: 'createHireWebsiteChannel', - GET: 'listHireWebsiteChannel', + GET: { name: 'listHireWebsiteChannel', pagination: { argIndex: 1, itemsKey: 'website_channel_list' } }, }, '/open-apis/hire/v1/websites/{website_id}/channels/{channel_id}': { DELETE: 'deleteHireWebsiteChannel', @@ -3595,10 +3819,10 @@ Internal.define({ GET: 'getHireWebsiteJobPost', }, '/open-apis/hire/v1/websites/{website_id}/job_posts/search': { - POST: 'searchHireWebsiteJobPost', + POST: { name: 'searchHireWebsiteJobPost', pagination: { argIndex: 2 } }, }, '/open-apis/hire/v1/websites/{website_id}/job_posts': { - GET: 'listHireWebsiteJobPost', + GET: { name: 'listHireWebsiteJobPost', pagination: { argIndex: 1 } }, }, '/open-apis/hire/v1/websites/{website_id}/deliveries/create_by_resume': { POST: 'createByResumeHireWebsiteDelivery', @@ -3610,7 +3834,7 @@ Internal.define({ GET: 'getHireWebsiteDeliveryTask', }, '/open-apis/hire/v1/websites': { - GET: 'listHireWebsite', + GET: { name: 'listHireWebsite', pagination: { argIndex: 0 } }, }, '/open-apis/hire/v1/agencies/protect': { POST: 'protectHireAgency', @@ -3625,10 +3849,10 @@ Internal.define({ GET: 'queryHireAgency', }, '/open-apis/hire/v1/agencies/get_agency_account': { - POST: 'getAgencyAccountHireAgency', + POST: { name: 'getAgencyAccountHireAgency', pagination: { argIndex: 1 } }, }, '/open-apis/hire/v1/agencies/batch_query': { - POST: 'batchQueryHireAgency', + POST: { name: 'batchQueryHireAgency', pagination: { argIndex: 1 } }, }, '/open-apis/hire/v1/agencies/operate_agency_account': { POST: 'operateAgencyAccountHireAgency', @@ -3639,7 +3863,7 @@ Internal.define({ }, '/open-apis/hire/v1/external_applications': { POST: 'createHireExternalApplication', - GET: 'listHireExternalApplication', + GET: { name: 'listHireExternalApplication', pagination: { argIndex: 0 } }, }, '/open-apis/hire/v1/external_applications/{external_application_id}': { PUT: 'updateHireExternalApplication', @@ -3653,7 +3877,7 @@ Internal.define({ DELETE: 'deleteHireExternalInterview', }, '/open-apis/hire/v1/external_interviews/batch_query': { - POST: 'batchQueryHireExternalInterview', + POST: { name: 'batchQueryHireExternalInterview', pagination: { argIndex: 1 } }, }, '/open-apis/hire/v1/external_interview_assessments': { POST: 'createHireExternalInterviewAssessment', @@ -3669,7 +3893,7 @@ Internal.define({ DELETE: 'deleteHireExternalOffer', }, '/open-apis/hire/v1/external_offers/batch_query': { - POST: 'batchQueryHireExternalOffer', + POST: { name: 'batchQueryHireExternalOffer', pagination: { argIndex: 1 } }, }, '/open-apis/hire/v1/external_background_checks': { POST: 'createHireExternalBackgroundCheck', @@ -3679,7 +3903,7 @@ Internal.define({ DELETE: 'deleteHireExternalBackgroundCheck', }, '/open-apis/hire/v1/external_background_checks/batch_query': { - POST: 'batchQueryHireExternalBackgroundCheck', + POST: { name: 'batchQueryHireExternalBackgroundCheck', pagination: { argIndex: 1 } }, }, '/open-apis/hire/v1/external_referral_rewards': { POST: 'createHireExternalReferralReward', @@ -3691,7 +3915,7 @@ Internal.define({ POST: 'batchChangeTalentPoolHireTalentPool', }, '/open-apis/hire/v1/talent_pools/': { - GET: 'searchHireTalentPool', + GET: { name: 'searchHireTalentPool', pagination: { argIndex: 0 } }, }, '/open-apis/hire/v1/talent_pools/{talent_pool_id}/talent_relationship': { POST: 'moveTalentHireTalentPool', @@ -3712,13 +3936,13 @@ Internal.define({ POST: 'removeToFolderHireTalent', }, '/open-apis/hire/v1/talent_folders': { - GET: 'listHireTalentFolder', + GET: { name: 'listHireTalentFolder', pagination: { argIndex: 0 } }, }, '/open-apis/hire/v1/talents/batch_get_id': { POST: 'batchGetIdHireTalent', }, '/open-apis/hire/v1/talents': { - GET: 'listHireTalent', + GET: { name: 'listHireTalent', pagination: { argIndex: 0 } }, }, '/open-apis/hire/v1/talent_objects/query': { GET: 'queryHireTalentObject', @@ -3743,7 +3967,7 @@ Internal.define({ }, '/open-apis/hire/v1/applications': { POST: 'createHireApplication', - GET: 'listHireApplication', + GET: { name: 'listHireApplication', pagination: { argIndex: 0 } }, }, '/open-apis/hire/v1/applications/{application_id}/terminate': { POST: 'terminateHireApplication', @@ -3752,7 +3976,7 @@ Internal.define({ POST: 'transferStageHireApplication', }, '/open-apis/hire/v1/termination_reasons': { - GET: 'listHireTerminationReason', + GET: { name: 'listHireTerminationReason', pagination: { argIndex: 0 } }, }, '/open-apis/hire/v1/applications/{application_id}': { GET: 'getHireApplication', @@ -3761,16 +3985,16 @@ Internal.define({ POST: 'searchHireDiversityInclusion', }, '/open-apis/hire/v1/evaluations': { - GET: 'listHireEvaluation', + GET: { name: 'listHireEvaluation', pagination: { argIndex: 0 } }, }, '/open-apis/hire/v1/exams': { POST: 'createHireExam', }, '/open-apis/hire/v1/tests/search': { - POST: 'searchHireTest', + POST: { name: 'searchHireTest', pagination: { argIndex: 1 } }, }, '/open-apis/hire/v1/interviews': { - GET: 'listHireInterview', + GET: { name: 'listHireInterview', pagination: { argIndex: 0 } }, }, '/open-apis/hire/v1/interviews/get_by_talent': { GET: 'getByTalentHireInterview', @@ -3782,10 +4006,10 @@ Internal.define({ GET: 'getHireInterviewRecord', }, '/open-apis/hire/v1/interview_records': { - GET: 'listHireInterviewRecord', + GET: { name: 'listHireInterviewRecord', pagination: { argIndex: 0 } }, }, '/open-apis/hire/v2/interview_records': { - GET: 'listHireInterviewRecord', + GET: { name: 'listHireInterviewRecord', pagination: { argIndex: 0 } }, }, '/open-apis/hire/v1/interview_records/attachments': { GET: 'getHireInterviewRecordAttachment', @@ -3794,11 +4018,11 @@ Internal.define({ GET: 'getHireMinutes', }, '/open-apis/hire/v1/questionnaires': { - GET: 'listHireQuestionnaire', + GET: { name: 'listHireQuestionnaire', pagination: { argIndex: 0 } }, }, '/open-apis/hire/v1/offers': { POST: 'createHireOffer', - GET: 'listHireOffer', + GET: { name: 'listHireOffer', pagination: { argIndex: 0 } }, }, '/open-apis/hire/v1/offers/{offer_id}': { PUT: 'updateHireOffer', @@ -3814,11 +4038,11 @@ Internal.define({ POST: 'internOfferStatusHireOffer', }, '/open-apis/hire/v1/background_check_orders': { - GET: 'listHireBackgroundCheckOrder', + GET: { name: 'listHireBackgroundCheckOrder', pagination: { argIndex: 0 } }, }, '/open-apis/hire/v1/tripartite_agreements': { POST: 'createHireTripartiteAgreement', - GET: 'listHireTripartiteAgreement', + GET: { name: 'listHireTripartiteAgreement', pagination: { argIndex: 0 } }, }, '/open-apis/hire/v1/tripartite_agreements/{tripartite_agreement_id}': { PUT: 'updateHireTripartiteAgreement', @@ -3838,20 +4062,20 @@ Internal.define({ GET: 'getByApplicationHireEmployee', }, '/open-apis/hire/v1/todos': { - GET: 'listHireTodo', + GET: { name: 'listHireTodo', pagination: { argIndex: 0 } }, }, '/open-apis/hire/v1/evaluation_tasks': { - GET: 'listHireEvaluationTask', + GET: { name: 'listHireEvaluationTask', pagination: { argIndex: 0 } }, }, '/open-apis/hire/v1/exam_marking_tasks': { - GET: 'listHireExamMarkingTask', + GET: { name: 'listHireExamMarkingTask', pagination: { argIndex: 0 } }, }, '/open-apis/hire/v1/interview_tasks': { - GET: 'listHireInterviewTask', + GET: { name: 'listHireInterviewTask', pagination: { argIndex: 0 } }, }, '/open-apis/hire/v1/notes': { POST: 'createHireNote', - GET: 'listHireNote', + GET: { name: 'listHireNote', pagination: { argIndex: 0 } }, }, '/open-apis/hire/v1/notes/{note_id}': { PATCH: 'patchHireNote', @@ -3859,7 +4083,7 @@ Internal.define({ DELETE: 'deleteHireNote', }, '/open-apis/hire/v1/resume_sources': { - GET: 'listHireResumeSource', + GET: { name: 'listHireResumeSource', pagination: { argIndex: 0 } }, }, '/open-apis/hire/v1/eco_account_custom_fields': { POST: 'createHireEcoAccountCustomField', @@ -3940,10 +4164,10 @@ Internal.define({ GET: 'previewHireAttachment', }, '/open-apis/hire/v1/applications/{application_id}/interviews': { - GET: 'listHireApplicationInterview', + GET: { name: 'listHireApplicationInterview', pagination: { argIndex: 1 } }, }, '/open-apis/hire/v1/talent_operation_logs/search': { - POST: 'searchHireTalentOperationLog', + POST: { name: 'searchHireTalentOperationLog', pagination: { argIndex: 1 } }, }, '/open-apis/hire/v1/jobs/{job_id}/managers/{manager_id}': { GET: 'getHireJobManager', diff --git a/adapters/lark/src/types/im.ts b/adapters/lark/src/types/im.ts index 9353bb0b..281ae2c8 100644 --- a/adapters/lark/src/types/im.ts +++ b/adapters/lark/src/types/im.ts @@ -47,12 +47,22 @@ declare module '../internal' { * 查询消息已读信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/read_users */ - readUsersImMessage(message_id: string, query?: ReadUsersImMessageQuery): Promise> + readUsersImMessage(message_id: string, query?: ReadUsersImMessageQuery & Pagination): Promise> + /** + * 查询消息已读信息 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/read_users + */ + readUsersImMessageIter(message_id: string, query?: ReadUsersImMessageQuery): AsyncIterator + /** + * 获取会话历史消息 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/list + */ + listImMessage(query?: ListImMessageQuery & Pagination): Promise> /** * 获取会话历史消息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/list */ - listImMessage(query?: ListImMessageQuery): Promise> + listImMessageIter(query?: ListImMessageQuery): AsyncIterator /** * 获取消息中的资源文件 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message-resource/get @@ -122,7 +132,12 @@ declare module '../internal' { * 获取消息表情回复 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message-reaction/list */ - listImMessageReaction(message_id: string, query?: ListImMessageReactionQuery): Promise> + listImMessageReaction(message_id: string, query?: ListImMessageReactionQuery & Pagination): Promise> + /** + * 获取消息表情回复 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message-reaction/list + */ + listImMessageReactionIter(message_id: string, query?: ListImMessageReactionQuery): AsyncIterator /** * 删除消息表情回复 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message-reaction/delete @@ -142,7 +157,12 @@ declare module '../internal' { * 获取群内 Pin 消息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/pin/list */ - listImPin(query?: ListImPinQuery): Promise> + listImPin(query?: ListImPinQuery & Pagination): Promise> + /** + * 获取群内 Pin 消息 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/pin/list + */ + listImPinIter(query?: ListImPinQuery): AsyncIterator /** * 更新应用发送的消息卡片 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/patch @@ -192,17 +212,27 @@ declare module '../internal' { * 获取用户或机器人所在的群列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat/list */ - listImChat(query?: ListImChatQuery): Promise> + listImChat(query?: ListImChatQuery & Pagination): Promise> + /** + * 获取用户或机器人所在的群列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat/list + */ + listImChatIter(query?: ListImChatQuery): AsyncIterator + /** + * 搜索对用户或机器人可见的群列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat/search + */ + searchImChat(query?: SearchImChatQuery & Pagination): Promise> /** * 搜索对用户或机器人可见的群列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat/search */ - searchImChat(query?: SearchImChatQuery): Promise> + searchImChatIter(query?: SearchImChatQuery): AsyncIterator /** * 获取群成员发言权限 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-moderation/get */ - getImChatModeration(chat_id: string, query?: GetImChatModerationQuery): Promise + getImChatModeration(chat_id: string, query?: GetImChatModerationQuery & Pagination): Promise /** * 获取群分享链接 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat/link @@ -237,7 +267,7 @@ declare module '../internal' { * 获取群成员列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-members/get */ - getImChatMembers(chat_id: string, query?: GetImChatMembersQuery): Promise + getImChatMembers(chat_id: string, query?: GetImChatMembersQuery & Pagination): Promise /** * 判断用户或机器人是否在群里 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-members/is_in_chat @@ -438,12 +468,12 @@ export interface PushFollowUpImMessageRequest { follow_ups: FollowUp[] } -export interface ReadUsersImMessageQuery extends Pagination { +export interface ReadUsersImMessageQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type: 'user_id' | 'union_id' | 'open_id' } -export interface ListImMessageQuery extends Pagination { +export interface ListImMessageQuery { /** 容器类型 ,目前可选值仅有"chat",包含单聊(p2p)和群聊(group) */ container_id_type: string /** 容器的id,即chat的id,详情参见[群ID 说明](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-id-description) */ @@ -519,7 +549,7 @@ export interface CreateImMessageReactionRequest { reaction_type: Emoji } -export interface ListImMessageReactionQuery extends Pagination { +export interface ListImMessageReactionQuery { /** 待查询消息reaction的类型[emoji类型列举](/ssl:ttdoc/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message-reaction/emojis-introduce)。- 不传入该参数,表示拉取所有类型reaction */ reaction_type?: string /** 当操作人为用户时返回用户ID的类型 */ @@ -531,7 +561,7 @@ export interface CreateImPinRequest { message_id: string } -export interface ListImPinQuery extends Pagination { +export interface ListImPinQuery { /** 待获取Pin消息的Chat ID */ chat_id: string /** Pin信息的起始时间(毫秒级时间戳) */ @@ -668,21 +698,21 @@ export interface PutTopNoticeImChatTopNoticeRequest { chat_top_notice: ChatTopNotice[] } -export interface ListImChatQuery extends Pagination { +export interface ListImChatQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' /** 群组排序方式 */ sort_type?: 'ByCreateTimeAsc' | 'ByActiveTimeDesc' } -export interface SearchImChatQuery extends Pagination { +export interface SearchImChatQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' /** 关键词。注意:如果query为空值将返回空的结果 */ query?: string } -export interface GetImChatModerationQuery extends Pagination { +export interface GetImChatModerationQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' } @@ -734,7 +764,7 @@ export interface DeleteImChatMembersQuery { member_id_type?: 'user_id' | 'union_id' | 'open_id' | 'app_id' } -export interface GetImChatMembersQuery extends Pagination { +export interface GetImChatMembersQuery { /** 群成员 用户 ID 类型,详情参见 [用户相关的 ID 概念](/ssl:ttdoc/home/user-identity-introduction/introduction) */ member_id_type?: 'user_id' | 'union_id' | 'open_id' } @@ -1427,7 +1457,7 @@ export interface PatchImTagResponse { Internal.define({ '/open-apis/im/v1/messages': { POST: 'createImMessage', - GET: 'listImMessage', + GET: { name: 'listImMessage', pagination: { argIndex: 0 } }, }, '/open-apis/im/v1/messages/{message_id}/reply': { POST: 'replyImMessage', @@ -1451,7 +1481,7 @@ Internal.define({ POST: 'pushFollowUpImMessage', }, '/open-apis/im/v1/messages/{message_id}/read_users': { - GET: 'readUsersImMessage', + GET: { name: 'readUsersImMessage', pagination: { argIndex: 1 } }, }, '/open-apis/im/v1/messages/{message_id}/resources/{file_key}': { GET: { name: 'getImMessageResource', type: 'binary' }, @@ -1488,14 +1518,14 @@ Internal.define({ }, '/open-apis/im/v1/messages/{message_id}/reactions': { POST: 'createImMessageReaction', - GET: 'listImMessageReaction', + GET: { name: 'listImMessageReaction', pagination: { argIndex: 1 } }, }, '/open-apis/im/v1/messages/{message_id}/reactions/{reaction_id}': { DELETE: 'deleteImMessageReaction', }, '/open-apis/im/v1/pins': { POST: 'createImPin', - GET: 'listImPin', + GET: { name: 'listImPin', pagination: { argIndex: 0 } }, }, '/open-apis/im/v1/pins/{message_id}': { DELETE: 'deleteImPin', @@ -1505,7 +1535,7 @@ Internal.define({ }, '/open-apis/im/v1/chats': { POST: 'createImChat', - GET: 'listImChat', + GET: { name: 'listImChat', pagination: { argIndex: 0 } }, }, '/open-apis/im/v1/chats/{chat_id}': { DELETE: 'deleteImChat', @@ -1523,7 +1553,7 @@ Internal.define({ POST: 'deleteTopNoticeImChatTopNotice', }, '/open-apis/im/v1/chats/search': { - GET: 'searchImChat', + GET: { name: 'searchImChat', pagination: { argIndex: 0 } }, }, '/open-apis/im/v1/chats/{chat_id}/link': { POST: 'linkImChat', diff --git a/adapters/lark/src/types/lingo.ts b/adapters/lark/src/types/lingo.ts index c9d33ab5..1cddd76e 100644 --- a/adapters/lark/src/types/lingo.ts +++ b/adapters/lark/src/types/lingo.ts @@ -37,7 +37,12 @@ declare module '../internal' { * 获取词条列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/lingo-v1/entity/list */ - listLingoEntity(query?: ListLingoEntityQuery): Promise> + listLingoEntity(query?: ListLingoEntityQuery & Pagination): Promise> + /** + * 获取词条列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/lingo-v1/entity/list + */ + listLingoEntityIter(query?: ListLingoEntityQuery): AsyncIterator /** * 精准搜索词条 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/lingo-v1/entity/match @@ -47,7 +52,12 @@ declare module '../internal' { * 模糊搜索词条 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/lingo-v1/entity/search */ - searchLingoEntity(body: SearchLingoEntityRequest, query?: SearchLingoEntityQuery): Promise> + searchLingoEntity(body: SearchLingoEntityRequest, query?: SearchLingoEntityQuery & Pagination): Promise> + /** + * 模糊搜索词条 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/lingo-v1/entity/search + */ + searchLingoEntityIter(body: SearchLingoEntityRequest, query?: SearchLingoEntityQuery): AsyncIterator /** * 词条高亮 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/lingo-v1/entity/highlight @@ -57,7 +67,12 @@ declare module '../internal' { * 获取词典分类 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/lingo-v1/classification/list */ - listLingoClassification(query?: ListLingoClassificationQuery): Promise> + listLingoClassification(query?: ListLingoClassificationQuery & Pagination): Promise> + /** + * 获取词典分类 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/lingo-v1/classification/list + */ + listLingoClassificationIter(query?: ListLingoClassificationQuery): AsyncIterator /** * 获取词库列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/lingo-v1/repo/list @@ -186,7 +201,7 @@ export interface GetLingoEntityQuery { user_id_type?: 'user_id' | 'union_id' | 'open_id' } -export interface ListLingoEntityQuery extends Pagination { +export interface ListLingoEntityQuery { /** 数据提供方【可用来过滤数据】 */ provider?: string /** 词库 id */ @@ -216,7 +231,7 @@ export interface SearchLingoEntityRequest { creators?: string[] } -export interface SearchLingoEntityQuery extends Pagination { +export interface SearchLingoEntityQuery { /** 词库ID */ repo_id?: string /** 此次调用中使用的用户ID的类型 */ @@ -228,7 +243,7 @@ export interface HighlightLingoEntityRequest { text: string } -export interface ListLingoClassificationQuery extends Pagination { +export interface ListLingoClassificationQuery { /** 词库ID */ repo_id?: string } @@ -290,7 +305,7 @@ Internal.define({ }, '/open-apis/lingo/v1/entities': { POST: 'createLingoEntity', - GET: 'listLingoEntity', + GET: { name: 'listLingoEntity', pagination: { argIndex: 0, itemsKey: 'entities' } }, }, '/open-apis/lingo/v1/entities/{entity_id}': { PUT: 'updateLingoEntity', @@ -301,13 +316,13 @@ Internal.define({ POST: 'matchLingoEntity', }, '/open-apis/lingo/v1/entities/search': { - POST: 'searchLingoEntity', + POST: { name: 'searchLingoEntity', pagination: { argIndex: 1, itemsKey: 'entities' } }, }, '/open-apis/lingo/v1/entities/highlight': { POST: 'highlightLingoEntity', }, '/open-apis/lingo/v1/classifications': { - GET: 'listLingoClassification', + GET: { name: 'listLingoClassification', pagination: { argIndex: 0 } }, }, '/open-apis/lingo/v1/repos': { GET: 'listLingoRepo', diff --git a/adapters/lark/src/types/mail.ts b/adapters/lark/src/types/mail.ts index eba6687d..0b4b1434 100644 --- a/adapters/lark/src/types/mail.ts +++ b/adapters/lark/src/types/mail.ts @@ -37,7 +37,12 @@ declare module '../internal' { * 批量获取邮件组 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup/list */ - listMailMailgroup(query?: ListMailMailgroupQuery): Promise> + listMailMailgroup(query?: ListMailMailgroupQuery & Pagination): Promise> + /** + * 批量获取邮件组 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup/list + */ + listMailMailgroupIter(query?: ListMailMailgroupQuery): AsyncIterator /** * 批量创建邮件组管理员 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-manager/batch_create @@ -52,7 +57,12 @@ declare module '../internal' { * 批量获取邮件组管理员 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-manager/list */ - listMailMailgroupManager(mailgroup_id: string, query?: ListMailMailgroupManagerQuery): Promise> + listMailMailgroupManager(mailgroup_id: string, query?: ListMailMailgroupManagerQuery & Pagination): Promise> + /** + * 批量获取邮件组管理员 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-manager/list + */ + listMailMailgroupManagerIter(mailgroup_id: string, query?: ListMailMailgroupManagerQuery): AsyncIterator /** * 创建邮件组成员 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-member/create @@ -72,7 +82,12 @@ declare module '../internal' { * 获取所有邮件组成员 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-member/list */ - listMailMailgroupMember(mailgroup_id: string, query?: ListMailMailgroupMemberQuery): Promise> + listMailMailgroupMember(mailgroup_id: string, query?: ListMailMailgroupMemberQuery & Pagination): Promise> + /** + * 获取所有邮件组成员 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-member/list + */ + listMailMailgroupMemberIter(mailgroup_id: string, query?: ListMailMailgroupMemberQuery): AsyncIterator /** * 批量创建邮件组成员 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-member/batch_create @@ -117,7 +132,12 @@ declare module '../internal' { * 批量获取邮件组权限成员 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-permission_member/list */ - listMailMailgroupPermissionMember(mailgroup_id: string, query?: ListMailMailgroupPermissionMemberQuery): Promise> + listMailMailgroupPermissionMember(mailgroup_id: string, query?: ListMailMailgroupPermissionMemberQuery & Pagination): Promise> + /** + * 批量获取邮件组权限成员 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-permission_member/list + */ + listMailMailgroupPermissionMemberIter(mailgroup_id: string, query?: ListMailMailgroupPermissionMemberQuery): AsyncIterator /** * 批量创建邮件组权限成员 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/mailgroup-permission_member/batch_create @@ -152,7 +172,12 @@ declare module '../internal' { * 查询所有公共邮箱 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/public_mailbox/list */ - listMailPublicMailbox(query?: ListMailPublicMailboxQuery): Promise> + listMailPublicMailbox(query?: Pagination): Promise> + /** + * 查询所有公共邮箱 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/public_mailbox/list + */ + listMailPublicMailboxIter(): AsyncIterator /** * 永久删除公共邮箱 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/public_mailbox/delete @@ -182,7 +207,12 @@ declare module '../internal' { * 查询所有公共邮箱成员信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/public_mailbox-member/list */ - listMailPublicMailboxMember(public_mailbox_id: string, query?: ListMailPublicMailboxMemberQuery): Promise> + listMailPublicMailboxMember(public_mailbox_id: string, query?: ListMailPublicMailboxMemberQuery & Pagination): Promise> + /** + * 查询所有公共邮箱成员信息 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/public_mailbox-member/list + */ + listMailPublicMailboxMemberIter(public_mailbox_id: string, query?: ListMailPublicMailboxMemberQuery): AsyncIterator /** * 批量添加公共邮箱成员 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/public_mailbox-member/batch_create @@ -227,7 +257,7 @@ declare module '../internal' { * 获取用户邮箱所有别名 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/user_mailbox-alias/list */ - listMailUserMailboxAlias(user_mailbox_id: string, query?: ListMailUserMailboxAliasQuery): Promise + listMailUserMailboxAlias(user_mailbox_id: string, query?: Pagination): Promise /** * 查询邮箱地址状态 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/mail-v1/user/query @@ -292,7 +322,7 @@ export interface UpdateMailMailgroupRequest { who_can_send_mail?: 'ANYONE' | 'ALL_INTERNAL_USERS' | 'ALL_GROUP_MEMBERS' | 'CUSTOM_MEMBERS' } -export interface ListMailMailgroupQuery extends Pagination { +export interface ListMailMailgroupQuery { /** 邮件组管理员用户ID,用于获取该用户有管理权限的邮件组 */ manager_user_id?: string /** 此次调用中使用的用户ID的类型 */ @@ -319,7 +349,7 @@ export interface BatchDeleteMailMailgroupManagerQuery { user_id_type?: 'user_id' | 'union_id' | 'open_id' } -export interface ListMailMailgroupManagerQuery extends Pagination { +export interface ListMailMailgroupManagerQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' } @@ -349,7 +379,7 @@ export interface GetMailMailgroupMemberQuery { department_id_type?: 'department_id' | 'open_department_id' } -export interface ListMailMailgroupMemberQuery extends Pagination { +export interface ListMailMailgroupMemberQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' /** 此次调用中使用的部门ID的类型 */ @@ -403,7 +433,7 @@ export interface GetMailMailgroupPermissionMemberQuery { department_id_type?: 'department_id' | 'open_department_id' } -export interface ListMailMailgroupPermissionMemberQuery extends Pagination { +export interface ListMailMailgroupPermissionMemberQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' /** 此次调用中使用的部门ID的类型 */ @@ -450,9 +480,6 @@ export interface UpdateMailPublicMailboxRequest { name?: string } -export interface ListMailPublicMailboxQuery extends Pagination { -} - export interface CreateMailPublicMailboxMemberRequest { /** The member's user id. Value is valid when type is USER */ user_id?: string @@ -470,7 +497,7 @@ export interface GetMailPublicMailboxMemberQuery { user_id_type?: 'user_id' | 'union_id' | 'open_id' } -export interface ListMailPublicMailboxMemberQuery extends Pagination { +export interface ListMailPublicMailboxMemberQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' } @@ -505,9 +532,6 @@ export interface CreateMailUserMailboxAliasRequest { email_alias?: string } -export interface ListMailUserMailboxAliasQuery extends Pagination { -} - export interface QueryMailUserRequest { /** 需要查询的邮箱地址列表 */ email_list: string[] @@ -755,7 +779,7 @@ Internal.define({ }, '/open-apis/mail/v1/mailgroups': { POST: 'createMailMailgroup', - GET: 'listMailMailgroup', + GET: { name: 'listMailMailgroup', pagination: { argIndex: 0 } }, }, '/open-apis/mail/v1/mailgroups/{mailgroup_id}': { DELETE: 'deleteMailMailgroup', @@ -770,11 +794,11 @@ Internal.define({ POST: 'batchDeleteMailMailgroupManager', }, '/open-apis/mail/v1/mailgroups/{mailgroup_id}/managers': { - GET: 'listMailMailgroupManager', + GET: { name: 'listMailMailgroupManager', pagination: { argIndex: 1 } }, }, '/open-apis/mail/v1/mailgroups/{mailgroup_id}/members': { POST: 'createMailMailgroupMember', - GET: 'listMailMailgroupMember', + GET: { name: 'listMailMailgroupMember', pagination: { argIndex: 1 } }, }, '/open-apis/mail/v1/mailgroups/{mailgroup_id}/members/{member_id}': { DELETE: 'deleteMailMailgroupMember', @@ -795,7 +819,7 @@ Internal.define({ }, '/open-apis/mail/v1/mailgroups/{mailgroup_id}/permission_members': { POST: 'createMailMailgroupPermissionMember', - GET: 'listMailMailgroupPermissionMember', + GET: { name: 'listMailMailgroupPermissionMember', pagination: { argIndex: 1 } }, }, '/open-apis/mail/v1/mailgroups/{mailgroup_id}/permission_members/{permission_member_id}': { DELETE: 'deleteMailMailgroupPermissionMember', @@ -809,7 +833,7 @@ Internal.define({ }, '/open-apis/mail/v1/public_mailboxes': { POST: 'createMailPublicMailbox', - GET: 'listMailPublicMailbox', + GET: { name: 'listMailPublicMailbox', pagination: { argIndex: 0 } }, }, '/open-apis/mail/v1/public_mailboxes/{public_mailbox_id}': { PATCH: 'patchMailPublicMailbox', @@ -819,7 +843,7 @@ Internal.define({ }, '/open-apis/mail/v1/public_mailboxes/{public_mailbox_id}/members': { POST: 'createMailPublicMailboxMember', - GET: 'listMailPublicMailboxMember', + GET: { name: 'listMailPublicMailboxMember', pagination: { argIndex: 1 } }, }, '/open-apis/mail/v1/public_mailboxes/{public_mailbox_id}/members/{member_id}': { DELETE: 'deleteMailPublicMailboxMember', diff --git a/adapters/lark/src/types/okr.ts b/adapters/lark/src/types/okr.ts index 7d43339b..4d27c47e 100644 --- a/adapters/lark/src/types/okr.ts +++ b/adapters/lark/src/types/okr.ts @@ -17,7 +17,12 @@ declare module '../internal' { * 获取 OKR 周期列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/period/list */ - listOkrPeriod(query?: ListOkrPeriodQuery): Promise> + listOkrPeriod(query?: Pagination): Promise> + /** + * 获取 OKR 周期列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/period/list + */ + listOkrPeriodIter(): AsyncIterator /** * 获取 OKR 周期规则 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/okr-v1/period_rule/list @@ -78,9 +83,6 @@ export interface PatchOkrPeriodRequest { status: 1 | 2 | 3 } -export interface ListOkrPeriodQuery extends Pagination { -} - export interface ListOkrUserOkrQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id' @@ -233,7 +235,7 @@ export interface QueryOkrReviewResponse { Internal.define({ '/open-apis/okr/v1/periods': { POST: 'createOkrPeriod', - GET: 'listOkrPeriod', + GET: { name: 'listOkrPeriod', pagination: { argIndex: 0 } }, }, '/open-apis/okr/v1/periods/{period_id}': { PATCH: 'patchOkrPeriod', diff --git a/adapters/lark/src/types/payroll.ts b/adapters/lark/src/types/payroll.ts index f30c3639..bd932567 100644 --- a/adapters/lark/src/types/payroll.ts +++ b/adapters/lark/src/types/payroll.ts @@ -7,29 +7,41 @@ declare module '../internal' { * 批量查询算薪项 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/acct_item/list */ - listPayrollAcctItem(query?: ListPayrollAcctItemQuery): Promise> + listPayrollAcctItem(query?: Pagination): Promise> + /** + * 批量查询算薪项 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/acct_item/list + */ + listPayrollAcctItemIter(): AsyncIterator /** * 查询成本分摊报表汇总数据 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/cost_allocation_report/list */ - listPayrollCostAllocationReport(query?: ListPayrollCostAllocationReportQuery): Promise + listPayrollCostAllocationReport(query?: ListPayrollCostAllocationReportQuery & Pagination): Promise + /** + * 批量查询成本分摊方案 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/cost_allocation_plan/list + */ + listPayrollCostAllocationPlan(query?: ListPayrollCostAllocationPlanQuery & Pagination): Promise> /** * 批量查询成本分摊方案 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/cost_allocation_plan/list */ - listPayrollCostAllocationPlan(query?: ListPayrollCostAllocationPlanQuery): Promise> + listPayrollCostAllocationPlanIter(query?: ListPayrollCostAllocationPlanQuery): AsyncIterator /** * 获取薪资组基本信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/paygroup/list */ - listPayrollPaygroup(query?: ListPayrollPaygroupQuery): Promise> + listPayrollPaygroup(query?: Pagination): Promise> + /** + * 获取薪资组基本信息 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/payroll-v1/paygroup/list + */ + listPayrollPaygroupIter(): AsyncIterator } } -export interface ListPayrollAcctItemQuery extends Pagination { -} - -export interface ListPayrollCostAllocationReportQuery extends Pagination { +export interface ListPayrollCostAllocationReportQuery { /** 成本分摊方案ID */ cost_allocation_plan_id: string /** 期间 */ @@ -38,14 +50,11 @@ export interface ListPayrollCostAllocationReportQuery extends Pagination { report_type: 0 | 1 | 2 } -export interface ListPayrollCostAllocationPlanQuery extends Pagination { +export interface ListPayrollCostAllocationPlanQuery { /** 期间 */ pay_period: string } -export interface ListPayrollPaygroupQuery extends Pagination { -} - export interface ListPayrollCostAllocationReportResponse { /** 期间 */ pay_period?: string @@ -61,15 +70,15 @@ export interface ListPayrollCostAllocationReportResponse { Internal.define({ '/open-apis/payroll/v1/acct_items': { - GET: 'listPayrollAcctItem', + GET: { name: 'listPayrollAcctItem', pagination: { argIndex: 0 } }, }, '/open-apis/payroll/v1/cost_allocation_reports': { GET: 'listPayrollCostAllocationReport', }, '/open-apis/payroll/v1/cost_allocation_plans': { - GET: 'listPayrollCostAllocationPlan', + GET: { name: 'listPayrollCostAllocationPlan', pagination: { argIndex: 0 } }, }, '/open-apis/payroll/v1/paygroups': { - GET: 'listPayrollPaygroup', + GET: { name: 'listPayrollPaygroup', pagination: { argIndex: 0 } }, }, }) diff --git a/adapters/lark/src/types/performance.ts b/adapters/lark/src/types/performance.ts index 42b97924..250f4918 100644 --- a/adapters/lark/src/types/performance.ts +++ b/adapters/lark/src/types/performance.ts @@ -17,7 +17,12 @@ declare module '../internal' { * 批量查询补充信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/additional_information/query */ - queryPerformanceAdditionalInformation(body: QueryPerformanceAdditionalInformationRequest, query?: QueryPerformanceAdditionalInformationQuery): Promise> + queryPerformanceAdditionalInformation(body: QueryPerformanceAdditionalInformationRequest, query?: QueryPerformanceAdditionalInformationQuery & Pagination): Promise> + /** + * 批量查询补充信息 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/additional_information/query + */ + queryPerformanceAdditionalInformationIter(body: QueryPerformanceAdditionalInformationRequest, query?: QueryPerformanceAdditionalInformationQuery): AsyncIterator /** * 批量导入补充信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/additional_information/import @@ -37,32 +42,57 @@ declare module '../internal' { * 获取被评估人信息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/reviewee/query */ - queryPerformanceReviewee(body: QueryPerformanceRevieweeRequest, query?: QueryPerformanceRevieweeQuery): Promise + queryPerformanceReviewee(body: QueryPerformanceRevieweeRequest, query?: QueryPerformanceRevieweeQuery & Pagination): Promise /** * 获取评估模板配置 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/review_template/query */ - queryPerformanceReviewTemplate(body: QueryPerformanceReviewTemplateRequest, query?: QueryPerformanceReviewTemplateQuery): Promise> + queryPerformanceReviewTemplate(body: QueryPerformanceReviewTemplateRequest, query?: Pagination): Promise> + /** + * 获取评估模板配置 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/review_template/query + */ + queryPerformanceReviewTemplateIter(body: QueryPerformanceReviewTemplateRequest): AsyncIterator /** * 获取评估项列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/indicator/query */ - queryPerformanceIndicator(body: QueryPerformanceIndicatorRequest, query?: QueryPerformanceIndicatorQuery): Promise> + queryPerformanceIndicator(body: QueryPerformanceIndicatorRequest, query?: Pagination): Promise> + /** + * 获取评估项列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/indicator/query + */ + queryPerformanceIndicatorIter(body: QueryPerformanceIndicatorRequest): AsyncIterator + /** + * 获取标签填写题配置 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/question/query + */ + queryPerformanceQuestion(body: QueryPerformanceQuestionRequest, query?: Pagination): Promise> /** * 获取标签填写题配置 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/question/query */ - queryPerformanceQuestion(body: QueryPerformanceQuestionRequest, query?: QueryPerformanceQuestionQuery): Promise> + queryPerformanceQuestionIter(body: QueryPerformanceQuestionRequest): AsyncIterator + /** + * 获取指标列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/metric_lib/query + */ + queryPerformanceMetricLib(body: QueryPerformanceMetricLibRequest, query?: QueryPerformanceMetricLibQuery & Pagination): Promise> /** * 获取指标列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/metric_lib/query */ - queryPerformanceMetricLib(body: QueryPerformanceMetricLibRequest, query?: QueryPerformanceMetricLibQuery): Promise> + queryPerformanceMetricLibIter(body: QueryPerformanceMetricLibRequest, query?: QueryPerformanceMetricLibQuery): AsyncIterator /** * 获取指标模板列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/metric_template/query */ - queryPerformanceMetricTemplate(body: QueryPerformanceMetricTemplateRequest, query?: QueryPerformanceMetricTemplateQuery): Promise> + queryPerformanceMetricTemplate(body: QueryPerformanceMetricTemplateRequest, query?: QueryPerformanceMetricTemplateQuery & Pagination): Promise> + /** + * 获取指标模板列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/metric_template/query + */ + queryPerformanceMetricTemplateIter(body: QueryPerformanceMetricTemplateRequest, query?: QueryPerformanceMetricTemplateQuery): AsyncIterator /** * 获取指标字段列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/metric_field/query @@ -72,7 +102,12 @@ declare module '../internal' { * 获取指标标签列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/metric_tag/list */ - listPerformanceMetricTag(query?: ListPerformanceMetricTagQuery): Promise> + listPerformanceMetricTag(query?: ListPerformanceMetricTagQuery & Pagination): Promise> + /** + * 获取指标标签列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v2/metric_tag/list + */ + listPerformanceMetricTagIter(query?: ListPerformanceMetricTagQuery): AsyncIterator /** * 获取周期任务(指定用户) * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/performance-v1/stage_task/find_by_user_list @@ -143,7 +178,7 @@ export interface QueryPerformanceAdditionalInformationRequest { reviewee_user_ids?: string[] } -export interface QueryPerformanceAdditionalInformationQuery extends Pagination { +export interface QueryPerformanceAdditionalInformationQuery { user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id' } @@ -198,7 +233,7 @@ export interface QueryPerformanceRevieweeRequest { activity_ids?: string[] } -export interface QueryPerformanceRevieweeQuery extends Pagination { +export interface QueryPerformanceRevieweeQuery { user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id' } @@ -207,25 +242,16 @@ export interface QueryPerformanceReviewTemplateRequest { review_template_ids?: string[] } -export interface QueryPerformanceReviewTemplateQuery extends Pagination { -} - export interface QueryPerformanceIndicatorRequest { /** 评估项 ID 列表,获取指定评估项的配置数据 */ indicator_ids?: string[] } -export interface QueryPerformanceIndicatorQuery extends Pagination { -} - export interface QueryPerformanceQuestionRequest { /** 标签填写题 ID 列表,获取指定标签填写题的配置数据。如果不传则返回所有 */ tag_based_question_ids?: string[] } -export interface QueryPerformanceQuestionQuery extends Pagination { -} - export interface QueryPerformanceMetricLibRequest { /** 状态是否为启用 */ is_active?: boolean @@ -239,7 +265,7 @@ export interface QueryPerformanceMetricLibRequest { scoring_setting_type?: 'score_manually' | 'score_by_formula' } -export interface QueryPerformanceMetricLibQuery extends Pagination { +export interface QueryPerformanceMetricLibQuery { user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id' } @@ -250,7 +276,7 @@ export interface QueryPerformanceMetricTemplateRequest { status?: 'to_be_configured' | 'to_be_activated' | 'enabled' | 'disabled' } -export interface QueryPerformanceMetricTemplateQuery extends Pagination { +export interface QueryPerformanceMetricTemplateQuery { user_id_type?: 'user_id' | 'union_id' | 'open_id' | 'people_admin_id' } @@ -259,7 +285,7 @@ export interface QueryPerformanceMetricFieldRequest { field_ids?: string[] } -export interface ListPerformanceMetricTagQuery extends Pagination { +export interface ListPerformanceMetricTagQuery { /** 指标标签 ID 列表 */ tag_ids?: string[] } @@ -477,7 +503,7 @@ Internal.define({ POST: 'queryPerformanceActivity', }, '/open-apis/performance/v2/additional_informations/query': { - POST: 'queryPerformanceAdditionalInformation', + POST: { name: 'queryPerformanceAdditionalInformation', pagination: { argIndex: 1, itemsKey: 'additional_informations' } }, }, '/open-apis/performance/v2/additional_informations/import': { POST: 'importPerformanceAdditionalInformation', @@ -492,25 +518,25 @@ Internal.define({ POST: 'queryPerformanceReviewee', }, '/open-apis/performance/v2/review_templates/query': { - POST: 'queryPerformanceReviewTemplate', + POST: { name: 'queryPerformanceReviewTemplate', pagination: { argIndex: 1, itemsKey: 'review_templates' } }, }, '/open-apis/performance/v2/indicators/query': { - POST: 'queryPerformanceIndicator', + POST: { name: 'queryPerformanceIndicator', pagination: { argIndex: 1, itemsKey: 'indicators' } }, }, '/open-apis/performance/v2/questions/query': { - POST: 'queryPerformanceQuestion', + POST: { name: 'queryPerformanceQuestion', pagination: { argIndex: 1, itemsKey: 'tag_based_questions' } }, }, '/open-apis/performance/v2/metric_libs/query': { - POST: 'queryPerformanceMetricLib', + POST: { name: 'queryPerformanceMetricLib', pagination: { argIndex: 1 } }, }, '/open-apis/performance/v2/metric_templates/query': { - POST: 'queryPerformanceMetricTemplate', + POST: { name: 'queryPerformanceMetricTemplate', pagination: { argIndex: 1 } }, }, '/open-apis/performance/v2/metric_fields/query': { POST: 'queryPerformanceMetricField', }, '/open-apis/performance/v2/metric_tags': { - GET: 'listPerformanceMetricTag', + GET: { name: 'listPerformanceMetricTag', pagination: { argIndex: 0 } }, }, '/open-apis/performance/v1/stage_tasks/find_by_user_list': { POST: 'findByUserListPerformanceStageTask', diff --git a/adapters/lark/src/types/personal_settings.ts b/adapters/lark/src/types/personal_settings.ts index e7ca7ce0..6add877f 100644 --- a/adapters/lark/src/types/personal_settings.ts +++ b/adapters/lark/src/types/personal_settings.ts @@ -22,7 +22,12 @@ declare module '../internal' { * 获取系统状态 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/personal_settings-v1/system_status/list */ - listPersonalSettingsSystemStatus(query?: ListPersonalSettingsSystemStatusQuery): Promise> + listPersonalSettingsSystemStatus(query?: Pagination): Promise> + /** + * 获取系统状态 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/personal_settings-v1/system_status/list + */ + listPersonalSettingsSystemStatusIter(): AsyncIterator /** * 批量开启系统状态 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/personal_settings-v1/system_status/batch_open @@ -58,9 +63,6 @@ export interface PatchPersonalSettingsSystemStatusRequest { update_fields: 'TITLE' | 'I18N_TITLE' | 'ICON' | 'COLOR' | 'PRIORITY' | 'SYNC_SETTING'[] } -export interface ListPersonalSettingsSystemStatusQuery extends Pagination { -} - export interface BatchOpenPersonalSettingsSystemStatusRequest { /** 开启列表 */ user_list: SystemStatusUserOpenParam[] @@ -104,7 +106,7 @@ export interface BatchClosePersonalSettingsSystemStatusResponse { Internal.define({ '/open-apis/personal_settings/v1/system_statuses': { POST: 'createPersonalSettingsSystemStatus', - GET: 'listPersonalSettingsSystemStatus', + GET: { name: 'listPersonalSettingsSystemStatus', pagination: { argIndex: 0 } }, }, '/open-apis/personal_settings/v1/system_statuses/{system_status_id}': { DELETE: 'deletePersonalSettingsSystemStatus', diff --git a/adapters/lark/src/types/search.ts b/adapters/lark/src/types/search.ts index 37bd6a72..9f5c2816 100644 --- a/adapters/lark/src/types/search.ts +++ b/adapters/lark/src/types/search.ts @@ -7,12 +7,22 @@ declare module '../internal' { * 搜索消息 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/message/create */ - createSearchMessage(body: CreateSearchMessageRequest, query?: CreateSearchMessageQuery): Promise> + createSearchMessage(body: CreateSearchMessageRequest, query?: CreateSearchMessageQuery & Pagination): Promise> + /** + * 搜索消息 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/message/create + */ + createSearchMessageIter(body: CreateSearchMessageRequest, query?: CreateSearchMessageQuery): AsyncIterator + /** + * 搜索应用 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/app/create + */ + createSearchApp(body: CreateSearchAppRequest, query?: CreateSearchAppQuery & Pagination): Promise> /** * 搜索应用 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/app/create */ - createSearchApp(body: CreateSearchAppRequest, query?: CreateSearchAppQuery): Promise> + createSearchAppIter(body: CreateSearchAppRequest, query?: CreateSearchAppQuery): AsyncIterator /** * 创建数据源 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/create @@ -37,7 +47,12 @@ declare module '../internal' { * 批量获取数据源 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/list */ - listSearchDataSource(query?: ListSearchDataSourceQuery): Promise> + listSearchDataSource(query?: ListSearchDataSourceQuery & Pagination): Promise> + /** + * 批量获取数据源 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source/list + */ + listSearchDataSourceIter(query?: ListSearchDataSourceQuery): AsyncIterator /** * 为指定数据项创建索引 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/search-v2/data_source-item/create @@ -97,7 +112,7 @@ export interface CreateSearchMessageRequest { end_time?: string } -export interface CreateSearchMessageQuery extends Pagination { +export interface CreateSearchMessageQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' } @@ -107,7 +122,7 @@ export interface CreateSearchAppRequest { query: string } -export interface CreateSearchAppQuery extends Pagination { +export interface CreateSearchAppQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' } @@ -160,7 +175,7 @@ export interface PatchSearchDataSourceRequest { enable_answer?: boolean } -export interface ListSearchDataSourceQuery extends Pagination { +export interface ListSearchDataSourceQuery { /** 回包数据格式,0-全量数据;1-摘要数据。**注**:摘要数据仅包含"id","name","state"。 */ view?: 0 | 1 } @@ -236,14 +251,14 @@ export interface GetSearchSchemaResponse { Internal.define({ '/open-apis/search/v2/message': { - POST: 'createSearchMessage', + POST: { name: 'createSearchMessage', pagination: { argIndex: 1 } }, }, '/open-apis/search/v2/app': { - POST: 'createSearchApp', + POST: { name: 'createSearchApp', pagination: { argIndex: 1 } }, }, '/open-apis/search/v2/data_sources': { POST: 'createSearchDataSource', - GET: 'listSearchDataSource', + GET: { name: 'listSearchDataSource', pagination: { argIndex: 0 } }, }, '/open-apis/search/v2/data_sources/{data_source_id}': { DELETE: 'deleteSearchDataSource', diff --git a/adapters/lark/src/types/task.ts b/adapters/lark/src/types/task.ts index 8b4f448a..ed493fdf 100644 --- a/adapters/lark/src/types/task.ts +++ b/adapters/lark/src/types/task.ts @@ -37,7 +37,12 @@ declare module '../internal' { * 列取任务列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/task-v2/task/list */ - listTaskV2(query?: ListTaskV2Query): Promise> + listTaskV2(query?: ListTaskV2Query & Pagination): Promise> + /** + * 列取任务列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/task-v2/task/list + */ + listTaskV2Iter(query?: ListTaskV2Query): AsyncIterator /** * 列取任务所在清单 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/task-v2/task/tasklists @@ -82,7 +87,12 @@ declare module '../internal' { * 获取任务的子任务列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/task-v2/task-subtask/list */ - listTaskV2TaskSubtask(task_guid: string, query?: ListTaskV2TaskSubtaskQuery): Promise> + listTaskV2TaskSubtask(task_guid: string, query?: ListTaskV2TaskSubtaskQuery & Pagination): Promise> + /** + * 获取任务的子任务列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/task-v2/task-subtask/list + */ + listTaskV2TaskSubtaskIter(task_guid: string, query?: ListTaskV2TaskSubtaskQuery): AsyncIterator /** * 创建清单 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/task-v2/tasklist/create @@ -117,12 +127,22 @@ declare module '../internal' { * 获取清单任务列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/task-v2/tasklist/tasks */ - tasksTaskV2Tasklist(tasklist_guid: string, query?: TasksTaskV2TasklistQuery): Promise> + tasksTaskV2Tasklist(tasklist_guid: string, query?: TasksTaskV2TasklistQuery & Pagination): Promise> + /** + * 获取清单任务列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/task-v2/tasklist/tasks + */ + tasksTaskV2TasklistIter(tasklist_guid: string, query?: TasksTaskV2TasklistQuery): AsyncIterator /** * 获取清单列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/task-v2/tasklist/list */ - listTaskV2Tasklist(query?: ListTaskV2TasklistQuery): Promise> + listTaskV2Tasklist(query?: ListTaskV2TasklistQuery & Pagination): Promise> + /** + * 获取清单列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/task-v2/tasklist/list + */ + listTaskV2TasklistIter(query?: ListTaskV2TasklistQuery): AsyncIterator /** * 创建动态订阅 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/task-v2/tasklist-activity_subscription/create @@ -172,7 +192,12 @@ declare module '../internal' { * 获取评论列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/task-v2/comment/list */ - listTaskV2Comment(query?: ListTaskV2CommentQuery): Promise> + listTaskV2Comment(query?: ListTaskV2CommentQuery & Pagination): Promise> + /** + * 获取评论列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/task-v2/comment/list + */ + listTaskV2CommentIter(query?: ListTaskV2CommentQuery): AsyncIterator /** * 上传附件 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/task-v2/attachment/upload @@ -182,7 +207,12 @@ declare module '../internal' { * 列取附件 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/task-v2/attachment/list */ - listTaskV2Attachment(query?: ListTaskV2AttachmentQuery): Promise> + listTaskV2Attachment(query?: ListTaskV2AttachmentQuery & Pagination): Promise> + /** + * 列取附件 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/task-v2/attachment/list + */ + listTaskV2AttachmentIter(query?: ListTaskV2AttachmentQuery): AsyncIterator /** * 获取附件 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/task-v2/attachment/get @@ -217,12 +247,22 @@ declare module '../internal' { * 获取自定义分组列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/task-v2/section/list */ - listTaskV2Section(query?: ListTaskV2SectionQuery): Promise> + listTaskV2Section(query?: ListTaskV2SectionQuery & Pagination): Promise> + /** + * 获取自定义分组列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/task-v2/section/list + */ + listTaskV2SectionIter(query?: ListTaskV2SectionQuery): AsyncIterator + /** + * 获取自定义分组任务列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/task-v2/section/tasks + */ + tasksTaskV2Section(section_guid: string, query?: TasksTaskV2SectionQuery & Pagination): Promise> /** * 获取自定义分组任务列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/task-v2/section/tasks */ - tasksTaskV2Section(section_guid: string, query?: TasksTaskV2SectionQuery): Promise> + tasksTaskV2SectionIter(section_guid: string, query?: TasksTaskV2SectionQuery): AsyncIterator /** * 创建自定义字段 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/task-v2/custom_field/create @@ -242,7 +282,12 @@ declare module '../internal' { * 列取自定义字段 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/task-v2/custom_field/list */ - listTaskV2CustomField(query?: ListTaskV2CustomFieldQuery): Promise> + listTaskV2CustomField(query?: ListTaskV2CustomFieldQuery & Pagination): Promise> + /** + * 列取自定义字段 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/task-v2/custom_field/list + */ + listTaskV2CustomFieldIter(query?: ListTaskV2CustomFieldQuery): AsyncIterator /** * 将自定义字段加入资源 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/task-v2/custom_field/add @@ -297,7 +342,12 @@ declare module '../internal' { * 查询所有任务 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task/list */ - listTaskV1(query?: ListTaskV1Query): Promise> + listTaskV1(query?: ListTaskV1Query & Pagination): Promise> + /** + * 查询所有任务 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task/list + */ + listTaskV1Iter(query?: ListTaskV1Query): AsyncIterator /** * 新增提醒时间 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-reminder/create @@ -312,7 +362,12 @@ declare module '../internal' { * 查询提醒时间列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-reminder/list */ - listTaskV1TaskReminder(task_id: string, query?: ListTaskV1TaskReminderQuery): Promise> + listTaskV1TaskReminder(task_id: string, query?: Pagination): Promise> + /** + * 查询提醒时间列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-reminder/list + */ + listTaskV1TaskReminderIter(task_id: string): AsyncIterator /** * 创建评论 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-comment/create @@ -337,7 +392,12 @@ declare module '../internal' { * 获取评论列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-comment/list */ - listTaskV1TaskComment(task_id: string, query?: ListTaskV1TaskCommentQuery): Promise> + listTaskV1TaskComment(task_id: string, query?: ListTaskV1TaskCommentQuery & Pagination): Promise> + /** + * 获取评论列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-comment/list + */ + listTaskV1TaskCommentIter(task_id: string, query?: ListTaskV1TaskCommentQuery): AsyncIterator /** * 新增关注人 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-follower/create @@ -357,7 +417,12 @@ declare module '../internal' { * 获取关注人列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-follower/list */ - listTaskV1TaskFollower(task_id: string, query?: ListTaskV1TaskFollowerQuery): Promise> + listTaskV1TaskFollower(task_id: string, query?: ListTaskV1TaskFollowerQuery & Pagination): Promise> + /** + * 获取关注人列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-follower/list + */ + listTaskV1TaskFollowerIter(task_id: string, query?: ListTaskV1TaskFollowerQuery): AsyncIterator /** * 新增执行者 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-collaborator/create @@ -377,7 +442,12 @@ declare module '../internal' { * 获取执行者列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-collaborator/list */ - listTaskV1TaskCollaborator(task_id: string, query?: ListTaskV1TaskCollaboratorQuery): Promise> + listTaskV1TaskCollaborator(task_id: string, query?: ListTaskV1TaskCollaboratorQuery & Pagination): Promise> + /** + * 获取执行者列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/task-v1/task-collaborator/list + */ + listTaskV1TaskCollaboratorIter(task_id: string, query?: ListTaskV1TaskCollaboratorQuery): AsyncIterator } } @@ -462,7 +532,7 @@ export interface RemoveMembersTaskV2Query { user_id_type?: string } -export interface ListTaskV2Query extends Pagination { +export interface ListTaskV2Query { /** 是否按任务完成进行过滤。不填写表示不过滤。 */ completed?: boolean /** 查询任务的范围 */ @@ -565,7 +635,7 @@ export interface CreateTaskV2TaskSubtaskQuery { user_id_type?: string } -export interface ListTaskV2TaskSubtaskQuery extends Pagination { +export interface ListTaskV2TaskSubtaskQuery { /** 表示user的ID的类型,支持open_id, user_id, union_id */ user_id_type?: string } @@ -621,7 +691,7 @@ export interface RemoveMembersTaskV2TasklistQuery { user_id_type?: string } -export interface TasksTaskV2TasklistQuery extends Pagination { +export interface TasksTaskV2TasklistQuery { /** 只查看特定完成状态的任务,不填写表示不按完成状态过滤 */ completed?: boolean /** 任务创建的起始时间戳(ms),闭区间,不填写默认为首个任务的创建时间戳 */ @@ -632,7 +702,7 @@ export interface TasksTaskV2TasklistQuery extends Pagination { user_id_type?: string } -export interface ListTaskV2TasklistQuery extends Pagination { +export interface ListTaskV2TasklistQuery { /** 表示user的ID的类型,支持open_id, user_id, union_id */ user_id_type?: string } @@ -710,7 +780,7 @@ export interface PatchTaskV2CommentQuery { user_id_type?: string } -export interface ListTaskV2CommentQuery extends Pagination { +export interface ListTaskV2CommentQuery { /** 要获取评论列表的资源类型 */ resource_type?: string /** 要获取评论的资源ID。例如要获取任务的评论列表,此处应该填写任务全局唯一ID */ @@ -735,7 +805,7 @@ export interface UploadTaskV2AttachmentQuery { user_id_type?: 'open_id' | 'union_id' | 'user_id' } -export interface ListTaskV2AttachmentQuery extends Pagination { +export interface ListTaskV2AttachmentQuery { /** 附件归属的资源类型 */ resource_type?: string /** 附件归属资源的id,配合resource_type使用。例如希望获取任务的附件,需要设置 resource_type为task, resource_id为任务的全局唯一ID */ @@ -784,7 +854,7 @@ export interface PatchTaskV2SectionQuery { user_id_type?: string } -export interface ListTaskV2SectionQuery extends Pagination { +export interface ListTaskV2SectionQuery { /** 自定义分组所属的资源类型。支持"my_tasks"(我负责的)和"tasklist"(清单)。当使用"tasklist"时,需要用resource_id提供清单GUID。 */ resource_type: string /** 如`resource_type`为"tasklist",这里需要填写要列取自定义分组的清单的GUID。 */ @@ -793,7 +863,7 @@ export interface ListTaskV2SectionQuery extends Pagination { user_id_type?: string } -export interface TasksTaskV2SectionQuery extends Pagination { +export interface TasksTaskV2SectionQuery { /** 按照任务状态过滤,如果不填写则表示不按完成状态过滤 */ completed?: boolean /** 按照创建时间筛选的起始时间戳(ms),如不填写则为首个任务的创建时刻 */ @@ -849,7 +919,7 @@ export interface PatchTaskV2CustomFieldQuery { user_id_type?: 'open_id' | 'union_id' | 'user_id' } -export interface ListTaskV2CustomFieldQuery extends Pagination { +export interface ListTaskV2CustomFieldQuery { /** 用户ID格式,支持open_id, user_id, union_id */ user_id_type?: 'open_id' | 'user_id' | 'union_id' /** 资源类型,如提供表示仅查询特定资源下的自定义字段。目前只支持tasklist。 */ @@ -941,7 +1011,7 @@ export interface GetTaskV1Query { user_id_type?: 'user_id' | 'union_id' | 'open_id' } -export interface ListTaskV1Query extends Pagination { +export interface ListTaskV1Query { /** 范围查询任务时,查询的起始时间。不填时默认起始时间为第一个任务的创建时间。 */ start_create_time?: string /** 范围查询任务时,查询的结束时间。不填时默认结束时间为最后一个任务的创建时间。 */ @@ -957,9 +1027,6 @@ export interface CreateTaskV1TaskReminderRequest { relative_fire_minute: number } -export interface ListTaskV1TaskReminderQuery extends Pagination { -} - export interface CreateTaskV1TaskCommentRequest { /** 评论内容 */ content?: string @@ -993,7 +1060,7 @@ export interface GetTaskV1TaskCommentQuery { user_id_type?: 'user_id' | 'union_id' | 'open_id' } -export interface ListTaskV1TaskCommentQuery extends Pagination { +export interface ListTaskV1TaskCommentQuery { /** 评论排序标记,可按照评论时间从小到大查询,或者评论时间从大到小查询,不填默认按照从小到大 */ list_direction?: 0 | 1 /** 此次调用中使用的用户ID的类型 */ @@ -1027,7 +1094,7 @@ export interface BatchDeleteFollowerTaskV1Query { user_id_type?: 'user_id' | 'union_id' | 'open_id' } -export interface ListTaskV1TaskFollowerQuery extends Pagination { +export interface ListTaskV1TaskFollowerQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' } @@ -1059,7 +1126,7 @@ export interface BatchDeleteCollaboratorTaskV1Query { user_id_type?: 'user_id' | 'union_id' | 'open_id' } -export interface ListTaskV1TaskCollaboratorQuery extends Pagination { +export interface ListTaskV1TaskCollaboratorQuery { /** 此次调用中使用的用户ID的类型 */ user_id_type?: 'user_id' | 'union_id' | 'open_id' } @@ -1297,7 +1364,7 @@ export interface BatchDeleteCollaboratorTaskV1Response { Internal.define({ '/open-apis/task/v2/tasks': { POST: 'createTaskV2', - GET: 'listTaskV2', + GET: { name: 'listTaskV2', pagination: { argIndex: 0 } }, }, '/open-apis/task/v2/tasks/{task_guid}': { GET: 'getTaskV2', @@ -1333,11 +1400,11 @@ Internal.define({ }, '/open-apis/task/v2/tasks/{task_guid}/subtasks': { POST: 'createTaskV2TaskSubtask', - GET: 'listTaskV2TaskSubtask', + GET: { name: 'listTaskV2TaskSubtask', pagination: { argIndex: 1 } }, }, '/open-apis/task/v2/tasklists': { POST: 'createTaskV2Tasklist', - GET: 'listTaskV2Tasklist', + GET: { name: 'listTaskV2Tasklist', pagination: { argIndex: 0 } }, }, '/open-apis/task/v2/tasklists/{tasklist_guid}': { GET: 'getTaskV2Tasklist', @@ -1351,7 +1418,7 @@ Internal.define({ POST: 'removeMembersTaskV2Tasklist', }, '/open-apis/task/v2/tasklists/{tasklist_guid}/tasks': { - GET: 'tasksTaskV2Tasklist', + GET: { name: 'tasksTaskV2Tasklist', pagination: { argIndex: 1 } }, }, '/open-apis/task/v2/tasklists/{tasklist_guid}/activity_subscriptions': { POST: 'createTaskV2TasklistActivitySubscription', @@ -1364,7 +1431,7 @@ Internal.define({ }, '/open-apis/task/v2/comments': { POST: 'createTaskV2Comment', - GET: 'listTaskV2Comment', + GET: { name: 'listTaskV2Comment', pagination: { argIndex: 0 } }, }, '/open-apis/task/v2/comments/{comment_id}': { GET: 'getTaskV2Comment', @@ -1375,7 +1442,7 @@ Internal.define({ POST: { name: 'uploadTaskV2Attachment', multipart: true }, }, '/open-apis/task/v2/attachments': { - GET: 'listTaskV2Attachment', + GET: { name: 'listTaskV2Attachment', pagination: { argIndex: 0 } }, }, '/open-apis/task/v2/attachments/{attachment_guid}': { GET: 'getTaskV2Attachment', @@ -1383,7 +1450,7 @@ Internal.define({ }, '/open-apis/task/v2/sections': { POST: 'createTaskV2Section', - GET: 'listTaskV2Section', + GET: { name: 'listTaskV2Section', pagination: { argIndex: 0 } }, }, '/open-apis/task/v2/sections/{section_guid}': { GET: 'getTaskV2Section', @@ -1391,11 +1458,11 @@ Internal.define({ DELETE: 'deleteTaskV2Section', }, '/open-apis/task/v2/sections/{section_guid}/tasks': { - GET: 'tasksTaskV2Section', + GET: { name: 'tasksTaskV2Section', pagination: { argIndex: 1 } }, }, '/open-apis/task/v2/custom_fields': { POST: 'createTaskV2CustomField', - GET: 'listTaskV2CustomField', + GET: { name: 'listTaskV2CustomField', pagination: { argIndex: 0 } }, }, '/open-apis/task/v2/custom_fields/{custom_field_guid}': { GET: 'getTaskV2CustomField', @@ -1415,7 +1482,7 @@ Internal.define({ }, '/open-apis/task/v1/tasks': { POST: 'createTaskV1', - GET: 'listTaskV1', + GET: { name: 'listTaskV1', pagination: { argIndex: 0 } }, }, '/open-apis/task/v1/tasks/{task_id}': { DELETE: 'deleteTaskV1', @@ -1430,14 +1497,14 @@ Internal.define({ }, '/open-apis/task/v1/tasks/{task_id}/reminders': { POST: 'createTaskV1TaskReminder', - GET: 'listTaskV1TaskReminder', + GET: { name: 'listTaskV1TaskReminder', pagination: { argIndex: 1 } }, }, '/open-apis/task/v1/tasks/{task_id}/reminders/{reminder_id}': { DELETE: 'deleteTaskV1TaskReminder', }, '/open-apis/task/v1/tasks/{task_id}/comments': { POST: 'createTaskV1TaskComment', - GET: 'listTaskV1TaskComment', + GET: { name: 'listTaskV1TaskComment', pagination: { argIndex: 1 } }, }, '/open-apis/task/v1/tasks/{task_id}/comments/{comment_id}': { DELETE: 'deleteTaskV1TaskComment', @@ -1446,7 +1513,7 @@ Internal.define({ }, '/open-apis/task/v1/tasks/{task_id}/followers': { POST: 'createTaskV1TaskFollower', - GET: 'listTaskV1TaskFollower', + GET: { name: 'listTaskV1TaskFollower', pagination: { argIndex: 1 } }, }, '/open-apis/task/v1/tasks/{task_id}/followers/{follower_id}': { DELETE: 'deleteTaskV1TaskFollower', @@ -1456,7 +1523,7 @@ Internal.define({ }, '/open-apis/task/v1/tasks/{task_id}/collaborators': { POST: 'createTaskV1TaskCollaborator', - GET: 'listTaskV1TaskCollaborator', + GET: { name: 'listTaskV1TaskCollaborator', pagination: { argIndex: 1 } }, }, '/open-apis/task/v1/tasks/{task_id}/collaborators/{collaborator_id}': { DELETE: 'deleteTaskV1TaskCollaborator', diff --git a/adapters/lark/src/types/vc.ts b/adapters/lark/src/types/vc.ts index 0cccdfe3..a17a2158 100644 --- a/adapters/lark/src/types/vc.ts +++ b/adapters/lark/src/types/vc.ts @@ -57,7 +57,12 @@ declare module '../internal' { * 获取与会议号关联的会议列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/meeting/list_by_no */ - listByNoVcMeeting(query?: ListByNoVcMeetingQuery): Promise> + listByNoVcMeeting(query?: ListByNoVcMeetingQuery & Pagination): Promise> + /** + * 获取与会议号关联的会议列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/meeting/list_by_no + */ + listByNoVcMeetingIter(query?: ListByNoVcMeetingQuery): AsyncIterator /** * 开始录制 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/meeting-recording/start @@ -147,7 +152,12 @@ declare module '../internal' { * 查询会议室层级列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/room_level/list */ - listVcRoomLevel(query?: ListVcRoomLevelQuery): Promise> + listVcRoomLevel(query?: ListVcRoomLevelQuery & Pagination): Promise> + /** + * 查询会议室层级列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/room_level/list + */ + listVcRoomLevelIter(query?: ListVcRoomLevelQuery): AsyncIterator /** * 搜索会议室层级 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/room_level/search @@ -182,7 +192,12 @@ declare module '../internal' { * 查询会议室列表 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/room/list */ - listVcRoom(query?: ListVcRoomQuery): Promise> + listVcRoom(query?: ListVcRoomQuery & Pagination): Promise> + /** + * 查询会议室列表 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/room/list + */ + listVcRoomIter(query?: ListVcRoomQuery): AsyncIterator /** * 搜索会议室 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/room/search @@ -242,27 +257,52 @@ declare module '../internal' { * 查询会议明细 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/meeting_list/get */ - getVcMeetingList(query?: GetVcMeetingListQuery): Promise> + getVcMeetingList(query?: GetVcMeetingListQuery & Pagination): Promise> + /** + * 查询会议明细 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/meeting_list/get + */ + getVcMeetingListIter(query?: GetVcMeetingListQuery): AsyncIterator /** * 查询参会人明细 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/participant_list/get */ - getVcParticipantList(query?: GetVcParticipantListQuery): Promise> + getVcParticipantList(query?: GetVcParticipantListQuery & Pagination): Promise> + /** + * 查询参会人明细 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/participant_list/get + */ + getVcParticipantListIter(query?: GetVcParticipantListQuery): AsyncIterator + /** + * 查询参会人会议质量数据 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/participant_quality_list/get + */ + getVcParticipantQualityList(query?: GetVcParticipantQualityListQuery & Pagination): Promise> /** * 查询参会人会议质量数据 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/participant_quality_list/get */ - getVcParticipantQualityList(query?: GetVcParticipantQualityListQuery): Promise> + getVcParticipantQualityListIter(query?: GetVcParticipantQualityListQuery): AsyncIterator /** * 查询会议室预定数据 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/resource_reservation_list/get */ - getVcResourceReservationList(query?: GetVcResourceReservationListQuery): Promise> + getVcResourceReservationList(query?: GetVcResourceReservationListQuery & Pagination): Promise> + /** + * 查询会议室预定数据 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/resource_reservation_list/get + */ + getVcResourceReservationListIter(query?: GetVcResourceReservationListQuery): AsyncIterator + /** + * 获取告警记录 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/alert/list + */ + listVcAlert(query?: ListVcAlertQuery & Pagination): Promise> /** * 获取告警记录 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/alert/list */ - listVcAlert(query?: ListVcAlertQuery): Promise> + listVcAlertIter(query?: ListVcAlertQuery): AsyncIterator /** * 创建签到板部署码 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/vc-v1/room_config/set_checkboard_access_code @@ -365,7 +405,7 @@ export interface GetVcMeetingQuery { user_id_type?: 'user_id' | 'union_id' | 'open_id' } -export interface ListByNoVcMeetingQuery extends Pagination { +export interface ListByNoVcMeetingQuery { /** 9位会议号 */ meeting_no: string /** 查询开始时间(unix时间,单位sec) */ @@ -527,7 +567,7 @@ export interface MgetVcRoomLevelRequest { level_ids: string[] } -export interface ListVcRoomLevelQuery extends Pagination { +export interface ListVcRoomLevelQuery { /** 层级ID,不传则返回该租户下第一层级列表 */ room_level_id?: string } @@ -596,7 +636,7 @@ export interface MgetVcRoomQuery { user_id_type?: 'user_id' | 'union_id' | 'open_id' } -export interface ListVcRoomQuery extends Pagination { +export interface ListVcRoomQuery { /** 层级ID,不传则返回该租户下的所有会议室 */ room_level_id?: string /** 此次调用中使用的用户ID的类型,默认使用open_id可不填 */ @@ -728,7 +768,7 @@ export interface PatchVcReserveConfigDisableInformQuery { user_id_type?: 'user_id' | 'union_id' | 'open_id' } -export interface GetVcMeetingListQuery extends Pagination { +export interface GetVcMeetingListQuery { /** 查询开始时间(unix时间,单位sec) */ start_time: string /** 查询结束时间(unix时间,单位sec) */ @@ -747,7 +787,7 @@ export interface GetVcMeetingListQuery extends Pagination { user_id_type?: 'user_id' | 'union_id' | 'open_id' } -export interface GetVcParticipantListQuery extends Pagination { +export interface GetVcParticipantListQuery { /** 会议开始时间(需要精确到一分钟,unix时间,单位sec) */ meeting_start_time: string /** 会议结束时间(unix时间,单位sec;对于进行中会议则传0) */ @@ -764,7 +804,7 @@ export interface GetVcParticipantListQuery extends Pagination { user_id_type?: 'user_id' | 'union_id' | 'open_id' } -export interface GetVcParticipantQualityListQuery extends Pagination { +export interface GetVcParticipantQualityListQuery { /** 会议开始时间(需要精确到一分钟,unix时间,单位sec) */ meeting_start_time: string /** 会议结束时间(unix时间,单位sec) */ @@ -781,7 +821,7 @@ export interface GetVcParticipantQualityListQuery extends Pagination { user_id_type?: 'user_id' | 'union_id' | 'open_id' } -export interface GetVcResourceReservationListQuery extends Pagination { +export interface GetVcResourceReservationListQuery { /** 层级id */ room_level_id: string /** 是否展示会议主题 */ @@ -796,7 +836,7 @@ export interface GetVcResourceReservationListQuery extends Pagination { is_exclude?: boolean } -export interface ListVcAlertQuery extends Pagination { +export interface ListVcAlertQuery { /** 开始时间(unix时间,单位sec) */ start_time: string /** 结束时间(unix时间,单位sec) */ @@ -1075,7 +1115,7 @@ Internal.define({ GET: 'getVcMeeting', }, '/open-apis/vc/v1/meetings/list_by_no': { - GET: 'listByNoVcMeeting', + GET: { name: 'listByNoVcMeeting', pagination: { argIndex: 0, itemsKey: 'meeting_briefs' } }, }, '/open-apis/vc/v1/meetings/{meeting_id}/recording/start': { PATCH: 'startVcMeetingRecording', @@ -1115,7 +1155,7 @@ Internal.define({ }, '/open-apis/vc/v1/room_levels': { POST: 'createVcRoomLevel', - GET: 'listVcRoomLevel', + GET: { name: 'listVcRoomLevel', pagination: { argIndex: 0 } }, }, '/open-apis/vc/v1/room_levels/del': { POST: 'delVcRoomLevel', @@ -1132,7 +1172,7 @@ Internal.define({ }, '/open-apis/vc/v1/rooms': { POST: 'createVcRoom', - GET: 'listVcRoom', + GET: { name: 'listVcRoom', pagination: { argIndex: 0, itemsKey: 'rooms' } }, }, '/open-apis/vc/v1/rooms/{room_id}': { DELETE: 'deleteVcRoom', @@ -1168,19 +1208,19 @@ Internal.define({ PATCH: 'patchVcReserveConfigDisableInform', }, '/open-apis/vc/v1/meeting_list': { - GET: 'getVcMeetingList', + GET: { name: 'getVcMeetingList', pagination: { argIndex: 0, itemsKey: 'meeting_list' } }, }, '/open-apis/vc/v1/participant_list': { - GET: 'getVcParticipantList', + GET: { name: 'getVcParticipantList', pagination: { argIndex: 0, itemsKey: 'participants' } }, }, '/open-apis/vc/v1/participant_quality_list': { - GET: 'getVcParticipantQualityList', + GET: { name: 'getVcParticipantQualityList', pagination: { argIndex: 0, itemsKey: 'participant_quality_list' } }, }, '/open-apis/vc/v1/resource_reservation_list': { - GET: 'getVcResourceReservationList', + GET: { name: 'getVcResourceReservationList', pagination: { argIndex: 0, itemsKey: 'room_reservation_list' } }, }, '/open-apis/vc/v1/alerts': { - GET: 'listVcAlert', + GET: { name: 'listVcAlert', pagination: { argIndex: 0 } }, }, '/open-apis/vc/v1/room_configs/set_checkboard_access_code': { POST: 'setCheckboardAccessCodeVcRoomConfig', diff --git a/adapters/lark/src/types/wiki.ts b/adapters/lark/src/types/wiki.ts index 1192252e..2554afa9 100644 --- a/adapters/lark/src/types/wiki.ts +++ b/adapters/lark/src/types/wiki.ts @@ -7,7 +7,12 @@ declare module '../internal' { * 获取知识空间列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space/list */ - listWikiSpace(query?: ListWikiSpaceQuery): Promise> + listWikiSpace(query?: ListWikiSpaceQuery & Pagination): Promise> + /** + * 获取知识空间列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space/list + */ + listWikiSpaceIter(query?: ListWikiSpaceQuery): AsyncIterator /** * 获取知识空间信息 * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space/get @@ -22,7 +27,12 @@ declare module '../internal' { * 获取知识空间成员列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-member/list */ - listWikiSpaceMember(space_id: string, query?: ListWikiSpaceMemberQuery): Promise> + listWikiSpaceMember(space_id: string, query?: Pagination): Promise> + /** + * 获取知识空间成员列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-member/list + */ + listWikiSpaceMemberIter(space_id: string): AsyncIterator /** * 添加知识空间成员 * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-member/create @@ -52,7 +62,12 @@ declare module '../internal' { * 获取知识空间子节点列表 * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-node/list */ - listWikiSpaceNode(space_id: string, query?: ListWikiSpaceNodeQuery): Promise> + listWikiSpaceNode(space_id: string, query?: ListWikiSpaceNodeQuery & Pagination): Promise> + /** + * 获取知识空间子节点列表 + * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-node/list + */ + listWikiSpaceNodeIter(space_id: string, query?: ListWikiSpaceNodeQuery): AsyncIterator /** * 移动知识空间节点 * @see https://open.feishu.cn/document/ukTMukTMukTM/uUDN04SN0QjL1QDN/wiki-v2/space-node/move @@ -82,11 +97,16 @@ declare module '../internal' { * 搜索 Wiki * @see https://open.feishu.cn/document/ukTMukTMukTM/uEzN0YjLxcDN24SM3QjN/search_wiki */ - searchWikiNode(body: SearchWikiNodeRequest, query?: SearchWikiNodeQuery): Promise> + searchWikiNode(body: SearchWikiNodeRequest, query?: Pagination): Promise> + /** + * 搜索 Wiki + * @see https://open.feishu.cn/document/ukTMukTMukTM/uEzN0YjLxcDN24SM3QjN/search_wiki + */ + searchWikiNodeIter(body: SearchWikiNodeRequest): AsyncIterator } } -export interface ListWikiSpaceQuery extends Pagination { +export interface ListWikiSpaceQuery { /** 当查询个人文档库时,指定返回的文档库名称展示语言。可选值有:zh, id, de, en, es, fr, it, pt, vi, ru, hi, th, ko, ja, zh-HK, zh-TW。 */ lang?: 'zh' | 'id' | 'de' | 'en' | 'es' | 'fr' | 'it' | 'pt' | 'vi' | 'ru' | 'hi' | 'th' | 'ko' | 'ja' | 'zh-HK' | 'zh-TW' } @@ -105,9 +125,6 @@ export interface CreateWikiSpaceRequest { open_sharing?: 'open' | 'closed' } -export interface ListWikiSpaceMemberQuery extends Pagination { -} - export interface CreateWikiSpaceMemberRequest { /** 知识库协作者 ID 类型 */ member_type: string @@ -160,7 +177,7 @@ export interface GetNodeWikiSpaceQuery { obj_type?: 'doc' | 'docx' | 'sheet' | 'mindnote' | 'bitable' | 'file' | 'slides' | 'wiki' } -export interface ListWikiSpaceNodeQuery extends Pagination { +export interface ListWikiSpaceNodeQuery { /** 父节点token */ parent_node_token?: string } @@ -211,9 +228,6 @@ export interface SearchWikiNodeRequest { node_id?: string } -export interface SearchWikiNodeQuery extends Pagination { -} - export interface GetWikiSpaceResponse { /** 知识空间 */ space?: Space @@ -275,14 +289,14 @@ export interface GetWikiTaskResponse { Internal.define({ '/open-apis/wiki/v2/spaces': { - GET: 'listWikiSpace', + GET: { name: 'listWikiSpace', pagination: { argIndex: 0 } }, POST: 'createWikiSpace', }, '/open-apis/wiki/v2/spaces/{space_id}': { GET: 'getWikiSpace', }, '/open-apis/wiki/v2/spaces/{space_id}/members': { - GET: 'listWikiSpaceMember', + GET: { name: 'listWikiSpaceMember', pagination: { argIndex: 1, itemsKey: 'members' } }, POST: 'createWikiSpaceMember', }, '/open-apis/wiki/v2/spaces/{space_id}/members/{member_id}': { @@ -293,7 +307,7 @@ Internal.define({ }, '/open-apis/wiki/v2/spaces/{space_id}/nodes': { POST: 'createWikiSpaceNode', - GET: 'listWikiSpaceNode', + GET: { name: 'listWikiSpaceNode', pagination: { argIndex: 1 } }, }, '/open-apis/wiki/v2/spaces/get_node': { GET: 'getNodeWikiSpace', @@ -314,6 +328,6 @@ Internal.define({ GET: 'getWikiTask', }, '/open-apis/wiki/v1/nodes/search': { - POST: 'searchWikiNode', + POST: { name: 'searchWikiNode', pagination: { argIndex: 1 } }, }, }) diff --git a/adapters/lark/src/types/workplace.ts b/adapters/lark/src/types/workplace.ts index c024c2dc..dfd24069 100644 --- a/adapters/lark/src/types/workplace.ts +++ b/adapters/lark/src/types/workplace.ts @@ -7,28 +7,43 @@ declare module '../internal' { * 获取工作台访问数据 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/workplace-v1/workplace_access_data/search */ - searchWorkplaceWorkplaceAccessData(query?: SearchWorkplaceWorkplaceAccessDataQuery): Promise> + searchWorkplaceWorkplaceAccessData(query?: SearchWorkplaceWorkplaceAccessDataQuery & Pagination): Promise> + /** + * 获取工作台访问数据 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/workplace-v1/workplace_access_data/search + */ + searchWorkplaceWorkplaceAccessDataIter(query?: SearchWorkplaceWorkplaceAccessDataQuery): AsyncIterator + /** + * 获取定制工作台访问数据 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/workplace-v1/custom_workplace_access_data/search + */ + searchWorkplaceCustomWorkplaceAccessData(query?: SearchWorkplaceCustomWorkplaceAccessDataQuery & Pagination): Promise> /** * 获取定制工作台访问数据 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/workplace-v1/custom_workplace_access_data/search */ - searchWorkplaceCustomWorkplaceAccessData(query?: SearchWorkplaceCustomWorkplaceAccessDataQuery): Promise> + searchWorkplaceCustomWorkplaceAccessDataIter(query?: SearchWorkplaceCustomWorkplaceAccessDataQuery): AsyncIterator + /** + * 获取定制工作台小组件访问数据 + * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/workplace-v1/workplace_block_access_data/search + */ + searchWorkplaceWorkplaceBlockAccessData(query?: SearchWorkplaceWorkplaceBlockAccessDataQuery & Pagination): Promise> /** * 获取定制工作台小组件访问数据 * @see https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/workplace-v1/workplace_block_access_data/search */ - searchWorkplaceWorkplaceBlockAccessData(query?: SearchWorkplaceWorkplaceBlockAccessDataQuery): Promise> + searchWorkplaceWorkplaceBlockAccessDataIter(query?: SearchWorkplaceWorkplaceBlockAccessDataQuery): AsyncIterator } } -export interface SearchWorkplaceWorkplaceAccessDataQuery extends Pagination { +export interface SearchWorkplaceWorkplaceAccessDataQuery { /** 数据检索开始时间,精确到日。格式yyyy-MM-dd */ from_date: string /** 数据检索结束时间,精确到日。格式yyyy-MM-dd。 */ to_date: string } -export interface SearchWorkplaceCustomWorkplaceAccessDataQuery extends Pagination { +export interface SearchWorkplaceCustomWorkplaceAccessDataQuery { /** 数据检索开始时间,精确到日。格式yyyy-MM-dd */ from_date: string /** 数据检索结束时间,精确到日。格式yyyy-MM-dd。 */ @@ -37,7 +52,7 @@ export interface SearchWorkplaceCustomWorkplaceAccessDataQuery extends Paginatio custom_workplace_id?: string } -export interface SearchWorkplaceWorkplaceBlockAccessDataQuery extends Pagination { +export interface SearchWorkplaceWorkplaceBlockAccessDataQuery { /** 数据检索开始时间,精确到日。格式yyyy-MM-dd。 */ from_date: string /** 数据检索结束时间,精确到日。格式yyyy-MM-dd。 */ @@ -48,12 +63,12 @@ export interface SearchWorkplaceWorkplaceBlockAccessDataQuery extends Pagination Internal.define({ '/open-apis/workplace/v1/workplace_access_data/search': { - POST: 'searchWorkplaceWorkplaceAccessData', + POST: { name: 'searchWorkplaceWorkplaceAccessData', pagination: { argIndex: 0 } }, }, '/open-apis/workplace/v1/custom_workplace_access_data/search': { - POST: 'searchWorkplaceCustomWorkplaceAccessData', + POST: { name: 'searchWorkplaceCustomWorkplaceAccessData', pagination: { argIndex: 0 } }, }, '/open-apis/workplace/v1/workplace_block_access_data/search': { - POST: 'searchWorkplaceWorkplaceBlockAccessData', + POST: { name: 'searchWorkplaceWorkplaceBlockAccessData', pagination: { argIndex: 0 } }, }, })