@larksuiteoapi/lark-mcp
Version:
Feishu/Lark OpenAPI MCP
698 lines • 318 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.corehrV1JobFamilyList = exports.corehrV1JobFamilyGet = exports.corehrV1JobFamilyDelete = exports.corehrV1JobFamilyCreate = exports.corehrV1JobDataPatch = exports.corehrV1JobDataList = exports.corehrV1JobDataGet = exports.corehrV1JobDataDelete = exports.corehrV1JobDataCreate = exports.corehrV1JobChangeCreate = exports.corehrV1EmploymentPatch = exports.corehrV1EmploymentDelete = exports.corehrV1EmploymentCreate = exports.corehrV1EmployeeTypePatch = exports.corehrV1EmployeeTypeList = exports.corehrV1EmployeeTypeGet = exports.corehrV1EmployeeTypeDelete = exports.corehrV1EmployeeTypeCreate = exports.corehrV1DepartmentPatch = exports.corehrV1DepartmentList = exports.corehrV1DepartmentGet = exports.corehrV1DepartmentDelete = exports.corehrV1DepartmentCreate = exports.corehrV1CustomFieldQuery = exports.corehrV1CustomFieldListObjectApiName = exports.corehrV1CustomFieldGetByParam = exports.corehrV1CurrencyList = exports.corehrV1CurrencyGet = exports.corehrV1CountryRegionList = exports.corehrV1CountryRegionGet = exports.corehrV1ContractPatch = exports.corehrV1ContractList = exports.corehrV1ContractGet = exports.corehrV1ContractDelete = exports.corehrV1ContractCreate = exports.corehrV1CompensationStandardMatch = exports.corehrV1CompanyPatch = exports.corehrV1CompanyList = exports.corehrV1CompanyGet = exports.corehrV1CompanyDelete = exports.corehrV1CompanyCreate = exports.corehrV1CommonDataMetaDataEditEnumOption = exports.corehrV1CommonDataMetaDataAddEnumOption = exports.corehrV1CommonDataIdConvert = exports.corehrV1AuthorizationUpdateRoleAssign = exports.corehrV1AuthorizationRemoveRoleAssign = exports.corehrV1AuthorizationQuery = exports.corehrV1AuthorizationGetByParam = exports.corehrV1AuthorizationAddRoleAssign = exports.corehrV1AssignedUserSearch = void 0;
exports.corehrV1WorkingHoursTypeDelete = exports.corehrV1WorkingHoursTypeCreate = exports.corehrV1TransferTypeQuery = exports.corehrV1TransferReasonQuery = exports.corehrV1SubregionList = exports.corehrV1SubregionGet = exports.corehrV1SubdivisionList = exports.corehrV1SubdivisionGet = exports.corehrV1SecurityGroupQuery = exports.corehrV1SecurityGroupList = exports.corehrV1ProcessFormVariableDataGet = exports.corehrV1PreHirePatch = exports.corehrV1PreHireList = exports.corehrV1PreHireGet = exports.corehrV1PreHireDelete = exports.corehrV1PersonPatch = exports.corehrV1PersonGet = exports.corehrV1PersonDelete = exports.corehrV1PersonCreate = exports.corehrV1OffboardingSubmit = exports.corehrV1OffboardingSearch = exports.corehrV1OffboardingQuery = exports.corehrV1NationalIdTypePatch = exports.corehrV1NationalIdTypeList = exports.corehrV1NationalIdTypeGet = exports.corehrV1NationalIdTypeDelete = exports.corehrV1NationalIdTypeCreate = exports.corehrV1LocationList = exports.corehrV1LocationGet = exports.corehrV1LocationDelete = exports.corehrV1LocationCreate = exports.corehrV1LeaveWorkCalendarDate = exports.corehrV1LeaveWorkCalendar = exports.corehrV1LeaveLeaveTypes = exports.corehrV1LeaveLeaveRequestHistory = exports.corehrV1LeaveLeaveBalances = exports.corehrV1LeaveCalendarByScope = exports.corehrV1LeaveGrantingRecordDelete = exports.corehrV1LeaveGrantingRecordCreate = exports.corehrV1JobPatch = exports.corehrV1JobList = exports.corehrV1JobGet = exports.corehrV1JobDelete = exports.corehrV1JobCreate = exports.corehrV1JobLevelPatch = exports.corehrV1JobLevelList = exports.corehrV1JobLevelGet = exports.corehrV1JobLevelDelete = exports.corehrV1JobLevelCreate = exports.corehrV1JobFamilyPatch = void 0;
exports.corehrV1Tools = exports.corehrV1WorkingHoursTypePatch = exports.corehrV1WorkingHoursTypeList = exports.corehrV1WorkingHoursTypeGet = void 0;
const zod_1 = require("zod");
exports.corehrV1AssignedUserSearch = {
project: 'corehr',
name: 'corehr.v1.assignedUser.search',
sdkName: 'corehr.v1.assignedUser.search',
path: '/open-apis/corehr/v1/assigned_users/search',
httpMethod: 'POST',
description: '[Feishu/Lark]-Feishu People(Enterprise Edition)-User authorization-List organization class role authorizations-Query authorization information for organizational roles',
accessTokens: ['tenant'],
schema: {
data: zod_1.z.object({
role_id: zod_1.z
.string()
.describe('Role ID Only supports organizational roles Role IDs can be obtained through the bulk access role list interface'),
management_scope_list: zod_1.z
.array(zod_1.z.object({
management_dimension: zod_1.z
.string()
.describe('Management dimension Optional values are: - department: department - work_location: workplace - company: company - social_security_location: Social Security City'),
obj_id: zod_1.z.string().describe('Authorized Department/Workplace/Company/Social Security City ID'),
}))
.describe('Management Scope Information'),
search_method: zod_1.z
.string()
.describe('How to find Optional values are: - 1: Only look for the specified department/work place/company/social security city, if there is no authorization information, it will return empty - 2: When the specified department/work place/company/social security city has no authorization information, look up the first authorization record and return directly'),
page_token: zod_1.z
.string()
.describe('Page identifier. It is not filled in the first request, indicating traversal from the beginning; when there will be more groups, the new page_token will be returned at the same time, and the next traversal can use the page_token to get more groups')
.optional(),
page_size: zod_1.z.string().describe('Page size'),
}),
params: zod_1.z.object({
user_id_type: zod_1.z.enum(['open_id', 'union_id', 'user_id', 'people_corehr_id']).describe('User ID type').optional(),
}),
},
};
exports.corehrV1AuthorizationAddRoleAssign = {
project: 'corehr',
name: 'corehr.v1.authorization.addRoleAssign',
sdkName: 'corehr.v1.authorization.addRoleAssign',
path: '/open-apis/corehr/v1/authorizations/add_role_assign',
httpMethod: 'POST',
description: '[Feishu/Lark]-Feishu People(Enterprise Edition)-User authorization-Authorized roles managed by organizational structure.-Authorize roles and management scope for users. Continuing to authorize users who have been authorized for a certain role will add data scope on the basis of the original authorized data scope',
accessTokens: ['tenant'],
schema: {
data: zod_1.z.object({
assigned_organization_items: zod_1.z
.array(zod_1.z.array(zod_1.z.object({
org_key: zod_1.z.string().describe('Manage object keys'),
org_ids: zod_1.z.array(zod_1.z.string()).describe('Manage object id list').optional(),
org_codes: zod_1.z.array(zod_1.z.string()).describe('Manage object code list').optional(),
})))
.describe('Authorization scope of the authorized role. You need to construct the structure according to the request body example.It is a two-dimensional array that you can use to authorize roles with multiple administrative dimensions, such as a Local HRBP.- ==org_key==: Management dimension. Options are - department: ==department== - work location: ==work_location== - company: ==company== - cost center: ==organization_id_strand== - Social Security City:==social_security_location== - onboarding location: ==onboarding_location== - pay group: ==pay_group== - talent pool: ==talent_pool== - custom organization types: You can view the custom organization type code under the custom organization directory in "Feishu people - Settings-Organization Settings", such as ==custom_org_01==, ==custom_org_02==, ==custom_org_03==, ==custom_org_04==, ==custom_org_05==- ==org_ids==: Organization ID. Organization ID and organization code only need to fill in one- ==org_codes==: Organization Code. Organization ID and Organization Code only need to fill in one'),
}),
params: zod_1.z.object({
employment_id: zod_1.z
.string()
.describe('The ID of the authorized user, defaults to ==employment_id== in Feishu People. You can also use the other 3 IDs declared in the ==user_id_type==.>If you need to use the job number, you can use in exchange for ==employment_id=='),
user_id_type: zod_1.z.enum(['open_id', 'union_id', 'user_id', 'people_corehr_id']).describe('User ID type').optional(),
role_id: zod_1.z
.string()
.describe('The ID of the authorized role, which can only be authorized one role at a time. You can get it using , or get it in the role details (number at the end of the URL)'),
}),
},
};
exports.corehrV1AuthorizationGetByParam = {
project: 'corehr',
name: 'corehr.v1.authorization.getByParam',
sdkName: 'corehr.v1.authorization.getByParam',
path: '/open-apis/corehr/v1/authorizations/get_by_param',
httpMethod: 'GET',
description: '[Feishu/Lark]-Feishu People(Enterprise Edition)-User authorization-Query individual user authorization-Query individual user authorization',
accessTokens: ['tenant'],
schema: {
params: zod_1.z.object({
employment_id: zod_1.z
.string()
.describe('The ID of the authorized user, defaults to ==employment_id== in Feishu personnel. You can also use the other 3 IDs declared in the user_id_type.>If you need to use the job number, you can use in exchange for ==employment_id=='),
user_id_type: zod_1.z.enum(['open_id', 'union_id', 'user_id', 'people_corehr_id']).describe('User ID type').optional(),
}),
},
};
exports.corehrV1AuthorizationQuery = {
project: 'corehr',
name: 'corehr.v1.authorization.query',
sdkName: 'corehr.v1.authorization.query',
path: '/open-apis/corehr/v1/authorizations/query',
httpMethod: 'GET',
description: '[Feishu/Lark]-Feishu People(Enterprise Edition)-User authorization-Batch query user authorization-Batch query the authorization information of a single user in the "Permission Settings" in Feishu\'s personnel management backend. You can find the corresponding location by following "Feishu Personnel" - "Permission Settings". Authorization information includes employee ID, authorized roles and other information',
accessTokens: ['tenant'],
schema: {
params: zod_1.z.object({
employment_id_list: zod_1.z
.array(zod_1.z.string())
.describe('Employee ID list, up to 100 (if not passed, all employees will be queried by default)')
.optional(),
role_id_list: zod_1.z.array(zod_1.z.string()).describe('Role ID list, up to 100').optional(),
page_token: zod_1.z
.string()
.describe('Page identifier. It is not filled in the first request, indicating traversal from the beginning; when there will be more groups, the new page_token will be returned at the same time, and the next traversal can use the page_token to get more groups')
.optional(),
page_size: zod_1.z.string().describe('Number of records fetched per page, up to 100').optional(),
user_id_type: zod_1.z.enum(['open_id', 'union_id', 'user_id', 'people_corehr_id']).describe('User ID type').optional(),
updated_at_gte: zod_1.z.string().describe('Authorization time is greater than').optional(),
updated_at_lte: zod_1.z.string().describe('Authorization time is less than').optional(),
}),
},
};
exports.corehrV1AuthorizationRemoveRoleAssign = {
project: 'corehr',
name: 'corehr.v1.authorization.removeRoleAssign',
sdkName: 'corehr.v1.authorization.removeRoleAssign',
path: '/open-apis/corehr/v1/authorizations/remove_role_assign',
httpMethod: 'POST',
description: '[Feishu/Lark]-Feishu People(Enterprise Edition)-User authorization-移除用户被授权的角色-Remove the specified role and authorization scope for which the user is authorized. Existing authorization can be obtained by querying .Or view it in the Feishu ',
accessTokens: ['tenant'],
schema: {
params: zod_1.z.object({
employment_id: zod_1.z
.string()
.describe('The ID of the authorized user, defaults to ==employment_id== in Feishu People. You can also use the other 3 IDs declared in the ==user_id_type==.>If you need to use the job number, you can use in exchange for ==employment_id=='),
user_id_type: zod_1.z.enum(['open_id', 'union_id', 'user_id', 'people_corehr_id']).describe('User ID type').optional(),
role_id: zod_1.z
.string()
.describe('The ID of the character being removed., which can only be removed one role at a time. You can get it using , or get (the number at the end of the URL) role_id from the URL of the Feishu personnel role details page'),
}),
},
};
exports.corehrV1AuthorizationUpdateRoleAssign = {
project: 'corehr',
name: 'corehr.v1.authorization.updateRoleAssign',
sdkName: 'corehr.v1.authorization.updateRoleAssign',
path: '/open-apis/corehr/v1/authorizations/update_role_assign',
httpMethod: 'POST',
description: '[Feishu/Lark]-Feishu People(Enterprise Edition)-User authorization-更新组织类角色授权范围-Update the administrative scope of the role authorizationThe updated data range is subject to the data range submitted this time, and the unsubmitted part will be removed',
accessTokens: ['tenant'],
schema: {
data: zod_1.z.object({
assigned_organization_items: zod_1.z
.array(zod_1.z.array(zod_1.z.object({
org_key: zod_1.z.string().describe('Manage object keys'),
org_ids: zod_1.z.array(zod_1.z.string()).describe('Manage object id list').optional(),
org_codes: zod_1.z.array(zod_1.z.string()).describe('Manage object code list').optional(),
})))
.describe('Authorization scope of the authorized role. You need to construct the structure according to the request body example.It is a two-dimensional array that you can use to authorize roles with multiple administrative dimensions, such as a Local HRBP.- ==org_key==: Management dimension. Options are - Department: ==department== - Place of work: ==work_location== - Company: ==company== - cost center: ==organization_id_strand== - Social Security City: ==social_security_location== - Location: ==onboarding_location== - Salary group: ==pay_group== - Talent pool: ==talent_pool== - Custom Organization: You can view the custom organization type code under the custom organization directory in "Feishu People-Settings-Organization Settings", such as ==custom_org_01==, ==custom_org_02==, ==custom_org_03==, ==custom_org_04==, ==custom_org_05==- ==org_ids==: Organization ID. Organization ID and organization code only need to fill in one- ==org_codes==: Organization Code. Organization ID and Organization Code only need to fill in one'),
}),
params: zod_1.z.object({
employment_id: zod_1.z
.string()
.describe('The ID of the authorized user, defaults to ==employment_id== in Feishu People. You can also use the other 3 IDs declared in the ==user_id_type==.>If you need to use the job number, you can use in exchange for ==employment_id=='),
user_id_type: zod_1.z.enum(['open_id', 'union_id', 'user_id', 'people_corehr_id']).describe('User ID type').optional(),
role_id: zod_1.z
.string()
.describe('The ID of the authorized role, which can only be authorized one role at a time. You can get it using , or get it in the role details (number at the end of the URL)'),
}),
},
};
exports.corehrV1CommonDataIdConvert = {
project: 'corehr',
name: 'corehr.v1.commonDataId.convert',
sdkName: 'corehr.v1.commonDataId.convert',
path: '/open-apis/corehr/v1/common_data/id/convert',
httpMethod: 'POST',
description: '[Feishu/Lark]-Feishu People(Enterprise Edition)-ID Service-ID Convert-This interface is used to perform various ID conversions in Feishu People, Feishu Contacts, and people admin (Only applied to CoreHR new link tenants)',
accessTokens: ['tenant'],
schema: {
data: zod_1.z.object({
ids: zod_1.z
.array(zod_1.z.string())
.describe('ID list (up to 100 IDs are passed in, and the ID length is limited to 50 characters)'),
}),
params: zod_1.z.object({
id_transform_type: zod_1.z
.number()
.describe('ID conversion type Options:1(CoreHR2Feishu Feishu People - > Feishu Contacts),2(Feishu2CoreHR Feishu Contacts - > Feishu People),3(Admin2Feishu People Admin - > Feishu Contacts),4(Admin2CoreHR People admin - > Feishu People)'),
id_type: zod_1.z
.enum(['user_id', 'department_id', 'job_level_id', 'job_family_id', 'employee_type_id'])
.describe('ID type to convert Options:user_id(EmploymentID Employee ID, when user_id is selected and id_transform_type 1, 2, 4, feishu_user_id_type required),department_id(DepartmentID Department ID, when department_id is selected and id_transform_type 1, 2, 4, feishu_department_id_type required),job_level_id(JobLevelID rank ID),job_family_id(JobFamilyID Serial ID),employee_type_id(EmployeeTypeID Person Type ID, the Person Type ID of people admin is equal to the enum value of directory. Therefore, no conversion is required when the id transform type is 3)'),
feishu_user_id_type: zod_1.z
.enum(['open_id', 'union_id', 'user_id'])
.describe('User ID categories Options:open_id(Identifies the identity of a user in an application. The same user has different Open IDs in different applications. ),union_id(Identifies the identity of a user under an application developer. The Union ID of the same user in an application under the same developer is the same, and the Union ID in an application under different developers is different. With Union ID, application developers can associate the identity of the same user in multiple applications. ),user_id(Identifies the identity of a user in a tenant. The user ID of the same user in tenant A and tenant B is different. Within the same tenant, the user ID of a user is consistent in all applications (including store applications). User IDs are mainly used to connect user data between different applications. )')
.optional(),
feishu_department_id_type: zod_1.z
.enum(['open_department_id', 'department_id'])
.describe('The type of department ID used in this call Options:open_department_id(Identify departments by open_department_id),department_id(Identify departments by department_id)')
.optional(),
}),
},
};
exports.corehrV1CommonDataMetaDataAddEnumOption = {
project: 'corehr',
name: 'corehr.v1.commonDataMetaData.addEnumOption',
sdkName: 'corehr.v1.commonDataMetaData.addEnumOption',
path: '/open-apis/corehr/v1/common_data/meta_data/add_enum_option',
httpMethod: 'POST',
description: '[Feishu/Lark]-Feishu People(Enterprise Edition)-Basic infomation-Meta data-Add enumeration value option-Add field enumeration value option',
accessTokens: ['tenant'],
schema: {
data: zod_1.z.object({
object_api_name: zod_1.z.string().describe('Owned object apiname'),
enum_field_api_name: zod_1.z.string().describe('Enumeration field apiname'),
enum_field_options: zod_1.z
.array(zod_1.z.object({
option_api_name: zod_1.z.string().describe('Option apiname, which is the unique identifier of the option'),
name: zod_1.z
.object({
zh_cn: zod_1.z.string().describe('Chinese').optional(),
en_us: zod_1.z.string().describe('English').optional(),
})
.describe('Option name (fill in at least one language name)'),
}))
.describe('Add enumeration options list'),
}),
params: zod_1.z.object({
client_token: zod_1.z
.string()
.describe('Determine whether it is the same request according to whether the client_token are consistent')
.optional(),
}),
},
};
exports.corehrV1CommonDataMetaDataEditEnumOption = {
project: 'corehr',
name: 'corehr.v1.commonDataMetaData.editEnumOption',
sdkName: 'corehr.v1.commonDataMetaData.editEnumOption',
path: '/open-apis/corehr/v1/common_data/meta_data/edit_enum_option',
httpMethod: 'POST',
description: '[Feishu/Lark]-Feishu People(Enterprise Edition)-Basic infomation-Meta data-Modify enumeration value options-Modify field enumeration value options',
accessTokens: ['tenant'],
schema: {
data: zod_1.z.object({
object_api_name: zod_1.z.string().describe('Owned object apiname'),
enum_field_api_name: zod_1.z.string().describe('Enumeration field apiname'),
enum_field_option: zod_1.z
.object({
option_api_name: zod_1.z.string().describe('Option API name, which is the unique identifier of the option'),
active: zod_1.z.boolean().describe('Whether to enable'),
name: zod_1.z
.object({
zh_cn: zod_1.z.string().describe('Chinese').optional(),
en_us: zod_1.z.string().describe('English').optional(),
})
.describe('Option name (fill in at least one language name)'),
})
.describe('Enumeration options'),
}),
params: zod_1.z.object({
client_token: zod_1.z
.string()
.describe('Determine whether it is the same request according to whether the client_token are consistent')
.optional(),
}),
},
};
exports.corehrV1CompanyCreate = {
project: 'corehr',
name: 'corehr.v1.company.create',
sdkName: 'corehr.v1.company.create',
path: '/open-apis/corehr/v1/companies',
httpMethod: 'POST',
description: '[Feishu/Lark]-Feishu People(Enterprise Edition)-Organization management-Company-Create company-Support for adding company information in a single interface, including company basic information, registered address information, work address information, etc',
accessTokens: ['tenant'],
schema: {
data: zod_1.z.object({
hiberarchy_common: zod_1.z
.object({
parent_id: zod_1.z.string().describe('Parent organization').optional(),
name: zod_1.z
.array(zod_1.z.object({
lang: zod_1.z
.string()
.describe('Language.This supports Chinese and English. For Chinese, use zh-CN; for English, use en-US'),
value: zod_1.z
.string()
.describe('Content.This supports Chinese and English. For Chinese, use zh-CN; for English, use en-US'),
}))
.describe('name'),
active: zod_1.z.boolean().describe('Enable the company'),
effective_time: zod_1.z
.string()
.describe('Version effective date- Fill in the format: YYYY-MM-DD 00:00:00 (the system will automatically change the hours, minutes and seconds to 00:00:00)- The system defaults to take effect at 00:00:00 on the day when the date is filled in- This interface only supports the smallest unit of day- Date range requirements: 1900-01-01 00:00:00~9999-12-31 23:59:59')
.optional(),
code: zod_1.z
.string()
.describe('Company code (cannot be duplicated with other records)- When turning on automatic encoding, if no value is passed, the encoding will be automatically generated, otherwise the incoming value shall prevail- When automatic encoding is not enabled, the encoding will not be automatically generated without passing the value')
.optional(),
description: zod_1.z
.array(zod_1.z.object({
lang: zod_1.z
.string()
.describe('Language.This supports Chinese and English. For Chinese, use zh-CN; for English, use en-US'),
value: zod_1.z
.string()
.describe('Content.This supports Chinese and English. For Chinese, use zh-CN; for English, use en-US'),
}))
.describe('Description')
.optional(),
custom_fields: zod_1.z
.array(zod_1.z.object({
field_name: zod_1.z.string().describe('Field name'),
value: zod_1.z
.string()
.describe('The field value is the character string after json escape. According to the metadata definition, the field format is different (such as 123, 123.23, "true", [\\ "id1\\",\\ "id2 \\"], " 2006-01-02 15:04:05")'),
}))
.describe('Custom fields')
.optional(),
})
.describe("Company basic information, the structure maintains the company's name, code, enabling status, parent company and other basic information"),
type: zod_1.z
.object({ enum_name: zod_1.z.string().describe('Enumeration value') })
.describe('The nature of the company is obtained through the query. Request parameters: object_api_name = company; custom_api_name = type')
.optional(),
industry_list: zod_1.z
.array(zod_1.z.object({ enum_name: zod_1.z.string().describe('Enumeration value') }))
.describe('The industry is located, and it is obtained through the query. Request parameters: object_api_name = company; custom_api_name = industry')
.optional(),
legal_representative: zod_1.z
.array(zod_1.z.object({
lang: zod_1.z
.string()
.describe('Language.This supports Chinese and English. For Chinese, use zh-CN; for English, use en-US'),
value: zod_1.z
.string()
.describe('Content.This supports Chinese and English. For Chinese, use zh-CN; for English, use en-US'),
}))
.describe('Legal Representative.Only when the country/region in the registered address is not Chinese mainland, the legal representative field is valid.If the country/region in the registered address is not Chinese mainland, then filling in the legal representative field is invalid')
.optional(),
post_code: zod_1.z.string().describe('Zip Code').optional(),
tax_payer_id: zod_1.z.string().describe('Taxpayer identification number').optional(),
confidential: zod_1.z
.boolean()
.describe('Whether it is confidential, this function is not supported for the time being and can be ignored')
.optional(),
sub_type_list: zod_1.z
.array(zod_1.z.object({ enum_name: zod_1.z.string().describe('Enumeration value') }))
.describe('Company principal type, obtained by query. Request parameters: object_api_name = company; custom_api_name = subtype')
.optional(),
branch_company: zod_1.z.boolean().describe('Is it a branch office?').optional(),
primary_manager: zod_1.z
.array(zod_1.z.object({
lang: zod_1.z
.string()
.describe('Language.This supports Chinese and English. For Chinese, use zh-CN; for English, use en-US'),
value: zod_1.z
.string()
.describe('Content.This supports Chinese and English. For Chinese, use zh-CN; for English, use en-US'),
}))
.describe('Main person in charge')
.optional(),
custom_fields: zod_1.z
.array(zod_1.z.object({
field_name: zod_1.z.string().describe('Field name'),
value: zod_1.z
.string()
.describe('The field value is the character string after json escape. According to the metadata definition, the field format is different (such as 123, 123.23, "true", [\\ "id1\\",\\ "id2 \\"], " 2006-01-02 15:04:05")'),
}))
.describe('Custom fields')
.optional(),
currency: zod_1.z
.object({
currency_name: zod_1.z
.array(zod_1.z.object({
lang: zod_1.z
.string()
.describe('language.This supports Chinese and English. For Chinese, use zh-CN; for English, use en-US'),
value: zod_1.z
.string()
.describe('content.This supports Chinese and English. For Chinese, use zh-CN; for English, use en-US'),
}))
.describe('currency name')
.optional(),
numeric_code: zod_1.z
.number()
.describe('The reference code of the corresponding currency. obtained through the ')
.optional(),
currency_alpha_3_code: zod_1.z
.string()
.describe('Legal currency corresponding codes, such as CNY, USD, etc.obtained through the ')
.optional(),
})
.describe('Default currency')
.optional(),
phone: zod_1.z
.object({
area_code: zod_1.z
.object({ enum_name: zod_1.z.string().describe('Area code corresponding name') })
.describe('The number corresponding to the area code.Query and obtain. Request parameters: object_api_name = phone; custom_api_name = international_area_code'),
phone_number: zod_1.z.string().describe('number'),
})
.describe('Telephone')
.optional(),
fax: zod_1.z
.object({
area_code: zod_1.z
.object({ enum_name: zod_1.z.string().describe('Area code corresponding name') })
.describe('area code.Query and obtain. Request parameters: object_api_name = phone; custom_api_name = international_area_code'),
phone_number: zod_1.z.string().describe('number'),
})
.describe('fax')
.optional(),
registered_office_address_info: zod_1.z
.object({
country_region_id: zod_1.z
.string()
.describe('Country/region ID.The fields for each country/region can be queried by referring to Query and obtain'),
region_id: zod_1.z
.string()
.describe('main administrative region ID.Query and obtain')
.optional(),
city_id: zod_1.z
.string()
.describe('City ID.Query and obtain')
.optional(),
distinct_id: zod_1.z
.string()
.describe('District/County ID,Query and obtain')
.optional(),
address_line1: zod_1.z.string().describe('Address line 1').optional(),
address_line2: zod_1.z.string().describe('Address line 2').optional(),
address_line3: zod_1.z.string().describe('Address line 3').optional(),
address_line4: zod_1.z.string().describe('Address line 4').optional(),
address_line5: zod_1.z.string().describe('Address line 5').optional(),
address_line6: zod_1.z.string().describe('Address line 6').optional(),
address_line7: zod_1.z.string().describe('Address line 7').optional(),
address_line8: zod_1.z.string().describe('Address line 8').optional(),
address_line9: zod_1.z.string().describe('Address line 9').optional(),
local_address_line1: zod_1.z.string().describe('Address line 1 (non-Latin native characters)').optional(),
local_address_line2: zod_1.z.string().describe('Address line 2 (non-Latin native characters)').optional(),
local_address_line3: zod_1.z.string().describe('Address line 3 (non-Latin native characters)').optional(),
local_address_line4: zod_1.z.string().describe('Address line 4 (non-Latin native characters)').optional(),
local_address_line5: zod_1.z.string().describe('Address line 5 (non-Latin native characters)').optional(),
local_address_line6: zod_1.z.string().describe('Address line 6 (non-Latin native characters)').optional(),
local_address_line7: zod_1.z.string().describe('Address line 7 (non-Latin native characters)').optional(),
local_address_line8: zod_1.z.string().describe('Address line 8 (non-Latin native characters)').optional(),
local_address_line9: zod_1.z.string().describe('Address line 9 (non-Latin native characters)').optional(),
postal_code: zod_1.z.string().describe('Postal Code').optional(),
})
.describe('Registered address details. Public field, required if the request is for a company')
.optional(),
office_address_info: zod_1.z
.object({
country_region_id: zod_1.z
.string()
.describe('Country/region ID.The fields for each country/region can be queried by referring to 。Query and obtain'),
region_id: zod_1.z
.string()
.describe('main administrative region ID.Query and obtain')
.optional(),
city_id: zod_1.z
.string()
.describe('City ID.Query and obtain')
.optional(),
distinct_id: zod_1.z
.string()
.describe('District/County Id. Query and obtain')
.optional(),
address_line1: zod_1.z.string().describe('Address line 1').optional(),
address_line2: zod_1.z.string().describe('Address line 2').optional(),
address_line3: zod_1.z.string().describe('Address line 3').optional(),
address_line4: zod_1.z.string().describe('Address line 4').optional(),
address_line5: zod_1.z.string().describe('Address line 5').optional(),
address_line6: zod_1.z.string().describe('Address line 6').optional(),
address_line7: zod_1.z.string().describe('Address line 7').optional(),
address_line8: zod_1.z.string().describe('Address line 8').optional(),
address_line9: zod_1.z.string().describe('Address line 9').optional(),
local_address_line1: zod_1.z.string().describe('Address line 1 (non-Latin native characters)').optional(),
local_address_line2: zod_1.z.string().describe('Address line 2 (non-Latin native characters)').optional(),
local_address_line3: zod_1.z.string().describe('Address line 3 (non-Latin native characters)').optional(),
local_address_line4: zod_1.z.string().describe('Address line 4 (non-Latin native characters)').optional(),
local_address_line5: zod_1.z.string().describe('Address line 5 (non-Latin native characters)').optional(),
local_address_line6: zod_1.z.string().describe('Address line 6 (non-Latin native characters)').optional(),
local_address_line7: zod_1.z.string().describe('Address line 7 (non-Latin native characters)').optional(),
local_address_line8: zod_1.z.string().describe('Address line 8 (non-Latin native characters)').optional(),
local_address_line9: zod_1.z.string().describe('Address line 9 (non-Latin native characters)').optional(),
postal_code: zod_1.z.string().describe('Postal Code').optional(),
})
.describe('Office address details. Public field, required if the request is for a company')
.optional(),
}),
params: zod_1.z.object({
client_token: zod_1.z
.string()
.describe('Determine whether it is the same request according to whether the client_token are consistent')
.optional(),
}),
},
};
exports.corehrV1CompanyDelete = {
project: 'corehr',
name: 'corehr.v1.company.delete',
sdkName: 'corehr.v1.company.delete',
path: '/open-apis/corehr/v1/companies/:company_id',
httpMethod: 'DELETE',
description: '[Feishu/Lark]-Feishu People(Enterprise Edition)-Organization management-Company-Delete company-Delete company',
accessTokens: ['tenant'],
schema: {
path: zod_1.z.object({
company_id: zod_1.z
.string()
.describe('The company ID that needs to be deleted. How to get the ID:- Call [[Create Company]](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/company/create) [[Batch Query Company]](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/company/list) and other interfaces to return the department ID'),
}),
},
};
exports.corehrV1CompanyGet = {
project: 'corehr',
name: 'corehr.v1.company.get',
sdkName: 'corehr.v1.company.get',
path: '/open-apis/corehr/v1/companies/:company_id',
httpMethod: 'GET',
description: '[Feishu/Lark]-Feishu People(Enterprise Edition)-Organization management-Company-Query a single company-Query individual companies by ID',
accessTokens: ['tenant'],
schema: {
path: zod_1.z.object({
company_id: zod_1.z
.string()
.describe('The company ID to be queried. How to get the ID:- Call [[Create Company]](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/company/create) [[Batch Query Company]](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/company/list) and other interfaces to return the department ID'),
}),
},
};
exports.corehrV1CompanyList = {
project: 'corehr',
name: 'corehr.v1.company.list',
sdkName: 'corehr.v1.company.list',
path: '/open-apis/corehr/v1/companies',
httpMethod: 'GET',
description: '[Feishu/Lark]-Feishu People(Enterprise Edition)-Organization management-Company-Get company list-Page query company, you can page through the full amount of company data',
accessTokens: ['tenant'],
schema: {
params: zod_1.z.object({
page_token: zod_1.z
.string()
.describe('Page identifier. It is not filled in the first request, indicating traversal from the beginning; when there will be more groups, the new page_token will be returned at the same time, and the next traversal can use the page_token to get more groups')
.optional(),
page_size: zod_1.z.string().describe('Page size'),
}),
},
};
exports.corehrV1CompanyPatch = {
project: 'corehr',
name: 'corehr.v1.company.patch',
sdkName: 'corehr.v1.company.patch',
path: '/open-apis/corehr/v1/companies/:company_id',
httpMethod: 'PATCH',
description: '[Feishu/Lark]-Feishu People(Enterprise Edition)-Organization management-Company-Update company-Update company information, including basic information, registered address, office address, etc',
accessTokens: ['tenant', 'user'],
schema: {
data: zod_1.z.object({
hiberarchy_common: zod_1.z
.object({
parent_id: zod_1.z.string().describe('parent organization').optional(),
name: zod_1.z
.array(zod_1.z.object({
lang: zod_1.z
.string()
.describe('language.This supports Chinese and English. For Chinese, use zh-CN; for English, use en-US'),
value: zod_1.z.string().describe('content.This supports Chinese and English'),
}))
.describe('name- There will be a globally unique check for the Chinese and English names of the Job level- Name cannot contain 「/」「;」「;」 characters')
.optional(),
active: zod_1.z.boolean().describe('Whether to enable').optional(),
effective_time: zod_1.z
.string()
.describe('Version effective date- Fill in the format: YYYY-MM-DD 00:00:00 (the system will automatically change the hours, minutes and seconds to 00:00:00)- The system defaults to take effect at 00:00:00 on the day when the date is filled in- This interface only supports the smallest unit of day- Date range requirements: 1900-01-01 00:00:00~9999-12-31 23:59:59'),
code: zod_1.z
.string()
.describe('Company Code (cannot be repeated with the encoding of other records), this field will be invalid when automatic encoding is turned on')
.optional(),
description: zod_1.z
.array(zod_1.z.object({
lang: zod_1.z
.string()
.describe('language.This supports Chinese and English. For Chinese, use zh-CN; for English, use en-US'),
value: zod_1.z.string().describe('content.This supports Chinese and English'),
}))
.describe('describe')
.optional(),
})
.describe('Hierarchical relationship, see entity for inner fields')
.optional(),
type: zod_1.z
.object({ enum_name: zod_1.z.string().describe('enumeration value') })
.describe('Company properties, enumeration values are available in the document [[Feishu personnel enumeration constants]](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/corehr-v1/feishu-people-enum-constant) Company type (company_type) enumeration definition section')
.optional(),
industry_list: zod_1.z
.array(zod_1.z.object({ enum_name: zod_1.z.string().describe('enumeration value') }))
.describe('The industry is located, and it is obtained through the Get Field Details query. Request parameters: object_api_name = company; custom_api_name = industry')
.optional(),
legal_representative: zod_1.z
.array(zod_1.z.object({
lang: zod_1.z
.string()
.describe('language.This supports Chinese and English. For Chinese, use zh-CN; for English, use en-US'),
value: zod_1.z.string().describe('content.This supports Chinese and English'),
}))
.describe('legal representative.Only when the country/region in the registered address is Chinese mainland, the legal representative field is valid.If the country/region in the registered address is not Chinese mainland, then filling in the legal representative field is invalid')
.optional(),
post_code: zod_1.z.string().describe('zip code').optional(),
tax_payer_id: zod_1.z.string().describe('Taxpayer identification number').optional(),
confidential: zod_1.z.boolean().describe('Confidential').optional(),
sub_type_list: zod_1.z
.array(zod_1.z.object({ enum_name: zod_1.z.string().describe('enumeration value') }))
.describe('Company principal type, obtained by Get Field Details query. Request parameters: object_api_name = company; custom_api_name = subtype')
.optional(),
branch_company: zod_1.z.boolean().describe('Is it a branch office?').optional(),
primary_manager: zod_1.z
.array(zod_1.z.object({
lang: zod_1.z
.string()
.describe('language.This supports Chinese and English. For Chinese, use zh-CN; for English, use en-US'),
value: zod_1.z.string().describe('content.This supports Chinese and English'),
}))
.describe('main person in charge')
.optional(),
currency: zod_1.z
.object({
currency_name: zod_1.z
.array(zod_1.z.object({
lang: zod_1.z
.string()
.describe('language.This supports Chinese and English. For Chinese, use zh-CN; for English, use en-US'),
value: zod_1.z.string().describe('content.This supports Chinese and English'),
}))
.describe('currency name')
.optional(),
numeric_code: zod_1.z
.number()
.describe('The reference code of the corresponding currency can be found through the internal system.obtained through the')
.optional(),
currency_alpha_3_code: zod_1.z
.string()
.describe('Legal tender corresponding codes, such as CNY, USD, etc.obtained through the ')
.optional(),
})
.describe('Default currency')
.optional(),
phone: zod_1.z
.object({
area_code: zod_1.z
.object({
enum_name: zod_1.z
.string()
.describe('enumeration value.Query and obtain. Request parameters: object_api_name = phone; custom_api_name = international_area_code'),
})
.describe('area code'),
phone_number: zod_1.z.string().describe('number'),
})
.describe('Telephone')
.optional(),
fax: zod_1.z
.object({
area_code: zod_1.z
.object({
enum_name: zod_1.z
.string()
.describe('enumeration value.Query and obtain. Request parameters: object_api_name = phone; custom_api_name = international_area_code'),
})
.describe('area code'),
phone_number: zod_1.z.string().describe('number'),
})
.describe('fax')
.optional(),
registered_office_address_info: zod_1.z
.object({
country_region_id: zod_1.z
.string()
.describe('Country/Region ID. The fields for each country/region can be queried by referring to。.Query and obtain'),
region_id: zod_1.z
.string()
.describe('main administrative region ID.Query and obtain')
.optional(),
city_id: zod_1.z
.string()
.describe('City ID, Query and obtain')
.optional(),
distinct_id: zod_1.z
.string()
.describe('District/County ID, Query and obtain.this field is pending')
.optional(),
address_line1: zod_1.z.string().describe('Address line 1').optional(),
address_line2: zod_1.z.string().describe('Address line 2').optional(),
address_line3: zod_1.z.string().describe('Address line 3').optional(),
address_line4: zod_1.z.string().describe('Address line 4').optional(),
address_line5: zod_1.z.string().describe('Address line 5').optional(),
address_line6: zod_1.z.string().describe('Address line 6').optional(),
address_line7: zod_1.z.string().describe('Address line 7').optional(),
address_line8: zod_1.z.string().describe('Address line 8').optional(),
address_line9: zod_1.z.string().describe('Address line 9').optional(),
local_address_line1: zod_1.z.string().describe('Address line 1 (non-Latin native characters)').optional(),
local_address_line2: zod_1.z.string().describe('Address line 2 (non-Latin native characters)').optional(),
local_address_line3: zod_1.z.string().describe('Address line 3 (non-Latin native characters)').optional(),
local_address_line4: zod_1.z.string().describe('Address line 4 (non-Latin native characters)').optional(),
local_address_line5: zod_1.z.string().describe('Address line 5 (non-Latin native characters)').optional(),
local_address_line6: zod_1.z.string().describe('Address line 6 (non-Latin native characters)').op