/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { lazySchema as lazySchema$ } from "../../lib/schemas.js"; import * as openEnums from "../../types/enums.js"; import { OpenEnum } from "../../types/enums.js"; /** * Time off request status to filter on */ export const TimeOffRequestStatus = { Requested: "requested", Approved: "approved", Declined: "declined", Cancelled: "cancelled", Deleted: "deleted", Other: "other", } as const; /** * Time off request status to filter on */ export type TimeOffRequestStatus = OpenEnum; export type TimeOffRequestsFilter = { /** * Start date of the date range to filter time off requests. When used with end_date, filters for requests within the specified date range. */ startDate?: string | undefined; /** * End date of the date range to filter time off requests. When used with start_date, filters for requests within the specified date range. */ endDate?: string | undefined; /** * Minimum date the time off request was last created or modified */ updatedSince?: string | undefined; /** * Employee ID */ employeeId?: string | undefined; /** * Time off request status to filter on */ timeOffRequestStatus?: TimeOffRequestStatus | undefined; /** * Company ID */ companyId?: string | undefined; }; /** @internal */ export const TimeOffRequestStatus$outboundSchema: z.ZodType< string, z.ZodTypeDef, TimeOffRequestStatus > = /* @__PURE__ */ lazySchema$(() => openEnums.outboundSchema(TimeOffRequestStatus) ); /** @internal */ export type TimeOffRequestsFilter$Outbound = { start_date?: string | undefined; end_date?: string | undefined; updated_since?: string | undefined; employee_id?: string | undefined; time_off_request_status?: string | undefined; company_id?: string | undefined; }; /** @internal */ export const TimeOffRequestsFilter$outboundSchema: z.ZodType< TimeOffRequestsFilter$Outbound, z.ZodTypeDef, TimeOffRequestsFilter > = /* @__PURE__ */ lazySchema$(() => z.object({ startDate: z.string().optional(), endDate: z.string().optional(), updatedSince: z.string().optional(), employeeId: z.string().optional(), timeOffRequestStatus: TimeOffRequestStatus$outboundSchema.optional(), companyId: z.string().optional(), }).transform((v) => { return remap$(v, { startDate: "start_date", endDate: "end_date", updatedSince: "updated_since", employeeId: "employee_id", timeOffRequestStatus: "time_off_request_status", companyId: "company_id", }); }) ); export function timeOffRequestsFilterToJSON( timeOffRequestsFilter: TimeOffRequestsFilter, ): string { return JSON.stringify( TimeOffRequestsFilter$outboundSchema.parse(timeOffRequestsFilter), ); }