/* * 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 { RFCDate } from "../../types/rfcdate.js"; import { HTTPMetadata, HTTPMetadata$inboundSchema, } from "../components/httpmetadata.js"; import { PeopleBatch, PeopleBatch$inboundSchema, } from "../components/peoplebatch.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 PostV1CompaniesCompanyIdPeopleBatchesHeaderXGustoAPIVersion = { 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 PostV1CompaniesCompanyIdPeopleBatchesHeaderXGustoAPIVersion = ClosedEnum< typeof PostV1CompaniesCompanyIdPeopleBatchesHeaderXGustoAPIVersion >; /** * The action to perform on the batch */ export const PostV1CompaniesCompanyIdPeopleBatchesBatchAction = { Create: "create", } as const; /** * The action to perform on the batch */ export type PostV1CompaniesCompanyIdPeopleBatchesBatchAction = ClosedEnum< typeof PostV1CompaniesCompanyIdPeopleBatchesBatchAction >; /** * The type of entity to create */ export const PostV1CompaniesCompanyIdPeopleBatchesEntityType = { Employee: "employee", } as const; /** * The type of entity to create */ export type PostV1CompaniesCompanyIdPeopleBatchesEntityType = ClosedEnum< typeof PostV1CompaniesCompanyIdPeopleBatchesEntityType >; export type Person = { /** * External identifier for the person */ externalId: string; /** * Legal first name */ firstName: string; /** * Legal last name */ lastName: string; /** * Middle initial */ middleInitial?: string | null | undefined; /** * Preferred first name */ preferredFirstName?: string | null | undefined; /** * Personal email address */ email?: string | null | undefined; /** * Work email address */ workEmail?: string | null | undefined; /** * Social Security Number (format: xxx-xx-xxxx) */ ssn?: string | null | undefined; /** * Date of birth (YYYY-MM-DD) */ dateOfBirth?: RFCDate | null | undefined; /** * Whether the employee will complete their own onboarding */ selfOnboarding?: boolean | null | undefined; }; /** * Home address for the employee */ export type PostV1CompaniesCompanyIdPeopleBatchesHomeAddress = { /** * Street address line 1 */ street1: string; /** * Street address line 2 */ street2?: string | undefined; /** * City */ city: string; /** * State abbreviation */ state: string; /** * ZIP code */ zip: string; /** * Country (defaults to USA) */ country?: string | undefined; /** * If true, a company work address will be created based on this home address and the `work_address` property is not allowed. */ workFromHome?: boolean | undefined; }; /** * Specify the company work location for the employee */ export type PostV1CompaniesCompanyIdPeopleBatchesWorkAddress = { /** * UUID of an existing company work location */ locationUuid: string; }; /** * Job details for the employee (required if compensation is provided) */ export type PostV1CompaniesCompanyIdPeopleBatchesJob = { /** * Job title */ title: string; /** * The date when the employee was hired or rehired for the job. */ hireDate: RFCDate; /** * Whether the employee owns at least 2% of the company. Can only be `true` for S-Corp companies. */ twoPercentShareholder?: boolean | undefined; /** * Whether this job is eligible for workers' compensation coverage in the state of Washington (WA). */ stateWcCovered?: boolean | null | undefined; /** * The risk class code for workers' compensation in Washington state. Please visit [Washington state's Risk Class page](https://www.lni.wa.gov/insurance/rates-risk-classes/risk-classes-for-workers-compensation/risk-class-lookup#/) to learn more. */ stateWcClassCode?: string | null | undefined; }; /** * Department details for the employee */ export type Department = { /** * UUID of an existing company department */ departmentUuid: string; }; /** * The unit accompanying the compensation rate. If the employee is an owner, rate should be `Paycheck`. */ export const PaymentUnit = { Hour: "Hour", Week: "Week", Month: "Month", Year: "Year", Paycheck: "Paycheck", } as const; /** * The unit accompanying the compensation rate. If the employee is an owner, rate should be `Paycheck`. */ export type PaymentUnit = ClosedEnum; /** * The FLSA status for this compensation. Salaried ('Exempt') employees are paid a fixed salary every pay period. Salaried with overtime ('Salaried Nonexempt') employees are paid a fixed salary every pay period, and receive overtime pay when applicable. Hourly ( 'Nonexempt') employees are paid for the hours they work, and receive overtime pay when applicable. Commissioned employees ('Commission Only Exempt') earn wages based only on commission. Commissioned with overtime ('Commission Only Nonexempt') earn wages based on commission, and receive overtime pay when applicable. Owners ('Owner') are employees that own at least twenty percent of the company. If selecting `Owner`, `payment_unit` must be `"Paycheck"`. */ export const FlsaStatus = { Exempt: "Exempt", SalariedNonexempt: "Salaried Nonexempt", Nonexempt: "Nonexempt", Owner: "Owner", CommissionOnlyExempt: "Commission Only Exempt", CommissionOnlyNonexempt: "Commission Only Nonexempt", } as const; /** * The FLSA status for this compensation. Salaried ('Exempt') employees are paid a fixed salary every pay period. Salaried with overtime ('Salaried Nonexempt') employees are paid a fixed salary every pay period, and receive overtime pay when applicable. Hourly ( 'Nonexempt') employees are paid for the hours they work, and receive overtime pay when applicable. Commissioned employees ('Commission Only Exempt') earn wages based only on commission. Commissioned with overtime ('Commission Only Nonexempt') earn wages based on commission, and receive overtime pay when applicable. Owners ('Owner') are employees that own at least twenty percent of the company. If selecting `Owner`, `payment_unit` must be `"Paycheck"`. */ export type FlsaStatus = ClosedEnum; /** * Compensation details for the employee (requires job to be provided) */ export type Compensation = { /** * The dollar amount paid per payment unit. */ rate: string; /** * The unit accompanying the compensation rate. If the employee is an owner, rate should be `Paycheck`. */ paymentUnit: PaymentUnit; /** * The FLSA status for this compensation. Salaried ('Exempt') employees are paid a fixed salary every pay period. Salaried with overtime ('Salaried Nonexempt') employees are paid a fixed salary every pay period, and receive overtime pay when applicable. Hourly ( 'Nonexempt') employees are paid for the hours they work, and receive overtime pay when applicable. Commissioned employees ('Commission Only Exempt') earn wages based only on commission. Commissioned with overtime ('Commission Only Nonexempt') earn wages based on commission, and receive overtime pay when applicable. Owners ('Owner') are employees that own at least twenty percent of the company. If selecting `Owner`, `payment_unit` must be `"Paycheck"`. */ flsaStatus: FlsaStatus; }; /** * Type of bank account */ export const AccountType = { Checking: "Checking", Savings: "Savings", } as const; /** * Type of bank account */ export type AccountType = ClosedEnum; /** * Payment type (must be Direct Deposit) */ export const PostV1CompaniesCompanyIdPeopleBatchesType = { DirectDeposit: "Direct Deposit", } as const; /** * Payment type (must be Direct Deposit) */ export type PostV1CompaniesCompanyIdPeopleBatchesType = ClosedEnum< typeof PostV1CompaniesCompanyIdPeopleBatchesType >; /** * How to split deposits, must be the same for all bank accounts. If split_by is `Percentage`, then the split_amounts must add up to exactly 100. */ export const PostV1CompaniesCompanyIdPeopleBatchesSplitBy = { Amount: "Amount", Percentage: "Percentage", } as const; /** * How to split deposits, must be the same for all bank accounts. If split_by is `Percentage`, then the split_amounts must add up to exactly 100. */ export type PostV1CompaniesCompanyIdPeopleBatchesSplitBy = ClosedEnum< typeof PostV1CompaniesCompanyIdPeopleBatchesSplitBy >; export type BankAccounts = { /** * Account nickname */ name?: string | null | undefined; /** * Type of bank account */ accountType: AccountType; /** * Bank routing number */ routingNumber: string; /** * Bank account number */ accountNumber: string; /** * Payment type (must be Direct Deposit) */ type: PostV1CompaniesCompanyIdPeopleBatchesType; /** * How to split deposits, must be the same for all bank accounts. If split_by is `Percentage`, then the split_amounts must add up to exactly 100. */ splitBy: PostV1CompaniesCompanyIdPeopleBatchesSplitBy; /** * Split amount in percentage or CENTS (`null` for remainder account) */ splitAmount?: string | null | undefined; }; export type PostV1CompaniesCompanyIdPeopleBatchesBatch = { /** * The type of entity to create */ entityType: PostV1CompaniesCompanyIdPeopleBatchesEntityType; person: Person; /** * Home address for the employee */ homeAddress?: PostV1CompaniesCompanyIdPeopleBatchesHomeAddress | undefined; /** * Specify the company work location for the employee */ workAddress?: PostV1CompaniesCompanyIdPeopleBatchesWorkAddress | undefined; /** * Job details for the employee (required if compensation is provided) */ job?: PostV1CompaniesCompanyIdPeopleBatchesJob | undefined; /** * Department details for the employee */ department?: Department | undefined; /** * Compensation details for the employee (requires job to be provided) */ compensation?: Compensation | undefined; /** * Creates employee bank account(s) and payment method(s) for direct deposit. Payments can be split across accounts by Percentage or by Amount. If splitting payments by `Percentage`, all splits must have a `split_amount` and the percentages must add up to `100`. * * @remarks * If splitting payments by `Amount`, the priority is set based on the order of the bank accounts in the array and the last bank account is the remainder account (should have `split_amount` set to `null`). */ bankAccounts?: Array | undefined; }; export type PostV1CompaniesCompanyIdPeopleBatchesRequestBody = { /** * A unique identifier to ensure idempotency of the batch request */ idempotencyKey: string; /** * The action to perform on the batch */ batchAction: PostV1CompaniesCompanyIdPeopleBatchesBatchAction; /** * Array of people to create */ batch: Array; }; export type PostV1CompaniesCompanyIdPeopleBatchesRequest = { /** * 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?: | PostV1CompaniesCompanyIdPeopleBatchesHeaderXGustoAPIVersion | undefined; /** * The UUID of the company */ companyId: string; requestBody: PostV1CompaniesCompanyIdPeopleBatchesRequestBody; }; export type PostV1CompaniesCompanyIdPeopleBatchesResponse = { httpMeta: HTTPMetadata; /** * created */ peopleBatch?: PeopleBatch | undefined; }; /** @internal */ export const PostV1CompaniesCompanyIdPeopleBatchesHeaderXGustoAPIVersion$outboundSchema: z.ZodNativeEnum< typeof PostV1CompaniesCompanyIdPeopleBatchesHeaderXGustoAPIVersion > = z.nativeEnum(PostV1CompaniesCompanyIdPeopleBatchesHeaderXGustoAPIVersion); /** @internal */ export const PostV1CompaniesCompanyIdPeopleBatchesBatchAction$outboundSchema: z.ZodNativeEnum = z .nativeEnum(PostV1CompaniesCompanyIdPeopleBatchesBatchAction); /** @internal */ export const PostV1CompaniesCompanyIdPeopleBatchesEntityType$outboundSchema: z.ZodNativeEnum = z .nativeEnum(PostV1CompaniesCompanyIdPeopleBatchesEntityType); /** @internal */ export type Person$Outbound = { external_id: string; first_name: string; last_name: string; middle_initial?: string | null | undefined; preferred_first_name?: string | null | undefined; email?: string | null | undefined; work_email?: string | null | undefined; ssn?: string | null | undefined; date_of_birth?: string | null | undefined; self_onboarding?: boolean | null | undefined; }; /** @internal */ export const Person$outboundSchema: z.ZodType< Person$Outbound, z.ZodTypeDef, Person > = z.object({ externalId: z.string(), firstName: z.string(), lastName: z.string(), middleInitial: z.nullable(z.string()).optional(), preferredFirstName: z.nullable(z.string()).optional(), email: z.nullable(z.string()).optional(), workEmail: z.nullable(z.string()).optional(), ssn: z.nullable(z.string()).optional(), dateOfBirth: z.nullable(z.instanceof(RFCDate).transform(v => v.toString())) .optional(), selfOnboarding: z.nullable(z.boolean()).optional(), }).transform((v) => { return remap$(v, { externalId: "external_id", firstName: "first_name", lastName: "last_name", middleInitial: "middle_initial", preferredFirstName: "preferred_first_name", workEmail: "work_email", dateOfBirth: "date_of_birth", selfOnboarding: "self_onboarding", }); }); export function personToJSON(person: Person): string { return JSON.stringify(Person$outboundSchema.parse(person)); } /** @internal */ export type PostV1CompaniesCompanyIdPeopleBatchesHomeAddress$Outbound = { street_1: string; street_2?: string | undefined; city: string; state: string; zip: string; country?: string | undefined; work_from_home?: boolean | undefined; }; /** @internal */ export const PostV1CompaniesCompanyIdPeopleBatchesHomeAddress$outboundSchema: z.ZodType< PostV1CompaniesCompanyIdPeopleBatchesHomeAddress$Outbound, z.ZodTypeDef, PostV1CompaniesCompanyIdPeopleBatchesHomeAddress > = z.object({ street1: z.string(), street2: z.string().optional(), city: z.string(), state: z.string(), zip: z.string(), country: z.string().optional(), workFromHome: z.boolean().optional(), }).transform((v) => { return remap$(v, { street1: "street_1", street2: "street_2", workFromHome: "work_from_home", }); }); export function postV1CompaniesCompanyIdPeopleBatchesHomeAddressToJSON( postV1CompaniesCompanyIdPeopleBatchesHomeAddress: PostV1CompaniesCompanyIdPeopleBatchesHomeAddress, ): string { return JSON.stringify( PostV1CompaniesCompanyIdPeopleBatchesHomeAddress$outboundSchema.parse( postV1CompaniesCompanyIdPeopleBatchesHomeAddress, ), ); } /** @internal */ export type PostV1CompaniesCompanyIdPeopleBatchesWorkAddress$Outbound = { location_uuid: string; }; /** @internal */ export const PostV1CompaniesCompanyIdPeopleBatchesWorkAddress$outboundSchema: z.ZodType< PostV1CompaniesCompanyIdPeopleBatchesWorkAddress$Outbound, z.ZodTypeDef, PostV1CompaniesCompanyIdPeopleBatchesWorkAddress > = z.object({ locationUuid: z.string(), }).transform((v) => { return remap$(v, { locationUuid: "location_uuid", }); }); export function postV1CompaniesCompanyIdPeopleBatchesWorkAddressToJSON( postV1CompaniesCompanyIdPeopleBatchesWorkAddress: PostV1CompaniesCompanyIdPeopleBatchesWorkAddress, ): string { return JSON.stringify( PostV1CompaniesCompanyIdPeopleBatchesWorkAddress$outboundSchema.parse( postV1CompaniesCompanyIdPeopleBatchesWorkAddress, ), ); } /** @internal */ export type PostV1CompaniesCompanyIdPeopleBatchesJob$Outbound = { title: string; hire_date: string; two_percent_shareholder?: boolean | undefined; state_wc_covered?: boolean | null | undefined; state_wc_class_code?: string | null | undefined; }; /** @internal */ export const PostV1CompaniesCompanyIdPeopleBatchesJob$outboundSchema: z.ZodType< PostV1CompaniesCompanyIdPeopleBatchesJob$Outbound, z.ZodTypeDef, PostV1CompaniesCompanyIdPeopleBatchesJob > = z.object({ title: z.string(), hireDate: z.instanceof(RFCDate).transform(v => v.toString()), twoPercentShareholder: z.boolean().optional(), stateWcCovered: z.nullable(z.boolean()).optional(), stateWcClassCode: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { hireDate: "hire_date", twoPercentShareholder: "two_percent_shareholder", stateWcCovered: "state_wc_covered", stateWcClassCode: "state_wc_class_code", }); }); export function postV1CompaniesCompanyIdPeopleBatchesJobToJSON( postV1CompaniesCompanyIdPeopleBatchesJob: PostV1CompaniesCompanyIdPeopleBatchesJob, ): string { return JSON.stringify( PostV1CompaniesCompanyIdPeopleBatchesJob$outboundSchema.parse( postV1CompaniesCompanyIdPeopleBatchesJob, ), ); } /** @internal */ export type Department$Outbound = { department_uuid: string; }; /** @internal */ export const Department$outboundSchema: z.ZodType< Department$Outbound, z.ZodTypeDef, Department > = z.object({ departmentUuid: z.string(), }).transform((v) => { return remap$(v, { departmentUuid: "department_uuid", }); }); export function departmentToJSON(department: Department): string { return JSON.stringify(Department$outboundSchema.parse(department)); } /** @internal */ export const PaymentUnit$outboundSchema: z.ZodNativeEnum = z .nativeEnum(PaymentUnit); /** @internal */ export const FlsaStatus$outboundSchema: z.ZodNativeEnum = z .nativeEnum(FlsaStatus); /** @internal */ export type Compensation$Outbound = { rate: string; payment_unit: string; flsa_status: string; }; /** @internal */ export const Compensation$outboundSchema: z.ZodType< Compensation$Outbound, z.ZodTypeDef, Compensation > = z.object({ rate: z.string(), paymentUnit: PaymentUnit$outboundSchema, flsaStatus: FlsaStatus$outboundSchema, }).transform((v) => { return remap$(v, { paymentUnit: "payment_unit", flsaStatus: "flsa_status", }); }); export function compensationToJSON(compensation: Compensation): string { return JSON.stringify(Compensation$outboundSchema.parse(compensation)); } /** @internal */ export const AccountType$outboundSchema: z.ZodNativeEnum = z .nativeEnum(AccountType); /** @internal */ export const PostV1CompaniesCompanyIdPeopleBatchesType$outboundSchema: z.ZodNativeEnum = z .nativeEnum(PostV1CompaniesCompanyIdPeopleBatchesType); /** @internal */ export const PostV1CompaniesCompanyIdPeopleBatchesSplitBy$outboundSchema: z.ZodNativeEnum = z .nativeEnum(PostV1CompaniesCompanyIdPeopleBatchesSplitBy); /** @internal */ export type BankAccounts$Outbound = { name?: string | null | undefined; account_type: string; routing_number: string; account_number: string; type: string; split_by: string; split_amount?: string | null | undefined; }; /** @internal */ export const BankAccounts$outboundSchema: z.ZodType< BankAccounts$Outbound, z.ZodTypeDef, BankAccounts > = z.object({ name: z.nullable(z.string()).optional(), accountType: AccountType$outboundSchema, routingNumber: z.string(), accountNumber: z.string(), type: PostV1CompaniesCompanyIdPeopleBatchesType$outboundSchema, splitBy: PostV1CompaniesCompanyIdPeopleBatchesSplitBy$outboundSchema, splitAmount: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { accountType: "account_type", routingNumber: "routing_number", accountNumber: "account_number", splitBy: "split_by", splitAmount: "split_amount", }); }); export function bankAccountsToJSON(bankAccounts: BankAccounts): string { return JSON.stringify(BankAccounts$outboundSchema.parse(bankAccounts)); } /** @internal */ export type PostV1CompaniesCompanyIdPeopleBatchesBatch$Outbound = { entity_type: string; person: Person$Outbound; home_address?: | PostV1CompaniesCompanyIdPeopleBatchesHomeAddress$Outbound | undefined; work_address?: | PostV1CompaniesCompanyIdPeopleBatchesWorkAddress$Outbound | undefined; job?: PostV1CompaniesCompanyIdPeopleBatchesJob$Outbound | undefined; department?: Department$Outbound | undefined; compensation?: Compensation$Outbound | undefined; bank_accounts?: Array | undefined; }; /** @internal */ export const PostV1CompaniesCompanyIdPeopleBatchesBatch$outboundSchema: z.ZodType< PostV1CompaniesCompanyIdPeopleBatchesBatch$Outbound, z.ZodTypeDef, PostV1CompaniesCompanyIdPeopleBatchesBatch > = z.object({ entityType: PostV1CompaniesCompanyIdPeopleBatchesEntityType$outboundSchema, person: z.lazy(() => Person$outboundSchema), homeAddress: z.lazy(() => PostV1CompaniesCompanyIdPeopleBatchesHomeAddress$outboundSchema ).optional(), workAddress: z.lazy(() => PostV1CompaniesCompanyIdPeopleBatchesWorkAddress$outboundSchema ).optional(), job: z.lazy(() => PostV1CompaniesCompanyIdPeopleBatchesJob$outboundSchema) .optional(), department: z.lazy(() => Department$outboundSchema).optional(), compensation: z.lazy(() => Compensation$outboundSchema).optional(), bankAccounts: z.array(z.lazy(() => BankAccounts$outboundSchema)).optional(), }).transform((v) => { return remap$(v, { entityType: "entity_type", homeAddress: "home_address", workAddress: "work_address", bankAccounts: "bank_accounts", }); }); export function postV1CompaniesCompanyIdPeopleBatchesBatchToJSON( postV1CompaniesCompanyIdPeopleBatchesBatch: PostV1CompaniesCompanyIdPeopleBatchesBatch, ): string { return JSON.stringify( PostV1CompaniesCompanyIdPeopleBatchesBatch$outboundSchema.parse( postV1CompaniesCompanyIdPeopleBatchesBatch, ), ); } /** @internal */ export type PostV1CompaniesCompanyIdPeopleBatchesRequestBody$Outbound = { idempotency_key: string; batch_action: string; batch: Array; }; /** @internal */ export const PostV1CompaniesCompanyIdPeopleBatchesRequestBody$outboundSchema: z.ZodType< PostV1CompaniesCompanyIdPeopleBatchesRequestBody$Outbound, z.ZodTypeDef, PostV1CompaniesCompanyIdPeopleBatchesRequestBody > = z.object({ idempotencyKey: z.string(), batchAction: PostV1CompaniesCompanyIdPeopleBatchesBatchAction$outboundSchema, batch: z.array( z.lazy(() => PostV1CompaniesCompanyIdPeopleBatchesBatch$outboundSchema), ), }).transform((v) => { return remap$(v, { idempotencyKey: "idempotency_key", batchAction: "batch_action", }); }); export function postV1CompaniesCompanyIdPeopleBatchesRequestBodyToJSON( postV1CompaniesCompanyIdPeopleBatchesRequestBody: PostV1CompaniesCompanyIdPeopleBatchesRequestBody, ): string { return JSON.stringify( PostV1CompaniesCompanyIdPeopleBatchesRequestBody$outboundSchema.parse( postV1CompaniesCompanyIdPeopleBatchesRequestBody, ), ); } /** @internal */ export type PostV1CompaniesCompanyIdPeopleBatchesRequest$Outbound = { "X-Gusto-API-Version": string; company_id: string; RequestBody: PostV1CompaniesCompanyIdPeopleBatchesRequestBody$Outbound; }; /** @internal */ export const PostV1CompaniesCompanyIdPeopleBatchesRequest$outboundSchema: z.ZodType< PostV1CompaniesCompanyIdPeopleBatchesRequest$Outbound, z.ZodTypeDef, PostV1CompaniesCompanyIdPeopleBatchesRequest > = z.object({ xGustoAPIVersion: PostV1CompaniesCompanyIdPeopleBatchesHeaderXGustoAPIVersion$outboundSchema .default("2025-06-15"), companyId: z.string(), requestBody: z.lazy(() => PostV1CompaniesCompanyIdPeopleBatchesRequestBody$outboundSchema ), }).transform((v) => { return remap$(v, { xGustoAPIVersion: "X-Gusto-API-Version", companyId: "company_id", requestBody: "RequestBody", }); }); export function postV1CompaniesCompanyIdPeopleBatchesRequestToJSON( postV1CompaniesCompanyIdPeopleBatchesRequest: PostV1CompaniesCompanyIdPeopleBatchesRequest, ): string { return JSON.stringify( PostV1CompaniesCompanyIdPeopleBatchesRequest$outboundSchema.parse( postV1CompaniesCompanyIdPeopleBatchesRequest, ), ); } /** @internal */ export const PostV1CompaniesCompanyIdPeopleBatchesResponse$inboundSchema: z.ZodType< PostV1CompaniesCompanyIdPeopleBatchesResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: HTTPMetadata$inboundSchema, "People-Batch": PeopleBatch$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "People-Batch": "peopleBatch", }); }); export function postV1CompaniesCompanyIdPeopleBatchesResponseFromJSON( jsonString: string, ): SafeParseResult< PostV1CompaniesCompanyIdPeopleBatchesResponse, SDKValidationError > { return safeParse( jsonString, (x) => PostV1CompaniesCompanyIdPeopleBatchesResponse$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'PostV1CompaniesCompanyIdPeopleBatchesResponse' from JSON`, ); }