@vercel/sdk
Version:
<p align="center"> <a href="https://vercel.com"> <img src="https://assets.vercel.com/image/upload/v1588805858/repositories/vercel/logo.png" height="96"> <h3 align="center">Vercel</h3> </a> <p align="center">Develop. Preview. Ship.</p> </p>
1,354 lines • 63.2 kB
JavaScript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod/v3";
import { remap as remap$ } from "../lib/primitives.js";
import { safeParse } from "../lib/schemas.js";
import * as types from "../types/primitives.js";
import { smartUnion } from "../types/smartUnion.js";
import { UserEventPayload340Budget$inboundSchema, } from "./usereventpayload340budget.js";
export const FactorsOrigin = {
Apple: "apple",
Bitbucket: "bitbucket",
Chatgpt: "chatgpt",
Email: "email",
Github: "github",
Gitlab: "gitlab",
Google: "google",
Otp: "otp",
Saml: "saml",
};
export const UserEventPayloadActorType = {
Admin: "admin",
};
export const PayloadReasonCode = {
Backoffice: "BACKOFFICE",
PublicApi: "PUBLIC_API",
};
export const TrustedIps = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
Production: "production",
};
export const OldTrustedIps = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
Production: "production",
};
export const SsoProtection2 = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
};
export const SsoProtectionDeploymentType = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
};
export const Cve55182MigrationAppliedFrom = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
};
export const April2026SecurityIncidentMigrationAppliedFrom = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
};
export const OldSsoProtection2 = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
};
export const OldSsoProtectionDeploymentType = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
};
export const OldSsoProtectionCve55182MigrationAppliedFrom = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
};
export const OldSsoProtectionApril2026SecurityIncidentMigrationAppliedFrom = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
};
export const IssuerMode = {
Global: "global",
Team: "team",
};
export const PayloadIssuerMode = {
Global: "global",
Team: "team",
};
export const Consent = {
Granted: "granted",
Refused: "refused",
};
export const ReasonCode = {
Backoffice: "BACKOFFICE",
BudgetReached: "BUDGET_REACHED",
PublicApi: "PUBLIC_API",
};
export const PasswordProtection2 = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
};
export const PasswordProtectionDeploymentType = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
};
export const OldPasswordProtection2 = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
};
export const OldPasswordProtectionDeploymentType = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
};
export const UserEventPayload287Role = {
Admin: "ADMIN",
ProjectDeveloper: "PROJECT_DEVELOPER",
ProjectGuest: "PROJECT_GUEST",
ProjectViewer: "PROJECT_VIEWER",
};
export const PayloadPreviousRole = {
Admin: "ADMIN",
ProjectDeveloper: "PROJECT_DEVELOPER",
ProjectGuest: "PROJECT_GUEST",
ProjectViewer: "PROJECT_VIEWER",
};
export const UserEventPayload286Role = {
Admin: "ADMIN",
ProjectDeveloper: "PROJECT_DEVELOPER",
ProjectGuest: "PROJECT_GUEST",
ProjectViewer: "PROJECT_VIEWER",
};
export const UserEventPayload285Role = {
Admin: "ADMIN",
ProjectDeveloper: "PROJECT_DEVELOPER",
ProjectGuest: "PROJECT_GUEST",
ProjectViewer: "PROJECT_VIEWER",
};
export const UserEventPayload284Role = {
Admin: "ADMIN",
ProjectDeveloper: "PROJECT_DEVELOPER",
ProjectGuest: "PROJECT_GUEST",
ProjectViewer: "PROJECT_VIEWER",
};
export const UserEventPayloadRole = {
Admin: "ADMIN",
ProjectDeveloper: "PROJECT_DEVELOPER",
ProjectGuest: "PROJECT_GUEST",
ProjectViewer: "PROJECT_VIEWER",
};
/** @internal */
export const ThreeHundredAndForty$inboundSchema = z.object({
budget: UserEventPayload340Budget$inboundSchema,
});
export function threeHundredAndFortyFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndForty$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndForty' from JSON`);
}
/** @internal */
export const UserEventPayload339Previous$inboundSchema = z.object({
sampleRatePercent: types.nullable(types.number()),
spendLimitInDollars: types.nullable(types.number()),
});
export function userEventPayload339PreviousFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload339Previous$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload339Previous' from JSON`);
}
/** @internal */
export const ThreeHundredAndThirtyNine$inboundSchema = 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) {
return safeParse(jsonString, (x) => ThreeHundredAndThirtyNine$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndThirtyNine' from JSON`);
}
/** @internal */
export const ThreeHundredAndThirtyEight$inboundSchema = z.object({
email: types.string(),
gitlabLogin: types.string(),
gitlabEmail: types.string(),
gitlabName: types.string(),
zeitAccount: types.string(),
zeitAccountType: types.string(),
});
export function threeHundredAndThirtyEightFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndThirtyEight$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndThirtyEight' from JSON`);
}
/** @internal */
export const ThreeHundredAndThirtySeven$inboundSchema = z.object({
email: types.string(),
githubLogin: types.string(),
zeitAccount: types.string(),
zeitAccountType: types.string(),
});
export function threeHundredAndThirtySevenFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndThirtySeven$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndThirtySeven' from JSON`);
}
/** @internal */
export const ThreeHundredAndThirtySix$inboundSchema = z.object({
email: types.string(),
bitbucketLogin: types.string(),
bitbucketEmail: types.string(),
bitbucketName: types.string(),
zeitAccount: types.string(),
zeitAccountType: types.string(),
});
export function threeHundredAndThirtySixFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndThirtySix$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndThirtySix' from JSON`);
}
/** @internal */
export const UserEventPayload335Names$inboundSchema = z.object({
en: types.string(),
});
export function userEventPayload335NamesFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload335Names$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload335Names' from JSON`);
}
/** @internal */
export const PayloadCity$inboundSchema = z.object({
names: z.lazy(() => UserEventPayload335Names$inboundSchema),
});
export function payloadCityFromJSON(jsonString) {
return safeParse(jsonString, (x) => PayloadCity$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PayloadCity' from JSON`);
}
/** @internal */
export const UserEventPayload335GeolocationNames$inboundSchema = z.object({
en: types.string(),
});
export function userEventPayload335GeolocationNamesFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload335GeolocationNames$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload335GeolocationNames' from JSON`);
}
/** @internal */
export const PayloadCountry$inboundSchema = z.object({
names: z.lazy(() => UserEventPayload335GeolocationNames$inboundSchema),
});
export function payloadCountryFromJSON(jsonString) {
return safeParse(jsonString, (x) => PayloadCountry$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PayloadCountry' from JSON`);
}
/** @internal */
export const UserEventPayload335GeolocationMostSpecificSubdivisionNames$inboundSchema = z.object({
en: types.string(),
});
export function userEventPayload335GeolocationMostSpecificSubdivisionNamesFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload335GeolocationMostSpecificSubdivisionNames$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload335GeolocationMostSpecificSubdivisionNames' from JSON`);
}
/** @internal */
export const PayloadMostSpecificSubdivision$inboundSchema = z.object({
names: z.lazy(() => UserEventPayload335GeolocationMostSpecificSubdivisionNames$inboundSchema),
});
export function payloadMostSpecificSubdivisionFromJSON(jsonString) {
return safeParse(jsonString, (x) => PayloadMostSpecificSubdivision$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PayloadMostSpecificSubdivision' from JSON`);
}
/** @internal */
export const PayloadGeolocation$inboundSchema = 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) {
return safeParse(jsonString, (x) => PayloadGeolocation$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PayloadGeolocation' from JSON`);
}
/** @internal */
export const FactorsOrigin$inboundSchema = z.nativeEnum(FactorsOrigin);
/** @internal */
export const UserEventFactors1$inboundSchema = 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) {
return safeParse(jsonString, (x) => UserEventFactors1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventFactors1' from JSON`);
}
/** @internal */
export const PayloadFactors$inboundSchema = z.lazy(() => UserEventFactors1$inboundSchema);
export function payloadFactorsFromJSON(jsonString) {
return safeParse(jsonString, (x) => PayloadFactors$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PayloadFactors' from JSON`);
}
/** @internal */
export const ThreeHundredAndThirtyFive$inboundSchema = 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) {
return safeParse(jsonString, (x) => ThreeHundredAndThirtyFive$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndThirtyFive' from JSON`);
}
/** @internal */
export const ScalingRules$inboundSchema = z.object({
min: types.number(),
max: types.number(),
});
export function scalingRulesFromJSON(jsonString) {
return safeParse(jsonString, (x) => ScalingRules$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ScalingRules' from JSON`);
}
/** @internal */
export const ThreeHundredAndThirtyFour$inboundSchema = z.object({
scalingRules: z.record(z.lazy(() => ScalingRules$inboundSchema)),
min: types.number(),
max: types.number(),
url: types.string(),
});
export function threeHundredAndThirtyFourFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndThirtyFour$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndThirtyFour' from JSON`);
}
/** @internal */
export const ThreeHundredAndThirtyThree$inboundSchema = z.object({
bio: types.string(),
});
export function threeHundredAndThirtyThreeFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndThirtyThree$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndThirtyThree' from JSON`);
}
/** @internal */
export const ThreeHundredAndThirtyTwo$inboundSchema = 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) {
return safeParse(jsonString, (x) => ThreeHundredAndThirtyTwo$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndThirtyTwo' from JSON`);
}
/** @internal */
export const ThreeHundredAndThirtyOne$inboundSchema = z.object({
oldName: types.string(),
newName: types.string(),
uid: types.optional(types.string()),
});
export function threeHundredAndThirtyOneFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndThirtyOne$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndThirtyOne' from JSON`);
}
/** @internal */
export const Name2$inboundSchema = z
.object({
name: types.string(),
});
export function name2FromJSON(jsonString) {
return safeParse(jsonString, (x) => Name2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Name2' from JSON`);
}
/** @internal */
export const PayloadName$inboundSchema = smartUnion([z.lazy(() => Name2$inboundSchema), types.string()]);
export function payloadNameFromJSON(jsonString) {
return safeParse(jsonString, (x) => PayloadName$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PayloadName' from JSON`);
}
/** @internal */
export const ThreeHundredAndThirty$inboundSchema = z.object({
uid: types.string(),
name: smartUnion([z.lazy(() => Name2$inboundSchema), types.string()]),
});
export function threeHundredAndThirtyFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndThirty$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndThirty' from JSON`);
}
/** @internal */
export const ThreeHundredAndTwentyNine$inboundSchema = z.object({
email: types.string(),
});
export function threeHundredAndTwentyNineFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndTwentyNine$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndTwentyNine' from JSON`);
}
/** @internal */
export const UserEventPayloadActorType$inboundSchema = z.nativeEnum(UserEventPayloadActorType);
/** @internal */
export const ThreeHundredAndTwentyEight$inboundSchema = z.object({
email: types.string(),
verified: types.boolean(),
actorId: types.string(),
actorType: UserEventPayloadActorType$inboundSchema,
actorName: types.optional(types.string()),
});
export function threeHundredAndTwentyEightFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndTwentyEight$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndTwentyEight' from JSON`);
}
/** @internal */
export const ThreeHundredAndTwentySeven$inboundSchema = z.object({
email: types.string(),
verified: types.boolean(),
});
export function threeHundredAndTwentySevenFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndTwentySeven$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndTwentySeven' from JSON`);
}
/** @internal */
export const ThreeHundredAndTwentySix$inboundSchema = z.object({
instances: types.number(),
url: types.string(),
});
export function threeHundredAndTwentySixFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndTwentySix$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndTwentySix' from JSON`);
}
/** @internal */
export const ThreeHundredAndTwentyFive$inboundSchema = z.object({
projectId: types.string(),
projectName: types.string(),
snapshotId: types.string(),
targetRegions: z.array(types.string()),
});
export function threeHundredAndTwentyFiveFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndTwentyFive$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndTwentyFive' from JSON`);
}
/** @internal */
export const ThreeHundredAndTwentyFour$inboundSchema = z.object({
driveName: types.string(),
projectId: types.string(),
projectName: types.string(),
region: types.string(),
});
export function threeHundredAndTwentyFourFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndTwentyFour$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndTwentyFour' from JSON`);
}
/** @internal */
export const ThreeHundredAndTwentyThree$inboundSchema = z.object({
alias: types.string(),
sandboxName: types.string(),
sandboxId: types.optional(types.string()),
projectId: types.optional(types.string()),
});
export function threeHundredAndTwentyThreeFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndTwentyThree$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndTwentyThree' from JSON`);
}
/** @internal */
export const ThreeHundredAndTwentyTwo$inboundSchema = z.object({
connectionId: types.string(),
connectionType: types.string(),
});
export function threeHundredAndTwentyTwoFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndTwentyTwo$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndTwentyTwo' from JSON`);
}
/** @internal */
export const ThreeHundredAndTwentyOne$inboundSchema = z.object({
gitProvider: types.string(),
gitProviderGroupDescriptor: types.string(),
gitScope: types.string(),
});
export function threeHundredAndTwentyOneFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndTwentyOne$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndTwentyOne' from JSON`);
}
/** @internal */
export const ProjectWebAnalytics$inboundSchema = 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) {
return safeParse(jsonString, (x) => ProjectWebAnalytics$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ProjectWebAnalytics' from JSON`);
}
/** @internal */
export const PrevProjectWebAnalytics$inboundSchema = 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) {
return safeParse(jsonString, (x) => PrevProjectWebAnalytics$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PrevProjectWebAnalytics' from JSON`);
}
/** @internal */
export const ThreeHundredAndTwenty$inboundSchema = 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) {
return safeParse(jsonString, (x) => ThreeHundredAndTwenty$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndTwenty' from JSON`);
}
/** @internal */
export const PayloadReasonCode$inboundSchema = z.nativeEnum(PayloadReasonCode);
/** @internal */
export const ThreeHundredAndNineteen$inboundSchema = z.object({
projectId: types.string(),
projectName: types.optional(types.string()),
reasonCode: types.optional(PayloadReasonCode$inboundSchema),
});
export function threeHundredAndNineteenFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndNineteen$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndNineteen' from JSON`);
}
/** @internal */
export const AddedProjects$inboundSchema = z.object({
id: types.string(),
name: types.string(),
});
export function addedProjectsFromJSON(jsonString) {
return safeParse(jsonString, (x) => AddedProjects$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AddedProjects' from JSON`);
}
/** @internal */
export const RemovedProjects$inboundSchema = z.object({
id: types.string(),
name: types.string(),
});
export function removedProjectsFromJSON(jsonString) {
return safeParse(jsonString, (x) => RemovedProjects$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RemovedProjects' from JSON`);
}
/** @internal */
export const ThreeHundredAndEighteen$inboundSchema = 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) {
return safeParse(jsonString, (x) => ThreeHundredAndEighteen$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndEighteen' from JSON`);
}
/** @internal */
export const TrustedIps$inboundSchema = z
.nativeEnum(TrustedIps);
/** @internal */
export const OldTrustedIps$inboundSchema = z.nativeEnum(OldTrustedIps);
/** @internal */
export const ThreeHundredAndSeventeen$inboundSchema = 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) {
return safeParse(jsonString, (x) => ThreeHundredAndSeventeen$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndSeventeen' from JSON`);
}
/** @internal */
export const StaticIps$inboundSchema = 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) {
return safeParse(jsonString, (x) => StaticIps$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'StaticIps' from JSON`);
}
/** @internal */
export const UserEventPayload316Project$inboundSchema = z.object({
id: types.optional(types.string()),
staticIps: z.lazy(() => StaticIps$inboundSchema),
});
export function userEventPayload316ProjectFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload316Project$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload316Project' from JSON`);
}
/** @internal */
export const UserEventPayload316Next$inboundSchema = z.object({
project: z.lazy(() => UserEventPayload316Project$inboundSchema),
});
export function userEventPayload316NextFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload316Next$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload316Next' from JSON`);
}
/** @internal */
export const PayloadStaticIps$inboundSchema = 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) {
return safeParse(jsonString, (x) => PayloadStaticIps$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PayloadStaticIps' from JSON`);
}
/** @internal */
export const UserEventPayload316PreviousProject$inboundSchema = z.object({
id: types.optional(types.string()),
staticIps: z.lazy(() => PayloadStaticIps$inboundSchema),
});
export function userEventPayload316PreviousProjectFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload316PreviousProject$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload316PreviousProject' from JSON`);
}
/** @internal */
export const UserEventPayload316Previous$inboundSchema = z.object({
project: z.lazy(() => UserEventPayload316PreviousProject$inboundSchema),
});
export function userEventPayload316PreviousFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload316Previous$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload316Previous' from JSON`);
}
/** @internal */
export const ThreeHundredAndSixteen$inboundSchema = z.object({
projectId: types.string(),
projectName: types.string(),
next: z.lazy(() => UserEventPayload316Next$inboundSchema),
previous: z.lazy(() => UserEventPayload316Previous$inboundSchema),
});
export function threeHundredAndSixteenFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndSixteen$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndSixteen' from JSON`);
}
/** @internal */
export const SsoProtection2$inboundSchema = z.nativeEnum(SsoProtection2);
/** @internal */
export const SsoProtectionDeploymentType$inboundSchema = z.nativeEnum(SsoProtectionDeploymentType);
/** @internal */
export const Cve55182MigrationAppliedFrom$inboundSchema = z.nativeEnum(Cve55182MigrationAppliedFrom);
/** @internal */
export const April2026SecurityIncidentMigrationAppliedFrom$inboundSchema = z
.nativeEnum(April2026SecurityIncidentMigrationAppliedFrom);
/** @internal */
export const SsoProtection1$inboundSchema = z.object({
deploymentType: SsoProtectionDeploymentType$inboundSchema,
cve55182MigrationAppliedFrom: z.nullable(Cve55182MigrationAppliedFrom$inboundSchema).optional(),
april2026SecurityIncidentMigrationAppliedFrom: z.nullable(April2026SecurityIncidentMigrationAppliedFrom$inboundSchema).optional(),
});
export function ssoProtection1FromJSON(jsonString) {
return safeParse(jsonString, (x) => SsoProtection1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SsoProtection1' from JSON`);
}
/** @internal */
export const PayloadSsoProtection$inboundSchema = smartUnion([
z.lazy(() => SsoProtection1$inboundSchema),
SsoProtection2$inboundSchema,
]);
export function payloadSsoProtectionFromJSON(jsonString) {
return safeParse(jsonString, (x) => PayloadSsoProtection$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PayloadSsoProtection' from JSON`);
}
/** @internal */
export const OldSsoProtection2$inboundSchema = z.nativeEnum(OldSsoProtection2);
/** @internal */
export const OldSsoProtectionDeploymentType$inboundSchema = z.nativeEnum(OldSsoProtectionDeploymentType);
/** @internal */
export const OldSsoProtectionCve55182MigrationAppliedFrom$inboundSchema = z
.nativeEnum(OldSsoProtectionCve55182MigrationAppliedFrom);
/** @internal */
export const OldSsoProtectionApril2026SecurityIncidentMigrationAppliedFrom$inboundSchema = z.nativeEnum(OldSsoProtectionApril2026SecurityIncidentMigrationAppliedFrom);
/** @internal */
export const OldSsoProtection1$inboundSchema = z.object({
deploymentType: OldSsoProtectionDeploymentType$inboundSchema,
cve55182MigrationAppliedFrom: z.nullable(OldSsoProtectionCve55182MigrationAppliedFrom$inboundSchema).optional(),
april2026SecurityIncidentMigrationAppliedFrom: z.nullable(OldSsoProtectionApril2026SecurityIncidentMigrationAppliedFrom$inboundSchema).optional(),
});
export function oldSsoProtection1FromJSON(jsonString) {
return safeParse(jsonString, (x) => OldSsoProtection1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OldSsoProtection1' from JSON`);
}
/** @internal */
export const OldSsoProtection$inboundSchema = smartUnion([
z.lazy(() => OldSsoProtection1$inboundSchema),
OldSsoProtection2$inboundSchema,
]);
export function oldSsoProtectionFromJSON(jsonString) {
return safeParse(jsonString, (x) => OldSsoProtection$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OldSsoProtection' from JSON`);
}
/** @internal */
export const ThreeHundredAndFifteen$inboundSchema = 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) {
return safeParse(jsonString, (x) => ThreeHundredAndFifteen$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndFifteen' from JSON`);
}
/** @internal */
export const UserEventPayload314Next$inboundSchema = z.object({
skewProtectionAllowedDomains: z.array(types.string()),
});
export function userEventPayload314NextFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload314Next$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload314Next' from JSON`);
}
/** @internal */
export const UserEventPayload314Previous$inboundSchema = z.object({
skewProtectionAllowedDomains: types.optional(z.array(types.string())),
});
export function userEventPayload314PreviousFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload314Previous$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload314Previous' from JSON`);
}
/** @internal */
export const ThreeHundredAndFourteen$inboundSchema = z.object({
projectId: types.string(),
projectName: types.string(),
next: z.lazy(() => UserEventPayload314Next$inboundSchema),
previous: z.lazy(() => UserEventPayload314Previous$inboundSchema),
});
export function threeHundredAndFourteenFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndFourteen$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndFourteen' from JSON`);
}
/** @internal */
export const UserEventPayload313Next$inboundSchema = z.object({
skewProtectionMaxAge: types.number(),
});
export function userEventPayload313NextFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload313Next$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload313Next' from JSON`);
}
/** @internal */
export const UserEventPayload313Previous$inboundSchema = z.object({
skewProtectionMaxAge: types.optional(types.number()),
});
export function userEventPayload313PreviousFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload313Previous$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload313Previous' from JSON`);
}
/** @internal */
export const ThreeHundredAndThirteen$inboundSchema = z.object({
projectId: types.string(),
projectName: types.string(),
next: z.lazy(() => UserEventPayload313Next$inboundSchema),
previous: z.lazy(() => UserEventPayload313Previous$inboundSchema),
});
export function threeHundredAndThirteenFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndThirteen$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndThirteen' from JSON`);
}
/** @internal */
export const UserEventPayload312Next$inboundSchema = z.object({
skewProtectionBoundaryAt: types.number(),
});
export function userEventPayload312NextFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload312Next$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload312Next' from JSON`);
}
/** @internal */
export const UserEventPayload312Previous$inboundSchema = z.object({
skewProtectionBoundaryAt: types.optional(types.number()),
});
export function userEventPayload312PreviousFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload312Previous$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload312Previous' from JSON`);
}
/** @internal */
export const ThreeHundredAndTwelve$inboundSchema = z.object({
projectId: types.string(),
projectName: types.string(),
next: z.lazy(() => UserEventPayload312Next$inboundSchema),
previous: z.lazy(() => UserEventPayload312Previous$inboundSchema),
});
export function threeHundredAndTwelveFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndTwelve$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndTwelve' from JSON`);
}
/** @internal */
export const UserEventPayload311Previous$inboundSchema = 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) {
return safeParse(jsonString, (x) => UserEventPayload311Previous$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload311Previous' from JSON`);
}
/** @internal */
export const UserEventPayload311Next$inboundSchema = 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) {
return safeParse(jsonString, (x) => UserEventPayload311Next$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload311Next' from JSON`);
}
/** @internal */
export const ThreeHundredAndEleven$inboundSchema = 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) {
return safeParse(jsonString, (x) => ThreeHundredAndEleven$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndEleven' from JSON`);
}
/** @internal */
export const ThreeHundredAndTen$inboundSchema = z.object({
projectId: types.string(),
projectName: types.string(),
publicSource: types.boolean(),
});
export function threeHundredAndTenFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndTen$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndTen' from JSON`);
}
/** @internal */
export const ThreeHundredAndNine$inboundSchema = z.object({
projectId: types.string(),
projectName: types.string(),
inheritDeploymentProtection: types.boolean(),
});
export function threeHundredAndNineFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndNine$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndNine' from JSON`);
}
/** @internal */
export const ThreeHundredAndEight$inboundSchema = z.object({
projectId: types.string(),
projectName: types.string(),
protectedSourcemaps: types.boolean(),
});
export function threeHundredAndEightFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndEight$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndEight' from JSON`);
}
/** @internal */
export const ThreeHundredAndSeven$inboundSchema = z.object({
projectId: types.string(),
projectName: types.string(),
gitForkProtection: types.boolean(),
});
export function threeHundredAndSevenFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndSeven$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndSeven' from JSON`);
}
/** @internal */
export const ThreeHundredAndSix$inboundSchema = z.object({
projectId: types.string(),
projectName: types.string(),
customerSupportCodeVisibility: types.boolean(),
});
export function threeHundredAndSixFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndSix$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndSix' from JSON`);
}
/** @internal */
export const IssuerMode$inboundSchema = z
.nativeEnum(IssuerMode);
/** @internal */
export const UserEventPayload305Previous$inboundSchema = z.object({
issuerMode: types.optional(IssuerMode$inboundSchema),
});
export function userEventPayload305PreviousFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload305Previous$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload305Previous' from JSON`);
}
/** @internal */
export const PayloadIssuerMode$inboundSchema = z.nativeEnum(PayloadIssuerMode);
/** @internal */
export const UserEventPayload305Next$inboundSchema = z.object({
issuerMode: PayloadIssuerMode$inboundSchema,
});
export function userEventPayload305NextFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload305Next$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload305Next' from JSON`);
}
/** @internal */
export const ThreeHundredAndFive$inboundSchema = z.object({
projectId: types.string(),
projectName: types.string(),
previous: z.lazy(() => UserEventPayload305Previous$inboundSchema),
next: z.lazy(() => UserEventPayload305Next$inboundSchema),
});
export function threeHundredAndFiveFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndFive$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndFive' from JSON`);
}
/** @internal */
export const ThreeHundredAndFour$inboundSchema = z.object({
projectId: types.string(),
projectName: types.string(),
region: types.optional(types.string()),
failoverRegions: types.optional(z.array(types.string())),
});
export function threeHundredAndFourFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndFour$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndFour' from JSON`);
}
/** @internal */
export const UserEventPayload303Previous$inboundSchema = z.object({});
export function userEventPayload303PreviousFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload303Previous$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload303Previous' from JSON`);
}
/** @internal */
export const UserEventPayload303Next$inboundSchema = z.object({});
export function userEventPayload303NextFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload303Next$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload303Next' from JSON`);
}
/** @internal */
export const ThreeHundredAndThree$inboundSchema = 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) {
return safeParse(jsonString, (x) => ThreeHundredAndThree$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndThree' from JSON`);
}
/** @internal */
export const ThreeHundredAndTwo$inboundSchema = z.object({
projectId: types.string(),
projectName: types.string(),
targetDeploymentId: types.optional(types.string()),
action: types.optional(types.string()),
});
export function threeHundredAndTwoFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndTwo$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndTwo' from JSON`);
}
/** @internal */
export const ThreeHundredAndOne$inboundSchema = z.object({
projectId: types.string(),
projectName: types.string(),
targetDeploymentId: types.optional(types.string()),
newTargetPercentage: types.optional(types.number()),
});
export function threeHundredAndOneFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndOne$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndOne' from JSON`);
}
/** @internal */
export const ThreeHundred$inboundSchema = z.object({
projectId: types.string(),
projectName: types.string(),
targetDeploymentId: types.optional(types.string()),
});
export function threeHundredFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundred$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundred' from JSON`);
}
/** @internal */
export const RollbackDescription$inboundSchema = z.object({
userId: types.string(),
username: types.string(),
description: types.string(),
createdAt: types.number(),
});
export function rollbackDescriptionFromJSON(jsonString) {
return safeParse(jsonString, (x) => RollbackDescription$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RollbackDescription' from JSON`);
}
/** @internal */
export const TwoHundredAndNinetyNine$inboundSchema = 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) {
return safeParse(jsonString, (x) => TwoHundredAndNinetyNine$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TwoHundredAndNinetyNine' from JSON`);
}
/** @internal */
export const Consent$inboundSchema = z
.nativeEnum(Consent);
/** @internal */
export const TwoHundredAndNinetyEight$inboundSchema = z.object({
projectId: types.optional(types.string()),
projectName: types.string(),
consent: Consent$inboundSchema,
});
export function twoHundredAndNinetyEightFromJSON(jsonString) {
return safeParse(jsonString, (x) => TwoHundredAndNinetyEight$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TwoHundredAndNinetyEight' from JSON`);
}
/** @internal */
export const ReasonCode$inboundSchema = z
.nativeEnum(ReasonCode);
/** @internal */
export const TwoHundredAndNinetySeven$inboundSchema = z.object({
projectId: types.string(),
projectName: types.optional(types.string()),
reasonCode: types.optional(ReasonCode$inboundSchema),
});
export function twoHundredAndNinetySevenFromJSON(jsonString) {
return safeParse(jsonString, (x) => TwoHundredAndNinetySeven$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TwoHundredAndNinetySeven' from JSON`);
}
/** @internal */
export const TwoHundredAndNinetySix$inboundSchema = z.object({
projectId: types.string(),
expiresAt: types.number(),
});
export function twoHundredAndNinetySixFromJSON(jsonString) {
return safeParse(jsonString, (x) => TwoHundredAndNinetySix$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TwoHundredAndNinetySix' from JSON`);
}
/** @internal */
export const TwoHundredAndNinetyFive$inboundSchema = z.object({
projectId: types.string(),
});
export function twoHundredAndNinetyFiveFromJSON(jsonString) {
return safeParse(jsonString, (x) => TwoHundredAndNinetyFive$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TwoHundredAndNinetyFive' from JSON`);
}
/** @internal */
export const PasswordProtection2$inboundSchema = z.nativeEnum(PasswordProtection2);
/** @internal */
export const PasswordProtectionDeploymentType$inboundSchema = z.nativeEnum(PasswordProtectionDeploymentType);
/** @internal */
export const PasswordProtection1$inboundSchema = z.object({
deploymentType: PasswordProtectionDeploymentType$inboundSchema,
});
export function passwordProtection1FromJSON(jsonString) {
return safeParse(jsonString, (x) => PasswordProtection1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PasswordProtection1' from JSON`);
}
/** @internal */
export const PayloadPasswordProtection$inboundSchema = smartUnion([
z.lazy(() => PasswordProtection1$inboundSchema),
PasswordProtection2$inboundSchema,
]);
export function payloadPasswordProtectionFromJSON(jsonString) {
return safeParse(jsonString, (x) => PayloadPasswordProtection$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PayloadPasswordProtection' from JSON`);
}
/** @internal */
export const OldPasswordProtection2$inboundSchema = z.nativeEnum(OldPasswordProtection2);
/** @internal */
export const OldPasswordProtectionDeploymentType$inboundSchema = z.nativeEnum(OldPasswordProtectionDeploymentType);
/** @internal */
export const OldPasswordProtection1$inboundSchema = z.object({
deploymentType: OldPasswordProtectionDeploymentType$inboundSchema,
});
export function oldPasswordProtection1FromJSON(jsonString) {
return safeParse(jsonString, (x) => OldPasswordProtection1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OldPasswordProtection1' from JSON`);
}
/** @internal */
export const OldPasswordProtection$inboundSchema = smartUnion([
z.lazy(() => OldPasswordProtection1$inboundSchema),
OldPasswordProtection2$inboundSchema,
]);
export function oldPasswordProtectionFromJSON(jsonString) {
return safeParse(jsonString, (x) => OldPasswordProtection$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OldPasswordProtection' from JSON`);
}
/** @internal */
export const TwoHundredAndNinetyFour$inboundSchema = 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) {
return safeParse(jsonString, (x) => TwoHundredAndNinetyFour$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TwoHundredAndNinetyFour' from JSON`);
}
/** @internal */
export const Paths$inboundSchema = z
.object({
value: types.string(),
});
export function pathsFromJSON(jsonString) {
return safeParse(jsonString, (x) => Paths$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Paths' from JSON`);
}
/** @internal */
export const OptionsAllowlist$inboundSchema = z.object({
paths: z.array(z.lazy(() => Paths$inboundSchema)),
});
export function optionsAllowlistFromJSON(jsonString) {
return safeParse(jsonString, (x) => OptionsAllowlist$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OptionsAllowlist' from JSON`);
}
/** @internal */
export const PayloadPaths$inboundSchema = z.object({
value: types.string(),
});
export function payloadPathsFromJSON(jsonString) {
return safeParse(jsonString, (x) => PayloadPaths$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PayloadPaths' from JSON`);
}
/** @internal */
export const OldOptionsAllowlist$inboundSchema = z.object({
paths: z.array(z.lazy(() => PayloadPaths$inboundSchema)),
});
export function oldOptionsAllowlistFromJSON(jsonString) {
return safeParse(jsonString, (x) => OldOptionsAllowlist$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OldOptionsAllowlist' from JSON`);
}
/** @internal */
export const TwoHundredAndNinetyThree$inboundSchema = 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) {
return safeParse(jsonString, (x) => TwoHundredAndNinetyThree$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TwoHundredAndNinetyThree' from JSON`);
}
/** @internal */
export const TwoHundredAndNinetyTwo$inboundSchema = z.object({
source: types.string(),
projectId: types.string(),
projectName: types.string(),
});
export function twoHundredAndNinetyTwoFromJSON(jsonString) {
return safeParse(jsonString, (x) => TwoHundredAndNinetyTwo$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TwoHundredAndNinetyTwo' from JSON`);
}
/** @internal */
export const TwoHundredAndNinetyOne$inboundSchema = 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) {
return safeParse(jsonString, (x) => TwoHundredAndNinetyOne$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TwoHundredAndNinetyOne' from JSON`);
}
/** @internal */
export const TwoHundredAndNinety$inboundSchema = 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) {
return safeParse(jsonString, (x) => TwoHundredAndNinety$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TwoHundredAndNinety' from JSON`);
}
/** @internal */
export const TwoHundredAndEightyNine$inboundSchema = z.object({
previousProjectId: types.optional(types.string()),
projectName: types.string(),
destinationAccountName: types.nullable(types.string()),
transferId: types.optional(types.string()),
});
export function twoHundredAndEightyNineFromJSON(jsonString) {
return safeParse(jsonString, (x) => TwoHundredAndEightyNine$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TwoHundredAndEightyNine' from JSON`);
}
/** @internal */
export const TwoHundredAndEightyEight$inboundSchema = 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) {
return safeParse(jsonString, (x) => TwoHundredAndEightyEight$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TwoHundredAndEightyEight' from JSON`);
}
/** @internal */
export const UserEventPayload287Project$inboundSchema = z.object({
id: types.string(),
name: types.string(),
});
export function userEventPayload287ProjectFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload287Project$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload287Project' from JSON`);
}
/** @internal */
export const UserEventPayload287Role$inboundSchema = z.nativeEnum(UserEventPayload287Role);
/** @internal */
export const PayloadPreviousRole$inboundSchema = z.nativeEnum(PayloadPreviousRole);
/** @internal */
export const PayloadProjectMembership$inboundSchema = 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) {
return safeParse(jsonString, (x) => PayloadProjectMembership$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PayloadProjectMembership' from JSON`);
}
/** @internal */
export const TwoHundredAndEightySeven$inboundSchema = z.object({
project: z.lazy(() => UserEventPayload287Project$inboundSchema),
projectMembership: z.lazy(() => PayloadProjectMembership$inboundSchema),
});
export function twoHundredAndEightySevenFromJSON(jsonString) {
return safeParse(jsonString, (x) => TwoHundredAndEightySeven$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TwoHundredAndEightySeven' from JSON`);
}
/** @internal */
export const UserEventPayload286Project$inboundSchema = z.object({
name: types.string(),
id: types.optional(types.string()),
});
export function userEventPayload286ProjectFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload286Project$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload286Project' from JSON`);
}
/** @internal */
export const UserEventPayload286Role$inboundSchema = z.nativeEnum(UserEventPayload286Role);
/** @internal */
export const RemovedMembership$inboundSchema = z.object({
role: UserEventPayload286Role$inboundSchema,
uid: types.string(),
createdAt: types.number(),
username: types.optional(types.string()),
});
export function removedMembershipFromJSON(jsonString) {
return safeParse(jsonString, (x) => RemovedMembership$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RemovedMembership' from JSON`);
}
/** @internal */
export const TwoHundredAndEightySix$inboundSchema = z.object({
project: z.lazy(() => UserEventPayload286Project$inboundSchema),
removedMembership: z.lazy(() => RemovedMembership$inboundSchema),
});
export function twoHundredAndEightySixFromJSON(jsonString) {
return safeParse(jsonString, (x) => TwoHundredAndEightySix$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TwoHundredAndEightySix' from JSON`);
}
/** @internal */
export const UserEventPayload285Role$inboundSchema = z.nativeEnum(UserEventPayload285Role);
/** @internal */
export const UserEventPayload285Project$inboundSchema = 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) {
return safeParse(jsonString, (x) => UserEventPayload285Project$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload285Project' from JSON`);
}
/** @internal */
export const TwoHundredAndEightyFive$inboundSchema = z.object({
project: z.lazy(() => UserEventPayload285Project$inboundSchema),
});
export function twoHundredAndEightyFiveFromJSON(jsonString) {
return safeParse(jsonString, (x) => TwoHundredAndEightyFive$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TwoHundredAndEightyFive' from JSON`);
}
/** @internal */
export const UserEventPayload284Project$inboundSchema = z.object({
name: types.string(),
id: types.optional(types.string()),
});
export function userEventPayload284ProjectFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload284Project$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload284Project' from JSON`);
}
/** @internal */
export const UserEventPayload284Role$inboundSchema = z.nativeEnum(UserEventPayload284Role);
/** @internal */
export const ProjectMembership$inboundSchema = z.object({
role: UserEventPayload284Role$inboundSchema,
uid: types.string(),
createdAt: types.number(),
username: types.optional(types.string()),
});
export function projectMembershipFromJSON(jsonString) {
return safeParse(jsonString, (x) => ProjectMembership$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ProjectMembership' from JSON`);
}
/** @internal */
export const TwoHundredAndEightyFour$inboundSchema = z.object({
project: z.lazy(() => UserEventPayload284Project$inboundSchema),
projectMembership: types.nullable(z.lazy(() => ProjectMembership$inboundSchema)),
});
export function twoHundredAndEightyFourFromJSON(jsonString) {
return safeParse(jsonString, (x) => TwoHundredAndEightyFour$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TwoHundredAndEightyFour' from JSON`);
}
/** @internal */
export const TwoHundredAndEightyThree$inboundSchema = 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) {
return safeParse(jsonString, (x) => TwoHundredAndEightyThree$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TwoHundredAndEightyThree' from JSON`);
}
/** @internal */
export const UserEventPayloadRole$inboundSchema = z.nativeEnum(UserEventPayloadRole);
/** @internal */
export const PayloadProjects$inboundSchema = z.object({
projectId: types.string(),
role: UserEventPayloadRole$inboundSchema,
membershipCreatedAt: types.number(),
});
export function payloadProjectsFromJSON(jsonString) {
return safeParse(jsonString, (x) => PayloadProjects$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PayloadProjects' from JSON`);
}
/** @internal */
export const TeamMembership$inboundSchema = z.object({
uid: types.string(),
username: types.optional(types.string()),
});
export function teamMembershipFromJSON(jsonString) {
return safeParse(jsonString, (x) => TeamMembership$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TeamMembership' from JSON`);
}
/** @internal */
export const TwoHundredAndEightyTwo$inboundSchema = 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) {
return safeParse(jsonString, (x) => TwoHundredAndEightyTwo$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TwoHundredAndEightyTwo' from JSON`);
}
/** @internal */
export const TwoHundredAndEightyOne$inboundSchema = 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) {
return safeParse(jsonString, (x) => TwoHundredAndEightyOne$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TwoHundredAndEightyOne' from JSON`);
}
/** @internal */
export const TwoHundredAndEighty$inboundSchema = z.object({
oldProjectId: types.string(),
oldProjectName: types.string(),
newProjectId: types.string(),
newProjectName: types.string(),
domain: types.string(),
});
export function twoHundredAndEightyFromJSON(jsonString) {
return safeParse(jsonString, (x) => TwoHundredAndEighty$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TwoHundredAndEighty' from JSON`);
}
/** @internal */
export const TwoHundredAndSeventyNine$inboundSchema = 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) {
return safeParse(jsonString, (x) => TwoHundredAndSeventyNine$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TwoHundredAndSeventyNine' from JSON`);
}
/** @internal */
export const TwoHundredAndSeventyEight$inboundSchema = 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) {
return safeParse(jsonString, (x) => TwoHundredAndSeventyEight$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TwoHundredAndSeventyEight' from JSON`);
}
/** @internal */
export const UserEventPayload277Previous$inboundSchema = z.object({
commandForIgnoringBuildStep: types.optional(types.string()),
});
export function userEventPayload277PreviousFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload277Previous$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload277Previous' from JSON`);
}
/** @internal */
export const UserEventPayload277Next$inboundSchema = z.object({
commandForIgnoringBuildStep: types.optional(types.string()),
});
export function userEventPayload277NextFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload277Next$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload277Next' from JSON`);
}
/** @internal */
export const TwoHundredAndSeventySeven$inboundSchema = z.object({
projectId: types.string(),
projectName: types.string(),
previous: z.lazy(() => UserEventPayload277Previous$inboundSchema),
next: z.lazy(() => UserEventPayload277Next$inboundSchema),
});
export function twoHundredAndSeventySevenFromJSON(jsonString) {
return safeParse(jsonString, (x) => TwoHundredAndSeventySeven$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TwoHundredAndSeventySeven' from JSON`);
}
//# sourceMappingURL=twohundredandseventyseven.js.map