@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>
661 lines • 32.1 kB
JavaScript
/*
* 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 * as types from "../types/primitives.js";
import { smartUnion } from "../types/smartUnion.js";
import { AliasAssignedAt$inboundSchema, AliasError$inboundSchema, AliasWarning$inboundSchema, Build$inboundSchema, Builds$inboundSchema, ChecksConclusion$inboundSchema, ChecksState$inboundSchema, CreateDeploymentCreator$inboundSchema, CreateDeploymentGitSource$inboundSchema, CreateDeploymentNodeVersion$inboundSchema, CreateDeploymentPlan$inboundSchema, CreateDeploymentProject$inboundSchema, CreateDeploymentProjectSettings$inboundSchema, CreateDeploymentRoutesHas$inboundSchema, CreateDeploymentSource$inboundSchema, CreateDeploymentStatus$inboundSchema, CreateDeploymentTarget$inboundSchema, CreateDeploymentTeam$inboundSchema, CreateDeploymentType$inboundSchema, CreateDeploymentValueDeployments2$inboundSchema, Crons$inboundSchema, CustomEnvironment$inboundSchema, Functions$inboundSchema, Images$inboundSchema, Integrations$inboundSchema, Lambdas$inboundSchema, ManualProvisioning$inboundSchema, Missing2$inboundSchema, OidcTokenClaims$inboundSchema, OomReport$inboundSchema, Platform$inboundSchema, ReadyState$inboundSchema, ReadySubstate$inboundSchema, Routes2$inboundSchema, Routes3$inboundSchema, } from "./createdeploymentvaluedeployments2.js";
import { FlagJSONValue$inboundSchema } from "./flagjsonvalue.js";
export const RoutesAction = {
Challenge: "challenge",
Deny: "deny",
};
export const RoutesType = {
RequestHeaders: "request.headers",
RequestQuery: "request.query",
ResponseHeaders: "response.headers",
};
export const CreateDeploymentRoutesOp = {
Append: "append",
Delete: "delete",
Set: "set",
};
export const DestinationType = {
Service: "service",
};
export const CreateDeploymentGitRepoDeploymentsOwnerType = {
Team: "team",
User: "user",
};
export const CreateDeploymentGitRepoOwnerType = {
Team: "team",
User: "user",
};
export const GitRepoOwnerType = {
Team: "team",
User: "user",
};
export const OwnerType = {
Team: "team",
User: "user",
};
/**
* The result of the microfrontends config upload during deployment creation / build. Only set for default app deployments. The config upload is attempted during deployment create, and then again during the build. If the config is not in the root directory, or the deployment is prebuilt, the config cannot be uploaded during deployment create. The upload during deployment build finds the config even if it's not in the root directory, as it has access to all files. Uploading the config during create is ideal, as then all child deployments are guaranteed to have access to the default app deployment config even if the default app has not yet started building. If the config is not uploaded, the child app will show as building until the config has been uploaded during the default app build. - `success` - The config was uploaded successfully, either when the deployment was created or during the build. - `waiting_on_build` - The config could not be uploaded during deployment create, will be attempted again during the build. - `no_config` - No config was found. Only set once the build has not found the config in any of the deployment's files. - `undefined` - Legacy deployments, or there was an error uploading the config during deployment create.
*/
export const MfeConfigUploadState = {
NoConfig: "no_config",
Success: "success",
WaitingOnBuild: "waiting_on_build",
};
export const FunctionType = {
Fluid: "fluid",
Standard: "standard",
};
export const FunctionMemoryType = {
Performance: "performance",
PerformanceXl: "performance_xl",
Standard: "standard",
StandardLegacy: "standard_legacy",
};
/**
* Build resource configuration snapshot for this deployment.
*/
export const CreateDeploymentConfiguration = {
SkipNamespaceQueue: "SKIP_NAMESPACE_QUEUE",
WaitForNamespaceQueue: "WAIT_FOR_NAMESPACE_QUEUE",
};
/**
* When elastic concurrency is used for this deployment, a value is set. The value tells the reason where the setting was coming from. - TEAM_SETTING: Inherited from team settings - PROJECT_SETTING: Inherited from project settings - SKIP_QUEUE: Manually triggered by user to skip the queues
*/
export const ElasticConcurrency = {
ProjectSetting: "PROJECT_SETTING",
SkipQueue: "SKIP_QUEUE",
TeamSetting: "TEAM_SETTING",
};
/**
* Machine type that was used for the build.
*/
export const CreateDeploymentPurchaseType = {
Enhanced: "enhanced",
Standard: "standard",
Turbo: "turbo",
};
export const CreateDeploymentDeploymentsState = {
Failed: "failed",
Pending: "pending",
Succeeded: "succeeded",
};
/**
* The NSNB decision code for the seat block. TODO: We should consolidate block types.
*/
export const BlockCode = {
CommitAuthorRequired: "COMMIT_AUTHOR_REQUIRED",
TeamAccessRequired: "TEAM_ACCESS_REQUIRED",
};
/**
* The git provider type associated with gitUserId.
*/
export const CreateDeploymentGitProvider = {
Bitbucket: "bitbucket",
Github: "github",
Gitlab: "gitlab",
};
/** @internal */
export const MissingValue$inboundSchema = smartUnion([
types.string(),
CreateDeploymentValueDeployments2$inboundSchema,
]);
export function missingValueFromJSON(jsonString) {
return safeParse(jsonString, (x) => MissingValue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'MissingValue' from JSON`);
}
/** @internal */
export const Missing1$inboundSchema = z.object({
type: types.literal("host"),
value: smartUnion([
types.string(),
CreateDeploymentValueDeployments2$inboundSchema,
]),
});
export function missing1FromJSON(jsonString) {
return safeParse(jsonString, (x) => Missing1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Missing1' from JSON`);
}
/** @internal */
export const CreateDeploymentRoutesMissing$inboundSchema = z.union([
z.lazy(() => Missing1$inboundSchema),
Missing2$inboundSchema.and(z.object({ type: z.literal("cookie") })),
Missing2$inboundSchema.and(z.object({ type: z.literal("header") })),
Missing2$inboundSchema.and(z.object({ type: z.literal("query") })),
]);
export function createDeploymentRoutesMissingFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentRoutesMissing$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentRoutesMissing' from JSON`);
}
/** @internal */
export const RoutesAction$inboundSchema = z.nativeEnum(RoutesAction);
/** @internal */
export const CreateDeploymentRoutesMitigate$inboundSchema = z.object({
action: RoutesAction$inboundSchema,
});
export function createDeploymentRoutesMitigateFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentRoutesMitigate$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentRoutesMitigate' from JSON`);
}
/** @internal */
export const RoutesType$inboundSchema = z
.nativeEnum(RoutesType);
/** @internal */
export const CreateDeploymentRoutesOp$inboundSchema = z.nativeEnum(CreateDeploymentRoutesOp);
/** @internal */
export const KeyEq$inboundSchema = smartUnion([types.string(), types.number()]);
export function keyEqFromJSON(jsonString) {
return safeParse(jsonString, (x) => KeyEq$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'KeyEq' from JSON`);
}
/** @internal */
export const Key2$inboundSchema = z
.object({
eq: types.optional(smartUnion([types.string(), types.number()])),
neq: types.optional(types.string()),
inc: types.optional(z.array(types.string())),
ninc: types.optional(z.array(types.string())),
pre: types.optional(types.string()),
suf: types.optional(types.string()),
gt: types.optional(types.number()),
gte: types.optional(types.number()),
lt: types.optional(types.number()),
lte: types.optional(types.number()),
});
export function key2FromJSON(jsonString) {
return safeParse(jsonString, (x) => Key2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Key2' from JSON`);
}
/** @internal */
export const CreateDeploymentRoutesKey$inboundSchema = smartUnion([types.string(), z.lazy(() => Key2$inboundSchema)]);
export function createDeploymentRoutesKeyFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentRoutesKey$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentRoutesKey' from JSON`);
}
/** @internal */
export const RoutesTarget$inboundSchema = z.object({
key: smartUnion([types.string(), z.lazy(() => Key2$inboundSchema)]),
});
export function routesTargetFromJSON(jsonString) {
return safeParse(jsonString, (x) => RoutesTarget$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RoutesTarget' from JSON`);
}
/** @internal */
export const Args$inboundSchema = smartUnion([types.string(), z.array(types.string())]);
export function argsFromJSON(jsonString) {
return safeParse(jsonString, (x) => Args$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Args' from JSON`);
}
/** @internal */
export const CreateDeploymentRoutesTransforms$inboundSchema = z.object({
type: RoutesType$inboundSchema,
op: CreateDeploymentRoutesOp$inboundSchema,
target: z.lazy(() => RoutesTarget$inboundSchema),
args: types.optional(smartUnion([types.string(), z.array(types.string())])),
env: types.optional(z.array(types.string())),
});
export function createDeploymentRoutesTransformsFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentRoutesTransforms$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentRoutesTransforms' from JSON`);
}
/** @internal */
export const Locale$inboundSchema = z
.object({
redirect: types.optional(z.record(types.string())),
cookie: types.optional(types.string()),
});
export function localeFromJSON(jsonString) {
return safeParse(jsonString, (x) => Locale$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Locale' from JSON`);
}
/** @internal */
export const DestinationType$inboundSchema = z.nativeEnum(DestinationType);
/** @internal */
export const Destination2$inboundSchema = z.object({
type: DestinationType$inboundSchema,
service: types.string(),
path: types.optional(types.string()),
});
export function destination2FromJSON(jsonString) {
return safeParse(jsonString, (x) => Destination2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Destination2' from JSON`);
}
/** @internal */
export const Destination$inboundSchema = smartUnion([z.lazy(() => Destination2$inboundSchema), types.string()]);
export function destinationFromJSON(jsonString) {
return safeParse(jsonString, (x) => Destination$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Destination' from JSON`);
}
/** @internal */
export const Routes1$inboundSchema = z.object({
src: types.string(),
dest: types.optional(types.string()),
headers: types.optional(z.record(types.string())),
methods: types.optional(z.array(types.string())),
continue: types.optional(types.boolean()),
override: types.optional(types.boolean()),
caseSensitive: types.optional(types.boolean()),
check: types.optional(types.boolean()),
important: types.optional(types.boolean()),
status: types.optional(types.number()),
has: types.optional(z.array(CreateDeploymentRoutesHas$inboundSchema)),
missing: types.optional(z.array(z.union([
z.lazy(() => Missing1$inboundSchema),
Missing2$inboundSchema.and(z.object({ type: z.literal("cookie") })),
Missing2$inboundSchema.and(z.object({ type: z.literal("header") })),
Missing2$inboundSchema.and(z.object({ type: z.literal("query") })),
]))),
mitigate: types.optional(z.lazy(() => CreateDeploymentRoutesMitigate$inboundSchema)),
transforms: types.optional(z.array(z.lazy(() => CreateDeploymentRoutesTransforms$inboundSchema))),
env: types.optional(z.array(types.string())),
locale: types.optional(z.lazy(() => Locale$inboundSchema)),
source: types.optional(types.string()),
destination: types.optional(smartUnion([z.lazy(() => Destination2$inboundSchema), types.string()])),
statusCode: types.optional(types.number()),
middlewarePath: types.optional(types.string()),
middlewareRawSrc: types.optional(z.array(types.string())),
middleware: types.optional(types.number()),
respectOriginCacheControl: types.optional(types.boolean()),
});
export function routes1FromJSON(jsonString) {
return safeParse(jsonString, (x) => Routes1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Routes1' from JSON`);
}
/** @internal */
export const CreateDeploymentRoutes$inboundSchema = smartUnion([
Routes3$inboundSchema,
z.lazy(() => Routes1$inboundSchema),
Routes2$inboundSchema,
]);
export function createDeploymentRoutesFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentRoutes$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentRoutes' from JSON`);
}
/** @internal */
export const CreateDeploymentGitRepoDeploymentsOwnerType$inboundSchema = z
.nativeEnum(CreateDeploymentGitRepoDeploymentsOwnerType);
/** @internal */
export const GitRepo4$inboundSchema = z.object({
org: types.string(),
repo: types.string(),
type: types.literal("vercel"),
path: types.string(),
defaultBranch: types.string(),
name: types.string(),
private: types.boolean(),
ownerType: CreateDeploymentGitRepoDeploymentsOwnerType$inboundSchema,
});
export function gitRepo4FromJSON(jsonString) {
return safeParse(jsonString, (x) => GitRepo4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GitRepo4' from JSON`);
}
/** @internal */
export const CreateDeploymentGitRepoOwnerType$inboundSchema = z.nativeEnum(CreateDeploymentGitRepoOwnerType);
/** @internal */
export const GitRepo3$inboundSchema = z.object({
owner: types.string(),
repoUuid: types.string(),
slug: types.string(),
type: types.literal("bitbucket"),
workspaceUuid: types.string(),
path: types.string(),
defaultBranch: types.string(),
name: types.string(),
private: types.boolean(),
ownerType: CreateDeploymentGitRepoOwnerType$inboundSchema,
});
export function gitRepo3FromJSON(jsonString) {
return safeParse(jsonString, (x) => GitRepo3$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GitRepo3' from JSON`);
}
/** @internal */
export const GitRepoOwnerType$inboundSchema = z.nativeEnum(GitRepoOwnerType);
/** @internal */
export const GitRepo2$inboundSchema = z.object({
org: types.string(),
repo: types.string(),
repoId: types.number(),
type: types.literal("github"),
repoOwnerId: types.number(),
path: types.string(),
defaultBranch: types.string(),
name: types.string(),
private: types.boolean(),
ownerType: GitRepoOwnerType$inboundSchema,
});
export function gitRepo2FromJSON(jsonString) {
return safeParse(jsonString, (x) => GitRepo2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GitRepo2' from JSON`);
}
/** @internal */
export const OwnerType$inboundSchema = z
.nativeEnum(OwnerType);
/** @internal */
export const GitRepo1$inboundSchema = z.object({
namespace: types.string(),
projectId: types.number(),
type: types.literal("gitlab"),
url: types.string(),
path: types.string(),
defaultBranch: types.string(),
name: types.string(),
private: types.boolean(),
ownerType: OwnerType$inboundSchema,
});
export function gitRepo1FromJSON(jsonString) {
return safeParse(jsonString, (x) => GitRepo1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GitRepo1' from JSON`);
}
/** @internal */
export const GitRepo$inboundSchema = z.union([
z.lazy(() => GitRepo1$inboundSchema),
z.lazy(() => GitRepo2$inboundSchema),
z.lazy(() => GitRepo3$inboundSchema),
z.lazy(() => GitRepo4$inboundSchema),
]);
export function gitRepoFromJSON(jsonString) {
return safeParse(jsonString, (x) => GitRepo$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GitRepo' from JSON`);
}
/** @internal */
export const Flags2$inboundSchema = z
.object({});
export function flags2FromJSON(jsonString) {
return safeParse(jsonString, (x) => Flags2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Flags2' from JSON`);
}
/** @internal */
export const CreateDeploymentFlagsOptions$inboundSchema = z.object({
value: types.nullable(FlagJSONValue$inboundSchema),
label: types.optional(types.string()),
});
export function createDeploymentFlagsOptionsFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentFlagsOptions$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentFlagsOptions' from JSON`);
}
/** @internal */
export const CreateDeploymentFlagsDefinitions$inboundSchema = z.object({
options: types.optional(z.array(z.lazy(() => CreateDeploymentFlagsOptions$inboundSchema))),
url: types.optional(types.string()),
description: types.optional(types.string()),
});
export function createDeploymentFlagsDefinitionsFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentFlagsDefinitions$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentFlagsDefinitions' from JSON`);
}
/** @internal */
export const Flags1$inboundSchema = z
.object({
definitions: z.record(z.lazy(() => CreateDeploymentFlagsDefinitions$inboundSchema)),
});
export function flags1FromJSON(jsonString) {
return safeParse(jsonString, (x) => Flags1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Flags1' from JSON`);
}
/** @internal */
export const Flags$inboundSchema = smartUnion([
z.lazy(() => Flags1$inboundSchema),
z.array(z.lazy(() => Flags2$inboundSchema)),
]);
export function flagsFromJSON(jsonString) {
return safeParse(jsonString, (x) => Flags$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Flags' from JSON`);
}
/** @internal */
export const MfeConfigUploadState$inboundSchema = z.nativeEnum(MfeConfigUploadState);
/** @internal */
export const CreateDeploymentMicrofrontends2$inboundSchema = z.object({
isDefaultApp: types.literal(true),
mfeConfigUploadState: types.optional(MfeConfigUploadState$inboundSchema),
defaultAppProjectName: types.string(),
defaultRoute: types.optional(types.string()),
groupIds: z.array(types.string()),
});
export function createDeploymentMicrofrontends2FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentMicrofrontends2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentMicrofrontends2' from JSON`);
}
/** @internal */
export const CreateDeploymentMicrofrontends1$inboundSchema = z.object({
isDefaultApp: types.optional(types.literal(false)),
defaultAppProjectName: types.string(),
defaultRoute: types.optional(types.string()),
groupIds: z.array(types.string()),
});
export function createDeploymentMicrofrontends1FromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentMicrofrontends1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentMicrofrontends1' from JSON`);
}
/** @internal */
export const CreateDeploymentMicrofrontends$inboundSchema = smartUnion([
z.lazy(() => CreateDeploymentMicrofrontends2$inboundSchema),
z.lazy(() => CreateDeploymentMicrofrontends1$inboundSchema),
]);
export function createDeploymentMicrofrontendsFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentMicrofrontends$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentMicrofrontends' from JSON`);
}
/** @internal */
export const FunctionType$inboundSchema = z.nativeEnum(FunctionType);
/** @internal */
export const FunctionMemoryType$inboundSchema = z.nativeEnum(FunctionMemoryType);
/** @internal */
export const CreateDeploymentConfiguration$inboundSchema = z.nativeEnum(CreateDeploymentConfiguration);
/** @internal */
export const CreateDeploymentBuildQueue$inboundSchema = z.object({
configuration: types.optional(CreateDeploymentConfiguration$inboundSchema),
});
export function createDeploymentBuildQueueFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentBuildQueue$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentBuildQueue' from JSON`);
}
/** @internal */
export const ElasticConcurrency$inboundSchema = z.nativeEnum(ElasticConcurrency);
/** @internal */
export const CreateDeploymentPurchaseType$inboundSchema = z.nativeEnum(CreateDeploymentPurchaseType);
/** @internal */
export const CreateDeploymentBuildMachine$inboundSchema = z.object({
purchaseType: z.nullable(CreateDeploymentPurchaseType$inboundSchema)
.optional(),
});
export function createDeploymentBuildMachineFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentBuildMachine$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentBuildMachine' from JSON`);
}
/** @internal */
export const CreateDeploymentResourceConfig$inboundSchema = z.object({
buildQueue: types.optional(z.lazy(() => CreateDeploymentBuildQueue$inboundSchema)),
elasticConcurrency: types.optional(ElasticConcurrency$inboundSchema),
buildMachine: types.optional(z.lazy(() => CreateDeploymentBuildMachine$inboundSchema)),
});
export function createDeploymentResourceConfigFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentResourceConfig$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentResourceConfig' from JSON`);
}
/** @internal */
export const Config$inboundSchema = z
.object({
version: types.optional(types.number()),
functionType: FunctionType$inboundSchema,
functionMemoryType: FunctionMemoryType$inboundSchema,
functionTimeout: types.nullable(types.number()),
secureComputePrimaryRegion: types.nullable(types.string()),
secureComputeFallbackRegion: types.nullable(types.string()),
isUsingActiveCPU: types.optional(types.boolean()),
resourceConfig: types.optional(z.lazy(() => CreateDeploymentResourceConfig$inboundSchema)),
});
export function configFromJSON(jsonString) {
return safeParse(jsonString, (x) => Config$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Config' from JSON`);
}
/** @internal */
export const CreateDeploymentDeploymentsState$inboundSchema = z.nativeEnum(CreateDeploymentDeploymentsState);
/** @internal */
export const DeploymentAlias$inboundSchema = z.object({
state: CreateDeploymentDeploymentsState$inboundSchema,
startedAt: types.number(),
completedAt: types.optional(types.number()),
});
export function deploymentAliasFromJSON(jsonString) {
return safeParse(jsonString, (x) => DeploymentAlias$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeploymentAlias' from JSON`);
}
/** @internal */
export const CreateDeploymentChecks$inboundSchema = z.object({
"deployment-alias": z.lazy(() => DeploymentAlias$inboundSchema),
}).transform((v) => {
return remap$(v, {
"deployment-alias": "deploymentAlias",
});
});
export function createDeploymentChecksFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentChecks$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentChecks' from JSON`);
}
/** @internal */
export const BlockCode$inboundSchema = z
.nativeEnum(BlockCode);
/** @internal */
export const CreateDeploymentGitUserId$inboundSchema = smartUnion([types.string(), types.number()]);
export function createDeploymentGitUserIdFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentGitUserId$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentGitUserId' from JSON`);
}
/** @internal */
export const CreateDeploymentGitProvider$inboundSchema = z.nativeEnum(CreateDeploymentGitProvider);
/** @internal */
export const SeatBlock$inboundSchema = z.object({
blockCode: BlockCode$inboundSchema,
userId: types.optional(types.string()),
isVerified: types.optional(types.boolean()),
gitUserId: types.optional(smartUnion([types.string(), types.number()])),
gitProvider: types.optional(CreateDeploymentGitProvider$inboundSchema),
});
export function seatBlockFromJSON(jsonString) {
return safeParse(jsonString, (x) => SeatBlock$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SeatBlock' from JSON`);
}
/** @internal */
export const CommitMeta$inboundSchema = z.object({
email: types.optional(types.string()),
name: types.optional(types.string()),
isVerified: types.optional(types.boolean()),
});
export function commitMetaFromJSON(jsonString) {
return safeParse(jsonString, (x) => CommitMeta$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CommitMeta' from JSON`);
}
/** @internal */
export const CreateDeploymentId$inboundSchema = smartUnion([types.string(), types.number()]);
export function createDeploymentIdFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentId$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentId' from JSON`);
}
/** @internal */
export const GitUser$inboundSchema = z.object({
id: smartUnion([types.string(), types.number()]),
login: types.string(),
type: types.optional(types.string()),
provider: types.optional(types.string()),
});
export function gitUserFromJSON(jsonString) {
return safeParse(jsonString, (x) => GitUser$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GitUser' from JSON`);
}
/** @internal */
export const VercelUser$inboundSchema = z.object({
id: types.string(),
username: types.string(),
teamRoles: types.optional(z.array(types.string())),
});
export function vercelUserFromJSON(jsonString) {
return safeParse(jsonString, (x) => VercelUser$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'VercelUser' from JSON`);
}
/** @internal */
export const CreateDeploymentAttribution$inboundSchema = z.object({
commitMeta: types.optional(z.lazy(() => CommitMeta$inboundSchema)),
gitUser: types.optional(z.lazy(() => GitUser$inboundSchema)),
vercelUser: types.optional(z.lazy(() => VercelUser$inboundSchema)),
});
export function createDeploymentAttributionFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentAttribution$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentAttribution' from JSON`);
}
/** @internal */
export const CreateDeploymentResponseBody$inboundSchema = z.object({
aliasAssignedAt: z.nullable(AliasAssignedAt$inboundSchema).optional(),
alwaysRefuseToBuild: types.optional(types.boolean()),
build: Build$inboundSchema,
buildArtifactUrls: types.optional(z.array(types.string())),
builds: types.optional(z.array(Builds$inboundSchema)),
env: z.array(types.string()),
inspectorUrl: types.nullable(types.string()),
isInConcurrentBuildsQueue: types.boolean(),
isInSystemBuildsQueue: types.boolean(),
projectSettings: CreateDeploymentProjectSettings$inboundSchema,
integrations: types.optional(Integrations$inboundSchema),
images: types.optional(Images$inboundSchema),
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: CreateDeploymentCreator$inboundSchema,
initReadyAt: types.optional(types.number()),
isFirstBranchDeployment: types.optional(types.boolean()),
lambdas: types.optional(z.array(Lambdas$inboundSchema)),
public: types.boolean(),
ready: types.optional(types.number()),
status: CreateDeploymentStatus$inboundSchema,
team: types.optional(CreateDeploymentTeam$inboundSchema),
userAliases: types.optional(z.array(types.string())),
previewCommentsEnabled: types.optional(types.boolean()),
ttyBuildLogs: types.optional(types.boolean()),
customEnvironment: types.optional(CustomEnvironment$inboundSchema),
oomReport: types.optional(OomReport$inboundSchema),
readyStateReason: types.optional(types.string()),
aliasWarning: z.nullable(AliasWarning$inboundSchema).optional(),
id: types.string(),
createdAt: types.number(),
readyState: ReadyState$inboundSchema,
name: types.string(),
type: CreateDeploymentType$inboundSchema,
errorMessage: z.nullable(types.string()).optional(),
aliasError: z.nullable(AliasError$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(ChecksState$inboundSchema),
checksConclusion: types.optional(ChecksConclusion$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(CreateDeploymentGitSource$inboundSchema),
manualProvisioning: types.optional(ManualProvisioning$inboundSchema),
meta: z.record(types.string()),
originCacheRegion: types.optional(types.string()),
nodeVersion: types.optional(CreateDeploymentNodeVersion$inboundSchema),
project: types.optional(CreateDeploymentProject$inboundSchema),
prebuilt: types.optional(types.boolean()),
readySubstate: types.optional(ReadySubstate$inboundSchema),
regions: z.array(types.string()),
softDeletedByRetention: types.optional(types.boolean()),
source: types.optional(CreateDeploymentSource$inboundSchema),
target: z.nullable(CreateDeploymentTarget$inboundSchema).optional(),
undeletedAt: types.optional(types.number()),
url: types.string(),
userConfiguredDeploymentId: types.optional(types.string()),
version: types.number(),
oidcTokenClaims: types.optional(OidcTokenClaims$inboundSchema),
projectId: types.string(),
plan: CreateDeploymentPlan$inboundSchema,
platform: types.optional(Platform$inboundSchema),
connectBuildsEnabled: types.optional(types.boolean()),
connectConfigurationId: types.optional(types.string()),
createdIn: types.string(),
crons: types.optional(z.array(Crons$inboundSchema)),
functions: z.nullable(z.record(Functions$inboundSchema)).optional(),
monorepoManager: z.nullable(types.string()).optional(),
ownerId: types.string(),
passiveConnectConfigurationId: types.optional(types.string()),
routes: types.nullable(z.array(smartUnion([
Routes3$inboundSchema,
z.lazy(() => Routes1$inboundSchema),
Routes2$inboundSchema,
]))),
gitRepo: z.nullable(z.union([
z.lazy(() => GitRepo1$inboundSchema),
z.lazy(() => GitRepo2$inboundSchema),
z.lazy(() => GitRepo3$inboundSchema),
z.lazy(() => GitRepo4$inboundSchema),
])).optional(),
flags: types.optional(smartUnion([
z.lazy(() => Flags1$inboundSchema),
z.array(z.lazy(() => Flags2$inboundSchema)),
])),
microfrontends: types.optional(smartUnion([
z.lazy(() => CreateDeploymentMicrofrontends2$inboundSchema),
z.lazy(() => CreateDeploymentMicrofrontends1$inboundSchema),
])),
config: types.optional(z.lazy(() => Config$inboundSchema)),
checks: types.optional(z.lazy(() => CreateDeploymentChecks$inboundSchema)),
seatBlock: types.optional(z.lazy(() => SeatBlock$inboundSchema)),
attribution: types.optional(z.lazy(() => CreateDeploymentAttribution$inboundSchema)),
});
export function createDeploymentResponseBodyFromJSON(jsonString) {
return safeParse(jsonString, (x) => CreateDeploymentResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateDeploymentResponseBody' from JSON`);
}
//# sourceMappingURL=createdeploymentresponsebody.js.map