/* * 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 HookdeckCredentials = { /** * Hookdeck authentication token. */ token: string; }; /** @internal */ export const HookdeckCredentials$inboundSchema: z.ZodType< HookdeckCredentials, z.ZodTypeDef, unknown > = z.object({ token: z.string(), }); /** @internal */ export type HookdeckCredentials$Outbound = { token: string; }; /** @internal */ export const HookdeckCredentials$outboundSchema: z.ZodType< HookdeckCredentials$Outbound, z.ZodTypeDef, HookdeckCredentials > = z.object({ token: z.string(), }); export function hookdeckCredentialsToJSON( hookdeckCredentials: HookdeckCredentials, ): string { return JSON.stringify( HookdeckCredentials$outboundSchema.parse(hookdeckCredentials), ); } export function hookdeckCredentialsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => HookdeckCredentials$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'HookdeckCredentials' from JSON`, ); }