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 1` * - Filterable fields: `worker_id`, `leave_type_id` * - Expandable fields: `worker`, `leave_type` * - Sortable fields: `id`, `created_at`, `updated_at` * * @example HTTP * Representative request and response shapes. * ``` * GET /leave-balances/?filter=filter&expand=expand&order_by=order_by&limit=50&cursor=cursor HTTP/1.1 * Host: rest.ripplingapis.com * Accept: application/json * Rippling-Api-Version: 2024-08-01 * * HTTP/1.1 200 OK * Content-Type: application/json * * { * "__meta": { * "redacted_fields": [ * { * "name": "date_of_birth", * "reason": "Insufficient entitlements" * } * ] * }, * "results": [ * { * "id": "string", * "created_at": "string", * "updated_at": "string", * "worker_id": "string", * "worker": { * "id": "string", * "created_at": "string", * "updated_at": "string", * "user_id": "string", * "user": {}, * "is_manager": "string", * "manager_id": "string", * "manager": {}, * "legal_entity_id": "string", * "legal_entity": {}, * "country": "AF", * "start_date": "string", * "end_date": "string", * "number": "string", * "work_email": "string", * "personal_email": "string", * "status": "INIT", * "location": {}, * "employment_type_id": "string", * "employment_type": {}, * "gender": "MALE", * "date_of_birth": "string", * "race": "BLACK", * "ethnicity": "HISPANIC_OR_LATINO", * "citizenship": "AF", * "compensation_id": "string", * "compensation": {}, * "overtime_exemption": "EXEMPT", * "department_id": "string", * "department": {}, * "teams_id": [], * "teams": [], * "title": "string", * "title_effective_date": "string", * "level_id": "string", * "level": {}, * "job_function_id": "string", * "job_function": {}, * "termination_details": {}, * "pay_schedule_id": "string", * "work_schedule": {}, * "compensation_grade": {}, * "original_start_date": "string", * "custom_fields": [], * "country_fields": {}, * "business_partners_id": [], * "business_partners": [] * }, * "leave_type_id": "string", * "leave_type": { * "id": "string", * "created_at": "string", * "updated_at": "string", * "type": "string", * "name": "string", * "description": "string", * "is_paid": "string", * "is_managed_by_external_system": "string" * }, * "is_balance_unlimited": false, * "balance_including_future_requests": 0, * "balance_excluding_future_requests": 0, * "balance_including_future_requests_in_days": 0, * "balance_excluding_future_requests_in_days": 0 * } * ], * "next_link": "string" * } * ``` */ list(query?: LeaveBalanceListParams | null | undefined, options?: RequestOptions): PagePromise; /** * Retrieve a specific leave balance * * @example HTTP * Representative request and response shapes. * ``` * GET /leave-balances/{id}/?expand=expand HTTP/1.1 * Host: rest.ripplingapis.com * Accept: application/json * Rippling-Api-Version: 2024-08-01 * * HTTP/1.1 200 OK * Content-Type: application/json * * { * "__meta": { * "redacted_fields": [ * {} * ] * } * } * ``` */ 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; /** * The maximum number of results to return. Defaults to 50. Maximum is 100. */ limit?: number; 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