@larksuiteoapi/lark-mcp
Version:
Feishu/Lark OpenAPI MCP
752 lines (751 loc) • 120 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) 2) 3) '),
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 '),
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 * employee_id: employee ID, which is the user ID in > organizational structure > members and departments > member details* employee_no: employee job number, that is, job number in > 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 - 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(),
}),
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 - , 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 '),
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 '),
}),
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 * `employee_id`: employee ID, which is the user ID in > organizational structure > members and departments > member details* `employee_no`: employee job number, that is, job number in > 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 - . 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] (/ssl: ttdoc/uAjLw4CM/ukTMukTMukTM/reference/attachment-v1/archive_rule/list)'),
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 * `employee_id`: employee ID, which is the user ID in > organizational structure > members and departments > member details* `employee_no`: employee job number, that is, job number in > 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 ',
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 or 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_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(),
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(),
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(),
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 and '),
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 And 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 And 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(),
})
.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(),
})
.describe('The clock in minutes')
.optional(),
travel_need_punch: zod_1.z
.number()
.describe('Whether the clock is required during the business trip, the default is empty')
.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(),
})
.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(),
})
.describe('Attendance Team Information'),
operator_id: zod_1.z
.string()
.describe('Operator uid, corresponding to employee_type, if you do not operate , 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 Options:employee_id(Employee ID, that is the user ID in > Organization > Member and Department > Member Details),employee_no(Employee number, that is the employee ID in > 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 )'),
}),
},
};
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 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) 2) 3) '),
}),
},
};
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 Options:employee_id(Employee ID, which is the user ID in > organizational structure > members and departments > member details),employee_no(Employee job number, that is, the job number in > 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 )'),
}),
path: zod_1.z.object({
group_id: zod_1.z
.string()
.describe('Attendance group ID is obtained as follows: 1) 2) 3) '),
}),
},
};
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(),
}),
},
};
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 <b>Optional values are</b>:1. employee_id: Employee ID, which is the user ID in > organizational structure > members and departments > member detailsDetails2. employee_no: Employee job number, that is, the job number in > 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</b>:1. 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 '),
page_size: zod_1.z.number().describe('Page 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(),
member_clock_type: zod_1.z
.number()
.describe('Query clock-in type for attendance group members.<b>Optional values are</b>:<ul><li>0: All clock-in types</li><li>1: Required clock-in types</li><li>2: Not required clock-in types</li></ul>'),
}),
path: zod_1.z.object({
group_id: zod_1.z
.string()
.describe('Attendance group ID is obtained as follows: 1) 2) 3) '),
}),
useUAT: zod_1.z.boolean().describe('Use user access token, otherwise use tenant access token').optional(),
},
};
exports.attendanceV1GroupSearch = {
project: 'attendance',
name: 'attendance.v1.group.search',
sdkName: 'attendance.v1.group.search',
path: '/open-apis/attendance/v1/groups/search',
httpMethod: 'POST',
description: '[Feishu/Lark]-Attendance-Attendance group-Query attendance group by name-Query the summary information of the attendance group by the name of the attendance group. The query conditions support two methods: exact matching and fuzzy matching of the name. The query results are sorted by the modification time of the attendance group desc, and the maximum number of records is 10. Corresponding page settings - fake attendance settings - name search function',
accessTokens: ['tenant'],
schema: {
data: zod_1.z.object({ group_name: zod_1.z.string().describe('Attendance group name') }),
},
};
exports.attendanceV1LeaveAccrualRecordPatch = {
project: 'attendance',
name: 'attendance.v1.leaveAccrualRecord.patch',
sdkName: 'attendance.v1.leaveAccrualRecord.patch',
path: '/open-apis/attendance/v1/leave_accrual_record/:leave_id',
httpMethod: 'PATCH',
description: '[Feishu/Lark]-Attendance-Leave Grant Records-Modify Grant Record-Update the number and expiration date of issuance records, corresponding to leave management - leave management - ',
accessTokens: ['tenant'],
schema: {
data: zod_1.z.object({
leave_granting_record_id: zod_1.z
.string()
.describe('The unique ID of the issuance record, which can be created by '),
employment_id: zod_1.z.string().describe('Employee ID, type corresponding user_id_type'),
leave_type_id: zod_1.z
.string()
.describe('The holiday type ID can be obtained by '),
reason: zod_1.z
.array(zod_1.z.object({
lang: zod_1.z.string().describe('language code'),
value: zod_1.z.string().describe('Text corresponding to language code'),
}))
.describe('Modify the grant record Reason'),
time_offset: zod_1.z.number().describe('Time offset East Eighth District: 480 8 * 60').optional(),
expiration_date: zod_1.z.string().describe('Expiration date, format "2020-01-01"').optional(),
quantity: zod_1.z.string().describe('Modify the number of releases').optional(),
}),
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(),
}),
path: zod_1.z.object({
leave_id: zod_1.z
.string()
.describe('The holiday type ID can be obtained by ')
.optional(),
}),
},
};
exports.attendanceV1LeaveEmployExpireRecordGet = {
project: 'attendance',
name: 'attendance.v1.leaveEmployExpireRecord.get',
sdkName: 'attendance.v1.leaveEmployExpireRecord.get',
path: '/open-apis/attendance/v1/leave_employ_expire_records/:leave_id',
httpMethod: 'GET',
description: '[Feishu/Lark]-Attendance-Leave Get Expired Grant Record-Get grant record by expiration time-Only grant records that expired in the corresponding time period can be obtained',
accessTokens: ['tenant'],
schema: {
data: zod_1.z.object({
employment_id: zod_1.z.string().describe('Employee ID, consistent with user_id_type'),
leave_type_id: zod_1.z
.string()
.describe('The holiday type ID can be obtained by '),
start_expiration_date: zod_1.z.string().describe('The earliest expiration date in the format yyyy-MM-dd'),
end_expiration_date: zod_1.z.string().describe('The latest expiration date in the format yyyy-MM-dd'),
time_offset: zod_1.z
.number()
.describe('Time offset, East Eighth District: 480 8 * 60, if there is no such parameter, the default East Eighth District')
.optional(),
}),
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(),
}),
path: zod_1.z.object({
leave_id: zod_1.z
.string()
.describe('The holiday type ID can be obtained by ')
.optional(),
}),
},
};
exports.attendanceV1ShiftCreate = {
project: 'attendance',
name: 'attendance.v1.shift.create',
sdkName: 'attendance.v1.shift.create',
path: '/open-apis/attendance/v1/shifts',
httpMethod: 'POST',
description: '[Feishu/Lark]-Attendance-Attendance shift-Create Attendance Shift-Shift is a general term that describes the time rules of an attendance task, such as how many times a day to play the card, the commute time of each card, how long is late, how long is late, and how long is missing the card. Click on the shift name in the fake work settings - to view the shift details. If the shift id is passed into the imported parameter, then the ability to edit the shift is supported',
accessTokens: ['tenant'],
schema: {
data: zod_1.z.object({
shift_name: zod_1.z.string().describe('Shift name, non-repeatable'),
punch_times: zod_1.z
.number()
.describe('Number of clock in (history field, no longer useful, subject to punch_time_rule)'),
sub_shift_leader_ids: zod_1.z
.array(zod_1.z.string())
.describe('Shift leader, corresponding to employee_type type')
.optional(),
is_flexible: zod_1.z.boolean().describe('Whether flexible clock in, default to false, not on').optional(),
flexible_minutes: zod_1.z
.number()
.describe('Flexible clock in time, unit: minutes, set the time of [Up to late for work] and [Up to early for work]. This parameter takes effect only when the flexible_rule parameter is not set. If the flexible_rule parameter is set, this parameter does not take effect')
.optional(),
flexible_rule: zod_1.z
.array(zod_1.z.object({
flexible_early_minutes: zod_1.z