/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ApiRoutersApiKeyPairsSchemasCreator = { /** * The ID of the user or API key pair that created the API key pair. */ id: string; /** * The name of the user or API key pair that created the API key pair. */ name: string; /** * The email address of the user that created the API key pair, when it was created by a dashboard user. */ emailAddress?: string | null | undefined; /** * The thumbprint of the API key pair that created the API key pair, when it was created by another API key. */ thumbprint?: string | null | undefined; }; /** @internal */ export const ApiRoutersApiKeyPairsSchemasCreator$inboundSchema: z.ZodType< ApiRoutersApiKeyPairsSchemasCreator, z.ZodTypeDef, unknown > = z.object({ id: z.string(), name: z.string(), email_address: z.nullable(z.string()).optional(), thumbprint: z.nullable(z.string()).optional(), }).transform((v) => { return remap$(v, { "email_address": "emailAddress", }); }); export function apiRoutersApiKeyPairsSchemasCreatorFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ApiRoutersApiKeyPairsSchemasCreator$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ApiRoutersApiKeyPairsSchemasCreator' from JSON`, ); }