/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: e3b752baa929 */ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { DeploymentGroup, DeploymentGroup$inboundSchema, } from "./deploymentgroup.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; export type CreateSetupLinkResponse = { /** * The API key token */ token: string; /** * Formatted deployment link */ deploymentLink: string; deploymentGroup: DeploymentGroup; /** * The persisted expiration date for the setup link */ expiresAt: Date | null; }; /** @internal */ export const CreateSetupLinkResponse$inboundSchema: z.ZodType< CreateSetupLinkResponse, unknown > = z.object({ token: z.string(), deploymentLink: z.string(), deploymentGroup: DeploymentGroup$inboundSchema, expiresAt: z.nullable( z.iso.datetime({ offset: true }).transform(v => new Date(v)), ), }); export function createSetupLinkResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CreateSetupLinkResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateSetupLinkResponse' from JSON`, ); }