/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: f51eb360f21d */ 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 { SDKValidationError } from "../errors/sdkvalidationerror.js"; import * as models from "../index.js"; export type CreateProjectGlobals = { /** * Workspace name. Platform API keys already select a workspace; other authentication methods can configure it once on the SDK client. */ workspace?: string | undefined; }; /** * The Git Provider of the repository */ export const CreateProjectTypeRequest = { Github: "github", } as const; /** * The Git Provider of the repository */ export type CreateProjectTypeRequest = ClosedEnum< typeof CreateProjectTypeRequest >; /** * Verified source repository connected to the project. Alien uses this for GitHub Actions setup and source-aware features; releases are still created explicitly by CI or `alien release`. */ export type CreateProjectGitRepositoryRequest = { /** * The Git Provider of the repository */ type: CreateProjectTypeRequest; /** * The name of the git repository */ repo: string; }; /** * Target OS and architecture for compiled binaries. * * @remarks * * Used as keys in package output maps (CLI binaries, Terraform providers, etc.) * and for cross-compilation target selection during builds. */ export const CreateProjectBinaryTargetRequest = { WindowsX64: "windows-x64", LinuxX64: "linux-x64", LinuxArm64: "linux-arm64", DarwinArm64: "darwin-arm64", } as const; /** * Target OS and architecture for compiled binaries. * * @remarks * * Used as keys in package output maps (CLI binaries, Terraform providers, etc.) * and for cross-compilation target selection during builds. */ export type CreateProjectBinaryTargetRequest = ClosedEnum< typeof CreateProjectBinaryTargetRequest >; /** * CLI package configuration. If null, CLI packages will not be generated. */ export type CreateProjectCliRequest = { /** * Binary targets required by this package's setup consumer. * * @remarks * * Older package rows omit this field and retain the historical all-target * behavior. Callers creating new packages should state their target set. */ binaryTargets?: Array | undefined; /** * Human-friendly display name for help banners and about text */ displayName: string; /** * Binary name displayed in help and usage (e.g., "acmectl") */ name: string; /** * Whether CLI package generation is enabled */ enabled: boolean; }; /** * CloudFormation package configuration. If null, CloudFormation packages will not be generated. */ export type CreateProjectCloudformationRequest = { /** * Whether CloudFormation package generation is enabled */ enabled: boolean; /** * Human-friendly application name shown in generated install artifacts */ displayName?: string | null | undefined; }; /** * Operator image package configuration. Required when Helm is enabled. If null, Operator image packages will not be generated. */ export type CreateProjectOperatorImageRequest = { /** * Short brand slug used for generated resource names. */ brand?: string | null | undefined; /** * Human-friendly display name for logs and startup messages */ displayName: string; /** * Branded environment variable prefix (e.g., "ACME"). */ envPrefix?: string | null | undefined; /** * Branded Kubernetes/cloud label domain (e.g., "acme.dev"). */ labelDomain?: string | null | undefined; /** * Image name (e.g., "acme-operator") */ name: string; /** * Whether Operator image package generation is enabled */ enabled: boolean; }; /** * Helm chart package configuration. If null, Helm packages will not be generated. */ export type CreateProjectHelmRequest = { /** * Chart name (e.g., "acme-operator") */ chartName: string; /** * Human-friendly description of the chart */ description: string; /** * Whether Helm chart package generation is enabled */ enabled: boolean; }; /** * Terraform package configuration. If null, Terraform packages will not be generated. */ export type CreateProjectTerraformRequest = { /** * Whether Terraform package generation is enabled */ enabled: boolean; /** * Human-friendly application name shown in generated install artifacts */ displayName?: string | null | undefined; }; /** * Configuration for embedded packages (CLI, CloudFormation, Helm, Terraform) */ export type CreateProjectPackagesConfigRequest = { /** * CLI package configuration. If null, CLI packages will not be generated. */ cli?: CreateProjectCliRequest | null | undefined; /** * CloudFormation package configuration. If null, CloudFormation packages will not be generated. */ cloudformation?: CreateProjectCloudformationRequest | null | undefined; /** * Operator image package configuration. Required when Helm is enabled. If null, Operator image packages will not be generated. */ operatorImage?: CreateProjectOperatorImageRequest | null | undefined; /** * Helm chart package configuration. If null, Helm packages will not be generated. */ helm?: CreateProjectHelmRequest | null | undefined; /** * Terraform package configuration. If null, Terraform packages will not be generated. */ terraform?: CreateProjectTerraformRequest | null | undefined; }; export const EnabledCapability = { Deployments: "deployments", Models: "models", Keys: "keys", Buckets: "buckets", Registry: "registry", } as const; export type EnabledCapability = ClosedEnum; export type CreateProjectRequest = { /** * Project name. */ name: string; /** * Verified source repository connected to the project. Alien uses this for GitHub Actions setup and source-aware features; releases are still created explicitly by CI or `alien release`. */ gitRepository?: CreateProjectGitRepositoryRequest | null | undefined; /** * The name of a directory or relative path to the source code of your project. When null is used it will default to the project root */ rootDirectory?: string | null | undefined; /** * Configuration for embedded packages (CLI, CloudFormation, Helm, Terraform) */ packagesConfig?: CreateProjectPackagesConfigRequest | null | undefined; enabledCapabilities?: Array | undefined; }; /** * The Git Provider of the repository */ export const CreateProjectTypeResponse = { Github: "github", } as const; /** * The Git Provider of the repository */ export type CreateProjectTypeResponse = ClosedEnum< typeof CreateProjectTypeResponse >; /** * Verified source repository connected to the project. Alien uses this for GitHub Actions setup and source-aware features; releases are still created explicitly by CI or `alien release`. */ export type CreateProjectGitRepositoryResponse = { /** * The Git Provider of the repository */ type: CreateProjectTypeResponse; /** * The name of the git repository */ repo: string; }; /** * Customer-facing deployment portal appearance settings. */ export type CreateProjectDeploymentPortalAppearance = { /** * Optional project-specific avatar override for the deployment portal. */ avatarUrl?: string | null | undefined; /** * Curated visual style for the deployment portal. */ preset: models.DeploymentPortalAppearancePreset; /** * Accent color used for highlights and primary actions. */ accentColor: models.DeploymentPortalAccentColor; /** * Optional portal title. Defaults to the project name. */ title?: string | null | undefined; /** * Optional customer-facing subtitle. */ subtitle?: string | null | undefined; /** * Optional support or contact URL. */ supportUrl?: string | null | undefined; /** * Optional documentation URL. */ docsUrl?: string | null | undefined; /** * Layout density for portal content. */ density: models.DeploymentPortalDensity; }; /** * Target OS and architecture for compiled binaries. * * @remarks * * Used as keys in package output maps (CLI binaries, Terraform providers, etc.) * and for cross-compilation target selection during builds. */ export const CreateProjectBinaryTargetResponse = { WindowsX64: "windows-x64", LinuxX64: "linux-x64", LinuxArm64: "linux-arm64", DarwinArm64: "darwin-arm64", } as const; /** * Target OS and architecture for compiled binaries. * * @remarks * * Used as keys in package output maps (CLI binaries, Terraform providers, etc.) * and for cross-compilation target selection during builds. */ export type CreateProjectBinaryTargetResponse = ClosedEnum< typeof CreateProjectBinaryTargetResponse >; /** * CLI package configuration. If null, CLI packages will not be generated. */ export type CreateProjectCliResponse = { /** * Binary targets required by this package's setup consumer. * * @remarks * * Older package rows omit this field and retain the historical all-target * behavior. Callers creating new packages should state their target set. */ binaryTargets?: Array | undefined; /** * Human-friendly display name for help banners and about text */ displayName: string; /** * Binary name displayed in help and usage (e.g., "acmectl") */ name: string; /** * Whether CLI package generation is enabled */ enabled: boolean; }; /** * CloudFormation package configuration. If null, CloudFormation packages will not be generated. */ export type CreateProjectCloudformationResponse = { /** * Whether CloudFormation package generation is enabled */ enabled: boolean; /** * Human-friendly application name shown in generated install artifacts */ displayName?: string | null | undefined; }; /** * Operator image package configuration. Required when Helm is enabled. If null, Operator image packages will not be generated. */ export type CreateProjectOperatorImageResponse = { /** * Short brand slug used for generated resource names. */ brand?: string | null | undefined; /** * Human-friendly display name for logs and startup messages */ displayName: string; /** * Branded environment variable prefix (e.g., "ACME"). */ envPrefix?: string | null | undefined; /** * Branded Kubernetes/cloud label domain (e.g., "acme.dev"). */ labelDomain?: string | null | undefined; /** * Image name (e.g., "acme-operator") */ name: string; /** * Whether Operator image package generation is enabled */ enabled: boolean; }; /** * Helm chart package configuration. If null, Helm packages will not be generated. */ export type CreateProjectHelmResponse = { /** * Chart name (e.g., "acme-operator") */ chartName: string; /** * Human-friendly description of the chart */ description: string; /** * Whether Helm chart package generation is enabled */ enabled: boolean; }; /** * Terraform package configuration. If null, Terraform packages will not be generated. */ export type CreateProjectTerraformResponse = { /** * Whether Terraform package generation is enabled */ enabled: boolean; /** * Human-friendly application name shown in generated install artifacts */ displayName?: string | null | undefined; }; /** * Configuration for embedded packages (CLI, CloudFormation, Helm, Terraform) */ export type CreateProjectPackagesConfigResponse = { /** * CLI package configuration. If null, CLI packages will not be generated. */ cli?: CreateProjectCliResponse | null | undefined; /** * CloudFormation package configuration. If null, CloudFormation packages will not be generated. */ cloudformation?: CreateProjectCloudformationResponse | null | undefined; /** * Operator image package configuration. Required when Helm is enabled. If null, Operator image packages will not be generated. */ operatorImage?: CreateProjectOperatorImageResponse | null | undefined; /** * Helm chart package configuration. If null, Helm packages will not be generated. */ helm?: CreateProjectHelmResponse | null | undefined; /** * Terraform package configuration. If null, Terraform packages will not be generated. */ terraform?: CreateProjectTerraformResponse | null | undefined; }; /** * Project default private managers for new push deployments. */ export type CreateProjectDefaultManagers = { /** * Unique identifier for a default private manager. */ aws?: string | null | undefined; /** * Unique identifier for a default private manager. */ gcp?: string | null | undefined; /** * Unique identifier for a default private manager. */ azure?: string | null | undefined; /** * Unique identifier for a default private manager. */ kubernetes?: string | null | undefined; /** * Unique identifier for a default private manager. */ machines?: string | null | undefined; /** * Unique identifier for a default private manager. */ local?: string | null | undefined; }; export const CreateProjectMethod = { Framework: "framework", RemoteOperator: "remote-operator", } as const; export type CreateProjectMethod = ClosedEnum; export type CreateProjectDeployments = { enabled: boolean; methods?: Array | undefined; }; export type CreateProjectKeys = { enabled: boolean; applicationEncryption: boolean; }; export const CreateProjectAllowedProvider = { AwsBedrock: "aws-bedrock", GcpVertex: "gcp-vertex", AzureFoundry: "azure-foundry", Anthropic: "anthropic", Databricks: "databricks", Openai: "openai", } as const; export type CreateProjectAllowedProvider = ClosedEnum< typeof CreateProjectAllowedProvider >; export const CreateProjectClientApi = { OpenaiChat: "openai-chat", OpenaiResponses: "openai-responses", AnthropicMessages: "anthropic-messages", } as const; export type CreateProjectClientApi = ClosedEnum; export type CreateProjectRequirement = { publicModelId: string; clientApis: Array; required: boolean; }; export type CreateProjectModels = { enabled: boolean; allowedProviders: Array; requirements: Array; }; export const CreateProjectAccess = { ReadWrite: "read-write", } as const; export type CreateProjectAccess = ClosedEnum; export type CreateProjectBuckets = { enabled: boolean; access: CreateProjectAccess; }; export const CreateProjectCredentialPolicy = { PullOnly: "pull-only", PushAndPull: "push-and-pull", } as const; export type CreateProjectCredentialPolicy = ClosedEnum< typeof CreateProjectCredentialPolicy >; export type CreateProjectRegistry = { enabled: boolean; repositories: Array; credentialPolicy: CreateProjectCredentialPolicy; }; export type CreateProjectAzure = { catalogImage: string; idleSuspendSeconds: number; }; export type CreateProjectRemoteSandbox = { enabled: boolean; baseImage?: string | undefined; azure?: CreateProjectAzure | undefined; maxLifetimeSeconds?: number | undefined; }; export type CreateProjectCapabilities = { deployments?: CreateProjectDeployments | undefined; keys?: CreateProjectKeys | undefined; models?: CreateProjectModels | undefined; buckets?: CreateProjectBuckets | undefined; registry?: CreateProjectRegistry | undefined; remoteSandbox?: CreateProjectRemoteSandbox | undefined; }; /** * Capabilities this Project may offer through setup links. */ export type CreateProjectProjectCapabilities = { schemaVersion: number; capabilities: CreateProjectCapabilities; }; export type CreateProjectGithubSetup = { /** * URL to the pull request with the Alien build workflow */ pullRequestUrl: string; /** * URL to the GitHub Actions workflow */ workflowUrl: string; }; /** * Project created successfully. */ export type CreateProjectResponse = { /** * Unique identifier for the project. */ id: string; /** * Project name. */ name: string; /** * Verified source repository connected to the project. Alien uses this for GitHub Actions setup and source-aware features; releases are still created explicitly by CI or `alien release`. */ gitRepository?: CreateProjectGitRepositoryResponse | null | undefined; /** * The name of a directory or relative path to the source code of your project. When null is used it will default to the project root */ rootDirectory?: string | null | undefined; /** * Customer-facing deployment portal appearance settings. */ deploymentPortalAppearance?: | CreateProjectDeploymentPortalAppearance | null | undefined; /** * Configuration for embedded packages (CLI, CloudFormation, Helm, Terraform) */ packagesConfig?: CreateProjectPackagesConfigResponse | null | undefined; /** * Selected domain for this project (null = default system domain) */ domainId?: string | null | undefined; /** * Project default private managers for new push deployments. */ defaultManagers?: CreateProjectDefaultManagers | null | undefined; /** * Capabilities this Project may offer through setup links. */ projectCapabilities?: CreateProjectProjectCapabilities | null | undefined; createdAt: Date; /** * Unique identifier for the workspace. */ workspaceId: string; githubSetup?: CreateProjectGithubSetup | undefined; gitRepositoryWarning?: models.APIError | undefined; }; /** @internal */ export const CreateProjectTypeRequest$outboundSchema: z.ZodEnum< typeof CreateProjectTypeRequest > = z.enum(CreateProjectTypeRequest); /** @internal */ export type CreateProjectGitRepositoryRequest$Outbound = { type: string; repo: string; }; /** @internal */ export const CreateProjectGitRepositoryRequest$outboundSchema: z.ZodType< CreateProjectGitRepositoryRequest$Outbound, CreateProjectGitRepositoryRequest > = z.object({ type: CreateProjectTypeRequest$outboundSchema, repo: z.string(), }); export function createProjectGitRepositoryRequestToJSON( createProjectGitRepositoryRequest: CreateProjectGitRepositoryRequest, ): string { return JSON.stringify( CreateProjectGitRepositoryRequest$outboundSchema.parse( createProjectGitRepositoryRequest, ), ); } /** @internal */ export const CreateProjectBinaryTargetRequest$outboundSchema: z.ZodEnum< typeof CreateProjectBinaryTargetRequest > = z.enum(CreateProjectBinaryTargetRequest); /** @internal */ export type CreateProjectCliRequest$Outbound = { binaryTargets?: Array | undefined; displayName: string; name: string; enabled: boolean; }; /** @internal */ export const CreateProjectCliRequest$outboundSchema: z.ZodType< CreateProjectCliRequest$Outbound, CreateProjectCliRequest > = z.object({ binaryTargets: z.array(CreateProjectBinaryTargetRequest$outboundSchema) .optional(), displayName: z.string(), name: z.string(), enabled: z.boolean(), }); export function createProjectCliRequestToJSON( createProjectCliRequest: CreateProjectCliRequest, ): string { return JSON.stringify( CreateProjectCliRequest$outboundSchema.parse(createProjectCliRequest), ); } /** @internal */ export type CreateProjectCloudformationRequest$Outbound = { enabled: boolean; displayName?: string | null | undefined; }; /** @internal */ export const CreateProjectCloudformationRequest$outboundSchema: z.ZodType< CreateProjectCloudformationRequest$Outbound, CreateProjectCloudformationRequest > = z.object({ enabled: z.boolean(), displayName: z.nullable(z.string()).optional(), }); export function createProjectCloudformationRequestToJSON( createProjectCloudformationRequest: CreateProjectCloudformationRequest, ): string { return JSON.stringify( CreateProjectCloudformationRequest$outboundSchema.parse( createProjectCloudformationRequest, ), ); } /** @internal */ export type CreateProjectOperatorImageRequest$Outbound = { brand?: string | null | undefined; displayName: string; envPrefix?: string | null | undefined; labelDomain?: string | null | undefined; name: string; enabled: boolean; }; /** @internal */ export const CreateProjectOperatorImageRequest$outboundSchema: z.ZodType< CreateProjectOperatorImageRequest$Outbound, CreateProjectOperatorImageRequest > = z.object({ brand: z.nullable(z.string()).optional(), displayName: z.string(), envPrefix: z.nullable(z.string()).optional(), labelDomain: z.nullable(z.string()).optional(), name: z.string(), enabled: z.boolean(), }); export function createProjectOperatorImageRequestToJSON( createProjectOperatorImageRequest: CreateProjectOperatorImageRequest, ): string { return JSON.stringify( CreateProjectOperatorImageRequest$outboundSchema.parse( createProjectOperatorImageRequest, ), ); } /** @internal */ export type CreateProjectHelmRequest$Outbound = { chartName: string; description: string; enabled: boolean; }; /** @internal */ export const CreateProjectHelmRequest$outboundSchema: z.ZodType< CreateProjectHelmRequest$Outbound, CreateProjectHelmRequest > = z.object({ chartName: z.string(), description: z.string(), enabled: z.boolean(), }); export function createProjectHelmRequestToJSON( createProjectHelmRequest: CreateProjectHelmRequest, ): string { return JSON.stringify( CreateProjectHelmRequest$outboundSchema.parse(createProjectHelmRequest), ); } /** @internal */ export type CreateProjectTerraformRequest$Outbound = { enabled: boolean; displayName?: string | null | undefined; }; /** @internal */ export const CreateProjectTerraformRequest$outboundSchema: z.ZodType< CreateProjectTerraformRequest$Outbound, CreateProjectTerraformRequest > = z.object({ enabled: z.boolean(), displayName: z.nullable(z.string()).optional(), }); export function createProjectTerraformRequestToJSON( createProjectTerraformRequest: CreateProjectTerraformRequest, ): string { return JSON.stringify( CreateProjectTerraformRequest$outboundSchema.parse( createProjectTerraformRequest, ), ); } /** @internal */ export type CreateProjectPackagesConfigRequest$Outbound = { cli?: CreateProjectCliRequest$Outbound | null | undefined; cloudformation?: | CreateProjectCloudformationRequest$Outbound | null | undefined; operatorImage?: CreateProjectOperatorImageRequest$Outbound | null | undefined; helm?: CreateProjectHelmRequest$Outbound | null | undefined; terraform?: CreateProjectTerraformRequest$Outbound | null | undefined; }; /** @internal */ export const CreateProjectPackagesConfigRequest$outboundSchema: z.ZodType< CreateProjectPackagesConfigRequest$Outbound, CreateProjectPackagesConfigRequest > = z.object({ cli: z.nullable(z.lazy(() => CreateProjectCliRequest$outboundSchema)) .optional(), cloudformation: z.nullable( z.lazy(() => CreateProjectCloudformationRequest$outboundSchema), ).optional(), operatorImage: z.nullable( z.lazy(() => CreateProjectOperatorImageRequest$outboundSchema), ).optional(), helm: z.nullable(z.lazy(() => CreateProjectHelmRequest$outboundSchema)) .optional(), terraform: z.nullable( z.lazy(() => CreateProjectTerraformRequest$outboundSchema), ).optional(), }); export function createProjectPackagesConfigRequestToJSON( createProjectPackagesConfigRequest: CreateProjectPackagesConfigRequest, ): string { return JSON.stringify( CreateProjectPackagesConfigRequest$outboundSchema.parse( createProjectPackagesConfigRequest, ), ); } /** @internal */ export const EnabledCapability$outboundSchema: z.ZodEnum< typeof EnabledCapability > = z.enum(EnabledCapability); /** @internal */ export type CreateProjectRequest$Outbound = { name: string; gitRepository?: CreateProjectGitRepositoryRequest$Outbound | null | undefined; rootDirectory?: string | null | undefined; packagesConfig?: | CreateProjectPackagesConfigRequest$Outbound | null | undefined; enabledCapabilities?: Array | undefined; }; /** @internal */ export const CreateProjectRequest$outboundSchema: z.ZodType< CreateProjectRequest$Outbound, CreateProjectRequest > = z.object({ name: z.string(), gitRepository: z.nullable( z.lazy(() => CreateProjectGitRepositoryRequest$outboundSchema), ).optional(), rootDirectory: z.nullable(z.string()).optional(), packagesConfig: z.nullable( z.lazy(() => CreateProjectPackagesConfigRequest$outboundSchema), ).optional(), enabledCapabilities: z.array(EnabledCapability$outboundSchema).optional(), }); export function createProjectRequestToJSON( createProjectRequest: CreateProjectRequest, ): string { return JSON.stringify( CreateProjectRequest$outboundSchema.parse(createProjectRequest), ); } /** @internal */ export const CreateProjectTypeResponse$inboundSchema: z.ZodEnum< typeof CreateProjectTypeResponse > = z.enum(CreateProjectTypeResponse); /** @internal */ export const CreateProjectGitRepositoryResponse$inboundSchema: z.ZodType< CreateProjectGitRepositoryResponse, unknown > = z.object({ type: CreateProjectTypeResponse$inboundSchema, repo: z.string(), }); export function createProjectGitRepositoryResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CreateProjectGitRepositoryResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateProjectGitRepositoryResponse' from JSON`, ); } /** @internal */ export const CreateProjectDeploymentPortalAppearance$inboundSchema: z.ZodType< CreateProjectDeploymentPortalAppearance, unknown > = z.object({ avatarUrl: z.nullable(z.string()).optional(), preset: models.DeploymentPortalAppearancePreset$inboundSchema.default( "clean", ), accentColor: models.DeploymentPortalAccentColor$inboundSchema.default("blue"), title: z.nullable(z.string()).optional(), subtitle: z.nullable(z.string()).optional(), supportUrl: z.nullable(z.string()).optional(), docsUrl: z.nullable(z.string()).optional(), density: models.DeploymentPortalDensity$inboundSchema.default("comfortable"), }); export function createProjectDeploymentPortalAppearanceFromJSON( jsonString: string, ): SafeParseResult< CreateProjectDeploymentPortalAppearance, SDKValidationError > { return safeParse( jsonString, (x) => CreateProjectDeploymentPortalAppearance$inboundSchema.parse( JSON.parse(x), ), `Failed to parse 'CreateProjectDeploymentPortalAppearance' from JSON`, ); } /** @internal */ export const CreateProjectBinaryTargetResponse$inboundSchema: z.ZodEnum< typeof CreateProjectBinaryTargetResponse > = z.enum(CreateProjectBinaryTargetResponse); /** @internal */ export const CreateProjectCliResponse$inboundSchema: z.ZodType< CreateProjectCliResponse, unknown > = z.object({ binaryTargets: z.array(CreateProjectBinaryTargetResponse$inboundSchema) .optional(), displayName: z.string(), name: z.string(), enabled: z.boolean(), }); export function createProjectCliResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CreateProjectCliResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateProjectCliResponse' from JSON`, ); } /** @internal */ export const CreateProjectCloudformationResponse$inboundSchema: z.ZodType< CreateProjectCloudformationResponse, unknown > = z.object({ enabled: z.boolean(), displayName: z.nullable(z.string()).optional(), }); export function createProjectCloudformationResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CreateProjectCloudformationResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateProjectCloudformationResponse' from JSON`, ); } /** @internal */ export const CreateProjectOperatorImageResponse$inboundSchema: z.ZodType< CreateProjectOperatorImageResponse, unknown > = z.object({ brand: z.nullable(z.string()).optional(), displayName: z.string(), envPrefix: z.nullable(z.string()).optional(), labelDomain: z.nullable(z.string()).optional(), name: z.string(), enabled: z.boolean(), }); export function createProjectOperatorImageResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CreateProjectOperatorImageResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateProjectOperatorImageResponse' from JSON`, ); } /** @internal */ export const CreateProjectHelmResponse$inboundSchema: z.ZodType< CreateProjectHelmResponse, unknown > = z.object({ chartName: z.string(), description: z.string(), enabled: z.boolean(), }); export function createProjectHelmResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CreateProjectHelmResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateProjectHelmResponse' from JSON`, ); } /** @internal */ export const CreateProjectTerraformResponse$inboundSchema: z.ZodType< CreateProjectTerraformResponse, unknown > = z.object({ enabled: z.boolean(), displayName: z.nullable(z.string()).optional(), }); export function createProjectTerraformResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CreateProjectTerraformResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateProjectTerraformResponse' from JSON`, ); } /** @internal */ export const CreateProjectPackagesConfigResponse$inboundSchema: z.ZodType< CreateProjectPackagesConfigResponse, unknown > = z.object({ cli: z.nullable(z.lazy(() => CreateProjectCliResponse$inboundSchema)) .optional(), cloudformation: z.nullable( z.lazy(() => CreateProjectCloudformationResponse$inboundSchema), ).optional(), operatorImage: z.nullable( z.lazy(() => CreateProjectOperatorImageResponse$inboundSchema), ).optional(), helm: z.nullable(z.lazy(() => CreateProjectHelmResponse$inboundSchema)) .optional(), terraform: z.nullable( z.lazy(() => CreateProjectTerraformResponse$inboundSchema), ).optional(), }); export function createProjectPackagesConfigResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CreateProjectPackagesConfigResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateProjectPackagesConfigResponse' from JSON`, ); } /** @internal */ export const CreateProjectDefaultManagers$inboundSchema: z.ZodType< CreateProjectDefaultManagers, unknown > = z.object({ aws: z.nullable(z.string()).optional(), gcp: z.nullable(z.string()).optional(), azure: z.nullable(z.string()).optional(), kubernetes: z.nullable(z.string()).optional(), machines: z.nullable(z.string()).optional(), local: z.nullable(z.string()).optional(), }); export function createProjectDefaultManagersFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CreateProjectDefaultManagers$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateProjectDefaultManagers' from JSON`, ); } /** @internal */ export const CreateProjectMethod$inboundSchema: z.ZodEnum< typeof CreateProjectMethod > = z.enum(CreateProjectMethod); /** @internal */ export const CreateProjectDeployments$inboundSchema: z.ZodType< CreateProjectDeployments, unknown > = z.object({ enabled: z.boolean(), methods: z.array(CreateProjectMethod$inboundSchema).optional(), }); export function createProjectDeploymentsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CreateProjectDeployments$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateProjectDeployments' from JSON`, ); } /** @internal */ export const CreateProjectKeys$inboundSchema: z.ZodType< CreateProjectKeys, unknown > = z.object({ enabled: z.boolean(), applicationEncryption: z.boolean(), }); export function createProjectKeysFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CreateProjectKeys$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateProjectKeys' from JSON`, ); } /** @internal */ export const CreateProjectAllowedProvider$inboundSchema: z.ZodEnum< typeof CreateProjectAllowedProvider > = z.enum(CreateProjectAllowedProvider); /** @internal */ export const CreateProjectClientApi$inboundSchema: z.ZodEnum< typeof CreateProjectClientApi > = z.enum(CreateProjectClientApi); /** @internal */ export const CreateProjectRequirement$inboundSchema: z.ZodType< CreateProjectRequirement, unknown > = z.object({ publicModelId: z.string(), clientApis: z.array(CreateProjectClientApi$inboundSchema), required: z.boolean(), }); export function createProjectRequirementFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CreateProjectRequirement$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateProjectRequirement' from JSON`, ); } /** @internal */ export const CreateProjectModels$inboundSchema: z.ZodType< CreateProjectModels, unknown > = z.object({ enabled: z.boolean(), allowedProviders: z.array(CreateProjectAllowedProvider$inboundSchema), requirements: z.array(z.lazy(() => CreateProjectRequirement$inboundSchema)), }); export function createProjectModelsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CreateProjectModels$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateProjectModels' from JSON`, ); } /** @internal */ export const CreateProjectAccess$inboundSchema: z.ZodEnum< typeof CreateProjectAccess > = z.enum(CreateProjectAccess); /** @internal */ export const CreateProjectBuckets$inboundSchema: z.ZodType< CreateProjectBuckets, unknown > = z.object({ enabled: z.boolean(), access: CreateProjectAccess$inboundSchema, }); export function createProjectBucketsFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CreateProjectBuckets$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateProjectBuckets' from JSON`, ); } /** @internal */ export const CreateProjectCredentialPolicy$inboundSchema: z.ZodEnum< typeof CreateProjectCredentialPolicy > = z.enum(CreateProjectCredentialPolicy); /** @internal */ export const CreateProjectRegistry$inboundSchema: z.ZodType< CreateProjectRegistry, unknown > = z.object({ enabled: z.boolean(), repositories: z.array(z.string()), credentialPolicy: CreateProjectCredentialPolicy$inboundSchema, }); export function createProjectRegistryFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CreateProjectRegistry$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateProjectRegistry' from JSON`, ); } /** @internal */ export const CreateProjectAzure$inboundSchema: z.ZodType< CreateProjectAzure, unknown > = z.object({ catalogImage: z.string(), idleSuspendSeconds: z.int(), }); export function createProjectAzureFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CreateProjectAzure$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateProjectAzure' from JSON`, ); } /** @internal */ export const CreateProjectRemoteSandbox$inboundSchema: z.ZodType< CreateProjectRemoteSandbox, unknown > = z.object({ enabled: z.boolean(), baseImage: z.string().optional(), azure: z.lazy(() => CreateProjectAzure$inboundSchema).optional(), maxLifetimeSeconds: z.int().optional(), }); export function createProjectRemoteSandboxFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CreateProjectRemoteSandbox$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateProjectRemoteSandbox' from JSON`, ); } /** @internal */ export const CreateProjectCapabilities$inboundSchema: z.ZodType< CreateProjectCapabilities, unknown > = z.object({ deployments: z.lazy(() => CreateProjectDeployments$inboundSchema).optional(), keys: z.lazy(() => CreateProjectKeys$inboundSchema).optional(), models: z.lazy(() => CreateProjectModels$inboundSchema).optional(), buckets: z.lazy(() => CreateProjectBuckets$inboundSchema).optional(), registry: z.lazy(() => CreateProjectRegistry$inboundSchema).optional(), remoteSandbox: z.lazy(() => CreateProjectRemoteSandbox$inboundSchema) .optional(), }); export function createProjectCapabilitiesFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CreateProjectCapabilities$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateProjectCapabilities' from JSON`, ); } /** @internal */ export const CreateProjectProjectCapabilities$inboundSchema: z.ZodType< CreateProjectProjectCapabilities, unknown > = z.object({ schemaVersion: z.number(), capabilities: z.lazy(() => CreateProjectCapabilities$inboundSchema), }); export function createProjectProjectCapabilitiesFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CreateProjectProjectCapabilities$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateProjectProjectCapabilities' from JSON`, ); } /** @internal */ export const CreateProjectGithubSetup$inboundSchema: z.ZodType< CreateProjectGithubSetup, unknown > = z.object({ pullRequestUrl: z.string(), workflowUrl: z.string(), }); export function createProjectGithubSetupFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CreateProjectGithubSetup$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateProjectGithubSetup' from JSON`, ); } /** @internal */ export const CreateProjectResponse$inboundSchema: z.ZodType< CreateProjectResponse, unknown > = z.object({ id: z.string(), name: z.string(), gitRepository: z.nullable( z.lazy(() => CreateProjectGitRepositoryResponse$inboundSchema), ).optional(), rootDirectory: z.nullable(z.string()).optional(), deploymentPortalAppearance: z.nullable( z.lazy(() => CreateProjectDeploymentPortalAppearance$inboundSchema), ).optional(), packagesConfig: z.nullable( z.lazy(() => CreateProjectPackagesConfigResponse$inboundSchema), ).optional(), domainId: z.nullable(z.string()).optional(), defaultManagers: z.nullable( z.lazy(() => CreateProjectDefaultManagers$inboundSchema), ).optional(), projectCapabilities: z.nullable( z.lazy(() => CreateProjectProjectCapabilities$inboundSchema), ).optional(), createdAt: z.iso.datetime({ offset: true }).transform(v => new Date(v)), workspaceId: z.string(), githubSetup: z.lazy(() => CreateProjectGithubSetup$inboundSchema).optional(), gitRepositoryWarning: models.APIError$inboundSchema.optional(), }); export function createProjectResponseFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => CreateProjectResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateProjectResponse' from JSON`, ); }