/* * 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 { EmployeeBankAccount, EmployeeBankAccount$inboundSchema, } from "../components/employeebankaccount.js"; import { EmployeeBankAccountRequest, EmployeeBankAccountRequest$Outbound, EmployeeBankAccountRequest$outboundSchema, } from "../components/employeebankaccountrequest.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 PutV1EmployeesEmployeeIdBankAccountsHeaderXGustoAPIVersion = { 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 PutV1EmployeesEmployeeIdBankAccountsHeaderXGustoAPIVersion = ClosedEnum; export type PutV1EmployeesEmployeeIdBankAccountsRequest = { /** * 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?: | PutV1EmployeesEmployeeIdBankAccountsHeaderXGustoAPIVersion | undefined; /** * The UUID of the employee */ employeeId: string; /** * The UUID of the bank account */ bankAccountUuid: string; employeeBankAccountRequest: EmployeeBankAccountRequest; }; export type PutV1EmployeesEmployeeIdBankAccountsResponse = { httpMeta: HTTPMetadata; /** * Success */ employeeBankAccount?: EmployeeBankAccount | undefined; }; /** @internal */ export const PutV1EmployeesEmployeeIdBankAccountsHeaderXGustoAPIVersion$outboundSchema: z.ZodNativeEnum< typeof PutV1EmployeesEmployeeIdBankAccountsHeaderXGustoAPIVersion > = z.nativeEnum(PutV1EmployeesEmployeeIdBankAccountsHeaderXGustoAPIVersion); /** @internal */ export type PutV1EmployeesEmployeeIdBankAccountsRequest$Outbound = { "X-Gusto-API-Version": string; employee_id: string; bank_account_uuid: string; "Employee-Bank-Account-Request": EmployeeBankAccountRequest$Outbound; }; /** @internal */ export const PutV1EmployeesEmployeeIdBankAccountsRequest$outboundSchema: z.ZodType< PutV1EmployeesEmployeeIdBankAccountsRequest$Outbound, z.ZodTypeDef, PutV1EmployeesEmployeeIdBankAccountsRequest > = z.object({ xGustoAPIVersion: PutV1EmployeesEmployeeIdBankAccountsHeaderXGustoAPIVersion$outboundSchema .default("2025-06-15"), employeeId: z.string(), bankAccountUuid: z.string(), employeeBankAccountRequest: EmployeeBankAccountRequest$outboundSchema, }).transform((v) => { return remap$(v, { xGustoAPIVersion: "X-Gusto-API-Version", employeeId: "employee_id", bankAccountUuid: "bank_account_uuid", employeeBankAccountRequest: "Employee-Bank-Account-Request", }); }); export function putV1EmployeesEmployeeIdBankAccountsRequestToJSON( putV1EmployeesEmployeeIdBankAccountsRequest: PutV1EmployeesEmployeeIdBankAccountsRequest, ): string { return JSON.stringify( PutV1EmployeesEmployeeIdBankAccountsRequest$outboundSchema.parse( putV1EmployeesEmployeeIdBankAccountsRequest, ), ); } /** @internal */ export const PutV1EmployeesEmployeeIdBankAccountsResponse$inboundSchema: z.ZodType< PutV1EmployeesEmployeeIdBankAccountsResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: HTTPMetadata$inboundSchema, "Employee-Bank-Account": EmployeeBankAccount$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "Employee-Bank-Account": "employeeBankAccount", }); }); export function putV1EmployeesEmployeeIdBankAccountsResponseFromJSON( jsonString: string, ): SafeParseResult< PutV1EmployeesEmployeeIdBankAccountsResponse, SDKValidationError > { return safeParse( jsonString, (x) => PutV1EmployeesEmployeeIdBankAccountsResponse$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PutV1EmployeesEmployeeIdBankAccountsResponse' from JSON`, ); }