import { APIResource } from "../core/resource.js"; import * as BusinessPartnersAPI from "./business-partners.js"; import * as WorkersAPI from "./workers.js"; import { APIPromise } from "../core/api-promise.js"; import { PageCursorURL, PagePromise } from "../core/pagination.js"; import { RequestOptions } from "../internal/request-options.js"; /** * Time entries submitted by workers */ export declare class TimeCards extends APIResource { /** * A list of time cards. * * - Requires: `API Tier 2` * - Filterable fields: `pay_period.start_date`, `worker_id` * - Expandable fields: `worker` * - Sortable fields: `id`, `created_at`, `updated_at` */ list(query?: TimeCardListParams | null | undefined, options?: RequestOptions): PagePromise; /** * Retrieve a specific time card */ retrieve(id: string, query?: TimeCardRetrieveParams | null | undefined, options?: RequestOptions): APIPromise; } export type TimeCardsPageCursorURL = PageCursorURL; export interface PayPeriod { /** * The end date of the pay period. */ end_date?: string; /** * The ID of the pay schedule associated with the pay period. */ pay_schedule_id?: string; /** * The start date of the pay period. */ start_date?: string; } export interface TimeCard { /** * Identifier field */ id: string; /** * Record creation date */ created_at: string; /** * Record update date */ updated_at: string; /** * The ID of the worker associated with the time card. */ worker_id: string; /** * The pay period associated with the time card. */ pay_period?: PayPeriod; /** * The summary of the time card. */ summary?: TimeCard.Summary; /** * The worker associated with the time card. * * Expandable field */ worker?: WorkersAPI.Worker; } export declare namespace TimeCard { /** * The summary of the time card. */ interface Summary { /** * The approved hours for the pay period. */ approved_hours?: number; /** * The total number of doubletime hours worked during the pay period. */ double_overtime_hours?: number; /** * The earnings for the pay period. */ earnings?: number; /** * The amount of hours worked for each job code for the pay period. */ hours_worked_by_job_code?: Array; /** * The total number of overtime hours worked during the pay period. */ overtime_hours?: number; /** * The paid hours for the pay period. */ paid_hours?: number; /** * The premiums for the pay period. */ premiums?: number; /** * The total number of regular hours worked during the pay period. */ regular_hours?: number; /** * The total holiday hours for the pay period. */ total_holiday_hours?: number; /** * The total hours for the pay period. */ total_hours?: number; /** * The total paid time off hours for the pay period. */ total_paid_time_off_hours?: number; /** * The total unpaid time off hours for the pay period. */ total_unpaid_time_off_hours?: number; /** * The map of time entry to unpaidBreakHours in seconds */ unpaid_break_hours_by_entry?: number; } namespace Summary { interface HoursWorkedByJobCode { /** * The total hours worked for the job codes. */ hours_worked?: number; /** * List of job code ids that this summary is tracking hours for. */ job_codes_id?: Array; } } } /** * Meta information for the response. */ export interface TimeCardRetrieveResponse extends BusinessPartnersAPI.Meta, TimeCard { } export interface TimeCardListParams { cursor?: string; expand?: string; filter?: string; order_by?: string; } export interface TimeCardRetrieveParams { expand?: string; } export declare namespace TimeCards { export { type PayPeriod as PayPeriod, type TimeCard as TimeCard, type TimeCardRetrieveResponse as TimeCardRetrieveResponse, type TimeCardsPageCursorURL as TimeCardsPageCursorURL, type TimeCardListParams as TimeCardListParams, type TimeCardRetrieveParams as TimeCardRetrieveParams, }; } //# sourceMappingURL=time-cards.d.ts.map