// 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 * as JobAssignmentsAPI from './job-assignments'; import { AttributeChangeDetailsPageCursorURL } from './job-assignments'; import * as JobCodesAPI from './job-codes'; import { APIPromise } from '../core/api-promise'; import { PageCursorURL, PagePromise } from '../core/pagination'; import { RequestOptions } from '../internal/request-options'; import { path } from '../internal/utils/path'; /** * Job related information for the company */ export class JobPayRateExceptions extends APIResource { /** * A list of job pay rate exceptions. * * - Requires: `API Tier 2` * - Filterable fields: `job_code_id` * - Expandable fields: `job_code` * - Sortable fields: `id`, `created_at`, `updated_at` */ list( query: JobPayRateExceptionListParams | null | undefined = {}, options?: RequestOptions, ): PagePromise { return this._client.getAPIList('/job-pay-rate-exceptions/', PageCursorURL, { query, ...options, }); } /** * Retrieve a specific job pay rate exception */ retrieve( id: string, query: JobPayRateExceptionRetrieveParams | null | undefined = {}, options?: RequestOptions, ): APIPromise { return this._client.get(path`/job-pay-rate-exceptions/${id}/`, { query, ...options }); } /** * A list of attribute change logs. * * - Requires: `API Tier 2` * - Expandable fields: `changed_by_worker` * - Sortable fields: `id` */ listChangeLog( jobPayRateExceptionID: string, query: JobPayRateExceptionListChangeLogParams | null | undefined = {}, options?: RequestOptions, ): PagePromise { return this._client.getAPIList( path`/job-pay-rate-exceptions/${jobPayRateExceptionID}/change-log/`, PageCursorURL, { query, ...options }, ); } } export type JobPayRateExceptionsPageCursorURL = PageCursorURL; export interface JobPayRateException { /** * Identifier field */ id: string; /** * Record creation date */ created_at: string; /** * Identifier of dimension object on which exception is configured. This objects * details can be queried from exception_dimension_type's resource */ exception_dimension_id: string; /** * Identifier of Job for which exception is configured. */ job_code_id: string; /** * The pay rate for exception on job_code_id and exception_dimension_id combination */ pay_rate: number; /** * Record update date */ updated_at: string; /** * Type of dimension on which exception is configured */ exception_dimension_type?: 'JOB_CODE' | 'LEVEL' | 'TEAM' | 'DEPARTMENT' | 'WORK_LOCATION'; /** * Job for which exception is configured. * * Expandable field */ job_code?: JobCodesAPI.JobCode; } /** * Meta information for the response. */ export interface JobPayRateExceptionRetrieveResponse extends BusinessPartnersAPI.Meta, JobPayRateException {} export interface JobPayRateExceptionListParams { cursor?: string; expand?: string; filter?: string; order_by?: string; } export interface JobPayRateExceptionRetrieveParams { expand?: string; } export interface JobPayRateExceptionListChangeLogParams { cursor?: string; expand?: string; order_by?: string; } export declare namespace JobPayRateExceptions { export { type JobPayRateException as JobPayRateException, type JobPayRateExceptionRetrieveResponse as JobPayRateExceptionRetrieveResponse, type JobPayRateExceptionsPageCursorURL as JobPayRateExceptionsPageCursorURL, type JobPayRateExceptionListParams as JobPayRateExceptionListParams, type JobPayRateExceptionRetrieveParams as JobPayRateExceptionRetrieveParams, type JobPayRateExceptionListChangeLogParams as JobPayRateExceptionListChangeLogParams, }; } export { type AttributeChangeDetailsPageCursorURL };