/* * 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 PazeMobileSession = { /** * The Paze merchant data ID. */ id: string; /** * The merchant display name. */ name: string; /** * The Paze profile ID for the given domain. */ profileId: string; /** * The Paze OAuth access token. Returned only when `source` is `mobile`. */ accessToken: string; /** * The Paze session ID. Returned only when `source` is `mobile`. */ sessionId: string; }; /** @internal */ export const PazeMobileSession$inboundSchema: z.ZodType< PazeMobileSession, z.ZodTypeDef, unknown > = z.object({ id: z.string(), name: z.string(), profileId: z.string(), accessToken: z.string(), sessionId: z.string(), }); export function pazeMobileSessionFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => PazeMobileSession$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PazeMobileSession' from JSON`, ); }