/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type AccountingLocationsFilter = { /** * Id of the subsidiary to search for */ subsidiary?: string | undefined; }; /** @internal */ export const AccountingLocationsFilter$inboundSchema: z.ZodType< AccountingLocationsFilter, z.ZodTypeDef, unknown > = z.object({ subsidiary: z.string().optional(), }); /** @internal */ export type AccountingLocationsFilter$Outbound = { subsidiary?: string | undefined; }; /** @internal */ export const AccountingLocationsFilter$outboundSchema: z.ZodType< AccountingLocationsFilter$Outbound, z.ZodTypeDef, AccountingLocationsFilter > = z.object({ subsidiary: z.string().optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AccountingLocationsFilter$ { /** @deprecated use `AccountingLocationsFilter$inboundSchema` instead. */ export const inboundSchema = AccountingLocationsFilter$inboundSchema; /** @deprecated use `AccountingLocationsFilter$outboundSchema` instead. */ export const outboundSchema = AccountingLocationsFilter$outboundSchema; /** @deprecated use `AccountingLocationsFilter$Outbound` instead. */ export type Outbound = AccountingLocationsFilter$Outbound; } export function accountingLocationsFilterToJSON( accountingLocationsFilter: AccountingLocationsFilter, ): string { return JSON.stringify( AccountingLocationsFilter$outboundSchema.parse(accountingLocationsFilter), ); } export function accountingLocationsFilterFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AccountingLocationsFilter$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AccountingLocationsFilter' from JSON`, ); }