@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>
3,985 lines • 107 kB
text/typescript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod/v3";
import { remap as remap$ } from "../lib/primitives.js";
import { safeParse } from "../lib/schemas.js";
import { ClosedEnum } from "../types/enums.js";
import { Result as SafeParseResult } from "../types/fp.js";
import * as types from "../types/primitives.js";
import { smartUnion } from "../types/smartUnion.js";
import { SDKValidationError } from "./sdkvalidationerror.js";
import {
UserEventPayload340Budget,
UserEventPayload340Budget$inboundSchema,
} from "./usereventpayload340budget.js";
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndForty = {
budget: UserEventPayload340Budget;
};
export type UserEventPayload339Previous = {
sampleRatePercent: number | null;
spendLimitInDollars: number | null;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndThirtyNine = {
projectId?: string | undefined;
projectName?: string | undefined;
analyticsId?: string | undefined;
sampleRatePercent: number | null;
spendLimitInDollars: number | null;
previous: UserEventPayload339Previous;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndThirtyEight = {
email: string;
gitlabLogin: string;
gitlabEmail: string;
gitlabName: string;
zeitAccount: string;
zeitAccountType: string;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndThirtySeven = {
email: string;
githubLogin: string;
zeitAccount: string;
zeitAccountType: string;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndThirtySix = {
email: string;
bitbucketLogin: string;
bitbucketEmail: string;
bitbucketName: string;
zeitAccount: string;
zeitAccountType: string;
};
export type UserEventPayload335Names = {
en: string;
};
export type PayloadCity = {
names: UserEventPayload335Names;
};
export type UserEventPayload335GeolocationNames = {
en: string;
};
export type PayloadCountry = {
names: UserEventPayload335GeolocationNames;
};
export type UserEventPayload335GeolocationMostSpecificSubdivisionNames = {
en: string;
};
export type PayloadMostSpecificSubdivision = {
names: UserEventPayload335GeolocationMostSpecificSubdivisionNames;
};
export type PayloadGeolocation = {
city?: PayloadCity | undefined;
country: PayloadCountry;
mostSpecificSubdivision?: PayloadMostSpecificSubdivision | undefined;
regionName?: string | undefined;
};
export const FactorsOrigin = {
Apple: "apple",
Bitbucket: "bitbucket",
Chatgpt: "chatgpt",
Email: "email",
Github: "github",
Gitlab: "gitlab",
Google: "google",
Otp: "otp",
Saml: "saml",
} as const;
export type FactorsOrigin = ClosedEnum<typeof FactorsOrigin>;
export type UserEventFactors1 = {
origin: FactorsOrigin;
username?: string | undefined;
teamId?: string | undefined;
legacy?: boolean | undefined;
ssoType?: string | undefined;
};
export type PayloadFactors = UserEventFactors1;
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndThirtyFive = {
userAgent?: string | undefined;
geolocation?: PayloadGeolocation | null | undefined;
env?: string | undefined;
os?: string | undefined;
username?: string | undefined;
ssoType?: string | undefined;
factors?: Array<UserEventFactors1> | undefined;
viaOTP?: boolean | undefined;
viaGithub?: boolean | undefined;
viaGitlab?: boolean | undefined;
viaBitbucket?: boolean | undefined;
viaGoogle?: boolean | undefined;
viaApple?: boolean | undefined;
viaSamlSso?: boolean | undefined;
viaPasskey?: boolean | undefined;
};
export type ScalingRules = {
min: number;
max: number;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndThirtyFour = {
scalingRules: { [k: string]: ScalingRules };
min: number;
max: number;
url: string;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndThirtyThree = {
bio: string;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndThirtyTwo = {
enabled: boolean;
updatedAt: number;
firstEnabledAt?: number | undefined;
projectId?: string | undefined;
projectName?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndThirtyOne = {
oldName: string;
newName: string;
uid?: string | undefined;
};
export type Name2 = {
name: string;
};
export type PayloadName = Name2 | string;
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndThirty = {
uid: string;
name: Name2 | string;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndTwentyNine = {
email: string;
};
export const UserEventPayloadActorType = {
Admin: "admin",
} as const;
export type UserEventPayloadActorType = ClosedEnum<
typeof UserEventPayloadActorType
>;
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndTwentyEight = {
email: string;
verified: boolean;
/**
* Okta user id.
*/
actorId: string;
actorType: UserEventPayloadActorType;
actorName?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndTwentySeven = {
email: string;
verified: boolean;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndTwentySix = {
instances: number;
url: string;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndTwentyFive = {
projectId: string;
projectName: string;
snapshotId: string;
targetRegions: Array<string>;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndTwentyFour = {
driveName: string;
projectId: string;
projectName: string;
region: string;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndTwentyThree = {
alias: string;
sandboxName: string;
sandboxId?: string | undefined;
projectId?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndTwentyTwo = {
connectionId: string;
connectionType: string;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndTwentyOne = {
gitProvider: string;
gitProviderGroupDescriptor: string;
gitScope: string;
};
export type ProjectWebAnalytics = {
id: string;
disabledAt?: number | undefined;
canceledAt?: number | undefined;
enabledAt?: number | undefined;
hasData?: true | undefined;
};
export type PrevProjectWebAnalytics = {
id: string;
disabledAt?: number | undefined;
canceledAt?: number | undefined;
enabledAt?: number | undefined;
hasData?: true | undefined;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndTwenty = {
projectId: string;
projectName: string;
projectWebAnalytics?: ProjectWebAnalytics | undefined;
prevProjectWebAnalytics?: PrevProjectWebAnalytics | null | undefined;
};
export const PayloadReasonCode = {
Backoffice: "BACKOFFICE",
PublicApi: "PUBLIC_API",
} as const;
export type PayloadReasonCode = ClosedEnum<typeof PayloadReasonCode>;
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndNineteen = {
projectId: string;
/**
* Display name for Activity links. Optional for events stored before it was published.
*/
projectName?: string | undefined;
reasonCode?: PayloadReasonCode | undefined;
};
export type AddedProjects = {
id: string;
name: string;
};
export type RemovedProjects = {
id: string;
name: string;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndEighteen = {
projectId: string;
projectName: string;
enableVercelCiSameRepository?: boolean | undefined;
addedProjects: Array<AddedProjects>;
removedProjects: Array<RemovedProjects>;
addedProviders: Array<string>;
removedProviders: Array<string>;
};
export const TrustedIps = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
Production: "production",
} as const;
export type TrustedIps = ClosedEnum<typeof TrustedIps>;
export const OldTrustedIps = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
Production: "production",
} as const;
export type OldTrustedIps = ClosedEnum<typeof OldTrustedIps>;
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndSeventeen = {
projectId: string;
projectName: string;
trustedIps?: TrustedIps | null | undefined;
oldTrustedIps?: OldTrustedIps | null | undefined;
addedAddresses?: Array<string> | null | undefined;
removedAddresses?: Array<string> | null | undefined;
};
export type StaticIps = {
builds?: boolean | undefined;
buildRegion?: string | undefined;
enabled: boolean;
regions?: Array<string> | undefined;
};
export type UserEventPayload316Project = {
id?: string | undefined;
staticIps: StaticIps;
};
export type UserEventPayload316Next = {
project: UserEventPayload316Project;
};
export type PayloadStaticIps = {
builds?: boolean | undefined;
buildRegion?: string | undefined;
enabled: boolean;
regions?: Array<string> | undefined;
};
export type UserEventPayload316PreviousProject = {
id?: string | undefined;
staticIps: PayloadStaticIps;
};
export type UserEventPayload316Previous = {
project: UserEventPayload316PreviousProject;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndSixteen = {
projectId: string;
projectName: string;
next: UserEventPayload316Next;
previous: UserEventPayload316Previous;
};
export const SsoProtection2 = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
} as const;
export type SsoProtection2 = ClosedEnum<typeof SsoProtection2>;
export const SsoProtectionDeploymentType = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
} as const;
export type SsoProtectionDeploymentType = ClosedEnum<
typeof SsoProtectionDeploymentType
>;
export const Cve55182MigrationAppliedFrom = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
} as const;
export type Cve55182MigrationAppliedFrom = ClosedEnum<
typeof Cve55182MigrationAppliedFrom
>;
export const April2026SecurityIncidentMigrationAppliedFrom = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
} as const;
export type April2026SecurityIncidentMigrationAppliedFrom = ClosedEnum<
typeof April2026SecurityIncidentMigrationAppliedFrom
>;
export type SsoProtection1 = {
deploymentType: SsoProtectionDeploymentType;
cve55182MigrationAppliedFrom?:
| Cve55182MigrationAppliedFrom
| null
| undefined;
april2026SecurityIncidentMigrationAppliedFrom?:
| April2026SecurityIncidentMigrationAppliedFrom
| null
| undefined;
};
export type PayloadSsoProtection = SsoProtection1 | SsoProtection2;
export const OldSsoProtection2 = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
} as const;
export type OldSsoProtection2 = ClosedEnum<typeof OldSsoProtection2>;
export const OldSsoProtectionDeploymentType = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
} as const;
export type OldSsoProtectionDeploymentType = ClosedEnum<
typeof OldSsoProtectionDeploymentType
>;
export const OldSsoProtectionCve55182MigrationAppliedFrom = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
} as const;
export type OldSsoProtectionCve55182MigrationAppliedFrom = ClosedEnum<
typeof OldSsoProtectionCve55182MigrationAppliedFrom
>;
export const OldSsoProtectionApril2026SecurityIncidentMigrationAppliedFrom = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
} as const;
export type OldSsoProtectionApril2026SecurityIncidentMigrationAppliedFrom =
ClosedEnum<
typeof OldSsoProtectionApril2026SecurityIncidentMigrationAppliedFrom
>;
export type OldSsoProtection1 = {
deploymentType: OldSsoProtectionDeploymentType;
cve55182MigrationAppliedFrom?:
| OldSsoProtectionCve55182MigrationAppliedFrom
| null
| undefined;
april2026SecurityIncidentMigrationAppliedFrom?:
| OldSsoProtectionApril2026SecurityIncidentMigrationAppliedFrom
| null
| undefined;
};
export type OldSsoProtection = OldSsoProtection1 | OldSsoProtection2;
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndFifteen = {
projectId?: string | undefined;
projectName?: string | undefined;
ssoProtection: SsoProtection1 | SsoProtection2 | null;
oldSsoProtection: OldSsoProtection1 | OldSsoProtection2 | null;
};
export type UserEventPayload314Next = {
skewProtectionAllowedDomains: Array<string>;
};
export type UserEventPayload314Previous = {
skewProtectionAllowedDomains?: Array<string> | undefined;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndFourteen = {
projectId: string;
projectName: string;
next: UserEventPayload314Next;
previous: UserEventPayload314Previous;
};
export type UserEventPayload313Next = {
skewProtectionMaxAge: number;
};
export type UserEventPayload313Previous = {
skewProtectionMaxAge?: number | undefined;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndThirteen = {
projectId: string;
projectName: string;
next: UserEventPayload313Next;
previous: UserEventPayload313Previous;
};
export type UserEventPayload312Next = {
skewProtectionBoundaryAt: number;
};
export type UserEventPayload312Previous = {
skewProtectionBoundaryAt?: number | undefined;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndTwelve = {
projectId: string;
projectName: string;
next: UserEventPayload312Next;
previous: UserEventPayload312Previous;
};
export type UserEventPayload311Previous = {
expiration?: string | undefined;
expirationProduction?: string | undefined;
expirationCanceled?: string | undefined;
expirationErrored?: string | undefined;
};
export type UserEventPayload311Next = {
expiration?: string | undefined;
expirationProduction?: string | undefined;
expirationCanceled?: string | undefined;
expirationErrored?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndEleven = {
projectId?: string | undefined;
projectName?: string | undefined;
previous: UserEventPayload311Previous;
next: UserEventPayload311Next;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndTen = {
projectId: string;
projectName: string;
publicSource: boolean;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndNine = {
projectId: string;
projectName: string;
inheritDeploymentProtection: boolean;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndEight = {
projectId: string;
projectName: string;
protectedSourcemaps: boolean;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndSeven = {
projectId: string;
projectName: string;
gitForkProtection: boolean;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndSix = {
projectId: string;
projectName: string;
customerSupportCodeVisibility: boolean;
};
export const IssuerMode = {
Global: "global",
Team: "team",
} as const;
export type IssuerMode = ClosedEnum<typeof IssuerMode>;
export type UserEventPayload305Previous = {
issuerMode?: IssuerMode | undefined;
};
export const PayloadIssuerMode = {
Global: "global",
Team: "team",
} as const;
export type PayloadIssuerMode = ClosedEnum<typeof PayloadIssuerMode>;
export type UserEventPayload305Next = {
issuerMode: PayloadIssuerMode;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndFive = {
projectId: string;
projectName: string;
previous: UserEventPayload305Previous;
next: UserEventPayload305Next;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndFour = {
projectId: string;
projectName: string;
region?: string | undefined;
failoverRegions?: Array<string> | undefined;
};
export type UserEventPayload303Previous = {};
export type UserEventPayload303Next = {};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndThree = {
projectId: string;
projectName: string;
previous: UserEventPayload303Previous | null;
next: UserEventPayload303Next | null;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndTwo = {
projectId: string;
projectName: string;
targetDeploymentId?: string | undefined;
action?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundredAndOne = {
projectId: string;
projectName: string;
targetDeploymentId?: string | undefined;
newTargetPercentage?: number | undefined;
};
/**
* The payload of the event, if requested.
*/
export type ThreeHundred = {
projectId: string;
projectName: string;
targetDeploymentId?: string | undefined;
};
/**
* Description of why a project was rolled back, and by whom. Note that lastAliasRequest contains the from/to details of the rollback.
*/
export type RollbackDescription = {
/**
* The user who rolled back the project.
*/
userId: string;
/**
* The username of the user who rolled back the project.
*/
username: string;
/**
* User-supplied explanation of why they rolled back the project. Limited to 250 characters.
*/
description: string;
/**
* Timestamp of when the rollback was requested.
*/
createdAt: number;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndNinetyNine = {
projectId: string;
projectName: string;
projectAccountId: string;
deploymentId: string;
/**
* Description of why a project was rolled back, and by whom. Note that lastAliasRequest contains the from/to details of the rollback.
*/
rollbackDescription?: RollbackDescription | undefined;
};
export const Consent = {
Granted: "granted",
Refused: "refused",
} as const;
export type Consent = ClosedEnum<typeof Consent>;
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndNinetyEight = {
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 TwoHundredAndNinetySeven = {
projectId: string;
/**
* Display name for Activity links. Optional for events stored before it was published.
*/
projectName?: string | undefined;
reasonCode?: ReasonCode | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndNinetySix = {
projectId: string;
expiresAt: number;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndNinetyFive = {
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 TwoHundredAndNinetyFour = {
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 TwoHundredAndNinetyThree = {
projectId: string;
projectName: string;
optionsAllowlist?: OptionsAllowlist | null | undefined;
oldOptionsAllowlist?: OldOptionsAllowlist | null | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndNinetyTwo = {
source: string;
projectId: string;
projectName: string;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndNinetyOne = {
previousProjectId?: string | undefined;
newProjectId?: string | undefined;
previousProjectName: string;
newProjectName: string;
destinationAccountName: string;
transferId?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndNinety = {
projectId: string;
projectName: string;
originAccountName: string;
destinationAccountName: string;
destinationAccountId: string;
transferId?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndEightyNine = {
previousProjectId?: string | undefined;
projectName: string;
destinationAccountName: string | null;
transferId?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndEightyEight = {
previousProjectId?: string | undefined;
newProjectId?: string | undefined;
previousProjectName: string;
newProjectName: string;
originAccountName: string;
transferId?: string | undefined;
};
export type UserEventPayload287Project = {
id: string;
name: string;
};
export const UserEventPayload287Role = {
Admin: "ADMIN",
ProjectDeveloper: "PROJECT_DEVELOPER",
ProjectGuest: "PROJECT_GUEST",
ProjectViewer: "PROJECT_VIEWER",
} as const;
export type UserEventPayload287Role = ClosedEnum<
typeof UserEventPayload287Role
>;
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?: UserEventPayload287Role | undefined;
uid?: string | undefined;
createdAt?: number | undefined;
username?: string | undefined;
previousRole?: PayloadPreviousRole | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndEightySeven = {
project: UserEventPayload287Project;
projectMembership: PayloadProjectMembership;
};
export type UserEventPayload286Project = {
name: string;
id?: string | undefined;
};
export const UserEventPayload286Role = {
Admin: "ADMIN",
ProjectDeveloper: "PROJECT_DEVELOPER",
ProjectGuest: "PROJECT_GUEST",
ProjectViewer: "PROJECT_VIEWER",
} as const;
export type UserEventPayload286Role = ClosedEnum<
typeof UserEventPayload286Role
>;
export type RemovedMembership = {
role: UserEventPayload286Role;
uid: string;
createdAt: number;
username?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndEightySix = {
project: UserEventPayload286Project;
removedMembership: RemovedMembership;
};
export const UserEventPayload285Role = {
Admin: "ADMIN",
ProjectDeveloper: "PROJECT_DEVELOPER",
ProjectGuest: "PROJECT_GUEST",
ProjectViewer: "PROJECT_VIEWER",
} as const;
export type UserEventPayload285Role = ClosedEnum<
typeof UserEventPayload285Role
>;
export type UserEventPayload285Project = {
name: string;
role: UserEventPayload285Role;
invitedUserName: string;
id?: string | undefined;
invitedUserId?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndEightyFive = {
project: UserEventPayload285Project;
};
export type UserEventPayload284Project = {
name: string;
id?: string | undefined;
};
export const UserEventPayload284Role = {
Admin: "ADMIN",
ProjectDeveloper: "PROJECT_DEVELOPER",
ProjectGuest: "PROJECT_GUEST",
ProjectViewer: "PROJECT_VIEWER",
} as const;
export type UserEventPayload284Role = ClosedEnum<
typeof UserEventPayload284Role
>;
export type ProjectMembership = {
role: UserEventPayload284Role;
uid: string;
createdAt: number;
username?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndEightyFour = {
project: UserEventPayload284Project;
projectMembership: ProjectMembership | null;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndEightyThree = {
projectId: string;
projectName: string;
target: string;
domain: string;
configuredBy?: string | null | undefined;
prevConfiguredBy?: string | null | 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 PayloadProjects = {
projectId: string;
role: UserEventPayloadRole;
membershipCreatedAt: number;
};
export type TeamMembership = {
uid: string;
username?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndEightyTwo = {
projects: Array<PayloadProjects>;
teamMembership?: TeamMembership | undefined;
directoryType?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndEightyOne = {
projectId: string;
projectName: string;
domain: string;
redirect?: string | null | undefined;
redirectStatusCode?: number | null | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndEighty = {
oldProjectId: string;
oldProjectName: string;
newProjectId: string;
newProjectName: string;
domain: string;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndSeventyNine = {
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 TwoHundredAndSeventyEight = {
projectId: string;
projectName: string;
domain: string;
target: string;
redirect: string | null;
redirectStatusCode: number | null;
gitBranch: string | null;
configuredBy?: string | undefined;
};
export type UserEventPayload277Previous = {
commandForIgnoringBuildStep?: string | undefined;
};
export type UserEventPayload277Next = {
commandForIgnoringBuildStep?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndSeventySeven = {
projectId: string;
projectName: string;
previous: UserEventPayload277Previous;
next: UserEventPayload277Next;
};
/** @internal */
export const ThreeHundredAndForty$inboundSchema: z.ZodType<
ThreeHundredAndForty,
z.ZodTypeDef,
unknown
> = z.object({
budget: UserEventPayload340Budget$inboundSchema,
});
export function threeHundredAndFortyFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndForty, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndForty$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndForty' from JSON`,
);
}
/** @internal */
export const UserEventPayload339Previous$inboundSchema: z.ZodType<
UserEventPayload339Previous,
z.ZodTypeDef,
unknown
> = z.object({
sampleRatePercent: types.nullable(types.number()),
spendLimitInDollars: types.nullable(types.number()),
});
export function userEventPayload339PreviousFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload339Previous, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload339Previous$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload339Previous' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndThirtyNine$inboundSchema: z.ZodType<
ThreeHundredAndThirtyNine,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.optional(types.string()),
projectName: types.optional(types.string()),
analyticsId: types.optional(types.string()),
sampleRatePercent: types.nullable(types.number()),
spendLimitInDollars: types.nullable(types.number()),
previous: z.lazy(() => UserEventPayload339Previous$inboundSchema),
});
export function threeHundredAndThirtyNineFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndThirtyNine, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndThirtyNine$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndThirtyNine' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndThirtyEight$inboundSchema: z.ZodType<
ThreeHundredAndThirtyEight,
z.ZodTypeDef,
unknown
> = z.object({
email: types.string(),
gitlabLogin: types.string(),
gitlabEmail: types.string(),
gitlabName: types.string(),
zeitAccount: types.string(),
zeitAccountType: types.string(),
});
export function threeHundredAndThirtyEightFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndThirtyEight, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndThirtyEight$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndThirtyEight' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndThirtySeven$inboundSchema: z.ZodType<
ThreeHundredAndThirtySeven,
z.ZodTypeDef,
unknown
> = z.object({
email: types.string(),
githubLogin: types.string(),
zeitAccount: types.string(),
zeitAccountType: types.string(),
});
export function threeHundredAndThirtySevenFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndThirtySeven, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndThirtySeven$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndThirtySeven' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndThirtySix$inboundSchema: z.ZodType<
ThreeHundredAndThirtySix,
z.ZodTypeDef,
unknown
> = z.object({
email: types.string(),
bitbucketLogin: types.string(),
bitbucketEmail: types.string(),
bitbucketName: types.string(),
zeitAccount: types.string(),
zeitAccountType: types.string(),
});
export function threeHundredAndThirtySixFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndThirtySix, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndThirtySix$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndThirtySix' from JSON`,
);
}
/** @internal */
export const UserEventPayload335Names$inboundSchema: z.ZodType<
UserEventPayload335Names,
z.ZodTypeDef,
unknown
> = z.object({
en: types.string(),
});
export function userEventPayload335NamesFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload335Names, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload335Names$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload335Names' from JSON`,
);
}
/** @internal */
export const PayloadCity$inboundSchema: z.ZodType<
PayloadCity,
z.ZodTypeDef,
unknown
> = z.object({
names: z.lazy(() => UserEventPayload335Names$inboundSchema),
});
export function payloadCityFromJSON(
jsonString: string,
): SafeParseResult<PayloadCity, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadCity$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadCity' from JSON`,
);
}
/** @internal */
export const UserEventPayload335GeolocationNames$inboundSchema: z.ZodType<
UserEventPayload335GeolocationNames,
z.ZodTypeDef,
unknown
> = z.object({
en: types.string(),
});
export function userEventPayload335GeolocationNamesFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload335GeolocationNames, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
UserEventPayload335GeolocationNames$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload335GeolocationNames' from JSON`,
);
}
/** @internal */
export const PayloadCountry$inboundSchema: z.ZodType<
PayloadCountry,
z.ZodTypeDef,
unknown
> = z.object({
names: z.lazy(() => UserEventPayload335GeolocationNames$inboundSchema),
});
export function payloadCountryFromJSON(
jsonString: string,
): SafeParseResult<PayloadCountry, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadCountry$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadCountry' from JSON`,
);
}
/** @internal */
export const UserEventPayload335GeolocationMostSpecificSubdivisionNames$inboundSchema:
z.ZodType<
UserEventPayload335GeolocationMostSpecificSubdivisionNames,
z.ZodTypeDef,
unknown
> = z.object({
en: types.string(),
});
export function userEventPayload335GeolocationMostSpecificSubdivisionNamesFromJSON(
jsonString: string,
): SafeParseResult<
UserEventPayload335GeolocationMostSpecificSubdivisionNames,
SDKValidationError
> {
return safeParse(
jsonString,
(x) =>
UserEventPayload335GeolocationMostSpecificSubdivisionNames$inboundSchema
.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload335GeolocationMostSpecificSubdivisionNames' from JSON`,
);
}
/** @internal */
export const PayloadMostSpecificSubdivision$inboundSchema: z.ZodType<
PayloadMostSpecificSubdivision,
z.ZodTypeDef,
unknown
> = z.object({
names: z.lazy(() =>
UserEventPayload335GeolocationMostSpecificSubdivisionNames$inboundSchema
),
});
export function payloadMostSpecificSubdivisionFromJSON(
jsonString: string,
): SafeParseResult<PayloadMostSpecificSubdivision, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadMostSpecificSubdivision$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadMostSpecificSubdivision' from JSON`,
);
}
/** @internal */
export const PayloadGeolocation$inboundSchema: z.ZodType<
PayloadGeolocation,
z.ZodTypeDef,
unknown
> = z.object({
city: types.optional(z.lazy(() => PayloadCity$inboundSchema)),
country: z.lazy(() => PayloadCountry$inboundSchema),
most_specific_subdivision: types.optional(
z.lazy(() => PayloadMostSpecificSubdivision$inboundSchema),
),
regionName: types.optional(types.string()),
}).transform((v) => {
return remap$(v, {
"most_specific_subdivision": "mostSpecificSubdivision",
});
});
export function payloadGeolocationFromJSON(
jsonString: string,
): SafeParseResult<PayloadGeolocation, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadGeolocation$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadGeolocation' from JSON`,
);
}
/** @internal */
export const FactorsOrigin$inboundSchema: z.ZodNativeEnum<
typeof FactorsOrigin
> = z.nativeEnum(FactorsOrigin);
/** @internal */
export const UserEventFactors1$inboundSchema: z.ZodType<
UserEventFactors1,
z.ZodTypeDef,
unknown
> = z.object({
origin: FactorsOrigin$inboundSchema,
username: types.optional(types.string()),
teamId: types.optional(types.string()),
legacy: types.optional(types.boolean()),
ssoType: types.optional(types.string()),
});
export function userEventFactors1FromJSON(
jsonString: string,
): SafeParseResult<UserEventFactors1, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventFactors1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventFactors1' from JSON`,
);
}
/** @internal */
export const PayloadFactors$inboundSchema: z.ZodType<
PayloadFactors,
z.ZodTypeDef,
unknown
> = z.lazy(() => UserEventFactors1$inboundSchema);
export function payloadFactorsFromJSON(
jsonString: string,
): SafeParseResult<PayloadFactors, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadFactors$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadFactors' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndThirtyFive$inboundSchema: z.ZodType<
ThreeHundredAndThirtyFive,
z.ZodTypeDef,
unknown
> = z.object({
userAgent: types.optional(types.string()),
geolocation: z.nullable(z.lazy(() => PayloadGeolocation$inboundSchema))
.optional(),
env: types.optional(types.string()),
os: types.optional(types.string()),
username: types.optional(types.string()),
ssoType: types.optional(types.string()),
factors: types.optional(
z.array(z.lazy(() => UserEventFactors1$inboundSchema)),
),
viaOTP: types.optional(types.boolean()),
viaGithub: types.optional(types.boolean()),
viaGitlab: types.optional(types.boolean()),
viaBitbucket: types.optional(types.boolean()),
viaGoogle: types.optional(types.boolean()),
viaApple: types.optional(types.boolean()),
viaSamlSso: types.optional(types.boolean()),
viaPasskey: types.optional(types.boolean()),
});
export function threeHundredAndThirtyFiveFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndThirtyFive, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndThirtyFive$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndThirtyFive' from JSON`,
);
}
/** @internal */
export const ScalingRules$inboundSchema: z.ZodType<
ScalingRules,
z.ZodTypeDef,
unknown
> = z.object({
min: types.number(),
max: types.number(),
});
export function scalingRulesFromJSON(
jsonString: string,
): SafeParseResult<ScalingRules, SDKValidationError> {
return safeParse(
jsonString,
(x) => ScalingRules$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ScalingRules' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndThirtyFour$inboundSchema: z.ZodType<
ThreeHundredAndThirtyFour,
z.ZodTypeDef,
unknown
> = z.object({
scalingRules: z.record(z.lazy(() => ScalingRules$inboundSchema)),
min: types.number(),
max: types.number(),
url: types.string(),
});
export function threeHundredAndThirtyFourFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndThirtyFour, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndThirtyFour$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndThirtyFour' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndThirtyThree$inboundSchema: z.ZodType<
ThreeHundredAndThirtyThree,
z.ZodTypeDef,
unknown
> = z.object({
bio: types.string(),
});
export function threeHundredAndThirtyThreeFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndThirtyThree, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndThirtyThree$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndThirtyThree' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndThirtyTwo$inboundSchema: z.ZodType<
ThreeHundredAndThirtyTwo,
z.ZodTypeDef,
unknown
> = z.object({
enabled: types.boolean(),
updatedAt: types.number(),
firstEnabledAt: types.optional(types.number()),
projectId: types.optional(types.string()),
projectName: types.optional(types.string()),
});
export function threeHundredAndThirtyTwoFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndThirtyTwo, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndThirtyTwo$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndThirtyTwo' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndThirtyOne$inboundSchema: z.ZodType<
ThreeHundredAndThirtyOne,
z.ZodTypeDef,
unknown
> = z.object({
oldName: types.string(),
newName: types.string(),
uid: types.optional(types.string()),
});
export function threeHundredAndThirtyOneFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndThirtyOne, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndThirtyOne$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndThirtyOne' from JSON`,
);
}
/** @internal */
export const Name2$inboundSchema: z.ZodType<Name2, z.ZodTypeDef, unknown> = z
.object({
name: types.string(),
});
export function name2FromJSON(
jsonString: string,
): SafeParseResult<Name2, SDKValidationError> {
return safeParse(
jsonString,
(x) => Name2$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Name2' from JSON`,
);
}
/** @internal */
export const PayloadName$inboundSchema: z.ZodType<
PayloadName,
z.ZodTypeDef,
unknown
> = smartUnion([z.lazy(() => Name2$inboundSchema), types.string()]);
export function payloadNameFromJSON(
jsonString: string,
): SafeParseResult<PayloadName, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadName$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadName' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndThirty$inboundSchema: z.ZodType<
ThreeHundredAndThirty,
z.ZodTypeDef,
unknown
> = z.object({
uid: types.string(),
name: smartUnion([z.lazy(() => Name2$inboundSchema), types.string()]),
});
export function threeHundredAndThirtyFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndThirty, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndThirty$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndThirty' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndTwentyNine$inboundSchema: z.ZodType<
ThreeHundredAndTwentyNine,
z.ZodTypeDef,
unknown
> = z.object({
email: types.string(),
});
export function threeHundredAndTwentyNineFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndTwentyNine, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndTwentyNine$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndTwentyNine' from JSON`,
);
}
/** @internal */
export const UserEventPayloadActorType$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayloadActorType
> = z.nativeEnum(UserEventPayloadActorType);
/** @internal */
export const ThreeHundredAndTwentyEight$inboundSchema: z.ZodType<
ThreeHundredAndTwentyEight,
z.ZodTypeDef,
unknown
> = z.object({
email: types.string(),
verified: types.boolean(),
actorId: types.string(),
actorType: UserEventPayloadActorType$inboundSchema,
actorName: types.optional(types.string()),
});
export function threeHundredAndTwentyEightFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndTwentyEight, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndTwentyEight$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndTwentyEight' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndTwentySeven$inboundSchema: z.ZodType<
ThreeHundredAndTwentySeven,
z.ZodTypeDef,
unknown
> = z.object({
email: types.string(),
verified: types.boolean(),
});
export function threeHundredAndTwentySevenFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndTwentySeven, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndTwentySeven$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndTwentySeven' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndTwentySix$inboundSchema: z.ZodType<
ThreeHundredAndTwentySix,
z.ZodTypeDef,
unknown
> = z.object({
instances: types.number(),
url: types.string(),
});
export function threeHundredAndTwentySixFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndTwentySix, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndTwentySix$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndTwentySix' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndTwentyFive$inboundSchema: z.ZodType<
ThreeHundredAndTwentyFive,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
snapshotId: types.string(),
targetRegions: z.array(types.string()),
});
export function threeHundredAndTwentyFiveFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndTwentyFive, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndTwentyFive$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndTwentyFive' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndTwentyFour$inboundSchema: z.ZodType<
ThreeHundredAndTwentyFour,
z.ZodTypeDef,
unknown
> = z.object({
driveName: types.string(),
projectId: types.string(),
projectName: types.string(),
region: types.string(),
});
export function threeHundredAndTwentyFourFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndTwentyFour, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndTwentyFour$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndTwentyFour' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndTwentyThree$inboundSchema: z.ZodType<
ThreeHundredAndTwentyThree,
z.ZodTypeDef,
unknown
> = z.object({
alias: types.string(),
sandboxName: types.string(),
sandboxId: types.optional(types.string()),
projectId: types.optional(types.string()),
});
export function threeHundredAndTwentyThreeFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndTwentyThree, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndTwentyThree$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndTwentyThree' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndTwentyTwo$inboundSchema: z.ZodType<
ThreeHundredAndTwentyTwo,
z.ZodTypeDef,
unknown
> = z.object({
connectionId: types.string(),
connectionType: types.string(),
});
export function threeHundredAndTwentyTwoFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndTwentyTwo, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndTwentyTwo$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndTwentyTwo' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndTwentyOne$inboundSchema: z.ZodType<
ThreeHundredAndTwentyOne,
z.ZodTypeDef,
unknown
> = z.object({
gitProvider: types.string(),
gitProviderGroupDescriptor: types.string(),
gitScope: types.string(),
});
export function threeHundredAndTwentyOneFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndTwentyOne, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndTwentyOne$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndTwentyOne' from JSON`,
);
}
/** @internal */
export const ProjectWebAnalytics$inboundSchema: z.ZodType<
ProjectWebAnalytics,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
disabledAt: types.optional(types.number()),
canceledAt: types.optional(types.number()),
enabledAt: types.optional(types.number()),
hasData: types.optional(types.literal(true)),
});
export function projectWebAnalyticsFromJSON(
jsonString: string,
): SafeParseResult<ProjectWebAnalytics, SDKValidationError> {
return safeParse(
jsonString,
(x) => ProjectWebAnalytics$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ProjectWebAnalytics' from JSON`,
);
}
/** @internal */
export const PrevProjectWebAnalytics$inboundSchema: z.ZodType<
PrevProjectWebAnalytics,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
disabledAt: types.optional(types.number()),
canceledAt: types.optional(types.number()),
enabledAt: types.optional(types.number()),
hasData: types.optional(types.literal(true)),
});
export function prevProjectWebAnalyticsFromJSON(
jsonString: string,
): SafeParseResult<PrevProjectWebAnalytics, SDKValidationError> {
return safeParse(
jsonString,
(x) => PrevProjectWebAnalytics$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PrevProjectWebAnalytics' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndTwenty$inboundSchema: z.ZodType<
ThreeHundredAndTwenty,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
projectWebAnalytics: types.optional(
z.lazy(() => ProjectWebAnalytics$inboundSchema),
),
prevProjectWebAnalytics: z.nullable(
z.lazy(() => PrevProjectWebAnalytics$inboundSchema),
).optional(),
});
export function threeHundredAndTwentyFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndTwenty, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndTwenty$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndTwenty' from JSON`,
);
}
/** @internal */
export const PayloadReasonCode$inboundSchema: z.ZodNativeEnum<
typeof PayloadReasonCode
> = z.nativeEnum(PayloadReasonCode);
/** @internal */
export const ThreeHundredAndNineteen$inboundSchema: z.ZodType<
ThreeHundredAndNineteen,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.optional(types.string()),
reasonCode: types.optional(PayloadReasonCode$inboundSchema),
});
export function threeHundredAndNineteenFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndNineteen, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndNineteen$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndNineteen' from JSON`,
);
}
/** @internal */
export const AddedProjects$inboundSchema: z.ZodType<
AddedProjects,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
name: types.string(),
});
export function addedProjectsFromJSON(
jsonString: string,
): SafeParseResult<AddedProjects, SDKValidationError> {
return safeParse(
jsonString,
(x) => AddedProjects$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'AddedProjects' from JSON`,
);
}
/** @internal */
export const RemovedProjects$inboundSchema: z.ZodType<
RemovedProjects,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
name: types.string(),
});
export function removedProjectsFromJSON(
jsonString: string,
): SafeParseResult<RemovedProjects, SDKValidationError> {
return safeParse(
jsonString,
(x) => RemovedProjects$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'RemovedProjects' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndEighteen$inboundSchema: z.ZodType<
ThreeHundredAndEighteen,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
enableVercelCiSameRepository: types.optional(types.boolean()),
addedProjects: z.array(z.lazy(() => AddedProjects$inboundSchema)),
removedProjects: z.array(z.lazy(() => RemovedProjects$inboundSchema)),
addedProviders: z.array(types.string()),
removedProviders: z.array(types.string()),
});
export function threeHundredAndEighteenFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndEighteen, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndEighteen$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndEighteen' from JSON`,
);
}
/** @internal */
export const TrustedIps$inboundSchema: z.ZodNativeEnum<typeof TrustedIps> = z
.nativeEnum(TrustedIps);
/** @internal */
export const OldTrustedIps$inboundSchema: z.ZodNativeEnum<
typeof OldTrustedIps
> = z.nativeEnum(OldTrustedIps);
/** @internal */
export const ThreeHundredAndSeventeen$inboundSchema: z.ZodType<
ThreeHundredAndSeventeen,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
trustedIps: z.nullable(TrustedIps$inboundSchema).optional(),
oldTrustedIps: z.nullable(OldTrustedIps$inboundSchema).optional(),
addedAddresses: z.nullable(z.array(types.string())).optional(),
removedAddresses: z.nullable(z.array(types.string())).optional(),
});
export function threeHundredAndSeventeenFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndSeventeen, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndSeventeen$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndSeventeen' from JSON`,
);
}
/** @internal */
export const StaticIps$inboundSchema: z.ZodType<
StaticIps,
z.ZodTypeDef,
unknown
> = z.object({
builds: types.optional(types.boolean()),
buildRegion: types.optional(types.string()),
enabled: types.boolean(),
regions: types.optional(z.array(types.string())),
});
export function staticIpsFromJSON(
jsonString: string,
): SafeParseResult<StaticIps, SDKValidationError> {
return safeParse(
jsonString,
(x) => StaticIps$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'StaticIps' from JSON`,
);
}
/** @internal */
export const UserEventPayload316Project$inboundSchema: z.ZodType<
UserEventPayload316Project,
z.ZodTypeDef,
unknown
> = z.object({
id: types.optional(types.string()),
staticIps: z.lazy(() => StaticIps$inboundSchema),
});
export function userEventPayload316ProjectFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload316Project, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload316Project$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload316Project' from JSON`,
);
}
/** @internal */
export const UserEventPayload316Next$inboundSchema: z.ZodType<
UserEventPayload316Next,
z.ZodTypeDef,
unknown
> = z.object({
project: z.lazy(() => UserEventPayload316Project$inboundSchema),
});
export function userEventPayload316NextFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload316Next, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload316Next$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload316Next' from JSON`,
);
}
/** @internal */
export const PayloadStaticIps$inboundSchema: z.ZodType<
PayloadStaticIps,
z.ZodTypeDef,
unknown
> = z.object({
builds: types.optional(types.boolean()),
buildRegion: types.optional(types.string()),
enabled: types.boolean(),
regions: types.optional(z.array(types.string())),
});
export function payloadStaticIpsFromJSON(
jsonString: string,
): SafeParseResult<PayloadStaticIps, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadStaticIps$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadStaticIps' from JSON`,
);
}
/** @internal */
export const UserEventPayload316PreviousProject$inboundSchema: z.ZodType<
UserEventPayload316PreviousProject,
z.ZodTypeDef,
unknown
> = z.object({
id: types.optional(types.string()),
staticIps: z.lazy(() => PayloadStaticIps$inboundSchema),
});
export function userEventPayload316PreviousProjectFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload316PreviousProject, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
UserEventPayload316PreviousProject$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload316PreviousProject' from JSON`,
);
}
/** @internal */
export const UserEventPayload316Previous$inboundSchema: z.ZodType<
UserEventPayload316Previous,
z.ZodTypeDef,
unknown
> = z.object({
project: z.lazy(() => UserEventPayload316PreviousProject$inboundSchema),
});
export function userEventPayload316PreviousFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload316Previous, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload316Previous$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload316Previous' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndSixteen$inboundSchema: z.ZodType<
ThreeHundredAndSixteen,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
next: z.lazy(() => UserEventPayload316Next$inboundSchema),
previous: z.lazy(() => UserEventPayload316Previous$inboundSchema),
});
export function threeHundredAndSixteenFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndSixteen, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndSixteen$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndSixteen' from JSON`,
);
}
/** @internal */
export const SsoProtection2$inboundSchema: z.ZodNativeEnum<
typeof SsoProtection2
> = z.nativeEnum(SsoProtection2);
/** @internal */
export const SsoProtectionDeploymentType$inboundSchema: z.ZodNativeEnum<
typeof SsoProtectionDeploymentType
> = z.nativeEnum(SsoProtectionDeploymentType);
/** @internal */
export const Cve55182MigrationAppliedFrom$inboundSchema: z.ZodNativeEnum<
typeof Cve55182MigrationAppliedFrom
> = z.nativeEnum(Cve55182MigrationAppliedFrom);
/** @internal */
export const April2026SecurityIncidentMigrationAppliedFrom$inboundSchema:
z.ZodNativeEnum<typeof April2026SecurityIncidentMigrationAppliedFrom> = z
.nativeEnum(April2026SecurityIncidentMigrationAppliedFrom);
/** @internal */
export const SsoProtection1$inboundSchema: z.ZodType<
SsoProtection1,
z.ZodTypeDef,
unknown
> = z.object({
deploymentType: SsoProtectionDeploymentType$inboundSchema,
cve55182MigrationAppliedFrom: z.nullable(
Cve55182MigrationAppliedFrom$inboundSchema,
).optional(),
april2026SecurityIncidentMigrationAppliedFrom: z.nullable(
April2026SecurityIncidentMigrationAppliedFrom$inboundSchema,
).optional(),
});
export function ssoProtection1FromJSON(
jsonString: string,
): SafeParseResult<SsoProtection1, SDKValidationError> {
return safeParse(
jsonString,
(x) => SsoProtection1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'SsoProtection1' from JSON`,
);
}
/** @internal */
export const PayloadSsoProtection$inboundSchema: z.ZodType<
PayloadSsoProtection,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => SsoProtection1$inboundSchema),
SsoProtection2$inboundSchema,
]);
export function payloadSsoProtectionFromJSON(
jsonString: string,
): SafeParseResult<PayloadSsoProtection, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadSsoProtection$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadSsoProtection' from JSON`,
);
}
/** @internal */
export const OldSsoProtection2$inboundSchema: z.ZodNativeEnum<
typeof OldSsoProtection2
> = z.nativeEnum(OldSsoProtection2);
/** @internal */
export const OldSsoProtectionDeploymentType$inboundSchema: z.ZodNativeEnum<
typeof OldSsoProtectionDeploymentType
> = z.nativeEnum(OldSsoProtectionDeploymentType);
/** @internal */
export const OldSsoProtectionCve55182MigrationAppliedFrom$inboundSchema:
z.ZodNativeEnum<typeof OldSsoProtectionCve55182MigrationAppliedFrom> = z
.nativeEnum(OldSsoProtectionCve55182MigrationAppliedFrom);
/** @internal */
export const OldSsoProtectionApril2026SecurityIncidentMigrationAppliedFrom$inboundSchema:
z.ZodNativeEnum<
typeof OldSsoProtectionApril2026SecurityIncidentMigrationAppliedFrom
> = z.nativeEnum(
OldSsoProtectionApril2026SecurityIncidentMigrationAppliedFrom,
);
/** @internal */
export const OldSsoProtection1$inboundSchema: z.ZodType<
OldSsoProtection1,
z.ZodTypeDef,
unknown
> = z.object({
deploymentType: OldSsoProtectionDeploymentType$inboundSchema,
cve55182MigrationAppliedFrom: z.nullable(
OldSsoProtectionCve55182MigrationAppliedFrom$inboundSchema,
).optional(),
april2026SecurityIncidentMigrationAppliedFrom: z.nullable(
OldSsoProtectionApril2026SecurityIncidentMigrationAppliedFrom$inboundSchema,
).optional(),
});
export function oldSsoProtection1FromJSON(
jsonString: string,
): SafeParseResult<OldSsoProtection1, SDKValidationError> {
return safeParse(
jsonString,
(x) => OldSsoProtection1$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OldSsoProtection1' from JSON`,
);
}
/** @internal */
export const OldSsoProtection$inboundSchema: z.ZodType<
OldSsoProtection,
z.ZodTypeDef,
unknown
> = smartUnion([
z.lazy(() => OldSsoProtection1$inboundSchema),
OldSsoProtection2$inboundSchema,
]);
export function oldSsoProtectionFromJSON(
jsonString: string,
): SafeParseResult<OldSsoProtection, SDKValidationError> {
return safeParse(
jsonString,
(x) => OldSsoProtection$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OldSsoProtection' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndFifteen$inboundSchema: z.ZodType<
ThreeHundredAndFifteen,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.optional(types.string()),
projectName: types.optional(types.string()),
ssoProtection: types.nullable(
smartUnion([
z.lazy(() => SsoProtection1$inboundSchema),
SsoProtection2$inboundSchema,
]),
),
oldSsoProtection: types.nullable(
smartUnion([
z.lazy(() => OldSsoProtection1$inboundSchema),
OldSsoProtection2$inboundSchema,
]),
),
});
export function threeHundredAndFifteenFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndFifteen, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndFifteen$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndFifteen' from JSON`,
);
}
/** @internal */
export const UserEventPayload314Next$inboundSchema: z.ZodType<
UserEventPayload314Next,
z.ZodTypeDef,
unknown
> = z.object({
skewProtectionAllowedDomains: z.array(types.string()),
});
export function userEventPayload314NextFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload314Next, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload314Next$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload314Next' from JSON`,
);
}
/** @internal */
export const UserEventPayload314Previous$inboundSchema: z.ZodType<
UserEventPayload314Previous,
z.ZodTypeDef,
unknown
> = z.object({
skewProtectionAllowedDomains: types.optional(z.array(types.string())),
});
export function userEventPayload314PreviousFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload314Previous, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload314Previous$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload314Previous' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndFourteen$inboundSchema: z.ZodType<
ThreeHundredAndFourteen,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
next: z.lazy(() => UserEventPayload314Next$inboundSchema),
previous: z.lazy(() => UserEventPayload314Previous$inboundSchema),
});
export function threeHundredAndFourteenFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndFourteen, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndFourteen$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndFourteen' from JSON`,
);
}
/** @internal */
export const UserEventPayload313Next$inboundSchema: z.ZodType<
UserEventPayload313Next,
z.ZodTypeDef,
unknown
> = z.object({
skewProtectionMaxAge: types.number(),
});
export function userEventPayload313NextFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload313Next, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload313Next$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload313Next' from JSON`,
);
}
/** @internal */
export const UserEventPayload313Previous$inboundSchema: z.ZodType<
UserEventPayload313Previous,
z.ZodTypeDef,
unknown
> = z.object({
skewProtectionMaxAge: types.optional(types.number()),
});
export function userEventPayload313PreviousFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload313Previous, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload313Previous$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload313Previous' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndThirteen$inboundSchema: z.ZodType<
ThreeHundredAndThirteen,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
next: z.lazy(() => UserEventPayload313Next$inboundSchema),
previous: z.lazy(() => UserEventPayload313Previous$inboundSchema),
});
export function threeHundredAndThirteenFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndThirteen, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndThirteen$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndThirteen' from JSON`,
);
}
/** @internal */
export const UserEventPayload312Next$inboundSchema: z.ZodType<
UserEventPayload312Next,
z.ZodTypeDef,
unknown
> = z.object({
skewProtectionBoundaryAt: types.number(),
});
export function userEventPayload312NextFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload312Next, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload312Next$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload312Next' from JSON`,
);
}
/** @internal */
export const UserEventPayload312Previous$inboundSchema: z.ZodType<
UserEventPayload312Previous,
z.ZodTypeDef,
unknown
> = z.object({
skewProtectionBoundaryAt: types.optional(types.number()),
});
export function userEventPayload312PreviousFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload312Previous, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload312Previous$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload312Previous' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndTwelve$inboundSchema: z.ZodType<
ThreeHundredAndTwelve,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
next: z.lazy(() => UserEventPayload312Next$inboundSchema),
previous: z.lazy(() => UserEventPayload312Previous$inboundSchema),
});
export function threeHundredAndTwelveFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndTwelve, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndTwelve$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndTwelve' from JSON`,
);
}
/** @internal */
export const UserEventPayload311Previous$inboundSchema: z.ZodType<
UserEventPayload311Previous,
z.ZodTypeDef,
unknown
> = z.object({
expiration: types.optional(types.string()),
expirationProduction: types.optional(types.string()),
expirationCanceled: types.optional(types.string()),
expirationErrored: types.optional(types.string()),
});
export function userEventPayload311PreviousFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload311Previous, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload311Previous$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload311Previous' from JSON`,
);
}
/** @internal */
export const UserEventPayload311Next$inboundSchema: z.ZodType<
UserEventPayload311Next,
z.ZodTypeDef,
unknown
> = z.object({
expiration: types.optional(types.string()),
expirationProduction: types.optional(types.string()),
expirationCanceled: types.optional(types.string()),
expirationErrored: types.optional(types.string()),
});
export function userEventPayload311NextFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload311Next, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload311Next$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload311Next' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndEleven$inboundSchema: z.ZodType<
ThreeHundredAndEleven,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.optional(types.string()),
projectName: types.optional(types.string()),
previous: z.lazy(() => UserEventPayload311Previous$inboundSchema),
next: z.lazy(() => UserEventPayload311Next$inboundSchema),
});
export function threeHundredAndElevenFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndEleven, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndEleven$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndEleven' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndTen$inboundSchema: z.ZodType<
ThreeHundredAndTen,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
publicSource: types.boolean(),
});
export function threeHundredAndTenFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndTen, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndTen$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndTen' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndNine$inboundSchema: z.ZodType<
ThreeHundredAndNine,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
inheritDeploymentProtection: types.boolean(),
});
export function threeHundredAndNineFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndNine, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndNine$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndNine' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndEight$inboundSchema: z.ZodType<
ThreeHundredAndEight,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
protectedSourcemaps: types.boolean(),
});
export function threeHundredAndEightFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndEight, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndEight$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndEight' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndSeven$inboundSchema: z.ZodType<
ThreeHundredAndSeven,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
gitForkProtection: types.boolean(),
});
export function threeHundredAndSevenFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndSeven, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndSeven$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndSeven' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndSix$inboundSchema: z.ZodType<
ThreeHundredAndSix,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
customerSupportCodeVisibility: types.boolean(),
});
export function threeHundredAndSixFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndSix, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndSix$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndSix' from JSON`,
);
}
/** @internal */
export const IssuerMode$inboundSchema: z.ZodNativeEnum<typeof IssuerMode> = z
.nativeEnum(IssuerMode);
/** @internal */
export const UserEventPayload305Previous$inboundSchema: z.ZodType<
UserEventPayload305Previous,
z.ZodTypeDef,
unknown
> = z.object({
issuerMode: types.optional(IssuerMode$inboundSchema),
});
export function userEventPayload305PreviousFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload305Previous, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload305Previous$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload305Previous' from JSON`,
);
}
/** @internal */
export const PayloadIssuerMode$inboundSchema: z.ZodNativeEnum<
typeof PayloadIssuerMode
> = z.nativeEnum(PayloadIssuerMode);
/** @internal */
export const UserEventPayload305Next$inboundSchema: z.ZodType<
UserEventPayload305Next,
z.ZodTypeDef,
unknown
> = z.object({
issuerMode: PayloadIssuerMode$inboundSchema,
});
export function userEventPayload305NextFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload305Next, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload305Next$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload305Next' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndFive$inboundSchema: z.ZodType<
ThreeHundredAndFive,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
previous: z.lazy(() => UserEventPayload305Previous$inboundSchema),
next: z.lazy(() => UserEventPayload305Next$inboundSchema),
});
export function threeHundredAndFiveFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndFive, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndFive$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndFive' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndFour$inboundSchema: z.ZodType<
ThreeHundredAndFour,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
region: types.optional(types.string()),
failoverRegions: types.optional(z.array(types.string())),
});
export function threeHundredAndFourFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndFour, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndFour$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndFour' from JSON`,
);
}
/** @internal */
export const UserEventPayload303Previous$inboundSchema: z.ZodType<
UserEventPayload303Previous,
z.ZodTypeDef,
unknown
> = z.object({});
export function userEventPayload303PreviousFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload303Previous, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload303Previous$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload303Previous' from JSON`,
);
}
/** @internal */
export const UserEventPayload303Next$inboundSchema: z.ZodType<
UserEventPayload303Next,
z.ZodTypeDef,
unknown
> = z.object({});
export function userEventPayload303NextFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload303Next, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload303Next$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload303Next' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndThree$inboundSchema: z.ZodType<
ThreeHundredAndThree,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
previous: types.nullable(
z.lazy(() => UserEventPayload303Previous$inboundSchema),
),
next: types.nullable(z.lazy(() => UserEventPayload303Next$inboundSchema)),
});
export function threeHundredAndThreeFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndThree, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndThree$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndThree' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndTwo$inboundSchema: z.ZodType<
ThreeHundredAndTwo,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
targetDeploymentId: types.optional(types.string()),
action: types.optional(types.string()),
});
export function threeHundredAndTwoFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndTwo, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndTwo$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndTwo' from JSON`,
);
}
/** @internal */
export const ThreeHundredAndOne$inboundSchema: z.ZodType<
ThreeHundredAndOne,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
targetDeploymentId: types.optional(types.string()),
newTargetPercentage: types.optional(types.number()),
});
export function threeHundredAndOneFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundredAndOne, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundredAndOne$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundredAndOne' from JSON`,
);
}
/** @internal */
export const ThreeHundred$inboundSchema: z.ZodType<
ThreeHundred,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
targetDeploymentId: types.optional(types.string()),
});
export function threeHundredFromJSON(
jsonString: string,
): SafeParseResult<ThreeHundred, SDKValidationError> {
return safeParse(
jsonString,
(x) => ThreeHundred$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ThreeHundred' from JSON`,
);
}
/** @internal */
export const RollbackDescription$inboundSchema: z.ZodType<
RollbackDescription,
z.ZodTypeDef,
unknown
> = z.object({
userId: types.string(),
username: types.string(),
description: types.string(),
createdAt: types.number(),
});
export function rollbackDescriptionFromJSON(
jsonString: string,
): SafeParseResult<RollbackDescription, SDKValidationError> {
return safeParse(
jsonString,
(x) => RollbackDescription$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'RollbackDescription' from JSON`,
);
}
/** @internal */
export const TwoHundredAndNinetyNine$inboundSchema: z.ZodType<
TwoHundredAndNinetyNine,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
projectAccountId: types.string(),
deploymentId: types.string(),
rollbackDescription: types.optional(
z.lazy(() => RollbackDescription$inboundSchema),
),
});
export function twoHundredAndNinetyNineFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndNinetyNine, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndNinetyNine$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndNinetyNine' from JSON`,
);
}
/** @internal */
export const Consent$inboundSchema: z.ZodNativeEnum<typeof Consent> = z
.nativeEnum(Consent);
/** @internal */
export const TwoHundredAndNinetyEight$inboundSchema: z.ZodType<
TwoHundredAndNinetyEight,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.optional(types.string()),
projectName: types.string(),
consent: Consent$inboundSchema,
});
export function twoHundredAndNinetyEightFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndNinetyEight, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndNinetyEight$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndNinetyEight' from JSON`,
);
}
/** @internal */
export const ReasonCode$inboundSchema: z.ZodNativeEnum<typeof ReasonCode> = z
.nativeEnum(ReasonCode);
/** @internal */
export const TwoHundredAndNinetySeven$inboundSchema: z.ZodType<
TwoHundredAndNinetySeven,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.optional(types.string()),
reasonCode: types.optional(ReasonCode$inboundSchema),
});
export function twoHundredAndNinetySevenFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndNinetySeven, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndNinetySeven$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndNinetySeven' from JSON`,
);
}
/** @internal */
export const TwoHundredAndNinetySix$inboundSchema: z.ZodType<
TwoHundredAndNinetySix,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
expiresAt: types.number(),
});
export function twoHundredAndNinetySixFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndNinetySix, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndNinetySix$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndNinetySix' from JSON`,
);
}
/** @internal */
export const TwoHundredAndNinetyFive$inboundSchema: z.ZodType<
TwoHundredAndNinetyFive,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
});
export function twoHundredAndNinetyFiveFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndNinetyFive, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndNinetyFive$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndNinetyFive' 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 TwoHundredAndNinetyFour$inboundSchema: z.ZodType<
TwoHundredAndNinetyFour,
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 twoHundredAndNinetyFourFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndNinetyFour, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndNinetyFour$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndNinetyFour' 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 TwoHundredAndNinetyThree$inboundSchema: z.ZodType<
TwoHundredAndNinetyThree,
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 twoHundredAndNinetyThreeFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndNinetyThree, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndNinetyThree$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndNinetyThree' from JSON`,
);
}
/** @internal */
export const TwoHundredAndNinetyTwo$inboundSchema: z.ZodType<
TwoHundredAndNinetyTwo,
z.ZodTypeDef,
unknown
> = z.object({
source: types.string(),
projectId: types.string(),
projectName: types.string(),
});
export function twoHundredAndNinetyTwoFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndNinetyTwo, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndNinetyTwo$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndNinetyTwo' from JSON`,
);
}
/** @internal */
export const TwoHundredAndNinetyOne$inboundSchema: z.ZodType<
TwoHundredAndNinetyOne,
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 twoHundredAndNinetyOneFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndNinetyOne, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndNinetyOne$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndNinetyOne' from JSON`,
);
}
/** @internal */
export const TwoHundredAndNinety$inboundSchema: z.ZodType<
TwoHundredAndNinety,
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 twoHundredAndNinetyFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndNinety, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndNinety$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndNinety' from JSON`,
);
}
/** @internal */
export const TwoHundredAndEightyNine$inboundSchema: z.ZodType<
TwoHundredAndEightyNine,
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 twoHundredAndEightyNineFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndEightyNine, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndEightyNine$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndEightyNine' from JSON`,
);
}
/** @internal */
export const TwoHundredAndEightyEight$inboundSchema: z.ZodType<
TwoHundredAndEightyEight,
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 twoHundredAndEightyEightFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndEightyEight, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndEightyEight$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndEightyEight' from JSON`,
);
}
/** @internal */
export const UserEventPayload287Project$inboundSchema: z.ZodType<
UserEventPayload287Project,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
name: types.string(),
});
export function userEventPayload287ProjectFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload287Project, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload287Project$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload287Project' from JSON`,
);
}
/** @internal */
export const UserEventPayload287Role$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload287Role
> = z.nativeEnum(UserEventPayload287Role);
/** @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(UserEventPayload287Role$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 TwoHundredAndEightySeven$inboundSchema: z.ZodType<
TwoHundredAndEightySeven,
z.ZodTypeDef,
unknown
> = z.object({
project: z.lazy(() => UserEventPayload287Project$inboundSchema),
projectMembership: z.lazy(() => PayloadProjectMembership$inboundSchema),
});
export function twoHundredAndEightySevenFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndEightySeven, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndEightySeven$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndEightySeven' from JSON`,
);
}
/** @internal */
export const UserEventPayload286Project$inboundSchema: z.ZodType<
UserEventPayload286Project,
z.ZodTypeDef,
unknown
> = z.object({
name: types.string(),
id: types.optional(types.string()),
});
export function userEventPayload286ProjectFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload286Project, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload286Project$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload286Project' from JSON`,
);
}
/** @internal */
export const UserEventPayload286Role$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload286Role
> = z.nativeEnum(UserEventPayload286Role);
/** @internal */
export const RemovedMembership$inboundSchema: z.ZodType<
RemovedMembership,
z.ZodTypeDef,
unknown
> = z.object({
role: UserEventPayload286Role$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 TwoHundredAndEightySix$inboundSchema: z.ZodType<
TwoHundredAndEightySix,
z.ZodTypeDef,
unknown
> = z.object({
project: z.lazy(() => UserEventPayload286Project$inboundSchema),
removedMembership: z.lazy(() => RemovedMembership$inboundSchema),
});
export function twoHundredAndEightySixFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndEightySix, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndEightySix$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndEightySix' from JSON`,
);
}
/** @internal */
export const UserEventPayload285Role$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload285Role
> = z.nativeEnum(UserEventPayload285Role);
/** @internal */
export const UserEventPayload285Project$inboundSchema: z.ZodType<
UserEventPayload285Project,
z.ZodTypeDef,
unknown
> = z.object({
name: types.string(),
role: UserEventPayload285Role$inboundSchema,
invitedUserName: types.string(),
id: types.optional(types.string()),
invitedUserId: types.optional(types.string()),
});
export function userEventPayload285ProjectFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload285Project, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload285Project$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload285Project' from JSON`,
);
}
/** @internal */
export const TwoHundredAndEightyFive$inboundSchema: z.ZodType<
TwoHundredAndEightyFive,
z.ZodTypeDef,
unknown
> = z.object({
project: z.lazy(() => UserEventPayload285Project$inboundSchema),
});
export function twoHundredAndEightyFiveFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndEightyFive, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndEightyFive$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndEightyFive' from JSON`,
);
}
/** @internal */
export const UserEventPayload284Project$inboundSchema: z.ZodType<
UserEventPayload284Project,
z.ZodTypeDef,
unknown
> = z.object({
name: types.string(),
id: types.optional(types.string()),
});
export function userEventPayload284ProjectFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload284Project, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload284Project$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload284Project' from JSON`,
);
}
/** @internal */
export const UserEventPayload284Role$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload284Role
> = z.nativeEnum(UserEventPayload284Role);
/** @internal */
export const ProjectMembership$inboundSchema: z.ZodType<
ProjectMembership,
z.ZodTypeDef,
unknown
> = z.object({
role: UserEventPayload284Role$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 TwoHundredAndEightyFour$inboundSchema: z.ZodType<
TwoHundredAndEightyFour,
z.ZodTypeDef,
unknown
> = z.object({
project: z.lazy(() => UserEventPayload284Project$inboundSchema),
projectMembership: types.nullable(
z.lazy(() => ProjectMembership$inboundSchema),
),
});
export function twoHundredAndEightyFourFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndEightyFour, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndEightyFour$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndEightyFour' from JSON`,
);
}
/** @internal */
export const TwoHundredAndEightyThree$inboundSchema: z.ZodType<
TwoHundredAndEightyThree,
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 twoHundredAndEightyThreeFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndEightyThree, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndEightyThree$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndEightyThree' from JSON`,
);
}
/** @internal */
export const UserEventPayloadRole$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayloadRole
> = z.nativeEnum(UserEventPayloadRole);
/** @internal */
export const PayloadProjects$inboundSchema: z.ZodType<
PayloadProjects,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
role: UserEventPayloadRole$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 TwoHundredAndEightyTwo$inboundSchema: z.ZodType<
TwoHundredAndEightyTwo,
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 twoHundredAndEightyTwoFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndEightyTwo, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndEightyTwo$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndEightyTwo' from JSON`,
);
}
/** @internal */
export const TwoHundredAndEightyOne$inboundSchema: z.ZodType<
TwoHundredAndEightyOne,
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 twoHundredAndEightyOneFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndEightyOne, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndEightyOne$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndEightyOne' from JSON`,
);
}
/** @internal */
export const TwoHundredAndEighty$inboundSchema: z.ZodType<
TwoHundredAndEighty,
z.ZodTypeDef,
unknown
> = z.object({
oldProjectId: types.string(),
oldProjectName: types.string(),
newProjectId: types.string(),
newProjectName: types.string(),
domain: types.string(),
});
export function twoHundredAndEightyFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndEighty, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndEighty$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndEighty' from JSON`,
);
}
/** @internal */
export const TwoHundredAndSeventyNine$inboundSchema: z.ZodType<
TwoHundredAndSeventyNine,
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 twoHundredAndSeventyNineFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndSeventyNine, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndSeventyNine$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndSeventyNine' from JSON`,
);
}
/** @internal */
export const TwoHundredAndSeventyEight$inboundSchema: z.ZodType<
TwoHundredAndSeventyEight,
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 twoHundredAndSeventyEightFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndSeventyEight, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndSeventyEight$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndSeventyEight' from JSON`,
);
}
/** @internal */
export const UserEventPayload277Previous$inboundSchema: z.ZodType<
UserEventPayload277Previous,
z.ZodTypeDef,
unknown
> = z.object({
commandForIgnoringBuildStep: types.optional(types.string()),
});
export function userEventPayload277PreviousFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload277Previous, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload277Previous$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload277Previous' from JSON`,
);
}
/** @internal */
export const UserEventPayload277Next$inboundSchema: z.ZodType<
UserEventPayload277Next,
z.ZodTypeDef,
unknown
> = z.object({
commandForIgnoringBuildStep: types.optional(types.string()),
});
export function userEventPayload277NextFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload277Next, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload277Next$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload277Next' from JSON`,
);
}
/** @internal */
export const TwoHundredAndSeventySeven$inboundSchema: z.ZodType<
TwoHundredAndSeventySeven,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
previous: z.lazy(() => UserEventPayload277Previous$inboundSchema),
next: z.lazy(() => UserEventPayload277Next$inboundSchema),
});
export function twoHundredAndSeventySevenFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndSeventySeven, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndSeventySeven$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndSeventySeven' from JSON`,
);
}