/** * Clockodo client class with typed API endpoint methods and DTOs. * * @module */ import { Api, type Config, type Params, type ParamsWithPage, type ParamsWithSort, type ResponseWithFilter, type ResponseWithoutPaging, type ResponseWithPaging } from "./lib/api.js"; import * as REQUIRED from "./lib/requiredParams.js"; import { type Absence } from "./models/absence.js"; import { type AddAccessGroupParams, type DeleteAccessGroupParams, type EditAccessEntityGeneralParams, type EditAccessEntityGeneralProjectOrServiceParams, type EditAccessEntityParams, type EditAccessEntityProjectOrServiceParams, type EditAccessGroupParams, type UsersAccessCustomersProjects, type UsersAccessServices } from "./models/accessControl.js"; import { type AccessGroup } from "./models/accessGroup.js"; import { type AggregatesUsersMe } from "./models/aggregatesUsersMe.js"; import { type Customer } from "./models/customer.js"; import { type CustomerCountProjects } from "./models/customerCountProjects.js"; import { type EntriesText } from "./models/entriesText.js"; import { Billability, type ClockingTimeEntryBillability, type Entry, type LumpsumServiceEntry, type LumpsumValueEntry, type TimeEntry } from "./models/entry.js"; import { type EntryGroup } from "./models/entryGroup.js"; import { type HolidaysCarryover } from "./models/holidaysCarryover.js"; import { type HolidaysQuota } from "./models/holidaysQuota.js"; import { type LumpsumService } from "./models/lumpsumService.js"; import { type NonbusinessDay } from "./models/nonbusinessDay.js"; import { type NonbusinessGroup } from "./models/nonbusinessGroup.js"; import { type OvertimecarryRow } from "./models/overtimecarry.js"; import { type OvertimeReduction } from "./models/overtimeReduction.js"; import { type Project } from "./models/project.js"; import { type Service } from "./models/service.js"; import { type Subproject } from "./models/subproject.js"; import { type Subscription } from "./models/subscription.js"; import { type SurchargeModel } from "./models/surchargeModel.js"; import { type TargethoursRow, type TargethoursRowInput } from "./models/targethours.js"; import { type Team } from "./models/team.js"; import { type User } from "./models/user.js"; import { UserReportType, type UserReport } from "./models/userReport.js"; import { type UsersNonbusinessDay, type UsersNonbusinessGroup } from "./models/usersNonbusinessGroup.js"; import { WorkTimeChangeRequestStatus, type WorkTimeChangeRequest, type WorkTimeDay } from "./models/workTimes.js"; export declare class Clockodo { api: Api; constructor(config: Config); private getAllPagesAndMergeArray; /** * @deprecated We will remove plugins because we're planing to move away from * axios to fetch() */ use(plugin: (clockodo: Clockodo) => void): void; getAbsence(params: Params<{ id: Absence["id"]; }>): Promise; getAbsences(params: Params): Promise; getUsersAccessCustomersProjects(params: Params<{ usersId: User["id"]; }>): Promise; getUsersAccessServices(params: Params<{ usersId: User["id"]; }>): Promise; getAccessGroups(params?: Params): Promise; getAccessGroup(params: Params<{ id: AccessGroup["id"]; }>): Promise; getAccessGroupsCustomersProjects(params: Params<{ accessGroupsId: AccessGroup["id"]; }>): Promise; getAccessGroupsServices(params: Params<{ accessGroupsId: AccessGroup["id"]; }>): Promise; getIndividualUserAccessCustomersProjects(params: Params<{ usersId: User["id"]; }>): Promise; getIndividualUserAccessServices(params: Params<{ usersId: User["id"]; }>): Promise; getClock(params?: Params): Promise; getCustomer(params: Params<{ id: Customer["id"]; }>): Promise; getCustomersPage(params?: Params): Promise; getCustomers(params?: Params): Promise>; getCustomersCountProjects(params?: Params): Promise; getProject(params: Params<{ id: Project["id"]; }>): Promise; getProjectsPage(params?: Params): Promise; getProjects(params?: Params): Promise>; getProjectsReportsPage(params?: Params): Promise; getProjectsReports(params?: Params): Promise>; getSubproject(params: Params<{ id: Subproject["id"]; }>): Promise; getSubprojectsPage(params?: Params): Promise; getSubprojects(params?: Params): Promise>; getEntry(params: Params<{ id: Entry["id"]; }>): Promise; splitAllEntriesAtMidnight(params: Params<{ day: string; usersId: number; }>): Promise>; getEntries(params: Params): Promise>; getEntriesPage(params: Params): Promise; getEntriesTexts(params: Params): Promise>; getEntriesTextsPage(params: Params): Promise; getEntryGroups(params: Params<{ timeSince: string; timeUntil: string; grouping: Array; }>): Promise; getService(params: Params<{ id: Service["id"]; }>): Promise; getServices(params?: Params): Promise>; getServicesPage(params?: Params): Promise; getTeam(params: Params<{ id: Team["id"]; }>): Promise; getTeamsPage(params?: Params): Promise; getTeams(params?: Params): Promise>; getLumpSumService(params: Params<{ id: LumpsumService["id"]; }>): Promise; getLumpSumServices(params?: Params): Promise>; getLumpSumServicesPage(params?: Params): Promise; getTargethoursRow(params: Params<{ id: TargethoursRow["id"]; }>): Promise; getTargethours(params?: Params<{ usersId?: User["id"] | Array; }>): Promise; addTargethour(params: Params): Promise; editTargethour(params: Params): Promise; deleteTargethour(params: Params): Promise; getUser(params: Params<{ id: User["id"]; }>): Promise; getUsersPage(params?: Params): Promise; getUsers(params?: Params): Promise>; getSurchargeModel(params: Params<{ id: SurchargeModel["id"]; }>): Promise; getSurchargeModels(params?: Params): Promise; getUserReport(params: Params<{ usersId: User["id"]; year: number; type?: GivenUserReportType; }>): Promise>; getUserReports(params: Params<{ year: number; type?: GivenUserReportType; }>): Promise>; getNonbusinessGroups(params?: Params): Promise; getNonbusinessGroup(params: Params<{ id: NonbusinessGroup["id"]; }>): Promise; getNonbusinessDays(params: Params): Promise; getNonbusinessDay(params: Params<{ id: NonbusinessDay["id"]; year?: number; }>): Promise; getUsersNonbusinessDaysPage(params?: Params): Promise; getUsersNonbusinessDays(params?: Params): Promise>; getUsersNonbusinessGroup(params: Params<{ id: UsersNonbusinessGroup["id"]; }>): Promise; getUsersNonbusinessGroupsPage(params?: Params): Promise; getUsersNonbusinessGroups(params?: Params): Promise>; getOvertimeReductions(params?: Params): Promise; getOvertimeReduction(params: Params<{ id: OvertimeReduction["id"]; }>): Promise; getSubscription(params?: Params): Promise; getMe(params?: Params): Promise; addAbsence(params: Params): Promise; addCustomer(params: Params): Promise; addAccessGroup(params: Params): Promise; addLumpsumService(params: Params): Promise; addEntry(params: Params | Pick | Pick>): Promise; addProject(params: Params): Promise; createNextProjectInterval(params: Params<{ id: Project["id"]; }>): Promise; addSubproject(params: Params): Promise; addService(params: Params): Promise; addTeam(params: Params): Promise; addUser(params: Params): Promise; addSurchargeModel(params: Params>): Promise; addNonbusinessGroup(params: Params): Promise; addNonbusinessDay(params: Params): Promise; addUsersNonbusinessGroup(params: Params): Promise; addOvertimecarry(params: Params): Promise; addOvertimeReduction(params: Params): Promise; addHolidaysQuota(params: Params): Promise; addHolidaysCarryover(params: Params): Promise; startClock(params: Params & { /** * Billability of the time entry that is about to be created. Omit it if * you want to use the project's default. */ billable?: ClockingTimeEntryBillability; }>): Promise; changeClockDuration(params: Params<{ entriesId: Entry["id"]; durationBefore: number; duration: number; }>): Promise; editAbsence(params: Params): Promise; editCustomer(params: Params): Promise; editAccessGroup(params: Params): Promise; editAccessGroupsCustomer(params: Params): Promise; editAccessGroupsCustomersGeneral(params: Params): Promise; editAccessGroupsProject(params: Params): Promise; editAccessGroupsService(params: Params): Promise; editAccessGroupsServicesGeneral(params: Params): Promise; editIndividualUserAccessCustomer(params: Params): Promise; editIndividualUserAccessCustomersGeneral(params: Params): Promise; editIndividualUserAccessProject(params: Params): Promise; editIndividualUserAccessService(params: Params): Promise; editIndividualUserAccessServicesGeneral(params: Params): Promise; editLumpsumService(params: Params): Promise; editEntry(params: Params>): Promise; editEntryGroup(params: Params<{ timeSince: string; timeUntil: string; }>): Promise; editProject(params: Params): Promise; completeProject(params: Params): Promise; setProjectBilled(params: Params): Promise; editSubproject(params: Params): Promise; completeSubproject(params: Params): Promise; editService(params: Params): Promise; editTeam(params: Params): Promise; editUser(params: Params): Promise; editSurchargeModel(params: Params>): Promise; editNonbusinessGroup(params: Params): Promise; editNonbusinessDay(params: Params): Promise; editOvertimecarry(params: Params): Promise; editOvertimeReduction(params: Params): Promise; editUsersNonbusinessGroup(params: Params): Promise; editHolidaysQuota(params: Params): Promise; editHolidaysCarryover(params: Params): Promise; deleteCustomer(params: Params): Promise; deleteAccessGroup(params: Params): Promise; deleteProject(params: Params): Promise; deleteSubproject(params: Params): Promise; deleteService(params: Params): Promise; deleteUser(params: Params>): Promise; deleteSurchargeModel(params: Params>): Promise; deleteAbsence(params: Params>): Promise; deleteEntry(params: Params>): Promise; deleteLumpsumService(params: Params): Promise; deleteEntryGroup(params: Params<{ timeSince: string; timeUntil: string; }>): Promise; deleteTeam(params: Params>): Promise; deleteNonbusinessGroup(params: Params): Promise; deleteNonbusinessDay(params: Params): Promise; deleteOvertimecarry(params: Params): Promise; deleteOvertimeReduction(params: Params): Promise; deleteUsersNonbusinessGroup(params: Params): Promise; deleteHolidaysQuota(params: Params): Promise; deleteHolidaysCarryover(params: Params): Promise; register(params: Params<{ companiesName: string; name: string; email: string; }>): Promise; clearIndividualUserAccess(params: Params<{ usersId: User["id"]; }>): Promise; stopClock(params: Params<{ entriesId: Entry["id"]; usersId?: number; }>): Promise; getWorkTimesPage(params?: Params): Promise; getWorkTimes(params: Params): Promise>; getWorkTimesChangeRequestsPage(params: Params): Promise; getWorkTimesChangeRequests(params: Params): Promise>; addWorkTimesChangeRequest(params: Params, (typeof REQUIRED.ADD_WORK_TIMES_CHANGE_REQUEST)[number]>>): Promise; withdrawWorkTimesChangeRequest(params: Params>): Promise; approveWorkTimesChangeRequest(params: Params>): Promise; declineWorkTimesChangeRequest(params: Params>): Promise; getOvertimecarry(params?: Params): Promise; getOvertimecarryRow(params: Params<{ id: NonNullable; }>): Promise; getHolidaysQuotas(params?: Params): Promise; getHolidaysQuota(params: Params<{ id: HolidaysQuota["id"]; }>): Promise; getHolidaysCarryovers(params?: Params): Promise; getHolidaysCarryover(params: Params<{ id: NonNullable; }>): Promise; } export type AbsenceReturnType = { data: Absence; }; export type AbsencesReturnType = { data: Array; }; export type AddAbsenceParams = { dateSince: Absence["dateSince"]; dateUntil?: Absence["dateUntil"] | null; type: NonNullable; halfDay?: boolean; countHours?: number | null; usersId?: User["id"]; allowOverride?: Array; status?: Absence["status"]; sickNote?: boolean; note?: string | null; publicNote?: string | null; }; export type EditAbsenceParams = { id: Absence["id"]; dateSince?: Absence["dateSince"]; dateUntil?: Absence["dateUntil"]; type?: NonNullable; halfDay?: boolean; countHours?: number | null; allowOverride?: Array; status?: Absence["status"]; sickNote?: boolean; note?: string | null; publicNote?: string | null; }; export type AbsenceScope = "manageableAbsences" | "viewableAbsences"; export type SortIdName = "id" | "-id" | "name" | "-name"; export type SortIdNameActive = "active" | "-active" | "id" | "-id" | "name" | "-name"; export type CustomerProjectScope = "manageAccess"; export type ServiceScope = "manageAccess"; export type UserScope = "manageAbsences" | "viewAbsences" | "manage"; export type UsersSortForIndex = "active" | "-active" | "id" | "-id" | "name" | "-name" | "number" | "-number" | "role" | "-role" | "teams_name" | "-teams_name"; export type AbsencesParams = { filter?: { year?: Array; usersId?: Array; teamsId?: Array; status?: Array; type?: Array>; usersActive?: boolean; }; scope?: AbsenceScope; }; export type UsersAccessCustomersProjectsReturnType = UsersAccessCustomersProjects; export type UsersAccessServicesReturnType = UsersAccessServices; export type AccessGroupsReturnType = { data: Array; }; export type AccessGroupReturnType = { data: AccessGroup; }; export type AggregatesUsersMeReturnType = { user: AggregatesUsersMe["user"]; company: AggregatesUsersMe["company"]; worktimeRegulation: AggregatesUsersMe["worktimeRegulation"]; }; export type DeleteReturnType = { success: boolean; }; export type CustomerReturnType = { data: Customer; }; export type AddCustomerParams = { name: Customer["name"]; number?: Customer["number"]; active?: Customer["active"]; billableDefault?: Customer["billableDefault"] | Billability; note?: Customer["note"]; color?: Customer["color"]; billServiceId?: Customer["billServiceId"]; }; export type EditCustomerParams = { id: Customer["id"]; name?: Customer["name"]; number?: Customer["number"]; active?: Customer["active"]; billableDefault?: Customer["billableDefault"] | Billability; note?: Customer["note"]; color?: Customer["color"]; billServiceId?: Customer["billServiceId"]; }; export type DeleteCustomerParams = { id: Customer["id"]; dryRun?: boolean; force?: boolean; }; export type CustomersParams = ParamsWithSort & { filter?: { /** Filter customers by active flag */ active?: boolean; /** Filter customers by search term */ fulltext?: string; }; scope?: CustomerProjectScope; }; export type CustomersReturnType = ResponseWithPaging & { data: Array; }; export type CustomersCountProjectsParams = { customersId?: Customer["id"] | Array; scope?: CustomerProjectScope; }; export type CustomersCountProjectsReturnType = ResponseWithPaging & { data: Array; }; export type ProjectsParams = ParamsWithSort & { filter?: { /** Filter projects by customers id */ customersId?: number; /** Filter projects by active flag */ active?: boolean; /** Filter projects by completed flag */ completed?: boolean; /** Filter projects by search term */ fulltext?: string; }; scope?: CustomerProjectScope; }; export type ProjectsReturnType = ResponseWithPaging & { data: Array; }; export type ProjectReturnType = { data: Project; }; export type ProjectDataReturnType = { data: Project; }; export type ProjectsReportsSortForIndex = "customers_name" | "-customers_name" | "projects_name" | "-projects_name" | "subprojects_name" | "-subprojects_name"; export type ProjectsReportProjectReportItem = { customersId: number; customersName: string; customersNumber: string | null; projectsId: number; projectsName: string; projectsNumber: string | null; }; export type ProjectsReportRetainerSubprojectReportItem = ProjectsReportProjectReportItem & { subprojectsId: number; subprojectsName: string; subprojectsNumber: string | null; }; export type ProjectsReportReportItem = ProjectsReportProjectReportItem | ProjectsReportRetainerSubprojectReportItem; export type ProjectsReportsParams = ParamsWithSort & { filter?: { active?: boolean; fulltext?: string; budgetSource?: Array<0 | 1 | 2 | 3>; }; }; export type ProjectsReportsReturnType = ResponseWithPaging & { data: Array; }; export type SubprojectsParams = ParamsWithSort & { filter?: { active?: boolean; completed?: boolean; fulltext?: string; projectsId?: number; }; }; export type SubprojectsReturnType = ResponseWithPaging & { data: Array; }; export type SubprojectReturnType = { data: Subproject; }; export type AddProjectParams = { name: Project["name"]; customersId: Project["customersId"]; active?: Project["active"]; number?: Project["number"]; billableDefault?: Project["billableDefault"]; note?: Project["note"]; deadline?: Project["deadline"]; startDate?: Project["startDate"]; budget?: Project["budget"]; billServiceId?: Project["billServiceId"]; }; export type AddSubprojectParams = { projectsId: Subproject["projectsId"]; name: Subproject["name"]; billableDefault?: Subproject["billableDefault"]; budget?: Subproject["budget"]; number?: Subproject["number"]; note?: Subproject["note"]; startDate?: Subproject["startDate"]; deadline?: Subproject["deadline"]; billServiceId?: Subproject["billServiceId"]; }; export type EditProjectParams = { id: Project["id"]; name?: Project["name"]; customersId?: Project["customersId"]; active?: Project["active"]; number?: Project["number"]; billableDefault?: Project["billableDefault"]; note?: Project["note"]; deadline?: Project["deadline"]; startDate?: Project["startDate"]; budget?: Project["budget"]; billServiceId?: Project["billServiceId"]; }; export type EditSubprojectParams = { id: Subproject["id"]; name?: Subproject["name"]; billableDefault?: Subproject["billableDefault"]; budget?: Subproject["budget"]; number?: Subproject["number"]; note?: Subproject["note"]; startDate?: Subproject["startDate"]; deadline?: Subproject["deadline"]; billServiceId?: Subproject["billServiceId"]; }; export type DeleteProjectParams = { id: Project["id"]; dryRun?: boolean; force?: boolean; }; export type CompleteProjectParams = { id: Project["id"]; completed: Project["completed"]; }; export type SetProjectBilledParams = { id: Project["id"]; billed?: boolean; billedMoney?: number | null; }; export type DeleteSubprojectParams = { id: Subproject["id"]; dryRun?: boolean; force?: boolean; }; export type CompleteSubprojectParams = { id: Subproject["id"]; completed: Subproject["completed"]; }; export type ServiceParams = ParamsWithSort & { filter?: { /** Filter service by search term */ fulltext?: string; /** Filter service by active flag */ active?: boolean; }; scope?: ServiceScope; }; export type ServiceReturnType = { data: Service; }; export type AddServiceParams = { name: Service["name"]; active?: Service["active"]; number?: Service["number"]; note?: Service["note"]; billServiceId?: Service["billServiceId"]; }; export type EditServiceParams = { id: Service["id"]; name?: Service["name"]; active?: Service["active"]; number?: Service["number"]; note?: Service["note"]; billServiceId?: Service["billServiceId"]; }; export type DeleteServiceParams = { id: Service["id"]; dryRun?: boolean; force?: boolean; }; export type ServicesReturnType = ResponseWithPaging & { data: Array; }; export type TeamReturnType = { data: Team; }; export type TeamsReturnType = ResponseWithPaging & { data: Array; }; export type AddTeamParams = { name: Team["name"]; leader?: Team["leader"]; }; export type EditTeamParams = { id: Team["id"]; name?: Team["name"]; leader?: Team["leader"]; }; export type TeamsParams = ParamsWithSort & { filter?: { /** Filter teams by search term */ fulltext?: string; }; scope?: UserScope; }; export type LumpsumServiceParams = ParamsWithSort & { filter?: { /** Filter lumpsum service by search term */ fulltext?: string; /** Filter lumpsum service by active flag */ active?: boolean; }; }; export type LumpsumServiceReturnType = { data: LumpsumService; }; export type AddLumpsumServiceParams = { name: LumpsumService["name"]; price: LumpsumService["price"]; unit?: LumpsumService["unit"]; active?: LumpsumService["active"]; number?: LumpsumService["number"]; note?: LumpsumService["note"]; }; export type EditLumpsumServiceParams = { id: LumpsumService["id"]; name?: LumpsumService["name"]; price?: LumpsumService["price"]; unit?: LumpsumService["unit"]; active?: LumpsumService["active"]; number?: LumpsumService["number"]; note?: LumpsumService["note"]; }; export type DeleteLumpsumServiceParams = { id: LumpsumService["id"]; dryRun?: boolean; force?: boolean; }; export type LumpsumServicesReturnType = ResponseWithPaging & { data: Array; }; export type UserReturnType = { data: User; }; export type UsersParams = { filter?: { active?: boolean; fulltext?: string; teamsId?: Array; scope?: "manageAbsences" | "viewAbsences" | "manage"; }; scope?: UserScope; } & ParamsWithSort; export type AddUserParams = Pick & Record; export type EditUserParams = Pick & Record; export type UsersReturnType = ResponseWithPaging & { data: Array; }; export type SurchargeModelReturnType = { data: SurchargeModel; }; export type SurchargeModelsReturnType = { data: Array; }; export type EntryReturnType = { entry: Entry; }; export type AddEntryReturnType = { entry: Entry; stopped?: Entry; }; export type EditEntryReturnType = { entry: Entry; running: null | TimeEntry; }; export type EntriesParams = { /** In format ISO 8601 UTC, e.g. "2021-06-30T12:34:56Z" */ timeSince: string; /** In format ISO 8601 UTC, e.g. "2021-06-30T12:34:56Z" */ timeUntil: string; filter?: { usersId?: number; customersId?: number; projectsId?: number; servicesId?: number; lumpsumServicesId?: number; /** * 0, 1 or 2 With filter.billable: 2 you only receive entries which are * billable AND already billed. */ billable?: Billability; text?: string; textsId?: number; budgetType?: string; }; }; export type EntriesReturnType = ResponseWithPaging & ResponseWithFilter<"billable" | "budgetType" | "customersId" | "lumpsumServicesId" | "projectsId" | "servicesId" | "text" | "textsId" | "usersId"> & { entries: Array; }; export type EntriesTextsParams = { /** Text to search for */ term: string; /** Number of items to return */ items?: number; mode?: EntriesTextsMode; filter?: { customersId?: number; projectsId?: Array; servicesId?: Array; usersId?: Array; billable?: Billability; /** In format YYYY-MM-DD */ timeSince?: string; /** In format YYYY-MM-DD */ timeUntil?: string; /** In format YYYY-MM-DD */ day?: string; }; }; /** Can be specified when requesting entries texts */ export declare enum EntriesTextsMode { /** Descriptions that exactly match the submitted text (default). */ ExactMatch = "exact_match", /** Descriptions that start with the submitted text fragment. */ StartsWith = "starts_with", /** Descriptions that end with the submitted text fragment. */ EndsWith = "ends_with", /** Descriptions that contain the submitted text fragment. */ Contains = "contains" } /** Can be specified when requesting entries texts */ export declare enum EntriesTextsSort { /** Alphabetically ascending (default). */ TextAsc = "text_asc", /** Alphabetically descending. */ TextDesc = "text_desc", /** Chronologically ascending. */ TimeAsc = "time_asc", /** Chronologically descending. */ TimeDesc = "time_desc" } export type EntriesTextsReturnType = { data: Array; }; export type EntryGroupsReturnType = { groups: Array; }; export type EditEntryGroupsReturnType = { confirmKey: string; affectedEntries: number; } | { success: true; editedEntries: number; }; export type DeleteEntryGroupsReturnType = { confirmKey: string; affectedEntries: number; } | { success: true; deletedEntries: number; }; export type UserReportReturnType = { userreport: UserReport; }; export type UserReportsReturnType = { userreports: Array>; }; export type NonbusinessGroupsReturnType = { data: Array; }; export type NonbusinessGroupReturnType = { data: NonbusinessGroup; }; export type AddNonbusinessGroupParams = { name: NonbusinessGroup["name"]; preset?: ""; }; export type EditNonbusinessGroupParams = { id: NonbusinessGroup["id"]; name?: NonbusinessGroup["name"]; }; export type DeleteNonbusinessGroupParams = { id: NonbusinessGroup["id"]; }; export type NonbusinessDaysReturnType = { data: Array; }; export type NonbusinessDayReturnType = { data: NonbusinessDay; }; export type AddNonbusinessDayParams = { nonbusinessGroupId: NonbusinessGroup["id"]; type: NonNullable; name: NonbusinessDay["name"]; halfDay?: NonbusinessDay["halfDay"]; surchargeSpecial?: NonbusinessDay["surchargeSpecial"]; specialId?: NonbusinessDay["specialId"]; day?: NonbusinessDay["day"]; month?: NonbusinessDay["month"]; year?: NonbusinessDay["year"]; }; export type EditNonbusinessDayParams = { id: NonbusinessDay["id"]; type?: NonNullable; name?: NonbusinessDay["name"]; halfDay?: NonbusinessDay["halfDay"]; surchargeSpecial?: NonbusinessDay["surchargeSpecial"]; specialId?: NonbusinessDay["specialId"] | null; day?: NonbusinessDay["day"] | null; month?: NonbusinessDay["month"] | null; year?: NonbusinessDay["year"] | null; }; export type DeleteNonbusinessDayParams = { id: NonbusinessDay["id"]; }; export type NonbusinessDaysParams = { nonbusinessGroupId?: NonbusinessGroup["id"] | Array; year: number; }; export type UsersNonbusinessDaysParams = { filter?: { usersId?: User["id"] | Array; }; year?: number; }; export type UsersNonbusinessDaysReturnType = ResponseWithPaging & { data: Array; }; export type UsersNonbusinessGroupsParams = { filter?: { usersId?: User["id"] | Array; nonbusinessGroupsId?: NonbusinessGroup["id"] | Array; }; }; export type UsersNonbusinessGroupsReturnType = ResponseWithPaging & { data: Array; }; export type UsersNonbusinessGroupReturnType = { data: UsersNonbusinessGroup; }; export type AddUsersNonbusinessGroupParams = Pick & { dateUntil?: UsersNonbusinessGroup["dateUntil"]; }; export type EditUsersNonbusinessGroupParams = { id: UsersNonbusinessGroup["id"]; } & Partial>; export type DeleteUsersNonbusinessGroupParams = { id: UsersNonbusinessGroup["id"]; }; export type SubscriptionReturnType = { data: Subscription; }; export type MeReturnType = { data: User; }; export type ClockReturnType = { /** The currently running entry */ running: null | TimeEntry; /** Timestamp of the server time. Can be used for clock synchronization */ currentTime: string; }; export type ClockStartReturnType = { /** The entry that has been started by this call */ running: TimeEntry; /** Returns the previously running entry that has been stopped by this call */ stopped: null | TimeEntry; /** * Whether the previously running entry has been truncated to the max length * of 23:59:59h */ stoppedHasBeenTruncated: boolean; /** Timestamp of the server time. Can be used for clock synchronization */ currentTime: string; }; export type ClockStopReturnType = { /** The entry that has been stopped by this call */ stopped: TimeEntry; /** Whether the stopped entry has been truncated to the max length of 23:59:59h */ stoppedHasBeenTruncated: boolean; /** * The entry that has been started implicitly by this call. Only relevant if * the away parameter has been provided. */ running: null | TimeEntry; /** Timestamp of the server time. Can be used for clock synchronization */ currentTime: string; }; export type ClockEditReturnType = { updated: TimeEntry; /** The currently running entry */ running: null | TimeEntry; /** Timestamp of the server time. Can be used for clock synchronization */ currentTime: string; }; export type RegisterReturnType = { success: true; user: User; apikey: string; }; export type SearchTextsReturnType = { texts: Array; }; export type TargethoursRowReturnType = { targethoursRow: TargethoursRow; }; export type TargethoursReturnType = { targethours: Array; }; /** Request-only: API uses holiday_fixed_credit (0|1); response has absence_fixed_credit (boolean). */ type TargethourRequestHolidayFixedCredit = { holidayFixedCredit?: 0 | 1; }; export type AddTargethourParams = Required> & Partial> & TargethourRequestHolidayFixedCredit; export type EditTargethourParams = Pick & Required> & Partial> & TargethourRequestHolidayFixedCredit; export type DeleteTargethourParams = { id: TargethoursRow["id"]; }; export type AddUserReturnType = { data: User; }; export type WorkTimesParams = { /** The user ID by which the work times should be filtered */ usersId?: number; dateSince: string; dateUntil: string; }; export type WorkTimesReturnType = ResponseWithPaging & { workTimeDays: Array; }; export type WorkTimesChangeRequestsParams = { /** The user ID by which the work time change requests should be filtered */ usersId?: number; dateSince?: string; dateUntil?: string; status?: WorkTimeChangeRequestStatus; }; export type WorkTimesChangeRequestsReturnType = ResponseWithPaging & { data: Array; }; export type ApproveOrDeclineWorkTimesChangeRequestReturnType = { success: boolean; }; export type AddWorkTimesChangeRequestReturnType = { changeRequest: WorkTimeChangeRequest; /** Is false if the change request is being returned */ approvedImmediately: false; /** * Will be set in case the given work time change request replaced a * previous one. This is because on a certain day there can only be one * change request per user. */ replacedChangeRequest: null | WorkTimeChangeRequest; } | { /** * Is null if the change request was immediately approved (because the * rights imply no need for approval) */ changeRequest: null; /** * Is true if the change request was immediately approved (because the * rights imply no need for approval) */ approvedImmediately: true; /** * Is null if the change request was immediately approved (because the * rights imply no need for approval) */ replacedChangeRequest: null; }; export type AddWorkTimesChangeRequestDataReturnType = { data: AddWorkTimesChangeRequestReturnType; }; export type OvertimecarryRowReturnType = { data: Array; }; export type OvertimecarryRowSingleReturnType = { data: OvertimecarryRow; }; export type AddOvertimecarryParams = { year: OvertimecarryRow["year"]; usersId: OvertimecarryRow["usersId"]; hours: OvertimecarryRow["hours"]; note?: OvertimecarryRow["note"]; }; export type EditOvertimecarryParams = { id: NonNullable; year?: OvertimecarryRow["year"]; hours?: OvertimecarryRow["hours"]; note?: OvertimecarryRow["note"]; }; export type DeleteOvertimecarryParams = { id: NonNullable; }; export type OvertimecarryRowParams = { /** The user ID by which the overtime carry rows should be filtered */ usersId?: number; /** The year to which the data should be restricted to */ year?: number; }; export type OvertimeReductionsReturnType = { data: Array; }; export type OvertimeReductionReturnType = { data: OvertimeReduction; }; export type OvertimeReductionsParams = { usersId?: User["id"] | Array; }; export type AddOvertimeReductionParams = Pick & { note?: OvertimeReduction["note"]; }; export type EditOvertimeReductionParams = { id: OvertimeReduction["id"]; } & Partial>; export type DeleteOvertimeReductionParams = { id: OvertimeReduction["id"]; }; export type HolidaysQuotasReturnType = { data: Array; }; export type HolidaysQuotaReturnType = { data: HolidaysQuota; }; export type AddHolidaysQuotaParams = { usersId: HolidaysQuota["usersId"]; yearSince: HolidaysQuota["yearSince"]; yearUntil?: HolidaysQuota["yearUntil"]; count: HolidaysQuota["count"]; note?: HolidaysQuota["note"]; }; export type EditHolidaysQuotaParams = { id: HolidaysQuota["id"]; yearSince?: HolidaysQuota["yearSince"]; yearUntil?: HolidaysQuota["yearUntil"]; count?: HolidaysQuota["count"]; note?: HolidaysQuota["note"]; }; export type DeleteHolidaysQuotaParams = { id: HolidaysQuota["id"]; }; export type HolidaysQuotasParams = { /** The user ID by which the holidays quota rows should be filtered */ usersId?: number; year?: number; }; export type HolidaysCarryoversReturnType = { data: Array; }; export type HolidaysCarryoverReturnType = { data: HolidaysCarryover; }; export type AddHolidaysCarryoverParams = { year: HolidaysCarryover["year"]; usersId: HolidaysCarryover["usersId"]; count: HolidaysCarryover["count"]; note?: HolidaysCarryover["note"]; }; export type EditHolidaysCarryoverParams = { id: NonNullable; year?: HolidaysCarryover["year"]; count?: HolidaysCarryover["count"]; note?: HolidaysCarryover["note"]; }; export type DeleteHolidaysCarryoverParams = { id: NonNullable; }; export type HolidaysCarryoversParams = { /** The user ID by which the holidays carry rows should be filtered */ usersId?: number; /** The year to which the data should be restricted to */ year?: number; }; export {}; //# sourceMappingURL=clockodo.d.ts.map