/* * 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"; import { LookupIdentityItem, LookupIdentityItem$inboundSchema, LookupIdentityItem$Outbound, LookupIdentityItem$outboundSchema, } from "./lookupidentityitem.js"; /** * Response body for the V3 Get Identities By Phone Number API. */ export type V3GetIdentitiesByPhoneNumberResponse = { items?: Array | undefined; }; /** @internal */ export const V3GetIdentitiesByPhoneNumberResponse$inboundSchema: z.ZodType< V3GetIdentitiesByPhoneNumberResponse, z.ZodTypeDef, unknown > = z.object({ items: z.array(LookupIdentityItem$inboundSchema).optional(), }); /** @internal */ export type V3GetIdentitiesByPhoneNumberResponse$Outbound = { items?: Array | undefined; }; /** @internal */ export const V3GetIdentitiesByPhoneNumberResponse$outboundSchema: z.ZodType< V3GetIdentitiesByPhoneNumberResponse$Outbound, z.ZodTypeDef, V3GetIdentitiesByPhoneNumberResponse > = z.object({ items: z.array(LookupIdentityItem$outboundSchema).optional(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace V3GetIdentitiesByPhoneNumberResponse$ { /** @deprecated use `V3GetIdentitiesByPhoneNumberResponse$inboundSchema` instead. */ export const inboundSchema = V3GetIdentitiesByPhoneNumberResponse$inboundSchema; /** @deprecated use `V3GetIdentitiesByPhoneNumberResponse$outboundSchema` instead. */ export const outboundSchema = V3GetIdentitiesByPhoneNumberResponse$outboundSchema; /** @deprecated use `V3GetIdentitiesByPhoneNumberResponse$Outbound` instead. */ export type Outbound = V3GetIdentitiesByPhoneNumberResponse$Outbound; } export function v3GetIdentitiesByPhoneNumberResponseToJSON( v3GetIdentitiesByPhoneNumberResponse: V3GetIdentitiesByPhoneNumberResponse, ): string { return JSON.stringify( V3GetIdentitiesByPhoneNumberResponse$outboundSchema.parse( v3GetIdentitiesByPhoneNumberResponse, ), ); } export function v3GetIdentitiesByPhoneNumberResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => V3GetIdentitiesByPhoneNumberResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'V3GetIdentitiesByPhoneNumberResponse' from JSON`, ); }