import { APIResource } from "../core/resource.mjs"; import * as BusinessPartnersAPI from "./business-partners.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"; /** * Time entries submitted by workers */ export declare class TimeCards extends APIResource { /** * A list of time cards. * * - Requires: `API Tier 1` * - Filterable fields: `pay_period.start_date`, `worker_id` * - Expandable fields: `worker` * - Sortable fields: `id`, `created_at`, `updated_at` * * @example HTTP * Representative request and response shapes. * ``` * GET /time-cards/?filter=filter&expand=expand&order_by=order_by&limit=50&cursor=cursor HTTP/1.1 * Host: rest.ripplingapis.com * Accept: application/json * Rippling-Api-Version: 2024-08-01 * * HTTP/1.1 200 OK * Content-Type: application/json * * { * "__meta": { * "redacted_fields": [ * { * "name": "date_of_birth", * "reason": "Insufficient entitlements" * } * ] * }, * "results": [ * { * "id": "string", * "created_at": "string", * "updated_at": "string", * "worker_id": "string", * "worker": { * "id": "string", * "created_at": "string", * "updated_at": "string", * "user_id": "string", * "user": {}, * "is_manager": "string", * "manager_id": "string", * "manager": {}, * "legal_entity_id": "string", * "legal_entity": {}, * "country": "AF", * "start_date": "string", * "end_date": "string", * "number": "string", * "work_email": "string", * "personal_email": "string", * "status": "INIT", * "location": {}, * "employment_type_id": "string", * "employment_type": {}, * "gender": "MALE", * "date_of_birth": "string", * "race": "BLACK", * "ethnicity": "HISPANIC_OR_LATINO", * "citizenship": "AF", * "compensation_id": "string", * "compensation": {}, * "overtime_exemption": "EXEMPT", * "department_id": "string", * "department": {}, * "teams_id": [], * "teams": [], * "title": "string", * "title_effective_date": "string", * "level_id": "string", * "level": {}, * "job_function_id": "string", * "job_function": {}, * "termination_details": {}, * "pay_schedule_id": "string", * "work_schedule": {}, * "compensation_grade": {}, * "original_start_date": "string", * "custom_fields": [], * "country_fields": {}, * "business_partners_id": [], * "business_partners": [] * }, * "pay_period": { * "start_date": "string", * "end_date": "string", * "pay_schedule_id": "string" * }, * "summary": { * "earnings": "string", * "hours_worked_by_job_code": [], * "premiums": "string", * "approved_hours": "string", * "paid_hours": "string", * "total_hours": "string", * "total_paid_time_off_hours": "string", * "total_holiday_hours": "string", * "total_unpaid_time_off_hours": "string", * "regular_hours": "string", * "overtime_hours": "string", * "double_overtime_hours": "string", * "unpaid_break_hours_by_entry": "string" * } * } * ], * "next_link": "string" * } * ``` */ list(query?: TimeCardListParams | null | undefined, options?: RequestOptions): PagePromise; /** * Retrieve a specific time card * * @example HTTP * Representative request and response shapes. * ``` * GET /time-cards/{id}/?expand=expand HTTP/1.1 * Host: rest.ripplingapis.com * Accept: application/json * Rippling-Api-Version: 2024-08-01 * * HTTP/1.1 200 OK * Content-Type: application/json * * { * "__meta": { * "redacted_fields": [ * {} * ] * } * } * ``` */ 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; /** * The maximum number of results to return. Defaults to 50. Maximum is 100. */ limit?: number; 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.mts.map