/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; /** * Request body for creating a company location (company address). */ export type CompanyLocationRequest = { /** * Street address line 1. */ street1: string; /** * Street address line 2. */ street2?: string | null | undefined; /** * City. */ city: string; /** * State code (e.g. CA). Must be a valid two-letter state code. */ state: string; /** * ZIP code. Must be a valid US zip (e.g. 12345 or 12345-6789). */ zip: string; /** * Country code. Defaults to USA. */ country?: string | undefined; /** * Phone number. Must be 10 digits. */ phoneNumber: string; /** * Specify if this location is the company's mailing address. */ mailingAddress?: boolean | undefined; /** * Specify if this location is the company's filing address. */ filingAddress?: boolean | undefined; }; /** @internal */ export type CompanyLocationRequest$Outbound = { street_1: string; street_2?: string | null | undefined; city: string; state: string; zip: string; country: string; phone_number: string; mailing_address?: boolean | undefined; filing_address?: boolean | undefined; }; /** @internal */ export const CompanyLocationRequest$outboundSchema: z.ZodType< CompanyLocationRequest$Outbound, z.ZodTypeDef, CompanyLocationRequest > = z.object({ street1: z.string(), street2: z.nullable(z.string()).optional(), city: z.string(), state: z.string(), zip: z.string(), country: z.string().default("USA"), phoneNumber: z.string(), mailingAddress: z.boolean().optional(), filingAddress: z.boolean().optional(), }).transform((v) => { return remap$(v, { street1: "street_1", street2: "street_2", phoneNumber: "phone_number", mailingAddress: "mailing_address", filingAddress: "filing_address", }); }); export function companyLocationRequestToJSON( companyLocationRequest: CompanyLocationRequest, ): string { return JSON.stringify( CompanyLocationRequest$outboundSchema.parse(companyLocationRequest), ); }