@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>
1,559 lines • 68.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";
/**
* The framework that is being used for this project. When `null` is used no framework is selected
*/
export const UpdateProjectFramework = {
Container: "container",
Blitzjs: "blitzjs",
Nextjs: "nextjs",
Gatsby: "gatsby",
Remix: "remix",
ReactRouter: "react-router",
Astro: "astro",
Hexo: "hexo",
Eleventy: "eleventy",
Docusaurus2: "docusaurus-2",
Docusaurus: "docusaurus",
Preact: "preact",
Solidstart1: "solidstart-1",
Solidstart: "solidstart",
Dojo: "dojo",
Ember: "ember",
Vue: "vue",
Scully: "scully",
IonicAngular: "ionic-angular",
Angular: "angular",
Polymer: "polymer",
Svelte: "svelte",
Sveltekit: "sveltekit",
Sveltekit1: "sveltekit-1",
IonicReact: "ionic-react",
CreateReactApp: "create-react-app",
Gridsome: "gridsome",
Umijs: "umijs",
Sapper: "sapper",
Saber: "saber",
Stencil: "stencil",
Nuxtjs: "nuxtjs",
Redwoodjs: "redwoodjs",
Hugo: "hugo",
Jekyll: "jekyll",
Brunch: "brunch",
Middleman: "middleman",
Zola: "zola",
Hydrogen: "hydrogen",
Vite: "vite",
TanstackStart: "tanstack-start",
TanstackStartLovable: "tanstack-start-lovable",
Vitepress: "vitepress",
Vuepress: "vuepress",
Parcel: "parcel",
Fastapi: "fastapi",
Flask: "flask",
Fasthtml: "fasthtml",
Django: "django",
Ash: "ash",
FactoryEve: "factory-eve",
Eve: "eve",
Sanity: "sanity",
SanityV2: "sanity-v2",
Storybook: "storybook",
Nitro: "nitro",
Hono: "hono",
Express: "express",
H3: "h3",
Koa: "koa",
Nestjs: "nestjs",
Elysia: "elysia",
Fastify: "fastify",
Xmcp: "xmcp",
Python: "python",
Ruby: "ruby",
Rust: "rust",
Axum: "axum",
ActixWeb: "actix-web",
Bun: "bun",
Node: "node",
Go: "go",
Services: "services",
Mastra: "mastra",
};
export const UpdateProjectNodeVersion = {
TwentyFourDotX: "24.x",
TwentyTwoDotX: "22.x",
TwentyDotX: "20.x",
EighteenDotX: "18.x",
SixteenDotX: "16.x",
FourteenDotX: "14.x",
TwelveDotX: "12.x",
TenDotX: "10.x",
};
export const UpdateProjectBuildMachineType = {
Basic: "basic",
Enhanced: "enhanced",
Turbo: "turbo",
Standard: "standard",
Elastic: "elastic",
};
export const UpdateProjectBuildMachineSelection = {
Elastic: "elastic",
Fixed: "fixed",
};
export const UpdateProjectConfiguration = {
SkipNamespaceQueue: "SKIP_NAMESPACE_QUEUE",
WaitForNamespaceQueue: "WAIT_FOR_NAMESPACE_QUEUE",
};
export const UpdateProjectFunctionDefaultMemoryType = {
StandardLegacy: "standard_legacy",
Standard: "standard",
Performance: "performance",
PerformanceXl: "performance_xl",
};
export const UpdateProjectBuildMachineElasticReason = {
OomFailure: "oom-failure",
EnospcFailure: "enospc-failure",
BuildTimeoutFailure: "build-timeout-failure",
BasicFloor: "basic-floor",
HighPeakMemory: "high-peak-memory",
SustainedHighCpu: "sustained-high-cpu",
HighPeakDisk: "high-peak-disk",
LongBuildDuration: "long-build-duration",
ShortBuildDuration: "short-build-duration",
EnterpriseFloor: "enterprise-floor",
};
/**
* Environment to apply sampling to
*/
export const UpdateProjectEnv = {
Production: "production",
Preview: "preview",
};
/**
* Tracing destination this rule applies to. Derived server-side when project tracing is computed; accepted here so a computed config can round-trip through this endpoint.
*/
export const Destination = {
Internal: "internal",
External: "external",
};
/**
* team: `https://oidc.vercel.com/[team_slug]` global: `https://oidc.vercel.com`
*/
export const UpdateProjectIssuerMode = {
Team: "team",
Global: "global",
};
/**
* Specify if the password will apply to every Deployment Target or just Preview
*/
export const UpdateProjectDeploymentType = {
All: "all",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
AllExceptCustomDomains: "all_except_custom_domains",
};
export const UpdateProjectProjectsDeploymentType = {
All: "all",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
AllExceptCustomDomains: "all_except_custom_domains",
};
/**
* The Vercel region sandboxes in this project are created in by default.
*/
export const UpdateProjectRegion = {
Iad1: "iad1",
Sfo1: "sfo1",
Cle1: "cle1",
Cdg1: "cdg1",
Fra1: "fra1",
Arn1: "arn1",
Sin1: "sin1",
Pdx1: "pdx1",
Lhr1: "lhr1",
Icn1: "icn1",
Bom1: "bom1",
Cpt1: "cpt1",
Dub1: "dub1",
Gru1: "gru1",
Hkg1: "hkg1",
Syd1: "syd1",
Yul1: "yul1",
Hnd1: "hnd1",
Kix1: "kix1",
};
export const UpdateProjectFailoverRegions = {
Iad1: "iad1",
Sfo1: "sfo1",
Cle1: "cle1",
Cdg1: "cdg1",
Fra1: "fra1",
Arn1: "arn1",
Sin1: "sin1",
Pdx1: "pdx1",
Lhr1: "lhr1",
Icn1: "icn1",
Bom1: "bom1",
Cpt1: "cpt1",
Dub1: "dub1",
Gru1: "gru1",
Hkg1: "hkg1",
Syd1: "syd1",
Yul1: "yul1",
Hnd1: "hnd1",
Kix1: "kix1",
};
/**
* Specify if the Vercel Authentication (SSO Protection) will apply to every Deployment Target or just Preview
*/
export const UpdateProjectProjectsRequestDeploymentType = {
All: "all",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
AllExceptCustomDomains: "all_except_custom_domains",
};
/**
* Specify if the Trusted IPs will apply to every Deployment Target or just Preview
*/
export const UpdateProjectProjectsRequestRequestBodyDeploymentType = {
All: "all",
Preview: "preview",
Production: "production",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
AllExceptCustomDomains: "all_except_custom_domains",
};
/**
* exclusive: ip match is enough to bypass deployment protection (regardless of other settings). additional: ip must match + any other protection should be also provided (password, vercel auth, shareable link, automation bypass header, automation bypass query param)
*/
export const ProtectionMode = {
Exclusive: "exclusive",
Additional: "additional",
};
export const ToPreset = {
AllCustom: "all-custom",
};
export const Preset = {
AllCustom: "all-custom",
};
export const UpdateProjectFromPreset = {
AllCustom: "all-custom",
};
export const FromPreset = {
AllCustom: "all-custom",
};
export const UpdateProjectToProjectsPreset = {
AllCustom: "all-custom",
};
export const UpdateProjectToPreset = {
AllCustom: "all-custom",
};
export const UpdateProjectEnvironmentsProjectsTarget = {
Production: "production",
Preview: "preview",
};
export const UpdateProjectSourcesProjectsProvider = {
Github: "github",
Bitbucket: "bitbucket",
};
export const UpdateProjectEnvironmentsTarget = {
Production: "production",
Preview: "preview",
};
export const DeploymentSourcesSources = {
Git: "git",
Cli: "cli",
RestApi: "rest-api",
DeployHook: "deploy-hook",
Integration: "integration",
V0: "v0",
};
/**
* Whether the toast was dismissed, the action was accepted, or the dismissal with this key should be removed
*/
export const UpdateProjectAction = {
Cancel: "cancel",
Accept: "accept",
Delete: "delete",
};
export const UpdateProjectConfiguredBy = {
A: "A",
Cname: "CNAME",
Dns01: "dns-01",
Http: "http",
};
/**
* The type of matching to perform
*/
export const UpdateProjectProjectsResponse200ApplicationJSONResponseBodyAliasDeploymentType = {
EndsWith: "endsWith",
Equals: "equals",
StartsWith: "startsWith",
};
export const UpdateProjectProjectsResponseChecksConclusion = {
Canceled: "canceled",
Failed: "failed",
Skipped: "skipped",
Succeeded: "succeeded",
};
export const UpdateProjectProjectsResponseChecksState = {
Completed: "completed",
Registered: "registered",
Running: "running",
};
export const UpdateProjectProjectsResponsePlan = {
Enterprise: "enterprise",
Hobby: "hobby",
Pro: "pro",
};
export const UpdateProjectProjectsResponseReadyState = {
Blocked: "BLOCKED",
Building: "BUILDING",
Canceled: "CANCELED",
Error: "ERROR",
Initializing: "INITIALIZING",
Queued: "QUEUED",
Ready: "READY",
};
export const UpdateProjectProjectsResponseReadySubstate = {
Promoted: "PROMOTED",
Rolling: "ROLLING",
Staged: "STAGED",
};
export const UpdateProjectProjectsResponse200ApplicationJSONResponseBodyAliasType = {
Lambdas: "LAMBDAS",
};
export const UpdateProjectEnvironment = {
Preview: "preview",
Production: "production",
};
export const UpdateProjectTarget = {
Preview: "PREVIEW",
Production: "PRODUCTION",
Staging: "STAGING",
};
export const UpdateProjectEnvId2 = {
Preview: "preview",
Production: "production",
};
/**
* The origin of this definition. 'api' means created via the API. Undefined means it originated from a deployment (vercel.json).
*/
export const UpdateProjectSource = {
Api: "api",
};
export const UpdateProjectTarget2 = {
Production: "production",
Preview: "preview",
Development: "development",
};
export const UpdateProjectType = {
Encrypted: "encrypted",
Plain: "plain",
Secret: "secret",
Sensitive: "sensitive",
System: "system",
};
/**
* User-facing config/secret model. When set, authoritative for new code paths when the env-var-config-secret-ui flag is enabled. Legacy rows omit this field; legacy rows omit it and callers fall back to existing `type` behavior.
*/
export const UpdateProjectVisibility = {
Config: "config",
Secret: "secret",
};
export const UpdateProjectProjectsResponse200ApplicationJSONResponseBodyEnvType = {
FlagsSecret: "flags-secret",
};
/**
* The type of environment (production, preview, or development)
*/
export const UpdateProjectProjectsType = {
Development: "development",
Preview: "preview",
Production: "production",
};
/**
* The type of matching to perform
*/
export const UpdateProjectProjectsResponse200ApplicationJSONResponseBodyCustomEnvironmentsType = {
EndsWith: "endsWith",
Equals: "equals",
StartsWith: "startsWith",
};
/** @internal */
export const UpdateProjectFramework$outboundSchema = z.nativeEnum(UpdateProjectFramework);
/** @internal */
export const UpdateProjectNodeVersion$outboundSchema = z.nativeEnum(UpdateProjectNodeVersion);
/** @internal */
export const UpdateProjectBuildMachineType$outboundSchema = z.nativeEnum(UpdateProjectBuildMachineType);
/** @internal */
export const UpdateProjectBuildMachineSelection$outboundSchema = z.nativeEnum(UpdateProjectBuildMachineSelection);
/** @internal */
export const UpdateProjectConfiguration$outboundSchema = z.nativeEnum(UpdateProjectConfiguration);
/** @internal */
export const UpdateProjectBuildQueue$outboundSchema = z.object({
configuration: UpdateProjectConfiguration$outboundSchema.optional(),
});
export function updateProjectBuildQueueToJSON(updateProjectBuildQueue) {
return JSON.stringify(UpdateProjectBuildQueue$outboundSchema.parse(updateProjectBuildQueue));
}
/** @internal */
export const UpdateProjectFunctionDefaultMemoryType$outboundSchema = z.nativeEnum(UpdateProjectFunctionDefaultMemoryType);
/** @internal */
export const UpdateProjectBuildMachineElasticReason$outboundSchema = z.nativeEnum(UpdateProjectBuildMachineElasticReason);
/** @internal */
export const UpdateProjectResourceConfig$outboundSchema = z.object({
buildMachineType: UpdateProjectBuildMachineType$outboundSchema.optional(),
buildMachineSelection: UpdateProjectBuildMachineSelection$outboundSchema
.optional(),
buildQueue: z.lazy(() => UpdateProjectBuildQueue$outboundSchema).optional(),
fluid: z.boolean().optional(),
functionDefaultRegions: z.array(z.string()).optional(),
functionDefaultTimeout: z.number().optional(),
functionDefaultMemoryType: UpdateProjectFunctionDefaultMemoryType$outboundSchema.optional(),
functionZeroConfigFailover: z.boolean().optional(),
elasticConcurrencyEnabled: z.boolean().optional(),
buildMachineElasticLastUpdated: z.number().optional(),
buildMachineElasticReason: UpdateProjectBuildMachineElasticReason$outboundSchema.optional(),
isNSNBDisabled: z.boolean().optional(),
enableFunctionsBeta: z.boolean().optional(),
});
export function updateProjectResourceConfigToJSON(updateProjectResourceConfig) {
return JSON.stringify(UpdateProjectResourceConfig$outboundSchema.parse(updateProjectResourceConfig));
}
/** @internal */
export const UpdateProjectStaticIps$outboundSchema = z.object({
enabled: z.boolean(),
});
export function updateProjectStaticIpsToJSON(updateProjectStaticIps) {
return JSON.stringify(UpdateProjectStaticIps$outboundSchema.parse(updateProjectStaticIps));
}
/** @internal */
export const UpdateProjectEnv$outboundSchema = z.nativeEnum(UpdateProjectEnv);
/** @internal */
export const Destination$outboundSchema = z
.nativeEnum(Destination);
/** @internal */
export const SamplingRules$outboundSchema = z.object({
rate: z.number(),
env: UpdateProjectEnv$outboundSchema.optional(),
requestPath: z.string().optional(),
destination: Destination$outboundSchema.optional(),
});
export function samplingRulesToJSON(samplingRules) {
return JSON.stringify(SamplingRules$outboundSchema.parse(samplingRules));
}
/** @internal */
export const UpdateProjectTracing$outboundSchema = z.object({
domains: z.string().optional(),
ignorePaths: z.array(z.string()).optional(),
samplingRules: z.array(z.lazy(() => SamplingRules$outboundSchema)).optional(),
});
export function updateProjectTracingToJSON(updateProjectTracing) {
return JSON.stringify(UpdateProjectTracing$outboundSchema.parse(updateProjectTracing));
}
/** @internal */
export const UpdateProjectIssuerMode$outboundSchema = z.nativeEnum(UpdateProjectIssuerMode);
/** @internal */
export const UpdateProjectOidcTokenConfig$outboundSchema = z.object({
enabled: z.boolean().default(true),
issuerMode: UpdateProjectIssuerMode$outboundSchema.default("team"),
});
export function updateProjectOidcTokenConfigToJSON(updateProjectOidcTokenConfig) {
return JSON.stringify(UpdateProjectOidcTokenConfig$outboundSchema.parse(updateProjectOidcTokenConfig));
}
/** @internal */
export const UpdateProjectDeploymentType$outboundSchema = z.nativeEnum(UpdateProjectDeploymentType);
/** @internal */
export const UpdateProjectPasswordProtection$outboundSchema = z.object({
deploymentType: UpdateProjectDeploymentType$outboundSchema,
password: z.nullable(z.string()).optional(),
});
export function updateProjectPasswordProtectionToJSON(updateProjectPasswordProtection) {
return JSON.stringify(UpdateProjectPasswordProtection$outboundSchema.parse(updateProjectPasswordProtection));
}
/** @internal */
export const UpdateProjectProjectsDeploymentType$outboundSchema = z.nativeEnum(UpdateProjectProjectsDeploymentType);
/** @internal */
export const UpdateProjectPassport$outboundSchema = z.object({
connectorId: z.string(),
deploymentType: UpdateProjectProjectsDeploymentType$outboundSchema.default("all"),
});
export function updateProjectPassportToJSON(updateProjectPassport) {
return JSON.stringify(UpdateProjectPassport$outboundSchema.parse(updateProjectPassport));
}
/** @internal */
export const UpdateProjectRegion$outboundSchema = z.nativeEnum(UpdateProjectRegion);
/** @internal */
export const UpdateProjectFailoverRegions$outboundSchema = z.nativeEnum(UpdateProjectFailoverRegions);
/** @internal */
export const UpdateProjectSandbox$outboundSchema = z.object({
region: UpdateProjectRegion$outboundSchema.optional(),
failoverRegions: z.array(UpdateProjectFailoverRegions$outboundSchema)
.optional(),
});
export function updateProjectSandboxToJSON(updateProjectSandbox) {
return JSON.stringify(UpdateProjectSandbox$outboundSchema.parse(updateProjectSandbox));
}
/** @internal */
export const UpdateProjectProjectsRequestDeploymentType$outboundSchema = z
.nativeEnum(UpdateProjectProjectsRequestDeploymentType);
/** @internal */
export const UpdateProjectSsoProtection$outboundSchema = z.object({
deploymentType: UpdateProjectProjectsRequestDeploymentType$outboundSchema
.default("preview"),
});
export function updateProjectSsoProtectionToJSON(updateProjectSsoProtection) {
return JSON.stringify(UpdateProjectSsoProtection$outboundSchema.parse(updateProjectSsoProtection));
}
/** @internal */
export const UpdateProjectProjectsRequestRequestBodyDeploymentType$outboundSchema = z.nativeEnum(UpdateProjectProjectsRequestRequestBodyDeploymentType);
/** @internal */
export const Addresses$outboundSchema = z.object({
value: z.string(),
note: z.string().optional(),
});
export function addressesToJSON(addresses) {
return JSON.stringify(Addresses$outboundSchema.parse(addresses));
}
/** @internal */
export const ProtectionMode$outboundSchema = z.nativeEnum(ProtectionMode);
/** @internal */
export const UpdateProjectTrustedIps$outboundSchema = z.object({
deploymentType: UpdateProjectProjectsRequestRequestBodyDeploymentType$outboundSchema,
addresses: z.array(z.lazy(() => Addresses$outboundSchema)),
protectionMode: ProtectionMode$outboundSchema,
});
export function updateProjectTrustedIpsToJSON(updateProjectTrustedIps) {
return JSON.stringify(UpdateProjectTrustedIps$outboundSchema.parse(updateProjectTrustedIps));
}
/** @internal */
export const ToPreset$outboundSchema = z
.nativeEnum(ToPreset);
/** @internal */
export const To2$outboundSchema = z
.object({
slugs: z.array(z.string()).optional(),
preset: ToPreset$outboundSchema,
});
export function to2ToJSON(to2) {
return JSON.stringify(To2$outboundSchema.parse(to2));
}
/** @internal */
export const Preset$outboundSchema = z
.nativeEnum(Preset);
/** @internal */
export const To1$outboundSchema = z
.object({
slugs: z.array(z.string()),
preset: Preset$outboundSchema.optional(),
});
export function to1ToJSON(to1) {
return JSON.stringify(To1$outboundSchema.parse(to1));
}
/** @internal */
export const To$outboundSchema = smartUnion([
z.lazy(() => To1$outboundSchema),
z.lazy(() => To2$outboundSchema),
]);
export function toToJSON(to) {
return JSON.stringify(To$outboundSchema.parse(to));
}
/** @internal */
export const UpdateProjectFromPreset$outboundSchema = z.nativeEnum(UpdateProjectFromPreset);
/** @internal */
export const From2$outboundSchema = z.object({
slugs: z.array(z.string()).optional(),
preset: UpdateProjectFromPreset$outboundSchema,
});
export function from2ToJSON(from2) {
return JSON.stringify(From2$outboundSchema.parse(from2));
}
/** @internal */
export const FromPreset$outboundSchema = z
.nativeEnum(FromPreset);
/** @internal */
export const From1$outboundSchema = z.object({
slugs: z.array(z.string()),
preset: FromPreset$outboundSchema.optional(),
});
export function from1ToJSON(from1) {
return JSON.stringify(From1$outboundSchema.parse(from1));
}
/** @internal */
export const From$outboundSchema = smartUnion([
z.lazy(() => From1$outboundSchema),
z.lazy(() => From2$outboundSchema),
]);
export function fromToJSON(from) {
return JSON.stringify(From$outboundSchema.parse(from));
}
/** @internal */
export const CustomAllow$outboundSchema = z.object({
to: smartUnion([
z.lazy(() => To1$outboundSchema),
z.lazy(() => To2$outboundSchema),
]),
from: smartUnion([
z.lazy(() => From1$outboundSchema),
z.lazy(() => From2$outboundSchema),
]),
});
export function customAllowToJSON(customAllow) {
return JSON.stringify(CustomAllow$outboundSchema.parse(customAllow));
}
/** @internal */
export const UpdateProjectProjects$outboundSchema = z.object({
label: z.string().optional(),
customAllow: z.array(z.lazy(() => CustomAllow$outboundSchema)).optional(),
});
export function updateProjectProjectsToJSON(updateProjectProjects) {
return JSON.stringify(UpdateProjectProjects$outboundSchema.parse(updateProjectProjects));
}
/** @internal */
export const UpdateProjectToProjectsPreset$outboundSchema = z.nativeEnum(UpdateProjectToProjectsPreset);
/** @internal */
export const UpdateProjectTo2$outboundSchema = z.object({
slugs: z.array(z.string()).optional(),
preset: UpdateProjectToProjectsPreset$outboundSchema,
});
export function updateProjectTo2ToJSON(updateProjectTo2) {
return JSON.stringify(UpdateProjectTo2$outboundSchema.parse(updateProjectTo2));
}
/** @internal */
export const UpdateProjectToPreset$outboundSchema = z.nativeEnum(UpdateProjectToPreset);
/** @internal */
export const UpdateProjectTo1$outboundSchema = z.object({
slugs: z.array(z.string()),
preset: UpdateProjectToPreset$outboundSchema.optional(),
});
export function updateProjectTo1ToJSON(updateProjectTo1) {
return JSON.stringify(UpdateProjectTo1$outboundSchema.parse(updateProjectTo1));
}
/** @internal */
export const UpdateProjectTo$outboundSchema = smartUnion([
z.lazy(() => UpdateProjectTo1$outboundSchema),
z.lazy(() => UpdateProjectTo2$outboundSchema),
]);
export function updateProjectToToJSON(updateProjectTo) {
return JSON.stringify(UpdateProjectTo$outboundSchema.parse(updateProjectTo));
}
/** @internal */
export const OidcProviders$outboundSchema = z.object({
label: z.string().optional(),
to: smartUnion([
z.lazy(() => UpdateProjectTo1$outboundSchema),
z.lazy(() => UpdateProjectTo2$outboundSchema),
]),
claims: z.record(z.array(z.string())),
});
export function oidcProvidersToJSON(oidcProviders) {
return JSON.stringify(OidcProviders$outboundSchema.parse(oidcProviders));
}
/** @internal */
export const TrustedSources$outboundSchema = z.object({
enableVercelCiSameRepository: z.boolean().optional(),
projects: z.record(z.lazy(() => UpdateProjectProjects$outboundSchema))
.optional(),
oidcProviders: z.record(z.array(z.lazy(() => OidcProviders$outboundSchema)))
.optional(),
});
export function trustedSourcesToJSON(trustedSources) {
return JSON.stringify(TrustedSources$outboundSchema.parse(trustedSources));
}
/** @internal */
export const UpdateProjectEnvironmentsProjects2$outboundSchema = z.object({
type: z.literal("custom"),
environmentId: z.string(),
});
export function updateProjectEnvironmentsProjects2ToJSON(updateProjectEnvironmentsProjects2) {
return JSON.stringify(UpdateProjectEnvironmentsProjects2$outboundSchema.parse(updateProjectEnvironmentsProjects2));
}
/** @internal */
export const UpdateProjectEnvironmentsProjectsTarget$outboundSchema = z
.nativeEnum(UpdateProjectEnvironmentsProjectsTarget);
/** @internal */
export const UpdateProjectEnvironments1$outboundSchema = z.object({
type: z.literal("system"),
target: UpdateProjectEnvironmentsProjectsTarget$outboundSchema,
});
export function updateProjectEnvironments1ToJSON(updateProjectEnvironments1) {
return JSON.stringify(UpdateProjectEnvironments1$outboundSchema.parse(updateProjectEnvironments1));
}
/** @internal */
export const GitSourcesEnvironments$outboundSchema = z.union([
z.lazy(() => UpdateProjectEnvironments1$outboundSchema),
z.lazy(() => UpdateProjectEnvironmentsProjects2$outboundSchema),
]);
export function gitSourcesEnvironmentsToJSON(gitSourcesEnvironments) {
return JSON.stringify(GitSourcesEnvironments$outboundSchema.parse(gitSourcesEnvironments));
}
/** @internal */
export const UpdateProjectSources2$outboundSchema = z.object({
provider: z.literal("gitlab"),
namespace: z.string(),
project: z.string().optional(),
});
export function updateProjectSources2ToJSON(updateProjectSources2) {
return JSON.stringify(UpdateProjectSources2$outboundSchema.parse(updateProjectSources2));
}
/** @internal */
export const UpdateProjectSourcesProjectsProvider$outboundSchema = z.nativeEnum(UpdateProjectSourcesProjectsProvider);
/** @internal */
export const UpdateProjectSources1$outboundSchema = z.object({
provider: UpdateProjectSourcesProjectsProvider$outboundSchema,
org: z.string(),
repo: z.string().optional(),
});
export function updateProjectSources1ToJSON(updateProjectSources1) {
return JSON.stringify(UpdateProjectSources1$outboundSchema.parse(updateProjectSources1));
}
/** @internal */
export const GitSourcesSources$outboundSchema = z.union([
z.lazy(() => UpdateProjectSources1$outboundSchema).and(z.object({ provider: z.literal("github") })),
z.lazy(() => UpdateProjectSources1$outboundSchema).and(z.object({ provider: z.literal("bitbucket") })),
z.lazy(() => UpdateProjectSources2$outboundSchema),
]);
export function gitSourcesSourcesToJSON(gitSourcesSources) {
return JSON.stringify(GitSourcesSources$outboundSchema.parse(gitSourcesSources));
}
/** @internal */
export const GitSources1$outboundSchema = z.object({
enabled: z.boolean(),
environments: z.array(z.union([
z.lazy(() => UpdateProjectEnvironments1$outboundSchema),
z.lazy(() => UpdateProjectEnvironmentsProjects2$outboundSchema),
])),
sources: z.array(z.union([
z.lazy(() => UpdateProjectSources1$outboundSchema).and(z.object({ provider: z.literal("github") })),
z.lazy(() => UpdateProjectSources1$outboundSchema).and(z.object({ provider: z.literal("bitbucket") })),
z.lazy(() => UpdateProjectSources2$outboundSchema),
])),
});
export function gitSources1ToJSON(gitSources1) {
return JSON.stringify(GitSources1$outboundSchema.parse(gitSources1));
}
/** @internal */
export const DeploymentPolicyGitSources$outboundSchema = smartUnion([z.array(z.lazy(() => GitSources1$outboundSchema)), z.string()]);
export function deploymentPolicyGitSourcesToJSON(deploymentPolicyGitSources) {
return JSON.stringify(DeploymentPolicyGitSources$outboundSchema.parse(deploymentPolicyGitSources));
}
/** @internal */
export const UpdateProjectEnvironments2$outboundSchema = z.object({
type: z.literal("custom"),
environmentId: z.string(),
});
export function updateProjectEnvironments2ToJSON(updateProjectEnvironments2) {
return JSON.stringify(UpdateProjectEnvironments2$outboundSchema.parse(updateProjectEnvironments2));
}
/** @internal */
export const UpdateProjectEnvironmentsTarget$outboundSchema = z.nativeEnum(UpdateProjectEnvironmentsTarget);
/** @internal */
export const UpdateProjectEnvironmentsProjects1$outboundSchema = z.object({
type: z.literal("system"),
target: UpdateProjectEnvironmentsTarget$outboundSchema,
});
export function updateProjectEnvironmentsProjects1ToJSON(updateProjectEnvironmentsProjects1) {
return JSON.stringify(UpdateProjectEnvironmentsProjects1$outboundSchema.parse(updateProjectEnvironmentsProjects1));
}
/** @internal */
export const DeploymentSourcesEnvironments$outboundSchema = z.union([
z.lazy(() => UpdateProjectEnvironmentsProjects1$outboundSchema),
z.lazy(() => UpdateProjectEnvironments2$outboundSchema),
]);
export function deploymentSourcesEnvironmentsToJSON(deploymentSourcesEnvironments) {
return JSON.stringify(DeploymentSourcesEnvironments$outboundSchema.parse(deploymentSourcesEnvironments));
}
/** @internal */
export const DeploymentSourcesSources$outboundSchema = z.nativeEnum(DeploymentSourcesSources);
/** @internal */
export const DeploymentSources1$outboundSchema = z.object({
enabled: z.boolean(),
environments: z.array(z.union([
z.lazy(() => UpdateProjectEnvironmentsProjects1$outboundSchema),
z.lazy(() => UpdateProjectEnvironments2$outboundSchema),
])),
sources: z.array(DeploymentSourcesSources$outboundSchema),
});
export function deploymentSources1ToJSON(deploymentSources1) {
return JSON.stringify(DeploymentSources1$outboundSchema.parse(deploymentSources1));
}
/** @internal */
export const DeploymentPolicyDeploymentSources$outboundSchema = smartUnion([
z.array(z.lazy(() => DeploymentSources1$outboundSchema)),
z.string(),
]);
export function deploymentPolicyDeploymentSourcesToJSON(deploymentPolicyDeploymentSources) {
return JSON.stringify(DeploymentPolicyDeploymentSources$outboundSchema.parse(deploymentPolicyDeploymentSources));
}
/** @internal */
export const DeploymentPolicy1$outboundSchema = z.object({
gitSources: smartUnion([
z.array(z.lazy(() => GitSources1$outboundSchema)),
z.string(),
]).optional(),
deploymentSources: smartUnion([
z.array(z.lazy(() => DeploymentSources1$outboundSchema)),
z.string(),
]).optional(),
});
export function deploymentPolicy1ToJSON(deploymentPolicy1) {
return JSON.stringify(DeploymentPolicy1$outboundSchema.parse(deploymentPolicy1));
}
/** @internal */
export const UpdateProjectDeploymentPolicy$outboundSchema = smartUnion([z.lazy(() => DeploymentPolicy1$outboundSchema), z.string()]);
export function updateProjectDeploymentPolicyToJSON(updateProjectDeploymentPolicy) {
return JSON.stringify(UpdateProjectDeploymentPolicy$outboundSchema.parse(updateProjectDeploymentPolicy));
}
/** @internal */
export const UpdateProjectPaths$outboundSchema = z.object({
value: z.string(),
});
export function updateProjectPathsToJSON(updateProjectPaths) {
return JSON.stringify(UpdateProjectPaths$outboundSchema.parse(updateProjectPaths));
}
/** @internal */
export const UpdateProjectOptionsAllowlist$outboundSchema = z.object({
paths: z.array(z.lazy(() => UpdateProjectPaths$outboundSchema)),
});
export function updateProjectOptionsAllowlistToJSON(updateProjectOptionsAllowlist) {
return JSON.stringify(UpdateProjectOptionsAllowlist$outboundSchema.parse(updateProjectOptionsAllowlist));
}
/** @internal */
export const ConnectConfigurations1$outboundSchema = z.object({
envId: z.string(),
connectConfigurationId: z.string(),
passive: z.boolean(),
buildsEnabled: z.boolean(),
});
export function connectConfigurations1ToJSON(connectConfigurations1) {
return JSON.stringify(ConnectConfigurations1$outboundSchema.parse(connectConfigurations1));
}
/** @internal */
export const ConnectConfigurations$outboundSchema = z.lazy(() => ConnectConfigurations1$outboundSchema);
export function connectConfigurationsToJSON(connectConfigurations) {
return JSON.stringify(ConnectConfigurations$outboundSchema.parse(connectConfigurations));
}
/** @internal */
export const UpdateProjectAction$outboundSchema = z.nativeEnum(UpdateProjectAction);
/** @internal */
export const PreviousValue$outboundSchema = smartUnion([z.number(), z.boolean(), z.string()]);
export function previousValueToJSON(previousValue) {
return JSON.stringify(PreviousValue$outboundSchema.parse(previousValue));
}
/** @internal */
export const CurrentValue$outboundSchema = smartUnion([z.number(), z.boolean(), z.string()]);
export function currentValueToJSON(currentValue) {
return JSON.stringify(CurrentValue$outboundSchema.parse(currentValue));
}
/** @internal */
export const Value5$outboundSchema = z.object({
previousValue: smartUnion([z.number(), z.boolean(), z.string()]),
currentValue: smartUnion([z.number(), z.boolean(), z.string()]),
});
export function value5ToJSON(value5) {
return JSON.stringify(Value5$outboundSchema.parse(value5));
}
/** @internal */
export const UpdateProjectDismissedToasts$outboundSchema = z.object({
key: z.string(),
dismissedAt: z.number(),
action: UpdateProjectAction$outboundSchema,
value: z.any().optional(),
});
export function updateProjectDismissedToastsToJSON(updateProjectDismissedToasts) {
return JSON.stringify(UpdateProjectDismissedToasts$outboundSchema.parse(updateProjectDismissedToasts));
}
/** @internal */
export const UpdateProjectRequestBody$outboundSchema = z.object({
autoExposeSystemEnvs: z.boolean().optional(),
autoAssignCustomDomains: z.boolean().optional(),
autoAssignCustomDomainsUpdatedBy: z.string().optional(),
buildCommand: z.nullable(z.string()).optional(),
commandForIgnoringBuildStep: z.nullable(z.string()).optional(),
customerSupportCodeVisibility: z.boolean().optional(),
devCommand: z.nullable(z.string()).optional(),
directoryListing: z.boolean().optional(),
framework: z.nullable(UpdateProjectFramework$outboundSchema).optional(),
gitForkProtection: z.boolean().optional(),
gitLFS: z.boolean().optional(),
protectedSourcemaps: z.boolean().optional(),
installCommand: z.nullable(z.string()).optional(),
name: z.string().optional(),
nodeVersion: UpdateProjectNodeVersion$outboundSchema.optional(),
outputDirectory: z.nullable(z.string()).optional(),
previewDeploymentsDisabled: z.nullable(z.boolean()).optional(),
previewDeploymentSuffix: z.nullable(z.string()).optional(),
resourceConfig: z.lazy(() => UpdateProjectResourceConfig$outboundSchema)
.optional(),
publicSource: z.nullable(z.boolean()).optional(),
rootDirectory: z.nullable(z.string()).optional(),
serverlessFunctionRegion: z.nullable(z.string()).optional(),
serverlessFunctionZeroConfigFailover: z.boolean().optional(),
skewProtectionBoundaryAt: z.number().int().optional(),
skewProtectionMaxAge: z.number().int().optional(),
skewProtectionAllowedDomains: z.array(z.string()).optional(),
skipGitConnectDuringLink: z.boolean().optional(),
sourceFilesOutsideRootDirectory: z.boolean().optional(),
enablePreviewFeedback: z.nullable(z.boolean()).optional(),
enableProductionFeedback: z.nullable(z.boolean()).optional(),
enableAffectedProjectsDeployments: z.boolean().optional(),
enableExternalRewriteCaching: z.boolean().optional(),
staticIps: z.lazy(() => UpdateProjectStaticIps$outboundSchema).optional(),
tracing: z.nullable(z.lazy(() => UpdateProjectTracing$outboundSchema))
.optional(),
oidcTokenConfig: z.lazy(() => UpdateProjectOidcTokenConfig$outboundSchema)
.optional(),
passwordProtection: z.nullable(z.lazy(() => UpdateProjectPasswordProtection$outboundSchema)).optional(),
passport: z.nullable(z.lazy(() => UpdateProjectPassport$outboundSchema))
.optional(),
sandbox: z.lazy(() => UpdateProjectSandbox$outboundSchema).optional(),
ssoProtection: z.nullable(z.lazy(() => UpdateProjectSsoProtection$outboundSchema)).optional(),
trustedIps: z.nullable(z.lazy(() => UpdateProjectTrustedIps$outboundSchema))
.optional(),
trustedSources: z.nullable(z.lazy(() => TrustedSources$outboundSchema))
.optional(),
deploymentPolicy: smartUnion([
z.lazy(() => DeploymentPolicy1$outboundSchema),
z.string(),
]).optional(),
optionsAllowlist: z.nullable(z.lazy(() => UpdateProjectOptionsAllowlist$outboundSchema)).optional(),
connectConfigurations: z.nullable(z.array(z.lazy(() => ConnectConfigurations1$outboundSchema))).optional(),
dismissedToasts: z.array(z.lazy(() => UpdateProjectDismissedToasts$outboundSchema)).optional(),
});
export function updateProjectRequestBodyToJSON(updateProjectRequestBody) {
return JSON.stringify(UpdateProjectRequestBody$outboundSchema.parse(updateProjectRequestBody));
}
/** @internal */
export const UpdateProjectRequest$outboundSchema = z.object({
idOrName: z.string(),
teamId: z.string().optional(),
slug: z.string().optional(),
requestBody: z.lazy(() => UpdateProjectRequestBody$outboundSchema),
}).transform((v) => {
return remap$(v, {
requestBody: "RequestBody",
});
});
export function updateProjectRequestToJSON(updateProjectRequest) {
return JSON.stringify(UpdateProjectRequest$outboundSchema.parse(updateProjectRequest));
}
/** @internal */
export const UpdateProjectCreator4$inboundSchema = z.object({
type: types.literal("system"),
});
export function updateProjectCreator4FromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectCreator4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectCreator4' from JSON`);
}
/** @internal */
export const UpdateProjectCreatorIntegration$inboundSchema = z.object({
integrationId: types.string(),
configurationId: types.string(),
});
export function updateProjectCreatorIntegrationFromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectCreatorIntegration$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectCreatorIntegration' from JSON`);
}
/** @internal */
export const UpdateProjectCreator3$inboundSchema = z.object({
type: types.literal("integration"),
integration: z.lazy(() => UpdateProjectCreatorIntegration$inboundSchema),
});
export function updateProjectCreator3FromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectCreator3$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectCreator3' from JSON`);
}
/** @internal */
export const UpdateProjectCreatorApp$inboundSchema = z.object({
id: types.string(),
clientId: types.optional(types.string()),
});
export function updateProjectCreatorAppFromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectCreatorApp$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectCreatorApp' from JSON`);
}
/** @internal */
export const UpdateProjectCreator2$inboundSchema = z.object({
type: types.literal("app"),
app: z.lazy(() => UpdateProjectCreatorApp$inboundSchema),
});
export function updateProjectCreator2FromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectCreator2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectCreator2' from JSON`);
}
/** @internal */
export const UpdateProjectViaIntegration$inboundSchema = z.object({
integrationId: types.string(),
configurationId: types.string(),
});
export function updateProjectViaIntegrationFromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectViaIntegration$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectViaIntegration' from JSON`);
}
/** @internal */
export const UpdateProjectVia2$inboundSchema = z.object({
type: types.literal("integration"),
integration: z.lazy(() => UpdateProjectViaIntegration$inboundSchema),
});
export function updateProjectVia2FromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectVia2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectVia2' from JSON`);
}
/** @internal */
export const UpdateProjectViaApp$inboundSchema = z.object({
id: types.string(),
clientId: types.optional(types.string()),
});
export function updateProjectViaAppFromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectViaApp$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectViaApp' from JSON`);
}
/** @internal */
export const UpdateProjectVia1$inboundSchema = z.object({
type: types.literal("app"),
app: z.lazy(() => UpdateProjectViaApp$inboundSchema),
});
export function updateProjectVia1FromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectVia1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectVia1' from JSON`);
}
/** @internal */
export const UpdateProjectCreatorVia$inboundSchema = z.union([
z.lazy(() => UpdateProjectVia1$inboundSchema),
z.lazy(() => UpdateProjectVia2$inboundSchema),
]);
export function updateProjectCreatorViaFromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectCreatorVia$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectCreatorVia' from JSON`);
}
/** @internal */
export const UpdateProjectCreatorUser$inboundSchema = z.object({
id: types.string(),
});
export function updateProjectCreatorUserFromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectCreatorUser$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectCreatorUser' from JSON`);
}
/** @internal */
export const UpdateProjectCreator1$inboundSchema = z.object({
type: types.literal("user"),
via: types.nullable(z.union([
z.lazy(() => UpdateProjectVia1$inboundSchema),
z.lazy(() => UpdateProjectVia2$inboundSchema),
])),
user: z.lazy(() => UpdateProjectCreatorUser$inboundSchema),
});
export function updateProjectCreator1FromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectCreator1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectCreator1' from JSON`);
}
/** @internal */
export const UpdateProjectCreator$inboundSchema = z.union([
z.lazy(() => UpdateProjectCreator1$inboundSchema),
z.lazy(() => UpdateProjectCreator2$inboundSchema),
z.lazy(() => UpdateProjectCreator3$inboundSchema),
z.lazy(() => UpdateProjectCreator4$inboundSchema),
]);
export function updateProjectCreatorFromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectCreator$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectCreator' from JSON`);
}
/** @internal */
export const UpdateProjectConfiguredBy$inboundSchema = z.nativeEnum(UpdateProjectConfiguredBy);
/** @internal */
export const UpdateProjectProjectsResponseAliasAssigned$inboundSchema = smartUnion([types.number(), types.boolean()]);
export function updateProjectProjectsResponseAliasAssignedFromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectProjectsResponseAliasAssigned$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectProjectsResponseAliasAssigned' from JSON`);
}
/** @internal */
export const UpdateProjectProjectsResponseAliasError$inboundSchema = z.object({
code: types.string(),
message: types.string(),
});
export function updateProjectProjectsResponseAliasErrorFromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectProjectsResponseAliasError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectProjectsResponseAliasError' from JSON`);
}
/** @internal */
export const UpdateProjectProjectsResponse200ApplicationJSONResponseBodyAliasDeploymentType$inboundSchema = z.nativeEnum(UpdateProjectProjectsResponse200ApplicationJSONResponseBodyAliasDeploymentType);
/** @internal */
export const UpdateProjectProjectsResponse200BranchMatcher$inboundSchema = z.object({
type: UpdateProjectProjectsResponse200ApplicationJSONResponseBodyAliasDeploymentType$inboundSchema,
pattern: types.string(),
});
export function updateProjectProjectsResponse200BranchMatcherFromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectProjectsResponse200BranchMatcher$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectProjectsResponse200BranchMatcher' from JSON`);
}
/** @internal */
export const UpdateProjectProjectsResponseBuilds$inboundSchema = z.object({
use: types.string(),
src: types.optional(types.string()),
dest: types.optional(types.string()),
});
export function updateProjectProjectsResponseBuildsFromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectProjectsResponseBuilds$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectProjectsResponseBuilds' from JSON`);
}
/** @internal */
export const UpdateProjectProjectsResponseChecksConclusion$inboundSchema = z
.nativeEnum(UpdateProjectProjectsResponseChecksConclusion);
/** @internal */
export const UpdateProjectProjectsResponseChecksState$inboundSchema = z
.nativeEnum(UpdateProjectProjectsResponseChecksState);
/** @internal */
export const UpdateProjectProjectsResponse200Creator$inboundSchema = z.object({
email: types.string(),
githubLogin: types.optional(types.string()),
gitlabLogin: types.optional(types.string()),
uid: types.string(),
username: types.string(),
});
export function updateProjectProjectsResponse200CreatorFromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectProjectsResponse200Creator$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectProjectsResponse200Creator' from JSON`);
}
/** @internal */
export const UpdateProjectProjectsResponseOidcTokenClaims$inboundSchema = 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()),
mfe_group_ids: types.optional(z.array(types.string())),
plan: types.optional(types.string()),
}).transform((v) => {
return remap$(v, {
"owner_id": "ownerId",
"project_id": "projectId",
"custom_environment_id": "customEnvironmentId",
"mfe_group_ids": "mfeGroupIds",
});
});
export function updateProjectProjectsResponseOidcTokenClaimsFromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectProjectsResponseOidcTokenClaims$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectProjectsResponseOidcTokenClaims' from JSON`);
}
/** @internal */
export const UpdateProjectProjectsResponsePlan$inboundSchema = z.nativeEnum(UpdateProjectProjectsResponsePlan);
/** @internal */
export const UpdateProjectProjectsResponseReadyState$inboundSchema = z
.nativeEnum(UpdateProjectProjectsResponseReadyState);
/** @internal */
export const UpdateProjectProjectsResponseReadySubstate$inboundSchema = z
.nativeEnum(UpdateProjectProjectsResponseReadySubstate);
/** @internal */
export const UpdateProjectProjectsResponse200ApplicationJSONResponseBodyAliasType$inboundSchema = z.nativeEnum(UpdateProjectProjectsResponse200ApplicationJSONResponseBodyAliasType);
/** @internal */
export const UpdateProjectDeployment$inboundSchema = z.object({
id: types.string(),
alias: types.optional(z.array(types.string())),
aliasAssigned: z.nullable(smartUnion([types.number(), types.boolean()]))
.optional(),
aliasError: z.nullable(z.lazy(() => UpdateProjectProjectsResponseAliasError$inboundSchema)).optional(),
aliasFinal: z.nullable(types.string()).optional(),
automaticAliases: types.optional(z.array(types.string())),
branchMatcher: types.optional(z.lazy(() => UpdateProjectProjectsResponse200BranchMatcher$inboundSchema)),
buildingAt: types.optional(types.number()),
builds: types.optional(z.array(z.lazy(() => UpdateProjectProjectsResponseBuilds$inboundSchema))),
checksConclusion: types.optional(UpdateProjectProjectsResponseChecksConclusion$inboundSchema),
checksState: types.optional(UpdateProjectProjectsResponseChecksState$inboundSchema),
connectBuildsEnabled: types.optional(types.boolean()),
connectConfigurationId: types.optional(types.string()),
createdAt: types.number(),
createdIn: types.string(),
creator: types.nullable(z.lazy(() => UpdateProjectProjectsResponse200Creator$inboundSchema)),
deletedAt: types.optional(types.number()),
deploymentHostname: types.string(),
forced: types.optional(types.boolean()),
name: types.string(),
meta: types.optional(z.record(types.string())),
monorepoManager: z.nullable(types.string()).optional(),
oidcTokenClaims: types.optional(z.lazy(() => UpdateProjectProjectsResponseOidcTokenClaims$inboundSchema)),
plan: UpdateProjectProjectsResponsePlan$inboundSchema,
previewCommentsEnabled: types.optional(types.boolean()),
private: types.boolean(),
readyAt: types.optional(types.number()),
readyState: UpdateProjectProjectsResponseReadyState$inboundSchema,
readySubstate: types.optional(UpdateProjectProjectsResponseReadySubstate$inboundSchema),
requestedAt: types.optional(types.number()),
target: z.nullable(types.string()).optional(),
teamId: z.nullable(types.string()).optional(),
type: UpdateProjectProjectsResponse200ApplicationJSONResponseBodyAliasType$inboundSchema,
url: types.string(),
userId: types.optional(types.string()),
withCache: types.optional(types.boolean()),
});
export function updateProjectDeploymentFromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectDeployment$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectDeployment' from JSON`);
}
/** @internal */
export const UpdateProjectEnvironment$inboundSchema = z.nativeEnum(UpdateProjectEnvironment);
/** @internal */
export const UpdateProjectTarget$inboundSchema = z.nativeEnum(UpdateProjectTarget);
/** @internal */
export const UpdateProjectAlias$inboundSchema = z.object({
configuredBy: z.nullable(UpdateProjectConfiguredBy$inboundSchema).optional(),
configuredChangedAt: z.nullable(types.number()).optional(),
createdAt: z.nullable(types.number()).optional(),
deployment: types.nullable(z.lazy(() => UpdateProjectDeployment$inboundSchema)),
domain: types.string(),
environment: UpdateProjectEnvironment$inboundSchema,
gitBranch: z.nullable(types.string()).optional(),
redirect: z.nullable(types.string()).optional(),
redirectStatusCode: z.nullable(types.number()).optional(),
target: UpdateProjectTarget$inboundSchema,
});
export function updateProjectAliasFromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectAlias$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectAlias' from JSON`);
}
/** @internal */
export const UpdateProjectAnalytics$inboundSchema = z.object({
id: types.string(),
canceledAt: z.nullable(types.number()).optional(),
disabledAt: types.number(),
enabledAt: types.number(),
paidAt: types.optional(types.number()),
sampleRatePercent: z.nullable(types.number()).optional(),
spendLimitInDollars: z.nullable(types.number()).optional(),
});
export function updateProjectAnalyticsFromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectAnalytics$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectAnalytics' from JSON`);
}
/** @internal */
export const UpdateProjectSpeedInsights$inboundSchema = 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()),
dataReceivedAt: types.optional(types.number()),
paidAt: types.optional(types.number()),
});
export function updateProjectSpeedInsightsFromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectSpeedInsights$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectSpeedInsights' from JSON`);
}
/** @internal */
export const UpdateProjectEnvId2$inboundSchema = z.nativeEnum(UpdateProjectEnvId2);
/** @internal */
export const UpdateProjectEnvId$inboundSchema = smartUnion([types.string(), UpdateProjectEnvId2$inboundSchema]);
export function updateProjectEnvIdFromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectEnvId$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectEnvId' from JSON`);
}
/** @internal */
export const UpdateProjectAws$inboundSchema = z.object({
subnetIds: z.array(types.string()),
securityGroupId: types.optional(types.string()),
});
export function updateProjectAwsFromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectAws$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectAws' from JSON`);
}
/** @internal */
export const UpdateProjectConnectConfigurations$inboundSchema = z.object({
envId: smartUnion([types.string(), UpdateProjectEnvId2$inboundSchema]),
connectConfigurationId: types.string(),
dc: types.optional(types.string()),
passive: types.boolean(),
buildsEnabled: types.boolean(),
aws: types.optional(z.lazy(() => UpdateProjectAws$inboundSchema)),
createdAt: types.number(),
updatedAt: types.number(),
});
export function updateProjectConnectConfigurationsFromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectConnectConfigurations$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectConnectConfigurations' from JSON`);
}
/** @internal */
export const UpdateProjectSource$inboundSchema = z.nativeEnum(UpdateProjectSource);
/** @internal */
export const UpdateProjectDefinitions$inboundSchema = z.object({
host: types.string(),
path: types.string(),
schedule: types.string(),
source: types.optional(UpdateProjectSource$inboundSchema),
description: types.optional(types.string()),
hostInferred: types.optional(types.boolean()),
});
export function updateProjectDefinitionsFromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectDefinitions$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectDefinitions' from JSON`);
}
/** @internal */
export const UpdateProjectCrons$inboundSchema = z.object({
enabledAt: types.number(),
disabledAt: types.nullable(types.number()),
updatedAt: types.number(),
deploymentId: types.nullable(types.string()),
definitions: z.array(z.lazy(() => UpdateProjectDefinitions$inboundSchema)),
});
export function updateProjectCronsFromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectCrons$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectCrons' from JSON`);
}
/** @internal */
export const UpdateProjectDataCache$inboundSchema = z.object({
userDisabled: types.boolean(),
storageSizeBytes: z.nullable(types.number()).optional(),
unlimited: types.optional(types.boolean()),
});
export function updateProjectDataCacheFromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectDataCache$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectDataCache' from JSON`);
}
/** @internal */
export const UpdateProjectDeploymentExpiration$inboundSchema = z.object({
expirationDays: types.optional(types.number()),
expirationDaysProduction: types.optional(types.number()),
expirationDaysCanceled: types.optional(types.number()),
expirationDaysErrored: types.optional(types.number()),
deploymentsToKeep: types.optional(types.number()),
});
export function updateProjectDeploymentExpirationFromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectDeploymentExpiration$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectDeploymentExpiration' from JSON`);
}
/** @internal */
export const UpdateProjectExpiration2$inboundSchema = z.object({
lockedAt: types.number(),
lockedBy: types.string(),
});
export function updateProjectExpiration2FromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectExpiration2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectExpiration2' from JSON`);
}
/** @internal */
export const UpdateProjectExpiration1$inboundSchema = z.object({
expiresAt: types.number(),
});
export function updateProjectExpiration1FromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectExpiration1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectExpiration1' from JSON`);
}
/** @internal */
export const UpdateProjectExpiration$inboundSchema = smartUnion([
z.lazy(() => UpdateProjectExpiration2$inboundSchema),
z.lazy(() => UpdateProjectExpiration1$inboundSchema),
]);
export function updateProjectExpirationFromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectExpiration$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectExpiration' from JSON`);
}
/** @internal */
export const UpdateProjectTarget2$inboundSchema = z.nativeEnum(UpdateProjectTarget2);
/** @internal */
export const UpdateProjectProjectsTarget$inboundSchema = smartUnion([z.array(types.string()), UpdateProjectTarget2$inboundSchema]);
export function updateProjectProjectsTargetFromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectProjectsTarget$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectProjectsTarget' from JSON`);
}
/** @internal */
export const UpdateProjectType$inboundSchema = z.nativeEnum(UpdateProjectType);
/** @internal */
export const UpdateProjectVisibility$inboundSchema = z.nativeEnum(UpdateProjectVisibility);
/** @internal */
export const UpdateProjectContentHint17$inboundSchema = z.object({
type: types.literal("flags-connection-string"),
projectId: types.string(),
});
export function updateProjectContentHint17FromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectContentHint17$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectContentHint17' from JSON`);
}
/** @internal */
export const UpdateProjectContentHint16$inboundSchema = z.object({
type: types.literal("integration-store-secret"),
storeId: types.string(),
integrationId: types.string(),
integrationProductId: types.string(),
integrationConfigurationId: types.string(),
});
export function updateProjectContentHint16FromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectContentHint16$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectContentHint16' from JSON`);
}
/** @internal */
export const UpdateProjectContentHint15$inboundSchema = z.object({
type: types.literal("postgres-url-no-ssl"),
storeId: types.string(),
});
export function updateProjectContentHint15FromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectContentHint15$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectContentHint15' from JSON`);
}
/** @internal */
export const UpdateProjectContentHint14$inboundSchema = z.object({
type: types.literal("postgres-database"),
storeId: types.string(),
});
export function updateProjectContentHint14FromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectContentHint14$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectContentHint14' from JSON`);
}
/** @internal */
export const UpdateProjectContentHint13$inboundSchema = z.object({
type: types.literal("postgres-password"),
storeId: types.string(),
});
export function updateProjectContentHint13FromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectContentHint13$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectContentHint13' from JSON`);
}
/** @internal */
export const UpdateProjectContentHint12$inboundSchema = z.object({
type: types.literal("postgres-host"),
storeId: types.string(),
});
export function updateProjectContentHint12FromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectContentHint12$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectContentHint12' from JSON`);
}
/** @internal */
export const UpdateProjectContentHint11$inboundSchema = z.object({
type: types.literal("postgres-user"),
storeId: types.string(),
});
export function updateProjectContentHint11FromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectContentHint11$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectContentHint11' from JSON`);
}
/** @internal */
export const UpdateProjectContentHint10$inboundSchema = z.object({
type: types.literal("postgres-prisma-url"),
storeId: types.string(),
});
export function updateProjectContentHint10FromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectContentHint10$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectContentHint10' from JSON`);
}
/** @internal */
export const UpdateProjectContentHint9$inboundSchema = z.object({
type: types.literal("postgres-url-non-pooling"),
storeId: types.string(),
});
export function updateProjectContentHint9FromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectContentHint9$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectContentHint9' from JSON`);
}
/** @internal */
export const UpdateProjectContentHint8$inboundSchema = z.object({
type: types.literal("postgres-url"),
storeId: types.string(),
});
export function updateProjectContentHint8FromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectContentHint8$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectContentHint8' from JSON`);
}
/** @internal */
export const UpdateProjectContentHint7$inboundSchema = z.object({
type: types.literal("blob-webhook-public-key"),
storeId: types.string(),
});
export function updateProjectContentHint7FromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectContentHint7$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectContentHint7' from JSON`);
}
/** @internal */
export const UpdateProjectContentHint6$inboundSchema = z.object({
type: types.literal("blob-store-id"),
storeId: types.string(),
});
export function updateProjectContentHint6FromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectContentHint6$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectContentHint6' from JSON`);
}
/** @internal */
export const UpdateProjectContentHint5$inboundSchema = z.object({
type: types.literal("blob-read-write-token"),
storeId: types.string(),
});
export function updateProjectContentHint5FromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectContentHint5$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectContentHint5' from JSON`);
}
/** @internal */
export const UpdateProjectContentHint4$inboundSchema = z.object({
type: types.literal("redis-rest-api-read-only-token"),
storeId: types.string(),
});
export function updateProjectContentHint4FromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectContentHint4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectContentHint4' from JSON`);
}
/** @internal */
export const UpdateProjectContentHint3$inboundSchema = z.object({
type: types.literal("redis-rest-api-token"),
storeId: types.string(),
});
export function updateProjectContentHint3FromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectContentHint3$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectContentHint3' from JSON`);
}
/** @internal */
export const UpdateProjectContentHint2$inboundSchema = z.object({
type: types.literal("redis-rest-api-url"),
storeId: types.string(),
});
export function updateProjectContentHint2FromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectContentHint2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectContentHint2' from JSON`);
}
/** @internal */
export const UpdateProjectContentHint1$inboundSchema = z.object({
type: types.literal("redis-url"),
storeId: types.string(),
});
export function updateProjectContentHint1FromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectContentHint1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectContentHint1' from JSON`);
}
/** @internal */
export const UpdateProjectContentHint$inboundSchema = z.union([
z.lazy(() => UpdateProjectContentHint1$inboundSchema),
z.lazy(() => UpdateProjectContentHint2$inboundSchema),
z.lazy(() => UpdateProjectContentHint3$inboundSchema),
z.lazy(() => UpdateProjectContentHint4$inboundSchema),
z.lazy(() => UpdateProjectContentHint5$inboundSchema),
z.lazy(() => UpdateProjectContentHint6$inboundSchema),
z.lazy(() => UpdateProjectContentHint7$inboundSchema),
z.lazy(() => UpdateProjectContentHint8$inboundSchema),
z.lazy(() => UpdateProjectContentHint9$inboundSchema),
z.lazy(() => UpdateProjectContentHint10$inboundSchema),
z.lazy(() => UpdateProjectContentHint11$inboundSchema),
z.lazy(() => UpdateProjectContentHint12$inboundSchema),
z.lazy(() => UpdateProjectContentHint13$inboundSchema),
z.lazy(() => UpdateProjectContentHint14$inboundSchema),
z.lazy(() => UpdateProjectContentHint15$inboundSchema),
z.lazy(() => UpdateProjectContentHint16$inboundSchema),
z.lazy(() => UpdateProjectContentHint17$inboundSchema),
]);
export function updateProjectContentHintFromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectContentHint$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectContentHint' from JSON`);
}
/** @internal */
export const UpdateProjectProjectsResponse200ApplicationJSONResponseBodyEnvType$inboundSchema = z.nativeEnum(UpdateProjectProjectsResponse200ApplicationJSONResponseBodyEnvType);
/** @internal */
export const UpdateProjectInternalContentHint$inboundSchema = z.object({
type: UpdateProjectProjectsResponse200ApplicationJSONResponseBodyEnvType$inboundSchema,
encryptedValue: types.string(),
});
export function updateProjectInternalContentHintFromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectInternalContentHint$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectInternalContentHint' from JSON`);
}
/** @internal */
export const UpdateProjectProjectsEnv$inboundSchema = z.object({
target: types.optional(smartUnion([z.array(types.string()), UpdateProjectTarget2$inboundSchema])),
type: UpdateProjectType$inboundSchema,
sunsetSecretId: types.optional(types.string()),
legacyValue: types.optional(types.string()),
decrypted: types.optional(types.boolean()),
value: types.string(),
vsmValue: types.optional(types.string()),
id: types.optional(types.string()),
key: types.string(),
configurationId: z.nullable(types.string()).optional(),
createdAt: types.optional(types.number()),
updatedAt: types.optional(types.number()),
createdBy: z.nullable(types.string()).optional(),
updatedBy: z.nullable(types.string()).optional(),
gitBranch: types.optional(types.string()),
visibility: types.optional(UpdateProjectVisibility$inboundSchema),
edgeConfigId: z.nullable(types.string()).optional(),
edgeConfigTokenId: z.nullable(types.string()).optional(),
contentHint: z.nullable(z.union([
z.lazy(() => UpdateProjectContentHint1$inboundSchema),
z.lazy(() => UpdateProjectContentHint2$inboundSchema),
z.lazy(() => UpdateProjectContentHint3$inboundSchema),
z.lazy(() => UpdateProjectContentHint4$inboundSchema),
z.lazy(() => UpdateProjectContentHint5$inboundSchema),
z.lazy(() => UpdateProjectContentHint6$inboundSchema),
z.lazy(() => UpdateProjectContentHint7$inboundSchema),
z.lazy(() => UpdateProjectContentHint8$inboundSchema),
z.lazy(() => UpdateProjectContentHint9$inboundSchema),
z.lazy(() => UpdateProjectContentHint10$inboundSchema),
z.lazy(() => UpdateProjectContentHint11$inboundSchema),
z.lazy(() => UpdateProjectContentHint12$inboundSchema),
z.lazy(() => UpdateProjectContentHint13$inboundSchema),
z.lazy(() => UpdateProjectContentHint14$inboundSchema),
z.lazy(() => UpdateProjectContentHint15$inboundSchema),
z.lazy(() => UpdateProjectContentHint16$inboundSchema),
z.lazy(() => UpdateProjectContentHint17$inboundSchema),
])).optional(),
internalContentHint: z.nullable(z.lazy(() => UpdateProjectInternalContentHint$inboundSchema)).optional(),
comment: types.optional(types.string()),
customEnvironmentIds: types.optional(z.array(types.string())),
});
export function updateProjectProjectsEnvFromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdateProjectProjectsEnv$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateProjectProjectsEnv' from JSON`);
}
/** @internal */
export const UpdateProjectProjectsType$inboundSchema = z.nativeEnum(UpdateProjectProjectsType);
/** @internal */
export const UpdateProjectProjectsResponse200ApplicationJSONResponseBodyCustomEnvironmentsType$inboundSchema = z.nativeEnum(UpdateProjectProjectsResponse200ApplicationJSONResponseBodyCustomEnvironmentsType);
//# sourceMappingURL=updateprojectprojectsresponse200applicationjsonresponsebodycustomenvironmentstype.js.map