77 getAccountNumberByWorkOrderNumberAndObjectCode
88} from './helpers/getAccountNumber.js'
99import { getEmployeePayCodes } from './queries/employees/getEmployeePayCodes.js'
10+ import { getEmployeeTimeCodes } from './queries/employees/getEmployeeTimeCodes.js'
1011import { getTimeCodes } from './queries/employees/getTimeCodes.js'
1112import {
1213 type GetTimesheetBatchEntriesFilters ,
@@ -403,6 +404,25 @@ export class WorkTechAPI {
403404 return timeCodes
404405 }
405406
407+ /**
408+ * Retrieves time codes for a specific employee.
409+ * @param employeeNumber - The employee number.
410+ * @param timesheetMaxAgeDays - The maximum timesheet age.
411+ * @returns The time codes for the specified employee.
412+ */
413+ async getEmployeeTimeCodes (
414+ employeeNumber : string ,
415+ timesheetMaxAgeDays : number
416+ ) : Promise < TimeCode [ ] > {
417+ const timeCodes = await getEmployeeTimeCodes (
418+ this . #mssqlConfig,
419+ employeeNumber ,
420+ timesheetMaxAgeDays
421+ )
422+
423+ return timeCodes
424+ }
425+
406426 async getTimesheetBatchEntries (
407427 filters : GetTimesheetBatchEntriesFilters
408428 ) : Promise < TimesheetBatchEntry [ ] > {
@@ -413,6 +433,7 @@ export class WorkTechAPI {
413433export { getAccountNumberByWorkOrderNumberAndObjectCode } from './helpers/getAccountNumber.js'
414434
415435export { getEmployeePayCodes } from './queries/employees/getEmployeePayCodes.js'
436+ export { getEmployeeTimeCodes } from './queries/employees/getEmployeeTimeCodes.js'
416437export { getTimeCodes } from './queries/employees/getTimeCodes.js'
417438export {
418439 type GetTimesheetBatchEntriesFilters ,
0 commit comments