@vercel/sdk
Version:
<p align="center"> <a href="https://vercel.com"> <img src="https://assets.vercel.com/image/upload/v1588805858/repositories/vercel/logo.png" height="96"> <h3 align="center">Vercel</h3> </a> <p align="center">Develop. Preview. Ship.</p> </p>
4,465 lines • 143 kB
text/typescript
/*
* 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 { ClosedEnum } from "../types/enums.js";
import { Result as SafeParseResult } from "../types/fp.js";
import * as types from "../types/primitives.js";
import { smartUnion } from "../types/smartUnion.js";
import { SDKValidationError } from "./sdkvalidationerror.js";
export type GetDeploymentRequest = {
/**
* The unique identifier or hostname of the deployment.
*/
idOrUrl: string;
/**
* Whether to add in gitRepo information.
*/
withGitRepoInfo?: string | undefined;
/**
* The Team identifier to perform the request on behalf of.
*/
teamId?: string | undefined;
/**
* The Team slug to perform the request on behalf of.
*/
slug?: string | undefined;
};
/**
* Information about the deployment creator
*/
export type ResponseBodyCreator = {
/**
* The ID of the user that created the deployment
*/
uid: string;
/**
* The username of the user that created the deployment
*/
username?: string | undefined;
/**
* The avatar of the user that created the deployment
*/
avatar?: string | undefined;
};
export const GetDeploymentResponseBodyDeploymentsResponseReadyState = {
Building: "BUILDING",
Error: "ERROR",
Initializing: "INITIALIZING",
Ready: "READY",
} as const;
export type GetDeploymentResponseBodyDeploymentsResponseReadyState = ClosedEnum<
typeof GetDeploymentResponseBodyDeploymentsResponseReadyState
>;
export type GetDeploymentResponseBodyOutput = {
path: string;
functionName: string;
};
/**
* A partial representation of a Build used by the deployment endpoint.
*/
export type ResponseBodyLambdas = {
id: string;
createdAt?: number | undefined;
readyState?:
| GetDeploymentResponseBodyDeploymentsResponseReadyState
| undefined;
entrypoint?: string | null | undefined;
readyStateAt?: number | undefined;
output: Array<GetDeploymentResponseBodyOutput>;
};
export const GetDeploymentResponseBodyDeploymentsStatus = {
Blocked: "BLOCKED",
Building: "BUILDING",
Canceled: "CANCELED",
Error: "ERROR",
Initializing: "INITIALIZING",
Queued: "QUEUED",
Ready: "READY",
} as const;
export type GetDeploymentResponseBodyDeploymentsStatus = ClosedEnum<
typeof GetDeploymentResponseBodyDeploymentsStatus
>;
/**
* The team that owns the deployment if any
*/
export type ResponseBodyTeam = {
id: string;
name: string;
slug: string;
avatar?: string | undefined;
};
/**
* If the deployment was created using a Custom Environment, then this property contains information regarding the environment used.
*/
export type GetDeploymentCustomEnvironment2 = {
id: string;
};
/**
* The type of environment (production, preview, or development)
*/
export const GetDeploymentCustomEnvironmentType = {
Development: "development",
Preview: "preview",
Production: "production",
} as const;
/**
* The type of environment (production, preview, or development)
*/
export type GetDeploymentCustomEnvironmentType = ClosedEnum<
typeof GetDeploymentCustomEnvironmentType
>;
/**
* The type of matching to perform
*/
export const GetDeploymentCustomEnvironmentDeploymentsResponseType = {
EndsWith: "endsWith",
Equals: "equals",
StartsWith: "startsWith",
} as const;
/**
* The type of matching to perform
*/
export type GetDeploymentCustomEnvironmentDeploymentsResponseType = ClosedEnum<
typeof GetDeploymentCustomEnvironmentDeploymentsResponseType
>;
/**
* Configuration for matching git branches to this environment
*/
export type GetDeploymentCustomEnvironmentDeploymentsBranchMatcher = {
/**
* The type of matching to perform
*/
type: GetDeploymentCustomEnvironmentDeploymentsResponseType;
/**
* The pattern to match against branch names
*/
pattern: string;
};
/**
* A list of verification challenges, one of which must be completed to verify the domain for use on the project. After the challenge is complete `POST /projects/:idOrName/domains/:domain/verify` to verify the domain. Possible challenges: - If `verification.type = TXT` the `verification.domain` will be checked for a TXT record matching `verification.value`.
*/
export type GetDeploymentCustomEnvironmentDeploymentsVerification = {
type: string;
domain: string;
value: string;
reason: string;
};
/**
* List of domains associated with this environment
*/
export type GetDeploymentCustomEnvironmentDeploymentsDomains = {
name: string;
apexName: string;
projectId: string;
redirect?: string | null | undefined;
redirectStatusCode?: number | null | undefined;
gitBranch?: string | null | undefined;
customEnvironmentId?: string | null | undefined;
updatedAt?: number | undefined;
createdAt?: number | undefined;
/**
* `true` if the domain is verified for use with the project. If `false` it will not be used as an alias on this project until the challenge in `verification` is completed.
*/
verified: boolean;
/**
* A list of verification challenges, one of which must be completed to verify the domain for use on the project. After the challenge is complete `POST /projects/:idOrName/domains/:domain/verify` to verify the domain. Possible challenges: - If `verification.type = TXT` the `verification.domain` will be checked for a TXT record matching `verification.value`.
*/
verification?:
| Array<GetDeploymentCustomEnvironmentDeploymentsVerification>
| undefined;
};
/**
* If the deployment was created using a Custom Environment, then this property contains information regarding the environment used.
*/
export type GetDeploymentCustomEnvironment1 = {
/**
* Unique identifier for the custom environment (format: env_*)
*/
id: string;
/**
* URL-friendly name of the environment
*/
slug: string;
/**
* The type of environment (production, preview, or development)
*/
type: GetDeploymentCustomEnvironmentType;
/**
* Optional description of the environment's purpose
*/
description?: string | undefined;
/**
* Configuration for matching git branches to this environment
*/
branchMatcher?:
| GetDeploymentCustomEnvironmentDeploymentsBranchMatcher
| undefined;
/**
* List of domains associated with this environment
*/
domains?: Array<GetDeploymentCustomEnvironmentDeploymentsDomains> | undefined;
/**
* List of aliases for the current deployment
*/
currentDeploymentAliases?: Array<string> | undefined;
/**
* Timestamp when the environment was created
*/
createdAt: number;
/**
* Timestamp when the environment was last updated
*/
updatedAt: number;
};
export type ResponseBodyCustomEnvironment =
| GetDeploymentCustomEnvironment1
| GetDeploymentCustomEnvironment2;
export const ResponseBodyOomReport = {
OutOfMemory: "out-of-memory",
} as const;
export type ResponseBodyOomReport = ClosedEnum<typeof ResponseBodyOomReport>;
export type ResponseBodyAliasWarning = {
code: string;
message: string;
link?: string | undefined;
action?: string | undefined;
};
/**
* The state of the deployment depending on the process of deploying, or if it is ready or in an error state
*/
export const ResponseBodyReadyState = {
Blocked: "BLOCKED",
Building: "BUILDING",
Canceled: "CANCELED",
Error: "ERROR",
Initializing: "INITIALIZING",
Queued: "QUEUED",
Ready: "READY",
} as const;
/**
* The state of the deployment depending on the process of deploying, or if it is ready or in an error state
*/
export type ResponseBodyReadyState = ClosedEnum<typeof ResponseBodyReadyState>;
export const GetDeploymentResponseBodyDeploymentsType = {
Lambdas: "LAMBDAS",
} as const;
export type GetDeploymentResponseBodyDeploymentsType = ClosedEnum<
typeof GetDeploymentResponseBodyDeploymentsType
>;
/**
* An object that will contain a `code` and a `message` when the aliasing fails, otherwise the value will be `null`
*/
export type ResponseBodyAliasError = {
code: string;
message: string;
};
export const ResponseBodyChecksState = {
Completed: "completed",
Registered: "registered",
Running: "running",
} as const;
export type ResponseBodyChecksState = ClosedEnum<
typeof ResponseBodyChecksState
>;
export const ResponseBodyChecksConclusion = {
Canceled: "canceled",
Failed: "failed",
Skipped: "skipped",
Succeeded: "succeeded",
} as const;
export type ResponseBodyChecksConclusion = ClosedEnum<
typeof ResponseBodyChecksConclusion
>;
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody217Type =
{
Vercel: "vercel",
} as const;
export type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody217Type =
ClosedEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody217Type
>;
export type GetDeploymentGitSourceDeployments17 = {
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody217Type;
ref: string;
sha: string;
org: string;
repo: string;
repoPushedAt?: number | undefined;
};
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody216Type =
{
Bitbucket: "bitbucket",
} as const;
export type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody216Type =
ClosedEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody216Type
>;
export type GetDeploymentGitSourceDeployments16 = {
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody216Type;
ref: string;
sha: string;
owner?: string | undefined;
slug?: string | undefined;
workspaceUuid: string;
repoUuid: string;
};
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody215Type =
{
Gitlab: "gitlab",
} as const;
export type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody215Type =
ClosedEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody215Type
>;
export type GetDeploymentGitSourceDeployments15 = {
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody215Type;
ref: string;
sha: string;
projectId: number;
};
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody214Type =
{
GithubLimited: "github-limited",
} as const;
export type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody214Type =
ClosedEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody214Type
>;
export type GetDeploymentGitSourceDeployments14 = {
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody214Type;
ref: string;
sha: string;
repoId: number;
org?: string | undefined;
repo?: string | undefined;
};
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody213Type =
{
GithubCustomHost: "github-custom-host",
} as const;
export type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody213Type =
ClosedEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody213Type
>;
export type GetDeploymentGitSourceDeployments13 = {
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody213Type;
host: string;
ref: string;
sha: string;
repoId: number;
org?: string | undefined;
repo?: string | undefined;
};
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody212Type =
{
Github: "github",
} as const;
export type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody212Type =
ClosedEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody212Type
>;
export type GetDeploymentGitSourceDeployments12 = {
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody212Type;
ref: string;
sha: string;
repoId: number;
org?: string | undefined;
repo?: string | undefined;
};
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody211Type =
{
Custom: "custom",
} as const;
export type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody211Type =
ClosedEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody211Type
>;
/**
* Allows custom git sources (local folder mounted to the container) in test mode
*/
export type GetDeploymentGitSourceDeployments11 = {
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody211Type;
ref: string;
sha: string;
gitUrl: string;
};
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody210Type =
{
Vercel: "vercel",
} as const;
export type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody210Type =
ClosedEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody210Type
>;
export type GetDeploymentGitSourceDeployments10 = {
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody210Type;
org?: string | undefined;
repo?: string | undefined;
sha: string;
repoPushedAt?: number | undefined;
ref?: string | null | undefined;
prId?: number | null | undefined;
};
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody29Type =
{
Bitbucket: "bitbucket",
} as const;
export type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody29Type =
ClosedEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody29Type
>;
export type GetDeploymentGitSourceDeployments9 = {
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody29Type;
owner: string;
slug: string;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody28Type =
{
Bitbucket: "bitbucket",
} as const;
export type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody28Type =
ClosedEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody28Type
>;
export type GetDeploymentGitSourceDeployments8 = {
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody28Type;
workspaceUuid?: string | undefined;
repoUuid: string;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody27Type =
{
Gitlab: "gitlab",
} as const;
export type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody27Type =
ClosedEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody27Type
>;
export type GetDeploymentGitSourceDeploymentsProjectId = string | number;
export type GetDeploymentGitSourceDeployments7 = {
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody27Type;
projectId: string | number;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody26Type =
{
GithubLimited: "github-limited",
} as const;
export type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody26Type =
ClosedEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody26Type
>;
export type GetDeploymentGitSourceDeployments6 = {
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody26Type;
org: string;
repo: string;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody25Type =
{
GithubLimited: "github-limited",
} as const;
export type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody25Type =
ClosedEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody25Type
>;
export type GetDeploymentGitSourceDeploymentsResponse200RepoId =
| string
| number;
export type GetDeploymentGitSourceDeployments5 = {
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody25Type;
repoId: string | number;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody24Type =
{
GithubCustomHost: "github-custom-host",
} as const;
export type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody24Type =
ClosedEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody24Type
>;
export type GetDeploymentGitSource4 = {
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody24Type;
host: string;
org: string;
repo: string;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody23Type =
{
GithubCustomHost: "github-custom-host",
} as const;
export type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody23Type =
ClosedEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody23Type
>;
export type GetDeploymentGitSourceDeploymentsResponseRepoId = string | number;
export type GetDeploymentGitSource3 = {
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody23Type;
host: string;
repoId: string | number;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody22Type =
{
Github: "github",
} as const;
export type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody22Type =
ClosedEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody22Type
>;
export type GetDeploymentGitSource2 = {
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody22Type;
org: string;
repo: string;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody2Type =
{
Github: "github",
} as const;
export type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody2Type =
ClosedEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody2Type
>;
export type GetDeploymentGitSourceDeploymentsRepoId = string | number;
export type GetDeploymentGitSource1 = {
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody2Type;
repoId: string | number;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export type ResponseBodyGitSource =
| GetDeploymentGitSourceDeployments13
| GetDeploymentGitSourceDeployments16
| GetDeploymentGitSourceDeployments17
| GetDeploymentGitSource4
| GetDeploymentGitSourceDeployments11
| GetDeploymentGitSourceDeployments12
| GetDeploymentGitSourceDeployments14
| GetDeploymentGitSourceDeployments15
| GetDeploymentGitSource2
| GetDeploymentGitSource3
| GetDeploymentGitSourceDeployments6
| GetDeploymentGitSourceDeployments9
| GetDeploymentGitSource1
| GetDeploymentGitSourceDeployments5
| GetDeploymentGitSourceDeployments7
| GetDeploymentGitSourceDeployments8
| GetDeploymentGitSourceDeployments10;
/**
* Current provisioning state
*/
export const GetDeploymentResponseBodyDeploymentsState = {
Complete: "COMPLETE",
Pending: "PENDING",
Timeout: "TIMEOUT",
} as const;
/**
* Current provisioning state
*/
export type GetDeploymentResponseBodyDeploymentsState = ClosedEnum<
typeof GetDeploymentResponseBodyDeploymentsState
>;
/**
* Present when deployment was created with manual provisioning enabled, either explicitly or via the experimental BYOC git flow. The deployment stays in INITIALIZING until /continue is called.
*/
export type ResponseBodyManualProvisioning = {
/**
* Current provisioning state
*/
state: GetDeploymentResponseBodyDeploymentsState;
/**
* Timestamp when manual provisioning completed
*/
completedAt?: number | undefined;
};
/**
* If set it overrides the `projectSettings.nodeVersion` for this deployment.
*/
export const ResponseBodyNodeVersion = {
TenDotX: "10.x",
TwelveDotX: "12.x",
FourteenDotX: "14.x",
SixteenDotX: "16.x",
EighteenDotX: "18.x",
TwentyDotX: "20.x",
TwentyTwoDotX: "22.x",
TwentyFourDotX: "24.x",
EightDot10DotX: "8.10.x",
} as const;
/**
* If set it overrides the `projectSettings.nodeVersion` for this deployment.
*/
export type ResponseBodyNodeVersion = ClosedEnum<
typeof ResponseBodyNodeVersion
>;
/**
* The public project information associated with the deployment.
*/
export type GetDeploymentResponseBodyProject = {
id: string;
name: string;
framework?: string | null | undefined;
};
/**
* Substate of deployment when readyState is 'READY' Tracks whether or not deployment has seen production traffic: - STAGED: never seen production traffic - ROLLING: in the process of having production traffic gradually transitioned. - PROMOTED: has seen production traffic
*/
export const ResponseBodyReadySubstate = {
Promoted: "PROMOTED",
Rolling: "ROLLING",
Staged: "STAGED",
} as const;
/**
* Substate of deployment when readyState is 'READY' Tracks whether or not deployment has seen production traffic: - STAGED: never seen production traffic - ROLLING: in the process of having production traffic gradually transitioned. - PROMOTED: has seen production traffic
*/
export type ResponseBodyReadySubstate = ClosedEnum<
typeof ResponseBodyReadySubstate
>;
/**
* Where was the deployment created from. Best-effort guess for metrics only — not authoritative; do not gate behavior on it.
*/
export const GetDeploymentResponseBodyDeploymentsSource = {
ApiTriggerGitDeploy: "api-trigger-git-deploy",
Cli: "cli",
CloneRepo: "clone/repo",
Drop: "drop",
Git: "git",
Import: "import",
ImportRepo: "import/repo",
Redeploy: "redeploy",
V0Web: "v0-web",
} as const;
/**
* Where was the deployment created from. Best-effort guess for metrics only — not authoritative; do not gate behavior on it.
*/
export type GetDeploymentResponseBodyDeploymentsSource = ClosedEnum<
typeof GetDeploymentResponseBodyDeploymentsSource
>;
/**
* If defined, either `staging` if a staging alias in the format `<project>.<team>.now.sh` was assigned upon creation, or `production` if the aliases from `alias` were assigned. `null` value indicates the "preview" deployment.
*/
export const ResponseBodyTarget = {
Production: "production",
Staging: "staging",
} as const;
/**
* If defined, either `staging` if a staging alias in the format `<project>.<team>.now.sh` was assigned upon creation, or `production` if the aliases from `alias` were assigned. `null` value indicates the "preview" deployment.
*/
export type ResponseBodyTarget = ClosedEnum<typeof ResponseBodyTarget>;
export type ResponseBodyOidcTokenClaims = {
iss: string;
sub: string;
scope: string;
aud: string;
owner: string;
ownerId: string;
project: string;
projectId: string;
environment: string;
customEnvironmentId?: string | undefined;
plan?: string | undefined;
};
/**
* The deployment including only public information
*/
export type GetDeploymentResponseBody2 = {
/**
* A list of all the aliases (default aliases, staging aliases and production aliases) that were assigned upon deployment creation
*/
alias?: Array<string> | undefined;
/**
* A boolean that will be true when the aliases from the alias property were assigned successfully
*/
aliasAssigned: boolean;
bootedAt: number;
buildingAt: number;
/**
* Since April 2025 it necessary for On-Demand Concurrency Minutes calculation
*/
buildContainerFinishedAt?: number | undefined;
buildSkipped: boolean;
/**
* Information about the deployment creator
*/
creator: ResponseBodyCreator;
initReadyAt?: number | undefined;
isFirstBranchDeployment?: boolean | undefined;
lambdas?: Array<ResponseBodyLambdas> | undefined;
/**
* A boolean representing if the deployment is public or not. By default this is `false`
*/
public: boolean;
ready?: number | undefined;
status: GetDeploymentResponseBodyDeploymentsStatus;
/**
* The team that owns the deployment if any
*/
team?: ResponseBodyTeam | undefined;
/**
* An array of domains that were provided by the user when creating the Deployment.
*/
userAliases?: Array<string> | undefined;
/**
* Whether or not preview comments are enabled for the deployment
*/
previewCommentsEnabled?: boolean | undefined;
ttyBuildLogs?: boolean | undefined;
customEnvironment?:
| GetDeploymentCustomEnvironment1
| GetDeploymentCustomEnvironment2
| undefined;
oomReport?: ResponseBodyOomReport | undefined;
readyStateReason?: string | undefined;
aliasWarning?: ResponseBodyAliasWarning | null | undefined;
/**
* A string holding the unique ID of the deployment
*/
id: string;
/**
* A number containing the date when the deployment was created in milliseconds
*/
createdAt: number;
/**
* The state of the deployment depending on the process of deploying, or if it is ready or in an error state
*/
readyState: ResponseBodyReadyState;
/**
* The name of the project associated with the deployment at the time that the deployment was created
*/
name: string;
type: GetDeploymentResponseBodyDeploymentsType;
errorMessage?: string | null | undefined;
/**
* An object that will contain a `code` and a `message` when the aliasing fails, otherwise the value will be `null`
*/
aliasError?: ResponseBodyAliasError | null | undefined;
aliasFinal?: string | null | undefined;
/**
* applies to custom domains only, defaults to `true`
*/
autoAssignCustomDomains?: boolean | undefined;
automaticAliases?: Array<string> | undefined;
buildErrorAt?: number | undefined;
checksState?: ResponseBodyChecksState | undefined;
checksConclusion?: ResponseBodyChecksConclusion | undefined;
/**
* A number containing the date when the deployment was deleted at milliseconds
*/
deletedAt?: number | null | undefined;
/**
* Computed field that is only available for deployments with a microfrontend configuration.
*/
defaultRoute?: string | undefined;
canceledAt?: number | undefined;
errorCode?: string | undefined;
errorLink?: string | undefined;
errorStep?: string | undefined;
/**
* Since November 2023 this field defines a set of regions that we will deploy the lambda to passively Lambdas will be deployed to these regions but only invoked if all of the primary `regions` are marked as out of service
*/
passiveRegions?: Array<string> | undefined;
gitSource?:
| GetDeploymentGitSourceDeployments13
| GetDeploymentGitSourceDeployments16
| GetDeploymentGitSourceDeployments17
| GetDeploymentGitSource4
| GetDeploymentGitSourceDeployments11
| GetDeploymentGitSourceDeployments12
| GetDeploymentGitSourceDeployments14
| GetDeploymentGitSourceDeployments15
| GetDeploymentGitSource2
| GetDeploymentGitSource3
| GetDeploymentGitSourceDeployments6
| GetDeploymentGitSourceDeployments9
| GetDeploymentGitSource1
| GetDeploymentGitSourceDeployments5
| GetDeploymentGitSourceDeployments7
| GetDeploymentGitSourceDeployments8
| GetDeploymentGitSourceDeployments10
| undefined;
/**
* Present when deployment was created with manual provisioning enabled, either explicitly or via the experimental BYOC git flow. The deployment stays in INITIALIZING until /continue is called.
*/
manualProvisioning?: ResponseBodyManualProvisioning | undefined;
meta: { [k: string]: string };
originCacheRegion?: string | undefined;
/**
* If set it overrides the `projectSettings.nodeVersion` for this deployment.
*/
nodeVersion?: ResponseBodyNodeVersion | undefined;
/**
* The public project information associated with the deployment.
*/
project?: GetDeploymentResponseBodyProject | undefined;
prebuilt?: boolean | undefined;
/**
* Substate of deployment when readyState is 'READY' Tracks whether or not deployment has seen production traffic: - STAGED: never seen production traffic - ROLLING: in the process of having production traffic gradually transitioned. - PROMOTED: has seen production traffic
*/
readySubstate?: ResponseBodyReadySubstate | undefined;
/**
* The regions the deployment exists in
*/
regions: Array<string>;
/**
* flag to indicate if the deployment was deleted by retention policy
*/
softDeletedByRetention?: boolean | undefined;
/**
* Where was the deployment created from. Best-effort guess for metrics only — not authoritative; do not gate behavior on it.
*/
source?: GetDeploymentResponseBodyDeploymentsSource | undefined;
/**
* If defined, either `staging` if a staging alias in the format `<project>.<team>.now.sh` was assigned upon creation, or `production` if the aliases from `alias` were assigned. `null` value indicates the "preview" deployment.
*/
target?: ResponseBodyTarget | null | undefined;
/**
* A number containing the date when the deployment was undeleted at milliseconds
*/
undeletedAt?: number | undefined;
/**
* A string with the unique URL of the deployment
*/
url: string;
/**
* Since January 2025 User-configured deployment ID for skew protection with pre-built deployments. This is set when users configure a custom deploymentId in their next.config.js file. This allows Next.js to use skew protection even when deployments are pre-built outside of Vercel's build system.
*/
userConfiguredDeploymentId?: string | undefined;
/**
* The platform version that was used to create the deployment.
*/
version: number;
oidcTokenClaims?: ResponseBodyOidcTokenClaims | undefined;
};
export type ResponseBodyAliasAssignedAt = number | boolean;
export type ResponseBodyBuild = {
env: Array<string>;
};
export type ResponseBodyBuilds = {
use: string;
src?: string | undefined;
config?: { [k: string]: any } | undefined;
};
export const GetDeploymentResponseBodyDeploymentsNodeVersion = {
TenDotX: "10.x",
TwelveDotX: "12.x",
FourteenDotX: "14.x",
SixteenDotX: "16.x",
EighteenDotX: "18.x",
TwentyDotX: "20.x",
TwentyTwoDotX: "22.x",
TwentyFourDotX: "24.x",
EightDot10DotX: "8.10.x",
} as const;
export type GetDeploymentResponseBodyDeploymentsNodeVersion = ClosedEnum<
typeof GetDeploymentResponseBodyDeploymentsNodeVersion
>;
export const GetDeploymentResponseBodyFramework = {
ActixWeb: "actix-web",
Angular: "angular",
Ash: "ash",
Astro: "astro",
Axum: "axum",
Blitzjs: "blitzjs",
Brunch: "brunch",
Bun: "bun",
CreateReactApp: "create-react-app",
Django: "django",
Docusaurus: "docusaurus",
Docusaurus2: "docusaurus-2",
Dojo: "dojo",
Eleventy: "eleventy",
Elysia: "elysia",
Ember: "ember",
Eve: "eve",
Express: "express",
Fastapi: "fastapi",
Fasthtml: "fasthtml",
Fastify: "fastify",
Flask: "flask",
Gatsby: "gatsby",
Go: "go",
Gridsome: "gridsome",
H3: "h3",
Hexo: "hexo",
Hono: "hono",
Hugo: "hugo",
Hydrogen: "hydrogen",
IonicAngular: "ionic-angular",
IonicReact: "ionic-react",
Jekyll: "jekyll",
Koa: "koa",
Mastra: "mastra",
Middleman: "middleman",
Nestjs: "nestjs",
Nextjs: "nextjs",
Nitro: "nitro",
Node: "node",
Nuxtjs: "nuxtjs",
Parcel: "parcel",
Polymer: "polymer",
Preact: "preact",
Python: "python",
ReactRouter: "react-router",
Redwoodjs: "redwoodjs",
Remix: "remix",
Ruby: "ruby",
Rust: "rust",
Saber: "saber",
Sanity: "sanity",
SanityV2: "sanity-v2",
Sapper: "sapper",
Scully: "scully",
Services: "services",
Solidstart: "solidstart",
Solidstart1: "solidstart-1",
Stencil: "stencil",
Storybook: "storybook",
Svelte: "svelte",
Sveltekit: "sveltekit",
Sveltekit1: "sveltekit-1",
TanstackStart: "tanstack-start",
Umijs: "umijs",
Vite: "vite",
Vitepress: "vitepress",
Vue: "vue",
Vuepress: "vuepress",
Xmcp: "xmcp",
Zola: "zola",
} as const;
export type GetDeploymentResponseBodyFramework = ClosedEnum<
typeof GetDeploymentResponseBodyFramework
>;
export type GetDeploymentResponseBodySpeedInsights = {
id: string;
enabledAt?: number | undefined;
disabledAt?: number | undefined;
canceledAt?: number | undefined;
hasData?: boolean | undefined;
paidAt?: number | undefined;
};
export type GetDeploymentResponseBodyWebAnalytics = {
id: string;
disabledAt?: number | undefined;
canceledAt?: number | undefined;
enabledAt?: number | undefined;
hasData?: true | undefined;
};
export type ResponseBodyProjectSettings = {
nodeVersion?: GetDeploymentResponseBodyDeploymentsNodeVersion | undefined;
buildCommand?: string | null | undefined;
devCommand?: string | null | undefined;
framework?: GetDeploymentResponseBodyFramework | null | undefined;
commandForIgnoringBuildStep?: string | null | undefined;
installCommand?: string | null | undefined;
outputDirectory?: string | null | undefined;
speedInsights?: GetDeploymentResponseBodySpeedInsights | undefined;
webAnalytics?: GetDeploymentResponseBodyWebAnalytics | undefined;
};
export const GetDeploymentResponseBodyDeploymentsResponseStatus = {
Error: "error",
Pending: "pending",
Ready: "ready",
Skipped: "skipped",
Timeout: "timeout",
} as const;
export type GetDeploymentResponseBodyDeploymentsResponseStatus = ClosedEnum<
typeof GetDeploymentResponseBodyDeploymentsResponseStatus
>;
export type ResponseBodyIntegrations = {
status: GetDeploymentResponseBodyDeploymentsResponseStatus;
startedAt: number;
claimedAt?: number | undefined;
completedAt?: number | undefined;
skippedAt?: number | undefined;
skippedBy?: string | undefined;
};
/**
* Must be `http` or `https`.
*/
export const ResponseBodyProtocol = {
Http: "http",
Https: "https",
} as const;
/**
* Must be `http` or `https`.
*/
export type ResponseBodyProtocol = ClosedEnum<typeof ResponseBodyProtocol>;
export type ResponseBodyRemotePatterns = {
/**
* Must be `http` or `https`.
*/
protocol?: ResponseBodyProtocol | undefined;
/**
* Can be literal or wildcard. Single `*` matches a single subdomain. Double `**` matches any number of subdomains.
*/
hostname: string;
/**
* Can be literal port such as `8080` or empty string meaning no port.
*/
port?: string | undefined;
/**
* Can be literal or wildcard. Single `*` matches a single path segment. Double `**` matches any number of path segments.
*/
pathname?: string | undefined;
/**
* Can be literal query string such as `?v=1` or empty string meaning no query string.
*/
search?: string | undefined;
};
export type ResponseBodyLocalPatterns = {
/**
* Can be literal or wildcard. Single `*` matches a single path segment. Double `**` matches any number of path segments.
*/
pathname?: string | undefined;
/**
* Can be literal query string such as `?v=1` or empty string meaning no query string.
*/
search?: string | undefined;
};
export const ResponseBodyFormats = {
ImageAvif: "image/avif",
ImageWebp: "image/webp",
} as const;
export type ResponseBodyFormats = ClosedEnum<typeof ResponseBodyFormats>;
export const ResponseBodyContentDispositionType = {
Attachment: "attachment",
Inline: "inline",
} as const;
export type ResponseBodyContentDispositionType = ClosedEnum<
typeof ResponseBodyContentDispositionType
>;
export type ResponseBodyImages = {
sizes?: Array<number> | undefined;
qualities?: Array<number> | undefined;
domains?: Array<string> | undefined;
remotePatterns?: Array<ResponseBodyRemotePatterns> | undefined;
localPatterns?: Array<ResponseBodyLocalPatterns> | undefined;
minimumCacheTTL?: number | undefined;
formats?: Array<ResponseBodyFormats> | undefined;
dangerouslyAllowSVG?: boolean | undefined;
contentSecurityPolicy?: string | undefined;
contentDispositionType?: ResponseBodyContentDispositionType | undefined;
};
/**
* Information about the deployment creator
*/
export type GetDeploymentResponseBodyCreator = {
/**
* The ID of the user that created the deployment
*/
uid: string;
/**
* The username of the user that created the deployment
*/
username?: string | undefined;
/**
* The avatar of the user that created the deployment
*/
avatar?: string | undefined;
};
export const GetDeploymentResponseBodyDeploymentsReadyState = {
Building: "BUILDING",
Error: "ERROR",
Initializing: "INITIALIZING",
Ready: "READY",
} as const;
export type GetDeploymentResponseBodyDeploymentsReadyState = ClosedEnum<
typeof GetDeploymentResponseBodyDeploymentsReadyState
>;
export type ResponseBodyOutput = {
path: string;
functionName: string;
};
/**
* A partial representation of a Build used by the deployment endpoint.
*/
export type GetDeploymentResponseBodyLambdas = {
id: string;
createdAt?: number | undefined;
readyState?: GetDeploymentResponseBodyDeploymentsReadyState | undefined;
entrypoint?: string | null | undefined;
readyStateAt?: number | undefined;
output: Array<ResponseBodyOutput>;
};
export const GetDeploymentResponseBodyStatus = {
Blocked: "BLOCKED",
Building: "BUILDING",
Canceled: "CANCELED",
Error: "ERROR",
Initializing: "INITIALIZING",
Queued: "QUEUED",
Ready: "READY",
} as const;
export type GetDeploymentResponseBodyStatus = ClosedEnum<
typeof GetDeploymentResponseBodyStatus
>;
/**
* The team that owns the deployment if any
*/
export type GetDeploymentResponseBodyTeam = {
id: string;
name: string;
slug: string;
avatar?: string | undefined;
};
/**
* If the deployment was created using a Custom Environment, then this property contains information regarding the environment used.
*/
export type GetDeploymentCustomEnvironmentDeployments2 = {
id: string;
};
/**
* The type of environment (production, preview, or development)
*/
export const GetDeploymentCustomEnvironmentDeploymentsType = {
Development: "development",
Preview: "preview",
Production: "production",
} as const;
/**
* The type of environment (production, preview, or development)
*/
export type GetDeploymentCustomEnvironmentDeploymentsType = ClosedEnum<
typeof GetDeploymentCustomEnvironmentDeploymentsType
>;
/**
* The type of matching to perform
*/
export const GetDeploymentCustomEnvironmentDeploymentsResponse200Type = {
EndsWith: "endsWith",
Equals: "equals",
StartsWith: "startsWith",
} as const;
/**
* The type of matching to perform
*/
export type GetDeploymentCustomEnvironmentDeploymentsResponse200Type =
ClosedEnum<typeof GetDeploymentCustomEnvironmentDeploymentsResponse200Type>;
/**
* Configuration for matching git branches to this environment
*/
export type GetDeploymentCustomEnvironmentBranchMatcher = {
/**
* The type of matching to perform
*/
type: GetDeploymentCustomEnvironmentDeploymentsResponse200Type;
/**
* The pattern to match against branch names
*/
pattern: string;
};
/**
* A list of verification challenges, one of which must be completed to verify the domain for use on the project. After the challenge is complete `POST /projects/:idOrName/domains/:domain/verify` to verify the domain. Possible challenges: - If `verification.type = TXT` the `verification.domain` will be checked for a TXT record matching `verification.value`.
*/
export type GetDeploymentCustomEnvironmentVerification = {
type: string;
domain: string;
value: string;
reason: string;
};
/**
* List of domains associated with this environment
*/
export type GetDeploymentCustomEnvironmentDomains = {
name: string;
apexName: string;
projectId: string;
redirect?: string | null | undefined;
redirectStatusCode?: number | null | undefined;
gitBranch?: string | null | undefined;
customEnvironmentId?: string | null | undefined;
updatedAt?: number | undefined;
createdAt?: number | undefined;
/**
* `true` if the domain is verified for use with the project. If `false` it will not be used as an alias on this project until the challenge in `verification` is completed.
*/
verified: boolean;
/**
* A list of verification challenges, one of which must be completed to verify the domain for use on the project. After the challenge is complete `POST /projects/:idOrName/domains/:domain/verify` to verify the domain. Possible challenges: - If `verification.type = TXT` the `verification.domain` will be checked for a TXT record matching `verification.value`.
*/
verification?: Array<GetDeploymentCustomEnvironmentVerification> | undefined;
};
/**
* If the deployment was created using a Custom Environment, then this property contains information regarding the environment used.
*/
export type GetDeploymentCustomEnvironmentDeployments1 = {
/**
* Unique identifier for the custom environment (format: env_*)
*/
id: string;
/**
* URL-friendly name of the environment
*/
slug: string;
/**
* The type of environment (production, preview, or development)
*/
type: GetDeploymentCustomEnvironmentDeploymentsType;
/**
* Optional description of the environment's purpose
*/
description?: string | undefined;
/**
* Configuration for matching git branches to this environment
*/
branchMatcher?: GetDeploymentCustomEnvironmentBranchMatcher | undefined;
/**
* List of domains associated with this environment
*/
domains?: Array<GetDeploymentCustomEnvironmentDomains> | undefined;
/**
* List of aliases for the current deployment
*/
currentDeploymentAliases?: Array<string> | undefined;
/**
* Timestamp when the environment was created
*/
createdAt: number;
/**
* Timestamp when the environment was last updated
*/
updatedAt: number;
};
export type GetDeploymentResponseBodyCustomEnvironment =
| GetDeploymentCustomEnvironmentDeployments1
| GetDeploymentCustomEnvironmentDeployments2;
export const GetDeploymentResponseBodyOomReport = {
OutOfMemory: "out-of-memory",
} as const;
export type GetDeploymentResponseBodyOomReport = ClosedEnum<
typeof GetDeploymentResponseBodyOomReport
>;
export type GetDeploymentResponseBodyAliasWarning = {
code: string;
message: string;
link?: string | undefined;
action?: string | undefined;
};
/**
* The state of the deployment depending on the process of deploying, or if it is ready or in an error state
*/
export const GetDeploymentResponseBodyReadyState = {
Blocked: "BLOCKED",
Building: "BUILDING",
Canceled: "CANCELED",
Error: "ERROR",
Initializing: "INITIALIZING",
Queued: "QUEUED",
Ready: "READY",
} as const;
/**
* The state of the deployment depending on the process of deploying, or if it is ready or in an error state
*/
export type GetDeploymentResponseBodyReadyState = ClosedEnum<
typeof GetDeploymentResponseBodyReadyState
>;
export const GetDeploymentResponseBodyType = {
Lambdas: "LAMBDAS",
} as const;
export type GetDeploymentResponseBodyType = ClosedEnum<
typeof GetDeploymentResponseBodyType
>;
/**
* An object that will contain a `code` and a `message` when the aliasing fails, otherwise the value will be `null`
*/
export type GetDeploymentResponseBodyAliasError = {
code: string;
message: string;
};
export const GetDeploymentResponseBodyChecksState = {
Completed: "completed",
Registered: "registered",
Running: "running",
} as const;
export type GetDeploymentResponseBodyChecksState = ClosedEnum<
typeof GetDeploymentResponseBodyChecksState
>;
export const GetDeploymentResponseBodyChecksConclusion = {
Canceled: "canceled",
Failed: "failed",
Skipped: "skipped",
Succeeded: "succeeded",
} as const;
export type GetDeploymentResponseBodyChecksConclusion = ClosedEnum<
typeof GetDeploymentResponseBodyChecksConclusion
>;
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody117Type =
{
Vercel: "vercel",
} as const;
export type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody117Type =
ClosedEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody117Type
>;
export type GetDeploymentGitSource17 = {
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody117Type;
ref: string;
sha: string;
org: string;
repo: string;
repoPushedAt?: number | undefined;
};
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody116Type =
{
Bitbucket: "bitbucket",
} as const;
export type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody116Type =
ClosedEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody116Type
>;
export type GetDeploymentGitSource16 = {
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody116Type;
ref: string;
sha: string;
owner?: string | undefined;
slug?: string | undefined;
workspaceUuid: string;
repoUuid: string;
};
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody115Type =
{
Gitlab: "gitlab",
} as const;
export type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody115Type =
ClosedEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody115Type
>;
export type GetDeploymentGitSource15 = {
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody115Type;
ref: string;
sha: string;
projectId: number;
};
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody114Type =
{
GithubLimited: "github-limited",
} as const;
export type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody114Type =
ClosedEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody114Type
>;
export type GetDeploymentGitSource14 = {
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody114Type;
ref: string;
sha: string;
repoId: number;
org?: string | undefined;
repo?: string | undefined;
};
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody113Type =
{
GithubCustomHost: "github-custom-host",
} as const;
export type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody113Type =
ClosedEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody113Type
>;
export type GetDeploymentGitSource13 = {
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody113Type;
host: string;
ref: string;
sha: string;
repoId: number;
org?: string | undefined;
repo?: string | undefined;
};
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody112Type =
{
Github: "github",
} as const;
export type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody112Type =
ClosedEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody112Type
>;
export type GetDeploymentGitSource12 = {
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody112Type;
ref: string;
sha: string;
repoId: number;
org?: string | undefined;
repo?: string | undefined;
};
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody111Type =
{
Custom: "custom",
} as const;
export type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody111Type =
ClosedEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody111Type
>;
/**
* Allows custom git sources (local folder mounted to the container) in test mode
*/
export type GetDeploymentGitSource11 = {
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody111Type;
ref: string;
sha: string;
gitUrl: string;
};
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody110Type =
{
Vercel: "vercel",
} as const;
export type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody110Type =
ClosedEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody110Type
>;
export type GetDeploymentGitSource10 = {
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody110Type;
org?: string | undefined;
repo?: string | undefined;
sha: string;
repoPushedAt?: number | undefined;
ref?: string | null | undefined;
prId?: number | null | undefined;
};
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody19Type =
{
Bitbucket: "bitbucket",
} as const;
export type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody19Type =
ClosedEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody19Type
>;
export type GetDeploymentGitSource9 = {
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody19Type;
owner: string;
slug: string;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody1Type =
{
Bitbucket: "bitbucket",
} as const;
export type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody1Type =
ClosedEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody1Type
>;
export type GetDeploymentGitSource8 = {
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody1Type;
workspaceUuid?: string | undefined;
repoUuid: string;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType =
{
Gitlab: "gitlab",
} as const;
export type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType =
ClosedEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType
>;
export type GetDeploymentGitSourceProjectId = string | number;
export type GetDeploymentGitSource7 = {
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType;
projectId: string | number;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONType = {
GithubLimited: "github-limited",
} as const;
export type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONType =
ClosedEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONType
>;
export type GetDeploymentGitSource6 = {
type: GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONType;
org: string;
repo: string;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export const GetDeploymentGitSourceDeploymentsResponse200Type = {
GithubLimited: "github-limited",
} as const;
export type GetDeploymentGitSourceDeploymentsResponse200Type = ClosedEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200Type
>;
export type GetDeploymentGitSourceRepoId = string | number;
export type GetDeploymentGitSource5 = {
type: GetDeploymentGitSourceDeploymentsResponse200Type;
repoId: string | number;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export const GetDeploymentGitSourceDeploymentsResponseType = {
GithubCustomHost: "github-custom-host",
} as const;
export type GetDeploymentGitSourceDeploymentsResponseType = ClosedEnum<
typeof GetDeploymentGitSourceDeploymentsResponseType
>;
export type GetDeploymentGitSourceDeployments4 = {
type: GetDeploymentGitSourceDeploymentsResponseType;
host: string;
org: string;
repo: string;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export const GetDeploymentGitSourceDeploymentsType = {
GithubCustomHost: "github-custom-host",
} as const;
export type GetDeploymentGitSourceDeploymentsType = ClosedEnum<
typeof GetDeploymentGitSourceDeploymentsType
>;
export type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyRepoId =
| string
| number;
export type GetDeploymentGitSourceDeployments3 = {
type: GetDeploymentGitSourceDeploymentsType;
host: string;
repoId: string | number;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export const GetDeploymentGitSourceType = {
Github: "github",
} as const;
export type GetDeploymentGitSourceType = ClosedEnum<
typeof GetDeploymentGitSourceType
>;
export type GetDeploymentGitSourceDeployments2 = {
type: GetDeploymentGitSourceType;
org: string;
repo: string;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody11Type =
{
Github: "github",
} as const;
export type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody11Type =
ClosedEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody11Type
>;
export type GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONRepoId =
| string
| number;
export type GetDeploymentGitSourceDeployments1 = {
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody11Type;
repoId: string | number;
ref?: string | null | undefined;
sha?: string | undefined;
prId?: number | null | undefined;
};
export type GetDeploymentResponseBodyGitSource =
| GetDeploymentGitSource13
| GetDeploymentGitSource16
| GetDeploymentGitSource17
| GetDeploymentGitSourceDeployments4
| GetDeploymentGitSource11
| GetDeploymentGitSource12
| GetDeploymentGitSource14
| GetDeploymentGitSource15
| GetDeploymentGitSourceDeployments2
| GetDeploymentGitSourceDeployments3
| GetDeploymentGitSource6
| GetDeploymentGitSource9
| GetDeploymentGitSourceDeployments1
| GetDeploymentGitSource5
| GetDeploymentGitSource7
| GetDeploymentGitSource8
| GetDeploymentGitSource10;
/**
* Current provisioning state
*/
export const GetDeploymentResponseBodyState = {
Complete: "COMPLETE",
Pending: "PENDING",
Timeout: "TIMEOUT",
} as const;
/**
* Current provisioning state
*/
export type GetDeploymentResponseBodyState = ClosedEnum<
typeof GetDeploymentResponseBodyState
>;
/**
* Present when deployment was created with manual provisioning enabled, either explicitly or via the experimental BYOC git flow. The deployment stays in INITIALIZING until /continue is called.
*/
export type GetDeploymentResponseBodyManualProvisioning = {
/**
* Current provisioning state
*/
state: GetDeploymentResponseBodyState;
/**
* Timestamp when manual provisioning completed
*/
completedAt?: number | undefined;
};
/**
* If set it overrides the `projectSettings.nodeVersion` for this deployment.
*/
export const GetDeploymentResponseBodyNodeVersion = {
TenDotX: "10.x",
TwelveDotX: "12.x",
FourteenDotX: "14.x",
SixteenDotX: "16.x",
EighteenDotX: "18.x",
TwentyDotX: "20.x",
TwentyTwoDotX: "22.x",
TwentyFourDotX: "24.x",
EightDot10DotX: "8.10.x",
} as const;
/**
* If set it overrides the `projectSettings.nodeVersion` for this deployment.
*/
export type GetDeploymentResponseBodyNodeVersion = ClosedEnum<
typeof GetDeploymentResponseBodyNodeVersion
>;
/**
* The public project information associated with the deployment.
*/
export type ResponseBodyProject = {
id: string;
name: string;
framework?: string | null | undefined;
};
/** @internal */
export type GetDeploymentRequest$Outbound = {
idOrUrl: string;
withGitRepoInfo?: string | undefined;
teamId?: string | undefined;
slug?: string | undefined;
};
/** @internal */
export const GetDeploymentRequest$outboundSchema: z.ZodType<
GetDeploymentRequest$Outbound,
z.ZodTypeDef,
GetDeploymentRequest
> = z.object({
idOrUrl: z.string(),
withGitRepoInfo: z.string().optional(),
teamId: z.string().optional(),
slug: z.string().optional(),
});
export function getDeploymentRequestToJSON(
getDeploymentRequest: GetDeploymentRequest,
): string {
return JSON.stringify(
GetDeploymentRequest$outboundSchema.parse(getDeploymentRequest),
);
}
/** @internal */
export const ResponseBodyCreator$inboundSchema: z.ZodType<
ResponseBodyCreator,
z.ZodTypeDef,
unknown
> = z.object({
uid: types.string(),
username: types.optional(types.string()),
avatar: types.optional(types.string()),
});
export function responseBodyCreatorFromJSON(
jsonString: string,
): SafeParseResult<ResponseBodyCreator, SDKValidationError> {
return safeParse(
jsonString,
(x) => ResponseBodyCreator$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ResponseBodyCreator' from JSON`,
);
}
/** @internal */
export const GetDeploymentResponseBodyDeploymentsResponseReadyState$inboundSchema:
z.ZodNativeEnum<
typeof GetDeploymentResponseBodyDeploymentsResponseReadyState
> = z.nativeEnum(GetDeploymentResponseBodyDeploymentsResponseReadyState);
/** @internal */
export const GetDeploymentResponseBodyOutput$inboundSchema: z.ZodType<
GetDeploymentResponseBodyOutput,
z.ZodTypeDef,
unknown
> = z.object({
path: types.string(),
functionName: types.string(),
});
export function getDeploymentResponseBodyOutputFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentResponseBodyOutput, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentResponseBodyOutput$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentResponseBodyOutput' from JSON`,
);
}
/** @internal */
export const ResponseBodyLambdas$inboundSchema: z.ZodType<
ResponseBodyLambdas,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
createdAt: types.optional(types.number()),
readyState: types.optional(
GetDeploymentResponseBodyDeploymentsResponseReadyState$inboundSchema,
),
entrypoint: z.nullable(types.string()).optional(),
readyStateAt: types.optional(types.number()),
output: z.array(z.lazy(() => GetDeploymentResponseBodyOutput$inboundSchema)),
});
export function responseBodyLambdasFromJSON(
jsonString: string,
): SafeParseResult<ResponseBodyLambdas, SDKValidationError> {
return safeParse(
jsonString,
(x) => ResponseBodyLambdas$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ResponseBodyLambdas' from JSON`,
);
}
/** @internal */
export const GetDeploymentResponseBodyDeploymentsStatus$inboundSchema:
z.ZodNativeEnum<typeof GetDeploymentResponseBodyDeploymentsStatus> = z
.nativeEnum(GetDeploymentResponseBodyDeploymentsStatus);
/** @internal */
export const ResponseBodyTeam$inboundSchema: z.ZodType<
ResponseBodyTeam,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
name: types.string(),
slug: types.string(),
avatar: types.optional(types.string()),
});
export function responseBodyTeamFromJSON(
jsonString: string,
): SafeParseResult<ResponseBodyTeam, SDKValidationError> {
return safeParse(
jsonString,
(x) => ResponseBodyTeam$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ResponseBodyTeam' from JSON`,
);
}
/** @internal */
export const GetDeploymentCustomEnvironment2$inboundSchema: z.ZodType<
GetDeploymentCustomEnvironment2,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
});
export function getDeploymentCustomEnvironment2FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentCustomEnvironment2, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentCustomEnvironment2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentCustomEnvironment2' from JSON`,
);
}
/** @internal */
export const GetDeploymentCustomEnvironmentType$inboundSchema: z.ZodNativeEnum<
typeof GetDeploymentCustomEnvironmentType
> = z.nativeEnum(GetDeploymentCustomEnvironmentType);
/** @internal */
export const GetDeploymentCustomEnvironmentDeploymentsResponseType$inboundSchema:
z.ZodNativeEnum<
typeof GetDeploymentCustomEnvironmentDeploymentsResponseType
> = z.nativeEnum(GetDeploymentCustomEnvironmentDeploymentsResponseType);
/** @internal */
export const GetDeploymentCustomEnvironmentDeploymentsBranchMatcher$inboundSchema:
z.ZodType<
GetDeploymentCustomEnvironmentDeploymentsBranchMatcher,
z.ZodTypeDef,
unknown
> = z.object({
type: GetDeploymentCustomEnvironmentDeploymentsResponseType$inboundSchema,
pattern: types.string(),
});
export function getDeploymentCustomEnvironmentDeploymentsBranchMatcherFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentCustomEnvironmentDeploymentsBranchMatcher,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentCustomEnvironmentDeploymentsBranchMatcher$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentCustomEnvironmentDeploymentsBranchMatcher' from JSON`,
);
}
/** @internal */
export const GetDeploymentCustomEnvironmentDeploymentsVerification$inboundSchema:
z.ZodType<
GetDeploymentCustomEnvironmentDeploymentsVerification,
z.ZodTypeDef,
unknown
> = z.object({
type: types.string(),
domain: types.string(),
value: types.string(),
reason: types.string(),
});
export function getDeploymentCustomEnvironmentDeploymentsVerificationFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentCustomEnvironmentDeploymentsVerification,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentCustomEnvironmentDeploymentsVerification$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetDeploymentCustomEnvironmentDeploymentsVerification' from JSON`,
);
}
/** @internal */
export const GetDeploymentCustomEnvironmentDeploymentsDomains$inboundSchema:
z.ZodType<
GetDeploymentCustomEnvironmentDeploymentsDomains,
z.ZodTypeDef,
unknown
> = z.object({
name: types.string(),
apexName: types.string(),
projectId: types.string(),
redirect: z.nullable(types.string()).optional(),
redirectStatusCode: z.nullable(types.number()).optional(),
gitBranch: z.nullable(types.string()).optional(),
customEnvironmentId: z.nullable(types.string()).optional(),
updatedAt: types.optional(types.number()),
createdAt: types.optional(types.number()),
verified: types.boolean(),
verification: types.optional(
z.array(z.lazy(() =>
GetDeploymentCustomEnvironmentDeploymentsVerification$inboundSchema
)),
),
});
export function getDeploymentCustomEnvironmentDeploymentsDomainsFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentCustomEnvironmentDeploymentsDomains,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentCustomEnvironmentDeploymentsDomains$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetDeploymentCustomEnvironmentDeploymentsDomains' from JSON`,
);
}
/** @internal */
export const GetDeploymentCustomEnvironment1$inboundSchema: z.ZodType<
GetDeploymentCustomEnvironment1,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
slug: types.string(),
type: GetDeploymentCustomEnvironmentType$inboundSchema,
description: types.optional(types.string()),
branchMatcher: types.optional(
z.lazy(() =>
GetDeploymentCustomEnvironmentDeploymentsBranchMatcher$inboundSchema
),
),
domains: types.optional(
z.array(z.lazy(() =>
GetDeploymentCustomEnvironmentDeploymentsDomains$inboundSchema
)),
),
currentDeploymentAliases: types.optional(z.array(types.string())),
createdAt: types.number(),
updatedAt: types.number(),
});
export function getDeploymentCustomEnvironment1FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentCustomEnvironment1, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentCustomEnvironment1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentCustomEnvironment1' from JSON`,
);
}
/** @internal */
export const ResponseBodyCustomEnvironment$inboundSchema: z.ZodType<
ResponseBodyCustomEnvironment,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => GetDeploymentCustomEnvironment1$inboundSchema),
z.lazy(() => GetDeploymentCustomEnvironment2$inboundSchema),
]);
export function responseBodyCustomEnvironmentFromJSON(
jsonString: string,
): SafeParseResult<ResponseBodyCustomEnvironment, SDKValidationError> {
return safeParse(
jsonString,
(x) => ResponseBodyCustomEnvironment$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ResponseBodyCustomEnvironment' from JSON`,
);
}
/** @internal */
export const ResponseBodyOomReport$inboundSchema: z.ZodNativeEnum<
typeof ResponseBodyOomReport
> = z.nativeEnum(ResponseBodyOomReport);
/** @internal */
export const ResponseBodyAliasWarning$inboundSchema: z.ZodType<
ResponseBodyAliasWarning,
z.ZodTypeDef,
unknown
> = z.object({
code: types.string(),
message: types.string(),
link: types.optional(types.string()),
action: types.optional(types.string()),
});
export function responseBodyAliasWarningFromJSON(
jsonString: string,
): SafeParseResult<ResponseBodyAliasWarning, SDKValidationError> {
return safeParse(
jsonString,
(x) => ResponseBodyAliasWarning$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ResponseBodyAliasWarning' from JSON`,
);
}
/** @internal */
export const ResponseBodyReadyState$inboundSchema: z.ZodNativeEnum<
typeof ResponseBodyReadyState
> = z.nativeEnum(ResponseBodyReadyState);
/** @internal */
export const GetDeploymentResponseBodyDeploymentsType$inboundSchema:
z.ZodNativeEnum<typeof GetDeploymentResponseBodyDeploymentsType> = z
.nativeEnum(GetDeploymentResponseBodyDeploymentsType);
/** @internal */
export const ResponseBodyAliasError$inboundSchema: z.ZodType<
ResponseBodyAliasError,
z.ZodTypeDef,
unknown
> = z.object({
code: types.string(),
message: types.string(),
});
export function responseBodyAliasErrorFromJSON(
jsonString: string,
): SafeParseResult<ResponseBodyAliasError, SDKValidationError> {
return safeParse(
jsonString,
(x) => ResponseBodyAliasError$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ResponseBodyAliasError' from JSON`,
);
}
/** @internal */
export const ResponseBodyChecksState$inboundSchema: z.ZodNativeEnum<
typeof ResponseBodyChecksState
> = z.nativeEnum(ResponseBodyChecksState);
/** @internal */
export const ResponseBodyChecksConclusion$inboundSchema: z.ZodNativeEnum<
typeof ResponseBodyChecksConclusion
> = z.nativeEnum(ResponseBodyChecksConclusion);
/** @internal */
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody217Type$inboundSchema:
z.ZodNativeEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody217Type
> = z.nativeEnum(
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody217Type,
);
/** @internal */
export const GetDeploymentGitSourceDeployments17$inboundSchema: z.ZodType<
GetDeploymentGitSourceDeployments17,
z.ZodTypeDef,
unknown
> = z.object({
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody217Type$inboundSchema,
ref: types.string(),
sha: types.string(),
org: types.string(),
repo: types.string(),
repoPushedAt: types.optional(types.number()),
});
export function getDeploymentGitSourceDeployments17FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSourceDeployments17, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetDeploymentGitSourceDeployments17$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSourceDeployments17' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody216Type$inboundSchema:
z.ZodNativeEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody216Type
> = z.nativeEnum(
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody216Type,
);
/** @internal */
export const GetDeploymentGitSourceDeployments16$inboundSchema: z.ZodType<
GetDeploymentGitSourceDeployments16,
z.ZodTypeDef,
unknown
> = z.object({
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody216Type$inboundSchema,
ref: types.string(),
sha: types.string(),
owner: types.optional(types.string()),
slug: types.optional(types.string()),
workspaceUuid: types.string(),
repoUuid: types.string(),
});
export function getDeploymentGitSourceDeployments16FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSourceDeployments16, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetDeploymentGitSourceDeployments16$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSourceDeployments16' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody215Type$inboundSchema:
z.ZodNativeEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody215Type
> = z.nativeEnum(
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody215Type,
);
/** @internal */
export const GetDeploymentGitSourceDeployments15$inboundSchema: z.ZodType<
GetDeploymentGitSourceDeployments15,
z.ZodTypeDef,
unknown
> = z.object({
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody215Type$inboundSchema,
ref: types.string(),
sha: types.string(),
projectId: types.number(),
});
export function getDeploymentGitSourceDeployments15FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSourceDeployments15, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetDeploymentGitSourceDeployments15$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSourceDeployments15' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody214Type$inboundSchema:
z.ZodNativeEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody214Type
> = z.nativeEnum(
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody214Type,
);
/** @internal */
export const GetDeploymentGitSourceDeployments14$inboundSchema: z.ZodType<
GetDeploymentGitSourceDeployments14,
z.ZodTypeDef,
unknown
> = z.object({
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody214Type$inboundSchema,
ref: types.string(),
sha: types.string(),
repoId: types.number(),
org: types.optional(types.string()),
repo: types.optional(types.string()),
});
export function getDeploymentGitSourceDeployments14FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSourceDeployments14, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetDeploymentGitSourceDeployments14$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSourceDeployments14' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody213Type$inboundSchema:
z.ZodNativeEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody213Type
> = z.nativeEnum(
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody213Type,
);
/** @internal */
export const GetDeploymentGitSourceDeployments13$inboundSchema: z.ZodType<
GetDeploymentGitSourceDeployments13,
z.ZodTypeDef,
unknown
> = z.object({
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody213Type$inboundSchema,
host: types.string(),
ref: types.string(),
sha: types.string(),
repoId: types.number(),
org: types.optional(types.string()),
repo: types.optional(types.string()),
});
export function getDeploymentGitSourceDeployments13FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSourceDeployments13, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetDeploymentGitSourceDeployments13$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSourceDeployments13' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody212Type$inboundSchema:
z.ZodNativeEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody212Type
> = z.nativeEnum(
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody212Type,
);
/** @internal */
export const GetDeploymentGitSourceDeployments12$inboundSchema: z.ZodType<
GetDeploymentGitSourceDeployments12,
z.ZodTypeDef,
unknown
> = z.object({
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody212Type$inboundSchema,
ref: types.string(),
sha: types.string(),
repoId: types.number(),
org: types.optional(types.string()),
repo: types.optional(types.string()),
});
export function getDeploymentGitSourceDeployments12FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSourceDeployments12, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetDeploymentGitSourceDeployments12$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSourceDeployments12' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody211Type$inboundSchema:
z.ZodNativeEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody211Type
> = z.nativeEnum(
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody211Type,
);
/** @internal */
export const GetDeploymentGitSourceDeployments11$inboundSchema: z.ZodType<
GetDeploymentGitSourceDeployments11,
z.ZodTypeDef,
unknown
> = z.object({
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody211Type$inboundSchema,
ref: types.string(),
sha: types.string(),
gitUrl: types.string(),
});
export function getDeploymentGitSourceDeployments11FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSourceDeployments11, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetDeploymentGitSourceDeployments11$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSourceDeployments11' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody210Type$inboundSchema:
z.ZodNativeEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody210Type
> = z.nativeEnum(
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody210Type,
);
/** @internal */
export const GetDeploymentGitSourceDeployments10$inboundSchema: z.ZodType<
GetDeploymentGitSourceDeployments10,
z.ZodTypeDef,
unknown
> = z.object({
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody210Type$inboundSchema,
org: types.optional(types.string()),
repo: types.optional(types.string()),
sha: types.string(),
repoPushedAt: types.optional(types.number()),
ref: z.nullable(types.string()).optional(),
prId: z.nullable(types.number()).optional(),
});
export function getDeploymentGitSourceDeployments10FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSourceDeployments10, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetDeploymentGitSourceDeployments10$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSourceDeployments10' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody29Type$inboundSchema:
z.ZodNativeEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody29Type
> = z.nativeEnum(
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody29Type,
);
/** @internal */
export const GetDeploymentGitSourceDeployments9$inboundSchema: z.ZodType<
GetDeploymentGitSourceDeployments9,
z.ZodTypeDef,
unknown
> = z.object({
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody29Type$inboundSchema,
owner: types.string(),
slug: types.string(),
ref: z.nullable(types.string()).optional(),
sha: types.optional(types.string()),
prId: z.nullable(types.number()).optional(),
});
export function getDeploymentGitSourceDeployments9FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSourceDeployments9, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetDeploymentGitSourceDeployments9$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSourceDeployments9' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody28Type$inboundSchema:
z.ZodNativeEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody28Type
> = z.nativeEnum(
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody28Type,
);
/** @internal */
export const GetDeploymentGitSourceDeployments8$inboundSchema: z.ZodType<
GetDeploymentGitSourceDeployments8,
z.ZodTypeDef,
unknown
> = z.object({
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody28Type$inboundSchema,
workspaceUuid: types.optional(types.string()),
repoUuid: types.string(),
ref: z.nullable(types.string()).optional(),
sha: types.optional(types.string()),
prId: z.nullable(types.number()).optional(),
});
export function getDeploymentGitSourceDeployments8FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSourceDeployments8, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetDeploymentGitSourceDeployments8$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSourceDeployments8' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody27Type$inboundSchema:
z.ZodNativeEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody27Type
> = z.nativeEnum(
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody27Type,
);
/** @internal */
export const GetDeploymentGitSourceDeploymentsProjectId$inboundSchema:
z.ZodType<GetDeploymentGitSourceDeploymentsProjectId, z.ZodTypeDef, unknown> =
smartUnion([types.string(), types.number()]);
export function getDeploymentGitSourceDeploymentsProjectIdFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentGitSourceDeploymentsProjectId,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentGitSourceDeploymentsProjectId$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetDeploymentGitSourceDeploymentsProjectId' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceDeployments7$inboundSchema: z.ZodType<
GetDeploymentGitSourceDeployments7,
z.ZodTypeDef,
unknown
> = z.object({
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody27Type$inboundSchema,
projectId: smartUnion([types.string(), types.number()]),
ref: z.nullable(types.string()).optional(),
sha: types.optional(types.string()),
prId: z.nullable(types.number()).optional(),
});
export function getDeploymentGitSourceDeployments7FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSourceDeployments7, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetDeploymentGitSourceDeployments7$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSourceDeployments7' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody26Type$inboundSchema:
z.ZodNativeEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody26Type
> = z.nativeEnum(
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody26Type,
);
/** @internal */
export const GetDeploymentGitSourceDeployments6$inboundSchema: z.ZodType<
GetDeploymentGitSourceDeployments6,
z.ZodTypeDef,
unknown
> = z.object({
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody26Type$inboundSchema,
org: types.string(),
repo: types.string(),
ref: z.nullable(types.string()).optional(),
sha: types.optional(types.string()),
prId: z.nullable(types.number()).optional(),
});
export function getDeploymentGitSourceDeployments6FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSourceDeployments6, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetDeploymentGitSourceDeployments6$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSourceDeployments6' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody25Type$inboundSchema:
z.ZodNativeEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody25Type
> = z.nativeEnum(
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody25Type,
);
/** @internal */
export const GetDeploymentGitSourceDeploymentsResponse200RepoId$inboundSchema:
z.ZodType<
GetDeploymentGitSourceDeploymentsResponse200RepoId,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number()]);
export function getDeploymentGitSourceDeploymentsResponse200RepoIdFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentGitSourceDeploymentsResponse200RepoId,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentGitSourceDeploymentsResponse200RepoId$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetDeploymentGitSourceDeploymentsResponse200RepoId' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceDeployments5$inboundSchema: z.ZodType<
GetDeploymentGitSourceDeployments5,
z.ZodTypeDef,
unknown
> = z.object({
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody25Type$inboundSchema,
repoId: smartUnion([types.string(), types.number()]),
ref: z.nullable(types.string()).optional(),
sha: types.optional(types.string()),
prId: z.nullable(types.number()).optional(),
});
export function getDeploymentGitSourceDeployments5FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSourceDeployments5, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetDeploymentGitSourceDeployments5$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSourceDeployments5' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody24Type$inboundSchema:
z.ZodNativeEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody24Type
> = z.nativeEnum(
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody24Type,
);
/** @internal */
export const GetDeploymentGitSource4$inboundSchema: z.ZodType<
GetDeploymentGitSource4,
z.ZodTypeDef,
unknown
> = z.object({
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody24Type$inboundSchema,
host: types.string(),
org: types.string(),
repo: types.string(),
ref: z.nullable(types.string()).optional(),
sha: types.optional(types.string()),
prId: z.nullable(types.number()).optional(),
});
export function getDeploymentGitSource4FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSource4, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentGitSource4$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSource4' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody23Type$inboundSchema:
z.ZodNativeEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody23Type
> = z.nativeEnum(
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody23Type,
);
/** @internal */
export const GetDeploymentGitSourceDeploymentsResponseRepoId$inboundSchema:
z.ZodType<
GetDeploymentGitSourceDeploymentsResponseRepoId,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number()]);
export function getDeploymentGitSourceDeploymentsResponseRepoIdFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentGitSourceDeploymentsResponseRepoId,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentGitSourceDeploymentsResponseRepoId$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetDeploymentGitSourceDeploymentsResponseRepoId' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSource3$inboundSchema: z.ZodType<
GetDeploymentGitSource3,
z.ZodTypeDef,
unknown
> = z.object({
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody23Type$inboundSchema,
host: types.string(),
repoId: smartUnion([types.string(), types.number()]),
ref: z.nullable(types.string()).optional(),
sha: types.optional(types.string()),
prId: z.nullable(types.number()).optional(),
});
export function getDeploymentGitSource3FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSource3, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentGitSource3$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSource3' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody22Type$inboundSchema:
z.ZodNativeEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody22Type
> = z.nativeEnum(
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody22Type,
);
/** @internal */
export const GetDeploymentGitSource2$inboundSchema: z.ZodType<
GetDeploymentGitSource2,
z.ZodTypeDef,
unknown
> = z.object({
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody22Type$inboundSchema,
org: types.string(),
repo: types.string(),
ref: z.nullable(types.string()).optional(),
sha: types.optional(types.string()),
prId: z.nullable(types.number()).optional(),
});
export function getDeploymentGitSource2FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSource2, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentGitSource2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSource2' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody2Type$inboundSchema:
z.ZodNativeEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody2Type
> = z.nativeEnum(
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody2Type,
);
/** @internal */
export const GetDeploymentGitSourceDeploymentsRepoId$inboundSchema: z.ZodType<
GetDeploymentGitSourceDeploymentsRepoId,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number()]);
export function getDeploymentGitSourceDeploymentsRepoIdFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentGitSourceDeploymentsRepoId,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentGitSourceDeploymentsRepoId$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetDeploymentGitSourceDeploymentsRepoId' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSource1$inboundSchema: z.ZodType<
GetDeploymentGitSource1,
z.ZodTypeDef,
unknown
> = z.object({
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody2Type$inboundSchema,
repoId: smartUnion([types.string(), types.number()]),
ref: z.nullable(types.string()).optional(),
sha: types.optional(types.string()),
prId: z.nullable(types.number()).optional(),
});
export function getDeploymentGitSource1FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSource1, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentGitSource1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSource1' from JSON`,
);
}
/** @internal */
export const ResponseBodyGitSource$inboundSchema: z.ZodType<
ResponseBodyGitSource,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => GetDeploymentGitSourceDeployments13$inboundSchema),
z.lazy(() => GetDeploymentGitSourceDeployments16$inboundSchema),
z.lazy(() => GetDeploymentGitSourceDeployments17$inboundSchema),
z.lazy(() => GetDeploymentGitSource4$inboundSchema),
z.lazy(() => GetDeploymentGitSourceDeployments11$inboundSchema),
z.lazy(() => GetDeploymentGitSourceDeployments12$inboundSchema),
z.lazy(() => GetDeploymentGitSourceDeployments14$inboundSchema),
z.lazy(() => GetDeploymentGitSourceDeployments15$inboundSchema),
z.lazy(() => GetDeploymentGitSource2$inboundSchema),
z.lazy(() => GetDeploymentGitSource3$inboundSchema),
z.lazy(() => GetDeploymentGitSourceDeployments6$inboundSchema),
z.lazy(() => GetDeploymentGitSourceDeployments9$inboundSchema),
z.lazy(() => GetDeploymentGitSource1$inboundSchema),
z.lazy(() => GetDeploymentGitSourceDeployments5$inboundSchema),
z.lazy(() => GetDeploymentGitSourceDeployments7$inboundSchema),
z.lazy(() => GetDeploymentGitSourceDeployments8$inboundSchema),
z.lazy(() => GetDeploymentGitSourceDeployments10$inboundSchema),
]);
export function responseBodyGitSourceFromJSON(
jsonString: string,
): SafeParseResult<ResponseBodyGitSource, SDKValidationError> {
return safeParse(
jsonString,
(x) => ResponseBodyGitSource$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ResponseBodyGitSource' from JSON`,
);
}
/** @internal */
export const GetDeploymentResponseBodyDeploymentsState$inboundSchema:
z.ZodNativeEnum<typeof GetDeploymentResponseBodyDeploymentsState> = z
.nativeEnum(GetDeploymentResponseBodyDeploymentsState);
/** @internal */
export const ResponseBodyManualProvisioning$inboundSchema: z.ZodType<
ResponseBodyManualProvisioning,
z.ZodTypeDef,
unknown
> = z.object({
state: GetDeploymentResponseBodyDeploymentsState$inboundSchema,
completedAt: types.optional(types.number()),
});
export function responseBodyManualProvisioningFromJSON(
jsonString: string,
): SafeParseResult<ResponseBodyManualProvisioning, SDKValidationError> {
return safeParse(
jsonString,
(x) => ResponseBodyManualProvisioning$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ResponseBodyManualProvisioning' from JSON`,
);
}
/** @internal */
export const ResponseBodyNodeVersion$inboundSchema: z.ZodNativeEnum<
typeof ResponseBodyNodeVersion
> = z.nativeEnum(ResponseBodyNodeVersion);
/** @internal */
export const GetDeploymentResponseBodyProject$inboundSchema: z.ZodType<
GetDeploymentResponseBodyProject,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
name: types.string(),
framework: z.nullable(types.string()).optional(),
});
export function getDeploymentResponseBodyProjectFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentResponseBodyProject, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentResponseBodyProject$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentResponseBodyProject' from JSON`,
);
}
/** @internal */
export const ResponseBodyReadySubstate$inboundSchema: z.ZodNativeEnum<
typeof ResponseBodyReadySubstate
> = z.nativeEnum(ResponseBodyReadySubstate);
/** @internal */
export const GetDeploymentResponseBodyDeploymentsSource$inboundSchema:
z.ZodNativeEnum<typeof GetDeploymentResponseBodyDeploymentsSource> = z
.nativeEnum(GetDeploymentResponseBodyDeploymentsSource);
/** @internal */
export const ResponseBodyTarget$inboundSchema: z.ZodNativeEnum<
typeof ResponseBodyTarget
> = z.nativeEnum(ResponseBodyTarget);
/** @internal */
export const ResponseBodyOidcTokenClaims$inboundSchema: z.ZodType<
ResponseBodyOidcTokenClaims,
z.ZodTypeDef,
unknown
> = z.object({
iss: types.string(),
sub: types.string(),
scope: types.string(),
aud: types.string(),
owner: types.string(),
owner_id: types.string(),
project: types.string(),
project_id: types.string(),
environment: types.string(),
custom_environment_id: types.optional(types.string()),
plan: types.optional(types.string()),
}).transform((v) => {
return remap$(v, {
"owner_id": "ownerId",
"project_id": "projectId",
"custom_environment_id": "customEnvironmentId",
});
});
export function responseBodyOidcTokenClaimsFromJSON(
jsonString: string,
): SafeParseResult<ResponseBodyOidcTokenClaims, SDKValidationError> {
return safeParse(
jsonString,
(x) => ResponseBodyOidcTokenClaims$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ResponseBodyOidcTokenClaims' from JSON`,
);
}
/** @internal */
export const GetDeploymentResponseBody2$inboundSchema: z.ZodType<
GetDeploymentResponseBody2,
z.ZodTypeDef,
unknown
> = z.object({
alias: types.optional(z.array(types.string())),
aliasAssigned: types.boolean(),
bootedAt: types.number(),
buildingAt: types.number(),
buildContainerFinishedAt: types.optional(types.number()),
buildSkipped: types.boolean(),
creator: z.lazy(() => ResponseBodyCreator$inboundSchema),
initReadyAt: types.optional(types.number()),
isFirstBranchDeployment: types.optional(types.boolean()),
lambdas: types.optional(
z.array(z.lazy(() => ResponseBodyLambdas$inboundSchema)),
),
public: types.boolean(),
ready: types.optional(types.number()),
status: GetDeploymentResponseBodyDeploymentsStatus$inboundSchema,
team: types.optional(z.lazy(() => ResponseBodyTeam$inboundSchema)),
userAliases: types.optional(z.array(types.string())),
previewCommentsEnabled: types.optional(types.boolean()),
ttyBuildLogs: types.optional(types.boolean()),
customEnvironment: types.optional(
smartUnion([
z.lazy(() => GetDeploymentCustomEnvironment1$inboundSchema),
z.lazy(() => GetDeploymentCustomEnvironment2$inboundSchema),
]),
),
oomReport: types.optional(ResponseBodyOomReport$inboundSchema),
readyStateReason: types.optional(types.string()),
aliasWarning: z.nullable(z.lazy(() => ResponseBodyAliasWarning$inboundSchema))
.optional(),
id: types.string(),
createdAt: types.number(),
readyState: ResponseBodyReadyState$inboundSchema,
name: types.string(),
type: GetDeploymentResponseBodyDeploymentsType$inboundSchema,
errorMessage: z.nullable(types.string()).optional(),
aliasError: z.nullable(z.lazy(() => ResponseBodyAliasError$inboundSchema))
.optional(),
aliasFinal: z.nullable(types.string()).optional(),
autoAssignCustomDomains: types.optional(types.boolean()),
automaticAliases: types.optional(z.array(types.string())),
buildErrorAt: types.optional(types.number()),
checksState: types.optional(ResponseBodyChecksState$inboundSchema),
checksConclusion: types.optional(ResponseBodyChecksConclusion$inboundSchema),
deletedAt: z.nullable(types.number()).optional(),
defaultRoute: types.optional(types.string()),
canceledAt: types.optional(types.number()),
errorCode: types.optional(types.string()),
errorLink: types.optional(types.string()),
errorStep: types.optional(types.string()),
passiveRegions: types.optional(z.array(types.string())),
gitSource: types.optional(
smartUnion([
z.lazy(() => GetDeploymentGitSourceDeployments13$inboundSchema),
z.lazy(() => GetDeploymentGitSourceDeployments16$inboundSchema),
z.lazy(() => GetDeploymentGitSourceDeployments17$inboundSchema),
z.lazy(() => GetDeploymentGitSource4$inboundSchema),
z.lazy(() => GetDeploymentGitSourceDeployments11$inboundSchema),
z.lazy(() => GetDeploymentGitSourceDeployments12$inboundSchema),
z.lazy(() => GetDeploymentGitSourceDeployments14$inboundSchema),
z.lazy(() => GetDeploymentGitSourceDeployments15$inboundSchema),
z.lazy(() => GetDeploymentGitSource2$inboundSchema),
z.lazy(() => GetDeploymentGitSource3$inboundSchema),
z.lazy(() => GetDeploymentGitSourceDeployments6$inboundSchema),
z.lazy(() => GetDeploymentGitSourceDeployments9$inboundSchema),
z.lazy(() => GetDeploymentGitSource1$inboundSchema),
z.lazy(() => GetDeploymentGitSourceDeployments5$inboundSchema),
z.lazy(() => GetDeploymentGitSourceDeployments7$inboundSchema),
z.lazy(() => GetDeploymentGitSourceDeployments8$inboundSchema),
z.lazy(() => GetDeploymentGitSourceDeployments10$inboundSchema),
]),
),
manualProvisioning: types.optional(
z.lazy(() => ResponseBodyManualProvisioning$inboundSchema),
),
meta: z.record(types.string()),
originCacheRegion: types.optional(types.string()),
nodeVersion: types.optional(ResponseBodyNodeVersion$inboundSchema),
project: types.optional(
z.lazy(() => GetDeploymentResponseBodyProject$inboundSchema),
),
prebuilt: types.optional(types.boolean()),
readySubstate: types.optional(ResponseBodyReadySubstate$inboundSchema),
regions: z.array(types.string()),
softDeletedByRetention: types.optional(types.boolean()),
source: types.optional(
GetDeploymentResponseBodyDeploymentsSource$inboundSchema,
),
target: z.nullable(ResponseBodyTarget$inboundSchema).optional(),
undeletedAt: types.optional(types.number()),
url: types.string(),
userConfiguredDeploymentId: types.optional(types.string()),
version: types.number(),
oidcTokenClaims: types.optional(
z.lazy(() => ResponseBodyOidcTokenClaims$inboundSchema),
),
});
export function getDeploymentResponseBody2FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentResponseBody2, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentResponseBody2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentResponseBody2' from JSON`,
);
}
/** @internal */
export const ResponseBodyAliasAssignedAt$inboundSchema: z.ZodType<
ResponseBodyAliasAssignedAt,
z.ZodTypeDef,
unknown
> = smartUnion([types.number(), types.boolean()]);
export function responseBodyAliasAssignedAtFromJSON(
jsonString: string,
): SafeParseResult<ResponseBodyAliasAssignedAt, SDKValidationError> {
return safeParse(
jsonString,
(x) => ResponseBodyAliasAssignedAt$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ResponseBodyAliasAssignedAt' from JSON`,
);
}
/** @internal */
export const ResponseBodyBuild$inboundSchema: z.ZodType<
ResponseBodyBuild,
z.ZodTypeDef,
unknown
> = z.object({
env: z.array(types.string()),
});
export function responseBodyBuildFromJSON(
jsonString: string,
): SafeParseResult<ResponseBodyBuild, SDKValidationError> {
return safeParse(
jsonString,
(x) => ResponseBodyBuild$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ResponseBodyBuild' from JSON`,
);
}
/** @internal */
export const ResponseBodyBuilds$inboundSchema: z.ZodType<
ResponseBodyBuilds,
z.ZodTypeDef,
unknown
> = z.object({
use: types.string(),
src: types.optional(types.string()),
config: types.optional(z.record(z.any())),
});
export function responseBodyBuildsFromJSON(
jsonString: string,
): SafeParseResult<ResponseBodyBuilds, SDKValidationError> {
return safeParse(
jsonString,
(x) => ResponseBodyBuilds$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ResponseBodyBuilds' from JSON`,
);
}
/** @internal */
export const GetDeploymentResponseBodyDeploymentsNodeVersion$inboundSchema:
z.ZodNativeEnum<typeof GetDeploymentResponseBodyDeploymentsNodeVersion> = z
.nativeEnum(GetDeploymentResponseBodyDeploymentsNodeVersion);
/** @internal */
export const GetDeploymentResponseBodyFramework$inboundSchema: z.ZodNativeEnum<
typeof GetDeploymentResponseBodyFramework
> = z.nativeEnum(GetDeploymentResponseBodyFramework);
/** @internal */
export const GetDeploymentResponseBodySpeedInsights$inboundSchema: z.ZodType<
GetDeploymentResponseBodySpeedInsights,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
enabledAt: types.optional(types.number()),
disabledAt: types.optional(types.number()),
canceledAt: types.optional(types.number()),
hasData: types.optional(types.boolean()),
paidAt: types.optional(types.number()),
});
export function getDeploymentResponseBodySpeedInsightsFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentResponseBodySpeedInsights, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetDeploymentResponseBodySpeedInsights$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentResponseBodySpeedInsights' from JSON`,
);
}
/** @internal */
export const GetDeploymentResponseBodyWebAnalytics$inboundSchema: z.ZodType<
GetDeploymentResponseBodyWebAnalytics,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
disabledAt: types.optional(types.number()),
canceledAt: types.optional(types.number()),
enabledAt: types.optional(types.number()),
hasData: types.optional(types.literal(true)),
});
export function getDeploymentResponseBodyWebAnalyticsFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentResponseBodyWebAnalytics, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetDeploymentResponseBodyWebAnalytics$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentResponseBodyWebAnalytics' from JSON`,
);
}
/** @internal */
export const ResponseBodyProjectSettings$inboundSchema: z.ZodType<
ResponseBodyProjectSettings,
z.ZodTypeDef,
unknown
> = z.object({
nodeVersion: types.optional(
GetDeploymentResponseBodyDeploymentsNodeVersion$inboundSchema,
),
buildCommand: z.nullable(types.string()).optional(),
devCommand: z.nullable(types.string()).optional(),
framework: z.nullable(GetDeploymentResponseBodyFramework$inboundSchema)
.optional(),
commandForIgnoringBuildStep: z.nullable(types.string()).optional(),
installCommand: z.nullable(types.string()).optional(),
outputDirectory: z.nullable(types.string()).optional(),
speedInsights: types.optional(
z.lazy(() => GetDeploymentResponseBodySpeedInsights$inboundSchema),
),
webAnalytics: types.optional(
z.lazy(() => GetDeploymentResponseBodyWebAnalytics$inboundSchema),
),
});
export function responseBodyProjectSettingsFromJSON(
jsonString: string,
): SafeParseResult<ResponseBodyProjectSettings, SDKValidationError> {
return safeParse(
jsonString,
(x) => ResponseBodyProjectSettings$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ResponseBodyProjectSettings' from JSON`,
);
}
/** @internal */
export const GetDeploymentResponseBodyDeploymentsResponseStatus$inboundSchema:
z.ZodNativeEnum<typeof GetDeploymentResponseBodyDeploymentsResponseStatus> = z
.nativeEnum(GetDeploymentResponseBodyDeploymentsResponseStatus);
/** @internal */
export const ResponseBodyIntegrations$inboundSchema: z.ZodType<
ResponseBodyIntegrations,
z.ZodTypeDef,
unknown
> = z.object({
status: GetDeploymentResponseBodyDeploymentsResponseStatus$inboundSchema,
startedAt: types.number(),
claimedAt: types.optional(types.number()),
completedAt: types.optional(types.number()),
skippedAt: types.optional(types.number()),
skippedBy: types.optional(types.string()),
});
export function responseBodyIntegrationsFromJSON(
jsonString: string,
): SafeParseResult<ResponseBodyIntegrations, SDKValidationError> {
return safeParse(
jsonString,
(x) => ResponseBodyIntegrations$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ResponseBodyIntegrations' from JSON`,
);
}
/** @internal */
export const ResponseBodyProtocol$inboundSchema: z.ZodNativeEnum<
typeof ResponseBodyProtocol
> = z.nativeEnum(ResponseBodyProtocol);
/** @internal */
export const ResponseBodyRemotePatterns$inboundSchema: z.ZodType<
ResponseBodyRemotePatterns,
z.ZodTypeDef,
unknown
> = z.object({
protocol: types.optional(ResponseBodyProtocol$inboundSchema),
hostname: types.string(),
port: types.optional(types.string()),
pathname: types.optional(types.string()),
search: types.optional(types.string()),
});
export function responseBodyRemotePatternsFromJSON(
jsonString: string,
): SafeParseResult<ResponseBodyRemotePatterns, SDKValidationError> {
return safeParse(
jsonString,
(x) => ResponseBodyRemotePatterns$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ResponseBodyRemotePatterns' from JSON`,
);
}
/** @internal */
export const ResponseBodyLocalPatterns$inboundSchema: z.ZodType<
ResponseBodyLocalPatterns,
z.ZodTypeDef,
unknown
> = z.object({
pathname: types.optional(types.string()),
search: types.optional(types.string()),
});
export function responseBodyLocalPatternsFromJSON(
jsonString: string,
): SafeParseResult<ResponseBodyLocalPatterns, SDKValidationError> {
return safeParse(
jsonString,
(x) => ResponseBodyLocalPatterns$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ResponseBodyLocalPatterns' from JSON`,
);
}
/** @internal */
export const ResponseBodyFormats$inboundSchema: z.ZodNativeEnum<
typeof ResponseBodyFormats
> = z.nativeEnum(ResponseBodyFormats);
/** @internal */
export const ResponseBodyContentDispositionType$inboundSchema: z.ZodNativeEnum<
typeof ResponseBodyContentDispositionType
> = z.nativeEnum(ResponseBodyContentDispositionType);
/** @internal */
export const ResponseBodyImages$inboundSchema: z.ZodType<
ResponseBodyImages,
z.ZodTypeDef,
unknown
> = z.object({
sizes: types.optional(z.array(types.number())),
qualities: types.optional(z.array(types.number())),
domains: types.optional(z.array(types.string())),
remotePatterns: types.optional(
z.array(z.lazy(() => ResponseBodyRemotePatterns$inboundSchema)),
),
localPatterns: types.optional(
z.array(z.lazy(() => ResponseBodyLocalPatterns$inboundSchema)),
),
minimumCacheTTL: types.optional(types.number()),
formats: types.optional(z.array(ResponseBodyFormats$inboundSchema)),
dangerouslyAllowSVG: types.optional(types.boolean()),
contentSecurityPolicy: types.optional(types.string()),
contentDispositionType: types.optional(
ResponseBodyContentDispositionType$inboundSchema,
),
});
export function responseBodyImagesFromJSON(
jsonString: string,
): SafeParseResult<ResponseBodyImages, SDKValidationError> {
return safeParse(
jsonString,
(x) => ResponseBodyImages$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ResponseBodyImages' from JSON`,
);
}
/** @internal */
export const GetDeploymentResponseBodyCreator$inboundSchema: z.ZodType<
GetDeploymentResponseBodyCreator,
z.ZodTypeDef,
unknown
> = z.object({
uid: types.string(),
username: types.optional(types.string()),
avatar: types.optional(types.string()),
});
export function getDeploymentResponseBodyCreatorFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentResponseBodyCreator, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentResponseBodyCreator$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentResponseBodyCreator' from JSON`,
);
}
/** @internal */
export const GetDeploymentResponseBodyDeploymentsReadyState$inboundSchema:
z.ZodNativeEnum<typeof GetDeploymentResponseBodyDeploymentsReadyState> = z
.nativeEnum(GetDeploymentResponseBodyDeploymentsReadyState);
/** @internal */
export const ResponseBodyOutput$inboundSchema: z.ZodType<
ResponseBodyOutput,
z.ZodTypeDef,
unknown
> = z.object({
path: types.string(),
functionName: types.string(),
});
export function responseBodyOutputFromJSON(
jsonString: string,
): SafeParseResult<ResponseBodyOutput, SDKValidationError> {
return safeParse(
jsonString,
(x) => ResponseBodyOutput$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ResponseBodyOutput' from JSON`,
);
}
/** @internal */
export const GetDeploymentResponseBodyLambdas$inboundSchema: z.ZodType<
GetDeploymentResponseBodyLambdas,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
createdAt: types.optional(types.number()),
readyState: types.optional(
GetDeploymentResponseBodyDeploymentsReadyState$inboundSchema,
),
entrypoint: z.nullable(types.string()).optional(),
readyStateAt: types.optional(types.number()),
output: z.array(z.lazy(() => ResponseBodyOutput$inboundSchema)),
});
export function getDeploymentResponseBodyLambdasFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentResponseBodyLambdas, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentResponseBodyLambdas$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentResponseBodyLambdas' from JSON`,
);
}
/** @internal */
export const GetDeploymentResponseBodyStatus$inboundSchema: z.ZodNativeEnum<
typeof GetDeploymentResponseBodyStatus
> = z.nativeEnum(GetDeploymentResponseBodyStatus);
/** @internal */
export const GetDeploymentResponseBodyTeam$inboundSchema: z.ZodType<
GetDeploymentResponseBodyTeam,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
name: types.string(),
slug: types.string(),
avatar: types.optional(types.string()),
});
export function getDeploymentResponseBodyTeamFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentResponseBodyTeam, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentResponseBodyTeam$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentResponseBodyTeam' from JSON`,
);
}
/** @internal */
export const GetDeploymentCustomEnvironmentDeployments2$inboundSchema:
z.ZodType<GetDeploymentCustomEnvironmentDeployments2, z.ZodTypeDef, unknown> =
z.object({
id: types.string(),
});
export function getDeploymentCustomEnvironmentDeployments2FromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentCustomEnvironmentDeployments2,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentCustomEnvironmentDeployments2$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetDeploymentCustomEnvironmentDeployments2' from JSON`,
);
}
/** @internal */
export const GetDeploymentCustomEnvironmentDeploymentsType$inboundSchema:
z.ZodNativeEnum<typeof GetDeploymentCustomEnvironmentDeploymentsType> = z
.nativeEnum(GetDeploymentCustomEnvironmentDeploymentsType);
/** @internal */
export const GetDeploymentCustomEnvironmentDeploymentsResponse200Type$inboundSchema:
z.ZodNativeEnum<
typeof GetDeploymentCustomEnvironmentDeploymentsResponse200Type
> = z.nativeEnum(GetDeploymentCustomEnvironmentDeploymentsResponse200Type);
/** @internal */
export const GetDeploymentCustomEnvironmentBranchMatcher$inboundSchema:
z.ZodType<
GetDeploymentCustomEnvironmentBranchMatcher,
z.ZodTypeDef,
unknown
> = z.object({
type:
GetDeploymentCustomEnvironmentDeploymentsResponse200Type$inboundSchema,
pattern: types.string(),
});
export function getDeploymentCustomEnvironmentBranchMatcherFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentCustomEnvironmentBranchMatcher,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentCustomEnvironmentBranchMatcher$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetDeploymentCustomEnvironmentBranchMatcher' from JSON`,
);
}
/** @internal */
export const GetDeploymentCustomEnvironmentVerification$inboundSchema:
z.ZodType<GetDeploymentCustomEnvironmentVerification, z.ZodTypeDef, unknown> =
z.object({
type: types.string(),
domain: types.string(),
value: types.string(),
reason: types.string(),
});
export function getDeploymentCustomEnvironmentVerificationFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentCustomEnvironmentVerification,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentCustomEnvironmentVerification$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetDeploymentCustomEnvironmentVerification' from JSON`,
);
}
/** @internal */
export const GetDeploymentCustomEnvironmentDomains$inboundSchema: z.ZodType<
GetDeploymentCustomEnvironmentDomains,
z.ZodTypeDef,
unknown
> = z.object({
name: types.string(),
apexName: types.string(),
projectId: types.string(),
redirect: z.nullable(types.string()).optional(),
redirectStatusCode: z.nullable(types.number()).optional(),
gitBranch: z.nullable(types.string()).optional(),
customEnvironmentId: z.nullable(types.string()).optional(),
updatedAt: types.optional(types.number()),
createdAt: types.optional(types.number()),
verified: types.boolean(),
verification: types.optional(
z.array(z.lazy(() =>
GetDeploymentCustomEnvironmentVerification$inboundSchema
)),
),
});
export function getDeploymentCustomEnvironmentDomainsFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentCustomEnvironmentDomains, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetDeploymentCustomEnvironmentDomains$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentCustomEnvironmentDomains' from JSON`,
);
}
/** @internal */
export const GetDeploymentCustomEnvironmentDeployments1$inboundSchema:
z.ZodType<GetDeploymentCustomEnvironmentDeployments1, z.ZodTypeDef, unknown> =
z.object({
id: types.string(),
slug: types.string(),
type: GetDeploymentCustomEnvironmentDeploymentsType$inboundSchema,
description: types.optional(types.string()),
branchMatcher: types.optional(
z.lazy(() => GetDeploymentCustomEnvironmentBranchMatcher$inboundSchema),
),
domains: types.optional(
z.array(
z.lazy(() => GetDeploymentCustomEnvironmentDomains$inboundSchema),
),
),
currentDeploymentAliases: types.optional(z.array(types.string())),
createdAt: types.number(),
updatedAt: types.number(),
});
export function getDeploymentCustomEnvironmentDeployments1FromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentCustomEnvironmentDeployments1,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentCustomEnvironmentDeployments1$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetDeploymentCustomEnvironmentDeployments1' from JSON`,
);
}
/** @internal */
export const GetDeploymentResponseBodyCustomEnvironment$inboundSchema:
z.ZodType<GetDeploymentResponseBodyCustomEnvironment, z.ZodTypeDef, unknown> =
smartUnion([
z.lazy(() => GetDeploymentCustomEnvironmentDeployments1$inboundSchema),
z.lazy(() => GetDeploymentCustomEnvironmentDeployments2$inboundSchema),
]);
export function getDeploymentResponseBodyCustomEnvironmentFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentResponseBodyCustomEnvironment,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentResponseBodyCustomEnvironment$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetDeploymentResponseBodyCustomEnvironment' from JSON`,
);
}
/** @internal */
export const GetDeploymentResponseBodyOomReport$inboundSchema: z.ZodNativeEnum<
typeof GetDeploymentResponseBodyOomReport
> = z.nativeEnum(GetDeploymentResponseBodyOomReport);
/** @internal */
export const GetDeploymentResponseBodyAliasWarning$inboundSchema: z.ZodType<
GetDeploymentResponseBodyAliasWarning,
z.ZodTypeDef,
unknown
> = z.object({
code: types.string(),
message: types.string(),
link: types.optional(types.string()),
action: types.optional(types.string()),
});
export function getDeploymentResponseBodyAliasWarningFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentResponseBodyAliasWarning, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetDeploymentResponseBodyAliasWarning$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentResponseBodyAliasWarning' from JSON`,
);
}
/** @internal */
export const GetDeploymentResponseBodyReadyState$inboundSchema: z.ZodNativeEnum<
typeof GetDeploymentResponseBodyReadyState
> = z.nativeEnum(GetDeploymentResponseBodyReadyState);
/** @internal */
export const GetDeploymentResponseBodyType$inboundSchema: z.ZodNativeEnum<
typeof GetDeploymentResponseBodyType
> = z.nativeEnum(GetDeploymentResponseBodyType);
/** @internal */
export const GetDeploymentResponseBodyAliasError$inboundSchema: z.ZodType<
GetDeploymentResponseBodyAliasError,
z.ZodTypeDef,
unknown
> = z.object({
code: types.string(),
message: types.string(),
});
export function getDeploymentResponseBodyAliasErrorFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentResponseBodyAliasError, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetDeploymentResponseBodyAliasError$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentResponseBodyAliasError' from JSON`,
);
}
/** @internal */
export const GetDeploymentResponseBodyChecksState$inboundSchema:
z.ZodNativeEnum<typeof GetDeploymentResponseBodyChecksState> = z.nativeEnum(
GetDeploymentResponseBodyChecksState,
);
/** @internal */
export const GetDeploymentResponseBodyChecksConclusion$inboundSchema:
z.ZodNativeEnum<typeof GetDeploymentResponseBodyChecksConclusion> = z
.nativeEnum(GetDeploymentResponseBodyChecksConclusion);
/** @internal */
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody117Type$inboundSchema:
z.ZodNativeEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody117Type
> = z.nativeEnum(
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody117Type,
);
/** @internal */
export const GetDeploymentGitSource17$inboundSchema: z.ZodType<
GetDeploymentGitSource17,
z.ZodTypeDef,
unknown
> = z.object({
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody117Type$inboundSchema,
ref: types.string(),
sha: types.string(),
org: types.string(),
repo: types.string(),
repoPushedAt: types.optional(types.number()),
});
export function getDeploymentGitSource17FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSource17, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentGitSource17$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSource17' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody116Type$inboundSchema:
z.ZodNativeEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody116Type
> = z.nativeEnum(
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody116Type,
);
/** @internal */
export const GetDeploymentGitSource16$inboundSchema: z.ZodType<
GetDeploymentGitSource16,
z.ZodTypeDef,
unknown
> = z.object({
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody116Type$inboundSchema,
ref: types.string(),
sha: types.string(),
owner: types.optional(types.string()),
slug: types.optional(types.string()),
workspaceUuid: types.string(),
repoUuid: types.string(),
});
export function getDeploymentGitSource16FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSource16, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentGitSource16$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSource16' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody115Type$inboundSchema:
z.ZodNativeEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody115Type
> = z.nativeEnum(
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody115Type,
);
/** @internal */
export const GetDeploymentGitSource15$inboundSchema: z.ZodType<
GetDeploymentGitSource15,
z.ZodTypeDef,
unknown
> = z.object({
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody115Type$inboundSchema,
ref: types.string(),
sha: types.string(),
projectId: types.number(),
});
export function getDeploymentGitSource15FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSource15, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentGitSource15$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSource15' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody114Type$inboundSchema:
z.ZodNativeEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody114Type
> = z.nativeEnum(
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody114Type,
);
/** @internal */
export const GetDeploymentGitSource14$inboundSchema: z.ZodType<
GetDeploymentGitSource14,
z.ZodTypeDef,
unknown
> = z.object({
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody114Type$inboundSchema,
ref: types.string(),
sha: types.string(),
repoId: types.number(),
org: types.optional(types.string()),
repo: types.optional(types.string()),
});
export function getDeploymentGitSource14FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSource14, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentGitSource14$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSource14' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody113Type$inboundSchema:
z.ZodNativeEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody113Type
> = z.nativeEnum(
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody113Type,
);
/** @internal */
export const GetDeploymentGitSource13$inboundSchema: z.ZodType<
GetDeploymentGitSource13,
z.ZodTypeDef,
unknown
> = z.object({
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody113Type$inboundSchema,
host: types.string(),
ref: types.string(),
sha: types.string(),
repoId: types.number(),
org: types.optional(types.string()),
repo: types.optional(types.string()),
});
export function getDeploymentGitSource13FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSource13, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentGitSource13$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSource13' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody112Type$inboundSchema:
z.ZodNativeEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody112Type
> = z.nativeEnum(
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody112Type,
);
/** @internal */
export const GetDeploymentGitSource12$inboundSchema: z.ZodType<
GetDeploymentGitSource12,
z.ZodTypeDef,
unknown
> = z.object({
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody112Type$inboundSchema,
ref: types.string(),
sha: types.string(),
repoId: types.number(),
org: types.optional(types.string()),
repo: types.optional(types.string()),
});
export function getDeploymentGitSource12FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSource12, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentGitSource12$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSource12' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody111Type$inboundSchema:
z.ZodNativeEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody111Type
> = z.nativeEnum(
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody111Type,
);
/** @internal */
export const GetDeploymentGitSource11$inboundSchema: z.ZodType<
GetDeploymentGitSource11,
z.ZodTypeDef,
unknown
> = z.object({
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody111Type$inboundSchema,
ref: types.string(),
sha: types.string(),
gitUrl: types.string(),
});
export function getDeploymentGitSource11FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSource11, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentGitSource11$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSource11' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody110Type$inboundSchema:
z.ZodNativeEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody110Type
> = z.nativeEnum(
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody110Type,
);
/** @internal */
export const GetDeploymentGitSource10$inboundSchema: z.ZodType<
GetDeploymentGitSource10,
z.ZodTypeDef,
unknown
> = z.object({
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody110Type$inboundSchema,
org: types.optional(types.string()),
repo: types.optional(types.string()),
sha: types.string(),
repoPushedAt: types.optional(types.number()),
ref: z.nullable(types.string()).optional(),
prId: z.nullable(types.number()).optional(),
});
export function getDeploymentGitSource10FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSource10, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentGitSource10$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSource10' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody19Type$inboundSchema:
z.ZodNativeEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody19Type
> = z.nativeEnum(
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody19Type,
);
/** @internal */
export const GetDeploymentGitSource9$inboundSchema: z.ZodType<
GetDeploymentGitSource9,
z.ZodTypeDef,
unknown
> = z.object({
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody19Type$inboundSchema,
owner: types.string(),
slug: types.string(),
ref: z.nullable(types.string()).optional(),
sha: types.optional(types.string()),
prId: z.nullable(types.number()).optional(),
});
export function getDeploymentGitSource9FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSource9, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentGitSource9$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSource9' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody1Type$inboundSchema:
z.ZodNativeEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody1Type
> = z.nativeEnum(
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody1Type,
);
/** @internal */
export const GetDeploymentGitSource8$inboundSchema: z.ZodType<
GetDeploymentGitSource8,
z.ZodTypeDef,
unknown
> = z.object({
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody1Type$inboundSchema,
workspaceUuid: types.optional(types.string()),
repoUuid: types.string(),
ref: z.nullable(types.string()).optional(),
sha: types.optional(types.string()),
prId: z.nullable(types.number()).optional(),
});
export function getDeploymentGitSource8FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSource8, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentGitSource8$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSource8' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType$inboundSchema:
z.ZodNativeEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType
> = z.nativeEnum(
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType,
);
/** @internal */
export const GetDeploymentGitSourceProjectId$inboundSchema: z.ZodType<
GetDeploymentGitSourceProjectId,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number()]);
export function getDeploymentGitSourceProjectIdFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSourceProjectId, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentGitSourceProjectId$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSourceProjectId' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSource7$inboundSchema: z.ZodType<
GetDeploymentGitSource7,
z.ZodTypeDef,
unknown
> = z.object({
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyType$inboundSchema,
projectId: smartUnion([types.string(), types.number()]),
ref: z.nullable(types.string()).optional(),
sha: types.optional(types.string()),
prId: z.nullable(types.number()).optional(),
});
export function getDeploymentGitSource7FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSource7, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentGitSource7$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSource7' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONType$inboundSchema:
z.ZodNativeEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONType
> = z.nativeEnum(
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONType,
);
/** @internal */
export const GetDeploymentGitSource6$inboundSchema: z.ZodType<
GetDeploymentGitSource6,
z.ZodTypeDef,
unknown
> = z.object({
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONType$inboundSchema,
org: types.string(),
repo: types.string(),
ref: z.nullable(types.string()).optional(),
sha: types.optional(types.string()),
prId: z.nullable(types.number()).optional(),
});
export function getDeploymentGitSource6FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSource6, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentGitSource6$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSource6' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceDeploymentsResponse200Type$inboundSchema:
z.ZodNativeEnum<typeof GetDeploymentGitSourceDeploymentsResponse200Type> = z
.nativeEnum(GetDeploymentGitSourceDeploymentsResponse200Type);
/** @internal */
export const GetDeploymentGitSourceRepoId$inboundSchema: z.ZodType<
GetDeploymentGitSourceRepoId,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number()]);
export function getDeploymentGitSourceRepoIdFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSourceRepoId, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentGitSourceRepoId$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSourceRepoId' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSource5$inboundSchema: z.ZodType<
GetDeploymentGitSource5,
z.ZodTypeDef,
unknown
> = z.object({
type: GetDeploymentGitSourceDeploymentsResponse200Type$inboundSchema,
repoId: smartUnion([types.string(), types.number()]),
ref: z.nullable(types.string()).optional(),
sha: types.optional(types.string()),
prId: z.nullable(types.number()).optional(),
});
export function getDeploymentGitSource5FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSource5, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetDeploymentGitSource5$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSource5' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceDeploymentsResponseType$inboundSchema:
z.ZodNativeEnum<typeof GetDeploymentGitSourceDeploymentsResponseType> = z
.nativeEnum(GetDeploymentGitSourceDeploymentsResponseType);
/** @internal */
export const GetDeploymentGitSourceDeployments4$inboundSchema: z.ZodType<
GetDeploymentGitSourceDeployments4,
z.ZodTypeDef,
unknown
> = z.object({
type: GetDeploymentGitSourceDeploymentsResponseType$inboundSchema,
host: types.string(),
org: types.string(),
repo: types.string(),
ref: z.nullable(types.string()).optional(),
sha: types.optional(types.string()),
prId: z.nullable(types.number()).optional(),
});
export function getDeploymentGitSourceDeployments4FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSourceDeployments4, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetDeploymentGitSourceDeployments4$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSourceDeployments4' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceDeploymentsType$inboundSchema:
z.ZodNativeEnum<typeof GetDeploymentGitSourceDeploymentsType> = z.nativeEnum(
GetDeploymentGitSourceDeploymentsType,
);
/** @internal */
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyRepoId$inboundSchema:
z.ZodType<
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyRepoId,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number()]);
export function getDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyRepoIdFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyRepoId,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyRepoId$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBodyRepoId' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceDeployments3$inboundSchema: z.ZodType<
GetDeploymentGitSourceDeployments3,
z.ZodTypeDef,
unknown
> = z.object({
type: GetDeploymentGitSourceDeploymentsType$inboundSchema,
host: types.string(),
repoId: smartUnion([types.string(), types.number()]),
ref: z.nullable(types.string()).optional(),
sha: types.optional(types.string()),
prId: z.nullable(types.number()).optional(),
});
export function getDeploymentGitSourceDeployments3FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSourceDeployments3, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetDeploymentGitSourceDeployments3$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSourceDeployments3' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceType$inboundSchema: z.ZodNativeEnum<
typeof GetDeploymentGitSourceType
> = z.nativeEnum(GetDeploymentGitSourceType);
/** @internal */
export const GetDeploymentGitSourceDeployments2$inboundSchema: z.ZodType<
GetDeploymentGitSourceDeployments2,
z.ZodTypeDef,
unknown
> = z.object({
type: GetDeploymentGitSourceType$inboundSchema,
org: types.string(),
repo: types.string(),
ref: z.nullable(types.string()).optional(),
sha: types.optional(types.string()),
prId: z.nullable(types.number()).optional(),
});
export function getDeploymentGitSourceDeployments2FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSourceDeployments2, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetDeploymentGitSourceDeployments2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSourceDeployments2' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody11Type$inboundSchema:
z.ZodNativeEnum<
typeof GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody11Type
> = z.nativeEnum(
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody11Type,
);
/** @internal */
export const GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONRepoId$inboundSchema:
z.ZodType<
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONRepoId,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number()]);
export function getDeploymentGitSourceDeploymentsResponse200ApplicationJSONRepoIdFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONRepoId,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONRepoId$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONRepoId' from JSON`,
);
}
/** @internal */
export const GetDeploymentGitSourceDeployments1$inboundSchema: z.ZodType<
GetDeploymentGitSourceDeployments1,
z.ZodTypeDef,
unknown
> = z.object({
type:
GetDeploymentGitSourceDeploymentsResponse200ApplicationJSONResponseBody11Type$inboundSchema,
repoId: smartUnion([types.string(), types.number()]),
ref: z.nullable(types.string()).optional(),
sha: types.optional(types.string()),
prId: z.nullable(types.number()).optional(),
});
export function getDeploymentGitSourceDeployments1FromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentGitSourceDeployments1, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetDeploymentGitSourceDeployments1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentGitSourceDeployments1' from JSON`,
);
}
/** @internal */
export const GetDeploymentResponseBodyGitSource$inboundSchema: z.ZodType<
GetDeploymentResponseBodyGitSource,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => GetDeploymentGitSource13$inboundSchema),
z.lazy(() => GetDeploymentGitSource16$inboundSchema),
z.lazy(() => GetDeploymentGitSource17$inboundSchema),
z.lazy(() => GetDeploymentGitSourceDeployments4$inboundSchema),
z.lazy(() => GetDeploymentGitSource11$inboundSchema),
z.lazy(() => GetDeploymentGitSource12$inboundSchema),
z.lazy(() => GetDeploymentGitSource14$inboundSchema),
z.lazy(() => GetDeploymentGitSource15$inboundSchema),
z.lazy(() => GetDeploymentGitSourceDeployments2$inboundSchema),
z.lazy(() => GetDeploymentGitSourceDeployments3$inboundSchema),
z.lazy(() => GetDeploymentGitSource6$inboundSchema),
z.lazy(() => GetDeploymentGitSource9$inboundSchema),
z.lazy(() => GetDeploymentGitSourceDeployments1$inboundSchema),
z.lazy(() => GetDeploymentGitSource5$inboundSchema),
z.lazy(() => GetDeploymentGitSource7$inboundSchema),
z.lazy(() => GetDeploymentGitSource8$inboundSchema),
z.lazy(() => GetDeploymentGitSource10$inboundSchema),
]);
export function getDeploymentResponseBodyGitSourceFromJSON(
jsonString: string,
): SafeParseResult<GetDeploymentResponseBodyGitSource, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetDeploymentResponseBodyGitSource$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetDeploymentResponseBodyGitSource' from JSON`,
);
}
/** @internal */
export const GetDeploymentResponseBodyState$inboundSchema: z.ZodNativeEnum<
typeof GetDeploymentResponseBodyState
> = z.nativeEnum(GetDeploymentResponseBodyState);
/** @internal */
export const GetDeploymentResponseBodyManualProvisioning$inboundSchema:
z.ZodType<
GetDeploymentResponseBodyManualProvisioning,
z.ZodTypeDef,
unknown
> = z.object({
state: GetDeploymentResponseBodyState$inboundSchema,
completedAt: types.optional(types.number()),
});
export function getDeploymentResponseBodyManualProvisioningFromJSON(
jsonString: string,
): SafeParseResult<
GetDeploymentResponseBodyManualProvisioning,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetDeploymentResponseBodyManualProvisioning$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetDeploymentResponseBodyManualProvisioning' from JSON`,
);
}
/** @internal */
export const GetDeploymentResponseBodyNodeVersion$inboundSchema:
z.ZodNativeEnum<typeof GetDeploymentResponseBodyNodeVersion> = z.nativeEnum(
GetDeploymentResponseBodyNodeVersion,
);
/** @internal */
export const ResponseBodyProject$inboundSchema: z.ZodType<
ResponseBodyProject,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
name: types.string(),
framework: z.nullable(types.string()).optional(),
});
export function responseBodyProjectFromJSON(
jsonString: string,
): SafeParseResult<ResponseBodyProject, SDKValidationError> {
return safeParse(
jsonString,
(x) => ResponseBodyProject$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ResponseBodyProject' from JSON`,
);
}