/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: 36c3c183856f */ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; import { ClosedEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { DeploymentSetupMethod, DeploymentSetupMethod$inboundSchema, } from "./deploymentsetupmethod.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; export type DeploymentLinkSetupResponseStack = { aws?: any | null | undefined; gcp?: any | null | undefined; azure?: any | null | undefined; kubernetes?: any | null | undefined; machines?: any | null | undefined; local?: any | null | undefined; test?: any | null | undefined; }; export type ActiveRelease = { /** * Unique identifier for the release. */ id: string; version: string | null; stack: DeploymentLinkSetupResponseStack | null; }; /** * Represents the target cloud platform. */ export const DeploymentLinkSetupResponseSupportedPlatform = { Aws: "aws", Gcp: "gcp", Azure: "azure", Kubernetes: "kubernetes", Machines: "machines", Local: "local", Test: "test", } as const; /** * Represents the target cloud platform. */ export type DeploymentLinkSetupResponseSupportedPlatform = ClosedEnum< typeof DeploymentLinkSetupResponseSupportedPlatform >; export const DeploymentLinkSetupResponseSetupItem = { Deployment: "deployment", Models: "models", Keys: "keys", Bucket: "bucket", Registry: "registry", Sandbox: "sandbox", } as const; export type DeploymentLinkSetupResponseSetupItem = ClosedEnum< typeof DeploymentLinkSetupResponseSetupItem >; /** * Types of packages that can be built */ export const VisiblePackageType = { Cli: "cli", Cloudformation: "cloudformation", Helm: "helm", OperatorImage: "operator-image", SandboxBundle: "sandbox-bundle", Terraform: "terraform", } as const; /** * Types of packages that can be built */ export type VisiblePackageType = ClosedEnum; /** * Whether at least one complete automated setup package is ready across all selected setup items. */ export const SetupPackagesStatus = { Preparing: "preparing", Ready: "ready", Failed: "failed", } as const; /** * Whether at least one complete automated setup package is ready across all selected setup items. */ export type SetupPackagesStatus = ClosedEnum; export type DeploymentLinkSetupResponse = { activeRelease: ActiveRelease | null; supportedPlatforms: Array; setupItems: Array; visiblePackageTypes: Array; visibleSetupMethods: Array; /** * Whether at least one complete automated setup package is ready across all selected setup items. */ setupPackagesStatus: SetupPackagesStatus; }; /** @internal */ export const DeploymentLinkSetupResponseStack$inboundSchema: z.ZodType< DeploymentLinkSetupResponseStack, unknown > = z.object({ aws: z.nullable(z.any()).optional(), gcp: z.nullable(z.any()).optional(), azure: z.nullable(z.any()).optional(), kubernetes: z.nullable(z.any()).optional(), machines: z.nullable(z.any()).optional(), local: z.nullable(z.any()).optional(), test: z.nullable(z.any()).optional(), }); export function deploymentLinkSetupResponseStackFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentLinkSetupResponseStack$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentLinkSetupResponseStack' from JSON`, ); } /** @internal */ export const ActiveRelease$inboundSchema: z.ZodType = z .object({ id: z.string(), version: z.nullable(z.string()), stack: z.nullable( z.lazy(() => DeploymentLinkSetupResponseStack$inboundSchema), ), }); export function activeReleaseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => ActiveRelease$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ActiveRelease' from JSON`, ); } /** @internal */ export const DeploymentLinkSetupResponseSupportedPlatform$inboundSchema: z.ZodEnum = z.enum( DeploymentLinkSetupResponseSupportedPlatform, ); /** @internal */ export const DeploymentLinkSetupResponseSetupItem$inboundSchema: z.ZodEnum< typeof DeploymentLinkSetupResponseSetupItem > = z.enum(DeploymentLinkSetupResponseSetupItem); /** @internal */ export const VisiblePackageType$inboundSchema: z.ZodEnum< typeof VisiblePackageType > = z.enum(VisiblePackageType); /** @internal */ export const SetupPackagesStatus$inboundSchema: z.ZodEnum< typeof SetupPackagesStatus > = z.enum(SetupPackagesStatus); /** @internal */ export const DeploymentLinkSetupResponse$inboundSchema: z.ZodType< DeploymentLinkSetupResponse, unknown > = z.object({ activeRelease: z.nullable(z.lazy(() => ActiveRelease$inboundSchema)), supportedPlatforms: z.array( DeploymentLinkSetupResponseSupportedPlatform$inboundSchema, ), setupItems: z.array(DeploymentLinkSetupResponseSetupItem$inboundSchema), visiblePackageTypes: z.array(VisiblePackageType$inboundSchema), visibleSetupMethods: z.array(DeploymentSetupMethod$inboundSchema), setupPackagesStatus: SetupPackagesStatus$inboundSchema, }); export function deploymentLinkSetupResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => DeploymentLinkSetupResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentLinkSetupResponse' from JSON`, ); }