@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,015 lines • 106 kB
text/typescript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod/v3";
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 { Consent, Consent$inboundSchema } from "./consent.js";
import { SDKValidationError } from "./sdkvalidationerror.js";
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndFortyFour = {
projectId?: string | undefined;
projectName: string;
consent: Consent;
};
export const ReasonCode = {
Backoffice: "BACKOFFICE",
BudgetReached: "BUDGET_REACHED",
PublicApi: "PUBLIC_API",
} as const;
export type ReasonCode = ClosedEnum<typeof ReasonCode>;
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndFortyThree = {
projectId: string;
reasonCode?: ReasonCode | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndFortyTwo = {
projectId: string;
expiresAt: number;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndFortyOne = {
projectId: string;
};
export const PasswordProtection2 = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
} as const;
export type PasswordProtection2 = ClosedEnum<typeof PasswordProtection2>;
export const PasswordProtectionDeploymentType = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
} as const;
export type PasswordProtectionDeploymentType = ClosedEnum<
typeof PasswordProtectionDeploymentType
>;
export type PasswordProtection1 = {
deploymentType: PasswordProtectionDeploymentType;
};
export type PayloadPasswordProtection =
| PasswordProtection1
| PasswordProtection2;
export const OldPasswordProtection2 = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
} as const;
export type OldPasswordProtection2 = ClosedEnum<typeof OldPasswordProtection2>;
export const OldPasswordProtectionDeploymentType = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
} as const;
export type OldPasswordProtectionDeploymentType = ClosedEnum<
typeof OldPasswordProtectionDeploymentType
>;
export type OldPasswordProtection1 = {
deploymentType: OldPasswordProtectionDeploymentType;
};
export type OldPasswordProtection =
| OldPasswordProtection1
| OldPasswordProtection2;
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndForty = {
projectId?: string | undefined;
projectName?: string | undefined;
passwordProtection: PasswordProtection1 | PasswordProtection2 | null;
oldPasswordProtection: OldPasswordProtection1 | OldPasswordProtection2 | null;
};
export type Paths = {
value: string;
};
export type OptionsAllowlist = {
paths: Array<Paths>;
};
export type PayloadPaths = {
value: string;
};
export type OldOptionsAllowlist = {
paths: Array<PayloadPaths>;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndThirtyNine = {
projectId: string;
projectName: string;
optionsAllowlist?: OptionsAllowlist | null | undefined;
oldOptionsAllowlist?: OldOptionsAllowlist | null | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndThirtyEight = {
source: string;
projectId: string;
projectName: string;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndThirtySeven = {
previousProjectId?: string | undefined;
newProjectId?: string | undefined;
previousProjectName: string;
newProjectName: string;
destinationAccountName: string;
transferId?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndThirtySix = {
projectId: string;
projectName: string;
originAccountName: string;
destinationAccountName: string;
destinationAccountId: string;
transferId?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndThirtyFive = {
previousProjectId?: string | undefined;
projectName: string;
destinationAccountName: string | null;
transferId?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndThirtyFour = {
previousProjectId?: string | undefined;
newProjectId?: string | undefined;
previousProjectName: string;
newProjectName: string;
originAccountName: string;
transferId?: string | undefined;
};
export type UserEventPayload233Project = {
id: string;
name: string;
};
export const UserEventPayload233Role = {
Admin: "ADMIN",
ProjectDeveloper: "PROJECT_DEVELOPER",
ProjectGuest: "PROJECT_GUEST",
ProjectViewer: "PROJECT_VIEWER",
} as const;
export type UserEventPayload233Role = ClosedEnum<
typeof UserEventPayload233Role
>;
export const PayloadPreviousRole = {
Admin: "ADMIN",
ProjectDeveloper: "PROJECT_DEVELOPER",
ProjectGuest: "PROJECT_GUEST",
ProjectViewer: "PROJECT_VIEWER",
} as const;
export type PayloadPreviousRole = ClosedEnum<typeof PayloadPreviousRole>;
export type PayloadProjectMembership = {
role?: UserEventPayload233Role | undefined;
uid?: string | undefined;
createdAt?: number | undefined;
username?: string | undefined;
previousRole?: PayloadPreviousRole | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndThirtyThree = {
project: UserEventPayload233Project;
projectMembership: PayloadProjectMembership;
};
export type UserEventPayload232Project = {
name: string;
id?: string | undefined;
};
export const UserEventPayload232Role = {
Admin: "ADMIN",
ProjectDeveloper: "PROJECT_DEVELOPER",
ProjectGuest: "PROJECT_GUEST",
ProjectViewer: "PROJECT_VIEWER",
} as const;
export type UserEventPayload232Role = ClosedEnum<
typeof UserEventPayload232Role
>;
export type RemovedMembership = {
role: UserEventPayload232Role;
uid: string;
createdAt: number;
username?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndThirtyTwo = {
project: UserEventPayload232Project;
removedMembership: RemovedMembership;
};
export const UserEventPayload231Role = {
Admin: "ADMIN",
ProjectDeveloper: "PROJECT_DEVELOPER",
ProjectGuest: "PROJECT_GUEST",
ProjectViewer: "PROJECT_VIEWER",
} as const;
export type UserEventPayload231Role = ClosedEnum<
typeof UserEventPayload231Role
>;
export type UserEventPayload231Project = {
name: string;
role: UserEventPayload231Role;
invitedUserName: string;
id?: string | undefined;
invitedUserId?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndThirtyOne = {
project: UserEventPayload231Project;
};
export type UserEventPayload230Project = {
name: string;
id?: string | undefined;
};
export const UserEventPayloadRole = {
Admin: "ADMIN",
ProjectDeveloper: "PROJECT_DEVELOPER",
ProjectGuest: "PROJECT_GUEST",
ProjectViewer: "PROJECT_VIEWER",
} as const;
export type UserEventPayloadRole = ClosedEnum<typeof UserEventPayloadRole>;
export type ProjectMembership = {
role: UserEventPayloadRole;
uid: string;
createdAt: number;
username?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndThirty = {
project: UserEventPayload230Project;
projectMembership: ProjectMembership | null;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndTwentyNine = {
projectId: string;
projectName: string;
target: string;
domain: string;
configuredBy?: string | null | undefined;
prevConfiguredBy?: string | null | undefined;
};
export const UserEventPayload228Role = {
Admin: "ADMIN",
ProjectDeveloper: "PROJECT_DEVELOPER",
ProjectGuest: "PROJECT_GUEST",
ProjectViewer: "PROJECT_VIEWER",
} as const;
export type UserEventPayload228Role = ClosedEnum<
typeof UserEventPayload228Role
>;
export type PayloadProjects = {
projectId: string;
role: UserEventPayload228Role;
membershipCreatedAt: number;
};
export type TeamMembership = {
uid: string;
username?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndTwentyEight = {
projects: Array<PayloadProjects>;
teamMembership?: TeamMembership | undefined;
directoryType?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndTwentySeven = {
projectId: string;
projectName: string;
domain: string;
redirect?: string | null | undefined;
redirectStatusCode?: number | null | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndTwentySix = {
oldProjectId: string;
oldProjectName: string;
newProjectId: string;
newProjectName: string;
domain: string;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndTwentyFive = {
projectId: string;
projectName: string;
domain: string;
target: string;
redirect?: string | null | undefined;
redirectStatusCode?: number | null | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndTwentyFour = {
projectId: string;
projectName: string;
domain: string;
target: string;
redirect: string | null;
redirectStatusCode: number | null;
gitBranch: string | null;
configuredBy?: string | undefined;
};
export type UserEventPayload223Previous = {
commandForIgnoringBuildStep?: string | undefined;
};
export type UserEventPayload223Next = {
commandForIgnoringBuildStep?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndTwentyThree = {
projectId: string;
projectName: string;
previous: UserEventPayload223Previous;
next: UserEventPayload223Next;
};
export type ConsolidatedGitCommitStatus = {
enabled: boolean;
propagateFailures: boolean;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndTwentyTwo = {
projectId: string;
projectName: string;
consolidatedGitCommitStatus: ConsolidatedGitCommitStatus | null;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndTwentyOne = {
projectId: string;
projectName: string;
gitLFS: boolean;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndTwenty = {
projectId: string;
projectName: string;
gitCommitStatus: boolean;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndNineteen = {
disableRepositoryDispatchEvents: boolean;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndEighteen = {
requireVerifiedCommits: boolean;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndSeventeen = {
projectId: string;
projectName: string;
requireVerifiedCommits: boolean | null;
};
export const CreateDeployments = {
Disabled: "disabled",
Enabled: "enabled",
} as const;
export type CreateDeployments = ClosedEnum<typeof CreateDeployments>;
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndSixteen = {
projectId: string;
projectName: string;
createDeployments: CreateDeployments;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndFifteen = {
projectId: string;
projectName: string;
disableRepositoryDispatchEvents: boolean;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndFourteen = {
projectId: string;
projectName: string;
onCommit: boolean;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndThirteen = {
projectId: string;
projectName: string;
onPullRequest: boolean;
};
export const GitProvider = {
Bitbucket: "bitbucket",
Github: "github",
GithubCustomHost: "github-custom-host",
GithubLimited: "github-limited",
Gitlab: "gitlab",
Vercel: "vercel",
} as const;
export type GitProvider = ClosedEnum<typeof GitProvider>;
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndTwelve = {
projectId: string;
projectName: string;
gitProvider: GitProvider;
gitRepoId: string;
gitRepositoryName: string;
};
export const UserEventPayloadGitProvider = {
Bitbucket: "bitbucket",
Github: "github",
GithubCustomHost: "github-custom-host",
GithubLimited: "github-limited",
Gitlab: "gitlab",
Vercel: "vercel",
} as const;
export type UserEventPayloadGitProvider = ClosedEnum<
typeof UserEventPayloadGitProvider
>;
export type UserEventPayload211Previous = {
gitProvider: UserEventPayloadGitProvider;
gitRepoId: string;
gitRepositoryName: string;
};
export const PayloadGitProvider = {
Bitbucket: "bitbucket",
Github: "github",
GithubCustomHost: "github-custom-host",
GithubLimited: "github-limited",
Gitlab: "gitlab",
Vercel: "vercel",
} as const;
export type PayloadGitProvider = ClosedEnum<typeof PayloadGitProvider>;
export type UserEventPayload211Next = {
gitProvider: PayloadGitProvider;
gitRepoId: string;
gitRepositoryName: string;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndEleven = {
projectId: string;
projectName: string;
previous?: UserEventPayload211Previous | undefined;
next: UserEventPayload211Next;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndTen = {
projectId: string;
projectName: string;
newProjectName: string;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndNine = {
projectId: string;
projectName: string;
previewDeploymentSuffix: string | null;
};
export type UserEventPayload208Previous = {
functionZeroConfigFailover: boolean | null;
};
export type UserEventPayload208Next = {
functionZeroConfigFailover: boolean;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndEight = {
projectId: string;
projectName: string;
previous: UserEventPayload208Previous;
next: UserEventPayload208Next;
};
export type UserEventPayload207Previous = {
functionDefaultRegions: Array<string> | null;
};
export type UserEventPayload207Next = {
functionDefaultRegions: Array<string>;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndSeven = {
projectId: string;
projectName: string;
previous: UserEventPayload207Previous;
next: UserEventPayload207Next;
};
export type UserEventPayload206Previous = {
functionDefaultMemoryType: string | null;
};
export type UserEventPayload206Next = {
functionDefaultMemoryType: string;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndSix = {
projectId: string;
projectName: string;
previous: UserEventPayload206Previous;
next: UserEventPayload206Next;
};
export type UserEventPayload205Previous = {
functionDefaultTimeout: number | null;
};
export type UserEventPayload205Next = {
functionDefaultTimeout: number;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndFive = {
projectId: string;
projectName: string;
previous: UserEventPayload205Previous;
next: UserEventPayload205Next;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndFour = {
projectName?: string | undefined;
projectId: string;
enableFunctionsBeta: boolean;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndThree = {
projectId: string;
projectName: string;
customEnvironmentId: string;
customEnvironmentSlug: string;
};
/**
* The type of matching to perform
*/
export const UserEventPayload202Type = {
EndsWith: "endsWith",
Equals: "equals",
StartsWith: "startsWith",
} as const;
/**
* The type of matching to perform
*/
export type UserEventPayload202Type = ClosedEnum<
typeof UserEventPayload202Type
>;
export type BranchMatcher = {
/**
* The type of matching to perform
*/
type: UserEventPayload202Type;
/**
* The pattern to match against branch names
*/
pattern: string;
};
export type UserEventPayload202Previous = {
branchMatcher?: BranchMatcher | undefined;
};
/**
* The type of matching to perform
*/
export const UserEventPayload202NextType = {
EndsWith: "endsWith",
Equals: "equals",
StartsWith: "startsWith",
} as const;
/**
* The type of matching to perform
*/
export type UserEventPayload202NextType = ClosedEnum<
typeof UserEventPayload202NextType
>;
export type PayloadBranchMatcher = {
/**
* The type of matching to perform
*/
type: UserEventPayload202NextType;
/**
* The pattern to match against branch names
*/
pattern: string;
};
export type UserEventPayload202Next = {
branchMatcher?: PayloadBranchMatcher | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndTwo = {
projectId: string;
projectName: string;
customEnvironmentId: string;
customEnvironmentSlug: string;
previous: UserEventPayload202Previous;
next: UserEventPayload202Next;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndOne = {
projectId: string;
projectName: string;
previewDeploymentsEnabled: boolean;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundred = {
projectId: string;
projectName: string;
autoAssignCustomDomains: boolean;
};
export const BuildQueueConfiguration = {
SkipNamespaceQueue: "SKIP_NAMESPACE_QUEUE",
WaitForNamespaceQueue: "WAIT_FOR_NAMESPACE_QUEUE",
} as const;
export type BuildQueueConfiguration = ClosedEnum<
typeof BuildQueueConfiguration
>;
export const OldBuildQueueConfiguration = {
SkipNamespaceQueue: "SKIP_NAMESPACE_QUEUE",
WaitForNamespaceQueue: "WAIT_FOR_NAMESPACE_QUEUE",
} as const;
export type OldBuildQueueConfiguration = ClosedEnum<
typeof OldBuildQueueConfiguration
>;
/**
* The payload of the event, if requested.
*/
export type OneHundredAndNinetyNine = {
projectId: string;
projectName: string;
elasticConcurrencyEnabled: boolean;
oldElasticConcurrencyEnabled: boolean;
buildQueueConfiguration?: BuildQueueConfiguration | undefined;
oldBuildQueueConfiguration?: OldBuildQueueConfiguration | undefined;
};
/**
* The payload of the event, if requested.
*/
export type OneHundredAndNinetyEight = {
name: string;
ownerId: string;
};
export const UserEventPayload197Action = {
Disabled: "disabled",
Enabled: "enabled",
} as const;
export type UserEventPayload197Action = ClosedEnum<
typeof UserEventPayload197Action
>;
/**
* The payload of the event, if requested.
*/
export type OneHundredAndNinetySeven = {
projectId: string;
projectName: string;
action: UserEventPayload197Action;
};
/**
* The payload of the event, if requested.
*/
export type OneHundredAndNinetySix = {
projectName?: string | undefined;
projectId: string;
};
export type UserEventPayload195Team = {
id: string;
name: string;
};
export const EnvId2 = {
Preview: "preview",
Production: "production",
} as const;
export type EnvId2 = ClosedEnum<typeof EnvId2>;
export type EnvId = string | EnvId2;
export type Aws = {
subnetIds: Array<string>;
securityGroupId?: string | undefined;
};
export type OldConnectConfigurations = {
envId: string | EnvId2;
connectConfigurationId: string;
dc?: string | undefined;
passive: boolean;
buildsEnabled: boolean;
aws?: Aws | undefined;
createdAt: number;
updatedAt: number;
};
export const UserEventEnvId2 = {
Preview: "preview",
Production: "production",
} as const;
export type UserEventEnvId2 = ClosedEnum<typeof UserEventEnvId2>;
export type PayloadEnvId = string | UserEventEnvId2;
export type PayloadAws = {
subnetIds: Array<string>;
securityGroupId?: string | undefined;
};
export type NewConnectConfigurations = {
envId: string | UserEventEnvId2;
connectConfigurationId: string;
dc?: string | undefined;
passive: boolean;
buildsEnabled: boolean;
aws?: PayloadAws | undefined;
createdAt: number;
updatedAt: number;
};
export type UserEventPayload195Project = {
id: string;
name?: string | undefined;
oldConnectConfigurations: Array<OldConnectConfigurations> | null;
newConnectConfigurations: Array<NewConnectConfigurations> | null;
};
/**
* The payload of the event, if requested.
*/
export type OneHundredAndNinetyFive = {
team: UserEventPayload195Team;
project: UserEventPayload195Project;
};
/**
* The payload of the event, if requested.
*/
export type OneHundredAndNinetyFour = {
projectId?: string | undefined;
projectName?: string | undefined;
target?: Array<string> | undefined;
updated?: boolean | undefined;
};
/**
* The payload of the event, if requested.
*/
export type OneHundredAndNinetyThree = {
projectId?: string | undefined;
projectName?: string | undefined;
certId?: string | undefined;
origin?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type OneHundredAndNinetyTwo = {
projectId?: string | undefined;
projectName: string;
previousBuildMachineType?: string | undefined;
nextBuildMachineType: string;
previousBuildMachineSelection: string;
nextBuildMachineSelection: string;
isSystemInitiated?: boolean | undefined;
};
/**
* The payload of the event, if requested.
*/
export type OneHundredAndNinetyOne = {
projectId: string;
projectName: string;
sourceFilesOutsideRootDirectory: boolean;
};
/**
* The payload of the event, if requested.
*/
export type OneHundredAndNinety = {
projectId: string;
projectName: string;
productionDeploymentsFastLane: boolean;
};
export type UserEventPayload189Previous = {};
export type UserEventPayload189Next = {};
/**
* The payload of the event, if requested.
*/
export type OneHundredAndEightyNine = {
projectId: string;
projectName: string;
previous: UserEventPayload189Previous;
next: UserEventPayload189Next;
};
/**
* The payload of the event, if requested.
*/
export type OneHundredAndEightyEight = {
projectId: string;
projectName: string;
enableExternalRewriteCaching: boolean;
};
/**
* The payload of the event, if requested.
*/
export type OneHundredAndEightySeven = {
projectId: string;
projectName: string;
enableAffectedProjectsDeployments: boolean;
};
/**
* The payload of the event, if requested.
*/
export type OneHundredAndEightySix = {
projectId: string;
projectName: string;
avatar?: string | null | undefined;
};
export const UserEventPayload185Action = {
Disabled: "disabled",
Enabled: "enabled",
Regenerated: "regenerated",
Updated: "updated",
} as const;
export type UserEventPayload185Action = ClosedEnum<
typeof UserEventPayload185Action
>;
/**
* The payload of the event, if requested.
*/
export type OneHundredAndEightyFive = {
projectId: string;
projectName: string;
action: UserEventPayload185Action;
isEnvVar?: boolean | undefined;
note?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type OneHundredAndEightyFour = {
projectName?: string | undefined;
projectId: string;
projectAnalytics?: { [k: string]: any } | undefined;
prevProjectAnalytics?: { [k: string]: any } | null | undefined;
};
export type ProjectAnalytics = {
id: string;
canceledAt?: number | null | undefined;
disabledAt: number;
enabledAt: number;
paidAt?: number | undefined;
sampleRatePercent?: number | null | undefined;
spendLimitInDollars?: number | null | undefined;
};
export type PrevProjectAnalytics = {
id: string;
canceledAt?: number | null | undefined;
disabledAt: number;
enabledAt: number;
paidAt?: number | undefined;
sampleRatePercent?: number | null | undefined;
spendLimitInDollars?: number | null | undefined;
};
/**
* The payload of the event, if requested.
*/
export type OneHundredAndEightyThree = {
projectName?: string | undefined;
projectId: string;
projectAnalytics: ProjectAnalytics | null;
prevProjectAnalytics: PrevProjectAnalytics | null;
};
/**
* The payload of the event, if requested.
*/
export type OneHundredAndEightyTwo = {
projectId: string;
projectName: string;
directoryListing: boolean;
};
/**
* The payload of the event, if requested.
*/
export type OneHundredAndEightyOne = {
projectId?: string | undefined;
projectName: string;
branch: string;
};
export type PayloadPrivateLinkEndpoint = {
id: string;
name: string;
environmentIds?: Array<string> | undefined;
privateDnsNames?: Array<string> | undefined;
};
export type PreviousEndpoint = {
name: string;
environmentIds?: Array<string> | undefined;
privateDnsNames?: Array<string> | undefined;
};
/**
* The payload of the event, if requested.
*/
export type OneHundredAndEighty = {
privateLinkEndpoint: PayloadPrivateLinkEndpoint;
projectId: string;
previousEndpoint: PreviousEndpoint;
};
export type UserEventPayloadPrev = {
id: string;
name: string;
projectId: string;
vercelRegion: string;
awsServiceName: string;
privateDnsNames?: Array<string> | undefined;
};
export type Current = {
id: string;
name: string;
projectId: string;
vercelRegion: string;
awsServiceName: string;
privateDnsNames?: Array<string> | undefined;
};
/**
* The payload of the event, if requested.
*/
export type OneHundredAndSeventyNine = {
prev: UserEventPayloadPrev;
current: Current;
};
export type PrivateLinkEndpoint = {
id: string;
name: string;
};
/**
* The payload of the event, if requested.
*/
export type OneHundredAndSeventyEight = {
privateLinkEndpoint: PrivateLinkEndpoint;
projectId: string;
};
export type Endpoint = {
id: string;
name: string;
projectId: string;
vercelRegion: string;
awsServiceName: string;
privateDnsNames?: Array<string> | undefined;
};
/**
* The payload of the event, if requested.
*/
export type OneHundredAndSeventySeven = {
endpoint: Endpoint;
};
/**
* The payload of the event, if requested.
*/
export type OneHundredAndSeventySix = {
previewDeploymentSuffix?: string | null | undefined;
previousPreviewDeploymentSuffix?: string | null | undefined;
};
/**
* The payload of the event, if requested.
*/
export type OneHundredAndSeventyFive = {
price?: number | undefined;
currency?: string | undefined;
enabled?: boolean | undefined;
};
export const UserEventPayload174Role = {
Billing: "BILLING",
Contributor: "CONTRIBUTOR",
Developer: "DEVELOPER",
Member: "MEMBER",
Owner: "OWNER",
Security: "SECURITY",
Viewer: "VIEWER",
ViewerForPlus: "VIEWER_FOR_PLUS",
} as const;
export type UserEventPayload174Role = ClosedEnum<
typeof UserEventPayload174Role
>;
export const UserEventPayloadOrigin = {
AccountUpdate: "account-update",
Bitbucket: "bitbucket",
Dsync: "dsync",
Feedback: "feedback",
Github: "github",
Gitlab: "gitlab",
Import: "import",
Link: "link",
Mail: "mail",
NsnbAutoApprove: "nsnb-auto-approve",
NsnbHobbyUpgrade: "nsnb-hobby-upgrade",
NsnbInvite: "nsnb-invite",
NsnbRedeploy: "nsnb-redeploy",
NsnbRedeployAttributionCard: "nsnb-redeploy-attribution-card",
NsnbRequestAccess: "nsnb-request-access",
NsnbViewerUpgrade: "nsnb-viewer-upgrade",
OrganizationTeams: "organization-teams",
Saml: "saml",
Teams: "teams",
} as const;
export type UserEventPayloadOrigin = ClosedEnum<typeof UserEventPayloadOrigin>;
export type PayloadGitUserId = string | number;
export type PayloadJoinedFrom = {
origin: UserEventPayloadOrigin;
commitId?: string | undefined;
repoId?: string | undefined;
repoPath?: string | undefined;
gitUserId?: string | number | undefined;
gitUserLogin?: string | undefined;
ssoUserId?: string | undefined;
ssoConnectedAt?: number | undefined;
idpUserId?: string | undefined;
dsyncUserId?: string | undefined;
dsyncConnectedAt?: number | undefined;
};
export type RemovedUsers = {
role: UserEventPayload174Role;
confirmed: boolean;
confirmedAt?: number | undefined;
joinedFrom?: PayloadJoinedFrom | undefined;
};
/** @internal */
export const TwoHundredAndFortyFour$inboundSchema: z.ZodType<
TwoHundredAndFortyFour,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.optional(types.string()),
projectName: types.string(),
consent: Consent$inboundSchema,
});
export function twoHundredAndFortyFourFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndFortyFour, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndFortyFour$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndFortyFour' from JSON`,
);
}
/** @internal */
export const ReasonCode$inboundSchema: z.ZodNativeEnum<typeof ReasonCode> = z
.nativeEnum(ReasonCode);
/** @internal */
export const TwoHundredAndFortyThree$inboundSchema: z.ZodType<
TwoHundredAndFortyThree,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
reasonCode: types.optional(ReasonCode$inboundSchema),
});
export function twoHundredAndFortyThreeFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndFortyThree, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndFortyThree$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndFortyThree' from JSON`,
);
}
/** @internal */
export const TwoHundredAndFortyTwo$inboundSchema: z.ZodType<
TwoHundredAndFortyTwo,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
expiresAt: types.number(),
});
export function twoHundredAndFortyTwoFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndFortyTwo, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndFortyTwo$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndFortyTwo' from JSON`,
);
}
/** @internal */
export const TwoHundredAndFortyOne$inboundSchema: z.ZodType<
TwoHundredAndFortyOne,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
});
export function twoHundredAndFortyOneFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndFortyOne, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndFortyOne$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndFortyOne' from JSON`,
);
}
/** @internal */
export const PasswordProtection2$inboundSchema: z.ZodNativeEnum<
typeof PasswordProtection2
> = z.nativeEnum(PasswordProtection2);
/** @internal */
export const PasswordProtectionDeploymentType$inboundSchema: z.ZodNativeEnum<
typeof PasswordProtectionDeploymentType
> = z.nativeEnum(PasswordProtectionDeploymentType);
/** @internal */
export const PasswordProtection1$inboundSchema: z.ZodType<
PasswordProtection1,
z.ZodTypeDef,
unknown
> = z.object({
deploymentType: PasswordProtectionDeploymentType$inboundSchema,
});
export function passwordProtection1FromJSON(
jsonString: string,
): SafeParseResult<PasswordProtection1, SDKValidationError> {
return safeParse(
jsonString,
(x) => PasswordProtection1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PasswordProtection1' from JSON`,
);
}
/** @internal */
export const PayloadPasswordProtection$inboundSchema: z.ZodType<
PayloadPasswordProtection,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => PasswordProtection1$inboundSchema),
PasswordProtection2$inboundSchema,
]);
export function payloadPasswordProtectionFromJSON(
jsonString: string,
): SafeParseResult<PayloadPasswordProtection, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadPasswordProtection$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadPasswordProtection' from JSON`,
);
}
/** @internal */
export const OldPasswordProtection2$inboundSchema: z.ZodNativeEnum<
typeof OldPasswordProtection2
> = z.nativeEnum(OldPasswordProtection2);
/** @internal */
export const OldPasswordProtectionDeploymentType$inboundSchema: z.ZodNativeEnum<
typeof OldPasswordProtectionDeploymentType
> = z.nativeEnum(OldPasswordProtectionDeploymentType);
/** @internal */
export const OldPasswordProtection1$inboundSchema: z.ZodType<
OldPasswordProtection1,
z.ZodTypeDef,
unknown
> = z.object({
deploymentType: OldPasswordProtectionDeploymentType$inboundSchema,
});
export function oldPasswordProtection1FromJSON(
jsonString: string,
): SafeParseResult<OldPasswordProtection1, SDKValidationError> {
return safeParse(
jsonString,
(x) => OldPasswordProtection1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OldPasswordProtection1' from JSON`,
);
}
/** @internal */
export const OldPasswordProtection$inboundSchema: z.ZodType<
OldPasswordProtection,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => OldPasswordProtection1$inboundSchema),
OldPasswordProtection2$inboundSchema,
]);
export function oldPasswordProtectionFromJSON(
jsonString: string,
): SafeParseResult<OldPasswordProtection, SDKValidationError> {
return safeParse(
jsonString,
(x) => OldPasswordProtection$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OldPasswordProtection' from JSON`,
);
}
/** @internal */
export const TwoHundredAndForty$inboundSchema: z.ZodType<
TwoHundredAndForty,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.optional(types.string()),
projectName: types.optional(types.string()),
passwordProtection: types.nullable(
smartUnion([
z.lazy(() => PasswordProtection1$inboundSchema),
PasswordProtection2$inboundSchema,
]),
),
oldPasswordProtection: types.nullable(
smartUnion([
z.lazy(() => OldPasswordProtection1$inboundSchema),
OldPasswordProtection2$inboundSchema,
]),
),
});
export function twoHundredAndFortyFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndForty, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndForty$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndForty' from JSON`,
);
}
/** @internal */
export const Paths$inboundSchema: z.ZodType<Paths, z.ZodTypeDef, unknown> = z
.object({
value: types.string(),
});
export function pathsFromJSON(
jsonString: string,
): SafeParseResult<Paths, SDKValidationError> {
return safeParse(
jsonString,
(x) => Paths$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Paths' from JSON`,
);
}
/** @internal */
export const OptionsAllowlist$inboundSchema: z.ZodType<
OptionsAllowlist,
z.ZodTypeDef,
unknown
> = z.object({
paths: z.array(z.lazy(() => Paths$inboundSchema)),
});
export function optionsAllowlistFromJSON(
jsonString: string,
): SafeParseResult<OptionsAllowlist, SDKValidationError> {
return safeParse(
jsonString,
(x) => OptionsAllowlist$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OptionsAllowlist' from JSON`,
);
}
/** @internal */
export const PayloadPaths$inboundSchema: z.ZodType<
PayloadPaths,
z.ZodTypeDef,
unknown
> = z.object({
value: types.string(),
});
export function payloadPathsFromJSON(
jsonString: string,
): SafeParseResult<PayloadPaths, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadPaths$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadPaths' from JSON`,
);
}
/** @internal */
export const OldOptionsAllowlist$inboundSchema: z.ZodType<
OldOptionsAllowlist,
z.ZodTypeDef,
unknown
> = z.object({
paths: z.array(z.lazy(() => PayloadPaths$inboundSchema)),
});
export function oldOptionsAllowlistFromJSON(
jsonString: string,
): SafeParseResult<OldOptionsAllowlist, SDKValidationError> {
return safeParse(
jsonString,
(x) => OldOptionsAllowlist$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OldOptionsAllowlist' from JSON`,
);
}
/** @internal */
export const TwoHundredAndThirtyNine$inboundSchema: z.ZodType<
TwoHundredAndThirtyNine,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
optionsAllowlist: z.nullable(z.lazy(() => OptionsAllowlist$inboundSchema))
.optional(),
oldOptionsAllowlist: z.nullable(
z.lazy(() => OldOptionsAllowlist$inboundSchema),
).optional(),
});
export function twoHundredAndThirtyNineFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndThirtyNine, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndThirtyNine$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndThirtyNine' from JSON`,
);
}
/** @internal */
export const TwoHundredAndThirtyEight$inboundSchema: z.ZodType<
TwoHundredAndThirtyEight,
z.ZodTypeDef,
unknown
> = z.object({
source: types.string(),
projectId: types.string(),
projectName: types.string(),
});
export function twoHundredAndThirtyEightFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndThirtyEight, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndThirtyEight$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndThirtyEight' from JSON`,
);
}
/** @internal */
export const TwoHundredAndThirtySeven$inboundSchema: z.ZodType<
TwoHundredAndThirtySeven,
z.ZodTypeDef,
unknown
> = z.object({
previousProjectId: types.optional(types.string()),
newProjectId: types.optional(types.string()),
previousProjectName: types.string(),
newProjectName: types.string(),
destinationAccountName: types.string(),
transferId: types.optional(types.string()),
});
export function twoHundredAndThirtySevenFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndThirtySeven, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndThirtySeven$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndThirtySeven' from JSON`,
);
}
/** @internal */
export const TwoHundredAndThirtySix$inboundSchema: z.ZodType<
TwoHundredAndThirtySix,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
originAccountName: types.string(),
destinationAccountName: types.string(),
destinationAccountId: types.string(),
transferId: types.optional(types.string()),
});
export function twoHundredAndThirtySixFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndThirtySix, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndThirtySix$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndThirtySix' from JSON`,
);
}
/** @internal */
export const TwoHundredAndThirtyFive$inboundSchema: z.ZodType<
TwoHundredAndThirtyFive,
z.ZodTypeDef,
unknown
> = z.object({
previousProjectId: types.optional(types.string()),
projectName: types.string(),
destinationAccountName: types.nullable(types.string()),
transferId: types.optional(types.string()),
});
export function twoHundredAndThirtyFiveFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndThirtyFive, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndThirtyFive$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndThirtyFive' from JSON`,
);
}
/** @internal */
export const TwoHundredAndThirtyFour$inboundSchema: z.ZodType<
TwoHundredAndThirtyFour,
z.ZodTypeDef,
unknown
> = z.object({
previousProjectId: types.optional(types.string()),
newProjectId: types.optional(types.string()),
previousProjectName: types.string(),
newProjectName: types.string(),
originAccountName: types.string(),
transferId: types.optional(types.string()),
});
export function twoHundredAndThirtyFourFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndThirtyFour, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndThirtyFour$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndThirtyFour' from JSON`,
);
}
/** @internal */
export const UserEventPayload233Project$inboundSchema: z.ZodType<
UserEventPayload233Project,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
name: types.string(),
});
export function userEventPayload233ProjectFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload233Project, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload233Project$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload233Project' from JSON`,
);
}
/** @internal */
export const UserEventPayload233Role$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload233Role
> = z.nativeEnum(UserEventPayload233Role);
/** @internal */
export const PayloadPreviousRole$inboundSchema: z.ZodNativeEnum<
typeof PayloadPreviousRole
> = z.nativeEnum(PayloadPreviousRole);
/** @internal */
export const PayloadProjectMembership$inboundSchema: z.ZodType<
PayloadProjectMembership,
z.ZodTypeDef,
unknown
> = z.object({
role: types.optional(UserEventPayload233Role$inboundSchema),
uid: types.optional(types.string()),
createdAt: types.optional(types.number()),
username: types.optional(types.string()),
previousRole: types.optional(PayloadPreviousRole$inboundSchema),
});
export function payloadProjectMembershipFromJSON(
jsonString: string,
): SafeParseResult<PayloadProjectMembership, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadProjectMembership$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadProjectMembership' from JSON`,
);
}
/** @internal */
export const TwoHundredAndThirtyThree$inboundSchema: z.ZodType<
TwoHundredAndThirtyThree,
z.ZodTypeDef,
unknown
> = z.object({
project: z.lazy(() => UserEventPayload233Project$inboundSchema),
projectMembership: z.lazy(() => PayloadProjectMembership$inboundSchema),
});
export function twoHundredAndThirtyThreeFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndThirtyThree, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndThirtyThree$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndThirtyThree' from JSON`,
);
}
/** @internal */
export const UserEventPayload232Project$inboundSchema: z.ZodType<
UserEventPayload232Project,
z.ZodTypeDef,
unknown
> = z.object({
name: types.string(),
id: types.optional(types.string()),
});
export function userEventPayload232ProjectFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload232Project, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload232Project$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload232Project' from JSON`,
);
}
/** @internal */
export const UserEventPayload232Role$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload232Role
> = z.nativeEnum(UserEventPayload232Role);
/** @internal */
export const RemovedMembership$inboundSchema: z.ZodType<
RemovedMembership,
z.ZodTypeDef,
unknown
> = z.object({
role: UserEventPayload232Role$inboundSchema,
uid: types.string(),
createdAt: types.number(),
username: types.optional(types.string()),
});
export function removedMembershipFromJSON(
jsonString: string,
): SafeParseResult<RemovedMembership, SDKValidationError> {
return safeParse(
jsonString,
(x) => RemovedMembership$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'RemovedMembership' from JSON`,
);
}
/** @internal */
export const TwoHundredAndThirtyTwo$inboundSchema: z.ZodType<
TwoHundredAndThirtyTwo,
z.ZodTypeDef,
unknown
> = z.object({
project: z.lazy(() => UserEventPayload232Project$inboundSchema),
removedMembership: z.lazy(() => RemovedMembership$inboundSchema),
});
export function twoHundredAndThirtyTwoFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndThirtyTwo, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndThirtyTwo$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndThirtyTwo' from JSON`,
);
}
/** @internal */
export const UserEventPayload231Role$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload231Role
> = z.nativeEnum(UserEventPayload231Role);
/** @internal */
export const UserEventPayload231Project$inboundSchema: z.ZodType<
UserEventPayload231Project,
z.ZodTypeDef,
unknown
> = z.object({
name: types.string(),
role: UserEventPayload231Role$inboundSchema,
invitedUserName: types.string(),
id: types.optional(types.string()),
invitedUserId: types.optional(types.string()),
});
export function userEventPayload231ProjectFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload231Project, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload231Project$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload231Project' from JSON`,
);
}
/** @internal */
export const TwoHundredAndThirtyOne$inboundSchema: z.ZodType<
TwoHundredAndThirtyOne,
z.ZodTypeDef,
unknown
> = z.object({
project: z.lazy(() => UserEventPayload231Project$inboundSchema),
});
export function twoHundredAndThirtyOneFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndThirtyOne, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndThirtyOne$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndThirtyOne' from JSON`,
);
}
/** @internal */
export const UserEventPayload230Project$inboundSchema: z.ZodType<
UserEventPayload230Project,
z.ZodTypeDef,
unknown
> = z.object({
name: types.string(),
id: types.optional(types.string()),
});
export function userEventPayload230ProjectFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload230Project, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload230Project$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload230Project' from JSON`,
);
}
/** @internal */
export const UserEventPayloadRole$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayloadRole
> = z.nativeEnum(UserEventPayloadRole);
/** @internal */
export const ProjectMembership$inboundSchema: z.ZodType<
ProjectMembership,
z.ZodTypeDef,
unknown
> = z.object({
role: UserEventPayloadRole$inboundSchema,
uid: types.string(),
createdAt: types.number(),
username: types.optional(types.string()),
});
export function projectMembershipFromJSON(
jsonString: string,
): SafeParseResult<ProjectMembership, SDKValidationError> {
return safeParse(
jsonString,
(x) => ProjectMembership$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ProjectMembership' from JSON`,
);
}
/** @internal */
export const TwoHundredAndThirty$inboundSchema: z.ZodType<
TwoHundredAndThirty,
z.ZodTypeDef,
unknown
> = z.object({
project: z.lazy(() => UserEventPayload230Project$inboundSchema),
projectMembership: types.nullable(
z.lazy(() => ProjectMembership$inboundSchema),
),
});
export function twoHundredAndThirtyFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndThirty, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndThirty$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndThirty' from JSON`,
);
}
/** @internal */
export const TwoHundredAndTwentyNine$inboundSchema: z.ZodType<
TwoHundredAndTwentyNine,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
target: types.string(),
domain: types.string(),
configuredBy: z.nullable(types.string()).optional(),
prevConfiguredBy: z.nullable(types.string()).optional(),
});
export function twoHundredAndTwentyNineFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndTwentyNine, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndTwentyNine$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndTwentyNine' from JSON`,
);
}
/** @internal */
export const UserEventPayload228Role$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload228Role
> = z.nativeEnum(UserEventPayload228Role);
/** @internal */
export const PayloadProjects$inboundSchema: z.ZodType<
PayloadProjects,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
role: UserEventPayload228Role$inboundSchema,
membershipCreatedAt: types.number(),
});
export function payloadProjectsFromJSON(
jsonString: string,
): SafeParseResult<PayloadProjects, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadProjects$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadProjects' from JSON`,
);
}
/** @internal */
export const TeamMembership$inboundSchema: z.ZodType<
TeamMembership,
z.ZodTypeDef,
unknown
> = z.object({
uid: types.string(),
username: types.optional(types.string()),
});
export function teamMembershipFromJSON(
jsonString: string,
): SafeParseResult<TeamMembership, SDKValidationError> {
return safeParse(
jsonString,
(x) => TeamMembership$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TeamMembership' from JSON`,
);
}
/** @internal */
export const TwoHundredAndTwentyEight$inboundSchema: z.ZodType<
TwoHundredAndTwentyEight,
z.ZodTypeDef,
unknown
> = z.object({
projects: z.array(z.lazy(() => PayloadProjects$inboundSchema)),
teamMembership: types.optional(z.lazy(() => TeamMembership$inboundSchema)),
directoryType: types.optional(types.string()),
});
export function twoHundredAndTwentyEightFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndTwentyEight, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndTwentyEight$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndTwentyEight' from JSON`,
);
}
/** @internal */
export const TwoHundredAndTwentySeven$inboundSchema: z.ZodType<
TwoHundredAndTwentySeven,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
domain: types.string(),
redirect: z.nullable(types.string()).optional(),
redirectStatusCode: z.nullable(types.number()).optional(),
});
export function twoHundredAndTwentySevenFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndTwentySeven, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndTwentySeven$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndTwentySeven' from JSON`,
);
}
/** @internal */
export const TwoHundredAndTwentySix$inboundSchema: z.ZodType<
TwoHundredAndTwentySix,
z.ZodTypeDef,
unknown
> = z.object({
oldProjectId: types.string(),
oldProjectName: types.string(),
newProjectId: types.string(),
newProjectName: types.string(),
domain: types.string(),
});
export function twoHundredAndTwentySixFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndTwentySix, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndTwentySix$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndTwentySix' from JSON`,
);
}
/** @internal */
export const TwoHundredAndTwentyFive$inboundSchema: z.ZodType<
TwoHundredAndTwentyFive,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
domain: types.string(),
target: types.string(),
redirect: z.nullable(types.string()).optional(),
redirectStatusCode: z.nullable(types.number()).optional(),
});
export function twoHundredAndTwentyFiveFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndTwentyFive, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndTwentyFive$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndTwentyFive' from JSON`,
);
}
/** @internal */
export const TwoHundredAndTwentyFour$inboundSchema: z.ZodType<
TwoHundredAndTwentyFour,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
domain: types.string(),
target: types.string(),
redirect: types.nullable(types.string()),
redirectStatusCode: types.nullable(types.number()),
gitBranch: types.nullable(types.string()),
configuredBy: types.optional(types.string()),
});
export function twoHundredAndTwentyFourFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndTwentyFour, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndTwentyFour$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndTwentyFour' from JSON`,
);
}
/** @internal */
export const UserEventPayload223Previous$inboundSchema: z.ZodType<
UserEventPayload223Previous,
z.ZodTypeDef,
unknown
> = z.object({
commandForIgnoringBuildStep: types.optional(types.string()),
});
export function userEventPayload223PreviousFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload223Previous, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload223Previous$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload223Previous' from JSON`,
);
}
/** @internal */
export const UserEventPayload223Next$inboundSchema: z.ZodType<
UserEventPayload223Next,
z.ZodTypeDef,
unknown
> = z.object({
commandForIgnoringBuildStep: types.optional(types.string()),
});
export function userEventPayload223NextFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload223Next, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload223Next$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload223Next' from JSON`,
);
}
/** @internal */
export const TwoHundredAndTwentyThree$inboundSchema: z.ZodType<
TwoHundredAndTwentyThree,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
previous: z.lazy(() => UserEventPayload223Previous$inboundSchema),
next: z.lazy(() => UserEventPayload223Next$inboundSchema),
});
export function twoHundredAndTwentyThreeFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndTwentyThree, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndTwentyThree$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndTwentyThree' from JSON`,
);
}
/** @internal */
export const ConsolidatedGitCommitStatus$inboundSchema: z.ZodType<
ConsolidatedGitCommitStatus,
z.ZodTypeDef,
unknown
> = z.object({
enabled: types.boolean(),
propagateFailures: types.boolean(),
});
export function consolidatedGitCommitStatusFromJSON(
jsonString: string,
): SafeParseResult<ConsolidatedGitCommitStatus, SDKValidationError> {
return safeParse(
jsonString,
(x) => ConsolidatedGitCommitStatus$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ConsolidatedGitCommitStatus' from JSON`,
);
}
/** @internal */
export const TwoHundredAndTwentyTwo$inboundSchema: z.ZodType<
TwoHundredAndTwentyTwo,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
consolidatedGitCommitStatus: types.nullable(
z.lazy(() => ConsolidatedGitCommitStatus$inboundSchema),
),
});
export function twoHundredAndTwentyTwoFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndTwentyTwo, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndTwentyTwo$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndTwentyTwo' from JSON`,
);
}
/** @internal */
export const TwoHundredAndTwentyOne$inboundSchema: z.ZodType<
TwoHundredAndTwentyOne,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
gitLFS: types.boolean(),
});
export function twoHundredAndTwentyOneFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndTwentyOne, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndTwentyOne$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndTwentyOne' from JSON`,
);
}
/** @internal */
export const TwoHundredAndTwenty$inboundSchema: z.ZodType<
TwoHundredAndTwenty,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
gitCommitStatus: types.boolean(),
});
export function twoHundredAndTwentyFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndTwenty, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndTwenty$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndTwenty' from JSON`,
);
}
/** @internal */
export const TwoHundredAndNineteen$inboundSchema: z.ZodType<
TwoHundredAndNineteen,
z.ZodTypeDef,
unknown
> = z.object({
disableRepositoryDispatchEvents: types.boolean(),
});
export function twoHundredAndNineteenFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndNineteen, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndNineteen$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndNineteen' from JSON`,
);
}
/** @internal */
export const TwoHundredAndEighteen$inboundSchema: z.ZodType<
TwoHundredAndEighteen,
z.ZodTypeDef,
unknown
> = z.object({
requireVerifiedCommits: types.boolean(),
});
export function twoHundredAndEighteenFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndEighteen, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndEighteen$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndEighteen' from JSON`,
);
}
/** @internal */
export const TwoHundredAndSeventeen$inboundSchema: z.ZodType<
TwoHundredAndSeventeen,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
requireVerifiedCommits: types.nullable(types.boolean()),
});
export function twoHundredAndSeventeenFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndSeventeen, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndSeventeen$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndSeventeen' from JSON`,
);
}
/** @internal */
export const CreateDeployments$inboundSchema: z.ZodNativeEnum<
typeof CreateDeployments
> = z.nativeEnum(CreateDeployments);
/** @internal */
export const TwoHundredAndSixteen$inboundSchema: z.ZodType<
TwoHundredAndSixteen,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
createDeployments: CreateDeployments$inboundSchema,
});
export function twoHundredAndSixteenFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndSixteen, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndSixteen$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndSixteen' from JSON`,
);
}
/** @internal */
export const TwoHundredAndFifteen$inboundSchema: z.ZodType<
TwoHundredAndFifteen,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
disableRepositoryDispatchEvents: types.boolean(),
});
export function twoHundredAndFifteenFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndFifteen, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndFifteen$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndFifteen' from JSON`,
);
}
/** @internal */
export const TwoHundredAndFourteen$inboundSchema: z.ZodType<
TwoHundredAndFourteen,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
onCommit: types.boolean(),
});
export function twoHundredAndFourteenFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndFourteen, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndFourteen$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndFourteen' from JSON`,
);
}
/** @internal */
export const TwoHundredAndThirteen$inboundSchema: z.ZodType<
TwoHundredAndThirteen,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
onPullRequest: types.boolean(),
});
export function twoHundredAndThirteenFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndThirteen, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndThirteen$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndThirteen' from JSON`,
);
}
/** @internal */
export const GitProvider$inboundSchema: z.ZodNativeEnum<typeof GitProvider> = z
.nativeEnum(GitProvider);
/** @internal */
export const TwoHundredAndTwelve$inboundSchema: z.ZodType<
TwoHundredAndTwelve,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
gitProvider: GitProvider$inboundSchema,
gitRepoId: types.string(),
gitRepositoryName: types.string(),
});
export function twoHundredAndTwelveFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndTwelve, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndTwelve$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndTwelve' from JSON`,
);
}
/** @internal */
export const UserEventPayloadGitProvider$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayloadGitProvider
> = z.nativeEnum(UserEventPayloadGitProvider);
/** @internal */
export const UserEventPayload211Previous$inboundSchema: z.ZodType<
UserEventPayload211Previous,
z.ZodTypeDef,
unknown
> = z.object({
gitProvider: UserEventPayloadGitProvider$inboundSchema,
gitRepoId: types.string(),
gitRepositoryName: types.string(),
});
export function userEventPayload211PreviousFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload211Previous, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload211Previous$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload211Previous' from JSON`,
);
}
/** @internal */
export const PayloadGitProvider$inboundSchema: z.ZodNativeEnum<
typeof PayloadGitProvider
> = z.nativeEnum(PayloadGitProvider);
/** @internal */
export const UserEventPayload211Next$inboundSchema: z.ZodType<
UserEventPayload211Next,
z.ZodTypeDef,
unknown
> = z.object({
gitProvider: PayloadGitProvider$inboundSchema,
gitRepoId: types.string(),
gitRepositoryName: types.string(),
});
export function userEventPayload211NextFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload211Next, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload211Next$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload211Next' from JSON`,
);
}
/** @internal */
export const TwoHundredAndEleven$inboundSchema: z.ZodType<
TwoHundredAndEleven,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
previous: types.optional(
z.lazy(() => UserEventPayload211Previous$inboundSchema),
),
next: z.lazy(() => UserEventPayload211Next$inboundSchema),
});
export function twoHundredAndElevenFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndEleven, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndEleven$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndEleven' from JSON`,
);
}
/** @internal */
export const TwoHundredAndTen$inboundSchema: z.ZodType<
TwoHundredAndTen,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
newProjectName: types.string(),
});
export function twoHundredAndTenFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndTen, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndTen$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndTen' from JSON`,
);
}
/** @internal */
export const TwoHundredAndNine$inboundSchema: z.ZodType<
TwoHundredAndNine,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
previewDeploymentSuffix: types.nullable(types.string()),
});
export function twoHundredAndNineFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndNine, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndNine$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndNine' from JSON`,
);
}
/** @internal */
export const UserEventPayload208Previous$inboundSchema: z.ZodType<
UserEventPayload208Previous,
z.ZodTypeDef,
unknown
> = z.object({
functionZeroConfigFailover: types.nullable(types.boolean()),
});
export function userEventPayload208PreviousFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload208Previous, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload208Previous$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload208Previous' from JSON`,
);
}
/** @internal */
export const UserEventPayload208Next$inboundSchema: z.ZodType<
UserEventPayload208Next,
z.ZodTypeDef,
unknown
> = z.object({
functionZeroConfigFailover: types.boolean(),
});
export function userEventPayload208NextFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload208Next, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload208Next$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload208Next' from JSON`,
);
}
/** @internal */
export const TwoHundredAndEight$inboundSchema: z.ZodType<
TwoHundredAndEight,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
previous: z.lazy(() => UserEventPayload208Previous$inboundSchema),
next: z.lazy(() => UserEventPayload208Next$inboundSchema),
});
export function twoHundredAndEightFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndEight, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndEight$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndEight' from JSON`,
);
}
/** @internal */
export const UserEventPayload207Previous$inboundSchema: z.ZodType<
UserEventPayload207Previous,
z.ZodTypeDef,
unknown
> = z.object({
functionDefaultRegions: types.nullable(z.array(types.string())),
});
export function userEventPayload207PreviousFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload207Previous, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload207Previous$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload207Previous' from JSON`,
);
}
/** @internal */
export const UserEventPayload207Next$inboundSchema: z.ZodType<
UserEventPayload207Next,
z.ZodTypeDef,
unknown
> = z.object({
functionDefaultRegions: z.array(types.string()),
});
export function userEventPayload207NextFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload207Next, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload207Next$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload207Next' from JSON`,
);
}
/** @internal */
export const TwoHundredAndSeven$inboundSchema: z.ZodType<
TwoHundredAndSeven,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
previous: z.lazy(() => UserEventPayload207Previous$inboundSchema),
next: z.lazy(() => UserEventPayload207Next$inboundSchema),
});
export function twoHundredAndSevenFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndSeven, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndSeven$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndSeven' from JSON`,
);
}
/** @internal */
export const UserEventPayload206Previous$inboundSchema: z.ZodType<
UserEventPayload206Previous,
z.ZodTypeDef,
unknown
> = z.object({
functionDefaultMemoryType: types.nullable(types.string()),
});
export function userEventPayload206PreviousFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload206Previous, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload206Previous$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload206Previous' from JSON`,
);
}
/** @internal */
export const UserEventPayload206Next$inboundSchema: z.ZodType<
UserEventPayload206Next,
z.ZodTypeDef,
unknown
> = z.object({
functionDefaultMemoryType: types.string(),
});
export function userEventPayload206NextFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload206Next, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload206Next$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload206Next' from JSON`,
);
}
/** @internal */
export const TwoHundredAndSix$inboundSchema: z.ZodType<
TwoHundredAndSix,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
previous: z.lazy(() => UserEventPayload206Previous$inboundSchema),
next: z.lazy(() => UserEventPayload206Next$inboundSchema),
});
export function twoHundredAndSixFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndSix, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndSix$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndSix' from JSON`,
);
}
/** @internal */
export const UserEventPayload205Previous$inboundSchema: z.ZodType<
UserEventPayload205Previous,
z.ZodTypeDef,
unknown
> = z.object({
functionDefaultTimeout: types.nullable(types.number()),
});
export function userEventPayload205PreviousFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload205Previous, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload205Previous$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload205Previous' from JSON`,
);
}
/** @internal */
export const UserEventPayload205Next$inboundSchema: z.ZodType<
UserEventPayload205Next,
z.ZodTypeDef,
unknown
> = z.object({
functionDefaultTimeout: types.number(),
});
export function userEventPayload205NextFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload205Next, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload205Next$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload205Next' from JSON`,
);
}
/** @internal */
export const TwoHundredAndFive$inboundSchema: z.ZodType<
TwoHundredAndFive,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
previous: z.lazy(() => UserEventPayload205Previous$inboundSchema),
next: z.lazy(() => UserEventPayload205Next$inboundSchema),
});
export function twoHundredAndFiveFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndFive, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndFive$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndFive' from JSON`,
);
}
/** @internal */
export const TwoHundredAndFour$inboundSchema: z.ZodType<
TwoHundredAndFour,
z.ZodTypeDef,
unknown
> = z.object({
projectName: types.optional(types.string()),
projectId: types.string(),
enableFunctionsBeta: types.boolean(),
});
export function twoHundredAndFourFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndFour, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndFour$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndFour' from JSON`,
);
}
/** @internal */
export const TwoHundredAndThree$inboundSchema: z.ZodType<
TwoHundredAndThree,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
customEnvironmentId: types.string(),
customEnvironmentSlug: types.string(),
});
export function twoHundredAndThreeFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndThree, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndThree$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndThree' from JSON`,
);
}
/** @internal */
export const UserEventPayload202Type$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload202Type
> = z.nativeEnum(UserEventPayload202Type);
/** @internal */
export const BranchMatcher$inboundSchema: z.ZodType<
BranchMatcher,
z.ZodTypeDef,
unknown
> = z.object({
type: UserEventPayload202Type$inboundSchema,
pattern: types.string(),
});
export function branchMatcherFromJSON(
jsonString: string,
): SafeParseResult<BranchMatcher, SDKValidationError> {
return safeParse(
jsonString,
(x) => BranchMatcher$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'BranchMatcher' from JSON`,
);
}
/** @internal */
export const UserEventPayload202Previous$inboundSchema: z.ZodType<
UserEventPayload202Previous,
z.ZodTypeDef,
unknown
> = z.object({
branchMatcher: types.optional(z.lazy(() => BranchMatcher$inboundSchema)),
});
export function userEventPayload202PreviousFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload202Previous, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload202Previous$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload202Previous' from JSON`,
);
}
/** @internal */
export const UserEventPayload202NextType$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload202NextType
> = z.nativeEnum(UserEventPayload202NextType);
/** @internal */
export const PayloadBranchMatcher$inboundSchema: z.ZodType<
PayloadBranchMatcher,
z.ZodTypeDef,
unknown
> = z.object({
type: UserEventPayload202NextType$inboundSchema,
pattern: types.string(),
});
export function payloadBranchMatcherFromJSON(
jsonString: string,
): SafeParseResult<PayloadBranchMatcher, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadBranchMatcher$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadBranchMatcher' from JSON`,
);
}
/** @internal */
export const UserEventPayload202Next$inboundSchema: z.ZodType<
UserEventPayload202Next,
z.ZodTypeDef,
unknown
> = z.object({
branchMatcher: types.optional(
z.lazy(() => PayloadBranchMatcher$inboundSchema),
),
});
export function userEventPayload202NextFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload202Next, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload202Next$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload202Next' from JSON`,
);
}
/** @internal */
export const TwoHundredAndTwo$inboundSchema: z.ZodType<
TwoHundredAndTwo,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
customEnvironmentId: types.string(),
customEnvironmentSlug: types.string(),
previous: z.lazy(() => UserEventPayload202Previous$inboundSchema),
next: z.lazy(() => UserEventPayload202Next$inboundSchema),
});
export function twoHundredAndTwoFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndTwo, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndTwo$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndTwo' from JSON`,
);
}
/** @internal */
export const TwoHundredAndOne$inboundSchema: z.ZodType<
TwoHundredAndOne,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
previewDeploymentsEnabled: types.boolean(),
});
export function twoHundredAndOneFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndOne, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndOne$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndOne' from JSON`,
);
}
/** @internal */
export const TwoHundred$inboundSchema: z.ZodType<
TwoHundred,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
autoAssignCustomDomains: types.boolean(),
});
export function twoHundredFromJSON(
jsonString: string,
): SafeParseResult<TwoHundred, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundred$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundred' from JSON`,
);
}
/** @internal */
export const BuildQueueConfiguration$inboundSchema: z.ZodNativeEnum<
typeof BuildQueueConfiguration
> = z.nativeEnum(BuildQueueConfiguration);
/** @internal */
export const OldBuildQueueConfiguration$inboundSchema: z.ZodNativeEnum<
typeof OldBuildQueueConfiguration
> = z.nativeEnum(OldBuildQueueConfiguration);
/** @internal */
export const OneHundredAndNinetyNine$inboundSchema: z.ZodType<
OneHundredAndNinetyNine,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
elasticConcurrencyEnabled: types.boolean(),
oldElasticConcurrencyEnabled: types.boolean(),
buildQueueConfiguration: types.optional(
BuildQueueConfiguration$inboundSchema,
),
oldBuildQueueConfiguration: types.optional(
OldBuildQueueConfiguration$inboundSchema,
),
});
export function oneHundredAndNinetyNineFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndNinetyNine, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndNinetyNine$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndNinetyNine' from JSON`,
);
}
/** @internal */
export const OneHundredAndNinetyEight$inboundSchema: z.ZodType<
OneHundredAndNinetyEight,
z.ZodTypeDef,
unknown
> = z.object({
name: types.string(),
ownerId: types.string(),
});
export function oneHundredAndNinetyEightFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndNinetyEight, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndNinetyEight$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndNinetyEight' from JSON`,
);
}
/** @internal */
export const UserEventPayload197Action$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload197Action
> = z.nativeEnum(UserEventPayload197Action);
/** @internal */
export const OneHundredAndNinetySeven$inboundSchema: z.ZodType<
OneHundredAndNinetySeven,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
action: UserEventPayload197Action$inboundSchema,
});
export function oneHundredAndNinetySevenFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndNinetySeven, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndNinetySeven$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndNinetySeven' from JSON`,
);
}
/** @internal */
export const OneHundredAndNinetySix$inboundSchema: z.ZodType<
OneHundredAndNinetySix,
z.ZodTypeDef,
unknown
> = z.object({
projectName: types.optional(types.string()),
projectId: types.string(),
});
export function oneHundredAndNinetySixFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndNinetySix, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndNinetySix$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndNinetySix' from JSON`,
);
}
/** @internal */
export const UserEventPayload195Team$inboundSchema: z.ZodType<
UserEventPayload195Team,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
name: types.string(),
});
export function userEventPayload195TeamFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload195Team, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload195Team$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload195Team' from JSON`,
);
}
/** @internal */
export const EnvId2$inboundSchema: z.ZodNativeEnum<typeof EnvId2> = z
.nativeEnum(EnvId2);
/** @internal */
export const EnvId$inboundSchema: z.ZodType<EnvId, z.ZodTypeDef, unknown> =
smartUnion([types.string(), EnvId2$inboundSchema]);
export function envIdFromJSON(
jsonString: string,
): SafeParseResult<EnvId, SDKValidationError> {
return safeParse(
jsonString,
(x) => EnvId$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'EnvId' from JSON`,
);
}
/** @internal */
export const Aws$inboundSchema: z.ZodType<Aws, z.ZodTypeDef, unknown> = z
.object({
subnetIds: z.array(types.string()),
securityGroupId: types.optional(types.string()),
});
export function awsFromJSON(
jsonString: string,
): SafeParseResult<Aws, SDKValidationError> {
return safeParse(
jsonString,
(x) => Aws$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Aws' from JSON`,
);
}
/** @internal */
export const OldConnectConfigurations$inboundSchema: z.ZodType<
OldConnectConfigurations,
z.ZodTypeDef,
unknown
> = z.object({
envId: smartUnion([types.string(), EnvId2$inboundSchema]),
connectConfigurationId: types.string(),
dc: types.optional(types.string()),
passive: types.boolean(),
buildsEnabled: types.boolean(),
aws: types.optional(z.lazy(() => Aws$inboundSchema)),
createdAt: types.number(),
updatedAt: types.number(),
});
export function oldConnectConfigurationsFromJSON(
jsonString: string,
): SafeParseResult<OldConnectConfigurations, SDKValidationError> {
return safeParse(
jsonString,
(x) => OldConnectConfigurations$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OldConnectConfigurations' from JSON`,
);
}
/** @internal */
export const UserEventEnvId2$inboundSchema: z.ZodNativeEnum<
typeof UserEventEnvId2
> = z.nativeEnum(UserEventEnvId2);
/** @internal */
export const PayloadEnvId$inboundSchema: z.ZodType<
PayloadEnvId,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), UserEventEnvId2$inboundSchema]);
export function payloadEnvIdFromJSON(
jsonString: string,
): SafeParseResult<PayloadEnvId, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadEnvId$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadEnvId' from JSON`,
);
}
/** @internal */
export const PayloadAws$inboundSchema: z.ZodType<
PayloadAws,
z.ZodTypeDef,
unknown
> = z.object({
subnetIds: z.array(types.string()),
securityGroupId: types.optional(types.string()),
});
export function payloadAwsFromJSON(
jsonString: string,
): SafeParseResult<PayloadAws, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadAws$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadAws' from JSON`,
);
}
/** @internal */
export const NewConnectConfigurations$inboundSchema: z.ZodType<
NewConnectConfigurations,
z.ZodTypeDef,
unknown
> = z.object({
envId: smartUnion([types.string(), UserEventEnvId2$inboundSchema]),
connectConfigurationId: types.string(),
dc: types.optional(types.string()),
passive: types.boolean(),
buildsEnabled: types.boolean(),
aws: types.optional(z.lazy(() => PayloadAws$inboundSchema)),
createdAt: types.number(),
updatedAt: types.number(),
});
export function newConnectConfigurationsFromJSON(
jsonString: string,
): SafeParseResult<NewConnectConfigurations, SDKValidationError> {
return safeParse(
jsonString,
(x) => NewConnectConfigurations$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'NewConnectConfigurations' from JSON`,
);
}
/** @internal */
export const UserEventPayload195Project$inboundSchema: z.ZodType<
UserEventPayload195Project,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
name: types.optional(types.string()),
oldConnectConfigurations: types.nullable(
z.array(z.lazy(() => OldConnectConfigurations$inboundSchema)),
),
newConnectConfigurations: types.nullable(
z.array(z.lazy(() => NewConnectConfigurations$inboundSchema)),
),
});
export function userEventPayload195ProjectFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload195Project, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload195Project$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload195Project' from JSON`,
);
}
/** @internal */
export const OneHundredAndNinetyFive$inboundSchema: z.ZodType<
OneHundredAndNinetyFive,
z.ZodTypeDef,
unknown
> = z.object({
team: z.lazy(() => UserEventPayload195Team$inboundSchema),
project: z.lazy(() => UserEventPayload195Project$inboundSchema),
});
export function oneHundredAndNinetyFiveFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndNinetyFive, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndNinetyFive$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndNinetyFive' from JSON`,
);
}
/** @internal */
export const OneHundredAndNinetyFour$inboundSchema: z.ZodType<
OneHundredAndNinetyFour,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.optional(types.string()),
projectName: types.optional(types.string()),
target: types.optional(z.array(types.string())),
updated: types.optional(types.boolean()),
});
export function oneHundredAndNinetyFourFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndNinetyFour, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndNinetyFour$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndNinetyFour' from JSON`,
);
}
/** @internal */
export const OneHundredAndNinetyThree$inboundSchema: z.ZodType<
OneHundredAndNinetyThree,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.optional(types.string()),
projectName: types.optional(types.string()),
certId: types.optional(types.string()),
origin: types.optional(types.string()),
});
export function oneHundredAndNinetyThreeFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndNinetyThree, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndNinetyThree$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndNinetyThree' from JSON`,
);
}
/** @internal */
export const OneHundredAndNinetyTwo$inboundSchema: z.ZodType<
OneHundredAndNinetyTwo,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.optional(types.string()),
projectName: types.string(),
previousBuildMachineType: types.optional(types.string()),
nextBuildMachineType: types.string(),
previousBuildMachineSelection: types.string(),
nextBuildMachineSelection: types.string(),
isSystemInitiated: types.optional(types.boolean()),
});
export function oneHundredAndNinetyTwoFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndNinetyTwo, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndNinetyTwo$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndNinetyTwo' from JSON`,
);
}
/** @internal */
export const OneHundredAndNinetyOne$inboundSchema: z.ZodType<
OneHundredAndNinetyOne,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
sourceFilesOutsideRootDirectory: types.boolean(),
});
export function oneHundredAndNinetyOneFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndNinetyOne, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndNinetyOne$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndNinetyOne' from JSON`,
);
}
/** @internal */
export const OneHundredAndNinety$inboundSchema: z.ZodType<
OneHundredAndNinety,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
productionDeploymentsFastLane: types.boolean(),
});
export function oneHundredAndNinetyFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndNinety, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndNinety$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndNinety' from JSON`,
);
}
/** @internal */
export const UserEventPayload189Previous$inboundSchema: z.ZodType<
UserEventPayload189Previous,
z.ZodTypeDef,
unknown
> = z.object({});
export function userEventPayload189PreviousFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload189Previous, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload189Previous$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload189Previous' from JSON`,
);
}
/** @internal */
export const UserEventPayload189Next$inboundSchema: z.ZodType<
UserEventPayload189Next,
z.ZodTypeDef,
unknown
> = z.object({});
export function userEventPayload189NextFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload189Next, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload189Next$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload189Next' from JSON`,
);
}
/** @internal */
export const OneHundredAndEightyNine$inboundSchema: z.ZodType<
OneHundredAndEightyNine,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
previous: z.lazy(() => UserEventPayload189Previous$inboundSchema),
next: z.lazy(() => UserEventPayload189Next$inboundSchema),
});
export function oneHundredAndEightyNineFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndEightyNine, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndEightyNine$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndEightyNine' from JSON`,
);
}
/** @internal */
export const OneHundredAndEightyEight$inboundSchema: z.ZodType<
OneHundredAndEightyEight,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
enableExternalRewriteCaching: types.boolean(),
});
export function oneHundredAndEightyEightFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndEightyEight, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndEightyEight$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndEightyEight' from JSON`,
);
}
/** @internal */
export const OneHundredAndEightySeven$inboundSchema: z.ZodType<
OneHundredAndEightySeven,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
enableAffectedProjectsDeployments: types.boolean(),
});
export function oneHundredAndEightySevenFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndEightySeven, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndEightySeven$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndEightySeven' from JSON`,
);
}
/** @internal */
export const OneHundredAndEightySix$inboundSchema: z.ZodType<
OneHundredAndEightySix,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
avatar: z.nullable(types.string()).optional(),
});
export function oneHundredAndEightySixFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndEightySix, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndEightySix$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndEightySix' from JSON`,
);
}
/** @internal */
export const UserEventPayload185Action$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload185Action
> = z.nativeEnum(UserEventPayload185Action);
/** @internal */
export const OneHundredAndEightyFive$inboundSchema: z.ZodType<
OneHundredAndEightyFive,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
action: UserEventPayload185Action$inboundSchema,
isEnvVar: types.optional(types.boolean()),
note: types.optional(types.string()),
});
export function oneHundredAndEightyFiveFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndEightyFive, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndEightyFive$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndEightyFive' from JSON`,
);
}
/** @internal */
export const OneHundredAndEightyFour$inboundSchema: z.ZodType<
OneHundredAndEightyFour,
z.ZodTypeDef,
unknown
> = z.object({
projectName: types.optional(types.string()),
projectId: types.string(),
projectAnalytics: types.optional(z.record(z.any())),
prevProjectAnalytics: z.nullable(z.record(z.any())).optional(),
});
export function oneHundredAndEightyFourFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndEightyFour, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndEightyFour$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndEightyFour' from JSON`,
);
}
/** @internal */
export const ProjectAnalytics$inboundSchema: z.ZodType<
ProjectAnalytics,
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 projectAnalyticsFromJSON(
jsonString: string,
): SafeParseResult<ProjectAnalytics, SDKValidationError> {
return safeParse(
jsonString,
(x) => ProjectAnalytics$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ProjectAnalytics' from JSON`,
);
}
/** @internal */
export const PrevProjectAnalytics$inboundSchema: z.ZodType<
PrevProjectAnalytics,
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 prevProjectAnalyticsFromJSON(
jsonString: string,
): SafeParseResult<PrevProjectAnalytics, SDKValidationError> {
return safeParse(
jsonString,
(x) => PrevProjectAnalytics$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PrevProjectAnalytics' from JSON`,
);
}
/** @internal */
export const OneHundredAndEightyThree$inboundSchema: z.ZodType<
OneHundredAndEightyThree,
z.ZodTypeDef,
unknown
> = z.object({
projectName: types.optional(types.string()),
projectId: types.string(),
projectAnalytics: types.nullable(
z.lazy(() => ProjectAnalytics$inboundSchema),
),
prevProjectAnalytics: types.nullable(
z.lazy(() => PrevProjectAnalytics$inboundSchema),
),
});
export function oneHundredAndEightyThreeFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndEightyThree, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndEightyThree$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndEightyThree' from JSON`,
);
}
/** @internal */
export const OneHundredAndEightyTwo$inboundSchema: z.ZodType<
OneHundredAndEightyTwo,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
directoryListing: types.boolean(),
});
export function oneHundredAndEightyTwoFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndEightyTwo, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndEightyTwo$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndEightyTwo' from JSON`,
);
}
/** @internal */
export const OneHundredAndEightyOne$inboundSchema: z.ZodType<
OneHundredAndEightyOne,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.optional(types.string()),
projectName: types.string(),
branch: types.string(),
});
export function oneHundredAndEightyOneFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndEightyOne, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndEightyOne$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndEightyOne' from JSON`,
);
}
/** @internal */
export const PayloadPrivateLinkEndpoint$inboundSchema: z.ZodType<
PayloadPrivateLinkEndpoint,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
name: types.string(),
environmentIds: types.optional(z.array(types.string())),
privateDnsNames: types.optional(z.array(types.string())),
});
export function payloadPrivateLinkEndpointFromJSON(
jsonString: string,
): SafeParseResult<PayloadPrivateLinkEndpoint, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadPrivateLinkEndpoint$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadPrivateLinkEndpoint' from JSON`,
);
}
/** @internal */
export const PreviousEndpoint$inboundSchema: z.ZodType<
PreviousEndpoint,
z.ZodTypeDef,
unknown
> = z.object({
name: types.string(),
environmentIds: types.optional(z.array(types.string())),
privateDnsNames: types.optional(z.array(types.string())),
});
export function previousEndpointFromJSON(
jsonString: string,
): SafeParseResult<PreviousEndpoint, SDKValidationError> {
return safeParse(
jsonString,
(x) => PreviousEndpoint$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PreviousEndpoint' from JSON`,
);
}
/** @internal */
export const OneHundredAndEighty$inboundSchema: z.ZodType<
OneHundredAndEighty,
z.ZodTypeDef,
unknown
> = z.object({
privateLinkEndpoint: z.lazy(() => PayloadPrivateLinkEndpoint$inboundSchema),
projectId: types.string(),
previousEndpoint: z.lazy(() => PreviousEndpoint$inboundSchema),
});
export function oneHundredAndEightyFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndEighty, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndEighty$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndEighty' from JSON`,
);
}
/** @internal */
export const UserEventPayloadPrev$inboundSchema: z.ZodType<
UserEventPayloadPrev,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
name: types.string(),
projectId: types.string(),
vercelRegion: types.string(),
awsServiceName: types.string(),
privateDnsNames: types.optional(z.array(types.string())),
});
export function userEventPayloadPrevFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayloadPrev, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayloadPrev$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayloadPrev' from JSON`,
);
}
/** @internal */
export const Current$inboundSchema: z.ZodType<Current, z.ZodTypeDef, unknown> =
z.object({
id: types.string(),
name: types.string(),
projectId: types.string(),
vercelRegion: types.string(),
awsServiceName: types.string(),
privateDnsNames: types.optional(z.array(types.string())),
});
export function currentFromJSON(
jsonString: string,
): SafeParseResult<Current, SDKValidationError> {
return safeParse(
jsonString,
(x) => Current$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Current' from JSON`,
);
}
/** @internal */
export const OneHundredAndSeventyNine$inboundSchema: z.ZodType<
OneHundredAndSeventyNine,
z.ZodTypeDef,
unknown
> = z.object({
prev: z.lazy(() => UserEventPayloadPrev$inboundSchema),
current: z.lazy(() => Current$inboundSchema),
});
export function oneHundredAndSeventyNineFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndSeventyNine, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndSeventyNine$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndSeventyNine' from JSON`,
);
}
/** @internal */
export const PrivateLinkEndpoint$inboundSchema: z.ZodType<
PrivateLinkEndpoint,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
name: types.string(),
});
export function privateLinkEndpointFromJSON(
jsonString: string,
): SafeParseResult<PrivateLinkEndpoint, SDKValidationError> {
return safeParse(
jsonString,
(x) => PrivateLinkEndpoint$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PrivateLinkEndpoint' from JSON`,
);
}
/** @internal */
export const OneHundredAndSeventyEight$inboundSchema: z.ZodType<
OneHundredAndSeventyEight,
z.ZodTypeDef,
unknown
> = z.object({
privateLinkEndpoint: z.lazy(() => PrivateLinkEndpoint$inboundSchema),
projectId: types.string(),
});
export function oneHundredAndSeventyEightFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndSeventyEight, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndSeventyEight$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndSeventyEight' from JSON`,
);
}
/** @internal */
export const Endpoint$inboundSchema: z.ZodType<
Endpoint,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
name: types.string(),
projectId: types.string(),
vercelRegion: types.string(),
awsServiceName: types.string(),
privateDnsNames: types.optional(z.array(types.string())),
});
export function endpointFromJSON(
jsonString: string,
): SafeParseResult<Endpoint, SDKValidationError> {
return safeParse(
jsonString,
(x) => Endpoint$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Endpoint' from JSON`,
);
}
/** @internal */
export const OneHundredAndSeventySeven$inboundSchema: z.ZodType<
OneHundredAndSeventySeven,
z.ZodTypeDef,
unknown
> = z.object({
endpoint: z.lazy(() => Endpoint$inboundSchema),
});
export function oneHundredAndSeventySevenFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndSeventySeven, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndSeventySeven$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndSeventySeven' from JSON`,
);
}
/** @internal */
export const OneHundredAndSeventySix$inboundSchema: z.ZodType<
OneHundredAndSeventySix,
z.ZodTypeDef,
unknown
> = z.object({
previewDeploymentSuffix: z.nullable(types.string()).optional(),
previousPreviewDeploymentSuffix: z.nullable(types.string()).optional(),
});
export function oneHundredAndSeventySixFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndSeventySix, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndSeventySix$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndSeventySix' from JSON`,
);
}
/** @internal */
export const OneHundredAndSeventyFive$inboundSchema: z.ZodType<
OneHundredAndSeventyFive,
z.ZodTypeDef,
unknown
> = z.object({
price: types.optional(types.number()),
currency: types.optional(types.string()),
enabled: types.optional(types.boolean()),
});
export function oneHundredAndSeventyFiveFromJSON(
jsonString: string,
): SafeParseResult<OneHundredAndSeventyFive, SDKValidationError> {
return safeParse(
jsonString,
(x) => OneHundredAndSeventyFive$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OneHundredAndSeventyFive' from JSON`,
);
}
/** @internal */
export const UserEventPayload174Role$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload174Role
> = z.nativeEnum(UserEventPayload174Role);
/** @internal */
export const UserEventPayloadOrigin$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayloadOrigin
> = z.nativeEnum(UserEventPayloadOrigin);
/** @internal */
export const PayloadGitUserId$inboundSchema: z.ZodType<
PayloadGitUserId,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number()]);
export function payloadGitUserIdFromJSON(
jsonString: string,
): SafeParseResult<PayloadGitUserId, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadGitUserId$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadGitUserId' from JSON`,
);
}
/** @internal */
export const PayloadJoinedFrom$inboundSchema: z.ZodType<
PayloadJoinedFrom,
z.ZodTypeDef,
unknown
> = z.object({
origin: UserEventPayloadOrigin$inboundSchema,
commitId: types.optional(types.string()),
repoId: types.optional(types.string()),
repoPath: types.optional(types.string()),
gitUserId: types.optional(smartUnion([types.string(), types.number()])),
gitUserLogin: types.optional(types.string()),
ssoUserId: types.optional(types.string()),
ssoConnectedAt: types.optional(types.number()),
idpUserId: types.optional(types.string()),
dsyncUserId: types.optional(types.string()),
dsyncConnectedAt: types.optional(types.number()),
});
export function payloadJoinedFromFromJSON(
jsonString: string,
): SafeParseResult<PayloadJoinedFrom, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadJoinedFrom$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadJoinedFrom' from JSON`,
);
}
/** @internal */
export const RemovedUsers$inboundSchema: z.ZodType<
RemovedUsers,
z.ZodTypeDef,
unknown
> = z.object({
role: UserEventPayload174Role$inboundSchema,
confirmed: types.boolean(),
confirmedAt: types.optional(types.number()),
joinedFrom: types.optional(z.lazy(() => PayloadJoinedFrom$inboundSchema)),
});
export function removedUsersFromJSON(
jsonString: string,
): SafeParseResult<RemovedUsers, SDKValidationError> {
return safeParse(
jsonString,
(x) => RemovedUsers$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'RemovedUsers' from JSON`,
);
}