/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; export type Documents = { /** * The document type. Use the document options endpoint to get the possible values. */ documentType: string; /** * The document title associated with the document type */ documentTitle: string; /** * The document's document number */ documentNumber?: string | undefined; /** * The document's expiration date */ expirationDate?: string | undefined; /** * The document's issuing authority */ issuingAuthority: string; }; /** * Request body for creating an employee's I-9 authorization verification documents. */ export type I9AuthorizationDocumentsRequestBody = { /** * An array of I-9 verification documents. Every request must contain the complete list of documents for the employee, as previous records are replaced. */ documents: Array; }; /** @internal */ export type Documents$Outbound = { document_type: string; document_title: string; document_number?: string | undefined; expiration_date?: string | undefined; issuing_authority: string; }; /** @internal */ export const Documents$outboundSchema: z.ZodType< Documents$Outbound, z.ZodTypeDef, Documents > = z.object({ documentType: z.string(), documentTitle: z.string(), documentNumber: z.string().optional(), expirationDate: z.string().optional(), issuingAuthority: z.string(), }).transform((v) => { return remap$(v, { documentType: "document_type", documentTitle: "document_title", documentNumber: "document_number", expirationDate: "expiration_date", issuingAuthority: "issuing_authority", }); }); export function documentsToJSON(documents: Documents): string { return JSON.stringify(Documents$outboundSchema.parse(documents)); } /** @internal */ export type I9AuthorizationDocumentsRequestBody$Outbound = { documents: Array; }; /** @internal */ export const I9AuthorizationDocumentsRequestBody$outboundSchema: z.ZodType< I9AuthorizationDocumentsRequestBody$Outbound, z.ZodTypeDef, I9AuthorizationDocumentsRequestBody > = z.object({ documents: z.array(z.lazy(() => Documents$outboundSchema)), }); export function i9AuthorizationDocumentsRequestBodyToJSON( i9AuthorizationDocumentsRequestBody: I9AuthorizationDocumentsRequestBody, ): string { return JSON.stringify( I9AuthorizationDocumentsRequestBody$outboundSchema.parse( i9AuthorizationDocumentsRequestBody, ), ); }