@vercel/sdk
Version:
<p align="center"> <a href="https://vercel.com"> <img src="https://assets.vercel.com/image/upload/v1588805858/repositories/vercel/logo.png" height="96"> <h3 align="center">Vercel</h3> </a> <p align="center">Develop. Preview. Ship.</p> </p>
4,742 lines • 138 kB
text/typescript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod/v3";
import { remap as remap$ } from "../lib/primitives.js";
import { safeParse } from "../lib/schemas.js";
import { ClosedEnum } from "../types/enums.js";
import { Result as SafeParseResult } from "../types/fp.js";
import * as types from "../types/primitives.js";
import { smartUnion } from "../types/smartUnion.js";
import { SDKValidationError } from "./sdkvalidationerror.js";
export type GetProjectRequest = {
/**
* The unique project identifier or the project name
*/
idOrName: string;
/**
* The Team identifier to perform the request on behalf of.
*/
teamId?: string | undefined;
/**
* The Team slug to perform the request on behalf of.
*/
slug?: string | undefined;
};
/**
* The list of the installation resources connected to the project.
*/
export type GetProjectResources = {
externalResourceId: string;
};
/**
* Integration installation enabled on the project.
*/
export type GetProjectIntegrations = {
/**
* The integration installation ID.
*/
installationId: string;
/**
* The list of the installation resources connected to the project.
*/
resources?: Array<GetProjectResources> | undefined;
};
export type GetProjectCreator4 = {
type: "system";
};
export type GetProjectCreatorIntegration = {
integrationId: string;
configurationId: string;
};
export type GetProjectCreator3 = {
type: "integration";
integration: GetProjectCreatorIntegration;
};
export type GetProjectCreatorApp = {
/**
* The internal ID of the Vercel App backing this principal.
*/
id: string;
/**
* The protocol-facing OAuth client ID. This may differ from {@link id} when Client ID Metadata Documents (CIMD) are used.
*/
clientId?: string | undefined;
};
export type GetProjectCreator2 = {
type: "app";
app: GetProjectCreatorApp;
};
export type GetProjectViaIntegration = {
integrationId: string;
configurationId: string;
};
/**
* Set when a Vercel App or Integration acts on behalf of a {@link User}. Captures user-consented OAuth delegation that the ACL layer may inspect to evaluate scope restrictions. This is NOT for impersonation or token-exchange provenance — those live on `auth.token`, not on the principal.
*/
export type GetProjectVia2 = {
type: "integration";
integration: GetProjectViaIntegration;
};
export type GetProjectViaApp = {
/**
* The internal ID of the Vercel App backing this principal.
*/
id: string;
/**
* The protocol-facing OAuth client ID. This may differ from {@link id} when Client ID Metadata Documents (CIMD) are used.
*/
clientId?: string | undefined;
};
/**
* Set when a Vercel App or Integration acts on behalf of a {@link User}. Captures user-consented OAuth delegation that the ACL layer may inspect to evaluate scope restrictions. This is NOT for impersonation or token-exchange provenance — those live on `auth.token`, not on the principal.
*/
export type GetProjectVia1 = {
type: "app";
app: GetProjectViaApp;
};
export type GetProjectCreatorVia = GetProjectVia1 | GetProjectVia2;
export type GetProjectCreatorUser = {
id: string;
};
export type GetProjectCreator1 = {
type: "user";
via: GetProjectVia1 | GetProjectVia2 | null;
user: GetProjectCreatorUser;
};
export type GetProjectCreator =
| GetProjectCreator1
| GetProjectCreator2
| GetProjectCreator3
| GetProjectCreator4;
export const GetProjectConfiguredBy = {
A: "A",
Cname: "CNAME",
Dns01: "dns-01",
Http: "http",
} as const;
export type GetProjectConfiguredBy = ClosedEnum<typeof GetProjectConfiguredBy>;
export type GetProjectProjectsResponseAliasAssigned = number | boolean;
export type GetProjectProjectsResponseAliasError = {
code: string;
message: string;
};
/**
* The type of matching to perform
*/
export const GetProjectProjectsResponse200ApplicationJSONResponseBodyAliasDeploymentType =
{
EndsWith: "endsWith",
Equals: "equals",
StartsWith: "startsWith",
} as const;
/**
* The type of matching to perform
*/
export type GetProjectProjectsResponse200ApplicationJSONResponseBodyAliasDeploymentType =
ClosedEnum<
typeof GetProjectProjectsResponse200ApplicationJSONResponseBodyAliasDeploymentType
>;
export type GetProjectProjectsResponse200BranchMatcher = {
/**
* The type of matching to perform
*/
type:
GetProjectProjectsResponse200ApplicationJSONResponseBodyAliasDeploymentType;
/**
* The pattern to match against branch names
*/
pattern: string;
};
export type GetProjectProjectsResponseBuilds = {
use: string;
src?: string | undefined;
dest?: string | undefined;
};
export const GetProjectProjectsResponseChecksConclusion = {
Canceled: "canceled",
Failed: "failed",
Skipped: "skipped",
Succeeded: "succeeded",
} as const;
export type GetProjectProjectsResponseChecksConclusion = ClosedEnum<
typeof GetProjectProjectsResponseChecksConclusion
>;
export const GetProjectProjectsResponseChecksState = {
Completed: "completed",
Registered: "registered",
Running: "running",
} as const;
export type GetProjectProjectsResponseChecksState = ClosedEnum<
typeof GetProjectProjectsResponseChecksState
>;
export type GetProjectProjectsResponse200Creator = {
email: string;
githubLogin?: string | undefined;
gitlabLogin?: string | undefined;
uid: string;
username: string;
};
export type GetProjectProjectsResponseOidcTokenClaims = {
iss: string;
sub: string;
scope: string;
aud: string;
owner: string;
ownerId: string;
project: string;
projectId: string;
environment: string;
customEnvironmentId?: string | undefined;
mfeGroupIds?: Array<string> | undefined;
plan?: string | undefined;
};
export const GetProjectProjectsResponsePlan = {
Enterprise: "enterprise",
Hobby: "hobby",
Pro: "pro",
} as const;
export type GetProjectProjectsResponsePlan = ClosedEnum<
typeof GetProjectProjectsResponsePlan
>;
export const GetProjectProjectsResponseReadyState = {
Blocked: "BLOCKED",
Building: "BUILDING",
Canceled: "CANCELED",
Error: "ERROR",
Initializing: "INITIALIZING",
Queued: "QUEUED",
Ready: "READY",
} as const;
export type GetProjectProjectsResponseReadyState = ClosedEnum<
typeof GetProjectProjectsResponseReadyState
>;
export const GetProjectProjectsResponseReadySubstate = {
Promoted: "PROMOTED",
Rolling: "ROLLING",
Staged: "STAGED",
} as const;
export type GetProjectProjectsResponseReadySubstate = ClosedEnum<
typeof GetProjectProjectsResponseReadySubstate
>;
export const GetProjectProjectsResponse200ApplicationJSONResponseBodyAliasType =
{
Lambdas: "LAMBDAS",
} as const;
export type GetProjectProjectsResponse200ApplicationJSONResponseBodyAliasType =
ClosedEnum<
typeof GetProjectProjectsResponse200ApplicationJSONResponseBodyAliasType
>;
export type GetProjectDeployment = {
id: string;
alias?: Array<string> | undefined;
aliasAssigned?: number | boolean | null | undefined;
aliasError?: GetProjectProjectsResponseAliasError | null | undefined;
aliasFinal?: string | null | undefined;
automaticAliases?: Array<string> | undefined;
branchMatcher?: GetProjectProjectsResponse200BranchMatcher | undefined;
buildingAt?: number | undefined;
builds?: Array<GetProjectProjectsResponseBuilds> | undefined;
checksConclusion?: GetProjectProjectsResponseChecksConclusion | undefined;
checksState?: GetProjectProjectsResponseChecksState | undefined;
connectBuildsEnabled?: boolean | undefined;
connectConfigurationId?: string | undefined;
createdAt: number;
createdIn: string;
creator: GetProjectProjectsResponse200Creator | null;
deletedAt?: number | undefined;
deploymentHostname: string;
forced?: boolean | undefined;
name: string;
meta?: { [k: string]: string } | undefined;
monorepoManager?: string | null | undefined;
oidcTokenClaims?: GetProjectProjectsResponseOidcTokenClaims | undefined;
plan: GetProjectProjectsResponsePlan;
/**
* Whether or not preview comments are enabled for the deployment
*/
previewCommentsEnabled?: boolean | undefined;
private: boolean;
readyAt?: number | undefined;
readyState: GetProjectProjectsResponseReadyState;
readySubstate?: GetProjectProjectsResponseReadySubstate | undefined;
requestedAt?: number | undefined;
target?: string | null | undefined;
teamId?: string | null | undefined;
type: GetProjectProjectsResponse200ApplicationJSONResponseBodyAliasType;
url: string;
/**
* Present for user creators; omitted for app/integration/system creators.
*/
userId?: string | undefined;
withCache?: boolean | undefined;
};
export const GetProjectEnvironment = {
Preview: "preview",
Production: "production",
} as const;
export type GetProjectEnvironment = ClosedEnum<typeof GetProjectEnvironment>;
export const GetProjectTarget = {
Preview: "PREVIEW",
Production: "PRODUCTION",
Staging: "STAGING",
} as const;
export type GetProjectTarget = ClosedEnum<typeof GetProjectTarget>;
export type GetProjectAlias = {
configuredBy?: GetProjectConfiguredBy | null | undefined;
configuredChangedAt?: number | null | undefined;
createdAt?: number | null | undefined;
deployment: GetProjectDeployment | null;
domain: string;
environment: GetProjectEnvironment;
gitBranch?: string | null | undefined;
redirect?: string | null | undefined;
redirectStatusCode?: number | null | undefined;
target: GetProjectTarget;
};
export type GetProjectAnalytics = {
id: string;
canceledAt?: number | null | undefined;
disabledAt: number;
enabledAt: number;
paidAt?: number | undefined;
sampleRatePercent?: number | null | undefined;
spendLimitInDollars?: number | null | undefined;
};
export type GetProjectSpeedInsights = {
id: string;
enabledAt?: number | undefined;
disabledAt?: number | undefined;
canceledAt?: number | undefined;
hasData?: boolean | undefined;
/**
* When the first free (not Speed Insights Plus) production data point was observed, in ms. Set once by subscriber-analytics-events; projects that already had data before this field shipped get it backfilled on their next batch, so it reads "first free data point observed", not necessarily "first ever".
*/
dataReceivedAt?: number | undefined;
paidAt?: number | undefined;
};
export const GetProjectEnvId2 = {
Preview: "preview",
Production: "production",
} as const;
export type GetProjectEnvId2 = ClosedEnum<typeof GetProjectEnvId2>;
export type GetProjectEnvId = string | GetProjectEnvId2;
export type GetProjectAws = {
subnetIds: Array<string>;
securityGroupId?: string | undefined;
};
export type GetProjectConnectConfigurations = {
envId: string | GetProjectEnvId2;
connectConfigurationId: string;
dc?: string | undefined;
passive: boolean;
buildsEnabled: boolean;
aws?: GetProjectAws | undefined;
createdAt: number;
updatedAt: number;
};
/**
* The origin of this definition. 'api' means created via the API. Undefined means it originated from a deployment (vercel.json).
*/
export const GetProjectSource = {
Api: "api",
} as const;
/**
* The origin of this definition. 'api' means created via the API. Undefined means it originated from a deployment (vercel.json).
*/
export type GetProjectSource = ClosedEnum<typeof GetProjectSource>;
export type GetProjectDefinitions = {
/**
* The hostname that should be used.
*/
host: string;
/**
* The path that should be called for the cronjob.
*/
path: string;
/**
* The cron expression.
*/
schedule: string;
/**
* The origin of this definition. 'api' means created via the API. Undefined means it originated from a deployment (vercel.json).
*/
source?: GetProjectSource | undefined;
/**
* A human-readable description of what this cron job does.
*/
description?: string | undefined;
/**
* Whether the host was inferred from the production deployment URL rather than explicitly provided.
*/
hostInferred?: boolean | undefined;
};
export type GetProjectCrons = {
/**
* The time the feature was enabled for this project. Note: It enables automatically with the first Deployment that outputs cronjobs.
*/
enabledAt: number;
/**
* The time the feature was disabled for this project.
*/
disabledAt: number | null;
updatedAt: number;
/**
* The ID of the Deployment from which the definitions originated.
*/
deploymentId: string | null;
definitions: Array<GetProjectDefinitions>;
};
export type GetProjectDataCache = {
userDisabled: boolean;
storageSizeBytes?: number | null | undefined;
unlimited?: boolean | undefined;
};
/**
* Retention policies for deployments. These are enforced at the project level, but we also maintain an instance of this at the team level as a default policy that gets applied to new projects.
*/
export type GetProjectDeploymentExpiration = {
/**
* Number of days to keep non-production deployments (mostly preview deployments) before soft deletion.
*/
expirationDays?: number | undefined;
/**
* Number of days to keep production deployments before soft deletion.
*/
expirationDaysProduction?: number | undefined;
/**
* Number of days to keep canceled deployments before soft deletion.
*/
expirationDaysCanceled?: number | undefined;
/**
* Number of days to keep errored deployments before soft deletion.
*/
expirationDaysErrored?: number | undefined;
/**
* Minimum number of production deployments to keep for this project, even if they are over the production expiration limit.
*/
deploymentsToKeep?: number | undefined;
};
export type GetProjectExpiration2 = {
/**
* Unix ms timestamp when the project was locked.
*/
lockedAt: number;
/**
* userId of the actor that triggered the lock (system or admin).
*/
lockedBy: string;
};
export type GetProjectExpiration1 = {
/**
* Unix ms timestamp when the project is scheduled to expire.
*/
expiresAt: number;
};
export type GetProjectExpiration =
| GetProjectExpiration2
| GetProjectExpiration1;
export const GetProjectTarget2 = {
Production: "production",
Preview: "preview",
Development: "development",
} as const;
export type GetProjectTarget2 = ClosedEnum<typeof GetProjectTarget2>;
export const GetProjectTarget1 = {
Development: "development",
Preview: "preview",
Production: "production",
} as const;
export type GetProjectTarget1 = ClosedEnum<typeof GetProjectTarget1>;
export type GetProjectProjectsTarget =
| Array<GetProjectTarget1>
| GetProjectTarget2;
export const GetProjectType = {
Encrypted: "encrypted",
Plain: "plain",
Secret: "secret",
Sensitive: "sensitive",
System: "system",
} as const;
export type GetProjectType = ClosedEnum<typeof GetProjectType>;
/**
* 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 GetProjectVisibility = {
Config: "config",
Secret: "secret",
} as const;
/**
* 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 type GetProjectVisibility = ClosedEnum<typeof GetProjectVisibility>;
export type GetProjectContentHint17 = {
type: "flags-connection-string";
projectId: string;
};
export type GetProjectContentHint16 = {
type: "integration-store-secret";
storeId: string;
integrationId: string;
integrationProductId: string;
integrationConfigurationId: string;
};
export type GetProjectContentHint15 = {
type: "postgres-url-no-ssl";
storeId: string;
};
export type GetProjectContentHint14 = {
type: "postgres-database";
storeId: string;
};
export type GetProjectContentHint13 = {
type: "postgres-password";
storeId: string;
};
export type GetProjectContentHint12 = {
type: "postgres-host";
storeId: string;
};
export type GetProjectContentHint11 = {
type: "postgres-user";
storeId: string;
};
export type GetProjectContentHint10 = {
type: "postgres-prisma-url";
storeId: string;
};
export type GetProjectContentHint9 = {
type: "postgres-url-non-pooling";
storeId: string;
};
export type GetProjectContentHint8 = {
type: "postgres-url";
storeId: string;
};
export type GetProjectContentHint7 = {
type: "blob-webhook-public-key";
storeId: string;
};
export type GetProjectContentHint6 = {
type: "blob-store-id";
storeId: string;
};
export type GetProjectContentHint5 = {
type: "blob-read-write-token";
storeId: string;
};
export type GetProjectContentHint4 = {
type: "redis-rest-api-read-only-token";
storeId: string;
};
export type GetProjectContentHint3 = {
type: "redis-rest-api-token";
storeId: string;
};
export type GetProjectContentHint2 = {
type: "redis-rest-api-url";
storeId: string;
};
export type GetProjectContentHint1 = {
type: "redis-url";
storeId: string;
};
export type GetProjectContentHint =
| GetProjectContentHint1
| GetProjectContentHint2
| GetProjectContentHint3
| GetProjectContentHint4
| GetProjectContentHint5
| GetProjectContentHint6
| GetProjectContentHint7
| GetProjectContentHint8
| GetProjectContentHint9
| GetProjectContentHint10
| GetProjectContentHint11
| GetProjectContentHint12
| GetProjectContentHint13
| GetProjectContentHint14
| GetProjectContentHint15
| GetProjectContentHint16
| GetProjectContentHint17;
export const GetProjectProjectsResponse200ApplicationJSONResponseBodyEnvType = {
FlagsSecret: "flags-secret",
} as const;
export type GetProjectProjectsResponse200ApplicationJSONResponseBodyEnvType =
ClosedEnum<
typeof GetProjectProjectsResponse200ApplicationJSONResponseBodyEnvType
>;
/**
* Similar to `contentHints`, but should not be exposed to the user.
*/
export type GetProjectInternalContentHint = {
type: GetProjectProjectsResponse200ApplicationJSONResponseBodyEnvType;
/**
* Contains the `value` of the env variable, encrypted with a special key to make decryption possible in the subscriber Lambda.
*/
encryptedValue: string;
};
export type GetProjectEnv = {
target?: Array<GetProjectTarget1> | GetProjectTarget2 | undefined;
type: GetProjectType;
/**
* This is used to identify variables that have been migrated from type secret to sensitive.
*/
sunsetSecretId?: string | undefined;
/**
* Legacy now-encryption ciphertext, present after migration swaps value/vsmValue
*/
legacyValue?: string | undefined;
decrypted?: boolean | undefined;
value: string;
vsmValue?: string | undefined;
id?: string | undefined;
key: string;
configurationId?: string | null | undefined;
createdAt?: number | undefined;
updatedAt?: number | undefined;
createdBy?: string | null | undefined;
updatedBy?: string | null | undefined;
gitBranch?: string | undefined;
/**
* 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.
*/
visibility?: GetProjectVisibility | undefined;
edgeConfigId?: string | null | undefined;
edgeConfigTokenId?: string | null | undefined;
contentHint?:
| GetProjectContentHint1
| GetProjectContentHint2
| GetProjectContentHint3
| GetProjectContentHint4
| GetProjectContentHint5
| GetProjectContentHint6
| GetProjectContentHint7
| GetProjectContentHint8
| GetProjectContentHint9
| GetProjectContentHint10
| GetProjectContentHint11
| GetProjectContentHint12
| GetProjectContentHint13
| GetProjectContentHint14
| GetProjectContentHint15
| GetProjectContentHint16
| GetProjectContentHint17
| null
| undefined;
/**
* Similar to `contentHints`, but should not be exposed to the user.
*/
internalContentHint?: GetProjectInternalContentHint | null | undefined;
comment?: string | undefined;
customEnvironmentIds?: Array<string> | undefined;
};
/**
* The type of environment (production, preview, or development)
*/
export const GetProjectProjectsType = {
Development: "development",
Preview: "preview",
Production: "production",
} as const;
/**
* The type of environment (production, preview, or development)
*/
export type GetProjectProjectsType = ClosedEnum<typeof GetProjectProjectsType>;
/**
* The type of matching to perform
*/
export const GetProjectProjectsResponse200ApplicationJSONResponseBodyCustomEnvironmentsType =
{
EndsWith: "endsWith",
Equals: "equals",
StartsWith: "startsWith",
} as const;
/**
* The type of matching to perform
*/
export type GetProjectProjectsResponse200ApplicationJSONResponseBodyCustomEnvironmentsType =
ClosedEnum<
typeof GetProjectProjectsResponse200ApplicationJSONResponseBodyCustomEnvironmentsType
>;
/**
* Configuration for matching git branches to this environment
*/
export type GetProjectBranchMatcher = {
/**
* The type of matching to perform
*/
type:
GetProjectProjectsResponse200ApplicationJSONResponseBodyCustomEnvironmentsType;
/**
* The pattern to match against branch names
*/
pattern: string;
};
/**
* A list of verification challenges, one of which must be completed to verify the domain for use on the project. After the challenge is complete `POST /projects/:idOrName/domains/:domain/verify` to verify the domain. Possible challenges: - If `verification.type = TXT` the `verification.domain` will be checked for a TXT record matching `verification.value`.
*/
export type GetProjectVerification = {
type: string;
domain: string;
value: string;
reason: string;
};
/**
* List of domains associated with this environment
*/
export type GetProjectDomains = {
name: string;
apexName: string;
projectId: string;
redirect?: string | null | undefined;
redirectStatusCode?: number | null | undefined;
gitBranch?: string | null | undefined;
customEnvironmentId?: string | null | undefined;
updatedAt?: number | undefined;
createdAt?: number | undefined;
/**
* `true` if the domain is verified for use with the project. If `false` it will not be used as an alias on this project until the challenge in `verification` is completed.
*/
verified: boolean;
/**
* A list of verification challenges, one of which must be completed to verify the domain for use on the project. After the challenge is complete `POST /projects/:idOrName/domains/:domain/verify` to verify the domain. Possible challenges: - If `verification.type = TXT` the `verification.domain` will be checked for a TXT record matching `verification.value`.
*/
verification?: Array<GetProjectVerification> | undefined;
};
/**
* Internal representation of a custom environment with all required properties
*/
export type GetProjectCustomEnvironments = {
/**
* Unique identifier for the custom environment (format: env_*)
*/
id: string;
/**
* URL-friendly name of the environment
*/
slug: string;
/**
* The type of environment (production, preview, or development)
*/
type: GetProjectProjectsType;
/**
* Optional description of the environment's purpose
*/
description?: string | undefined;
/**
* Configuration for matching git branches to this environment
*/
branchMatcher?: GetProjectBranchMatcher | undefined;
/**
* List of domains associated with this environment
*/
domains?: Array<GetProjectDomains> | undefined;
/**
* List of aliases for the current deployment
*/
currentDeploymentAliases?: Array<string> | undefined;
/**
* Timestamp when the environment was created
*/
createdAt: number;
/**
* Timestamp when the environment was last updated
*/
updatedAt: number;
};
export const GetProjectFramework = {
ActixWeb: "actix-web",
Angular: "angular",
Ash: "ash",
Astro: "astro",
Axum: "axum",
Blitzjs: "blitzjs",
Brunch: "brunch",
Bun: "bun",
Container: "container",
CreateReactApp: "create-react-app",
Django: "django",
Docusaurus: "docusaurus",
Docusaurus2: "docusaurus-2",
Dojo: "dojo",
Eleventy: "eleventy",
Elysia: "elysia",
Ember: "ember",
Eve: "eve",
Express: "express",
FactoryEve: "factory-eve",
Fastapi: "fastapi",
Fasthtml: "fasthtml",
Fastify: "fastify",
Flask: "flask",
Gatsby: "gatsby",
Go: "go",
Gridsome: "gridsome",
H3: "h3",
Hexo: "hexo",
Hono: "hono",
Hugo: "hugo",
Hydrogen: "hydrogen",
IonicAngular: "ionic-angular",
IonicReact: "ionic-react",
Jekyll: "jekyll",
Koa: "koa",
Mastra: "mastra",
Middleman: "middleman",
Nestjs: "nestjs",
Nextjs: "nextjs",
Nitro: "nitro",
Node: "node",
Nuxtjs: "nuxtjs",
Parcel: "parcel",
Polymer: "polymer",
Preact: "preact",
Python: "python",
ReactRouter: "react-router",
Redwoodjs: "redwoodjs",
Remix: "remix",
Ruby: "ruby",
Rust: "rust",
Saber: "saber",
Sanity: "sanity",
SanityV2: "sanity-v2",
Sapper: "sapper",
Scully: "scully",
Services: "services",
Solidstart: "solidstart",
Solidstart1: "solidstart-1",
Stencil: "stencil",
Storybook: "storybook",
Svelte: "svelte",
Sveltekit: "sveltekit",
Sveltekit1: "sveltekit-1",
TanstackStart: "tanstack-start",
TanstackStartLovable: "tanstack-start-lovable",
Umijs: "umijs",
Vite: "vite",
Vitepress: "vitepress",
Vue: "vue",
Vuepress: "vuepress",
Xmcp: "xmcp",
Zola: "zola",
} as const;
export type GetProjectFramework = ClosedEnum<typeof GetProjectFramework>;
/**
* Service kind (Service.type). Omitted for schemas that do not define one.
*/
export const GetProjectServiceType = {
Cron: "cron",
Job: "job",
Web: "web",
Worker: "worker",
} as const;
/**
* Service kind (Service.type). Omitted for schemas that do not define one.
*/
export type GetProjectServiceType = ClosedEnum<typeof GetProjectServiceType>;
/**
* Framework slug, when the service has one (omitted otherwise).
*/
export const GetProjectProjectsFramework = {
ActixWeb: "actix-web",
Angular: "angular",
Ash: "ash",
Astro: "astro",
Axum: "axum",
Blitzjs: "blitzjs",
Brunch: "brunch",
Bun: "bun",
Container: "container",
CreateReactApp: "create-react-app",
Django: "django",
Docusaurus: "docusaurus",
Docusaurus2: "docusaurus-2",
Dojo: "dojo",
Eleventy: "eleventy",
Elysia: "elysia",
Ember: "ember",
Eve: "eve",
Express: "express",
FactoryEve: "factory-eve",
Fastapi: "fastapi",
Fasthtml: "fasthtml",
Fastify: "fastify",
Flask: "flask",
Gatsby: "gatsby",
Go: "go",
Gridsome: "gridsome",
H3: "h3",
Hexo: "hexo",
Hono: "hono",
Hugo: "hugo",
Hydrogen: "hydrogen",
IonicAngular: "ionic-angular",
IonicReact: "ionic-react",
Jekyll: "jekyll",
Koa: "koa",
Mastra: "mastra",
Middleman: "middleman",
Nestjs: "nestjs",
Nextjs: "nextjs",
Nitro: "nitro",
Node: "node",
Nuxtjs: "nuxtjs",
Parcel: "parcel",
Polymer: "polymer",
Preact: "preact",
Python: "python",
ReactRouter: "react-router",
Redwoodjs: "redwoodjs",
Remix: "remix",
Ruby: "ruby",
Rust: "rust",
Saber: "saber",
Sanity: "sanity",
SanityV2: "sanity-v2",
Sapper: "sapper",
Scully: "scully",
Services: "services",
Solidstart: "solidstart",
Solidstart1: "solidstart-1",
Stencil: "stencil",
Storybook: "storybook",
Svelte: "svelte",
Sveltekit: "sveltekit",
Sveltekit1: "sveltekit-1",
TanstackStart: "tanstack-start",
TanstackStartLovable: "tanstack-start-lovable",
Umijs: "umijs",
Vite: "vite",
Vitepress: "vitepress",
Vue: "vue",
Vuepress: "vuepress",
Xmcp: "xmcp",
Zola: "zola",
} as const;
/**
* Framework slug, when the service has one (omitted otherwise).
*/
export type GetProjectProjectsFramework = ClosedEnum<
typeof GetProjectProjectsFramework
>;
export type GetProjectServices = {
/**
* Service name from the deployment (Service.name).
*/
serviceName: string;
/**
* Service kind (Service.type). Omitted for schemas that do not define one.
*/
serviceType?: GetProjectServiceType | undefined;
/**
* Framework slug, when the service has one (omitted otherwise).
*/
framework?: GetProjectProjectsFramework | undefined;
/**
* Generic runtime, e.g. 'node' | 'python' | 'go' | 'ruby' | 'rust' (Service.runtime). Omitted for static builds.
*/
runtime?: string | undefined;
};
export type GetProjectIpBuckets = {
bucket: string;
default?: boolean | undefined;
supportUntil?: number | undefined;
};
export type GetProjectLint = {
targets: Array<string>;
};
export type GetProjectTypecheck = {
targets: Array<string>;
};
export type GetProjectMfeConfigPresent = {
targets: Array<string>;
};
export type GetProjectJobs = {
lint?: GetProjectLint | undefined;
typecheck?: GetProjectTypecheck | undefined;
mfeConfigPresent?: GetProjectMfeConfigPresent | undefined;
};
export type GetProjectAliasAssigned = number | boolean;
export type GetProjectAliasError = {
code: string;
message: string;
};
/**
* The type of matching to perform
*/
export const GetProjectProjectsResponse200ApplicationJSONResponseBodyType = {
EndsWith: "endsWith",
Equals: "equals",
StartsWith: "startsWith",
} as const;
/**
* The type of matching to perform
*/
export type GetProjectProjectsResponse200ApplicationJSONResponseBodyType =
ClosedEnum<
typeof GetProjectProjectsResponse200ApplicationJSONResponseBodyType
>;
export type GetProjectProjectsBranchMatcher = {
/**
* The type of matching to perform
*/
type: GetProjectProjectsResponse200ApplicationJSONResponseBodyType;
/**
* The pattern to match against branch names
*/
pattern: string;
};
export type GetProjectBuilds = {
use: string;
src?: string | undefined;
dest?: string | undefined;
};
export const GetProjectChecksConclusion = {
Canceled: "canceled",
Failed: "failed",
Skipped: "skipped",
Succeeded: "succeeded",
} as const;
export type GetProjectChecksConclusion = ClosedEnum<
typeof GetProjectChecksConclusion
>;
export const GetProjectChecksState = {
Completed: "completed",
Registered: "registered",
Running: "running",
} as const;
export type GetProjectChecksState = ClosedEnum<typeof GetProjectChecksState>;
export type GetProjectProjectsCreator = {
email: string;
githubLogin?: string | undefined;
gitlabLogin?: string | undefined;
uid: string;
username: string;
};
export type GetProjectOidcTokenClaims = {
iss: string;
sub: string;
scope: string;
aud: string;
owner: string;
ownerId: string;
project: string;
projectId: string;
environment: string;
customEnvironmentId?: string | undefined;
mfeGroupIds?: Array<string> | undefined;
plan?: string | undefined;
};
export const GetProjectPlan = {
Enterprise: "enterprise",
Hobby: "hobby",
Pro: "pro",
} as const;
export type GetProjectPlan = ClosedEnum<typeof GetProjectPlan>;
export const GetProjectReadyState = {
Blocked: "BLOCKED",
Building: "BUILDING",
Canceled: "CANCELED",
Error: "ERROR",
Initializing: "INITIALIZING",
Queued: "QUEUED",
Ready: "READY",
} as const;
export type GetProjectReadyState = ClosedEnum<typeof GetProjectReadyState>;
export const GetProjectReadySubstate = {
Promoted: "PROMOTED",
Rolling: "ROLLING",
Staged: "STAGED",
} as const;
export type GetProjectReadySubstate = ClosedEnum<
typeof GetProjectReadySubstate
>;
export const GetProjectProjectsResponseType = {
Lambdas: "LAMBDAS",
} as const;
export type GetProjectProjectsResponseType = ClosedEnum<
typeof GetProjectProjectsResponseType
>;
export type GetProjectLatestDeployments = {
id: string;
alias?: Array<string> | undefined;
aliasAssigned?: number | boolean | null | undefined;
aliasError?: GetProjectAliasError | null | undefined;
aliasFinal?: string | null | undefined;
automaticAliases?: Array<string> | undefined;
branchMatcher?: GetProjectProjectsBranchMatcher | undefined;
buildingAt?: number | undefined;
builds?: Array<GetProjectBuilds> | undefined;
checksConclusion?: GetProjectChecksConclusion | undefined;
checksState?: GetProjectChecksState | undefined;
connectBuildsEnabled?: boolean | undefined;
connectConfigurationId?: string | undefined;
createdAt: number;
createdIn: string;
creator: GetProjectProjectsCreator | null;
deletedAt?: number | undefined;
deploymentHostname: string;
forced?: boolean | undefined;
name: string;
meta?: { [k: string]: string } | undefined;
monorepoManager?: string | null | undefined;
oidcTokenClaims?: GetProjectOidcTokenClaims | undefined;
plan: GetProjectPlan;
/**
* Whether or not preview comments are enabled for the deployment
*/
previewCommentsEnabled?: boolean | undefined;
private: boolean;
readyAt?: number | undefined;
readyState: GetProjectReadyState;
readySubstate?: GetProjectReadySubstate | undefined;
requestedAt?: number | undefined;
target?: string | null | undefined;
teamId?: string | null | undefined;
type: GetProjectProjectsResponseType;
url: string;
/**
* Present for user creators; omitted for app/integration/system creators.
*/
userId?: string | undefined;
withCache?: boolean | undefined;
};
export type GetProjectLinkProjectsResponse200ApplicationJSONResponseBody8DeployHooks =
{
createdAt?: number | undefined;
id: string;
name: string;
ref: string;
url: string;
};
export type GetProjectLink8 = {
/**
* Owner (namespace) slug, e.g. `acme`.
*/
owner: string;
repo: string;
/**
* Origin repository id.
*/
repoId: string;
/**
* Origin namespace id (`ns_…`) of the owner.
*/
ownerId: string;
type: "cursor-origin";
createdAt?: number | undefined;
deployHooks: Array<
GetProjectLinkProjectsResponse200ApplicationJSONResponseBody8DeployHooks
>;
gitCredentialId: string;
updatedAt?: number | undefined;
sourceless?: boolean | undefined;
productionBranch: string;
};
export type GetProjectLinkProjectsResponse200ApplicationJSONResponseBody7DeployHooks =
{
createdAt?: number | undefined;
id: string;
name: string;
ref: string;
url: string;
};
export type GetProjectLink7 = {
org: string;
repo: string;
repoId: string;
type: "v0";
createdAt?: number | undefined;
deployHooks: Array<
GetProjectLinkProjectsResponse200ApplicationJSONResponseBody7DeployHooks
>;
gitCredentialId: string;
updatedAt?: number | undefined;
sourceless?: boolean | undefined;
productionBranch: string;
};
export type GetProjectLinkProjectsResponse200ApplicationJSONResponseBodyDeployHooks =
{
createdAt?: number | undefined;
id: string;
name: string;
ref: string;
url: string;
};
export type GetProjectLink6 = {
org: string;
repo: string;
repoId: string;
type: "vercel";
createdAt?: number | undefined;
deployHooks: Array<
GetProjectLinkProjectsResponse200ApplicationJSONResponseBodyDeployHooks
>;
gitCredentialId: string;
updatedAt?: number | undefined;
sourceless?: boolean | undefined;
productionBranch: string;
};
export type GetProjectLinkProjectsResponse200ApplicationJSONDeployHooks = {
createdAt?: number | undefined;
id: string;
name: string;
ref: string;
url: string;
};
export type GetProjectLink5 = {
name: string;
slug: string;
owner: string;
type: "bitbucket";
uuid: string;
workspaceUuid: string;
createdAt?: number | undefined;
deployHooks: Array<
GetProjectLinkProjectsResponse200ApplicationJSONDeployHooks
>;
gitCredentialId: string;
updatedAt?: number | undefined;
sourceless?: boolean | undefined;
productionBranch: string;
};
export type GetProjectLinkProjectsResponse200DeployHooks = {
createdAt?: number | undefined;
id: string;
name: string;
ref: string;
url: string;
};
export type GetProjectLink4 = {
projectId: string;
projectName: string;
projectNameWithNamespace: string;
projectNamespace: string;
/**
* A new field, should be included in all new project links, is being added just in time when a deployment is created. This is needed for Protected Git scopes. This is the id of the top level group that a namespace belongs to. Gitlab supports group nesting (up to 20 levels).
*/
projectOwnerId?: number | undefined;
projectUrl: string;
type: "gitlab";
createdAt?: number | undefined;
deployHooks: Array<GetProjectLinkProjectsResponse200DeployHooks>;
gitCredentialId: string;
updatedAt?: number | undefined;
sourceless?: boolean | undefined;
productionBranch: string;
};
export type GetProjectLinkProjectsResponseDeployHooks = {
createdAt?: number | undefined;
id: string;
name: string;
ref: string;
url: string;
};
export type GetProjectLink3 = {
org: string;
/**
* A new field, should be included in all new project links, is being added just in time when a deployment is created. This is needed for Protected Git scopes.
*/
repoOwnerId?: number | undefined;
repo?: string | undefined;
repoId?: number | undefined;
type: "github-custom-host";
host: string;
createdAt?: number | undefined;
deployHooks: Array<GetProjectLinkProjectsResponseDeployHooks>;
gitCredentialId: string;
updatedAt?: number | undefined;
sourceless?: boolean | undefined;
productionBranch: string;
};
export type GetProjectLinkProjectsDeployHooks = {
createdAt?: number | undefined;
id: string;
name: string;
ref: string;
url: string;
};
export type GetProjectLink2 = {
type: "github-limited";
repo?: string | undefined;
repoId?: number | undefined;
createdAt?: number | undefined;
updatedAt?: number | undefined;
org: string;
/**
* A new field, should be included in all new project links, is being added just in time when a deployment is created. This is needed for Protected Git scopes.
*/
repoOwnerId?: number | undefined;
deployHooks: Array<GetProjectLinkProjectsDeployHooks>;
gitCredentialId: string;
sourceless?: boolean | undefined;
productionBranch: string;
};
export type GetProjectLinkDeployHooks = {
createdAt?: number | undefined;
id: string;
name: string;
ref: string;
url: string;
};
export type GetProjectLink1 = {
org: string;
/**
* A new field, should be included in all new project links, is being added just in time when a deployment is created. This is needed for Protected Git scopes.
*/
repoOwnerId?: number | undefined;
repo?: string | undefined;
repoId?: number | undefined;
type: "github";
createdAt?: number | undefined;
deployHooks: Array<GetProjectLinkDeployHooks>;
gitCredentialId: string;
updatedAt?: number | undefined;
sourceless?: boolean | undefined;
productionBranch: string;
};
export type GetProjectLink =
| GetProjectLink1
| GetProjectLink2
| GetProjectLink3
| GetProjectLink4
| GetProjectLink5
| GetProjectLink6
| GetProjectLink7
| GetProjectLink8;
export type GetProjectBlobs = {
/**
* Marks the team-level, Vercel-managed default blob project (`vercel-blob-default-project`) that orphan blob stores are scoped to when connected without an explicit project. Set only by internal storage flows and immutable after creation — guards rely on it to protect the connected stores from being lost when the project is deleted or transferred.
*/
isDefaultApp?: boolean | undefined;
};
export type GetProjectMicrofrontends3 = {
updatedAt: number;
groupIds: Array<any>;
enabled: false;
freeProjectForLegacyLimits?: boolean | undefined;
};
export type GetProjectMicrofrontends2 = {
isDefaultApp?: false | undefined;
/**
* Whether observability data should be routed to this microfrontend project or a root project.
*/
routeObservabilityToThisProject?: boolean | undefined;
/**
* Whether to add microfrontends routing to aliases. This means domains in this project will route as a microfrontend.
*/
doNotRouteWithMicrofrontendsRouting?: boolean | undefined;
/**
* Timestamp when the microfrontends settings were last updated.
*/
updatedAt: number;
/**
* The group IDs of microfrontends that this project belongs to. Each microfrontend project must belong to a microfrontends group that is the set of microfrontends that are used together.
*/
groupIds: Array<string>;
/**
* Whether microfrontends are enabled for this project.
*/
enabled: true;
/**
* A path that is used to take screenshots and as the default path in preview links when a domain for this microfrontend is shown in the UI. Includes the leading slash, e.g. `/docs`
*/
defaultRoute?: string | undefined;
/**
* Whether the project was part of the legacy limits for hobby and pro-trial before billing was added. This field is only set when the team is upgraded to a paid plan and we are backfilling the subscription status. We cap the subscription to 2 projects and set this field for the 3rd project. When this field is set, the project is not charged for and we do not call any billing APIs for this project.
*/
freeProjectForLegacyLimits?: boolean | undefined;
};
export type GetProjectMicrofrontends1 = {
isDefaultApp: true;
/**
* Timestamp when the microfrontends settings were last updated.
*/
updatedAt: number;
/**
* The group IDs of microfrontends that this project belongs to. Each microfrontend project must belong to a microfrontends group that is the set of microfrontends that are used together.
*/
groupIds: Array<string>;
/**
* Whether microfrontends are enabled for this project.
*/
enabled: true;
/**
* A path that is used to take screenshots and as the default path in preview links when a domain for this microfrontend is shown in the UI. Includes the leading slash, e.g. `/docs`
*/
defaultRoute?: string | undefined;
/**
* Whether the project was part of the legacy limits for hobby and pro-trial before billing was added. This field is only set when the team is upgraded to a paid plan and we are backfilling the subscription status. We cap the subscription to 2 projects and set this field for the 3rd project. When this field is set, the project is not charged for and we do not call any billing APIs for this project.
*/
freeProjectForLegacyLimits?: boolean | undefined;
};
export type GetProjectMicrofrontends =
| GetProjectMicrofrontends1
| GetProjectMicrofrontends2
| GetProjectMicrofrontends3;
export const GetProjectNodeVersion = {
TenDotX: "10.x",
TwelveDotX: "12.x",
FourteenDotX: "14.x",
SixteenDotX: "16.x",
EighteenDotX: "18.x",
TwentyDotX: "20.x",
TwentyTwoDotX: "22.x",
TwentyFourDotX: "24.x",
EightDot10DotX: "8.10.x",
} as const;
export type GetProjectNodeVersion = ClosedEnum<typeof GetProjectNodeVersion>;
export type GetProjectPaths = {
value: string;
};
export type GetProjectOptionsAllowlist = {
paths: Array<GetProjectPaths>;
};
export type GetProjectPasswordProtection = {};
export const GetProjectDeploymentType = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
} as const;
export type GetProjectDeploymentType = ClosedEnum<
typeof GetProjectDeploymentType
>;
export type GetProjectPassport = {
deploymentType: GetProjectDeploymentType;
connectorId: string;
};
export type GetProjectSandboxUrls = {
inheritDeploymentProtection?: boolean | undefined;
};
export type GetProjectProtectionConfig = {
sandboxUrls?: GetProjectSandboxUrls | undefined;
};
export const GetProjectRegion = {
Arn1: "arn1",
Bom1: "bom1",
Cdg1: "cdg1",
Cle1: "cle1",
Cpt1: "cpt1",
Dub1: "dub1",
Fra1: "fra1",
Gru1: "gru1",
Hkg1: "hkg1",
Hnd1: "hnd1",
Iad1: "iad1",
Icn1: "icn1",
Kix1: "kix1",
Lhr1: "lhr1",
Pdx1: "pdx1",
Sfo1: "sfo1",
Sin1: "sin1",
Syd1: "syd1",
Yul1: "yul1",
} as const;
export type GetProjectRegion = ClosedEnum<typeof GetProjectRegion>;
export const GetProjectFailoverRegions = {
Arn1: "arn1",
Bom1: "bom1",
Cdg1: "cdg1",
Cle1: "cle1",
Cpt1: "cpt1",
Dub1: "dub1",
Fra1: "fra1",
Gru1: "gru1",
Hkg1: "hkg1",
Hnd1: "hnd1",
Iad1: "iad1",
Icn1: "icn1",
Kix1: "kix1",
Lhr1: "lhr1",
Pdx1: "pdx1",
Sfo1: "sfo1",
Sin1: "sin1",
Syd1: "syd1",
Yul1: "yul1",
} as const;
export type GetProjectFailoverRegions = ClosedEnum<
typeof GetProjectFailoverRegions
>;
export type GetProjectSandbox = {
region?: GetProjectRegion | undefined;
failoverRegions?: Array<GetProjectFailoverRegions> | undefined;
};
export const GetProjectFunctionDefaultMemoryType = {
Performance: "performance",
PerformanceXl: "performance_xl",
Standard: "standard",
StandardLegacy: "standard_legacy",
} as const;
export type GetProjectFunctionDefaultMemoryType = ClosedEnum<
typeof GetProjectFunctionDefaultMemoryType
>;
export const GetProjectBuildMachineType = {
Basic: "basic",
Enhanced: "enhanced",
Standard: "standard",
Turbo: "turbo",
} as const;
export type GetProjectBuildMachineType = ClosedEnum<
typeof GetProjectBuildMachineType
>;
export const GetProjectBuildMachineSelection = {
Elastic: "elastic",
Fixed: "fixed",
} as const;
export type GetProjectBuildMachineSelection = ClosedEnum<
typeof GetProjectBuildMachineSelection
>;
export const GetProjectBuildMachineElasticReason = {
BasicFloor: "basic-floor",
BuildTimeoutFailure: "build-timeout-failure",
EnospcFailure: "enospc-failure",
EnterpriseFloor: "enterprise-floor",
HighPeakDisk: "high-peak-disk",
HighPeakMemory: "high-peak-memory",
LongBuildDuration: "long-build-duration",
OomFailure: "oom-failure",
ShortBuildDuration: "short-build-duration",
SustainedHighCpu: "sustained-high-cpu",
} as const;
export type GetProjectBuildMachineElasticReason = ClosedEnum<
typeof GetProjectBuildMachineElasticReason
>;
export const GetProjectConfiguration = {
SkipNamespaceQueue: "SKIP_NAMESPACE_QUEUE",
WaitForNamespaceQueue: "WAIT_FOR_NAMESPACE_QUEUE",
} as const;
export type GetProjectConfiguration = ClosedEnum<
typeof GetProjectConfiguration
>;
export type GetProjectBuildQueue = {
configuration?: GetProjectConfiguration | undefined;
};
export type GetProjectResourceConfig = {
elasticConcurrencyEnabled?: boolean | undefined;
fluid?: boolean | undefined;
functionDefaultRegions: Array<string>;
functionDefaultTimeout?: number | undefined;
functionDefaultMemoryType?: GetProjectFunctionDefaultMemoryType | undefined;
functionZeroConfigFailover?: boolean | undefined;
buildMachineType?: GetProjectBuildMachineType | undefined;
buildMachineSelection?: GetProjectBuildMachineSelection | undefined;
buildMachineElasticLastUpdated?: number | undefined;
buildMachineElasticReason?: GetProjectBuildMachineElasticReason | undefined;
isNSNBDisabled?: boolean | undefined;
buildQueue?: GetProjectBuildQueue | undefined;
enableFunctionsBeta?: boolean | undefined;
};
/**
* Description of why a project was rolled back, and by whom. Note that lastAliasRequest contains the from/to details of the rollback.
*/
export type GetProjectRollbackDescription = {
/**
* The user who rolled back the project.
*/
userId: string;
/**
* The username of the user who rolled back the project.
*/
username: string;
/**
* User-supplied explanation of why they rolled back the project. Limited to 250 characters.
*/
description: string;
/**
* Timestamp of when the rollback was requested.
*/
createdAt: number;
};
/**
* An array of all the stages required during a deployment release. Each stage defines a target percentage and advancement rules. The final stage must always have targetPercentage: 100.
*/
export type GetProjectStages = {
/**
* The percentage of traffic to serve to the canary deployment (0-100)
*/
targetPercentage: number;
/**
* Whether or not this stage requires manual approval to proceed
*/
requireApproval?: boolean | undefined;
/**
* Duration in minutes for automatic advancement to the next stage
*/
duration?: number | undefined;
/**
* Whether to linearly shift traffic over the duration of this stage
*/
linearShift?: boolean | undefined;
};
/**
* The metric this check evaluates.
*/
export const GetProjectProjectsResponse200ApplicationJSONResponseBodyRollingReleaseType =
{
ErrorRate5xx: "error-rate-5xx",
} as const;
/**
* The metric this check evaluates.
*/
export type GetProjectProjectsResponse200ApplicationJSONResponseBodyRollingReleaseType =
ClosedEnum<
typeof GetProjectProjectsResponse200ApplicationJSONResponseBodyRollingReleaseType
>;
/**
* The checks to evaluate. An empty array means nothing is evaluated.
*/
export type GetProjectChecks = {
/**
* The metric this check evaluates.
*/
type:
GetProjectProjectsResponse200ApplicationJSONResponseBodyRollingReleaseType;
/**
* Minimum number of requests required in the window before the check can fail. Below this, the check is inconclusive rather than failing, so low-traffic stages don't gate on noise. Defaults to `100` when omitted.
*/
minSampleSize?: number | undefined;
/**
* Response status codes to ignore entirely — dropped from both the numerator (errors) and the denominator (total requests). Defaults to `[]` when omitted.
*/
excludeStatusCodes?: Array<number> | undefined;
/**
* Request paths to ignore entirely — dropped from both the numerator (errors) and the denominator (total requests). Matched exactly against the request path with any query string removed; no prefix or glob matching. Defaults to `[]` when omitted.
*/
excludePaths?: Array<string> | undefined;
/**
* Seconds of ingest lag to allow for: the query's upper bound is `now() - this value`, so the check never reads a window that is still filling. Defaults to `30` when omitted.
*/
ingestWatermarkSeconds?: number | undefined;
};
/**
* What to do when the gate trips: pause the rollout, or roll it back.
*/
export const GetProjectProjectsResponse200ApplicationJSONAction = {
Pause: "pause",
Rollback: "rollback",
} as const;
/**
* What to do when the gate trips: pause the rollout, or roll it back.
*/
export type GetProjectProjectsResponse200ApplicationJSONAction = ClosedEnum<
typeof GetProjectProjectsResponse200ApplicationJSONAction
>;
/**
* Automated gating configuration. Omitted (the default) means no gating is configured, which is equivalent to `enabled: false`.
*/
export type GetProjectGate = {
/**
* Whether automated gating is enabled for this project's rollouts.
*/
enabled: boolean;
/**
* The checks to evaluate. An empty array means nothing is evaluated.
*/
checks: Array<GetProjectChecks>;
/**
* How many failing evaluations within {@link windowSize} trip the gate. Defaults to `3` when omitted.
*/
failureThreshold?: number | undefined;
/**
* How many of the most recent evaluations {@link failureThreshold} is counted against. Defaults to `5` when omitted.
*/
windowSize?: number | undefined;
/**
* What to do when the gate trips: pause the rollout, or roll it back.
*/
action: GetProjectProjectsResponse200ApplicationJSONAction;
/**
* When true, a tripped gate is only reported — {@link action} is not taken.
*/
dryRun: boolean;
};
/**
* Project-level rolling release configuration that defines how deployments should be gradually rolled out
*/
export type GetProjectRollingRelease = {
/**
* The environment that the release targets, currently only supports production. Adding in case we want to configure with alias groups or custom environments.
*/
target: string;
/**
* An array of all the stages required during a deployment release. Each stage defines a target percentage and advancement rules. The final stage must always have targetPercentage: 100.
*/
stages?: Array<GetProjectStages> | null | undefined;
/**
* Whether the request served by a canary deployment should return a header indicating a canary was served. Defaults to `false` when omitted.
*/
canaryResponseHeader?: boolean | undefined;
/**
* Automated gating configuration. Omitted (the default) means no gating is configured, which is equivalent to `enabled: false`.
*/
gate?: GetProjectGate | undefined;
};
/** @internal */
export type GetProjectRequest$Outbound = {
idOrName: string;
teamId?: string | undefined;
slug?: string | undefined;
};
/** @internal */
export const GetProjectRequest$outboundSchema: z.ZodType<
GetProjectRequest$Outbound,
z.ZodTypeDef,
GetProjectRequest
> = z.object({
idOrName: z.string(),
teamId: z.string().optional(),
slug: z.string().optional(),
});
export function getProjectRequestToJSON(
getProjectRequest: GetProjectRequest,
): string {
return JSON.stringify(
GetProjectRequest$outboundSchema.parse(getProjectRequest),
);
}
/** @internal */
export const GetProjectResources$inboundSchema: z.ZodType<
GetProjectResources,
z.ZodTypeDef,
unknown
> = z.object({
externalResourceId: types.string(),
});
export function getProjectResourcesFromJSON(
jsonString: string,
): SafeParseResult<GetProjectResources, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectResources$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectResources' from JSON`,
);
}
/** @internal */
export const GetProjectIntegrations$inboundSchema: z.ZodType<
GetProjectIntegrations,
z.ZodTypeDef,
unknown
> = z.object({
installationId: types.string(),
resources: types.optional(
z.array(z.lazy(() => GetProjectResources$inboundSchema)),
),
});
export function getProjectIntegrationsFromJSON(
jsonString: string,
): SafeParseResult<GetProjectIntegrations, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectIntegrations$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectIntegrations' from JSON`,
);
}
/** @internal */
export const GetProjectCreator4$inboundSchema: z.ZodType<
GetProjectCreator4,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("system"),
});
export function getProjectCreator4FromJSON(
jsonString: string,
): SafeParseResult<GetProjectCreator4, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectCreator4$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectCreator4' from JSON`,
);
}
/** @internal */
export const GetProjectCreatorIntegration$inboundSchema: z.ZodType<
GetProjectCreatorIntegration,
z.ZodTypeDef,
unknown
> = z.object({
integrationId: types.string(),
configurationId: types.string(),
});
export function getProjectCreatorIntegrationFromJSON(
jsonString: string,
): SafeParseResult<GetProjectCreatorIntegration, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectCreatorIntegration$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectCreatorIntegration' from JSON`,
);
}
/** @internal */
export const GetProjectCreator3$inboundSchema: z.ZodType<
GetProjectCreator3,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("integration"),
integration: z.lazy(() => GetProjectCreatorIntegration$inboundSchema),
});
export function getProjectCreator3FromJSON(
jsonString: string,
): SafeParseResult<GetProjectCreator3, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectCreator3$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectCreator3' from JSON`,
);
}
/** @internal */
export const GetProjectCreatorApp$inboundSchema: z.ZodType<
GetProjectCreatorApp,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
clientId: types.optional(types.string()),
});
export function getProjectCreatorAppFromJSON(
jsonString: string,
): SafeParseResult<GetProjectCreatorApp, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectCreatorApp$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectCreatorApp' from JSON`,
);
}
/** @internal */
export const GetProjectCreator2$inboundSchema: z.ZodType<
GetProjectCreator2,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("app"),
app: z.lazy(() => GetProjectCreatorApp$inboundSchema),
});
export function getProjectCreator2FromJSON(
jsonString: string,
): SafeParseResult<GetProjectCreator2, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectCreator2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectCreator2' from JSON`,
);
}
/** @internal */
export const GetProjectViaIntegration$inboundSchema: z.ZodType<
GetProjectViaIntegration,
z.ZodTypeDef,
unknown
> = z.object({
integrationId: types.string(),
configurationId: types.string(),
});
export function getProjectViaIntegrationFromJSON(
jsonString: string,
): SafeParseResult<GetProjectViaIntegration, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectViaIntegration$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectViaIntegration' from JSON`,
);
}
/** @internal */
export const GetProjectVia2$inboundSchema: z.ZodType<
GetProjectVia2,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("integration"),
integration: z.lazy(() => GetProjectViaIntegration$inboundSchema),
});
export function getProjectVia2FromJSON(
jsonString: string,
): SafeParseResult<GetProjectVia2, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectVia2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectVia2' from JSON`,
);
}
/** @internal */
export const GetProjectViaApp$inboundSchema: z.ZodType<
GetProjectViaApp,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
clientId: types.optional(types.string()),
});
export function getProjectViaAppFromJSON(
jsonString: string,
): SafeParseResult<GetProjectViaApp, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectViaApp$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectViaApp' from JSON`,
);
}
/** @internal */
export const GetProjectVia1$inboundSchema: z.ZodType<
GetProjectVia1,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("app"),
app: z.lazy(() => GetProjectViaApp$inboundSchema),
});
export function getProjectVia1FromJSON(
jsonString: string,
): SafeParseResult<GetProjectVia1, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectVia1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectVia1' from JSON`,
);
}
/** @internal */
export const GetProjectCreatorVia$inboundSchema: z.ZodType<
GetProjectCreatorVia,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => GetProjectVia1$inboundSchema),
z.lazy(() => GetProjectVia2$inboundSchema),
]);
export function getProjectCreatorViaFromJSON(
jsonString: string,
): SafeParseResult<GetProjectCreatorVia, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectCreatorVia$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectCreatorVia' from JSON`,
);
}
/** @internal */
export const GetProjectCreatorUser$inboundSchema: z.ZodType<
GetProjectCreatorUser,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
});
export function getProjectCreatorUserFromJSON(
jsonString: string,
): SafeParseResult<GetProjectCreatorUser, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectCreatorUser$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectCreatorUser' from JSON`,
);
}
/** @internal */
export const GetProjectCreator1$inboundSchema: z.ZodType<
GetProjectCreator1,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("user"),
via: types.nullable(
z.union([
z.lazy(() => GetProjectVia1$inboundSchema),
z.lazy(() => GetProjectVia2$inboundSchema),
]),
),
user: z.lazy(() => GetProjectCreatorUser$inboundSchema),
});
export function getProjectCreator1FromJSON(
jsonString: string,
): SafeParseResult<GetProjectCreator1, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectCreator1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectCreator1' from JSON`,
);
}
/** @internal */
export const GetProjectCreator$inboundSchema: z.ZodType<
GetProjectCreator,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => GetProjectCreator1$inboundSchema),
z.lazy(() => GetProjectCreator2$inboundSchema),
z.lazy(() => GetProjectCreator3$inboundSchema),
z.lazy(() => GetProjectCreator4$inboundSchema),
]);
export function getProjectCreatorFromJSON(
jsonString: string,
): SafeParseResult<GetProjectCreator, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectCreator$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectCreator' from JSON`,
);
}
/** @internal */
export const GetProjectConfiguredBy$inboundSchema: z.ZodNativeEnum<
typeof GetProjectConfiguredBy
> = z.nativeEnum(GetProjectConfiguredBy);
/** @internal */
export const GetProjectProjectsResponseAliasAssigned$inboundSchema: z.ZodType<
GetProjectProjectsResponseAliasAssigned,
z.ZodTypeDef,
unknown
> = smartUnion([types.number(), types.boolean()]);
export function getProjectProjectsResponseAliasAssignedFromJSON(
jsonString: string,
): SafeParseResult<
GetProjectProjectsResponseAliasAssigned,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetProjectProjectsResponseAliasAssigned$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetProjectProjectsResponseAliasAssigned' from JSON`,
);
}
/** @internal */
export const GetProjectProjectsResponseAliasError$inboundSchema: z.ZodType<
GetProjectProjectsResponseAliasError,
z.ZodTypeDef,
unknown
> = z.object({
code: types.string(),
message: types.string(),
});
export function getProjectProjectsResponseAliasErrorFromJSON(
jsonString: string,
): SafeParseResult<GetProjectProjectsResponseAliasError, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetProjectProjectsResponseAliasError$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectProjectsResponseAliasError' from JSON`,
);
}
/** @internal */
export const GetProjectProjectsResponse200ApplicationJSONResponseBodyAliasDeploymentType$inboundSchema:
z.ZodNativeEnum<
typeof GetProjectProjectsResponse200ApplicationJSONResponseBodyAliasDeploymentType
> = z.nativeEnum(
GetProjectProjectsResponse200ApplicationJSONResponseBodyAliasDeploymentType,
);
/** @internal */
export const GetProjectProjectsResponse200BranchMatcher$inboundSchema:
z.ZodType<GetProjectProjectsResponse200BranchMatcher, z.ZodTypeDef, unknown> =
z.object({
type:
GetProjectProjectsResponse200ApplicationJSONResponseBodyAliasDeploymentType$inboundSchema,
pattern: types.string(),
});
export function getProjectProjectsResponse200BranchMatcherFromJSON(
jsonString: string,
): SafeParseResult<
GetProjectProjectsResponse200BranchMatcher,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetProjectProjectsResponse200BranchMatcher$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetProjectProjectsResponse200BranchMatcher' from JSON`,
);
}
/** @internal */
export const GetProjectProjectsResponseBuilds$inboundSchema: z.ZodType<
GetProjectProjectsResponseBuilds,
z.ZodTypeDef,
unknown
> = z.object({
use: types.string(),
src: types.optional(types.string()),
dest: types.optional(types.string()),
});
export function getProjectProjectsResponseBuildsFromJSON(
jsonString: string,
): SafeParseResult<GetProjectProjectsResponseBuilds, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectProjectsResponseBuilds$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectProjectsResponseBuilds' from JSON`,
);
}
/** @internal */
export const GetProjectProjectsResponseChecksConclusion$inboundSchema:
z.ZodNativeEnum<typeof GetProjectProjectsResponseChecksConclusion> = z
.nativeEnum(GetProjectProjectsResponseChecksConclusion);
/** @internal */
export const GetProjectProjectsResponseChecksState$inboundSchema:
z.ZodNativeEnum<typeof GetProjectProjectsResponseChecksState> = z.nativeEnum(
GetProjectProjectsResponseChecksState,
);
/** @internal */
export const GetProjectProjectsResponse200Creator$inboundSchema: z.ZodType<
GetProjectProjectsResponse200Creator,
z.ZodTypeDef,
unknown
> = z.object({
email: types.string(),
githubLogin: types.optional(types.string()),
gitlabLogin: types.optional(types.string()),
uid: types.string(),
username: types.string(),
});
export function getProjectProjectsResponse200CreatorFromJSON(
jsonString: string,
): SafeParseResult<GetProjectProjectsResponse200Creator, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
GetProjectProjectsResponse200Creator$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectProjectsResponse200Creator' from JSON`,
);
}
/** @internal */
export const GetProjectProjectsResponseOidcTokenClaims$inboundSchema: z.ZodType<
GetProjectProjectsResponseOidcTokenClaims,
z.ZodTypeDef,
unknown
> = z.object({
iss: types.string(),
sub: types.string(),
scope: types.string(),
aud: types.string(),
owner: types.string(),
owner_id: types.string(),
project: types.string(),
project_id: types.string(),
environment: types.string(),
custom_environment_id: types.optional(types.string()),
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 getProjectProjectsResponseOidcTokenClaimsFromJSON(
jsonString: string,
): SafeParseResult<
GetProjectProjectsResponseOidcTokenClaims,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetProjectProjectsResponseOidcTokenClaims$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetProjectProjectsResponseOidcTokenClaims' from JSON`,
);
}
/** @internal */
export const GetProjectProjectsResponsePlan$inboundSchema: z.ZodNativeEnum<
typeof GetProjectProjectsResponsePlan
> = z.nativeEnum(GetProjectProjectsResponsePlan);
/** @internal */
export const GetProjectProjectsResponseReadyState$inboundSchema:
z.ZodNativeEnum<typeof GetProjectProjectsResponseReadyState> = z.nativeEnum(
GetProjectProjectsResponseReadyState,
);
/** @internal */
export const GetProjectProjectsResponseReadySubstate$inboundSchema:
z.ZodNativeEnum<typeof GetProjectProjectsResponseReadySubstate> = z
.nativeEnum(GetProjectProjectsResponseReadySubstate);
/** @internal */
export const GetProjectProjectsResponse200ApplicationJSONResponseBodyAliasType$inboundSchema:
z.ZodNativeEnum<
typeof GetProjectProjectsResponse200ApplicationJSONResponseBodyAliasType
> = z.nativeEnum(
GetProjectProjectsResponse200ApplicationJSONResponseBodyAliasType,
);
/** @internal */
export const GetProjectDeployment$inboundSchema: z.ZodType<
GetProjectDeployment,
z.ZodTypeDef,
unknown
> = 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(() => GetProjectProjectsResponseAliasError$inboundSchema),
).optional(),
aliasFinal: z.nullable(types.string()).optional(),
automaticAliases: types.optional(z.array(types.string())),
branchMatcher: types.optional(
z.lazy(() => GetProjectProjectsResponse200BranchMatcher$inboundSchema),
),
buildingAt: types.optional(types.number()),
builds: types.optional(
z.array(z.lazy(() => GetProjectProjectsResponseBuilds$inboundSchema)),
),
checksConclusion: types.optional(
GetProjectProjectsResponseChecksConclusion$inboundSchema,
),
checksState: types.optional(
GetProjectProjectsResponseChecksState$inboundSchema,
),
connectBuildsEnabled: types.optional(types.boolean()),
connectConfigurationId: types.optional(types.string()),
createdAt: types.number(),
createdIn: types.string(),
creator: types.nullable(
z.lazy(() => GetProjectProjectsResponse200Creator$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(() => GetProjectProjectsResponseOidcTokenClaims$inboundSchema),
),
plan: GetProjectProjectsResponsePlan$inboundSchema,
previewCommentsEnabled: types.optional(types.boolean()),
private: types.boolean(),
readyAt: types.optional(types.number()),
readyState: GetProjectProjectsResponseReadyState$inboundSchema,
readySubstate: types.optional(
GetProjectProjectsResponseReadySubstate$inboundSchema,
),
requestedAt: types.optional(types.number()),
target: z.nullable(types.string()).optional(),
teamId: z.nullable(types.string()).optional(),
type:
GetProjectProjectsResponse200ApplicationJSONResponseBodyAliasType$inboundSchema,
url: types.string(),
userId: types.optional(types.string()),
withCache: types.optional(types.boolean()),
});
export function getProjectDeploymentFromJSON(
jsonString: string,
): SafeParseResult<GetProjectDeployment, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectDeployment$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectDeployment' from JSON`,
);
}
/** @internal */
export const GetProjectEnvironment$inboundSchema: z.ZodNativeEnum<
typeof GetProjectEnvironment
> = z.nativeEnum(GetProjectEnvironment);
/** @internal */
export const GetProjectTarget$inboundSchema: z.ZodNativeEnum<
typeof GetProjectTarget
> = z.nativeEnum(GetProjectTarget);
/** @internal */
export const GetProjectAlias$inboundSchema: z.ZodType<
GetProjectAlias,
z.ZodTypeDef,
unknown
> = z.object({
configuredBy: z.nullable(GetProjectConfiguredBy$inboundSchema).optional(),
configuredChangedAt: z.nullable(types.number()).optional(),
createdAt: z.nullable(types.number()).optional(),
deployment: types.nullable(z.lazy(() => GetProjectDeployment$inboundSchema)),
domain: types.string(),
environment: GetProjectEnvironment$inboundSchema,
gitBranch: z.nullable(types.string()).optional(),
redirect: z.nullable(types.string()).optional(),
redirectStatusCode: z.nullable(types.number()).optional(),
target: GetProjectTarget$inboundSchema,
});
export function getProjectAliasFromJSON(
jsonString: string,
): SafeParseResult<GetProjectAlias, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectAlias$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectAlias' from JSON`,
);
}
/** @internal */
export const GetProjectAnalytics$inboundSchema: z.ZodType<
GetProjectAnalytics,
z.ZodTypeDef,
unknown
> = 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 getProjectAnalyticsFromJSON(
jsonString: string,
): SafeParseResult<GetProjectAnalytics, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectAnalytics$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectAnalytics' from JSON`,
);
}
/** @internal */
export const GetProjectSpeedInsights$inboundSchema: z.ZodType<
GetProjectSpeedInsights,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
enabledAt: types.optional(types.number()),
disabledAt: types.optional(types.number()),
canceledAt: types.optional(types.number()),
hasData: types.optional(types.boolean()),
dataReceivedAt: types.optional(types.number()),
paidAt: types.optional(types.number()),
});
export function getProjectSpeedInsightsFromJSON(
jsonString: string,
): SafeParseResult<GetProjectSpeedInsights, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectSpeedInsights$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectSpeedInsights' from JSON`,
);
}
/** @internal */
export const GetProjectEnvId2$inboundSchema: z.ZodNativeEnum<
typeof GetProjectEnvId2
> = z.nativeEnum(GetProjectEnvId2);
/** @internal */
export const GetProjectEnvId$inboundSchema: z.ZodType<
GetProjectEnvId,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), GetProjectEnvId2$inboundSchema]);
export function getProjectEnvIdFromJSON(
jsonString: string,
): SafeParseResult<GetProjectEnvId, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectEnvId$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectEnvId' from JSON`,
);
}
/** @internal */
export const GetProjectAws$inboundSchema: z.ZodType<
GetProjectAws,
z.ZodTypeDef,
unknown
> = z.object({
subnetIds: z.array(types.string()),
securityGroupId: types.optional(types.string()),
});
export function getProjectAwsFromJSON(
jsonString: string,
): SafeParseResult<GetProjectAws, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectAws$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectAws' from JSON`,
);
}
/** @internal */
export const GetProjectConnectConfigurations$inboundSchema: z.ZodType<
GetProjectConnectConfigurations,
z.ZodTypeDef,
unknown
> = z.object({
envId: smartUnion([types.string(), GetProjectEnvId2$inboundSchema]),
connectConfigurationId: types.string(),
dc: types.optional(types.string()),
passive: types.boolean(),
buildsEnabled: types.boolean(),
aws: types.optional(z.lazy(() => GetProjectAws$inboundSchema)),
createdAt: types.number(),
updatedAt: types.number(),
});
export function getProjectConnectConfigurationsFromJSON(
jsonString: string,
): SafeParseResult<GetProjectConnectConfigurations, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectConnectConfigurations$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectConnectConfigurations' from JSON`,
);
}
/** @internal */
export const GetProjectSource$inboundSchema: z.ZodNativeEnum<
typeof GetProjectSource
> = z.nativeEnum(GetProjectSource);
/** @internal */
export const GetProjectDefinitions$inboundSchema: z.ZodType<
GetProjectDefinitions,
z.ZodTypeDef,
unknown
> = z.object({
host: types.string(),
path: types.string(),
schedule: types.string(),
source: types.optional(GetProjectSource$inboundSchema),
description: types.optional(types.string()),
hostInferred: types.optional(types.boolean()),
});
export function getProjectDefinitionsFromJSON(
jsonString: string,
): SafeParseResult<GetProjectDefinitions, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectDefinitions$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectDefinitions' from JSON`,
);
}
/** @internal */
export const GetProjectCrons$inboundSchema: z.ZodType<
GetProjectCrons,
z.ZodTypeDef,
unknown
> = z.object({
enabledAt: types.number(),
disabledAt: types.nullable(types.number()),
updatedAt: types.number(),
deploymentId: types.nullable(types.string()),
definitions: z.array(z.lazy(() => GetProjectDefinitions$inboundSchema)),
});
export function getProjectCronsFromJSON(
jsonString: string,
): SafeParseResult<GetProjectCrons, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectCrons$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectCrons' from JSON`,
);
}
/** @internal */
export const GetProjectDataCache$inboundSchema: z.ZodType<
GetProjectDataCache,
z.ZodTypeDef,
unknown
> = z.object({
userDisabled: types.boolean(),
storageSizeBytes: z.nullable(types.number()).optional(),
unlimited: types.optional(types.boolean()),
});
export function getProjectDataCacheFromJSON(
jsonString: string,
): SafeParseResult<GetProjectDataCache, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectDataCache$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectDataCache' from JSON`,
);
}
/** @internal */
export const GetProjectDeploymentExpiration$inboundSchema: z.ZodType<
GetProjectDeploymentExpiration,
z.ZodTypeDef,
unknown
> = 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 getProjectDeploymentExpirationFromJSON(
jsonString: string,
): SafeParseResult<GetProjectDeploymentExpiration, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectDeploymentExpiration$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectDeploymentExpiration' from JSON`,
);
}
/** @internal */
export const GetProjectExpiration2$inboundSchema: z.ZodType<
GetProjectExpiration2,
z.ZodTypeDef,
unknown
> = z.object({
lockedAt: types.number(),
lockedBy: types.string(),
});
export function getProjectExpiration2FromJSON(
jsonString: string,
): SafeParseResult<GetProjectExpiration2, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectExpiration2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectExpiration2' from JSON`,
);
}
/** @internal */
export const GetProjectExpiration1$inboundSchema: z.ZodType<
GetProjectExpiration1,
z.ZodTypeDef,
unknown
> = z.object({
expiresAt: types.number(),
});
export function getProjectExpiration1FromJSON(
jsonString: string,
): SafeParseResult<GetProjectExpiration1, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectExpiration1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectExpiration1' from JSON`,
);
}
/** @internal */
export const GetProjectExpiration$inboundSchema: z.ZodType<
GetProjectExpiration,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => GetProjectExpiration2$inboundSchema),
z.lazy(() => GetProjectExpiration1$inboundSchema),
]);
export function getProjectExpirationFromJSON(
jsonString: string,
): SafeParseResult<GetProjectExpiration, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectExpiration$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectExpiration' from JSON`,
);
}
/** @internal */
export const GetProjectTarget2$inboundSchema: z.ZodNativeEnum<
typeof GetProjectTarget2
> = z.nativeEnum(GetProjectTarget2);
/** @internal */
export const GetProjectTarget1$inboundSchema: z.ZodNativeEnum<
typeof GetProjectTarget1
> = z.nativeEnum(GetProjectTarget1);
/** @internal */
export const GetProjectProjectsTarget$inboundSchema: z.ZodType<
GetProjectProjectsTarget,
z.ZodTypeDef,
unknown
> = smartUnion([
z.array(GetProjectTarget1$inboundSchema),
GetProjectTarget2$inboundSchema,
]);
export function getProjectProjectsTargetFromJSON(
jsonString: string,
): SafeParseResult<GetProjectProjectsTarget, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectProjectsTarget$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectProjectsTarget' from JSON`,
);
}
/** @internal */
export const GetProjectType$inboundSchema: z.ZodNativeEnum<
typeof GetProjectType
> = z.nativeEnum(GetProjectType);
/** @internal */
export const GetProjectVisibility$inboundSchema: z.ZodNativeEnum<
typeof GetProjectVisibility
> = z.nativeEnum(GetProjectVisibility);
/** @internal */
export const GetProjectContentHint17$inboundSchema: z.ZodType<
GetProjectContentHint17,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("flags-connection-string"),
projectId: types.string(),
});
export function getProjectContentHint17FromJSON(
jsonString: string,
): SafeParseResult<GetProjectContentHint17, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectContentHint17$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectContentHint17' from JSON`,
);
}
/** @internal */
export const GetProjectContentHint16$inboundSchema: z.ZodType<
GetProjectContentHint16,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("integration-store-secret"),
storeId: types.string(),
integrationId: types.string(),
integrationProductId: types.string(),
integrationConfigurationId: types.string(),
});
export function getProjectContentHint16FromJSON(
jsonString: string,
): SafeParseResult<GetProjectContentHint16, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectContentHint16$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectContentHint16' from JSON`,
);
}
/** @internal */
export const GetProjectContentHint15$inboundSchema: z.ZodType<
GetProjectContentHint15,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("postgres-url-no-ssl"),
storeId: types.string(),
});
export function getProjectContentHint15FromJSON(
jsonString: string,
): SafeParseResult<GetProjectContentHint15, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectContentHint15$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectContentHint15' from JSON`,
);
}
/** @internal */
export const GetProjectContentHint14$inboundSchema: z.ZodType<
GetProjectContentHint14,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("postgres-database"),
storeId: types.string(),
});
export function getProjectContentHint14FromJSON(
jsonString: string,
): SafeParseResult<GetProjectContentHint14, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectContentHint14$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectContentHint14' from JSON`,
);
}
/** @internal */
export const GetProjectContentHint13$inboundSchema: z.ZodType<
GetProjectContentHint13,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("postgres-password"),
storeId: types.string(),
});
export function getProjectContentHint13FromJSON(
jsonString: string,
): SafeParseResult<GetProjectContentHint13, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectContentHint13$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectContentHint13' from JSON`,
);
}
/** @internal */
export const GetProjectContentHint12$inboundSchema: z.ZodType<
GetProjectContentHint12,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("postgres-host"),
storeId: types.string(),
});
export function getProjectContentHint12FromJSON(
jsonString: string,
): SafeParseResult<GetProjectContentHint12, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectContentHint12$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectContentHint12' from JSON`,
);
}
/** @internal */
export const GetProjectContentHint11$inboundSchema: z.ZodType<
GetProjectContentHint11,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("postgres-user"),
storeId: types.string(),
});
export function getProjectContentHint11FromJSON(
jsonString: string,
): SafeParseResult<GetProjectContentHint11, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectContentHint11$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectContentHint11' from JSON`,
);
}
/** @internal */
export const GetProjectContentHint10$inboundSchema: z.ZodType<
GetProjectContentHint10,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("postgres-prisma-url"),
storeId: types.string(),
});
export function getProjectContentHint10FromJSON(
jsonString: string,
): SafeParseResult<GetProjectContentHint10, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectContentHint10$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectContentHint10' from JSON`,
);
}
/** @internal */
export const GetProjectContentHint9$inboundSchema: z.ZodType<
GetProjectContentHint9,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("postgres-url-non-pooling"),
storeId: types.string(),
});
export function getProjectContentHint9FromJSON(
jsonString: string,
): SafeParseResult<GetProjectContentHint9, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectContentHint9$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectContentHint9' from JSON`,
);
}
/** @internal */
export const GetProjectContentHint8$inboundSchema: z.ZodType<
GetProjectContentHint8,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("postgres-url"),
storeId: types.string(),
});
export function getProjectContentHint8FromJSON(
jsonString: string,
): SafeParseResult<GetProjectContentHint8, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectContentHint8$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectContentHint8' from JSON`,
);
}
/** @internal */
export const GetProjectContentHint7$inboundSchema: z.ZodType<
GetProjectContentHint7,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("blob-webhook-public-key"),
storeId: types.string(),
});
export function getProjectContentHint7FromJSON(
jsonString: string,
): SafeParseResult<GetProjectContentHint7, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectContentHint7$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectContentHint7' from JSON`,
);
}
/** @internal */
export const GetProjectContentHint6$inboundSchema: z.ZodType<
GetProjectContentHint6,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("blob-store-id"),
storeId: types.string(),
});
export function getProjectContentHint6FromJSON(
jsonString: string,
): SafeParseResult<GetProjectContentHint6, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectContentHint6$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectContentHint6' from JSON`,
);
}
/** @internal */
export const GetProjectContentHint5$inboundSchema: z.ZodType<
GetProjectContentHint5,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("blob-read-write-token"),
storeId: types.string(),
});
export function getProjectContentHint5FromJSON(
jsonString: string,
): SafeParseResult<GetProjectContentHint5, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectContentHint5$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectContentHint5' from JSON`,
);
}
/** @internal */
export const GetProjectContentHint4$inboundSchema: z.ZodType<
GetProjectContentHint4,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("redis-rest-api-read-only-token"),
storeId: types.string(),
});
export function getProjectContentHint4FromJSON(
jsonString: string,
): SafeParseResult<GetProjectContentHint4, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectContentHint4$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectContentHint4' from JSON`,
);
}
/** @internal */
export const GetProjectContentHint3$inboundSchema: z.ZodType<
GetProjectContentHint3,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("redis-rest-api-token"),
storeId: types.string(),
});
export function getProjectContentHint3FromJSON(
jsonString: string,
): SafeParseResult<GetProjectContentHint3, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectContentHint3$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectContentHint3' from JSON`,
);
}
/** @internal */
export const GetProjectContentHint2$inboundSchema: z.ZodType<
GetProjectContentHint2,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("redis-rest-api-url"),
storeId: types.string(),
});
export function getProjectContentHint2FromJSON(
jsonString: string,
): SafeParseResult<GetProjectContentHint2, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectContentHint2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectContentHint2' from JSON`,
);
}
/** @internal */
export const GetProjectContentHint1$inboundSchema: z.ZodType<
GetProjectContentHint1,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("redis-url"),
storeId: types.string(),
});
export function getProjectContentHint1FromJSON(
jsonString: string,
): SafeParseResult<GetProjectContentHint1, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectContentHint1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectContentHint1' from JSON`,
);
}
/** @internal */
export const GetProjectContentHint$inboundSchema: z.ZodType<
GetProjectContentHint,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => GetProjectContentHint1$inboundSchema),
z.lazy(() => GetProjectContentHint2$inboundSchema),
z.lazy(() => GetProjectContentHint3$inboundSchema),
z.lazy(() => GetProjectContentHint4$inboundSchema),
z.lazy(() => GetProjectContentHint5$inboundSchema),
z.lazy(() => GetProjectContentHint6$inboundSchema),
z.lazy(() => GetProjectContentHint7$inboundSchema),
z.lazy(() => GetProjectContentHint8$inboundSchema),
z.lazy(() => GetProjectContentHint9$inboundSchema),
z.lazy(() => GetProjectContentHint10$inboundSchema),
z.lazy(() => GetProjectContentHint11$inboundSchema),
z.lazy(() => GetProjectContentHint12$inboundSchema),
z.lazy(() => GetProjectContentHint13$inboundSchema),
z.lazy(() => GetProjectContentHint14$inboundSchema),
z.lazy(() => GetProjectContentHint15$inboundSchema),
z.lazy(() => GetProjectContentHint16$inboundSchema),
z.lazy(() => GetProjectContentHint17$inboundSchema),
]);
export function getProjectContentHintFromJSON(
jsonString: string,
): SafeParseResult<GetProjectContentHint, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectContentHint$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectContentHint' from JSON`,
);
}
/** @internal */
export const GetProjectProjectsResponse200ApplicationJSONResponseBodyEnvType$inboundSchema:
z.ZodNativeEnum<
typeof GetProjectProjectsResponse200ApplicationJSONResponseBodyEnvType
> = z.nativeEnum(
GetProjectProjectsResponse200ApplicationJSONResponseBodyEnvType,
);
/** @internal */
export const GetProjectInternalContentHint$inboundSchema: z.ZodType<
GetProjectInternalContentHint,
z.ZodTypeDef,
unknown
> = z.object({
type:
GetProjectProjectsResponse200ApplicationJSONResponseBodyEnvType$inboundSchema,
encryptedValue: types.string(),
});
export function getProjectInternalContentHintFromJSON(
jsonString: string,
): SafeParseResult<GetProjectInternalContentHint, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectInternalContentHint$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectInternalContentHint' from JSON`,
);
}
/** @internal */
export const GetProjectEnv$inboundSchema: z.ZodType<
GetProjectEnv,
z.ZodTypeDef,
unknown
> = z.object({
target: types.optional(
smartUnion([
z.array(GetProjectTarget1$inboundSchema),
GetProjectTarget2$inboundSchema,
]),
),
type: GetProjectType$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(GetProjectVisibility$inboundSchema),
edgeConfigId: z.nullable(types.string()).optional(),
edgeConfigTokenId: z.nullable(types.string()).optional(),
contentHint: z.nullable(
z.union([
z.lazy(() => GetProjectContentHint1$inboundSchema),
z.lazy(() => GetProjectContentHint2$inboundSchema),
z.lazy(() => GetProjectContentHint3$inboundSchema),
z.lazy(() => GetProjectContentHint4$inboundSchema),
z.lazy(() => GetProjectContentHint5$inboundSchema),
z.lazy(() => GetProjectContentHint6$inboundSchema),
z.lazy(() => GetProjectContentHint7$inboundSchema),
z.lazy(() => GetProjectContentHint8$inboundSchema),
z.lazy(() => GetProjectContentHint9$inboundSchema),
z.lazy(() => GetProjectContentHint10$inboundSchema),
z.lazy(() => GetProjectContentHint11$inboundSchema),
z.lazy(() => GetProjectContentHint12$inboundSchema),
z.lazy(() => GetProjectContentHint13$inboundSchema),
z.lazy(() => GetProjectContentHint14$inboundSchema),
z.lazy(() => GetProjectContentHint15$inboundSchema),
z.lazy(() => GetProjectContentHint16$inboundSchema),
z.lazy(() => GetProjectContentHint17$inboundSchema),
]),
).optional(),
internalContentHint: z.nullable(
z.lazy(() => GetProjectInternalContentHint$inboundSchema),
).optional(),
comment: types.optional(types.string()),
customEnvironmentIds: types.optional(z.array(types.string())),
});
export function getProjectEnvFromJSON(
jsonString: string,
): SafeParseResult<GetProjectEnv, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectEnv$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectEnv' from JSON`,
);
}
/** @internal */
export const GetProjectProjectsType$inboundSchema: z.ZodNativeEnum<
typeof GetProjectProjectsType
> = z.nativeEnum(GetProjectProjectsType);
/** @internal */
export const GetProjectProjectsResponse200ApplicationJSONResponseBodyCustomEnvironmentsType$inboundSchema:
z.ZodNativeEnum<
typeof GetProjectProjectsResponse200ApplicationJSONResponseBodyCustomEnvironmentsType
> = z.nativeEnum(
GetProjectProjectsResponse200ApplicationJSONResponseBodyCustomEnvironmentsType,
);
/** @internal */
export const GetProjectBranchMatcher$inboundSchema: z.ZodType<
GetProjectBranchMatcher,
z.ZodTypeDef,
unknown
> = z.object({
type:
GetProjectProjectsResponse200ApplicationJSONResponseBodyCustomEnvironmentsType$inboundSchema,
pattern: types.string(),
});
export function getProjectBranchMatcherFromJSON(
jsonString: string,
): SafeParseResult<GetProjectBranchMatcher, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectBranchMatcher$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectBranchMatcher' from JSON`,
);
}
/** @internal */
export const GetProjectVerification$inboundSchema: z.ZodType<
GetProjectVerification,
z.ZodTypeDef,
unknown
> = z.object({
type: types.string(),
domain: types.string(),
value: types.string(),
reason: types.string(),
});
export function getProjectVerificationFromJSON(
jsonString: string,
): SafeParseResult<GetProjectVerification, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectVerification$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectVerification' from JSON`,
);
}
/** @internal */
export const GetProjectDomains$inboundSchema: z.ZodType<
GetProjectDomains,
z.ZodTypeDef,
unknown
> = z.object({
name: types.string(),
apexName: types.string(),
projectId: types.string(),
redirect: z.nullable(types.string()).optional(),
redirectStatusCode: z.nullable(types.number()).optional(),
gitBranch: z.nullable(types.string()).optional(),
customEnvironmentId: z.nullable(types.string()).optional(),
updatedAt: types.optional(types.number()),
createdAt: types.optional(types.number()),
verified: types.boolean(),
verification: types.optional(
z.array(z.lazy(() => GetProjectVerification$inboundSchema)),
),
});
export function getProjectDomainsFromJSON(
jsonString: string,
): SafeParseResult<GetProjectDomains, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectDomains$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectDomains' from JSON`,
);
}
/** @internal */
export const GetProjectCustomEnvironments$inboundSchema: z.ZodType<
GetProjectCustomEnvironments,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
slug: types.string(),
type: GetProjectProjectsType$inboundSchema,
description: types.optional(types.string()),
branchMatcher: types.optional(
z.lazy(() => GetProjectBranchMatcher$inboundSchema),
),
domains: types.optional(
z.array(z.lazy(() => GetProjectDomains$inboundSchema)),
),
currentDeploymentAliases: types.optional(z.array(types.string())),
createdAt: types.number(),
updatedAt: types.number(),
});
export function getProjectCustomEnvironmentsFromJSON(
jsonString: string,
): SafeParseResult<GetProjectCustomEnvironments, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectCustomEnvironments$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectCustomEnvironments' from JSON`,
);
}
/** @internal */
export const GetProjectFramework$inboundSchema: z.ZodNativeEnum<
typeof GetProjectFramework
> = z.nativeEnum(GetProjectFramework);
/** @internal */
export const GetProjectServiceType$inboundSchema: z.ZodNativeEnum<
typeof GetProjectServiceType
> = z.nativeEnum(GetProjectServiceType);
/** @internal */
export const GetProjectProjectsFramework$inboundSchema: z.ZodNativeEnum<
typeof GetProjectProjectsFramework
> = z.nativeEnum(GetProjectProjectsFramework);
/** @internal */
export const GetProjectServices$inboundSchema: z.ZodType<
GetProjectServices,
z.ZodTypeDef,
unknown
> = z.object({
serviceName: types.string(),
serviceType: types.optional(GetProjectServiceType$inboundSchema),
framework: types.optional(GetProjectProjectsFramework$inboundSchema),
runtime: types.optional(types.string()),
});
export function getProjectServicesFromJSON(
jsonString: string,
): SafeParseResult<GetProjectServices, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectServices$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectServices' from JSON`,
);
}
/** @internal */
export const GetProjectIpBuckets$inboundSchema: z.ZodType<
GetProjectIpBuckets,
z.ZodTypeDef,
unknown
> = z.object({
bucket: types.string(),
default: types.optional(types.boolean()),
supportUntil: types.optional(types.number()),
});
export function getProjectIpBucketsFromJSON(
jsonString: string,
): SafeParseResult<GetProjectIpBuckets, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectIpBuckets$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectIpBuckets' from JSON`,
);
}
/** @internal */
export const GetProjectLint$inboundSchema: z.ZodType<
GetProjectLint,
z.ZodTypeDef,
unknown
> = z.object({
targets: z.array(types.string()),
});
export function getProjectLintFromJSON(
jsonString: string,
): SafeParseResult<GetProjectLint, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectLint$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectLint' from JSON`,
);
}
/** @internal */
export const GetProjectTypecheck$inboundSchema: z.ZodType<
GetProjectTypecheck,
z.ZodTypeDef,
unknown
> = z.object({
targets: z.array(types.string()),
});
export function getProjectTypecheckFromJSON(
jsonString: string,
): SafeParseResult<GetProjectTypecheck, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectTypecheck$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectTypecheck' from JSON`,
);
}
/** @internal */
export const GetProjectMfeConfigPresent$inboundSchema: z.ZodType<
GetProjectMfeConfigPresent,
z.ZodTypeDef,
unknown
> = z.object({
targets: z.array(types.string()),
});
export function getProjectMfeConfigPresentFromJSON(
jsonString: string,
): SafeParseResult<GetProjectMfeConfigPresent, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectMfeConfigPresent$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectMfeConfigPresent' from JSON`,
);
}
/** @internal */
export const GetProjectJobs$inboundSchema: z.ZodType<
GetProjectJobs,
z.ZodTypeDef,
unknown
> = z.object({
lint: types.optional(z.lazy(() => GetProjectLint$inboundSchema)),
typecheck: types.optional(z.lazy(() => GetProjectTypecheck$inboundSchema)),
"mfe-config-present": types.optional(
z.lazy(() => GetProjectMfeConfigPresent$inboundSchema),
),
}).transform((v) => {
return remap$(v, {
"mfe-config-present": "mfeConfigPresent",
});
});
export function getProjectJobsFromJSON(
jsonString: string,
): SafeParseResult<GetProjectJobs, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectJobs$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectJobs' from JSON`,
);
}
/** @internal */
export const GetProjectAliasAssigned$inboundSchema: z.ZodType<
GetProjectAliasAssigned,
z.ZodTypeDef,
unknown
> = smartUnion([types.number(), types.boolean()]);
export function getProjectAliasAssignedFromJSON(
jsonString: string,
): SafeParseResult<GetProjectAliasAssigned, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectAliasAssigned$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectAliasAssigned' from JSON`,
);
}
/** @internal */
export const GetProjectAliasError$inboundSchema: z.ZodType<
GetProjectAliasError,
z.ZodTypeDef,
unknown
> = z.object({
code: types.string(),
message: types.string(),
});
export function getProjectAliasErrorFromJSON(
jsonString: string,
): SafeParseResult<GetProjectAliasError, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectAliasError$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectAliasError' from JSON`,
);
}
/** @internal */
export const GetProjectProjectsResponse200ApplicationJSONResponseBodyType$inboundSchema:
z.ZodNativeEnum<
typeof GetProjectProjectsResponse200ApplicationJSONResponseBodyType
> = z.nativeEnum(
GetProjectProjectsResponse200ApplicationJSONResponseBodyType,
);
/** @internal */
export const GetProjectProjectsBranchMatcher$inboundSchema: z.ZodType<
GetProjectProjectsBranchMatcher,
z.ZodTypeDef,
unknown
> = z.object({
type:
GetProjectProjectsResponse200ApplicationJSONResponseBodyType$inboundSchema,
pattern: types.string(),
});
export function getProjectProjectsBranchMatcherFromJSON(
jsonString: string,
): SafeParseResult<GetProjectProjectsBranchMatcher, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectProjectsBranchMatcher$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectProjectsBranchMatcher' from JSON`,
);
}
/** @internal */
export const GetProjectBuilds$inboundSchema: z.ZodType<
GetProjectBuilds,
z.ZodTypeDef,
unknown
> = z.object({
use: types.string(),
src: types.optional(types.string()),
dest: types.optional(types.string()),
});
export function getProjectBuildsFromJSON(
jsonString: string,
): SafeParseResult<GetProjectBuilds, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectBuilds$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectBuilds' from JSON`,
);
}
/** @internal */
export const GetProjectChecksConclusion$inboundSchema: z.ZodNativeEnum<
typeof GetProjectChecksConclusion
> = z.nativeEnum(GetProjectChecksConclusion);
/** @internal */
export const GetProjectChecksState$inboundSchema: z.ZodNativeEnum<
typeof GetProjectChecksState
> = z.nativeEnum(GetProjectChecksState);
/** @internal */
export const GetProjectProjectsCreator$inboundSchema: z.ZodType<
GetProjectProjectsCreator,
z.ZodTypeDef,
unknown
> = z.object({
email: types.string(),
githubLogin: types.optional(types.string()),
gitlabLogin: types.optional(types.string()),
uid: types.string(),
username: types.string(),
});
export function getProjectProjectsCreatorFromJSON(
jsonString: string,
): SafeParseResult<GetProjectProjectsCreator, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectProjectsCreator$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectProjectsCreator' from JSON`,
);
}
/** @internal */
export const GetProjectOidcTokenClaims$inboundSchema: z.ZodType<
GetProjectOidcTokenClaims,
z.ZodTypeDef,
unknown
> = z.object({
iss: types.string(),
sub: types.string(),
scope: types.string(),
aud: types.string(),
owner: types.string(),
owner_id: types.string(),
project: types.string(),
project_id: types.string(),
environment: types.string(),
custom_environment_id: types.optional(types.string()),
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 getProjectOidcTokenClaimsFromJSON(
jsonString: string,
): SafeParseResult<GetProjectOidcTokenClaims, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectOidcTokenClaims$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectOidcTokenClaims' from JSON`,
);
}
/** @internal */
export const GetProjectPlan$inboundSchema: z.ZodNativeEnum<
typeof GetProjectPlan
> = z.nativeEnum(GetProjectPlan);
/** @internal */
export const GetProjectReadyState$inboundSchema: z.ZodNativeEnum<
typeof GetProjectReadyState
> = z.nativeEnum(GetProjectReadyState);
/** @internal */
export const GetProjectReadySubstate$inboundSchema: z.ZodNativeEnum<
typeof GetProjectReadySubstate
> = z.nativeEnum(GetProjectReadySubstate);
/** @internal */
export const GetProjectProjectsResponseType$inboundSchema: z.ZodNativeEnum<
typeof GetProjectProjectsResponseType
> = z.nativeEnum(GetProjectProjectsResponseType);
/** @internal */
export const GetProjectLatestDeployments$inboundSchema: z.ZodType<
GetProjectLatestDeployments,
z.ZodTypeDef,
unknown
> = 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(() => GetProjectAliasError$inboundSchema))
.optional(),
aliasFinal: z.nullable(types.string()).optional(),
automaticAliases: types.optional(z.array(types.string())),
branchMatcher: types.optional(
z.lazy(() => GetProjectProjectsBranchMatcher$inboundSchema),
),
buildingAt: types.optional(types.number()),
builds: types.optional(z.array(z.lazy(() => GetProjectBuilds$inboundSchema))),
checksConclusion: types.optional(GetProjectChecksConclusion$inboundSchema),
checksState: types.optional(GetProjectChecksState$inboundSchema),
connectBuildsEnabled: types.optional(types.boolean()),
connectConfigurationId: types.optional(types.string()),
createdAt: types.number(),
createdIn: types.string(),
creator: types.nullable(
z.lazy(() => GetProjectProjectsCreator$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(() => GetProjectOidcTokenClaims$inboundSchema),
),
plan: GetProjectPlan$inboundSchema,
previewCommentsEnabled: types.optional(types.boolean()),
private: types.boolean(),
readyAt: types.optional(types.number()),
readyState: GetProjectReadyState$inboundSchema,
readySubstate: types.optional(GetProjectReadySubstate$inboundSchema),
requestedAt: types.optional(types.number()),
target: z.nullable(types.string()).optional(),
teamId: z.nullable(types.string()).optional(),
type: GetProjectProjectsResponseType$inboundSchema,
url: types.string(),
userId: types.optional(types.string()),
withCache: types.optional(types.boolean()),
});
export function getProjectLatestDeploymentsFromJSON(
jsonString: string,
): SafeParseResult<GetProjectLatestDeployments, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectLatestDeployments$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectLatestDeployments' from JSON`,
);
}
/** @internal */
export const GetProjectLinkProjectsResponse200ApplicationJSONResponseBody8DeployHooks$inboundSchema:
z.ZodType<
GetProjectLinkProjectsResponse200ApplicationJSONResponseBody8DeployHooks,
z.ZodTypeDef,
unknown
> = z.object({
createdAt: types.optional(types.number()),
id: types.string(),
name: types.string(),
ref: types.string(),
url: types.string(),
});
export function getProjectLinkProjectsResponse200ApplicationJSONResponseBody8DeployHooksFromJSON(
jsonString: string,
): SafeParseResult<
GetProjectLinkProjectsResponse200ApplicationJSONResponseBody8DeployHooks,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetProjectLinkProjectsResponse200ApplicationJSONResponseBody8DeployHooks$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'GetProjectLinkProjectsResponse200ApplicationJSONResponseBody8DeployHooks' from JSON`,
);
}
/** @internal */
export const GetProjectLink8$inboundSchema: z.ZodType<
GetProjectLink8,
z.ZodTypeDef,
unknown
> = z.object({
owner: types.string(),
repo: types.string(),
repoId: types.string(),
ownerId: types.string(),
type: types.literal("cursor-origin"),
createdAt: types.optional(types.number()),
deployHooks: z.array(
z.lazy(() =>
GetProjectLinkProjectsResponse200ApplicationJSONResponseBody8DeployHooks$inboundSchema
),
),
gitCredentialId: types.string(),
updatedAt: types.optional(types.number()),
sourceless: types.optional(types.boolean()),
productionBranch: types.string(),
});
export function getProjectLink8FromJSON(
jsonString: string,
): SafeParseResult<GetProjectLink8, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectLink8$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectLink8' from JSON`,
);
}
/** @internal */
export const GetProjectLinkProjectsResponse200ApplicationJSONResponseBody7DeployHooks$inboundSchema:
z.ZodType<
GetProjectLinkProjectsResponse200ApplicationJSONResponseBody7DeployHooks,
z.ZodTypeDef,
unknown
> = z.object({
createdAt: types.optional(types.number()),
id: types.string(),
name: types.string(),
ref: types.string(),
url: types.string(),
});
export function getProjectLinkProjectsResponse200ApplicationJSONResponseBody7DeployHooksFromJSON(
jsonString: string,
): SafeParseResult<
GetProjectLinkProjectsResponse200ApplicationJSONResponseBody7DeployHooks,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetProjectLinkProjectsResponse200ApplicationJSONResponseBody7DeployHooks$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'GetProjectLinkProjectsResponse200ApplicationJSONResponseBody7DeployHooks' from JSON`,
);
}
/** @internal */
export const GetProjectLink7$inboundSchema: z.ZodType<
GetProjectLink7,
z.ZodTypeDef,
unknown
> = z.object({
org: types.string(),
repo: types.string(),
repoId: types.string(),
type: types.literal("v0"),
createdAt: types.optional(types.number()),
deployHooks: z.array(
z.lazy(() =>
GetProjectLinkProjectsResponse200ApplicationJSONResponseBody7DeployHooks$inboundSchema
),
),
gitCredentialId: types.string(),
updatedAt: types.optional(types.number()),
sourceless: types.optional(types.boolean()),
productionBranch: types.string(),
});
export function getProjectLink7FromJSON(
jsonString: string,
): SafeParseResult<GetProjectLink7, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectLink7$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectLink7' from JSON`,
);
}
/** @internal */
export const GetProjectLinkProjectsResponse200ApplicationJSONResponseBodyDeployHooks$inboundSchema:
z.ZodType<
GetProjectLinkProjectsResponse200ApplicationJSONResponseBodyDeployHooks,
z.ZodTypeDef,
unknown
> = z.object({
createdAt: types.optional(types.number()),
id: types.string(),
name: types.string(),
ref: types.string(),
url: types.string(),
});
export function getProjectLinkProjectsResponse200ApplicationJSONResponseBodyDeployHooksFromJSON(
jsonString: string,
): SafeParseResult<
GetProjectLinkProjectsResponse200ApplicationJSONResponseBodyDeployHooks,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetProjectLinkProjectsResponse200ApplicationJSONResponseBodyDeployHooks$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'GetProjectLinkProjectsResponse200ApplicationJSONResponseBodyDeployHooks' from JSON`,
);
}
/** @internal */
export const GetProjectLink6$inboundSchema: z.ZodType<
GetProjectLink6,
z.ZodTypeDef,
unknown
> = z.object({
org: types.string(),
repo: types.string(),
repoId: types.string(),
type: types.literal("vercel"),
createdAt: types.optional(types.number()),
deployHooks: z.array(
z.lazy(() =>
GetProjectLinkProjectsResponse200ApplicationJSONResponseBodyDeployHooks$inboundSchema
),
),
gitCredentialId: types.string(),
updatedAt: types.optional(types.number()),
sourceless: types.optional(types.boolean()),
productionBranch: types.string(),
});
export function getProjectLink6FromJSON(
jsonString: string,
): SafeParseResult<GetProjectLink6, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectLink6$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectLink6' from JSON`,
);
}
/** @internal */
export const GetProjectLinkProjectsResponse200ApplicationJSONDeployHooks$inboundSchema:
z.ZodType<
GetProjectLinkProjectsResponse200ApplicationJSONDeployHooks,
z.ZodTypeDef,
unknown
> = z.object({
createdAt: types.optional(types.number()),
id: types.string(),
name: types.string(),
ref: types.string(),
url: types.string(),
});
export function getProjectLinkProjectsResponse200ApplicationJSONDeployHooksFromJSON(
jsonString: string,
): SafeParseResult<
GetProjectLinkProjectsResponse200ApplicationJSONDeployHooks,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetProjectLinkProjectsResponse200ApplicationJSONDeployHooks$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'GetProjectLinkProjectsResponse200ApplicationJSONDeployHooks' from JSON`,
);
}
/** @internal */
export const GetProjectLink5$inboundSchema: z.ZodType<
GetProjectLink5,
z.ZodTypeDef,
unknown
> = z.object({
name: types.string(),
slug: types.string(),
owner: types.string(),
type: types.literal("bitbucket"),
uuid: types.string(),
workspaceUuid: types.string(),
createdAt: types.optional(types.number()),
deployHooks: z.array(
z.lazy(() =>
GetProjectLinkProjectsResponse200ApplicationJSONDeployHooks$inboundSchema
),
),
gitCredentialId: types.string(),
updatedAt: types.optional(types.number()),
sourceless: types.optional(types.boolean()),
productionBranch: types.string(),
});
export function getProjectLink5FromJSON(
jsonString: string,
): SafeParseResult<GetProjectLink5, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectLink5$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectLink5' from JSON`,
);
}
/** @internal */
export const GetProjectLinkProjectsResponse200DeployHooks$inboundSchema:
z.ZodType<
GetProjectLinkProjectsResponse200DeployHooks,
z.ZodTypeDef,
unknown
> = z.object({
createdAt: types.optional(types.number()),
id: types.string(),
name: types.string(),
ref: types.string(),
url: types.string(),
});
export function getProjectLinkProjectsResponse200DeployHooksFromJSON(
jsonString: string,
): SafeParseResult<
GetProjectLinkProjectsResponse200DeployHooks,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetProjectLinkProjectsResponse200DeployHooks$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetProjectLinkProjectsResponse200DeployHooks' from JSON`,
);
}
/** @internal */
export const GetProjectLink4$inboundSchema: z.ZodType<
GetProjectLink4,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
projectNameWithNamespace: types.string(),
projectNamespace: types.string(),
projectOwnerId: types.optional(types.number()),
projectUrl: types.string(),
type: types.literal("gitlab"),
createdAt: types.optional(types.number()),
deployHooks: z.array(
z.lazy(() => GetProjectLinkProjectsResponse200DeployHooks$inboundSchema),
),
gitCredentialId: types.string(),
updatedAt: types.optional(types.number()),
sourceless: types.optional(types.boolean()),
productionBranch: types.string(),
});
export function getProjectLink4FromJSON(
jsonString: string,
): SafeParseResult<GetProjectLink4, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectLink4$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectLink4' from JSON`,
);
}
/** @internal */
export const GetProjectLinkProjectsResponseDeployHooks$inboundSchema: z.ZodType<
GetProjectLinkProjectsResponseDeployHooks,
z.ZodTypeDef,
unknown
> = z.object({
createdAt: types.optional(types.number()),
id: types.string(),
name: types.string(),
ref: types.string(),
url: types.string(),
});
export function getProjectLinkProjectsResponseDeployHooksFromJSON(
jsonString: string,
): SafeParseResult<
GetProjectLinkProjectsResponseDeployHooks,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
GetProjectLinkProjectsResponseDeployHooks$inboundSchema.parse(
JSON.parse(x),
),
`Failed to parse 'GetProjectLinkProjectsResponseDeployHooks' from JSON`,
);
}
/** @internal */
export const GetProjectLink3$inboundSchema: z.ZodType<
GetProjectLink3,
z.ZodTypeDef,
unknown
> = z.object({
org: types.string(),
repoOwnerId: types.optional(types.number()),
repo: types.optional(types.string()),
repoId: types.optional(types.number()),
type: types.literal("github-custom-host"),
host: types.string(),
createdAt: types.optional(types.number()),
deployHooks: z.array(
z.lazy(() => GetProjectLinkProjectsResponseDeployHooks$inboundSchema),
),
gitCredentialId: types.string(),
updatedAt: types.optional(types.number()),
sourceless: types.optional(types.boolean()),
productionBranch: types.string(),
});
export function getProjectLink3FromJSON(
jsonString: string,
): SafeParseResult<GetProjectLink3, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectLink3$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectLink3' from JSON`,
);
}
/** @internal */
export const GetProjectLinkProjectsDeployHooks$inboundSchema: z.ZodType<
GetProjectLinkProjectsDeployHooks,
z.ZodTypeDef,
unknown
> = z.object({
createdAt: types.optional(types.number()),
id: types.string(),
name: types.string(),
ref: types.string(),
url: types.string(),
});
export function getProjectLinkProjectsDeployHooksFromJSON(
jsonString: string,
): SafeParseResult<GetProjectLinkProjectsDeployHooks, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectLinkProjectsDeployHooks$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectLinkProjectsDeployHooks' from JSON`,
);
}
/** @internal */
export const GetProjectLink2$inboundSchema: z.ZodType<
GetProjectLink2,
z.ZodTypeDef,
unknown
> = z.object({
type: types.literal("github-limited"),
repo: types.optional(types.string()),
repoId: types.optional(types.number()),
createdAt: types.optional(types.number()),
updatedAt: types.optional(types.number()),
org: types.string(),
repoOwnerId: types.optional(types.number()),
deployHooks: z.array(
z.lazy(() => GetProjectLinkProjectsDeployHooks$inboundSchema),
),
gitCredentialId: types.string(),
sourceless: types.optional(types.boolean()),
productionBranch: types.string(),
});
export function getProjectLink2FromJSON(
jsonString: string,
): SafeParseResult<GetProjectLink2, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectLink2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectLink2' from JSON`,
);
}
/** @internal */
export const GetProjectLinkDeployHooks$inboundSchema: z.ZodType<
GetProjectLinkDeployHooks,
z.ZodTypeDef,
unknown
> = z.object({
createdAt: types.optional(types.number()),
id: types.string(),
name: types.string(),
ref: types.string(),
url: types.string(),
});
export function getProjectLinkDeployHooksFromJSON(
jsonString: string,
): SafeParseResult<GetProjectLinkDeployHooks, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectLinkDeployHooks$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectLinkDeployHooks' from JSON`,
);
}
/** @internal */
export const GetProjectLink1$inboundSchema: z.ZodType<
GetProjectLink1,
z.ZodTypeDef,
unknown
> = z.object({
org: types.string(),
repoOwnerId: types.optional(types.number()),
repo: types.optional(types.string()),
repoId: types.optional(types.number()),
type: types.literal("github"),
createdAt: types.optional(types.number()),
deployHooks: z.array(z.lazy(() => GetProjectLinkDeployHooks$inboundSchema)),
gitCredentialId: types.string(),
updatedAt: types.optional(types.number()),
sourceless: types.optional(types.boolean()),
productionBranch: types.string(),
});
export function getProjectLink1FromJSON(
jsonString: string,
): SafeParseResult<GetProjectLink1, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectLink1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectLink1' from JSON`,
);
}
/** @internal */
export const GetProjectLink$inboundSchema: z.ZodType<
GetProjectLink,
z.ZodTypeDef,
unknown
> = z.union([
z.lazy(() => GetProjectLink1$inboundSchema),
z.lazy(() => GetProjectLink2$inboundSchema),
z.lazy(() => GetProjectLink3$inboundSchema),
z.lazy(() => GetProjectLink4$inboundSchema),
z.lazy(() => GetProjectLink5$inboundSchema),
z.lazy(() => GetProjectLink6$inboundSchema),
z.lazy(() => GetProjectLink7$inboundSchema),
z.lazy(() => GetProjectLink8$inboundSchema),
]);
export function getProjectLinkFromJSON(
jsonString: string,
): SafeParseResult<GetProjectLink, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectLink$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectLink' from JSON`,
);
}
/** @internal */
export const GetProjectBlobs$inboundSchema: z.ZodType<
GetProjectBlobs,
z.ZodTypeDef,
unknown
> = z.object({
isDefaultApp: types.optional(types.boolean()),
});
export function getProjectBlobsFromJSON(
jsonString: string,
): SafeParseResult<GetProjectBlobs, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectBlobs$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectBlobs' from JSON`,
);
}
/** @internal */
export const GetProjectMicrofrontends3$inboundSchema: z.ZodType<
GetProjectMicrofrontends3,
z.ZodTypeDef,
unknown
> = z.object({
updatedAt: types.number(),
groupIds: z.array(z.any()),
enabled: types.literal(false),
freeProjectForLegacyLimits: types.optional(types.boolean()),
});
export function getProjectMicrofrontends3FromJSON(
jsonString: string,
): SafeParseResult<GetProjectMicrofrontends3, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectMicrofrontends3$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectMicrofrontends3' from JSON`,
);
}
/** @internal */
export const GetProjectMicrofrontends2$inboundSchema: z.ZodType<
GetProjectMicrofrontends2,
z.ZodTypeDef,
unknown
> = z.object({
isDefaultApp: types.optional(types.literal(false)),
routeObservabilityToThisProject: types.optional(types.boolean()),
doNotRouteWithMicrofrontendsRouting: types.optional(types.boolean()),
updatedAt: types.number(),
groupIds: z.array(types.string()),
enabled: types.literal(true),
defaultRoute: types.optional(types.string()),
freeProjectForLegacyLimits: types.optional(types.boolean()),
});
export function getProjectMicrofrontends2FromJSON(
jsonString: string,
): SafeParseResult<GetProjectMicrofrontends2, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectMicrofrontends2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectMicrofrontends2' from JSON`,
);
}
/** @internal */
export const GetProjectMicrofrontends1$inboundSchema: z.ZodType<
GetProjectMicrofrontends1,
z.ZodTypeDef,
unknown
> = z.object({
isDefaultApp: types.literal(true),
updatedAt: types.number(),
groupIds: z.array(types.string()),
enabled: types.literal(true),
defaultRoute: types.optional(types.string()),
freeProjectForLegacyLimits: types.optional(types.boolean()),
});
export function getProjectMicrofrontends1FromJSON(
jsonString: string,
): SafeParseResult<GetProjectMicrofrontends1, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectMicrofrontends1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectMicrofrontends1' from JSON`,
);
}
/** @internal */
export const GetProjectMicrofrontends$inboundSchema: z.ZodType<
GetProjectMicrofrontends,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => GetProjectMicrofrontends1$inboundSchema),
z.lazy(() => GetProjectMicrofrontends2$inboundSchema),
z.lazy(() => GetProjectMicrofrontends3$inboundSchema),
]);
export function getProjectMicrofrontendsFromJSON(
jsonString: string,
): SafeParseResult<GetProjectMicrofrontends, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectMicrofrontends$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectMicrofrontends' from JSON`,
);
}
/** @internal */
export const GetProjectNodeVersion$inboundSchema: z.ZodNativeEnum<
typeof GetProjectNodeVersion
> = z.nativeEnum(GetProjectNodeVersion);
/** @internal */
export const GetProjectPaths$inboundSchema: z.ZodType<
GetProjectPaths,
z.ZodTypeDef,
unknown
> = z.object({
value: types.string(),
});
export function getProjectPathsFromJSON(
jsonString: string,
): SafeParseResult<GetProjectPaths, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectPaths$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectPaths' from JSON`,
);
}
/** @internal */
export const GetProjectOptionsAllowlist$inboundSchema: z.ZodType<
GetProjectOptionsAllowlist,
z.ZodTypeDef,
unknown
> = z.object({
paths: z.array(z.lazy(() => GetProjectPaths$inboundSchema)),
});
export function getProjectOptionsAllowlistFromJSON(
jsonString: string,
): SafeParseResult<GetProjectOptionsAllowlist, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectOptionsAllowlist$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectOptionsAllowlist' from JSON`,
);
}
/** @internal */
export const GetProjectPasswordProtection$inboundSchema: z.ZodType<
GetProjectPasswordProtection,
z.ZodTypeDef,
unknown
> = z.object({});
export function getProjectPasswordProtectionFromJSON(
jsonString: string,
): SafeParseResult<GetProjectPasswordProtection, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectPasswordProtection$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectPasswordProtection' from JSON`,
);
}
/** @internal */
export const GetProjectDeploymentType$inboundSchema: z.ZodNativeEnum<
typeof GetProjectDeploymentType
> = z.nativeEnum(GetProjectDeploymentType);
/** @internal */
export const GetProjectPassport$inboundSchema: z.ZodType<
GetProjectPassport,
z.ZodTypeDef,
unknown
> = z.object({
deploymentType: GetProjectDeploymentType$inboundSchema,
connectorId: types.string(),
});
export function getProjectPassportFromJSON(
jsonString: string,
): SafeParseResult<GetProjectPassport, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectPassport$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectPassport' from JSON`,
);
}
/** @internal */
export const GetProjectSandboxUrls$inboundSchema: z.ZodType<
GetProjectSandboxUrls,
z.ZodTypeDef,
unknown
> = z.object({
inheritDeploymentProtection: types.optional(types.boolean()),
});
export function getProjectSandboxUrlsFromJSON(
jsonString: string,
): SafeParseResult<GetProjectSandboxUrls, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectSandboxUrls$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectSandboxUrls' from JSON`,
);
}
/** @internal */
export const GetProjectProtectionConfig$inboundSchema: z.ZodType<
GetProjectProtectionConfig,
z.ZodTypeDef,
unknown
> = z.object({
sandboxUrls: types.optional(
z.lazy(() => GetProjectSandboxUrls$inboundSchema),
),
});
export function getProjectProtectionConfigFromJSON(
jsonString: string,
): SafeParseResult<GetProjectProtectionConfig, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectProtectionConfig$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectProtectionConfig' from JSON`,
);
}
/** @internal */
export const GetProjectRegion$inboundSchema: z.ZodNativeEnum<
typeof GetProjectRegion
> = z.nativeEnum(GetProjectRegion);
/** @internal */
export const GetProjectFailoverRegions$inboundSchema: z.ZodNativeEnum<
typeof GetProjectFailoverRegions
> = z.nativeEnum(GetProjectFailoverRegions);
/** @internal */
export const GetProjectSandbox$inboundSchema: z.ZodType<
GetProjectSandbox,
z.ZodTypeDef,
unknown
> = z.object({
region: types.optional(GetProjectRegion$inboundSchema),
failoverRegions: types.optional(
z.array(GetProjectFailoverRegions$inboundSchema),
),
});
export function getProjectSandboxFromJSON(
jsonString: string,
): SafeParseResult<GetProjectSandbox, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectSandbox$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectSandbox' from JSON`,
);
}
/** @internal */
export const GetProjectFunctionDefaultMemoryType$inboundSchema: z.ZodNativeEnum<
typeof GetProjectFunctionDefaultMemoryType
> = z.nativeEnum(GetProjectFunctionDefaultMemoryType);
/** @internal */
export const GetProjectBuildMachineType$inboundSchema: z.ZodNativeEnum<
typeof GetProjectBuildMachineType
> = z.nativeEnum(GetProjectBuildMachineType);
/** @internal */
export const GetProjectBuildMachineSelection$inboundSchema: z.ZodNativeEnum<
typeof GetProjectBuildMachineSelection
> = z.nativeEnum(GetProjectBuildMachineSelection);
/** @internal */
export const GetProjectBuildMachineElasticReason$inboundSchema: z.ZodNativeEnum<
typeof GetProjectBuildMachineElasticReason
> = z.nativeEnum(GetProjectBuildMachineElasticReason);
/** @internal */
export const GetProjectConfiguration$inboundSchema: z.ZodNativeEnum<
typeof GetProjectConfiguration
> = z.nativeEnum(GetProjectConfiguration);
/** @internal */
export const GetProjectBuildQueue$inboundSchema: z.ZodType<
GetProjectBuildQueue,
z.ZodTypeDef,
unknown
> = z.object({
configuration: types.optional(GetProjectConfiguration$inboundSchema),
});
export function getProjectBuildQueueFromJSON(
jsonString: string,
): SafeParseResult<GetProjectBuildQueue, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectBuildQueue$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectBuildQueue' from JSON`,
);
}
/** @internal */
export const GetProjectResourceConfig$inboundSchema: z.ZodType<
GetProjectResourceConfig,
z.ZodTypeDef,
unknown
> = z.object({
elasticConcurrencyEnabled: types.optional(types.boolean()),
fluid: types.optional(types.boolean()),
functionDefaultRegions: z.array(types.string()),
functionDefaultTimeout: types.optional(types.number()),
functionDefaultMemoryType: types.optional(
GetProjectFunctionDefaultMemoryType$inboundSchema,
),
functionZeroConfigFailover: types.optional(types.boolean()),
buildMachineType: types.optional(GetProjectBuildMachineType$inboundSchema),
buildMachineSelection: types.optional(
GetProjectBuildMachineSelection$inboundSchema,
),
buildMachineElasticLastUpdated: types.optional(types.number()),
buildMachineElasticReason: types.optional(
GetProjectBuildMachineElasticReason$inboundSchema,
),
isNSNBDisabled: types.optional(types.boolean()),
buildQueue: types.optional(z.lazy(() => GetProjectBuildQueue$inboundSchema)),
enableFunctionsBeta: types.optional(types.boolean()),
});
export function getProjectResourceConfigFromJSON(
jsonString: string,
): SafeParseResult<GetProjectResourceConfig, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectResourceConfig$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectResourceConfig' from JSON`,
);
}
/** @internal */
export const GetProjectRollbackDescription$inboundSchema: z.ZodType<
GetProjectRollbackDescription,
z.ZodTypeDef,
unknown
> = z.object({
userId: types.string(),
username: types.string(),
description: types.string(),
createdAt: types.number(),
});
export function getProjectRollbackDescriptionFromJSON(
jsonString: string,
): SafeParseResult<GetProjectRollbackDescription, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectRollbackDescription$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectRollbackDescription' from JSON`,
);
}
/** @internal */
export const GetProjectStages$inboundSchema: z.ZodType<
GetProjectStages,
z.ZodTypeDef,
unknown
> = z.object({
targetPercentage: types.number(),
requireApproval: types.optional(types.boolean()),
duration: types.optional(types.number()),
linearShift: types.optional(types.boolean()),
});
export function getProjectStagesFromJSON(
jsonString: string,
): SafeParseResult<GetProjectStages, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectStages$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectStages' from JSON`,
);
}
/** @internal */
export const GetProjectProjectsResponse200ApplicationJSONResponseBodyRollingReleaseType$inboundSchema:
z.ZodNativeEnum<
typeof GetProjectProjectsResponse200ApplicationJSONResponseBodyRollingReleaseType
> = z.nativeEnum(
GetProjectProjectsResponse200ApplicationJSONResponseBodyRollingReleaseType,
);
/** @internal */
export const GetProjectChecks$inboundSchema: z.ZodType<
GetProjectChecks,
z.ZodTypeDef,
unknown
> = z.object({
type:
GetProjectProjectsResponse200ApplicationJSONResponseBodyRollingReleaseType$inboundSchema,
minSampleSize: types.optional(types.number()),
excludeStatusCodes: types.optional(z.array(types.number())),
excludePaths: types.optional(z.array(types.string())),
ingestWatermarkSeconds: types.optional(types.number()),
});
export function getProjectChecksFromJSON(
jsonString: string,
): SafeParseResult<GetProjectChecks, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectChecks$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectChecks' from JSON`,
);
}
/** @internal */
export const GetProjectProjectsResponse200ApplicationJSONAction$inboundSchema:
z.ZodNativeEnum<typeof GetProjectProjectsResponse200ApplicationJSONAction> = z
.nativeEnum(GetProjectProjectsResponse200ApplicationJSONAction);
/** @internal */
export const GetProjectGate$inboundSchema: z.ZodType<
GetProjectGate,
z.ZodTypeDef,
unknown
> = z.object({
enabled: types.boolean(),
checks: z.array(z.lazy(() => GetProjectChecks$inboundSchema)),
failureThreshold: types.optional(types.number()),
windowSize: types.optional(types.number()),
action: GetProjectProjectsResponse200ApplicationJSONAction$inboundSchema,
dryRun: types.boolean(),
});
export function getProjectGateFromJSON(
jsonString: string,
): SafeParseResult<GetProjectGate, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectGate$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectGate' from JSON`,
);
}
/** @internal */
export const GetProjectRollingRelease$inboundSchema: z.ZodType<
GetProjectRollingRelease,
z.ZodTypeDef,
unknown
> = z.object({
target: types.string(),
stages: z.nullable(z.array(z.lazy(() => GetProjectStages$inboundSchema)))
.optional(),
canaryResponseHeader: types.optional(types.boolean()),
gate: types.optional(z.lazy(() => GetProjectGate$inboundSchema)),
});
export function getProjectRollingReleaseFromJSON(
jsonString: string,
): SafeParseResult<GetProjectRollingRelease, SDKValidationError> {
return safeParse(
jsonString,
(x) => GetProjectRollingRelease$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'GetProjectRollingRelease' from JSON`,
);
}