/* * 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 { safeParse } from "../../lib/schemas.js"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { HTTPMetadata, HTTPMetadata$inboundSchema, } from "../components/httpmetadata.js"; import { PayScheduleShow, PayScheduleShow$inboundSchema, } from "../components/payscheduleshow.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; /** * Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. */ export const GetV1CompaniesCompanyIdPaySchedulesPayScheduleIdHeaderXGustoAPIVersion = { TwoThousandAndTwentyFiveMinus06Minus15: "2025-06-15", } as const; /** * Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. */ export type GetV1CompaniesCompanyIdPaySchedulesPayScheduleIdHeaderXGustoAPIVersion = ClosedEnum< typeof GetV1CompaniesCompanyIdPaySchedulesPayScheduleIdHeaderXGustoAPIVersion >; export type GetV1CompaniesCompanyIdPaySchedulesPayScheduleIdRequest = { /** * Determines the date-based API version associated with your API call. If none is provided, your application's [minimum API version](https://docs.gusto.com/embedded-payroll/docs/api-versioning#minimum-api-version) is used. */ xGustoAPIVersion?: | GetV1CompaniesCompanyIdPaySchedulesPayScheduleIdHeaderXGustoAPIVersion | undefined; /** * The UUID of the company */ companyId: string; /** * The UUID of the pay schedule */ payScheduleId: string; }; export type GetV1CompaniesCompanyIdPaySchedulesPayScheduleIdResponse = { httpMeta: HTTPMetadata; /** * Successful */ payScheduleShow?: PayScheduleShow | undefined; }; /** @internal */ export const GetV1CompaniesCompanyIdPaySchedulesPayScheduleIdHeaderXGustoAPIVersion$outboundSchema: z.ZodNativeEnum< typeof GetV1CompaniesCompanyIdPaySchedulesPayScheduleIdHeaderXGustoAPIVersion > = z.nativeEnum( GetV1CompaniesCompanyIdPaySchedulesPayScheduleIdHeaderXGustoAPIVersion, ); /** @internal */ export type GetV1CompaniesCompanyIdPaySchedulesPayScheduleIdRequest$Outbound = { "X-Gusto-API-Version": string; company_id: string; pay_schedule_id: string; }; /** @internal */ export const GetV1CompaniesCompanyIdPaySchedulesPayScheduleIdRequest$outboundSchema: z.ZodType< GetV1CompaniesCompanyIdPaySchedulesPayScheduleIdRequest$Outbound, z.ZodTypeDef, GetV1CompaniesCompanyIdPaySchedulesPayScheduleIdRequest > = z.object({ xGustoAPIVersion: GetV1CompaniesCompanyIdPaySchedulesPayScheduleIdHeaderXGustoAPIVersion$outboundSchema .default("2025-06-15"), companyId: z.string(), payScheduleId: z.string(), }).transform((v) => { return remap$(v, { xGustoAPIVersion: "X-Gusto-API-Version", companyId: "company_id", payScheduleId: "pay_schedule_id", }); }); export function getV1CompaniesCompanyIdPaySchedulesPayScheduleIdRequestToJSON( getV1CompaniesCompanyIdPaySchedulesPayScheduleIdRequest: GetV1CompaniesCompanyIdPaySchedulesPayScheduleIdRequest, ): string { return JSON.stringify( GetV1CompaniesCompanyIdPaySchedulesPayScheduleIdRequest$outboundSchema .parse(getV1CompaniesCompanyIdPaySchedulesPayScheduleIdRequest), ); } /** @internal */ export const GetV1CompaniesCompanyIdPaySchedulesPayScheduleIdResponse$inboundSchema: z.ZodType< GetV1CompaniesCompanyIdPaySchedulesPayScheduleIdResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: HTTPMetadata$inboundSchema, "Pay-Schedule-Show": PayScheduleShow$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "Pay-Schedule-Show": "payScheduleShow", }); }); export function getV1CompaniesCompanyIdPaySchedulesPayScheduleIdResponseFromJSON( jsonString: string, ): SafeParseResult< GetV1CompaniesCompanyIdPaySchedulesPayScheduleIdResponse, SDKValidationError > { return safeParse( jsonString, (x) => GetV1CompaniesCompanyIdPaySchedulesPayScheduleIdResponse$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'GetV1CompaniesCompanyIdPaySchedulesPayScheduleIdResponse' from JSON`, ); }