@vercel/sdk
Version:
<p align="center"> <a href="https://vercel.com"> <img src="https://assets.vercel.com/image/upload/v1588805858/repositories/vercel/logo.png" height="96"> <h3 align="center">Vercel</h3> </a> <p align="center">Develop. Preview. Ship.</p> </p>
4,077 lines • 110 kB
text/typescript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod/v3";
import {
collectExtraKeys as collectExtraKeys$,
safeParse,
} from "../lib/schemas.js";
import { ClosedEnum } from "../types/enums.js";
import { Result as SafeParseResult } from "../types/fp.js";
import * as types from "../types/primitives.js";
import { smartUnion } from "../types/smartUnion.js";
import { SDKValidationError } from "./sdkvalidationerror.js";
export type ConsolidatedGitCommitStatus = {
enabled: boolean;
propagateFailures: boolean;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndSeventySix = {
projectId: string;
projectName: string;
consolidatedGitCommitStatus: ConsolidatedGitCommitStatus | null;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndSeventyFive = {
projectId: string;
projectName: string;
gitLFS: boolean;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndSeventyFour = {
projectId: string;
projectName: string;
gitCommitStatus: boolean;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndSeventyThree = {
disableRepositoryDispatchEvents: boolean;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndSeventyTwo = {
requireVerifiedCommits: boolean;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndSeventyOne = {
projectId: string;
projectName: string;
requireVerifiedCommits: boolean | null;
};
export const CreateDeployments = {
Disabled: "disabled",
Enabled: "enabled",
} as const;
export type CreateDeployments = ClosedEnum<typeof CreateDeployments>;
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndSeventy = {
projectId: string;
projectName: string;
createDeployments: CreateDeployments;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndSixtyNine = {
projectId: string;
projectName: string;
disableRepositoryDispatchEvents: boolean;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndSixtyEight = {
projectId: string;
projectName: string;
onCommit: boolean;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndSixtySeven = {
projectId: string;
projectName: string;
onPullRequest: boolean;
};
export const GitProvider = {
Bitbucket: "bitbucket",
CursorOrigin: "cursor-origin",
Github: "github",
GithubCustomHost: "github-custom-host",
GithubLimited: "github-limited",
Gitlab: "gitlab",
V0: "v0",
Vercel: "vercel",
} as const;
export type GitProvider = ClosedEnum<typeof GitProvider>;
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndSixtySix = {
projectId: string;
projectName: string;
gitProvider: GitProvider;
gitRepoId: string;
gitRepositoryName: string;
};
export const UserEventPayloadGitProvider = {
Bitbucket: "bitbucket",
CursorOrigin: "cursor-origin",
Github: "github",
GithubCustomHost: "github-custom-host",
GithubLimited: "github-limited",
Gitlab: "gitlab",
V0: "v0",
Vercel: "vercel",
} as const;
export type UserEventPayloadGitProvider = ClosedEnum<
typeof UserEventPayloadGitProvider
>;
export type UserEventPayload265Previous = {
gitProvider: UserEventPayloadGitProvider;
gitRepoId: string;
gitRepositoryName: string;
};
export const PayloadGitProvider = {
Bitbucket: "bitbucket",
CursorOrigin: "cursor-origin",
Github: "github",
GithubCustomHost: "github-custom-host",
GithubLimited: "github-limited",
Gitlab: "gitlab",
V0: "v0",
Vercel: "vercel",
} as const;
export type PayloadGitProvider = ClosedEnum<typeof PayloadGitProvider>;
export type UserEventPayload265Next = {
gitProvider: PayloadGitProvider;
gitRepoId: string;
gitRepositoryName: string;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndSixtyFive = {
projectId: string;
projectName: string;
previous?: UserEventPayload265Previous | undefined;
next: UserEventPayload265Next;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndSixtyFour = {
projectId: string;
projectName: string;
newProjectName: string;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndSixtyThree = {
projectId: string;
projectName: string;
previewDeploymentSuffix: string | null;
};
export type UserEventPayload262Previous = {
functionZeroConfigFailover: boolean | null;
};
export type UserEventPayload262Next = {
functionZeroConfigFailover: boolean;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndSixtyTwo = {
projectId: string;
projectName: string;
previous: UserEventPayload262Previous;
next: UserEventPayload262Next;
};
export type UserEventPayload261Previous = {
functionDefaultRegions: Array<string> | null;
};
export type UserEventPayload261Next = {
functionDefaultRegions: Array<string>;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndSixtyOne = {
projectId: string;
projectName: string;
previous: UserEventPayload261Previous;
next: UserEventPayload261Next;
};
export type UserEventPayload260Previous = {
functionDefaultMemoryType: string | null;
};
export type UserEventPayload260Next = {
functionDefaultMemoryType: string;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndSixty = {
projectId: string;
projectName: string;
previous: UserEventPayload260Previous;
next: UserEventPayload260Next;
};
export type UserEventPayload259Previous = {
functionDefaultTimeout: number | null;
};
export type UserEventPayload259Next = {
functionDefaultTimeout: number;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndFiftyNine = {
projectId: string;
projectName: string;
previous: UserEventPayload259Previous;
next: UserEventPayload259Next;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndFiftyEight = {
projectName?: string | undefined;
projectId: string;
enableFunctionsBeta: boolean;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndFiftySeven = {
projectId: string;
projectName: string;
customEnvironmentId: string;
customEnvironmentSlug: string;
};
/**
* The type of matching to perform
*/
export const UserEventPayload256Type = {
EndsWith: "endsWith",
Equals: "equals",
StartsWith: "startsWith",
} as const;
/**
* The type of matching to perform
*/
export type UserEventPayload256Type = ClosedEnum<
typeof UserEventPayload256Type
>;
export type BranchMatcher = {
/**
* The type of matching to perform
*/
type: UserEventPayload256Type;
/**
* The pattern to match against branch names
*/
pattern: string;
};
export type UserEventPayload256Previous = {
branchMatcher?: BranchMatcher | undefined;
};
/**
* The type of matching to perform
*/
export const UserEventPayload256NextType = {
EndsWith: "endsWith",
Equals: "equals",
StartsWith: "startsWith",
} as const;
/**
* The type of matching to perform
*/
export type UserEventPayload256NextType = ClosedEnum<
typeof UserEventPayload256NextType
>;
export type PayloadBranchMatcher = {
/**
* The type of matching to perform
*/
type: UserEventPayload256NextType;
/**
* The pattern to match against branch names
*/
pattern: string;
};
export type UserEventPayload256Next = {
branchMatcher?: PayloadBranchMatcher | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndFiftySix = {
projectId: string;
projectName: string;
customEnvironmentId: string;
customEnvironmentSlug: string;
previous: UserEventPayload256Previous;
next: UserEventPayload256Next;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndFiftyFive = {
projectId: string;
projectName: string;
previewDeploymentsEnabled: boolean;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndFiftyFour = {
projectId: string;
projectName: string;
autoAssignCustomDomains: boolean;
};
export const BuildQueueConfiguration = {
SkipNamespaceQueue: "SKIP_NAMESPACE_QUEUE",
WaitForNamespaceQueue: "WAIT_FOR_NAMESPACE_QUEUE",
} as const;
export type BuildQueueConfiguration = ClosedEnum<
typeof BuildQueueConfiguration
>;
export const OldBuildQueueConfiguration = {
SkipNamespaceQueue: "SKIP_NAMESPACE_QUEUE",
WaitForNamespaceQueue: "WAIT_FOR_NAMESPACE_QUEUE",
} as const;
export type OldBuildQueueConfiguration = ClosedEnum<
typeof OldBuildQueueConfiguration
>;
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndFiftyThree = {
projectId: string;
projectName: string;
elasticConcurrencyEnabled: boolean;
oldElasticConcurrencyEnabled: boolean;
buildQueueConfiguration?: BuildQueueConfiguration | undefined;
oldBuildQueueConfiguration?: OldBuildQueueConfiguration | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndFiftyTwo = {
name: string;
ownerId: string;
};
export const UserEventPayload251Action = {
Disabled: "disabled",
Enabled: "enabled",
} as const;
export type UserEventPayload251Action = ClosedEnum<
typeof UserEventPayload251Action
>;
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndFiftyOne = {
projectId: string;
projectName: string;
action: UserEventPayload251Action;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndFifty = {
projectName?: string | undefined;
projectId: string;
};
export type UserEventPayload249Team = {
name: string;
id: string;
};
export const EnvId2 = {
Preview: "preview",
Production: "production",
} as const;
export type EnvId2 = ClosedEnum<typeof EnvId2>;
export type EnvId = string | EnvId2;
export type Aws = {
subnetIds: Array<string>;
securityGroupId?: string | undefined;
};
export type OldConnectConfigurations = {
envId: string | EnvId2;
connectConfigurationId: string;
dc?: string | undefined;
passive: boolean;
buildsEnabled: boolean;
aws?: Aws | undefined;
createdAt: number;
updatedAt: number;
};
export const UserEventEnvId2 = {
Preview: "preview",
Production: "production",
} as const;
export type UserEventEnvId2 = ClosedEnum<typeof UserEventEnvId2>;
export type PayloadEnvId = string | UserEventEnvId2;
export type PayloadAws = {
subnetIds: Array<string>;
securityGroupId?: string | undefined;
};
export type NewConnectConfigurations = {
envId: string | UserEventEnvId2;
connectConfigurationId: string;
dc?: string | undefined;
passive: boolean;
buildsEnabled: boolean;
aws?: PayloadAws | undefined;
createdAt: number;
updatedAt: number;
};
export type UserEventPayload249Project = {
id: string;
name?: string | undefined;
oldConnectConfigurations: Array<OldConnectConfigurations> | null;
newConnectConfigurations: Array<NewConnectConfigurations> | null;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndFortyNine = {
team: UserEventPayload249Team;
project: UserEventPayload249Project;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndFortyEight = {
projectId?: string | undefined;
projectName?: string | undefined;
target?: Array<string> | undefined;
updated?: boolean | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndFortySeven = {
projectId?: string | undefined;
projectName?: string | undefined;
certId?: string | undefined;
origin?: string | undefined;
};
export const Widget = {
Alert: "alert",
AnalyticsOnline: "analytics-online",
AnalyticsPageViews: "analytics-page-views",
AnalyticsVisitors: "analytics-visitors",
FirewallAllowed: "firewall-allowed",
FirewallDenied: "firewall-denied",
ObservabilityAlert: "observability-alert",
ObservabilityEdgeRequests: "observability-edge-requests",
ObservabilityErrorRate: "observability-error-rate",
ObservabilityFunctionInvocations: "observability-function-invocations",
Online: "online",
Res: "res",
Shortcut: "shortcut",
SpeedInsightsCls: "speed-insights-cls",
SpeedInsightsLcp: "speed-insights-lcp",
SpeedInsightsRes: "speed-insights-res",
} as const;
export type Widget = ClosedEnum<typeof Widget>;
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndFortySix = {
projectId: string;
projectName: string;
widget: Widget | null;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndFortyFive = {
projectId?: string | undefined;
projectName: string;
/**
* Deployment whose outcome caused a system-initiated elastic resize.
*/
deploymentId?: string | undefined;
previousBuildMachineType?: string | undefined;
nextBuildMachineType: string;
previousBuildMachineSelection: string;
nextBuildMachineSelection: string;
isSystemInitiated?: boolean | undefined;
/**
* For system-initiated (elastic) changes, why the build machine was upgraded/downgraded. Stored as the raw reason code (see `ElasticChangeReason` in `@api/build-machines-types`) and rendered as a human-readable clause in the activity/audit log.
*/
reason?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndFortyFour = {
projectId: string;
projectName: string;
sourceFilesOutsideRootDirectory: boolean;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndFortyThree = {
projectId: string;
projectName: string;
productionDeploymentsFastLane: boolean;
};
export type UserEventPayload242Previous = {};
export type UserEventPayload242Next = {};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndFortyTwo = {
projectId: string;
projectName: string;
previous: UserEventPayload242Previous;
next: UserEventPayload242Next;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndFortyOne = {
projectId: string;
projectName: string;
enableExternalRewriteCaching: boolean;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndForty = {
projectId: string;
projectName: string;
enableAffectedProjectsDeployments: boolean;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndThirtyNine = {
projectId: string;
projectName: string;
avatar?: string | null | undefined;
};
export const UserEventPayload238Action = {
Disabled: "disabled",
Enabled: "enabled",
Regenerated: "regenerated",
Updated: "updated",
} as const;
export type UserEventPayload238Action = ClosedEnum<
typeof UserEventPayload238Action
>;
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndThirtyEight = {
projectId: string;
projectName: string;
action: UserEventPayload238Action;
isEnvVar?: boolean | undefined;
note?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndThirtySeven = {
projectName?: string | undefined;
projectId: string;
projectAnalytics?: { [k: string]: any } | undefined;
prevProjectAnalytics?: { [k: string]: any } | null | undefined;
};
export type ProjectAnalytics = {
id: string;
canceledAt?: number | null | undefined;
disabledAt: number;
enabledAt: number;
paidAt?: number | undefined;
sampleRatePercent?: number | null | undefined;
spendLimitInDollars?: number | null | undefined;
};
export type PrevProjectAnalytics = {
id: string;
canceledAt?: number | null | undefined;
disabledAt: number;
enabledAt: number;
paidAt?: number | undefined;
sampleRatePercent?: number | null | undefined;
spendLimitInDollars?: number | null | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndThirtySix = {
projectName?: string | undefined;
projectId: string;
projectAnalytics: ProjectAnalytics | null;
prevProjectAnalytics: PrevProjectAnalytics | null;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndThirtyFive = {
projectId: string;
projectName: string;
directoryListing: boolean;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndThirtyFour = {
projectId?: string | undefined;
projectName: string;
branch: string;
};
export type UserEventPayloadPrivateLinkEndpoint = {
id: string;
name: string;
environmentIds?: Array<string> | undefined;
privateDnsNames?: Array<string> | undefined;
};
export type PreviousEndpoint = {
name: string;
environmentIds?: Array<string> | undefined;
privateDnsNames?: Array<string> | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndThirtyThree = {
projectName?: string | undefined;
privateLinkEndpoint: UserEventPayloadPrivateLinkEndpoint;
projectId: string;
previousEndpoint: PreviousEndpoint;
};
export type UserEventPayloadPrev = {
id: string;
name: string;
projectId: string;
vercelRegion: string;
awsServiceName: string;
privateDnsNames?: Array<string> | undefined;
};
export type Current = {
id: string;
name: string;
projectId: string;
vercelRegion: string;
awsServiceName: string;
privateDnsNames?: Array<string> | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndThirtyTwo = {
projectName?: string | undefined;
prev: UserEventPayloadPrev;
current: Current;
};
export type PayloadPrivateLinkEndpoint = {
id: string;
name: string;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndThirtyOne = {
projectName?: string | undefined;
privateLinkEndpoint: PayloadPrivateLinkEndpoint;
projectId: string;
};
export type Endpoint = {
id: string;
name: string;
projectId: string;
vercelRegion: string;
awsServiceName: string;
privateDnsNames?: Array<string> | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndThirty = {
projectName?: string | undefined;
endpoint: Endpoint;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndTwentyNine = {
previewDeploymentSuffix?: string | null | undefined;
previousPreviewDeploymentSuffix?: string | null | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndTwentyEight = {
price?: number | undefined;
currency?: string | undefined;
enabled?: boolean | undefined;
};
export const UserEventPayload227Role = {
Billing: "BILLING",
Contributor: "CONTRIBUTOR",
Developer: "DEVELOPER",
Member: "MEMBER",
Owner: "OWNER",
Security: "SECURITY",
Viewer: "VIEWER",
ViewerForPlus: "VIEWER_FOR_PLUS",
} as const;
export type UserEventPayload227Role = ClosedEnum<
typeof UserEventPayload227Role
>;
export const UserEventPayload227Origin = {
AccountUpdate: "account-update",
Bitbucket: "bitbucket",
Dsync: "dsync",
Feedback: "feedback",
Github: "github",
Gitlab: "gitlab",
Import: "import",
Link: "link",
Mail: "mail",
NsnbAutoApprove: "nsnb-auto-approve",
NsnbHobbyUpgrade: "nsnb-hobby-upgrade",
NsnbInvite: "nsnb-invite",
NsnbRedeploy: "nsnb-redeploy",
NsnbRedeployAttributionCard: "nsnb-redeploy-attribution-card",
NsnbRequestAccess: "nsnb-request-access",
NsnbViewerUpgrade: "nsnb-viewer-upgrade",
OrganizationTeams: "organization-teams",
Saml: "saml",
Teams: "teams",
} as const;
export type UserEventPayload227Origin = ClosedEnum<
typeof UserEventPayload227Origin
>;
export type PayloadGitUserId = string | number;
export type PayloadJoinedFrom = {
origin: UserEventPayload227Origin;
commitId?: string | undefined;
repoId?: string | undefined;
repoPath?: string | undefined;
gitUserId?: string | number | undefined;
gitUserLogin?: string | undefined;
ssoUserId?: string | undefined;
ssoConnectedAt?: number | undefined;
idpUserId?: string | undefined;
dsyncUserId?: string | undefined;
dsyncConnectedAt?: number | undefined;
};
export type PayloadRemovedUsers = {
role: UserEventPayload227Role;
confirmed: boolean;
confirmedAt?: number | undefined;
joinedFrom?: PayloadJoinedFrom | undefined;
};
export const PayloadActorType = {
Admin: "admin",
} as const;
export type PayloadActorType = ClosedEnum<typeof PayloadActorType>;
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndTwentySeven = {
plan: string;
removedUsers?: { [k: string]: PayloadRemovedUsers } | undefined;
prevPlan?: string | undefined;
priorPlan?: string | undefined;
isDowngrade?: boolean | undefined;
userAgent?: string | undefined;
isReactivate?: boolean | undefined;
isTrialUpgrade?: boolean | undefined;
/**
* Whether the plan change was system-initiated rather than human-initiated.
*/
automated?: boolean | undefined;
/**
* Why the plan changed. For downgrades, this is a {@link DowngradeReason} from `@api/pubsub-types` (e.g. `user_downgrade`, `trial_expired`).
*/
reason?: string | undefined;
timestamp?: number | undefined;
removedMemberCount?: number | undefined;
/**
* Okta user id.
*/
actorId: string;
actorType: PayloadActorType;
actorName?: string | undefined;
};
export const UserEventPayload226Role = {
Billing: "BILLING",
Contributor: "CONTRIBUTOR",
Developer: "DEVELOPER",
Member: "MEMBER",
Owner: "OWNER",
Security: "SECURITY",
Viewer: "VIEWER",
ViewerForPlus: "VIEWER_FOR_PLUS",
} as const;
export type UserEventPayload226Role = ClosedEnum<
typeof UserEventPayload226Role
>;
export const UserEventPayloadOrigin = {
AccountUpdate: "account-update",
Bitbucket: "bitbucket",
Dsync: "dsync",
Feedback: "feedback",
Github: "github",
Gitlab: "gitlab",
Import: "import",
Link: "link",
Mail: "mail",
NsnbAutoApprove: "nsnb-auto-approve",
NsnbHobbyUpgrade: "nsnb-hobby-upgrade",
NsnbInvite: "nsnb-invite",
NsnbRedeploy: "nsnb-redeploy",
NsnbRedeployAttributionCard: "nsnb-redeploy-attribution-card",
NsnbRequestAccess: "nsnb-request-access",
NsnbViewerUpgrade: "nsnb-viewer-upgrade",
OrganizationTeams: "organization-teams",
Saml: "saml",
Teams: "teams",
} as const;
export type UserEventPayloadOrigin = ClosedEnum<typeof UserEventPayloadOrigin>;
export type UserEventPayloadGitUserId = string | number;
export type UserEventPayloadJoinedFrom = {
origin: UserEventPayloadOrigin;
commitId?: string | undefined;
repoId?: string | undefined;
repoPath?: string | undefined;
gitUserId?: string | number | undefined;
gitUserLogin?: string | undefined;
ssoUserId?: string | undefined;
ssoConnectedAt?: number | undefined;
idpUserId?: string | undefined;
dsyncUserId?: string | undefined;
dsyncConnectedAt?: number | undefined;
};
export type RemovedUsers = {
role: UserEventPayload226Role;
confirmed: boolean;
confirmedAt?: number | undefined;
joinedFrom?: UserEventPayloadJoinedFrom | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndTwentySix = {
plan: string;
removedUsers?: { [k: string]: RemovedUsers } | undefined;
prevPlan?: string | undefined;
priorPlan?: string | undefined;
isDowngrade?: boolean | undefined;
userAgent?: string | undefined;
isReactivate?: boolean | undefined;
isTrialUpgrade?: boolean | undefined;
/**
* Whether the plan change was system-initiated rather than human-initiated.
*/
automated?: boolean | undefined;
/**
* Why the plan changed. For downgrades, this is a {@link DowngradeReason} from `@api/pubsub-types` (e.g. `user_downgrade`, `trial_expired`).
*/
reason?: string | undefined;
timestamp?: number | undefined;
removedMemberCount?: number | undefined;
};
export const UserEventPayloadDeploymentType = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
} as const;
export type UserEventPayloadDeploymentType = ClosedEnum<
typeof UserEventPayloadDeploymentType
>;
export type UserEventPayloadPassport = {
connectorId: string;
deploymentType: UserEventPayloadDeploymentType;
};
export type UserEventPayload225Previous = {
passport?: UserEventPayloadPassport | null | undefined;
};
export const UserEventPayload225DeploymentType = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
} as const;
export type UserEventPayload225DeploymentType = ClosedEnum<
typeof UserEventPayload225DeploymentType
>;
export type UserEventPayload225Passport = {
connectorId: string;
deploymentType: UserEventPayload225DeploymentType;
};
export type UserEventPayload225Next = {
passport?: UserEventPayload225Passport | null | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndTwentyFive = {
previous: UserEventPayload225Previous;
next: UserEventPayload225Next;
};
export const UserEventPayload224DeploymentType = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
} as const;
export type UserEventPayload224DeploymentType = ClosedEnum<
typeof UserEventPayload224DeploymentType
>;
export type Passport = {
connectorId: string;
deploymentType: UserEventPayload224DeploymentType;
};
export type UserEventPayload224Previous = {
passport?: Passport | null | undefined;
};
export const PayloadDeploymentType = {
All: "all",
AllExceptCustomDomains: "all_except_custom_domains",
Preview: "preview",
ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
} as const;
export type PayloadDeploymentType = ClosedEnum<typeof PayloadDeploymentType>;
export type PayloadPassport = {
connectorId: string;
deploymentType: PayloadDeploymentType;
};
export type UserEventPayload224Next = {
passport?: PayloadPassport | null | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndTwentyFour = {
projectId: string;
projectName: string;
previous: UserEventPayload224Previous;
next: UserEventPayload224Next;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndTwentyThree = {
projectId: string;
environment: string;
host: string;
connectorId: string;
connectorType: string;
connectorService: string;
externalIssuer: string;
externalSubject: string;
sessionId: string;
emailVerified?: boolean | undefined;
tenantId?: string | undefined;
installationId?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndTwentyTwo = {
oldName: string;
newName: string;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndTwentyOne = {
projectId: string;
projectName: string;
pattern: string;
justification: string;
additionalProperties?: { [k: string]: any } | undefined;
};
export const PayloadKind = {
ConnectSrc: "connectSrc",
Script: "script",
} as const;
export type PayloadKind = ClosedEnum<typeof PayloadKind>;
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndTwenty = {
projectId: string;
url?: string | undefined;
headerName?: string | undefined;
previousStatus: string;
justification: string | null;
kind?: PayloadKind | undefined;
};
export const UserEventPayload219Type = {
ConnectSrc: "connectSrc",
} as const;
export type UserEventPayload219Type = ClosedEnum<
typeof UserEventPayload219Type
>;
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndNineteen = {
projectId: string;
type: UserEventPayload219Type;
resourceUrl: string;
};
export const UserEventPayload218Type = {
Header: "header",
} as const;
export type UserEventPayload218Type = ClosedEnum<
typeof UserEventPayload218Type
>;
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndEighteen = {
projectId: string;
type: UserEventPayload218Type;
headerName: string;
};
export const UserEventPayloadType = {
Script: "script",
} as const;
export type UserEventPayloadType = ClosedEnum<typeof UserEventPayloadType>;
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndSeventeen = {
projectId: string;
type: UserEventPayloadType;
resourceUrl: string;
};
export const ApprovalScope = {
All: "all",
Preview: "preview",
} as const;
export type ApprovalScope = ClosedEnum<typeof ApprovalScope>;
export const UserEventPayloadKind = {
ConnectSrc: "connectSrc",
Script: "script",
} as const;
export type UserEventPayloadKind = ClosedEnum<typeof UserEventPayloadKind>;
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndSixteen = {
projectId: string;
url: string;
previousStatus: string;
justification: string;
approvalScope?: ApprovalScope | undefined;
kind?: UserEventPayloadKind | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndFifteen = {
projectId: string;
projectName: string;
deletedCount: number;
scriptCount: number;
connectSrcCount: number;
connectSrcOriginCount: number;
headerCount: number;
connectSrcUserNormalizationRuleCount?: number | undefined;
connectSrcNormalizationRulesCleared?: boolean | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndFourteen = {
projectId: string;
headerName: string;
previousStatus: string;
justification: string | null;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndThirteen = {
projectId: string;
headerName: string;
previousStatus: string;
justification: string;
};
export const EnforcementScope = {
All: "all",
Preview: "preview",
} as const;
export type EnforcementScope = ClosedEnum<typeof EnforcementScope>;
export const NewResourceBlockingPolicy = {
Allow: "allow",
Block: "block",
} as const;
export type NewResourceBlockingPolicy = ClosedEnum<
typeof NewResourceBlockingPolicy
>;
export type UserEventPayloadPrevious = {
enabled: boolean;
mode: string;
enforcementScope?: EnforcementScope | undefined;
enforcePercentage: number;
newResourceBlockingPolicy: NewResourceBlockingPolicy;
allowUnsafeScriptSrcKeywords: boolean;
omitScriptNonce?: boolean | undefined;
connectSrcNotificationsEnabled?: boolean | undefined;
computedScriptSrc?: string | undefined;
computedScriptSrcPreview?: string | undefined;
computedConnectSrc?: string | undefined;
computedConnectSrcPreview?: string | undefined;
};
export const PayloadEnforcementScope = {
All: "all",
Preview: "preview",
} as const;
export type PayloadEnforcementScope = ClosedEnum<
typeof PayloadEnforcementScope
>;
export const PayloadNewResourceBlockingPolicy = {
Allow: "allow",
Block: "block",
} as const;
export type PayloadNewResourceBlockingPolicy = ClosedEnum<
typeof PayloadNewResourceBlockingPolicy
>;
export type UserEventPayloadNext = {
enabled: boolean;
mode: string;
enforcementScope?: PayloadEnforcementScope | undefined;
enforcePercentage: number;
newResourceBlockingPolicy: PayloadNewResourceBlockingPolicy;
allowUnsafeScriptSrcKeywords: boolean;
omitScriptNonce?: boolean | undefined;
connectSrcNotificationsEnabled?: boolean | undefined;
computedScriptSrc?: string | undefined;
computedScriptSrcPreview?: string | undefined;
computedConnectSrc?: string | undefined;
computedConnectSrcPreview?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndTwelve = {
projectId: string;
previous: UserEventPayloadPrevious | null;
next: UserEventPayloadNext;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndEleven = {
ownerId: string;
source: string;
cause: string;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndTen = {
ownerId: string;
source: string;
cause: string;
blockReason?: string | undefined;
};
/**
* The payload of the event, if requested.
*/
export type TwoHundredAndNine = {
ownerId: string;
source: string;
cause: string;
reason?: string | null | undefined;
};
export type SiftRoute = {
name: string;
};
/** @internal */
export const ConsolidatedGitCommitStatus$inboundSchema: z.ZodType<
ConsolidatedGitCommitStatus,
z.ZodTypeDef,
unknown
> = z.object({
enabled: types.boolean(),
propagateFailures: types.boolean(),
});
export function consolidatedGitCommitStatusFromJSON(
jsonString: string,
): SafeParseResult<ConsolidatedGitCommitStatus, SDKValidationError> {
return safeParse(
jsonString,
(x) => ConsolidatedGitCommitStatus$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ConsolidatedGitCommitStatus' from JSON`,
);
}
/** @internal */
export const TwoHundredAndSeventySix$inboundSchema: z.ZodType<
TwoHundredAndSeventySix,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
consolidatedGitCommitStatus: types.nullable(
z.lazy(() => ConsolidatedGitCommitStatus$inboundSchema),
),
});
export function twoHundredAndSeventySixFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndSeventySix, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndSeventySix$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndSeventySix' from JSON`,
);
}
/** @internal */
export const TwoHundredAndSeventyFive$inboundSchema: z.ZodType<
TwoHundredAndSeventyFive,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
gitLFS: types.boolean(),
});
export function twoHundredAndSeventyFiveFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndSeventyFive, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndSeventyFive$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndSeventyFive' from JSON`,
);
}
/** @internal */
export const TwoHundredAndSeventyFour$inboundSchema: z.ZodType<
TwoHundredAndSeventyFour,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
gitCommitStatus: types.boolean(),
});
export function twoHundredAndSeventyFourFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndSeventyFour, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndSeventyFour$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndSeventyFour' from JSON`,
);
}
/** @internal */
export const TwoHundredAndSeventyThree$inboundSchema: z.ZodType<
TwoHundredAndSeventyThree,
z.ZodTypeDef,
unknown
> = z.object({
disableRepositoryDispatchEvents: types.boolean(),
});
export function twoHundredAndSeventyThreeFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndSeventyThree, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndSeventyThree$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndSeventyThree' from JSON`,
);
}
/** @internal */
export const TwoHundredAndSeventyTwo$inboundSchema: z.ZodType<
TwoHundredAndSeventyTwo,
z.ZodTypeDef,
unknown
> = z.object({
requireVerifiedCommits: types.boolean(),
});
export function twoHundredAndSeventyTwoFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndSeventyTwo, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndSeventyTwo$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndSeventyTwo' from JSON`,
);
}
/** @internal */
export const TwoHundredAndSeventyOne$inboundSchema: z.ZodType<
TwoHundredAndSeventyOne,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
requireVerifiedCommits: types.nullable(types.boolean()),
});
export function twoHundredAndSeventyOneFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndSeventyOne, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndSeventyOne$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndSeventyOne' from JSON`,
);
}
/** @internal */
export const CreateDeployments$inboundSchema: z.ZodNativeEnum<
typeof CreateDeployments
> = z.nativeEnum(CreateDeployments);
/** @internal */
export const TwoHundredAndSeventy$inboundSchema: z.ZodType<
TwoHundredAndSeventy,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
createDeployments: CreateDeployments$inboundSchema,
});
export function twoHundredAndSeventyFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndSeventy, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndSeventy$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndSeventy' from JSON`,
);
}
/** @internal */
export const TwoHundredAndSixtyNine$inboundSchema: z.ZodType<
TwoHundredAndSixtyNine,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
disableRepositoryDispatchEvents: types.boolean(),
});
export function twoHundredAndSixtyNineFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndSixtyNine, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndSixtyNine$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndSixtyNine' from JSON`,
);
}
/** @internal */
export const TwoHundredAndSixtyEight$inboundSchema: z.ZodType<
TwoHundredAndSixtyEight,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
onCommit: types.boolean(),
});
export function twoHundredAndSixtyEightFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndSixtyEight, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndSixtyEight$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndSixtyEight' from JSON`,
);
}
/** @internal */
export const TwoHundredAndSixtySeven$inboundSchema: z.ZodType<
TwoHundredAndSixtySeven,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
onPullRequest: types.boolean(),
});
export function twoHundredAndSixtySevenFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndSixtySeven, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndSixtySeven$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndSixtySeven' from JSON`,
);
}
/** @internal */
export const GitProvider$inboundSchema: z.ZodNativeEnum<typeof GitProvider> = z
.nativeEnum(GitProvider);
/** @internal */
export const TwoHundredAndSixtySix$inboundSchema: z.ZodType<
TwoHundredAndSixtySix,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
gitProvider: GitProvider$inboundSchema,
gitRepoId: types.string(),
gitRepositoryName: types.string(),
});
export function twoHundredAndSixtySixFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndSixtySix, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndSixtySix$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndSixtySix' from JSON`,
);
}
/** @internal */
export const UserEventPayloadGitProvider$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayloadGitProvider
> = z.nativeEnum(UserEventPayloadGitProvider);
/** @internal */
export const UserEventPayload265Previous$inboundSchema: z.ZodType<
UserEventPayload265Previous,
z.ZodTypeDef,
unknown
> = z.object({
gitProvider: UserEventPayloadGitProvider$inboundSchema,
gitRepoId: types.string(),
gitRepositoryName: types.string(),
});
export function userEventPayload265PreviousFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload265Previous, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload265Previous$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload265Previous' from JSON`,
);
}
/** @internal */
export const PayloadGitProvider$inboundSchema: z.ZodNativeEnum<
typeof PayloadGitProvider
> = z.nativeEnum(PayloadGitProvider);
/** @internal */
export const UserEventPayload265Next$inboundSchema: z.ZodType<
UserEventPayload265Next,
z.ZodTypeDef,
unknown
> = z.object({
gitProvider: PayloadGitProvider$inboundSchema,
gitRepoId: types.string(),
gitRepositoryName: types.string(),
});
export function userEventPayload265NextFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload265Next, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload265Next$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload265Next' from JSON`,
);
}
/** @internal */
export const TwoHundredAndSixtyFive$inboundSchema: z.ZodType<
TwoHundredAndSixtyFive,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
previous: types.optional(
z.lazy(() => UserEventPayload265Previous$inboundSchema),
),
next: z.lazy(() => UserEventPayload265Next$inboundSchema),
});
export function twoHundredAndSixtyFiveFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndSixtyFive, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndSixtyFive$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndSixtyFive' from JSON`,
);
}
/** @internal */
export const TwoHundredAndSixtyFour$inboundSchema: z.ZodType<
TwoHundredAndSixtyFour,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
newProjectName: types.string(),
});
export function twoHundredAndSixtyFourFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndSixtyFour, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndSixtyFour$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndSixtyFour' from JSON`,
);
}
/** @internal */
export const TwoHundredAndSixtyThree$inboundSchema: z.ZodType<
TwoHundredAndSixtyThree,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
previewDeploymentSuffix: types.nullable(types.string()),
});
export function twoHundredAndSixtyThreeFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndSixtyThree, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndSixtyThree$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndSixtyThree' from JSON`,
);
}
/** @internal */
export const UserEventPayload262Previous$inboundSchema: z.ZodType<
UserEventPayload262Previous,
z.ZodTypeDef,
unknown
> = z.object({
functionZeroConfigFailover: types.nullable(types.boolean()),
});
export function userEventPayload262PreviousFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload262Previous, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload262Previous$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload262Previous' from JSON`,
);
}
/** @internal */
export const UserEventPayload262Next$inboundSchema: z.ZodType<
UserEventPayload262Next,
z.ZodTypeDef,
unknown
> = z.object({
functionZeroConfigFailover: types.boolean(),
});
export function userEventPayload262NextFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload262Next, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload262Next$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload262Next' from JSON`,
);
}
/** @internal */
export const TwoHundredAndSixtyTwo$inboundSchema: z.ZodType<
TwoHundredAndSixtyTwo,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
previous: z.lazy(() => UserEventPayload262Previous$inboundSchema),
next: z.lazy(() => UserEventPayload262Next$inboundSchema),
});
export function twoHundredAndSixtyTwoFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndSixtyTwo, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndSixtyTwo$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndSixtyTwo' from JSON`,
);
}
/** @internal */
export const UserEventPayload261Previous$inboundSchema: z.ZodType<
UserEventPayload261Previous,
z.ZodTypeDef,
unknown
> = z.object({
functionDefaultRegions: types.nullable(z.array(types.string())),
});
export function userEventPayload261PreviousFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload261Previous, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload261Previous$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload261Previous' from JSON`,
);
}
/** @internal */
export const UserEventPayload261Next$inboundSchema: z.ZodType<
UserEventPayload261Next,
z.ZodTypeDef,
unknown
> = z.object({
functionDefaultRegions: z.array(types.string()),
});
export function userEventPayload261NextFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload261Next, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload261Next$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload261Next' from JSON`,
);
}
/** @internal */
export const TwoHundredAndSixtyOne$inboundSchema: z.ZodType<
TwoHundredAndSixtyOne,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
previous: z.lazy(() => UserEventPayload261Previous$inboundSchema),
next: z.lazy(() => UserEventPayload261Next$inboundSchema),
});
export function twoHundredAndSixtyOneFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndSixtyOne, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndSixtyOne$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndSixtyOne' from JSON`,
);
}
/** @internal */
export const UserEventPayload260Previous$inboundSchema: z.ZodType<
UserEventPayload260Previous,
z.ZodTypeDef,
unknown
> = z.object({
functionDefaultMemoryType: types.nullable(types.string()),
});
export function userEventPayload260PreviousFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload260Previous, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload260Previous$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload260Previous' from JSON`,
);
}
/** @internal */
export const UserEventPayload260Next$inboundSchema: z.ZodType<
UserEventPayload260Next,
z.ZodTypeDef,
unknown
> = z.object({
functionDefaultMemoryType: types.string(),
});
export function userEventPayload260NextFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload260Next, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload260Next$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload260Next' from JSON`,
);
}
/** @internal */
export const TwoHundredAndSixty$inboundSchema: z.ZodType<
TwoHundredAndSixty,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
previous: z.lazy(() => UserEventPayload260Previous$inboundSchema),
next: z.lazy(() => UserEventPayload260Next$inboundSchema),
});
export function twoHundredAndSixtyFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndSixty, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndSixty$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndSixty' from JSON`,
);
}
/** @internal */
export const UserEventPayload259Previous$inboundSchema: z.ZodType<
UserEventPayload259Previous,
z.ZodTypeDef,
unknown
> = z.object({
functionDefaultTimeout: types.nullable(types.number()),
});
export function userEventPayload259PreviousFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload259Previous, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload259Previous$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload259Previous' from JSON`,
);
}
/** @internal */
export const UserEventPayload259Next$inboundSchema: z.ZodType<
UserEventPayload259Next,
z.ZodTypeDef,
unknown
> = z.object({
functionDefaultTimeout: types.number(),
});
export function userEventPayload259NextFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload259Next, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload259Next$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload259Next' from JSON`,
);
}
/** @internal */
export const TwoHundredAndFiftyNine$inboundSchema: z.ZodType<
TwoHundredAndFiftyNine,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
previous: z.lazy(() => UserEventPayload259Previous$inboundSchema),
next: z.lazy(() => UserEventPayload259Next$inboundSchema),
});
export function twoHundredAndFiftyNineFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndFiftyNine, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndFiftyNine$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndFiftyNine' from JSON`,
);
}
/** @internal */
export const TwoHundredAndFiftyEight$inboundSchema: z.ZodType<
TwoHundredAndFiftyEight,
z.ZodTypeDef,
unknown
> = z.object({
projectName: types.optional(types.string()),
projectId: types.string(),
enableFunctionsBeta: types.boolean(),
});
export function twoHundredAndFiftyEightFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndFiftyEight, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndFiftyEight$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndFiftyEight' from JSON`,
);
}
/** @internal */
export const TwoHundredAndFiftySeven$inboundSchema: z.ZodType<
TwoHundredAndFiftySeven,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
customEnvironmentId: types.string(),
customEnvironmentSlug: types.string(),
});
export function twoHundredAndFiftySevenFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndFiftySeven, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndFiftySeven$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndFiftySeven' from JSON`,
);
}
/** @internal */
export const UserEventPayload256Type$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload256Type
> = z.nativeEnum(UserEventPayload256Type);
/** @internal */
export const BranchMatcher$inboundSchema: z.ZodType<
BranchMatcher,
z.ZodTypeDef,
unknown
> = z.object({
type: UserEventPayload256Type$inboundSchema,
pattern: types.string(),
});
export function branchMatcherFromJSON(
jsonString: string,
): SafeParseResult<BranchMatcher, SDKValidationError> {
return safeParse(
jsonString,
(x) => BranchMatcher$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'BranchMatcher' from JSON`,
);
}
/** @internal */
export const UserEventPayload256Previous$inboundSchema: z.ZodType<
UserEventPayload256Previous,
z.ZodTypeDef,
unknown
> = z.object({
branchMatcher: types.optional(z.lazy(() => BranchMatcher$inboundSchema)),
});
export function userEventPayload256PreviousFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload256Previous, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload256Previous$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload256Previous' from JSON`,
);
}
/** @internal */
export const UserEventPayload256NextType$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload256NextType
> = z.nativeEnum(UserEventPayload256NextType);
/** @internal */
export const PayloadBranchMatcher$inboundSchema: z.ZodType<
PayloadBranchMatcher,
z.ZodTypeDef,
unknown
> = z.object({
type: UserEventPayload256NextType$inboundSchema,
pattern: types.string(),
});
export function payloadBranchMatcherFromJSON(
jsonString: string,
): SafeParseResult<PayloadBranchMatcher, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadBranchMatcher$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadBranchMatcher' from JSON`,
);
}
/** @internal */
export const UserEventPayload256Next$inboundSchema: z.ZodType<
UserEventPayload256Next,
z.ZodTypeDef,
unknown
> = z.object({
branchMatcher: types.optional(
z.lazy(() => PayloadBranchMatcher$inboundSchema),
),
});
export function userEventPayload256NextFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload256Next, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload256Next$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload256Next' from JSON`,
);
}
/** @internal */
export const TwoHundredAndFiftySix$inboundSchema: z.ZodType<
TwoHundredAndFiftySix,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
customEnvironmentId: types.string(),
customEnvironmentSlug: types.string(),
previous: z.lazy(() => UserEventPayload256Previous$inboundSchema),
next: z.lazy(() => UserEventPayload256Next$inboundSchema),
});
export function twoHundredAndFiftySixFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndFiftySix, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndFiftySix$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndFiftySix' from JSON`,
);
}
/** @internal */
export const TwoHundredAndFiftyFive$inboundSchema: z.ZodType<
TwoHundredAndFiftyFive,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
previewDeploymentsEnabled: types.boolean(),
});
export function twoHundredAndFiftyFiveFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndFiftyFive, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndFiftyFive$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndFiftyFive' from JSON`,
);
}
/** @internal */
export const TwoHundredAndFiftyFour$inboundSchema: z.ZodType<
TwoHundredAndFiftyFour,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
autoAssignCustomDomains: types.boolean(),
});
export function twoHundredAndFiftyFourFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndFiftyFour, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndFiftyFour$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndFiftyFour' from JSON`,
);
}
/** @internal */
export const BuildQueueConfiguration$inboundSchema: z.ZodNativeEnum<
typeof BuildQueueConfiguration
> = z.nativeEnum(BuildQueueConfiguration);
/** @internal */
export const OldBuildQueueConfiguration$inboundSchema: z.ZodNativeEnum<
typeof OldBuildQueueConfiguration
> = z.nativeEnum(OldBuildQueueConfiguration);
/** @internal */
export const TwoHundredAndFiftyThree$inboundSchema: z.ZodType<
TwoHundredAndFiftyThree,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
elasticConcurrencyEnabled: types.boolean(),
oldElasticConcurrencyEnabled: types.boolean(),
buildQueueConfiguration: types.optional(
BuildQueueConfiguration$inboundSchema,
),
oldBuildQueueConfiguration: types.optional(
OldBuildQueueConfiguration$inboundSchema,
),
});
export function twoHundredAndFiftyThreeFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndFiftyThree, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndFiftyThree$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndFiftyThree' from JSON`,
);
}
/** @internal */
export const TwoHundredAndFiftyTwo$inboundSchema: z.ZodType<
TwoHundredAndFiftyTwo,
z.ZodTypeDef,
unknown
> = z.object({
name: types.string(),
ownerId: types.string(),
});
export function twoHundredAndFiftyTwoFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndFiftyTwo, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndFiftyTwo$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndFiftyTwo' from JSON`,
);
}
/** @internal */
export const UserEventPayload251Action$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload251Action
> = z.nativeEnum(UserEventPayload251Action);
/** @internal */
export const TwoHundredAndFiftyOne$inboundSchema: z.ZodType<
TwoHundredAndFiftyOne,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
action: UserEventPayload251Action$inboundSchema,
});
export function twoHundredAndFiftyOneFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndFiftyOne, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndFiftyOne$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndFiftyOne' from JSON`,
);
}
/** @internal */
export const TwoHundredAndFifty$inboundSchema: z.ZodType<
TwoHundredAndFifty,
z.ZodTypeDef,
unknown
> = z.object({
projectName: types.optional(types.string()),
projectId: types.string(),
});
export function twoHundredAndFiftyFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndFifty, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndFifty$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndFifty' from JSON`,
);
}
/** @internal */
export const UserEventPayload249Team$inboundSchema: z.ZodType<
UserEventPayload249Team,
z.ZodTypeDef,
unknown
> = z.object({
name: types.string(),
id: types.string(),
});
export function userEventPayload249TeamFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload249Team, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload249Team$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload249Team' from JSON`,
);
}
/** @internal */
export const EnvId2$inboundSchema: z.ZodNativeEnum<typeof EnvId2> = z
.nativeEnum(EnvId2);
/** @internal */
export const EnvId$inboundSchema: z.ZodType<EnvId, z.ZodTypeDef, unknown> =
smartUnion([types.string(), EnvId2$inboundSchema]);
export function envIdFromJSON(
jsonString: string,
): SafeParseResult<EnvId, SDKValidationError> {
return safeParse(
jsonString,
(x) => EnvId$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'EnvId' from JSON`,
);
}
/** @internal */
export const Aws$inboundSchema: z.ZodType<Aws, z.ZodTypeDef, unknown> = z
.object({
subnetIds: z.array(types.string()),
securityGroupId: types.optional(types.string()),
});
export function awsFromJSON(
jsonString: string,
): SafeParseResult<Aws, SDKValidationError> {
return safeParse(
jsonString,
(x) => Aws$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Aws' from JSON`,
);
}
/** @internal */
export const OldConnectConfigurations$inboundSchema: z.ZodType<
OldConnectConfigurations,
z.ZodTypeDef,
unknown
> = z.object({
envId: smartUnion([types.string(), EnvId2$inboundSchema]),
connectConfigurationId: types.string(),
dc: types.optional(types.string()),
passive: types.boolean(),
buildsEnabled: types.boolean(),
aws: types.optional(z.lazy(() => Aws$inboundSchema)),
createdAt: types.number(),
updatedAt: types.number(),
});
export function oldConnectConfigurationsFromJSON(
jsonString: string,
): SafeParseResult<OldConnectConfigurations, SDKValidationError> {
return safeParse(
jsonString,
(x) => OldConnectConfigurations$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'OldConnectConfigurations' from JSON`,
);
}
/** @internal */
export const UserEventEnvId2$inboundSchema: z.ZodNativeEnum<
typeof UserEventEnvId2
> = z.nativeEnum(UserEventEnvId2);
/** @internal */
export const PayloadEnvId$inboundSchema: z.ZodType<
PayloadEnvId,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), UserEventEnvId2$inboundSchema]);
export function payloadEnvIdFromJSON(
jsonString: string,
): SafeParseResult<PayloadEnvId, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadEnvId$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadEnvId' from JSON`,
);
}
/** @internal */
export const PayloadAws$inboundSchema: z.ZodType<
PayloadAws,
z.ZodTypeDef,
unknown
> = z.object({
subnetIds: z.array(types.string()),
securityGroupId: types.optional(types.string()),
});
export function payloadAwsFromJSON(
jsonString: string,
): SafeParseResult<PayloadAws, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadAws$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadAws' from JSON`,
);
}
/** @internal */
export const NewConnectConfigurations$inboundSchema: z.ZodType<
NewConnectConfigurations,
z.ZodTypeDef,
unknown
> = z.object({
envId: smartUnion([types.string(), UserEventEnvId2$inboundSchema]),
connectConfigurationId: types.string(),
dc: types.optional(types.string()),
passive: types.boolean(),
buildsEnabled: types.boolean(),
aws: types.optional(z.lazy(() => PayloadAws$inboundSchema)),
createdAt: types.number(),
updatedAt: types.number(),
});
export function newConnectConfigurationsFromJSON(
jsonString: string,
): SafeParseResult<NewConnectConfigurations, SDKValidationError> {
return safeParse(
jsonString,
(x) => NewConnectConfigurations$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'NewConnectConfigurations' from JSON`,
);
}
/** @internal */
export const UserEventPayload249Project$inboundSchema: z.ZodType<
UserEventPayload249Project,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
name: types.optional(types.string()),
oldConnectConfigurations: types.nullable(
z.array(z.lazy(() => OldConnectConfigurations$inboundSchema)),
),
newConnectConfigurations: types.nullable(
z.array(z.lazy(() => NewConnectConfigurations$inboundSchema)),
),
});
export function userEventPayload249ProjectFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload249Project, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload249Project$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload249Project' from JSON`,
);
}
/** @internal */
export const TwoHundredAndFortyNine$inboundSchema: z.ZodType<
TwoHundredAndFortyNine,
z.ZodTypeDef,
unknown
> = z.object({
team: z.lazy(() => UserEventPayload249Team$inboundSchema),
project: z.lazy(() => UserEventPayload249Project$inboundSchema),
});
export function twoHundredAndFortyNineFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndFortyNine, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndFortyNine$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndFortyNine' from JSON`,
);
}
/** @internal */
export const TwoHundredAndFortyEight$inboundSchema: z.ZodType<
TwoHundredAndFortyEight,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.optional(types.string()),
projectName: types.optional(types.string()),
target: types.optional(z.array(types.string())),
updated: types.optional(types.boolean()),
});
export function twoHundredAndFortyEightFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndFortyEight, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndFortyEight$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndFortyEight' from JSON`,
);
}
/** @internal */
export const TwoHundredAndFortySeven$inboundSchema: z.ZodType<
TwoHundredAndFortySeven,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.optional(types.string()),
projectName: types.optional(types.string()),
certId: types.optional(types.string()),
origin: types.optional(types.string()),
});
export function twoHundredAndFortySevenFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndFortySeven, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndFortySeven$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndFortySeven' from JSON`,
);
}
/** @internal */
export const Widget$inboundSchema: z.ZodNativeEnum<typeof Widget> = z
.nativeEnum(Widget);
/** @internal */
export const TwoHundredAndFortySix$inboundSchema: z.ZodType<
TwoHundredAndFortySix,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
widget: types.nullable(Widget$inboundSchema),
});
export function twoHundredAndFortySixFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndFortySix, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndFortySix$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndFortySix' from JSON`,
);
}
/** @internal */
export const TwoHundredAndFortyFive$inboundSchema: z.ZodType<
TwoHundredAndFortyFive,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.optional(types.string()),
projectName: types.string(),
deploymentId: types.optional(types.string()),
previousBuildMachineType: types.optional(types.string()),
nextBuildMachineType: types.string(),
previousBuildMachineSelection: types.string(),
nextBuildMachineSelection: types.string(),
isSystemInitiated: types.optional(types.boolean()),
reason: types.optional(types.string()),
});
export function twoHundredAndFortyFiveFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndFortyFive, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndFortyFive$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndFortyFive' from JSON`,
);
}
/** @internal */
export const TwoHundredAndFortyFour$inboundSchema: z.ZodType<
TwoHundredAndFortyFour,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
sourceFilesOutsideRootDirectory: types.boolean(),
});
export function twoHundredAndFortyFourFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndFortyFour, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndFortyFour$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndFortyFour' from JSON`,
);
}
/** @internal */
export const TwoHundredAndFortyThree$inboundSchema: z.ZodType<
TwoHundredAndFortyThree,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
productionDeploymentsFastLane: types.boolean(),
});
export function twoHundredAndFortyThreeFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndFortyThree, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndFortyThree$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndFortyThree' from JSON`,
);
}
/** @internal */
export const UserEventPayload242Previous$inboundSchema: z.ZodType<
UserEventPayload242Previous,
z.ZodTypeDef,
unknown
> = z.object({});
export function userEventPayload242PreviousFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload242Previous, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload242Previous$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload242Previous' from JSON`,
);
}
/** @internal */
export const UserEventPayload242Next$inboundSchema: z.ZodType<
UserEventPayload242Next,
z.ZodTypeDef,
unknown
> = z.object({});
export function userEventPayload242NextFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload242Next, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload242Next$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload242Next' from JSON`,
);
}
/** @internal */
export const TwoHundredAndFortyTwo$inboundSchema: z.ZodType<
TwoHundredAndFortyTwo,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
previous: z.lazy(() => UserEventPayload242Previous$inboundSchema),
next: z.lazy(() => UserEventPayload242Next$inboundSchema),
});
export function twoHundredAndFortyTwoFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndFortyTwo, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndFortyTwo$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndFortyTwo' from JSON`,
);
}
/** @internal */
export const TwoHundredAndFortyOne$inboundSchema: z.ZodType<
TwoHundredAndFortyOne,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
enableExternalRewriteCaching: types.boolean(),
});
export function twoHundredAndFortyOneFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndFortyOne, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndFortyOne$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndFortyOne' from JSON`,
);
}
/** @internal */
export const TwoHundredAndForty$inboundSchema: z.ZodType<
TwoHundredAndForty,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
enableAffectedProjectsDeployments: types.boolean(),
});
export function twoHundredAndFortyFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndForty, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndForty$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndForty' from JSON`,
);
}
/** @internal */
export const TwoHundredAndThirtyNine$inboundSchema: z.ZodType<
TwoHundredAndThirtyNine,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
avatar: z.nullable(types.string()).optional(),
});
export function twoHundredAndThirtyNineFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndThirtyNine, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndThirtyNine$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndThirtyNine' from JSON`,
);
}
/** @internal */
export const UserEventPayload238Action$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload238Action
> = z.nativeEnum(UserEventPayload238Action);
/** @internal */
export const TwoHundredAndThirtyEight$inboundSchema: z.ZodType<
TwoHundredAndThirtyEight,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
action: UserEventPayload238Action$inboundSchema,
isEnvVar: types.optional(types.boolean()),
note: types.optional(types.string()),
});
export function twoHundredAndThirtyEightFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndThirtyEight, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndThirtyEight$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndThirtyEight' from JSON`,
);
}
/** @internal */
export const TwoHundredAndThirtySeven$inboundSchema: z.ZodType<
TwoHundredAndThirtySeven,
z.ZodTypeDef,
unknown
> = z.object({
projectName: types.optional(types.string()),
projectId: types.string(),
projectAnalytics: types.optional(z.record(z.any())),
prevProjectAnalytics: z.nullable(z.record(z.any())).optional(),
});
export function twoHundredAndThirtySevenFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndThirtySeven, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndThirtySeven$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndThirtySeven' from JSON`,
);
}
/** @internal */
export const ProjectAnalytics$inboundSchema: z.ZodType<
ProjectAnalytics,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
canceledAt: z.nullable(types.number()).optional(),
disabledAt: types.number(),
enabledAt: types.number(),
paidAt: types.optional(types.number()),
sampleRatePercent: z.nullable(types.number()).optional(),
spendLimitInDollars: z.nullable(types.number()).optional(),
});
export function projectAnalyticsFromJSON(
jsonString: string,
): SafeParseResult<ProjectAnalytics, SDKValidationError> {
return safeParse(
jsonString,
(x) => ProjectAnalytics$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'ProjectAnalytics' from JSON`,
);
}
/** @internal */
export const PrevProjectAnalytics$inboundSchema: z.ZodType<
PrevProjectAnalytics,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
canceledAt: z.nullable(types.number()).optional(),
disabledAt: types.number(),
enabledAt: types.number(),
paidAt: types.optional(types.number()),
sampleRatePercent: z.nullable(types.number()).optional(),
spendLimitInDollars: z.nullable(types.number()).optional(),
});
export function prevProjectAnalyticsFromJSON(
jsonString: string,
): SafeParseResult<PrevProjectAnalytics, SDKValidationError> {
return safeParse(
jsonString,
(x) => PrevProjectAnalytics$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PrevProjectAnalytics' from JSON`,
);
}
/** @internal */
export const TwoHundredAndThirtySix$inboundSchema: z.ZodType<
TwoHundredAndThirtySix,
z.ZodTypeDef,
unknown
> = z.object({
projectName: types.optional(types.string()),
projectId: types.string(),
projectAnalytics: types.nullable(
z.lazy(() => ProjectAnalytics$inboundSchema),
),
prevProjectAnalytics: types.nullable(
z.lazy(() => PrevProjectAnalytics$inboundSchema),
),
});
export function twoHundredAndThirtySixFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndThirtySix, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndThirtySix$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndThirtySix' from JSON`,
);
}
/** @internal */
export const TwoHundredAndThirtyFive$inboundSchema: z.ZodType<
TwoHundredAndThirtyFive,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
directoryListing: types.boolean(),
});
export function twoHundredAndThirtyFiveFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndThirtyFive, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndThirtyFive$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndThirtyFive' from JSON`,
);
}
/** @internal */
export const TwoHundredAndThirtyFour$inboundSchema: z.ZodType<
TwoHundredAndThirtyFour,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.optional(types.string()),
projectName: types.string(),
branch: types.string(),
});
export function twoHundredAndThirtyFourFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndThirtyFour, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndThirtyFour$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndThirtyFour' from JSON`,
);
}
/** @internal */
export const UserEventPayloadPrivateLinkEndpoint$inboundSchema: z.ZodType<
UserEventPayloadPrivateLinkEndpoint,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
name: types.string(),
environmentIds: types.optional(z.array(types.string())),
privateDnsNames: types.optional(z.array(types.string())),
});
export function userEventPayloadPrivateLinkEndpointFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayloadPrivateLinkEndpoint, SDKValidationError> {
return safeParse(
jsonString,
(x) =>
UserEventPayloadPrivateLinkEndpoint$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayloadPrivateLinkEndpoint' from JSON`,
);
}
/** @internal */
export const PreviousEndpoint$inboundSchema: z.ZodType<
PreviousEndpoint,
z.ZodTypeDef,
unknown
> = z.object({
name: types.string(),
environmentIds: types.optional(z.array(types.string())),
privateDnsNames: types.optional(z.array(types.string())),
});
export function previousEndpointFromJSON(
jsonString: string,
): SafeParseResult<PreviousEndpoint, SDKValidationError> {
return safeParse(
jsonString,
(x) => PreviousEndpoint$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PreviousEndpoint' from JSON`,
);
}
/** @internal */
export const TwoHundredAndThirtyThree$inboundSchema: z.ZodType<
TwoHundredAndThirtyThree,
z.ZodTypeDef,
unknown
> = z.object({
projectName: types.optional(types.string()),
privateLinkEndpoint: z.lazy(() =>
UserEventPayloadPrivateLinkEndpoint$inboundSchema
),
projectId: types.string(),
previousEndpoint: z.lazy(() => PreviousEndpoint$inboundSchema),
});
export function twoHundredAndThirtyThreeFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndThirtyThree, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndThirtyThree$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndThirtyThree' from JSON`,
);
}
/** @internal */
export const UserEventPayloadPrev$inboundSchema: z.ZodType<
UserEventPayloadPrev,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
name: types.string(),
projectId: types.string(),
vercelRegion: types.string(),
awsServiceName: types.string(),
privateDnsNames: types.optional(z.array(types.string())),
});
export function userEventPayloadPrevFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayloadPrev, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayloadPrev$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayloadPrev' from JSON`,
);
}
/** @internal */
export const Current$inboundSchema: z.ZodType<Current, z.ZodTypeDef, unknown> =
z.object({
id: types.string(),
name: types.string(),
projectId: types.string(),
vercelRegion: types.string(),
awsServiceName: types.string(),
privateDnsNames: types.optional(z.array(types.string())),
});
export function currentFromJSON(
jsonString: string,
): SafeParseResult<Current, SDKValidationError> {
return safeParse(
jsonString,
(x) => Current$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Current' from JSON`,
);
}
/** @internal */
export const TwoHundredAndThirtyTwo$inboundSchema: z.ZodType<
TwoHundredAndThirtyTwo,
z.ZodTypeDef,
unknown
> = z.object({
projectName: types.optional(types.string()),
prev: z.lazy(() => UserEventPayloadPrev$inboundSchema),
current: z.lazy(() => Current$inboundSchema),
});
export function twoHundredAndThirtyTwoFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndThirtyTwo, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndThirtyTwo$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndThirtyTwo' from JSON`,
);
}
/** @internal */
export const PayloadPrivateLinkEndpoint$inboundSchema: z.ZodType<
PayloadPrivateLinkEndpoint,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
name: types.string(),
});
export function payloadPrivateLinkEndpointFromJSON(
jsonString: string,
): SafeParseResult<PayloadPrivateLinkEndpoint, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadPrivateLinkEndpoint$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadPrivateLinkEndpoint' from JSON`,
);
}
/** @internal */
export const TwoHundredAndThirtyOne$inboundSchema: z.ZodType<
TwoHundredAndThirtyOne,
z.ZodTypeDef,
unknown
> = z.object({
projectName: types.optional(types.string()),
privateLinkEndpoint: z.lazy(() => PayloadPrivateLinkEndpoint$inboundSchema),
projectId: types.string(),
});
export function twoHundredAndThirtyOneFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndThirtyOne, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndThirtyOne$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndThirtyOne' from JSON`,
);
}
/** @internal */
export const Endpoint$inboundSchema: z.ZodType<
Endpoint,
z.ZodTypeDef,
unknown
> = z.object({
id: types.string(),
name: types.string(),
projectId: types.string(),
vercelRegion: types.string(),
awsServiceName: types.string(),
privateDnsNames: types.optional(z.array(types.string())),
});
export function endpointFromJSON(
jsonString: string,
): SafeParseResult<Endpoint, SDKValidationError> {
return safeParse(
jsonString,
(x) => Endpoint$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Endpoint' from JSON`,
);
}
/** @internal */
export const TwoHundredAndThirty$inboundSchema: z.ZodType<
TwoHundredAndThirty,
z.ZodTypeDef,
unknown
> = z.object({
projectName: types.optional(types.string()),
endpoint: z.lazy(() => Endpoint$inboundSchema),
});
export function twoHundredAndThirtyFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndThirty, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndThirty$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndThirty' from JSON`,
);
}
/** @internal */
export const TwoHundredAndTwentyNine$inboundSchema: z.ZodType<
TwoHundredAndTwentyNine,
z.ZodTypeDef,
unknown
> = z.object({
previewDeploymentSuffix: z.nullable(types.string()).optional(),
previousPreviewDeploymentSuffix: z.nullable(types.string()).optional(),
});
export function twoHundredAndTwentyNineFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndTwentyNine, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndTwentyNine$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndTwentyNine' from JSON`,
);
}
/** @internal */
export const TwoHundredAndTwentyEight$inboundSchema: z.ZodType<
TwoHundredAndTwentyEight,
z.ZodTypeDef,
unknown
> = z.object({
price: types.optional(types.number()),
currency: types.optional(types.string()),
enabled: types.optional(types.boolean()),
});
export function twoHundredAndTwentyEightFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndTwentyEight, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndTwentyEight$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndTwentyEight' from JSON`,
);
}
/** @internal */
export const UserEventPayload227Role$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload227Role
> = z.nativeEnum(UserEventPayload227Role);
/** @internal */
export const UserEventPayload227Origin$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload227Origin
> = z.nativeEnum(UserEventPayload227Origin);
/** @internal */
export const PayloadGitUserId$inboundSchema: z.ZodType<
PayloadGitUserId,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number()]);
export function payloadGitUserIdFromJSON(
jsonString: string,
): SafeParseResult<PayloadGitUserId, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadGitUserId$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadGitUserId' from JSON`,
);
}
/** @internal */
export const PayloadJoinedFrom$inboundSchema: z.ZodType<
PayloadJoinedFrom,
z.ZodTypeDef,
unknown
> = z.object({
origin: UserEventPayload227Origin$inboundSchema,
commitId: types.optional(types.string()),
repoId: types.optional(types.string()),
repoPath: types.optional(types.string()),
gitUserId: types.optional(smartUnion([types.string(), types.number()])),
gitUserLogin: types.optional(types.string()),
ssoUserId: types.optional(types.string()),
ssoConnectedAt: types.optional(types.number()),
idpUserId: types.optional(types.string()),
dsyncUserId: types.optional(types.string()),
dsyncConnectedAt: types.optional(types.number()),
});
export function payloadJoinedFromFromJSON(
jsonString: string,
): SafeParseResult<PayloadJoinedFrom, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadJoinedFrom$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadJoinedFrom' from JSON`,
);
}
/** @internal */
export const PayloadRemovedUsers$inboundSchema: z.ZodType<
PayloadRemovedUsers,
z.ZodTypeDef,
unknown
> = z.object({
role: UserEventPayload227Role$inboundSchema,
confirmed: types.boolean(),
confirmedAt: types.optional(types.number()),
joinedFrom: types.optional(z.lazy(() => PayloadJoinedFrom$inboundSchema)),
});
export function payloadRemovedUsersFromJSON(
jsonString: string,
): SafeParseResult<PayloadRemovedUsers, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadRemovedUsers$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadRemovedUsers' from JSON`,
);
}
/** @internal */
export const PayloadActorType$inboundSchema: z.ZodNativeEnum<
typeof PayloadActorType
> = z.nativeEnum(PayloadActorType);
/** @internal */
export const TwoHundredAndTwentySeven$inboundSchema: z.ZodType<
TwoHundredAndTwentySeven,
z.ZodTypeDef,
unknown
> = z.object({
plan: types.string(),
removedUsers: types.optional(
z.record(z.lazy(() => PayloadRemovedUsers$inboundSchema)),
),
prevPlan: types.optional(types.string()),
priorPlan: types.optional(types.string()),
isDowngrade: types.optional(types.boolean()),
userAgent: types.optional(types.string()),
isReactivate: types.optional(types.boolean()),
isTrialUpgrade: types.optional(types.boolean()),
automated: types.optional(types.boolean()),
reason: types.optional(types.string()),
timestamp: types.optional(types.number()),
removedMemberCount: types.optional(types.number()),
actorId: types.string(),
actorType: PayloadActorType$inboundSchema,
actorName: types.optional(types.string()),
});
export function twoHundredAndTwentySevenFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndTwentySeven, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndTwentySeven$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndTwentySeven' from JSON`,
);
}
/** @internal */
export const UserEventPayload226Role$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload226Role
> = z.nativeEnum(UserEventPayload226Role);
/** @internal */
export const UserEventPayloadOrigin$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayloadOrigin
> = z.nativeEnum(UserEventPayloadOrigin);
/** @internal */
export const UserEventPayloadGitUserId$inboundSchema: z.ZodType<
UserEventPayloadGitUserId,
z.ZodTypeDef,
unknown
> = smartUnion([types.string(), types.number()]);
export function userEventPayloadGitUserIdFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayloadGitUserId, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayloadGitUserId$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayloadGitUserId' from JSON`,
);
}
/** @internal */
export const UserEventPayloadJoinedFrom$inboundSchema: z.ZodType<
UserEventPayloadJoinedFrom,
z.ZodTypeDef,
unknown
> = z.object({
origin: UserEventPayloadOrigin$inboundSchema,
commitId: types.optional(types.string()),
repoId: types.optional(types.string()),
repoPath: types.optional(types.string()),
gitUserId: types.optional(smartUnion([types.string(), types.number()])),
gitUserLogin: types.optional(types.string()),
ssoUserId: types.optional(types.string()),
ssoConnectedAt: types.optional(types.number()),
idpUserId: types.optional(types.string()),
dsyncUserId: types.optional(types.string()),
dsyncConnectedAt: types.optional(types.number()),
});
export function userEventPayloadJoinedFromFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayloadJoinedFrom, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayloadJoinedFrom$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayloadJoinedFrom' from JSON`,
);
}
/** @internal */
export const RemovedUsers$inboundSchema: z.ZodType<
RemovedUsers,
z.ZodTypeDef,
unknown
> = z.object({
role: UserEventPayload226Role$inboundSchema,
confirmed: types.boolean(),
confirmedAt: types.optional(types.number()),
joinedFrom: types.optional(
z.lazy(() => UserEventPayloadJoinedFrom$inboundSchema),
),
});
export function removedUsersFromJSON(
jsonString: string,
): SafeParseResult<RemovedUsers, SDKValidationError> {
return safeParse(
jsonString,
(x) => RemovedUsers$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'RemovedUsers' from JSON`,
);
}
/** @internal */
export const TwoHundredAndTwentySix$inboundSchema: z.ZodType<
TwoHundredAndTwentySix,
z.ZodTypeDef,
unknown
> = z.object({
plan: types.string(),
removedUsers: types.optional(
z.record(z.lazy(() => RemovedUsers$inboundSchema)),
),
prevPlan: types.optional(types.string()),
priorPlan: types.optional(types.string()),
isDowngrade: types.optional(types.boolean()),
userAgent: types.optional(types.string()),
isReactivate: types.optional(types.boolean()),
isTrialUpgrade: types.optional(types.boolean()),
automated: types.optional(types.boolean()),
reason: types.optional(types.string()),
timestamp: types.optional(types.number()),
removedMemberCount: types.optional(types.number()),
});
export function twoHundredAndTwentySixFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndTwentySix, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndTwentySix$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndTwentySix' from JSON`,
);
}
/** @internal */
export const UserEventPayloadDeploymentType$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayloadDeploymentType
> = z.nativeEnum(UserEventPayloadDeploymentType);
/** @internal */
export const UserEventPayloadPassport$inboundSchema: z.ZodType<
UserEventPayloadPassport,
z.ZodTypeDef,
unknown
> = z.object({
connectorId: types.string(),
deploymentType: UserEventPayloadDeploymentType$inboundSchema,
});
export function userEventPayloadPassportFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayloadPassport, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayloadPassport$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayloadPassport' from JSON`,
);
}
/** @internal */
export const UserEventPayload225Previous$inboundSchema: z.ZodType<
UserEventPayload225Previous,
z.ZodTypeDef,
unknown
> = z.object({
passport: z.nullable(z.lazy(() => UserEventPayloadPassport$inboundSchema))
.optional(),
});
export function userEventPayload225PreviousFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload225Previous, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload225Previous$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload225Previous' from JSON`,
);
}
/** @internal */
export const UserEventPayload225DeploymentType$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload225DeploymentType
> = z.nativeEnum(UserEventPayload225DeploymentType);
/** @internal */
export const UserEventPayload225Passport$inboundSchema: z.ZodType<
UserEventPayload225Passport,
z.ZodTypeDef,
unknown
> = z.object({
connectorId: types.string(),
deploymentType: UserEventPayload225DeploymentType$inboundSchema,
});
export function userEventPayload225PassportFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload225Passport, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload225Passport$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload225Passport' from JSON`,
);
}
/** @internal */
export const UserEventPayload225Next$inboundSchema: z.ZodType<
UserEventPayload225Next,
z.ZodTypeDef,
unknown
> = z.object({
passport: z.nullable(z.lazy(() => UserEventPayload225Passport$inboundSchema))
.optional(),
});
export function userEventPayload225NextFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload225Next, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload225Next$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload225Next' from JSON`,
);
}
/** @internal */
export const TwoHundredAndTwentyFive$inboundSchema: z.ZodType<
TwoHundredAndTwentyFive,
z.ZodTypeDef,
unknown
> = z.object({
previous: z.lazy(() => UserEventPayload225Previous$inboundSchema),
next: z.lazy(() => UserEventPayload225Next$inboundSchema),
});
export function twoHundredAndTwentyFiveFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndTwentyFive, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndTwentyFive$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndTwentyFive' from JSON`,
);
}
/** @internal */
export const UserEventPayload224DeploymentType$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload224DeploymentType
> = z.nativeEnum(UserEventPayload224DeploymentType);
/** @internal */
export const Passport$inboundSchema: z.ZodType<
Passport,
z.ZodTypeDef,
unknown
> = z.object({
connectorId: types.string(),
deploymentType: UserEventPayload224DeploymentType$inboundSchema,
});
export function passportFromJSON(
jsonString: string,
): SafeParseResult<Passport, SDKValidationError> {
return safeParse(
jsonString,
(x) => Passport$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'Passport' from JSON`,
);
}
/** @internal */
export const UserEventPayload224Previous$inboundSchema: z.ZodType<
UserEventPayload224Previous,
z.ZodTypeDef,
unknown
> = z.object({
passport: z.nullable(z.lazy(() => Passport$inboundSchema)).optional(),
});
export function userEventPayload224PreviousFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload224Previous, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload224Previous$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload224Previous' from JSON`,
);
}
/** @internal */
export const PayloadDeploymentType$inboundSchema: z.ZodNativeEnum<
typeof PayloadDeploymentType
> = z.nativeEnum(PayloadDeploymentType);
/** @internal */
export const PayloadPassport$inboundSchema: z.ZodType<
PayloadPassport,
z.ZodTypeDef,
unknown
> = z.object({
connectorId: types.string(),
deploymentType: PayloadDeploymentType$inboundSchema,
});
export function payloadPassportFromJSON(
jsonString: string,
): SafeParseResult<PayloadPassport, SDKValidationError> {
return safeParse(
jsonString,
(x) => PayloadPassport$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'PayloadPassport' from JSON`,
);
}
/** @internal */
export const UserEventPayload224Next$inboundSchema: z.ZodType<
UserEventPayload224Next,
z.ZodTypeDef,
unknown
> = z.object({
passport: z.nullable(z.lazy(() => PayloadPassport$inboundSchema)).optional(),
});
export function userEventPayload224NextFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayload224Next, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayload224Next$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayload224Next' from JSON`,
);
}
/** @internal */
export const TwoHundredAndTwentyFour$inboundSchema: z.ZodType<
TwoHundredAndTwentyFour,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
previous: z.lazy(() => UserEventPayload224Previous$inboundSchema),
next: z.lazy(() => UserEventPayload224Next$inboundSchema),
});
export function twoHundredAndTwentyFourFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndTwentyFour, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndTwentyFour$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndTwentyFour' from JSON`,
);
}
/** @internal */
export const TwoHundredAndTwentyThree$inboundSchema: z.ZodType<
TwoHundredAndTwentyThree,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
environment: types.string(),
host: types.string(),
connectorId: types.string(),
connectorType: types.string(),
connectorService: types.string(),
externalIssuer: types.string(),
externalSubject: types.string(),
sessionId: types.string(),
emailVerified: types.optional(types.boolean()),
tenantId: types.optional(types.string()),
installationId: types.optional(types.string()),
});
export function twoHundredAndTwentyThreeFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndTwentyThree, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndTwentyThree$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndTwentyThree' from JSON`,
);
}
/** @internal */
export const TwoHundredAndTwentyTwo$inboundSchema: z.ZodType<
TwoHundredAndTwentyTwo,
z.ZodTypeDef,
unknown
> = z.object({
oldName: types.string(),
newName: types.string(),
});
export function twoHundredAndTwentyTwoFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndTwentyTwo, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndTwentyTwo$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndTwentyTwo' from JSON`,
);
}
/** @internal */
export const TwoHundredAndTwentyOne$inboundSchema: z.ZodType<
TwoHundredAndTwentyOne,
z.ZodTypeDef,
unknown
> = collectExtraKeys$(
z.object({
projectId: types.string(),
projectName: types.string(),
pattern: types.string(),
justification: types.string(),
}).catchall(z.any()),
"additionalProperties",
true,
);
export function twoHundredAndTwentyOneFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndTwentyOne, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndTwentyOne$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndTwentyOne' from JSON`,
);
}
/** @internal */
export const PayloadKind$inboundSchema: z.ZodNativeEnum<typeof PayloadKind> = z
.nativeEnum(PayloadKind);
/** @internal */
export const TwoHundredAndTwenty$inboundSchema: z.ZodType<
TwoHundredAndTwenty,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
url: types.optional(types.string()),
headerName: types.optional(types.string()),
previousStatus: types.string(),
justification: types.nullable(types.string()),
kind: types.optional(PayloadKind$inboundSchema),
});
export function twoHundredAndTwentyFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndTwenty, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndTwenty$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndTwenty' from JSON`,
);
}
/** @internal */
export const UserEventPayload219Type$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload219Type
> = z.nativeEnum(UserEventPayload219Type);
/** @internal */
export const TwoHundredAndNineteen$inboundSchema: z.ZodType<
TwoHundredAndNineteen,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
type: UserEventPayload219Type$inboundSchema,
resourceUrl: types.string(),
});
export function twoHundredAndNineteenFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndNineteen, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndNineteen$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndNineteen' from JSON`,
);
}
/** @internal */
export const UserEventPayload218Type$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayload218Type
> = z.nativeEnum(UserEventPayload218Type);
/** @internal */
export const TwoHundredAndEighteen$inboundSchema: z.ZodType<
TwoHundredAndEighteen,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
type: UserEventPayload218Type$inboundSchema,
headerName: types.string(),
});
export function twoHundredAndEighteenFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndEighteen, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndEighteen$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndEighteen' from JSON`,
);
}
/** @internal */
export const UserEventPayloadType$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayloadType
> = z.nativeEnum(UserEventPayloadType);
/** @internal */
export const TwoHundredAndSeventeen$inboundSchema: z.ZodType<
TwoHundredAndSeventeen,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
type: UserEventPayloadType$inboundSchema,
resourceUrl: types.string(),
});
export function twoHundredAndSeventeenFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndSeventeen, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndSeventeen$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndSeventeen' from JSON`,
);
}
/** @internal */
export const ApprovalScope$inboundSchema: z.ZodNativeEnum<
typeof ApprovalScope
> = z.nativeEnum(ApprovalScope);
/** @internal */
export const UserEventPayloadKind$inboundSchema: z.ZodNativeEnum<
typeof UserEventPayloadKind
> = z.nativeEnum(UserEventPayloadKind);
/** @internal */
export const TwoHundredAndSixteen$inboundSchema: z.ZodType<
TwoHundredAndSixteen,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
url: types.string(),
previousStatus: types.string(),
justification: types.string(),
approvalScope: types.optional(ApprovalScope$inboundSchema),
kind: types.optional(UserEventPayloadKind$inboundSchema),
});
export function twoHundredAndSixteenFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndSixteen, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndSixteen$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndSixteen' from JSON`,
);
}
/** @internal */
export const TwoHundredAndFifteen$inboundSchema: z.ZodType<
TwoHundredAndFifteen,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
projectName: types.string(),
deletedCount: types.number(),
scriptCount: types.number(),
connectSrcCount: types.number(),
connectSrcOriginCount: types.number(),
headerCount: types.number(),
connectSrcUserNormalizationRuleCount: types.optional(types.number()),
connectSrcNormalizationRulesCleared: types.optional(types.boolean()),
});
export function twoHundredAndFifteenFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndFifteen, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndFifteen$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndFifteen' from JSON`,
);
}
/** @internal */
export const TwoHundredAndFourteen$inboundSchema: z.ZodType<
TwoHundredAndFourteen,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
headerName: types.string(),
previousStatus: types.string(),
justification: types.nullable(types.string()),
});
export function twoHundredAndFourteenFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndFourteen, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndFourteen$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndFourteen' from JSON`,
);
}
/** @internal */
export const TwoHundredAndThirteen$inboundSchema: z.ZodType<
TwoHundredAndThirteen,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
headerName: types.string(),
previousStatus: types.string(),
justification: types.string(),
});
export function twoHundredAndThirteenFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndThirteen, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndThirteen$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndThirteen' from JSON`,
);
}
/** @internal */
export const EnforcementScope$inboundSchema: z.ZodNativeEnum<
typeof EnforcementScope
> = z.nativeEnum(EnforcementScope);
/** @internal */
export const NewResourceBlockingPolicy$inboundSchema: z.ZodNativeEnum<
typeof NewResourceBlockingPolicy
> = z.nativeEnum(NewResourceBlockingPolicy);
/** @internal */
export const UserEventPayloadPrevious$inboundSchema: z.ZodType<
UserEventPayloadPrevious,
z.ZodTypeDef,
unknown
> = z.object({
enabled: types.boolean(),
mode: types.string(),
enforcementScope: types.optional(EnforcementScope$inboundSchema),
enforcePercentage: types.number(),
newResourceBlockingPolicy: NewResourceBlockingPolicy$inboundSchema,
allowUnsafeScriptSrcKeywords: types.boolean(),
omitScriptNonce: types.optional(types.boolean()),
connectSrcNotificationsEnabled: types.optional(types.boolean()),
computedScriptSrc: types.optional(types.string()),
computedScriptSrcPreview: types.optional(types.string()),
computedConnectSrc: types.optional(types.string()),
computedConnectSrcPreview: types.optional(types.string()),
});
export function userEventPayloadPreviousFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayloadPrevious, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayloadPrevious$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayloadPrevious' from JSON`,
);
}
/** @internal */
export const PayloadEnforcementScope$inboundSchema: z.ZodNativeEnum<
typeof PayloadEnforcementScope
> = z.nativeEnum(PayloadEnforcementScope);
/** @internal */
export const PayloadNewResourceBlockingPolicy$inboundSchema: z.ZodNativeEnum<
typeof PayloadNewResourceBlockingPolicy
> = z.nativeEnum(PayloadNewResourceBlockingPolicy);
/** @internal */
export const UserEventPayloadNext$inboundSchema: z.ZodType<
UserEventPayloadNext,
z.ZodTypeDef,
unknown
> = z.object({
enabled: types.boolean(),
mode: types.string(),
enforcementScope: types.optional(PayloadEnforcementScope$inboundSchema),
enforcePercentage: types.number(),
newResourceBlockingPolicy: PayloadNewResourceBlockingPolicy$inboundSchema,
allowUnsafeScriptSrcKeywords: types.boolean(),
omitScriptNonce: types.optional(types.boolean()),
connectSrcNotificationsEnabled: types.optional(types.boolean()),
computedScriptSrc: types.optional(types.string()),
computedScriptSrcPreview: types.optional(types.string()),
computedConnectSrc: types.optional(types.string()),
computedConnectSrcPreview: types.optional(types.string()),
});
export function userEventPayloadNextFromJSON(
jsonString: string,
): SafeParseResult<UserEventPayloadNext, SDKValidationError> {
return safeParse(
jsonString,
(x) => UserEventPayloadNext$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'UserEventPayloadNext' from JSON`,
);
}
/** @internal */
export const TwoHundredAndTwelve$inboundSchema: z.ZodType<
TwoHundredAndTwelve,
z.ZodTypeDef,
unknown
> = z.object({
projectId: types.string(),
previous: types.nullable(
z.lazy(() => UserEventPayloadPrevious$inboundSchema),
),
next: z.lazy(() => UserEventPayloadNext$inboundSchema),
});
export function twoHundredAndTwelveFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndTwelve, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndTwelve$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndTwelve' from JSON`,
);
}
/** @internal */
export const TwoHundredAndEleven$inboundSchema: z.ZodType<
TwoHundredAndEleven,
z.ZodTypeDef,
unknown
> = z.object({
ownerId: types.string(),
source: types.string(),
cause: types.string(),
});
export function twoHundredAndElevenFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndEleven, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndEleven$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndEleven' from JSON`,
);
}
/** @internal */
export const TwoHundredAndTen$inboundSchema: z.ZodType<
TwoHundredAndTen,
z.ZodTypeDef,
unknown
> = z.object({
ownerId: types.string(),
source: types.string(),
cause: types.string(),
blockReason: types.optional(types.string()),
});
export function twoHundredAndTenFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndTen, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndTen$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndTen' from JSON`,
);
}
/** @internal */
export const TwoHundredAndNine$inboundSchema: z.ZodType<
TwoHundredAndNine,
z.ZodTypeDef,
unknown
> = z.object({
ownerId: types.string(),
source: types.string(),
cause: types.string(),
reason: z.nullable(types.string()).optional(),
});
export function twoHundredAndNineFromJSON(
jsonString: string,
): SafeParseResult<TwoHundredAndNine, SDKValidationError> {
return safeParse(
jsonString,
(x) => TwoHundredAndNine$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'TwoHundredAndNine' from JSON`,
);
}
/** @internal */
export const SiftRoute$inboundSchema: z.ZodType<
SiftRoute,
z.ZodTypeDef,
unknown
> = z.object({
name: types.string(),
});
export function siftRouteFromJSON(
jsonString: string,
): SafeParseResult<SiftRoute, SDKValidationError> {
return safeParse(
jsonString,
(x) => SiftRoute$inboundSchema.parse(JSON.parse(x)),
`Failed to parse 'SiftRoute' from JSON`,
);
}