/* * 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 { EmployeePaymentDetailsList, EmployeePaymentDetailsList$inboundSchema, } from "../components/employeepaymentdetailslist.js"; import { HTTPMetadata, HTTPMetadata$inboundSchema, } from "../components/httpmetadata.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 GetV1CompaniesCompanyIdEmployeesPaymentDetailsHeaderXGustoAPIVersion = { 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 GetV1CompaniesCompanyIdEmployeesPaymentDetailsHeaderXGustoAPIVersion = ClosedEnum< typeof GetV1CompaniesCompanyIdEmployeesPaymentDetailsHeaderXGustoAPIVersion >; export type GetV1CompaniesCompanyIdEmployeesPaymentDetailsRequest = { /** * 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?: | GetV1CompaniesCompanyIdEmployeesPaymentDetailsHeaderXGustoAPIVersion | undefined; /** * The UUID of the company */ companyId: string; /** * The UUID of a specific employee to fetch payment details for. */ employeeUuid?: string | undefined; /** * The UUID of a specific payroll to fetch payment details for employees on that payroll. */ payrollUuid?: string | undefined; /** * The page that is requested. When unspecified, will load all objects unless endpoint forces pagination. */ page?: number | undefined; /** * Number of objects per page. For majority of endpoints will default to 25 */ per?: number | undefined; }; export type GetV1CompaniesCompanyIdEmployeesPaymentDetailsResponse = { httpMeta: HTTPMetadata; /** * A list of employee payment details. */ employeePaymentDetailsList?: Array | undefined; }; /** @internal */ export const GetV1CompaniesCompanyIdEmployeesPaymentDetailsHeaderXGustoAPIVersion$outboundSchema: z.ZodNativeEnum< typeof GetV1CompaniesCompanyIdEmployeesPaymentDetailsHeaderXGustoAPIVersion > = z.nativeEnum( GetV1CompaniesCompanyIdEmployeesPaymentDetailsHeaderXGustoAPIVersion, ); /** @internal */ export type GetV1CompaniesCompanyIdEmployeesPaymentDetailsRequest$Outbound = { "X-Gusto-API-Version": string; company_id: string; employee_uuid?: string | undefined; payroll_uuid?: string | undefined; page?: number | undefined; per?: number | undefined; }; /** @internal */ export const GetV1CompaniesCompanyIdEmployeesPaymentDetailsRequest$outboundSchema: z.ZodType< GetV1CompaniesCompanyIdEmployeesPaymentDetailsRequest$Outbound, z.ZodTypeDef, GetV1CompaniesCompanyIdEmployeesPaymentDetailsRequest > = z.object({ xGustoAPIVersion: GetV1CompaniesCompanyIdEmployeesPaymentDetailsHeaderXGustoAPIVersion$outboundSchema .default("2025-06-15"), companyId: z.string(), employeeUuid: z.string().optional(), payrollUuid: z.string().optional(), page: z.number().int().optional(), per: z.number().int().optional(), }).transform((v) => { return remap$(v, { xGustoAPIVersion: "X-Gusto-API-Version", companyId: "company_id", employeeUuid: "employee_uuid", payrollUuid: "payroll_uuid", }); }); export function getV1CompaniesCompanyIdEmployeesPaymentDetailsRequestToJSON( getV1CompaniesCompanyIdEmployeesPaymentDetailsRequest: GetV1CompaniesCompanyIdEmployeesPaymentDetailsRequest, ): string { return JSON.stringify( GetV1CompaniesCompanyIdEmployeesPaymentDetailsRequest$outboundSchema.parse( getV1CompaniesCompanyIdEmployeesPaymentDetailsRequest, ), ); } /** @internal */ export const GetV1CompaniesCompanyIdEmployeesPaymentDetailsResponse$inboundSchema: z.ZodType< GetV1CompaniesCompanyIdEmployeesPaymentDetailsResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: HTTPMetadata$inboundSchema, "Employee-Payment-Details-List": z.array( EmployeePaymentDetailsList$inboundSchema, ).optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "Employee-Payment-Details-List": "employeePaymentDetailsList", }); }); export function getV1CompaniesCompanyIdEmployeesPaymentDetailsResponseFromJSON( jsonString: string, ): SafeParseResult< GetV1CompaniesCompanyIdEmployeesPaymentDetailsResponse, SDKValidationError > { return safeParse( jsonString, (x) => GetV1CompaniesCompanyIdEmployeesPaymentDetailsResponse$inboundSchema .parse(JSON.parse(x)), `Failed to parse 'GetV1CompaniesCompanyIdEmployeesPaymentDetailsResponse' from JSON`, ); }