import { APIResource } from "../core/resource.mjs"; import * as BusinessPartnersAPI from "./business-partners.mjs"; import * as LeaveTypesAPI from "./leave-types.mjs"; import * as WorkersAPI from "./workers.mjs"; import { APIPromise } from "../core/api-promise.mjs"; import { PageCursorURL, PagePromise } from "../core/pagination.mjs"; import { RequestOptions } from "../internal/request-options.mjs"; /** * Leave balances for workers */ export declare class LeaveBalances extends APIResource { /** * A list of leave balances. * * - Requires: `API Tier 2` * - Filterable fields: `worker_id`, `leave_type_id` * - Expandable fields: `worker`, `leave_type` * - Sortable fields: `id`, `created_at`, `updated_at` */ list(query?: LeaveBalanceListParams | null | undefined, options?: RequestOptions): PagePromise; /** * Retrieve a specific leave balance */ retrieve(id: string, query?: LeaveBalanceRetrieveParams | null | undefined, options?: RequestOptions): APIPromise; } export type LeaveBalancesPageCursorURL = PageCursorURL; export interface LeaveBalance { /** * Identifier field */ id: string; /** * Record creation date */ created_at: string; /** * Record update date */ updated_at: string; /** * The ID of the worker associated with the leave balance. */ worker_id: string; /** * The worker's leave balance excluding future leave requests. If the leave balance * is unlimited, this field will be null. */ balance_excluding_future_requests?: number; /** * The worker's leave balance in days excluding future leave requests. If the leave * balance is unlimited, this field will be null. */ balance_excluding_future_requests_in_days?: number; /** * The worker's leave balance including future leave requests. If the leave balance * is unlimited, this field will be null. */ balance_including_future_requests?: number; /** * The worker's leave balance in days including future leave requests. If the leave * balance is unlimited, this field will be null. */ balance_including_future_requests_in_days?: number; /** * Indicates if the leave balance is unlimited. */ is_balance_unlimited?: boolean; /** * The leave type associated with the leave balance. * * Expandable field */ leave_type?: LeaveTypesAPI.LeaveType; /** * The ID of the leave type associated with the leave balance. */ leave_type_id?: string; /** * The worker associated with the leave balance. * * Expandable field */ worker?: WorkersAPI.Worker; } /** * Meta information for the response. */ export interface LeaveBalanceRetrieveResponse extends BusinessPartnersAPI.Meta, LeaveBalance { } export interface LeaveBalanceListParams { cursor?: string; expand?: string; filter?: string; order_by?: string; } export interface LeaveBalanceRetrieveParams { expand?: string; } export declare namespace LeaveBalances { export { type LeaveBalance as LeaveBalance, type LeaveBalanceRetrieveResponse as LeaveBalanceRetrieveResponse, type LeaveBalancesPageCursorURL as LeaveBalancesPageCursorURL, type LeaveBalanceListParams as LeaveBalanceListParams, type LeaveBalanceRetrieveParams as LeaveBalanceRetrieveParams, }; } //# sourceMappingURL=leave-balances.d.mts.map