/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type Cryptogram = { /** * Always `network-token-cryptogram`. */ type: "network-token-cryptogram"; /** * The cryptogram of the network token. */ cryptogram: string; }; /** @internal */ export const Cryptogram$inboundSchema: z.ZodType< Cryptogram, z.ZodTypeDef, unknown > = z.object({ type: z.literal("network-token-cryptogram").default( "network-token-cryptogram", ), cryptogram: z.string(), }); export function cryptogramFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => Cryptogram$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Cryptogram' from JSON`, ); }