/* * 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 { CompanyBankAccount, CompanyBankAccount$inboundSchema, } from "../components/companybankaccount.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 GetV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion = { 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 GetV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion = ClosedEnum; export type GetV1CompaniesCompanyIdBankAccountsRequest = { /** * 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?: | GetV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion | undefined; /** * The UUID of the company */ companyId: string; }; export type GetV1CompaniesCompanyIdBankAccountsResponse = { httpMeta: HTTPMetadata; /** * successful */ companyBankAccounts?: Array | undefined; }; /** @internal */ export const GetV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion$outboundSchema: z.ZodNativeEnum< typeof GetV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion > = z.nativeEnum(GetV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion); /** @internal */ export type GetV1CompaniesCompanyIdBankAccountsRequest$Outbound = { "X-Gusto-API-Version": string; company_id: string; }; /** @internal */ export const GetV1CompaniesCompanyIdBankAccountsRequest$outboundSchema: z.ZodType< GetV1CompaniesCompanyIdBankAccountsRequest$Outbound, z.ZodTypeDef, GetV1CompaniesCompanyIdBankAccountsRequest > = z.object({ xGustoAPIVersion: GetV1CompaniesCompanyIdBankAccountsHeaderXGustoAPIVersion$outboundSchema .default("2025-06-15"), companyId: z.string(), }).transform((v) => { return remap$(v, { xGustoAPIVersion: "X-Gusto-API-Version", companyId: "company_id", }); }); export function getV1CompaniesCompanyIdBankAccountsRequestToJSON( getV1CompaniesCompanyIdBankAccountsRequest: GetV1CompaniesCompanyIdBankAccountsRequest, ): string { return JSON.stringify( GetV1CompaniesCompanyIdBankAccountsRequest$outboundSchema.parse( getV1CompaniesCompanyIdBankAccountsRequest, ), ); } /** @internal */ export const GetV1CompaniesCompanyIdBankAccountsResponse$inboundSchema: z.ZodType< GetV1CompaniesCompanyIdBankAccountsResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: HTTPMetadata$inboundSchema, "Company-Bank-Accounts": z.array(CompanyBankAccount$inboundSchema) .optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "Company-Bank-Accounts": "companyBankAccounts", }); }); export function getV1CompaniesCompanyIdBankAccountsResponseFromJSON( jsonString: string, ): SafeParseResult< GetV1CompaniesCompanyIdBankAccountsResponse, SDKValidationError > { return safeParse( jsonString, (x) => GetV1CompaniesCompanyIdBankAccountsResponse$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'GetV1CompaniesCompanyIdBankAccountsResponse' from JSON`, ); }