@larksuiteoapi/lark-mcp
Version:
Feishu/Lark OpenAPI MCP
711 lines • 130 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.attendanceV1Tools = exports.attendanceV1UserTaskQuery = exports.attendanceV1UserTaskRemedyQueryUserAllowedRemedys = exports.attendanceV1UserTaskRemedyQuery = exports.attendanceV1UserTaskRemedyCreate = exports.attendanceV1UserStatsViewUpdate = exports.attendanceV1UserStatsViewQuery = exports.attendanceV1UserStatsFieldQuery = exports.attendanceV1UserStatsDataQuery = exports.attendanceV1UserSettingQuery = exports.attendanceV1UserSettingModify = exports.attendanceV1UserFlowQuery = exports.attendanceV1UserFlowGet = exports.attendanceV1UserFlowBatchDel = exports.attendanceV1UserFlowBatchCreate = exports.attendanceV1UserDailyShiftQuery = exports.attendanceV1UserDailyShiftBatchCreateTemp = exports.attendanceV1UserDailyShiftBatchCreate = exports.attendanceV1UserApprovalQuery = exports.attendanceV1UserApprovalCreate = exports.attendanceV1ShiftQuery = exports.attendanceV1ShiftList = exports.attendanceV1ShiftGet = exports.attendanceV1ShiftDelete = exports.attendanceV1ShiftCreate = exports.attendanceV1LeaveEmployExpireRecordGet = exports.attendanceV1LeaveAccrualRecordPatch = exports.attendanceV1GroupSearch = exports.attendanceV1GroupListUser = exports.attendanceV1GroupList = exports.attendanceV1GroupGet = exports.attendanceV1GroupDelete = exports.attendanceV1GroupCreate = exports.attendanceV1ArchiveRuleUserStatsFieldsQuery = exports.attendanceV1ArchiveRuleUploadReport = exports.attendanceV1ArchiveRuleList = exports.attendanceV1ArchiveRuleDelReport = exports.attendanceV1ApprovalInfoProcess = void 0;
const zod_1 = require("zod");
exports.attendanceV1ApprovalInfoProcess = {
project: 'attendance',
name: 'attendance.v1.approvalInfo.process',
sdkName: 'attendance.v1.approvalInfo.process',
path: '/open-apis/attendance/v1/approval_infos/process',
httpMethod: 'POST',
description: '[Feishu/Lark]-Attendance-Attendance approval-Notify approval status update-For enterprises that only use Feishu Attendance but not Feishu Approval, through this interface, the approval status of the third-party system written in the Feishu Attendance can be updated such as leave, overtime, out of office, business trip, correction, etc. and the approval status including approve, reject, revoke, etc',
accessTokens: ['tenant'],
schema: {
data: zod_1.z.object({
approval_id: zod_1.z
.string()
.describe('Approval sample ID. How to access: 1) [Get Granted Approval Data] 2) [Write Approval Result] 3) [Notify of Correction Request Submission (in the case of correction)]'),
approval_type: zod_1.z
.string()
.describe("Approval type- 'leave': ask for leave- 'out': go out- 'Overtime': overtime- 'trip': business trip- 'remedy': replenish the card"),
status: zod_1.z
.number()
.describe('Approval status - `1`: rejected- `2`: approved- `4`: revoked**Notice**- **leave, out, overtime, and trip** only supports **revoked**- **remedy** supports **approved, rejected and revoked**'),
}),
},
};
exports.attendanceV1ArchiveRuleDelReport = {
project: 'attendance',
name: 'attendance.v1.archiveRule.delReport',
sdkName: 'attendance.v1.archiveRule.delReport',
path: '/open-apis/attendance/v1/archive_rule/del_report',
httpMethod: 'POST',
description: '[Feishu/Lark]-Attendance-archive_report-Delete archived report row data-Delete archived report row data directly by month, user, and archive rule ID',
accessTokens: ['tenant', 'user'],
schema: {
data: zod_1.z.object({
month: zod_1.z.string().describe('Month, format yyyyMM'),
operator_id: zod_1.z.string().describe('Operator ID, corresponding employee_type'),
archive_rule_id: zod_1.z
.string()
.describe('Archive rule id, which can be obtained according to [Query all archive rules]'),
user_ids: zod_1.z.array(zod_1.z.string()).describe('User ID, corresponding to employee_type').optional(),
}),
params: zod_1.z.object({
employee_type: zod_1.z
.string()
.describe("The user_ids in the request body and the employee ID type of the user_id in the response body. If you don't have background administrative privileges, you can use [Get user ID by mobile phone number or email]* employee_id: employee ID, which is the user ID in [Feishu admin background] > organizational structure > members and departments > member details* employee_no: employee job number, that is, job number in [Feishu management background] > organizational structure > members and departments > member details"),
}),
useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(),
},
};
exports.attendanceV1ArchiveRuleList = {
project: 'attendance',
name: 'attendance.v1.archiveRule.list',
sdkName: 'attendance.v1.archiveRule.list',
path: '/open-apis/attendance/v1/archive_rule',
httpMethod: 'GET',
description: '[Feishu/Lark]-Attendance-archive_report-Query all archived reports-Query all archiving rules, corresponding to the background fake attendance management - attendance statistics - reports - [archived reports] function',
accessTokens: ['tenant', 'user'],
schema: {
params: zod_1.z
.object({
page_size: zod_1.z.number().describe('Page size, required parameters').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(),
})
.optional(),
useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(),
},
};
exports.attendanceV1ArchiveRuleUploadReport = {
project: 'attendance',
name: 'attendance.v1.archiveRule.uploadReport',
sdkName: 'attendance.v1.archiveRule.uploadReport',
path: '/open-apis/attendance/v1/archive_rule/upload_report',
httpMethod: 'POST',
description: '[Feishu/Lark]-Attendance-archive_report-Write archived report results-Write the results of the archived report, corresponding to the fake attendance management - attendance statistics - report - [archived report tab], click the import function after the report name is entered. You can directly write the data to the archived report',
accessTokens: ['tenant', 'user'],
schema: {
data: zod_1.z.object({
month: zod_1.z.string().describe('Month in the format yyyyMM'),
operator_id: zod_1.z.string().describe('Operator ID, corresponding employee_type'),
archive_report_datas: zod_1.z
.array(zod_1.z.object({
member_id: zod_1.z.string().describe('User ID, corresponding employee_type'),
start_time: zod_1.z.string().describe('Attendance start time in the format yyyMMdd'),
end_time: zod_1.z.string().describe('Attendance end time in the format yyyMMdd'),
field_datas: zod_1.z
.array(zod_1.z.object({
code: zod_1.z
.string()
.describe('Field code, which can be obtained according to [Query Archive Report Header]'),
value: zod_1.z.string().describe('field result value').optional(),
}))
.describe('Field results (no more than 200)')
.optional(),
}))
.describe('Archive report content (no more than 50)')
.optional(),
archive_rule_id: zod_1.z
.string()
.describe('Archive rule id, which can be obtained according to [Query all archive rules]'),
}),
params: zod_1.z.object({
employee_type: zod_1.z
.string()
.describe("The user_ids in the request body and the employee ID type of the user_id in the response body. If you don't have background administrative privileges, you can use [Get user ID by mobile phone number or email]* `employee_id`: employee ID, which is the user ID in [Feishu admin background] > organizational structure > members and departments > member details* `employee_no`: employee job number, that is, job number in [Feishu management background] > organizational structure > members and departments > member details"),
}),
useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(),
},
};
exports.attendanceV1ArchiveRuleUserStatsFieldsQuery = {
project: 'attendance',
name: 'attendance.v1.archiveRule.userStatsFieldsQuery',
sdkName: 'attendance.v1.archiveRule.userStatsFieldsQuery',
path: '/open-apis/attendance/v1/archive_rule/user_stats_fields_query',
httpMethod: 'POST',
description: '[Feishu/Lark]-Attendance-archive_report-Query archived report header-Query the header of the archived report, corresponding to the background fake attendance management - attendance statistics - report - [archived report]. The archived report supports the reference system report, which can set the archived time and data archiving period, and supports the selection of personnel according to the department/personnel, country/region, personnel type, work location, rank, sequence, and position',
accessTokens: ['tenant', 'user'],
schema: {
data: zod_1.z.object({
locale: zod_1.z
.string()
.describe('Language type. Default is zh.Optional values are:* `en`: English* `ja`: Japanese* `zh`: Chinese')
.optional(),
month: zod_1.z.string().describe('Month, date format is yyyyMM'),
archive_rule_id: zod_1.z
.string()
.describe('Archive rule id, which can be obtained according to [Query all archive rules]'),
operator_id: zod_1.z.string().describe('Operator id, corresponding to employee_type'),
}),
params: zod_1.z.object({
employee_type: zod_1.z
.string()
.describe("The user_ids in the request body and the employee ID type of the user_id in the response body. If you don't have background administrative privileges, you can use [Get user ID by mobile phone number or email]* `employee_id`: employee ID, which is the user ID in [Feishu admin background] > organizational structure > members and departments > member details* `employee_no`: employee job number, that is, job number in [Feishu management background] > organizational structure > members and departments > member details"),
}),
useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(),
},
};
exports.attendanceV1GroupCreate = {
project: 'attendance',
name: 'attendance.v1.group.create',
sdkName: 'attendance.v1.group.create',
path: '/open-apis/attendance/v1/groups',
httpMethod: 'POST',
description: '[Feishu/Lark]-Attendance-Attendance group-Create or modify attendance groups-The attendance team is a rule setting for the attendance of departments or employees in a specific place and within a specific time period (including commuting, arriving late, leaving early, sick leave, marriage leave, bereavement leave, public holidays, working hours, overtime, etc.).By setting the attendance group, you can set attendance methods, attendance time, attendance location and other attendance rules from the two dimensions of departments and employees.The corresponding function is the same as the settings - fake attendance settings - "new" function of [attendance group]',
accessTokens: ['tenant'],
schema: {
data: zod_1.z.object({
group: zod_1.z
.object({
group_id: zod_1.z
.string()
.describe('Attendance group ID (only provided when modifying), you need to query the attendance group by name from [query attendance groups by name] or [query all attendance groups] Get groupId in the interface. If not, a new attendance group will be created')
.optional(),
group_name: zod_1.z.string().describe('attendance team name'),
time_zone: zod_1.z.string().describe('Time Zone'),
bind_dept_ids: zod_1.z
.array(zod_1.z.string())
.describe('The bound department ID (when used with need_punch_members, the current field shall prevail). Corresponds to dept_type')
.optional(),
except_dept_ids: zod_1.z.array(zod_1.z.string()).describe('Excluded department ID (this field is offline)').optional(),
bind_user_ids: zod_1.z
.array(zod_1.z.string())
.describe('The bound user ID (when used with "need_punch_members", the current field shall prevail), corresponding to employee_type')
.optional(),
except_user_ids: zod_1.z.array(zod_1.z.string()).describe('Excluded user ID (this field is offline)').optional(),
group_leader_ids: zod_1.z
.array(zod_1.z.string())
.describe('ID list of the main person in charge of attendance, required field (at least the administrator authority of the attendance group is required), corresponding to employee_type'),
sub_group_leader_ids: zod_1.z
.array(zod_1.z.string())
.describe('Attendance sub-responsible person ID list, corresponding to employee_type')
.optional(),
allow_out_punch: zod_1.z
.boolean()
.describe('Whether to allow the clock in the field, the default is empty')
.optional(),
out_punch_need_approval: zod_1.z
.boolean()
.describe('The clock in the field needs to be approved (you need to allow the clock in the field to be set to take effect), the default is empty')
.optional(),
out_punch_need_post_approval: zod_1.z
.boolean()
.describe('The clock in the field needs to be approved, and the clock in is approved first (you need to allow the clock in the field to be set to take effect)')
.optional(),
out_punch_need_remark: zod_1.z
.boolean()
.describe('The field clock in needs to fill in the remarks (you need to allow the field clock in order to set it to take effect), the default is empty')
.optional(),
out_punch_need_photo: zod_1.z
.boolean()
.describe('The clock in the field needs to be photographed (you need to allow the clock in the field to be set to take effect), the default is empty')
.optional(),
out_punch_allowed_hide_addr: zod_1.z
.boolean()
.describe('Field clock in allows employees to hide detailed addresses (you need to allow field clock in to set it to take effect), the default is empty')
.optional(),
out_punch_allowed_adjust_addr: zod_1.z
.boolean()
.describe('The field clock in allows fine-tuning of the address (you need to allow the field clock in order to set it to take effect)')
.optional(),
adjust_range: zod_1.z.number().describe('Fine-tuning range, default is 50 meters').optional(),
allow_pc_punch: zod_1.z.boolean().describe('Whether to allow the clock in the PC, the default is empty').optional(),
allow_remedy: zod_1.z.boolean().describe('Whether to limit replenishment cards, the default is empty').optional(),
remedy_limit: zod_1.z
.boolean()
.describe('Whether to limit the number of replenishment cards, the default is empty')
.optional(),
remedy_limit_count: zod_1.z.number().describe('Number of replenishment cards, the default is empty').optional(),
remedy_date_limit: zod_1.z
.boolean()
.describe('Whether to limit the correction time, the default is empty')
.optional(),
remedy_date_num: zod_1.z
.number()
.describe('Correction time, replenish the card within a few days, the default is empty')
.optional(),
allow_remedy_type_lack: zod_1.z
.boolean()
.describe('Allow missing card replenishment (you need to allow replenishment card to take effect), the default is empty')
.optional(),
allow_remedy_type_late: zod_1.z
.boolean()
.describe('Allow late replenishment (you need to allow replenishment to take effect), the default is empty')
.optional(),
allow_remedy_type_early: zod_1.z
.boolean()
.describe('Allow early refund and replenishment (you need to allow replenishment to take effect), the default is empty')
.optional(),
allow_remedy_type_normal: zod_1.z
.boolean()
.describe('Allow normal replenishment (you need to allow replenishment to take effect), the default is empty')
.optional(),
show_cumulative_time: zod_1.z
.boolean()
.describe('Whether to display the accumulated time, the default is empty')
.optional(),
show_over_time: zod_1.z.boolean().describe('Whether to show the overtime hours, the default is empty').optional(),
hide_staff_punch_time: zod_1.z
.boolean()
.describe('Whether to hide employee clock in detail, default to empty')
.optional(),
hide_clock_in_rule: zod_1.z.boolean().describe('Hide the clock in action').optional(),
face_punch: zod_1.z
.boolean()
.describe('Whether to turn on the facial recognition clock in, the default is empty')
.optional(),
face_punch_cfg: zod_1.z
.number()
.describe('Facial recognition clock in rule, default to empty** Optional values are: *** 1: Need facial recognition in every clock* 2: Need facial recognition when clock in suspected cheating')
.optional(),
face_live_need_action: zod_1.z
.boolean()
.describe('Face clock in rule, default is empty** Optional values are: *** false: indicates live verification is enabled* true: indicates action validation, only valid when face_punch_cfg = 1')
.optional(),
face_downgrade: zod_1.z
.boolean()
.describe('Whether to allow ordinary camera clock in facial recognition failure, the default is empty')
.optional(),
replace_basic_pic: zod_1.z
.boolean()
.describe('Whether to allow replacement of the base picture when facial recognition fails, the default is empty')
.optional(),
anti_cheat_punch_config: zod_1.z
.object({
intercept_suspected_cheat_punch: zod_1.z
.boolean()
.describe('Whether to intercept the suspected cheating clock in, turn it off/not update by default when not passing in; when it is closed, the rest of the anti-cheating switches will be turned off'),
check_cheat_software_punch: zod_1.z
.boolean()
.describe('Whether to check the clock in the suspected cheating software, and close/not update by default when not passing in')
.optional(),
check_buddy_punch: zod_1.z
.boolean()
.describe('Whether to check whether it is suspected that someone else clocked in on behalf of others, it will be closed/not updated by default when not passing in')
.optional(),
check_simulate_wifi_punch: zod_1.z
.boolean()
.describe('Whether to check the suspected simulated WI-FI clock in, turn off/not update by default when not passing in (only valid for grey release tenants, please contact technical support if you need to use it.)')
.optional(),
check_change_device_punch: zod_1.z
.boolean()
.describe('Whether to check the replacement device clock in, turn off/not update by default when not passing in')
.optional(),
allow_change_device_num: zod_1.z
.number()
.describe('The same member of the attendance team can bind up to the upper limit of the number of clocks in the device, and it is required to fill in the replacement device clock in the verification')
.optional(),
suspected_cheat_handle_method: zod_1.z
.number()
.describe('The processing method when the clock in suspected cheating is turned on. Required when the clock in suspected cheating is turned on Options:1(use_face_punch The clock in facial recognition),2(only_record_cheat_info Only record suspected cheating information)')
.optional(),
})
.describe('Anti-cheat clock in configuration, off/not updated by default when not passing in (only valid for grey release tenants, please contact technical support if you need to use it.)')
.optional(),
machines: zod_1.z
.array(zod_1.z.object({
machine_sn: zod_1.z.string().describe('Attendance machine serial number'),
machine_name: zod_1.z.string().describe('attendance machine name'),
}))
.describe('attendance machine list')
.optional(),
gps_range: zod_1.z.number().describe('Valid range in GPS clock (history invalid field)').optional(),
locations: zod_1.z
.array(zod_1.z.object({
location_name: zod_1.z.string().describe('Address name'),
location_type: zod_1.z.number().describe('address type** Optional values are: *** 1: GPS* 2: Wi-Fi* 8: IP'),
latitude: zod_1.z.number().describe('address latitude').optional(),
longitude: zod_1.z.number().describe('Address longitude').optional(),
ssid: zod_1.z.string().describe('Wi-Fi name').optional(),
bssid: zod_1.z.string().describe('Wi-Fi MAC address').optional(),
map_type: zod_1.z.number().describe('Map Type, 1: Autonavi, 2: Google').optional(),
address: zod_1.z.string().describe('Address name').optional(),
ip: zod_1.z.string().describe('IP address').optional(),
feature: zod_1.z.string().describe('Additional information, such as carrier information').optional(),
gps_range: zod_1.z.number().describe('Valid range in GPS clock (history invalid field)').optional(),
}))
.describe('Address list (appended only, does not overwrite the previous list)')
.optional(),
group_type: zod_1.z
.number()
.describe('Attendance types** Optional values are: *** 1: Fixed shift* 2: scheduled shifts* 3: Free shift'),
punch_day_shift_ids: zod_1.z
.array(zod_1.z.string())
.describe('The fixed shift schedule must be filled in, and 7 must be filled in (from Monday to Sunday). Shift IDs can be obtained by [Query all shifts] and [Query shifts by name]'),
free_punch_cfg: zod_1.z
.object({
free_start_time: zod_1.z
.string()
.describe('The start time of the clock in the free shift system is x: 00 x: 00. Note that if the hour is less than 10:00, there is no need to add zeros'),
free_end_time: zod_1.z
.string()
.describe('The end time of the clock in the free shift system is x: 00 x: 00. Note that if the hour is less than 10:00, there is no need to make up zero'),
punch_day: zod_1.z
.number()
.describe('The time in the clock is 7 digits, each digit represents Monday to Sunday, 0 is not working, 1 is working'),
work_day_no_punch_as_lack: zod_1.z
.boolean()
.describe('Whether the card is not punched on working days is recorded as a missing card, the default is empty')
.optional(),
work_hours_demand: zod_1.z
.boolean()
.describe('Whether the attendance on working days needs to meet the time requirements, the default is empty')
.optional(),
work_hours: zod_1.z.number().describe('Daily working hours (minutes), range [0,1440]').optional(),
})
.describe('Configuration free shift')
.optional(),
calendar_id: zod_1.z
.number()
.describe('National Calendar ID** Optional values are: *** 0: No holidays according to the national calendar* 1: Chinese mainland* 2: United States* 3: Japan* 4: India* 5: Singapore'),
need_punch_special_days: zod_1.z
.array(zod_1.z.object({
punch_day: zod_1.z.number().describe('Clock in the format yyyMMdd'),
shift_id: zod_1.z
.string()
.describe('Shift ID, you can check all shifts according to [query]And [query shift by name] get'),
}))
.describe('Special dates must be clocked in')
.optional(),
no_need_punch_special_days: zod_1.z
.array(zod_1.z.object({
punch_day: zod_1.z.number().describe('Clock in the format yyyMMdd'),
shift_id: zod_1.z
.string()
.describe('Shift ID, you can check all shifts according to [query]And [query shift by name] get'),
}))
.describe('No special dates in the clock')
.optional(),
work_day_no_punch_as_lack: zod_1.z
.boolean()
.describe('Whether the card is not punched on working days under the free shift system is recorded as a missing card, the default is empty')
.optional(),
effect_now: zod_1.z.boolean().describe('Whether it takes effect immediately, the default is false').optional(),
remedy_period_type: zod_1.z.number().describe('Refill card cycle type* 1: Monthly* 2: Customize').optional(),
remedy_period_custom_date: zod_1.z
.number()
.describe('Supplement card custom cycle start date, range 0-28')
.optional(),
punch_type: zod_1.z
.number()
.describe('Clock in type.Bit arithmetic, that is, if you need to set two clocks in 1 and 2, you need to pass in the addition value 3.** Optional value **:* 1: GPS clock in* 2: Wi-Fi clock in* 4: The clock in the attendance machine* 8: IP clock in')
.optional(),
rest_clockIn_need_approval: zod_1.z
.boolean()
.describe('Rest day clock in requires approval. When setting rest_clockIn_need_approval = true, the start time of the rest day will be reset to 4:00. Default is empty')
.optional(),
clockIn_need_photo: zod_1.z.boolean().describe('Take a photo in each clock, the default is empty').optional(),
member_status_change: zod_1.z
.object({
onboarding_on_no_need_punch: zod_1.z
.boolean()
.describe('Whether there is no need to clock in on the entry day, the default is empty')
.optional(),
onboarding_off_no_need_punch: zod_1.z
.boolean()
.describe('Whether there is no need to clock in after get off work on the entry day, the default is empty')
.optional(),
offboarding_on_no_need_punch: zod_1.z
.boolean()
.describe('Whether the departure day does not need to be clocked in, the default is empty')
.optional(),
offboarding_off_no_need_punch: zod_1.z
.boolean()
.describe('Whether the departure day does not need to be clocked in, the default is empty')
.optional(),
})
.describe('Personnel clock in setup')
.optional(),
leave_need_punch: zod_1.z
.boolean()
.describe('Whether you need to clock in for leave or return to work, the default is empty')
.optional(),
leave_need_punch_cfg: zod_1.z
.object({
late_minutes_as_late: zod_1.z
.number()
.describe('Arriving late for more than how long is recorded as late')
.optional(),
late_minutes_as_lack: zod_1.z
.number()
.describe('More than how long is late will be recorded as a missing card')
.optional(),
early_minutes_as_early: zod_1.z
.number()
.describe('If you leave early for longer than that, it will be recorded as leaving early')
.optional(),
early_minutes_as_lack: zod_1.z
.number()
.describe('If you leave early for more than a long time, it will be recorded as a missing card')
.optional(),
not_during_shift: zod_1.z
.boolean()
.describe('Leave in the middle of the shift, no need to clock in before leaving or after returning (only valid for grey release tenants, please contact technical support if you need to use it)')
.optional(),
})
.describe('Leave or return clock in minutes')
.optional(),
go_out_need_punch: zod_1.z
.number()
.describe('Whether you need to clock in during going out, the default is empty')
.optional(),
go_out_need_punch_cfg: zod_1.z
.object({
late_minutes_as_late: zod_1.z
.number()
.describe('Arriving late for more than how long is recorded as late')
.optional(),
late_minutes_as_lack: zod_1.z
.number()
.describe('More than how long is late will be recorded as a missing card')
.optional(),
early_minutes_as_early: zod_1.z
.number()
.describe('If you leave early for longer than that, it will be recorded as leaving early')
.optional(),
early_minutes_as_lack: zod_1.z
.number()
.describe('If you leave early for more than a long time, it will be recorded as a missing card')
.optional(),
not_during_shift: zod_1.z
.boolean()
.describe('Out in the middle of the shift, no need to clock in before leaving or after returning (only valid for grey release tenants, please contact technical support if you need to use it)')
.optional(),
})
.describe('Whether the clock is required during the business trip, the default is empty')
.optional(),
travel_need_punch: zod_1.z.number().describe('Rules of the clock in minutes during business trips').optional(),
travel_need_punch_cfg: zod_1.z
.object({
late_minutes_as_late: zod_1.z
.number()
.describe('Arriving late for more than how long is recorded as late')
.optional(),
late_minutes_as_lack: zod_1.z
.number()
.describe('More than how long is late will be recorded as a missing card')
.optional(),
early_minutes_as_early: zod_1.z
.number()
.describe('If you leave early for longer than that, it will be recorded as leaving early')
.optional(),
early_minutes_as_lack: zod_1.z
.number()
.describe('If you leave early for more than a long time, it will be recorded as a missing card, in minutes')
.optional(),
not_during_shift: zod_1.z
.boolean()
.describe('There is no need to clock in before leaving or after returning from business trips (business trips are not valid)')
.optional(),
})
.describe('Rules of the clock in minutes during business trips')
.optional(),
need_punch_members: zod_1.z
.array(zod_1.z.object({
rule_scope_type: zod_1.z.number().describe("Circle method:* '0': none* '1': all* '2': custom").optional(),
scope_group_list: zod_1.z
.object({
scope_value_type: zod_1.z
.number()
.describe('**Types**: * 1: Department* 2: Member * 3: Country or region* 4: Employee type* 5: Work base* 6: Job level* 7: Job family* 8: Position (CoreHR, Business Edition)* 9: Work schedule (CoreHR, Business Edition)* 100: Customized field (CoreHR, Business Edition)')
.optional(),
operation_type: zod_1.z
.number()
.describe('Range type (whether it is included or not)* 1: Included* 2: Not included* 3: equal* 4: less than or equal to* 5: greater than or equal to* 6: greater than* 7: less than* 8: Not equal')
.optional(),
right: zod_1.z
.array(zod_1.z.object({
key: zod_1.z.string().describe('Identification Key').optional(),
name: zod_1.z.string().describe('name').optional(),
}))
.describe('If it is a person/department type, this field is not required')
.optional(),
member_ids: zod_1.z
.array(zod_1.z.string())
.describe('List of department/person IDs (as determined by scope_value_type)')
.optional(),
custom_field_ID: zod_1.z
.string()
.describe('Enterprise version custom field unique key ID, which needs to be obtained from Feishu personnel')
.optional(),
custom_field_obj_type: zod_1.z
.string()
.describe('Enterprise Edition Custom Field Object Type* "Employment": master data object, employee employment information* "Person": master data object, individual')
.optional(),
})
.describe('List of circle rules')
.optional(),
}))
.describe('The set of people who need clock in (this field is only used if bind_dept_ids and bind_user_ids are not passed)')
.optional(),
no_need_punch_members: zod_1.z
.array(zod_1.z.object({
rule_scope_type: zod_1.z.number().describe("Circle method:* '0': none* '1': all* '2': custom").optional(),
scope_group_list: zod_1.z
.object({
scope_value_type: zod_1.z
.number()
.describe('**Types**: * 1: Department* 2: Member * 3: Country or region* 4: Employee type* 5: Work base* 6: Job level* 7: Job family* 8: Position (CoreHR, Business Edition)* 9: Work schedule (CoreHR, Business Edition)* 100: Customized field (CoreHR, Business Edition)')
.optional(),
operation_type: zod_1.z
.number()
.describe('Range type (whether it is included or not)* 1: Included* 2: Not included* 3: equal* 4: less than or equal to* 5: greater than or equal to* 6: greater than* 7: less than* 8: Not equal')
.optional(),
right: zod_1.z
.array(zod_1.z.object({
key: zod_1.z.string().describe('Identification Key').optional(),
name: zod_1.z.string().describe('name').optional(),
}))
.describe('If it is a person/department type, this field is not required')
.optional(),
member_ids: zod_1.z
.array(zod_1.z.string())
.describe('List of department/person IDs (as determined by scope_value_type)')
.optional(),
custom_field_ID: zod_1.z
.string()
.describe('Enterprise version custom field unique key ID, which needs to be obtained from Feishu personnel')
.optional(),
custom_field_obj_type: zod_1.z
.string()
.describe('Enterprise Edition Custom Field Object Type* "Employment": master data object, employee employment information* "Person": master data object, individual')
.optional(),
})
.describe('List of circle rules')
.optional(),
}))
.describe('A collection of people without clock in (this field is only used if bind_default_dept_ids and bind_default_user_ids are not passed)')
.optional(),
save_auto_changes: zod_1.z
.boolean()
.describe('Whether to allow the attendance group with conflicting personnel to be saved. If true, the conflicting personnel will be automatically pulled into the currently set attendance group and removed from the original attendance group; if false, the conflicting personnel need to be manually adjusted. Default is false')
.optional(),
org_change_auto_adjust: zod_1.z
.boolean()
.describe('When a new employee is hired or personnel change, whether the eligible personnel will automatically join the attendance group. Default is empty')
.optional(),
bind_default_dept_ids: zod_1.z
.array(zod_1.z.string())
.describe('Participate in the list of department IDs that do not require clock in (when used with "no_need_punch_members", the current field shall prevail), corresponding to dept_type')
.optional(),
bind_default_user_ids: zod_1.z
.array(zod_1.z.string())
.describe('Participate in the list of person IDs without clock in (when used with "no_need_punch_members", the current field shall prevail), corresponding to employee_type')
.optional(),
overtime_clock_cfg: zod_1.z
.object({
allow_punch_approval: zod_1.z
.boolean()
.describe('Whether to allow applications to clock in non-clocking hours (only valid for grey release tenants, please contact technical support if you need to use it.)')
.optional(),
need_clock_over_time_start_and_end: zod_1.z
.boolean()
.describe('Overtime starts and ends clocked in (only valid for grey release tenants, please contact technical support if you need to use it.)')
.optional(),
})
.describe('The clock in overtime')
.optional(),
new_calendar_id: zod_1.z
.string()
.describe('Holiday id, (if the attendance group uses a custom holiday, use this parameter to pass in the holiday id, you can get it from the Settings-Holiday Module page path)')
.optional(),
allow_apply_punch: zod_1.z
.boolean()
.describe('The positioning is not on time, is the application clock in allowed?')
.optional(),
clock_in_abnormal_settings: zod_1.z
.object({
ignore_until_latest_clockout: zod_1.z
.boolean()
.describe('Ignore exception cards before the latest clock in time (only valid for grey release tenants, please contact technical support if you need to use it.)')
.optional(),
})
.describe('Abnormal card exemption configuration')
.optional(),
})
.describe('Attendance Team Information'),
operator_id: zod_1.z
.string()
.describe('Operator uid, corresponding to employee_type, if you do not operate [backstage for attendance management "API access" process], this field is required field')
.optional(),
}),
params: zod_1.z.object({
employee_type: zod_1.z
.enum(['employee_id', 'employee_no'])
.describe("The employee ID type of the user_id in the response body. If you don't have background administrative privileges, you can use [Get user ID by mobile phone number or email] Options:employee_id(Employee ID, that is the user ID in [Feishu Admin] > Organization > Member and Department > Member Details),employee_no(Employee number, that is the employee ID in [Feishu Admin] > Organization > Member and Department > Member Details)"),
dept_type: zod_1.z
.literal('open_id')
.describe('Type of department ID Options:open_id(For the time being, only the openid of the department is supported. For specific concepts, please refer to the open_department_id in [Department Resource Introduction])'),
}),
},
};
exports.attendanceV1GroupDelete = {
project: 'attendance',
name: 'attendance.v1.group.delete',
sdkName: 'attendance.v1.group.delete',
path: '/open-apis/attendance/v1/groups/:group_id',
httpMethod: 'DELETE',
description: '[Feishu/Lark]-Attendance-Attendance group-Delete attendance group-Delete the attendance group through the attendance group ID. Corresponding Settings - False Attendance Settings - Delete Function of [Attendance Group] Operation Columns',
accessTokens: ['tenant'],
schema: {
path: zod_1.z.object({
group_id: zod_1.z
.string()
.describe('Attendance group ID is obtained as follows: 1) [Create or modify attendance groups] 2) [Query attendance group by name] 3) [Obtain attendance results]'),
}),
},
};
exports.attendanceV1GroupGet = {
project: 'attendance',
name: 'attendance.v1.group.get',
sdkName: 'attendance.v1.group.get',
path: '/open-apis/attendance/v1/groups/:group_id',
httpMethod: 'GET',
description: '[Feishu/Lark]-Attendance-Attendance group-Query attendance group by ID-Get the attendance group details through the attendance group ID. Including basic information, attendance shifts, attendance methods, and attendance setting information',
accessTokens: ['tenant'],
schema: {
params: zod_1.z.object({
employee_type: zod_1.z
.enum(['employee_id', 'employee_no'])
.describe("user_id and creator_id employee id types in the request body and response body. If you don't have background administrative privileges, you can use [Get user ID by mobile phone number or email] Options:employee_id(Employee ID, which is the user ID in [Feishu admin background] > organizational structure > members and departments > member details),employee_no(Employee job number, that is, the job number in [Feishu management background] > organizational structure > members and departments > member details)"),
dept_type: zod_1.z
.literal('open_id')
.describe('Department ID type Options:open_id(For the time being, only the openid of the department is supported. For specific concepts, please refer to the open_department_id in [Department Resource Introduction])'),
}),
path: zod_1.z.object({
group_id: zod_1.z
.string()
.describe('Attendance group ID is obtained as follows: 1) [Create or modify attendance groups] 2) [Query attendance group by name] 3) [Obtain attendance results]'),
}),
},
};
exports.attendanceV1GroupList = {
project: 'attendance',
name: 'attendance.v1.group.list',
sdkName: 'attendance.v1.group.list',
path: '/open-apis/attendance/v1/groups',
httpMethod: 'GET',
description: '[Feishu/Lark]-Attendance-Attendance group-Query all attendance groups-Turn the page to get a list of all attendance groups. Include attendance group name and attendance group id',
accessTokens: ['tenant'],
schema: {
params: zod_1.z
.object({
page_size: zod_1.z.number().describe('paging size').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(),
})
.optional(),
},
};
exports.attendanceV1GroupListUser = {
project: 'attendance',
name: 'attendance.v1.group.listUser',
sdkName: 'attendance.v1.group.listUser',
path: '/open-apis/attendance/v1/groups/:group_id/list_user',
httpMethod: 'GET',
description: '[Feishu/Lark]-Attendance-Attendance group-Query all members in the attendance group-Query all members in the specified attendance group',
accessTokens: ['tenant', 'user'],
schema: {
params: zod_1.z.object({
employee_type: zod_1.z
.string()
.describe('Response body user_id employee ID type. If you do not have backend management permissions, you can use [Get user ID by mobile phone number or email]<b>Optional values are</b>:1. employee_id: Employee ID, which is the user ID in [Feishu admin background] > organizational structure > members and departments > member detailsDetails2. employee_no: Employee job number, that is, the job number in [Feishu management background] > organizational structure > members and departments > member details'),
dept_type: zod_1.z
.string()
.describe('Response body department_ids type of department ID.<b>Optional values are