@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,367 lines • 63.1 kB
JavaScript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod/v3";
import { remap as remap$ } from "../lib/primitives.js";
import { safeParse } from "../lib/schemas.js";
import * as types from "../types/primitives.js";
import { smartUnion } from "../types/smartUnion.js";
/**
* The budget type
*/
export const UserEventPayload341Type = {
Fixed: "fixed",
};
/**
* The acive pricing plan the team is billed with
*/
export const UserEventPayload341PricingPlan = {
Flex: "flex",
Legacy: "legacy",
Platform: "platform",
Plus: "plus",
Unbundled: "unbundled",
};
/**
* Which budget this is. Matches Copper SDK `BudgetScope`. Omitted on events published before team/org/project scopes existed (treat as team).
*/
export const UserEventPayload341Scope = {
Organization: "organization",
Project: "project",
Team: "team",
};
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 UserEventPayload288Role = {
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 UserEventPayload287Role = {
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 UserEventPayloadRole = {
Admin: "ADMIN",
ProjectDeveloper: "PROJECT_DEVELOPER",
ProjectGuest: "PROJECT_GUEST",
ProjectViewer: "PROJECT_VIEWER",
};
/** @internal */
export const UserEventPayload341Type$inboundSchema = z.nativeEnum(UserEventPayload341Type);
/** @internal */
export const UserEventPayload341PricingPlan$inboundSchema = z.nativeEnum(UserEventPayload341PricingPlan);
/** @internal */
export const UserEventPayload341Scope$inboundSchema = z.nativeEnum(UserEventPayload341Scope);
/** @internal */
export const BudgetItem$inboundSchema = z.object({
type: UserEventPayload341Type$inboundSchema,
fixedBudget: types.number(),
previousSpend: z.array(types.number()),
notifiedAt: z.array(types.number()),
webhookId: types.optional(types.string()),
webhookNotified: types.optional(types.boolean()),
createdAt: types.number(),
updatedAt: types.optional(types.number()),
isActive: types.boolean(),
pauseProjects: types.optional(types.boolean()),
pricingPlan: types.optional(UserEventPayload341PricingPlan$inboundSchema),
scope: types.optional(UserEventPayload341Scope$inboundSchema),
scopeId: types.optional(types.string()),
teamId: types.string(),
id: types.string(),
});
export function budgetItemFromJSON(jsonString) {
return safeParse(jsonString, (x) => BudgetItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BudgetItem' from JSON`);
}
/** @internal */
export const UserEventPayload341Budget$inboundSchema = z.object({
budgetItem: z.lazy(() => BudgetItem$inboundSchema),
});
export function userEventPayload341BudgetFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload341Budget$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload341Budget' from JSON`);
}
/** @internal */
export const ThreeHundredAndFortyOne$inboundSchema = z.object({
budget: z.lazy(() => UserEventPayload341Budget$inboundSchema),
});
export function threeHundredAndFortyOneFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndFortyOne$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndFortyOne' from JSON`);
}
/** @internal */
export const UserEventPayload340Previous$inboundSchema = z.object({
sampleRatePercent: types.nullable(types.number()),
spendLimitInDollars: types.nullable(types.number()),
});
export function userEventPayload340PreviousFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload340Previous$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload340Previous' from JSON`);
}
/** @internal */
export const ThreeHundredAndForty$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(() => UserEventPayload340Previous$inboundSchema),
});
export function threeHundredAndFortyFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndForty$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndForty' from JSON`);
}
/** @internal */
export const ThreeHundredAndThirtyNine$inboundSchema = z.object({
email: types.string(),
gitlabLogin: types.string(),
gitlabEmail: types.string(),
gitlabName: types.string(),
zeitAccount: types.string(),
zeitAccountType: types.string(),
});
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(),
githubLogin: 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(),
bitbucketLogin: types.string(),
bitbucketEmail: types.string(),
bitbucketName: 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 UserEventPayload336Names$inboundSchema = z.object({
en: types.string(),
});
export function userEventPayload336NamesFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload336Names$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload336Names' from JSON`);
}
/** @internal */
export const PayloadCity$inboundSchema = z.object({
names: z.lazy(() => UserEventPayload336Names$inboundSchema),
});
export function payloadCityFromJSON(jsonString) {
return safeParse(jsonString, (x) => PayloadCity$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PayloadCity' from JSON`);
}
/** @internal */
export const UserEventPayload336GeolocationNames$inboundSchema = z.object({
en: types.string(),
});
export function userEventPayload336GeolocationNamesFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload336GeolocationNames$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload336GeolocationNames' from JSON`);
}
/** @internal */
export const PayloadCountry$inboundSchema = z.object({
names: z.lazy(() => UserEventPayload336GeolocationNames$inboundSchema),
});
export function payloadCountryFromJSON(jsonString) {
return safeParse(jsonString, (x) => PayloadCountry$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PayloadCountry' from JSON`);
}
/** @internal */
export const UserEventPayload336GeolocationMostSpecificSubdivisionNames$inboundSchema = z.object({
en: types.string(),
});
export function userEventPayload336GeolocationMostSpecificSubdivisionNamesFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload336GeolocationMostSpecificSubdivisionNames$inboundSchema
.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload336GeolocationMostSpecificSubdivisionNames' from JSON`);
}
/** @internal */
export const PayloadMostSpecificSubdivision$inboundSchema = z.object({
names: z.lazy(() => UserEventPayload336GeolocationMostSpecificSubdivisionNames$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 ThreeHundredAndThirtySix$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 threeHundredAndThirtySixFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndThirtySix$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndThirtySix' 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 ThreeHundredAndThirtyFive$inboundSchema = z.object({
scalingRules: z.record(z.lazy(() => ScalingRules$inboundSchema)),
min: types.number(),
max: types.number(),
url: types.string(),
});
export function threeHundredAndThirtyFiveFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndThirtyFive$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndThirtyFive' from JSON`);
}
/** @internal */
export const ThreeHundredAndThirtyFour$inboundSchema = z.object({
bio: 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({
enabled: types.boolean(),
updatedAt: types.number(),
firstEnabledAt: types.optional(types.number()),
projectId: types.optional(types.string()),
projectName: types.optional(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({
oldName: types.string(),
newName: types.string(),
uid: 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 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 ThreeHundredAndThirtyOne$inboundSchema = z.object({
uid: types.string(),
name: smartUnion([z.lazy(() => Name2$inboundSchema), 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 ThreeHundredAndThirty$inboundSchema = z.object({
email: 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 UserEventPayloadActorType$inboundSchema = z.nativeEnum(UserEventPayloadActorType);
/** @internal */
export const ThreeHundredAndTwentyNine$inboundSchema = z.object({
email: types.string(),
verified: types.boolean(),
actorId: types.string(),
actorType: UserEventPayloadActorType$inboundSchema,
actorName: types.optional(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 ThreeHundredAndTwentyEight$inboundSchema = z.object({
email: types.string(),
verified: types.boolean(),
});
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({
instances: types.number(),
url: types.string(),
});
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({
projectId: types.string(),
projectName: types.string(),
snapshotId: types.string(),
targetRegions: z.array(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({
driveName: types.string(),
projectId: types.string(),
projectName: types.string(),
region: 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({
alias: types.string(),
sandboxName: types.string(),
sandboxId: types.optional(types.string()),
projectId: types.optional(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({
connectionId: types.string(),
connectionType: 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({
gitProvider: types.string(),
gitProviderGroupDescriptor: types.string(),
gitScope: 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 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 ThreeHundredAndTwentyOne$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 threeHundredAndTwentyOneFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndTwentyOne$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndTwentyOne' from JSON`);
}
/** @internal */
export const PayloadReasonCode$inboundSchema = z.nativeEnum(PayloadReasonCode);
/** @internal */
export const ThreeHundredAndTwenty$inboundSchema = z.object({
projectId: types.string(),
projectName: types.optional(types.string()),
reasonCode: types.optional(PayloadReasonCode$inboundSchema),
});
export function threeHundredAndTwentyFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndTwenty$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndTwenty' 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 ThreeHundredAndNineteen$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 threeHundredAndNineteenFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndNineteen$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndNineteen' from JSON`);
}
/** @internal */
export const TrustedIps$inboundSchema = z
.nativeEnum(TrustedIps);
/** @internal */
export const OldTrustedIps$inboundSchema = z.nativeEnum(OldTrustedIps);
/** @internal */
export const ThreeHundredAndEighteen$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 threeHundredAndEighteenFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndEighteen$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndEighteen' 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 UserEventPayload317Project$inboundSchema = z.object({
id: types.optional(types.string()),
staticIps: z.lazy(() => StaticIps$inboundSchema),
});
export function userEventPayload317ProjectFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload317Project$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload317Project' from JSON`);
}
/** @internal */
export const UserEventPayload317Next$inboundSchema = z.object({
project: z.lazy(() => UserEventPayload317Project$inboundSchema),
});
export function userEventPayload317NextFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload317Next$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload317Next' 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 UserEventPayload317PreviousProject$inboundSchema = z.object({
id: types.optional(types.string()),
staticIps: z.lazy(() => PayloadStaticIps$inboundSchema),
});
export function userEventPayload317PreviousProjectFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload317PreviousProject$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload317PreviousProject' from JSON`);
}
/** @internal */
export const UserEventPayload317Previous$inboundSchema = z.object({
project: z.lazy(() => UserEventPayload317PreviousProject$inboundSchema),
});
export function userEventPayload317PreviousFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload317Previous$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload317Previous' from JSON`);
}
/** @internal */
export const ThreeHundredAndSeventeen$inboundSchema = z.object({
projectId: types.string(),
projectName: types.string(),
next: z.lazy(() => UserEventPayload317Next$inboundSchema),
previous: z.lazy(() => UserEventPayload317Previous$inboundSchema),
});
export function threeHundredAndSeventeenFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndSeventeen$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndSeventeen' 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 ThreeHundredAndSixteen$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 threeHundredAndSixteenFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndSixteen$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndSixteen' from JSON`);
}
/** @internal */
export const UserEventPayload315Next$inboundSchema = z.object({
skewProtectionAllowedDomains: z.array(types.string()),
});
export function userEventPayload315NextFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload315Next$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload315Next' from JSON`);
}
/** @internal */
export const UserEventPayload315Previous$inboundSchema = z.object({
skewProtectionAllowedDomains: types.optional(z.array(types.string())),
});
export function userEventPayload315PreviousFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload315Previous$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload315Previous' from JSON`);
}
/** @internal */
export const ThreeHundredAndFifteen$inboundSchema = z.object({
projectId: types.string(),
projectName: types.string(),
next: z.lazy(() => UserEventPayload315Next$inboundSchema),
previous: z.lazy(() => UserEventPayload315Previous$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({
skewProtectionMaxAge: types.number(),
});
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({
skewProtectionMaxAge: types.optional(types.number()),
});
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({
skewProtectionBoundaryAt: 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({
skewProtectionBoundaryAt: 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 UserEventPayload312Previous$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 userEventPayload312PreviousFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload312Previous$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload312Previous' from JSON`);
}
/** @internal */
export const UserEventPayload312Next$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 userEventPayload312NextFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload312Next$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload312Next' from JSON`);
}
/** @internal */
export const ThreeHundredAndTwelve$inboundSchema = z.object({
projectId: types.optional(types.string()),
projectName: types.optional(types.string()),
previous: z.lazy(() => UserEventPayload312Previous$inboundSchema),
next: z.lazy(() => UserEventPayload312Next$inboundSchema),
});
export function threeHundredAndTwelveFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndTwelve$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndTwelve' from JSON`);
}
/** @internal */
export const ThreeHundredAndEleven$inboundSchema = z.object({
projectId: types.string(),
projectName: types.string(),
publicSource: types.boolean(),
});
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(),
inheritDeploymentProtection: 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(),
protectedSourcemaps: 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(),
gitForkProtection: 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(),
customerSupportCodeVisibility: 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 IssuerMode$inboundSchema = z
.nativeEnum(IssuerMode);
/** @internal */
export const UserEventPayload306Previous$inboundSchema = z.object({
issuerMode: types.optional(IssuerMode$inboundSchema),
});
export function userEventPayload306PreviousFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload306Previous$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload306Previous' from JSON`);
}
/** @internal */
export const PayloadIssuerMode$inboundSchema = z.nativeEnum(PayloadIssuerMode);
/** @internal */
export const UserEventPayload306Next$inboundSchema = z.object({
issuerMode: PayloadIssuerMode$inboundSchema,
});
export function userEventPayload306NextFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload306Next$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload306Next' from JSON`);
}
/** @internal */
export const ThreeHundredAndSix$inboundSchema = z.object({
projectId: types.string(),
projectName: types.string(),
previous: z.lazy(() => UserEventPayload306Previous$inboundSchema),
next: z.lazy(() => UserEventPayload306Next$inboundSchema),
});
export function threeHundredAndSixFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndSix$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndSix' from JSON`);
}
/** @internal */
export const ThreeHundredAndFive$inboundSchema = z.object({
projectId: types.string(),
projectName: types.string(),
region: types.optional(types.string()),
failoverRegions: types.optional(z.array(types.string())),
});
export function threeHundredAndFiveFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndFive$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndFive' from JSON`);
}
/** @internal */
export const UserEventPayload304Previous$inboundSchema = z.object({
gitSources: z.nullable(z.array(z.any())).optional(),
deploymentSources: z.nullable(z.array(z.any())).optional(),
});
export function userEventPayload304PreviousFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload304Previous$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload304Previous' from JSON`);
}
/** @internal */
export const UserEventPayload304Next$inboundSchema = z.object({
gitSources: z.nullable(z.array(z.any())).optional(),
deploymentSources: z.nullable(z.array(z.any())).optional(),
});
export function userEventPayload304NextFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload304Next$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload304Next' from JSON`);
}
/** @internal */
export const ThreeHundredAndFour$inboundSchema = z.object({
projectId: types.string(),
projectName: types.string(),
previous: types.nullable(z.lazy(() => UserEventPayload304Previous$inboundSchema)),
next: types.nullable(z.lazy(() => UserEventPayload304Next$inboundSchema)),
});
export function threeHundredAndFourFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndFour$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndFour' from JSON`);
}
/** @internal */
export const ThreeHundredAndThree$inboundSchema = z.object({
projectId: types.string(),
projectName: types.string(),
targetDeploymentId: types.optional(types.string()),
action: types.optional(types.string()),
});
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()),
newTargetPercentage: types.optional(types.number()),
});
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()),
});
export function threeHundredAndOneFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndOne$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndOne' 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 ThreeHundred$inboundSchema = z.object({
projectId: types.string(),
projectName: types.string(),
projectAccountId: types.string(),
deploymentId: types.string(),
rollbackDescription: types.optional(z.lazy(() => RollbackDescription$inboundSchema)),
});
export function threeHundredFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundred$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundred' from JSON`);
}
/** @internal */
export const Consent$inboundSchema = z
.nativeEnum(Consent);
/** @internal */
export const TwoHundredAndNinetyNine$inboundSchema = z.object({
projectId: types.optional(types.string()),
projectName: types.string(),
consent: Consent$inboundSchema,
});
export function twoHundredAndNinetyNineFromJSON(jsonString) {
return safeParse(jsonString, (x) => TwoHundredAndNinetyNine$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TwoHundredAndNinetyNine' from JSON`);
}
/** @internal */
export const ReasonCode$inboundSchema = z
.nativeEnum(ReasonCode);
/** @internal */
export const TwoHundredAndNinetyEight$inboundSchema = z.object({
projectId: types.string(),
projectName: types.optional(types.string()),
reasonCode: types.optional(ReasonCode$inboundSchema),
});
export function twoHundredAndNinetyEightFromJSON(jsonString) {
return safeParse(jsonString, (x) => TwoHundredAndNinetyEight$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TwoHundredAndNinetyEight' from JSON`);
}
/** @internal */
export const TwoHundredAndNinetySeven$inboundSchema = z.object({
projectId: types.string(),
expiresAt: types.number(),
});
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(),
});
export function twoHundredAndNinetySixFromJSON(jsonString) {
return safeParse(jsonString, (x) => TwoHundredAndNinetySix$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TwoHundredAndNinetySix' 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 TwoHundredAndNinetyFive$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 twoHundredAndNinetyFiveFromJSON(jsonString) {
return safeParse(jsonString, (x) => TwoHundredAndNinetyFive$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TwoHundredAndNinetyFive' 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 TwoHundredAndNinetyFour$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 twoHundredAndNinetyFourFromJSON(jsonString) {
return safeParse(jsonString, (x) => TwoHundredAndNinetyFour$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TwoHundredAndNinetyFour' from JSON`);
}
/** @internal */
export const TwoHundredAndNinetyThree$inboundSchema = z.object({
source: types.string(),
projectId: types.string(),
projectName: types.string(),
});
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({
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 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({
projectId: types.string(),
projectName: types.string(),
originAccountName: types.string(),
destinationAccountName: types.string(),
destinationAccountId: 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({
previousProjectId: types.optional(types.string()),
projectName: types.string(),
destinationAccountName: types.nullable(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()),
newProjectId: types.optional(types.string()),
previousProjectName: types.string(),
newProjectName: types.string(),
originAccountName: 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 UserEventPayload288Project$inboundSchema = z.object({
id: types.string(),
name: types.string(),
});
export function userEventPayload288ProjectFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload288Project$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload288Project' from JSON`);
}
/** @internal */
export const UserEventPayload288Role$inboundSchema = z.nativeEnum(UserEventPayload288Role);
/** @internal */
export const PayloadPreviousRole$inboundSchema = z.nativeEnum(PayloadPreviousRole);
/** @internal */
export const PayloadProjectMembership$inboundSchema = z.object({
role: types.optional(UserEventPayload288Role$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 TwoHundredAndEightyEight$inboundSchema = z.object({
project: z.lazy(() => UserEventPayload288Project$inboundSchema),
projectMembership: z.lazy(() => PayloadProjectMembership$inboundSchema),
});
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({
name: types.string(),
id: types.optional(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 RemovedMembership$inboundSchema = z.object({
role: UserEventPayload287Role$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 TwoHundredAndEightySeven$inboundSchema = z.object({
project: z.lazy(() => UserEventPayload287Project$inboundSchema),
removedMembership: z.lazy(() => RemovedMembership$inboundSchema),
});
export function twoHundredAndEightySevenFromJSON(jsonString) {
return safeParse(jsonString, (x) => TwoHundredAndEightySeven$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TwoHundredAndEightySeven' from JSON`);
}
/** @internal */
export const UserEventPayload286Role$inboundSchema = z.nativeEnum(UserEventPayload286Role);
/** @internal */
export const UserEventPayload286Project$inboundSchema = z.object({
name: types.string(),
role: UserEventPayload286Role$inboundSchema,
invitedUserName: types.string(),
id: types.optional(types.string()),
invitedUserId: 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 TwoHundredAndEightySix$inboundSchema = z.object({
project: z.lazy(() => UserEventPayload286Project$inboundSchema),
});
export function twoHundredAndEightySixFromJSON(jsonString) {
return safeParse(jsonString, (x) => TwoHundredAndEightySix$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TwoHundredAndEightySix' from JSON`);
}
/** @internal */
export const UserEventPayload285Project$inboundSchema = z.object({
name: types.string(),
id: 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 UserEventPayload285Role$inboundSchema = z.nativeEnum(UserEventPayload285Role);
/** @internal */
export const ProjectMembership$inboundSchema = z.object({
role: UserEventPayload285Role$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 TwoHundredAndEightyFive$inboundSchema = z.object({
project: z.lazy(() => UserEventPayload285Project$inboundSchema),
projectMembership: types.nullable(z.lazy(() => ProjectMembership$inboundSchema)),
});
export function twoHundredAndEightyFiveFromJSON(jsonString) {
return safeParse(jsonString, (x) => TwoHundredAndEightyFive$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TwoHundredAndEightyFive' from JSON`);
}
/** @internal */
export const TwoHundredAndEightyFour$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 twoHundredAndEightyFourFromJSON(jsonString) {
return safeParse(jsonString, (x) => TwoHundredAndEightyFour$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TwoHundredAndEightyFour' 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 TwoHundredAndEightyThree$inboundSchema = z.object({
projects: z.array(z.lazy(() => PayloadProjects$inboundSchema)),
teamMembership: types.optional(z.lazy(() => TeamMembership$inboundSchema)),
directoryType: types.optional(types.string()),
});
export function twoHundredAndEightyThreeFromJSON(jsonString) {
return safeParse(jsonString, (x) => TwoHundredAndEightyThree$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TwoHundredAndEightyThree' from JSON`);
}
/** @internal */
export const TwoHundredAndEightyTwo$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 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({
oldProjectId: types.string(),
oldProjectName: types.string(),
newProjectId: types.string(),
newProjectName: types.string(),
domain: types.string(),
});
export function twoHundredAndEightyOneFromJSON(jsonString) {
return safeParse(jsonString, (x) => TwoHundredAndEightyOne$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TwoHundredAndEightyOne' from JSON`);
}
//# sourceMappingURL=twohundredandeightyone.js.map