// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import { APIResource } from '../core/resource'; import * as BusinessPartnersAPI from './business-partners'; import { APIPromise } from '../core/api-promise'; import { PageCursorURL, PagePromise } from '../core/pagination'; import { RequestOptions } from '../internal/request-options'; import { path } from '../internal/utils/path'; /** * Employment types used by the company */ export class EmploymentTypes extends APIResource { /** * A list of employment types. * * - Requires: `API Tier 1` * - Sortable fields: `id`, `created_at`, `updated_at` */ list( query: EmploymentTypeListParams | null | undefined = {}, options?: RequestOptions, ): PagePromise { return this._client.getAPIList('/employment-types/', PageCursorURL, { query, ...options, }); } /** * Retrieve a specific employment type */ retrieve(id: string, options?: RequestOptions): APIPromise { return this._client.get(path`/employment-types/${id}/`, options); } } export type CompanyEmploymentTypesPageCursorURL = PageCursorURL; export interface CompanyEmploymentType { /** * Identifier field */ id: string; /** * Record creation date */ created_at: string; /** * The display label of the employment type. */ label: string; /** * Record update date */ updated_at: string; /** * The amount worked for the employment type. _ `FULL-TIME`: Full-time is at least * 30 hours per week. Full-time workers will typically be eligible for benefits. _ * `PART-TIME`: Part-time is less than 30 hours per week. These workers may be * eligible for benefits, depending on company settings and hours worked. \* * `TEMPORARY`: These workers are hired on a temporary basis. You can specify how * each worker with this employment type will be paid individually. */ amount_worked?: 'PART-TIME' | 'FULL-TIME' | 'TEMPORARY'; /** * The compensation period for the employment type. _ `SALARIED`: Employees that * are paid a fixed amount per year. _ `HOURLY`: Employees that are paid a wage per * hour worked. */ compensation_time_period?: 'HOURLY' | 'SALARIED'; /** * The name of the employment type for non-custom employment types. */ name?: string; /** * The classification of the worker by the company. _ `CONTRACTOR`: Contractors are * self-employed workers who provide services on a short-term or per-project basis * and are not eligible for tax-withholding or benefits. _ `EMPLOYEE`: Employees * are hired and managed by an employer, work under the employer's direct * supervision and control, and are protected by law for wages and employment * rights. */ type?: 'CONTRACTOR' | 'EMPLOYEE'; } /** * Meta information for the response. */ export interface EmploymentTypeRetrieveResponse extends BusinessPartnersAPI.Meta, CompanyEmploymentType {} export interface EmploymentTypeListParams { cursor?: string; order_by?: string; } export declare namespace EmploymentTypes { export { type CompanyEmploymentType as CompanyEmploymentType, type EmploymentTypeRetrieveResponse as EmploymentTypeRetrieveResponse, type CompanyEmploymentTypesPageCursorURL as CompanyEmploymentTypesPageCursorURL, type EmploymentTypeListParams as EmploymentTypeListParams, }; }