/* * 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 AuthStartRequestDeliveryScanNotification = { /** * Body is the body of the scan QR message. */ body: string; /** * ConfirmButton is the text of the scan QR message confirm button. */ confirmBtn?: string | undefined; /** * DenyButton is the text of the scan QR message deny button. */ denyBtn?: string | undefined; /** * OriginatingDevice is the type of device where where the scan QR flow was initiated. */ originatingDevice?: string | undefined; /** * OriginatingIp is the IP address of the web client where the scan QR flow was initiated. */ originatingIp?: string | undefined; /** * Title is the title of the scan QR message. */ title: string; }; /** @internal */ export const AuthStartRequestDeliveryScanNotification$inboundSchema: z.ZodType< AuthStartRequestDeliveryScanNotification, z.ZodTypeDef, unknown > = z.object({ body: z.string(), confirmBtn: z.string().optional(), denyBtn: z.string().optional(), originatingDevice: z.string().optional(), originatingIp: z.string().optional(), title: z.string(), }); /** @internal */ export type AuthStartRequestDeliveryScanNotification$Outbound = { body: string; confirmBtn?: string | undefined; denyBtn?: string | undefined; originatingDevice?: string | undefined; originatingIp?: string | undefined; title: string; }; /** @internal */ export const AuthStartRequestDeliveryScanNotification$outboundSchema: z.ZodType< AuthStartRequestDeliveryScanNotification$Outbound, z.ZodTypeDef, AuthStartRequestDeliveryScanNotification > = z.object({ body: z.string(), confirmBtn: z.string().optional(), denyBtn: z.string().optional(), originatingDevice: z.string().optional(), originatingIp: z.string().optional(), title: z.string(), }); /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export namespace AuthStartRequestDeliveryScanNotification$ { /** @deprecated use `AuthStartRequestDeliveryScanNotification$inboundSchema` instead. */ export const inboundSchema = AuthStartRequestDeliveryScanNotification$inboundSchema; /** @deprecated use `AuthStartRequestDeliveryScanNotification$outboundSchema` instead. */ export const outboundSchema = AuthStartRequestDeliveryScanNotification$outboundSchema; /** @deprecated use `AuthStartRequestDeliveryScanNotification$Outbound` instead. */ export type Outbound = AuthStartRequestDeliveryScanNotification$Outbound; } export function authStartRequestDeliveryScanNotificationToJSON( authStartRequestDeliveryScanNotification: AuthStartRequestDeliveryScanNotification, ): string { return JSON.stringify( AuthStartRequestDeliveryScanNotification$outboundSchema.parse( authStartRequestDeliveryScanNotification, ), ); } export function authStartRequestDeliveryScanNotificationFromJSON( jsonString: string, ): SafeParseResult< AuthStartRequestDeliveryScanNotification, SDKValidationError > { return safeParse( jsonString, (x) => AuthStartRequestDeliveryScanNotification$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'AuthStartRequestDeliveryScanNotification' from JSON`, ); }