import { APIResource } from "../core/resource.js"; import * as BusinessPartnersAPI from "./business-partners.js"; import * as CompensationsAPI from "./compensations.js"; import * as DepartmentsAPI from "./departments.js"; import * as EmploymentTypesAPI from "./employment-types.js"; import * as LegalEntitiesAPI from "./legal-entities.js"; import * as LevelsAPI from "./levels.js"; import * as TeamsAPI from "./teams.js"; import * as UsersAPI from "./users.js"; import { APIPromise } from "../core/api-promise.js"; import { PageCursorURL, PagePromise } from "../core/pagination.js"; import { RequestOptions } from "../internal/request-options.js"; /** * Workers who work or have worked at the company */ export declare class Workers extends APIResource { /** * A list of workers. * * - Requires: `API Tier 1` * - Filterable fields: `status`, `work_email`, `user_id`, `created_at`, * `updated_at` * - Expandable fields: `user`, `manager`, `legal_entity`, `employment_type`, * `compensation`, `department`, `teams`, `level`, `job_function`, * `custom_fields`, `business_partners` * - Sortable fields: `id`, `created_at`, `updated_at` * * @example HTTP * Representative request and response shapes. * ``` * GET /workers/?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": {}, * "results": [ * { * "id": "string", * "created_at": "string", * "updated_at": "string", * "user_id": "string", * "user": { * "id": "string", * "created_at": "string", * "updated_at": "string" * }, * "is_manager": false, * "manager_id": "string", * "manager": { * "id": "string", * "created_at": "string", * "updated_at": "string" * }, * "legal_entity_id": "string", * "legal_entity": { * "id": "string", * "created_at": "string", * "updated_at": "string", * "tax_identifier": "string", * "country": {}, * "legal_name": "string", * "entity_level": "PARENT", * "registration_date": "string", * "mailing_address": {}, * "physical_address": {}, * "parent_id": "string", * "parent": {} * }, * "country": "AF", * "start_date": "string", * "end_date": "string", * "number": 0, * "work_email": "string", * "personal_email": "string", * "status": "INIT", * "location": { * "type": "REMOTE", * "work_location_id": "string" * }, * "employment_type_id": "string", * "employment_type": { * "id": "string", * "created_at": "string", * "updated_at": "string", * "label": "string", * "name": "string", * "type": "CONTRACTOR", * "compensation_time_period": "HOURLY", * "amount_worked": "PART-TIME" * }, * "gender": "MALE", * "date_of_birth": "string", * "race": "BLACK", * "ethnicity": "HISPANIC_OR_LATINO", * "citizenship": "AF", * "compensation_id": "string", * "compensation": { * "id": "string", * "created_at": "string", * "updated_at": "string", * "worker_id": "string", * "worker": {}, * "annual_compensation": {}, * "annual_salary_equivalent": {}, * "hourly_wage": {}, * "monthly_compensation": {}, * "on_target_commission": {}, * "relocation_reimbursement": {}, * "signing_bonus": {}, * "target_annual_bonus": {}, * "weekly_compensation": {}, * "target_annual_bonus_percent": "string", * "bonus_schedule": "string", * "payment_type": "string", * "payment_terms": "string", * "salary_effective_date": "string" * }, * "overtime_exemption": "EXEMPT", * "department_id": "string", * "department": { * "id": "string", * "created_at": "string", * "updated_at": "string", * "name": "string", * "parent_id": "string", * "parent": {}, * "reference_code": "string", * "department_hierarchy_id": [], * "department_hierarchy": [] * }, * "teams_id": [ * "string" * ], * "teams": [ * {} * ], * "title": "string", * "title_effective_date": "string", * "level_id": "string", * "level": { * "id": "string", * "created_at": "string", * "updated_at": "string", * "name": "string", * "parent_id": "string", * "parent": {}, * "global_level": "string", * "description": "string", * "scope_of_responsibilities": "string", * "experience_requirements": "string", * "rank": "string", * "track_id": "string", * "track": {} * }, * "job_function_id": "string", * "job_function": { * "id": "string", * "created_at": "string", * "updated_at": "string", * "name": "string" * }, * "termination_details": { * "type": "VOLUNTARY", * "reason": "string" * }, * "pay_schedule_id": "string", * "work_schedule": {}, * "compensation_grade": { * "id": "string", * "label": "string" * }, * "original_start_date": "string", * "custom_fields": [ * "string" * ], * "country_fields": { * "us": {}, * "ca": {}, * "nz": {} * }, * "business_partners_id": [ * "string" * ], * "business_partners": [ * {} * ] * } * ], * "next_link": "string" * } * ``` */ list(query?: WorkerListParams | null | undefined, options?: RequestOptions): PagePromise; /** * Retrieve a specific worker * * @example HTTP * Representative request and response shapes. * ``` * GET /workers/{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?: WorkerRetrieveParams | null | undefined, options?: RequestOptions): APIPromise; } export type WorkersPageCursorURL = PageCursorURL; export interface Worker { /** * Identifier field */ id: string; /** * Record creation date */ created_at: string; /** * Record update date */ updated_at: string; /** * Worker's assigned business partners. This field is only populated when * explicitly requested via the expand parameter (e.g., ?expand=business_partners). * When expanded, returns an empty list ([]) if the worker has no business * partners. * * Expandable field */ business_partners?: Array; /** * Worker's assigned business partners unique identifiers. Returns an empty list * ([]) if the worker has no business partners. */ business_partners_id?: Array; /** * The countries that the worker has citizenship in. */ citizenship?: 'AF' | 'AX' | 'AL' | 'DZ' | 'AS' | 'AD' | 'AO' | 'AI' | 'AQ' | 'AG' | 'AR' | 'AM' | 'AW' | 'AU' | 'AT' | 'AZ' | 'BS' | 'BH' | 'BD' | 'BB' | 'BY' | 'BE' | 'BZ' | 'BJ' | 'BM' | 'BT' | 'BO' | 'BQ' | 'BA' | 'BW' | 'BV' | 'BR' | 'IO' | 'BN' | 'BG' | 'BF' | 'BI' | 'CV' | 'KH' | 'CM' | 'CA' | 'KY' | 'CF' | 'TD' | 'CL' | 'CN' | 'CX' | 'CC' | 'CO' | 'KM' | 'CG' | 'CD' | 'CK' | 'CR' | 'CI' | 'HR' | 'CW' | 'CY' | 'CZ' | 'DK' | 'DJ' | 'DM' | 'DO' | 'EC' | 'EG' | 'SV' | 'GQ' | 'ER' | 'EE' | 'SZ' | 'ET' | 'FK' | 'FO' | 'FJ' | 'FI' | 'FR' | 'GF' | 'PF' | 'TF' | 'GA' | 'GM' | 'GE' | 'DE' | 'GH' | 'GI' | 'GR' | 'GL' | 'GD' | 'GP' | 'GU' | 'GT' | 'GG' | 'GN' | 'GW' | 'GY' | 'HT' | 'HM' | 'VA' | 'HN' | 'HK' | 'HU' | 'IS' | 'IN' | 'ID' | 'IQ' | 'IR' | 'IE' | 'IM' | 'IL' | 'IT' | 'JM' | 'JP' | 'JE' | 'JO' | 'KZ' | 'KE' | 'KI' | 'KR' | 'XK' | 'KW' | 'KG' | 'LA' | 'LV' | 'LB' | 'LS' | 'LR' | 'LY' | 'LI' | 'LT' | 'LU' | 'MO' | 'MG' | 'MW' | 'MY' | 'MV' | 'ML' | 'MT' | 'MH' | 'MQ' | 'MR' | 'MU' | 'YT' | 'MX' | 'FM' | 'MD' | 'MC' | 'MN' | 'ME' | 'MS' | 'MA' | 'MZ' | 'MM' | 'NA' | 'NR' | 'NP' | 'NL' | 'AN' | 'NC' | 'NZ' | 'NI' | 'NE' | 'NG' | 'NU' | 'NF' | 'MK' | 'MP' | 'NO' | 'OM' | 'PK' | 'PW' | 'PS' | 'PA' | 'PG' | 'PY' | 'PE' | 'PH' | 'PN' | 'PL' | 'PT' | 'PR' | 'QA' | 'RO' | 'RU' | 'RW' | 'RE' | 'BL' | 'SH' | 'KN' | 'LC' | 'MF' | 'PM' | 'VC' | 'WS' | 'SM' | 'ST' | 'SA' | 'SN' | 'RS' | 'SC' | 'SL' | 'SG' | 'SX' | 'SY' | 'SK' | 'SI' | 'SB' | 'SO' | 'ZA' | 'GS' | 'SS' | 'ES' | 'LK' | 'SD' | 'SR' | 'SJ' | 'SE' | 'CH' | 'TW' | 'TJ' | 'TZ' | 'TH' | 'TL' | 'TG' | 'TK' | 'TO' | 'TT' | 'TN' | 'TR' | 'TM' | 'TC' | 'TV' | 'UG' | 'UA' | 'AE' | 'GB' | 'US' | 'UM' | 'UY' | 'UZ' | 'VU' | 'VE' | 'VN' | 'VG' | 'VI' | 'WF' | 'EH' | 'YE' | 'ZM' | 'ZW'; /** * The compensation package for the worker. * * Expandable field */ compensation?: CompensationsAPI.Compensation; /** * The compensation grade assigned to the worker, if any. */ compensation_grade?: Worker.CompensationGrade; /** * The compensation package for the worker. */ compensation_id?: string; /** * The worker's country. */ country?: 'AF' | 'AX' | 'AL' | 'DZ' | 'AS' | 'AD' | 'AO' | 'AI' | 'AQ' | 'AG' | 'AR' | 'AM' | 'AW' | 'AU' | 'AT' | 'AZ' | 'BS' | 'BH' | 'BD' | 'BB' | 'BY' | 'BE' | 'BZ' | 'BJ' | 'BM' | 'BT' | 'BO' | 'BQ' | 'BA' | 'BW' | 'BV' | 'BR' | 'IO' | 'BN' | 'BG' | 'BF' | 'BI' | 'CV' | 'KH' | 'CM' | 'CA' | 'KY' | 'CF' | 'TD' | 'CL' | 'CN' | 'CX' | 'CC' | 'CO' | 'KM' | 'CG' | 'CD' | 'CK' | 'CR' | 'CI' | 'HR' | 'CW' | 'CY' | 'CZ' | 'DK' | 'DJ' | 'DM' | 'DO' | 'EC' | 'EG' | 'SV' | 'GQ' | 'ER' | 'EE' | 'SZ' | 'ET' | 'FK' | 'FO' | 'FJ' | 'FI' | 'FR' | 'GF' | 'PF' | 'TF' | 'GA' | 'GM' | 'GE' | 'DE' | 'GH' | 'GI' | 'GR' | 'GL' | 'GD' | 'GP' | 'GU' | 'GT' | 'GG' | 'GN' | 'GW' | 'GY' | 'HT' | 'HM' | 'VA' | 'HN' | 'HK' | 'HU' | 'IS' | 'IN' | 'ID' | 'IQ' | 'IR' | 'IE' | 'IM' | 'IL' | 'IT' | 'JM' | 'JP' | 'JE' | 'JO' | 'KZ' | 'KE' | 'KI' | 'KR' | 'XK' | 'KW' | 'KG' | 'LA' | 'LV' | 'LB' | 'LS' | 'LR' | 'LY' | 'LI' | 'LT' | 'LU' | 'MO' | 'MG' | 'MW' | 'MY' | 'MV' | 'ML' | 'MT' | 'MH' | 'MQ' | 'MR' | 'MU' | 'YT' | 'MX' | 'FM' | 'MD' | 'MC' | 'MN' | 'ME' | 'MS' | 'MA' | 'MZ' | 'MM' | 'NA' | 'NR' | 'NP' | 'NL' | 'AN' | 'NC' | 'NZ' | 'NI' | 'NE' | 'NG' | 'NU' | 'NF' | 'MK' | 'MP' | 'NO' | 'OM' | 'PK' | 'PW' | 'PS' | 'PA' | 'PG' | 'PY' | 'PE' | 'PH' | 'PN' | 'PL' | 'PT' | 'PR' | 'QA' | 'RO' | 'RU' | 'RW' | 'RE' | 'BL' | 'SH' | 'KN' | 'LC' | 'MF' | 'PM' | 'VC' | 'WS' | 'SM' | 'ST' | 'SA' | 'SN' | 'RS' | 'SC' | 'SL' | 'SG' | 'SX' | 'SY' | 'SK' | 'SI' | 'SB' | 'SO' | 'ZA' | 'GS' | 'SS' | 'ES' | 'LK' | 'SD' | 'SR' | 'SJ' | 'SE' | 'CH' | 'TW' | 'TJ' | 'TZ' | 'TH' | 'TL' | 'TG' | 'TK' | 'TO' | 'TT' | 'TN' | 'TR' | 'TM' | 'TC' | 'TV' | 'UG' | 'UA' | 'AE' | 'GB' | 'US' | 'UM' | 'UY' | 'UZ' | 'VU' | 'VE' | 'VN' | 'VG' | 'VI' | 'WF' | 'EH' | 'YE' | 'ZM' | 'ZW'; /** * Country level fields for the worker. */ country_fields?: Worker.CountryFields; /** * Custom field values defined on the Employee object for this worker * * Expandable field */ custom_fields?: Array; /** * The worker's date of birth. */ date_of_birth?: string; /** * The worker's assigned department. * * Expandable field */ department?: DepartmentsAPI.Department; /** * The worker's assigned department. */ department_id?: string; /** * The worker's employment type. * * Expandable field */ employment_type?: EmploymentTypesAPI.CompanyEmploymentType; /** * The worker's employment type. */ employment_type_id?: string; /** * The end date of the worker. */ end_date?: string; /** * The identified ethnicity of the worker, if specified. */ ethnicity?: 'HISPANIC_OR_LATINO' | 'WHITE' | 'BLACK_OR_AFRICAN_AMERICAN' | 'NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER' | 'ASIAN' | 'AMERICAN_INDIAN_OR_ALASKA_NATIVE' | 'TWO_OR_MORE_RACES' | 'MIDDLE_EASTERN_OR_NORTH_AFRICAN' | 'DECLINE_TO_SELF_IDENTIFY' | 'AFRICAN' | 'COLOURED' | 'INDIAN' | 'OTHER' | 'PREFER_NOT_TO_SAY'; /** * The gender of the worker, if specified. */ gender?: 'MALE' | 'FEMALE' | 'NONBINARY' | 'UNDETERMINED' | 'DIVERSE' | 'DOES_NOT_APPLY' | 'PREFER_NOT_TO_SAY'; /** * Whether the worker is a manager */ is_manager?: boolean; /** * The worker's job function. When expanded, this field requires * `job-functions.read`. * * Expandable field */ job_function?: Worker.JobFunction; /** * ID of the worker's job function. */ job_function_id?: string; /** * The worker's associated legal entity. * * Expandable field */ legal_entity?: LegalEntitiesAPI.LegalEntity; /** * The worker's associated legal entity. */ legal_entity_id?: string; /** * The level of the worker. * * Expandable field */ level?: LevelsAPI.Level; /** * The level of the worker. */ level_id?: string; /** * The location that the worker is mapped to for tax purposes. In the case that a * worker is remote, the location's type is remote. */ location?: Worker.Location; /** * The worker's manager. * * Expandable field */ manager?: Worker; /** * The worker's manager. */ manager_id?: string; /** * The worker's number within the organization. */ number?: number; /** * The worker's earliest start date across their employment history, excluding INIT * roles. */ original_start_date?: string; /** * The worker's overtime exemption status. */ overtime_exemption?: 'EXEMPT' | 'NON_EXEMPT'; /** * The ID of the pay schedule currently associated with the worker. */ pay_schedule_id?: string; /** * The worker's associated personal email address. */ personal_email?: string; /** * The identified race of the worker, if specified. */ race?: 'BLACK' | 'BROWN' | 'CHINESE' | 'EURASIAN' | 'INDIAN' | 'INDIGENOUS' | 'MALAY' | 'WHITE' | 'YELLOW' | 'NOT_INFORMED' | 'OTHER'; /** * The start date of the worker. */ start_date?: string; /** * The worker's status within the organization. */ status?: 'INIT' | 'HIRED' | 'ACCEPTED' | 'ACTIVE' | 'TERMINATED'; /** * The worker's assigned teams. * * Expandable field */ teams?: Array; /** * The worker's assigned teams. */ teams_id?: Array; /** * The details of the worker's termination, if applicable. */ termination_details?: Worker.TerminationDetails; /** * The worker's title. */ title?: string; /** * Title effective date */ title_effective_date?: string; /** * The worker's associated user. * * Expandable field */ user?: UsersAPI.User; /** * The worker's associated user. */ user_id?: string; /** * The worker's associated work email address. */ work_email?: string; /** * The worker's scheduled working hours for each day of the week. */ work_schedule?: { [key: string]: Worker.WorkSchedule; }; } export declare namespace Worker { /** * The compensation grade assigned to the worker, if any. */ interface CompensationGrade { /** * The compensation grade's unique identifier. */ id?: string; /** * The compensation grade's label. */ label?: string; } /** * Country level fields for the worker. */ interface CountryFields { /** * Country-wise regional fields for Canada */ ca?: CountryFields.Ca; /** * Country-wise regional fields for New Zealand */ nz?: CountryFields.Nz; /** * Country-wise regional fields for USA */ us?: CountryFields.Us; } namespace CountryFields { /** * Country-wise regional fields for Canada */ interface Ca { /** * Social Insurance Number (SIN) for Canada employees. */ sin?: string; } /** * Country-wise regional fields for New Zealand */ interface Nz { /** * Inland Revenue Department (IRD) number for New Zealand employees. */ ird_number?: string; } /** * Country-wise regional fields for USA */ interface Us { /** * Social Security Number (SSN) for US employees. */ ssn?: string; } } /** * The worker's job function. When expanded, this field requires * `job-functions.read`. * * Expandable field */ interface JobFunction { /** * Identifier field */ id: string; /** * Record creation date */ created_at: string; /** * Record update date */ updated_at: string; /** * Displayed name of the job function */ name?: string; } /** * The location that the worker is mapped to for tax purposes. In the case that a * worker is remote, the location's type is remote. */ interface Location { /** * The type of location. */ type: 'REMOTE' | 'WORK'; /** * The work location, if the worker isn't remote. */ work_location_id: string; } /** * The details of the worker's termination, if applicable. */ interface TerminationDetails { /** * This is a description that will be custom to each Rippling company. */ reason?: string; /** * The termination type indicates whether the termination was voluntary or * involuntary. */ type?: 'VOLUNTARY' | 'INVOLUNTARY' | 'RETIREMENT' | 'DEATH' | 'ABANDONMENT' | 'OFFER_DECLINED' | 'RESCIND' | 'RENEGE'; } /** * The scheduled working hours for a day of the week. */ interface WorkSchedule { /** * The number of scheduled working hours for the day. */ hours?: number; } } /** * Meta information for the response. */ export interface WorkerRetrieveResponse extends BusinessPartnersAPI.Meta, Worker { } export interface WorkerListParams { 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 WorkerRetrieveParams { expand?: string; } export declare namespace Workers { export { type Worker as Worker, type WorkerRetrieveResponse as WorkerRetrieveResponse, type WorkersPageCursorURL as WorkersPageCursorURL, type WorkerListParams as WorkerListParams, type WorkerRetrieveParams as WorkerRetrieveParams, }; } //# sourceMappingURL=workers.d.ts.map