/* * 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"; import { BaseGetAuthenticator, BaseGetAuthenticator$inboundSchema, BaseGetAuthenticator$Outbound, BaseGetAuthenticator$outboundSchema, } from "./basegetauthenticator.js"; import { Pagination, Pagination$inboundSchema, Pagination$Outbound, Pagination$outboundSchema, } from "./pagination.js"; export type AuthenticatorList = { pagination: Pagination; authenticators: Array; }; /** @internal */ export const AuthenticatorList$inboundSchema: z.ZodType< AuthenticatorList, z.ZodTypeDef, unknown > = z.object({ pagination: Pagination$inboundSchema, authenticators: z.array(BaseGetAuthenticator$inboundSchema), }); /** @internal */ export type AuthenticatorList$Outbound = { pagination: Pagination$Outbound; authenticators: Array; }; /** @internal */ export const AuthenticatorList$outboundSchema: z.ZodType< AuthenticatorList$Outbound, z.ZodTypeDef, AuthenticatorList > = z.object({ pagination: Pagination$outboundSchema, authenticators: z.array(BaseGetAuthenticator$outboundSchema), }); export function authenticatorListToJSON( authenticatorList: AuthenticatorList, ): string { return JSON.stringify( AuthenticatorList$outboundSchema.parse(authenticatorList), ); } export function authenticatorListFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => AuthenticatorList$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AuthenticatorList' from JSON`, ); }