/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import * as components from "../components/index.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type V3CrossDomainIdentityRequest = { /** * A Prove-generated unique ID for a specific identity. */ identityId: string; v3CrossDomainIdentityRequest?: | components.V3CrossDomainIdentityRequest | undefined; }; export type V3CrossDomainIdentityResponse = { httpMeta: components.HTTPMetadata; /** * V3CrossDomainIdentityResponse */ v3CrossDomainIdentityResponse?: | components.V3CrossDomainIdentityResponse | undefined; }; /** @internal */ export const V3CrossDomainIdentityRequest$inboundSchema: z.ZodType< V3CrossDomainIdentityRequest, z.ZodTypeDef, unknown > = z.object({ identityId: z.string(), V3CrossDomainIdentityRequest: components .V3CrossDomainIdentityRequest$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "V3CrossDomainIdentityRequest": "v3CrossDomainIdentityRequest", }); }); /** @internal */ export type V3CrossDomainIdentityRequest$Outbound = { identityId: string; V3CrossDomainIdentityRequest?: | components.V3CrossDomainIdentityRequest$Outbound | undefined; }; /** @internal */ export const V3CrossDomainIdentityRequest$outboundSchema: z.ZodType< V3CrossDomainIdentityRequest$Outbound, z.ZodTypeDef, V3CrossDomainIdentityRequest > = z.object({ identityId: z.string(), v3CrossDomainIdentityRequest: components .V3CrossDomainIdentityRequest$outboundSchema.optional(), }).transform((v) => { return remap$(v, { v3CrossDomainIdentityRequest: "V3CrossDomainIdentityRequest", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace V3CrossDomainIdentityRequest$ { /** @deprecated use `V3CrossDomainIdentityRequest$inboundSchema` instead. */ export const inboundSchema = V3CrossDomainIdentityRequest$inboundSchema; /** @deprecated use `V3CrossDomainIdentityRequest$outboundSchema` instead. */ export const outboundSchema = V3CrossDomainIdentityRequest$outboundSchema; /** @deprecated use `V3CrossDomainIdentityRequest$Outbound` instead. */ export type Outbound = V3CrossDomainIdentityRequest$Outbound; } export function v3CrossDomainIdentityRequestToJSON( v3CrossDomainIdentityRequest: V3CrossDomainIdentityRequest, ): string { return JSON.stringify( V3CrossDomainIdentityRequest$outboundSchema.parse( v3CrossDomainIdentityRequest, ), ); } export function v3CrossDomainIdentityRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => V3CrossDomainIdentityRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'V3CrossDomainIdentityRequest' from JSON`, ); } /** @internal */ export const V3CrossDomainIdentityResponse$inboundSchema: z.ZodType< V3CrossDomainIdentityResponse, z.ZodTypeDef, unknown > = z.object({ HttpMeta: components.HTTPMetadata$inboundSchema, V3CrossDomainIdentityResponse: components .V3CrossDomainIdentityResponse$inboundSchema.optional(), }).transform((v) => { return remap$(v, { "HttpMeta": "httpMeta", "V3CrossDomainIdentityResponse": "v3CrossDomainIdentityResponse", }); }); /** @internal */ export type V3CrossDomainIdentityResponse$Outbound = { HttpMeta: components.HTTPMetadata$Outbound; V3CrossDomainIdentityResponse?: | components.V3CrossDomainIdentityResponse$Outbound | undefined; }; /** @internal */ export const V3CrossDomainIdentityResponse$outboundSchema: z.ZodType< V3CrossDomainIdentityResponse$Outbound, z.ZodTypeDef, V3CrossDomainIdentityResponse > = z.object({ httpMeta: components.HTTPMetadata$outboundSchema, v3CrossDomainIdentityResponse: components .V3CrossDomainIdentityResponse$outboundSchema.optional(), }).transform((v) => { return remap$(v, { httpMeta: "HttpMeta", v3CrossDomainIdentityResponse: "V3CrossDomainIdentityResponse", }); }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace V3CrossDomainIdentityResponse$ { /** @deprecated use `V3CrossDomainIdentityResponse$inboundSchema` instead. */ export const inboundSchema = V3CrossDomainIdentityResponse$inboundSchema; /** @deprecated use `V3CrossDomainIdentityResponse$outboundSchema` instead. */ export const outboundSchema = V3CrossDomainIdentityResponse$outboundSchema; /** @deprecated use `V3CrossDomainIdentityResponse$Outbound` instead. */ export type Outbound = V3CrossDomainIdentityResponse$Outbound; } export function v3CrossDomainIdentityResponseToJSON( v3CrossDomainIdentityResponse: V3CrossDomainIdentityResponse, ): string { return JSON.stringify( V3CrossDomainIdentityResponse$outboundSchema.parse( v3CrossDomainIdentityResponse, ), ); } export function v3CrossDomainIdentityResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => V3CrossDomainIdentityResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'V3CrossDomainIdentityResponse' from JSON`, ); }