// 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 { buildHeaders } from '../internal/headers'; import { RequestOptions } from '../internal/request-options'; import { path } from '../internal/utils/path'; /** * Job related information for the company */ export class ScheduledJobAssignments extends APIResource { /** * A list of scheduled job assignments. * * - Requires: `API Tier 2` * - Sortable fields: `id`, `created_at`, `updated_at`, `effective_from` */ list( query: ScheduledJobAssignmentListParams | null | undefined = {}, options?: RequestOptions, ): PagePromise { return this._client.getAPIList( '/scheduled-job-assignments/', PageCursorURL, { query, ...options }, ); } /** * Retrieve a specific scheduled job assignment */ retrieve(id: string, options?: RequestOptions): APIPromise { return this._client.get(path`/scheduled-job-assignments/${id}/`, options); } /** * Delete a scheduled job assignment */ delete(id: string, options?: RequestOptions): APIPromise { return this._client.delete(path`/scheduled-job-assignments/${id}/`, { ...options, headers: buildHeaders([{ Accept: '*/*' }, options?.headers]), }); } } export type ScheduledJobAssignmentListResponsesPageCursorURL = PageCursorURL; /** * Platform API DTO for a scheduled job assignment or unassignment change. */ export interface ScheduledJobAssignmentListResponse { /** * Identifier field */ id: string; /** * Record creation date */ created_at: string; /** * Record update date */ updated_at: string; /** * Type of scheduled change: ASSIGN or UNASSIGN. */ change_type?: 'ASSIGN' | 'UNASSIGN'; /** * The ID of the role that created this scheduled change. */ changed_by_id?: string; /** * When the scheduled change will be applied (ISO 8601). */ effective_from?: string; /** * The ID of the job code. */ job_code_id?: string; /** * Display name of the job code. */ job_code_name?: string; /** * The ID of the job dimension. */ job_dimension_id?: string; /** * Display name of the job dimension. */ job_dimension_name?: string; /** * New pay rate value, if the change includes a pay rate. */ pay_rate?: number; /** * Reason provided when the scheduled change was created. */ reason?: string; /** * The ID of the worker (role) the scheduled changes target. */ worker_id?: string; } /** * Meta information for the response. */ export interface ScheduledJobAssignmentRetrieveResponse extends BusinessPartnersAPI.Meta { /** * Identifier field */ id: string; /** * Record creation date */ created_at: string; /** * Record update date */ updated_at: string; /** * Type of scheduled change: ASSIGN or UNASSIGN. */ change_type?: 'ASSIGN' | 'UNASSIGN'; /** * The ID of the role that created this scheduled change. */ changed_by_id?: string; /** * When the scheduled change will be applied (ISO 8601). */ effective_from?: string; /** * The ID of the job code. */ job_code_id?: string; /** * Display name of the job code. */ job_code_name?: string; /** * The ID of the job dimension. */ job_dimension_id?: string; /** * Display name of the job dimension. */ job_dimension_name?: string; /** * New pay rate value, if the change includes a pay rate. */ pay_rate?: number; /** * Reason provided when the scheduled change was created. */ reason?: string; /** * The ID of the worker (role) the scheduled changes target. */ worker_id?: string; } export interface ScheduledJobAssignmentListParams { cursor?: string; order_by?: string; } export declare namespace ScheduledJobAssignments { export { type ScheduledJobAssignmentListResponse as ScheduledJobAssignmentListResponse, type ScheduledJobAssignmentRetrieveResponse as ScheduledJobAssignmentRetrieveResponse, type ScheduledJobAssignmentListResponsesPageCursorURL as ScheduledJobAssignmentListResponsesPageCursorURL, type ScheduledJobAssignmentListParams as ScheduledJobAssignmentListParams, }; }