import { APIResource } from "../core/resource.mjs"; import * as BusinessPartnersAPI from "./business-partners.mjs"; import * as JobCodesAPI from "./job-codes.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"; /** * Job related information for the company */ export declare class WorkerTimeSplits extends APIResource { /** * A list of worker time splits. * * - Requires: `API Tier 2` * - Filterable fields: `worker_id`, `is_enabled`, `updated_at` * - Expandable fields: `worker`, `job_codes` * - Sortable fields: `id`, `created_at`, `updated_at` */ list(query?: WorkerTimeSplitListParams | null | undefined, options?: RequestOptions): PagePromise; /** * Create a new worker time split */ create(body: WorkerTimeSplitCreateParams, options?: RequestOptions): APIPromise; /** * Retrieve a specific worker time split */ retrieve(id: string, query?: WorkerTimeSplitRetrieveParams | null | undefined, options?: RequestOptions): APIPromise; /** * Update a specific worker time split. */ update(id: string, body: WorkerTimeSplitUpdateParams, options?: RequestOptions): APIPromise; /** * Delete a worker time split */ delete(id: string, options?: RequestOptions): APIPromise; } export type WorkerTimeSplitListResponsesPageCursorURL = PageCursorURL; /** * Worker time split configuration resource. */ export interface WorkerTimeSplitListResponse { /** * Identifier field */ id: string; /** * Record creation date */ created_at: string; /** * Record update date */ updated_at: string; /** * Identifier of the worker whose time split configuration this represents. */ worker_id: string; /** * Whether hard-coded time splits are active for this worker. */ is_enabled?: boolean; /** * The job codes referenced in this time split configuration. Use ?expand=job_codes * to populate. * * Expandable field */ job_codes?: Array; /** * IDs of all unique job codes referenced across all split rows. */ job_codes_id?: Array; /** * The split rows defining time allocation percentages across job codes. Empty when * is_enabled is false. */ splits?: Array; /** * The worker associated with this time split configuration. * * Expandable field */ worker?: WorkersAPI.Worker; } export declare namespace WorkerTimeSplitListResponse { /** * A single split row representing a percentage allocation across one or more job * codes. */ interface Split { /** * IDs of canonical /job-codes/ resources in this split row. */ job_code_ids?: Array; /** * Percentage allocated to this split row. Decimal string with precision 2; must be * greater than zero per row. All rows must sum to 100.00 when is_enabled is true. */ split_percentage?: string; } } /** * Worker time split configuration resource. */ export interface WorkerTimeSplitCreateResponse { /** * Identifier field */ id: string; /** * Record creation date */ created_at: string; /** * Record update date */ updated_at: string; /** * Identifier of the worker whose time split configuration this represents. */ worker_id: string; /** * Whether hard-coded time splits are active for this worker. */ is_enabled?: boolean; /** * The job codes referenced in this time split configuration. Use ?expand=job_codes * to populate. * * Expandable field */ job_codes?: Array; /** * IDs of all unique job codes referenced across all split rows. */ job_codes_id?: Array; /** * The split rows defining time allocation percentages across job codes. Empty when * is_enabled is false. */ splits?: Array; /** * The worker associated with this time split configuration. * * Expandable field */ worker?: WorkersAPI.Worker; } export declare namespace WorkerTimeSplitCreateResponse { /** * A single split row representing a percentage allocation across one or more job * codes. */ interface Split { /** * IDs of canonical /job-codes/ resources in this split row. */ job_code_ids?: Array; /** * Percentage allocated to this split row. Decimal string with precision 2; must be * greater than zero per row. All rows must sum to 100.00 when is_enabled is true. */ split_percentage?: string; } } /** * Meta information for the response. */ export interface WorkerTimeSplitRetrieveResponse extends BusinessPartnersAPI.Meta { /** * Identifier field */ id: string; /** * Record creation date */ created_at: string; /** * Record update date */ updated_at: string; /** * Identifier of the worker whose time split configuration this represents. */ worker_id: string; /** * Whether hard-coded time splits are active for this worker. */ is_enabled?: boolean; /** * The job codes referenced in this time split configuration. Use ?expand=job_codes * to populate. * * Expandable field */ job_codes?: Array; /** * IDs of all unique job codes referenced across all split rows. */ job_codes_id?: Array; /** * The split rows defining time allocation percentages across job codes. Empty when * is_enabled is false. */ splits?: Array; /** * The worker associated with this time split configuration. * * Expandable field */ worker?: WorkersAPI.Worker; } export declare namespace WorkerTimeSplitRetrieveResponse { /** * A single split row representing a percentage allocation across one or more job * codes. */ interface Split { /** * IDs of canonical /job-codes/ resources in this split row. */ job_code_ids?: Array; /** * Percentage allocated to this split row. Decimal string with precision 2; must be * greater than zero per row. All rows must sum to 100.00 when is_enabled is true. */ split_percentage?: string; } } /** * Worker time split configuration resource. */ export interface WorkerTimeSplitUpdateResponse { /** * Identifier field */ id: string; /** * Record creation date */ created_at: string; /** * Record update date */ updated_at: string; /** * Identifier of the worker whose time split configuration this represents. */ worker_id: string; /** * Whether hard-coded time splits are active for this worker. */ is_enabled?: boolean; /** * The job codes referenced in this time split configuration. Use ?expand=job_codes * to populate. * * Expandable field */ job_codes?: Array; /** * IDs of all unique job codes referenced across all split rows. */ job_codes_id?: Array; /** * The split rows defining time allocation percentages across job codes. Empty when * is_enabled is false. */ splits?: Array; /** * The worker associated with this time split configuration. * * Expandable field */ worker?: WorkersAPI.Worker; } export declare namespace WorkerTimeSplitUpdateResponse { /** * A single split row representing a percentage allocation across one or more job * codes. */ interface Split { /** * IDs of canonical /job-codes/ resources in this split row. */ job_code_ids?: Array; /** * Percentage allocated to this split row. Decimal string with precision 2; must be * greater than zero per row. All rows must sum to 100.00 when is_enabled is true. */ split_percentage?: string; } } export interface WorkerTimeSplitListParams { cursor?: string; expand?: string; filter?: string; order_by?: string; } export interface WorkerTimeSplitCreateParams { /** * Identifier of the worker whose time split configuration this represents. */ worker_id: string; /** * Whether hard-coded time splits are active for this worker. */ is_enabled?: boolean; /** * The split rows defining time allocation percentages across job codes. Empty when * is_enabled is false. */ splits?: Array; } export declare namespace WorkerTimeSplitCreateParams { /** * A single split row representing a percentage allocation across one or more job * codes. */ interface Split { /** * IDs of canonical /job-codes/ resources in this split row. */ job_code_ids?: Array; /** * Percentage allocated to this split row. Decimal string with precision 2; must be * greater than zero per row. All rows must sum to 100.00 when is_enabled is true. */ split_percentage?: string; } } export interface WorkerTimeSplitRetrieveParams { expand?: string; } export interface WorkerTimeSplitUpdateParams { /** * Identifier of the worker whose time split configuration this represents. */ worker_id: string; /** * Whether hard-coded time splits are active for this worker. */ is_enabled?: boolean; /** * The split rows defining time allocation percentages across job codes. Empty when * is_enabled is false. */ splits?: Array; } export declare namespace WorkerTimeSplitUpdateParams { /** * A single split row representing a percentage allocation across one or more job * codes. */ interface Split { /** * IDs of canonical /job-codes/ resources in this split row. */ job_code_ids?: Array; /** * Percentage allocated to this split row. Decimal string with precision 2; must be * greater than zero per row. All rows must sum to 100.00 when is_enabled is true. */ split_percentage?: string; } } export declare namespace WorkerTimeSplits { export { type WorkerTimeSplitListResponse as WorkerTimeSplitListResponse, type WorkerTimeSplitCreateResponse as WorkerTimeSplitCreateResponse, type WorkerTimeSplitRetrieveResponse as WorkerTimeSplitRetrieveResponse, type WorkerTimeSplitUpdateResponse as WorkerTimeSplitUpdateResponse, type WorkerTimeSplitListResponsesPageCursorURL as WorkerTimeSplitListResponsesPageCursorURL, type WorkerTimeSplitListParams as WorkerTimeSplitListParams, type WorkerTimeSplitCreateParams as WorkerTimeSplitCreateParams, type WorkerTimeSplitRetrieveParams as WorkerTimeSplitRetrieveParams, type WorkerTimeSplitUpdateParams as WorkerTimeSplitUpdateParams, }; } //# sourceMappingURL=worker-time-splits.d.mts.map