@vercel/sdk
Version:
<p align="center"> <a href="https://vercel.com"> <img src="https://assets.vercel.com/image/upload/v1588805858/repositories/vercel/logo.png" height="96"> <h3 align="center">Vercel</h3> </a> <p align="center">Develop. Preview. Ship.</p> </p>
1,451 lines • 60.8 kB
JavaScript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod/v3";
import { safeParse } from "../lib/schemas.js";
import * as types from "../types/primitives.js";
import { smartUnion } from "../types/smartUnion.js";
export const UserEventPayload405ActorType = {
Admin: "admin",
};
export const UserEventPayload403ActorType = {
Admin: "admin",
User: "user",
};
export const UserEventPayloadReason = {
LimitsExceeded: "limits-exceeded",
};
export const UserEventPayload400Type = {
HeadSampling: "head_sampling",
};
export const Env = {
Preview: "preview",
Production: "production",
};
export const UserEventPayload399ActorType = {
Admin: "admin",
};
export const Previous2 = {
Billing: "BILLING",
Contributor: "CONTRIBUTOR",
Developer: "DEVELOPER",
Member: "MEMBER",
Owner: "OWNER",
Security: "SECURITY",
Viewer: "VIEWER",
ViewerForPlus: "VIEWER_FOR_PLUS",
};
export const Next2 = {
Billing: "BILLING",
Contributor: "CONTRIBUTOR",
Developer: "DEVELOPER",
Member: "MEMBER",
Owner: "OWNER",
Security: "SECURITY",
Viewer: "VIEWER",
ViewerForPlus: "VIEWER_FOR_PLUS",
};
export const PayloadScope = {
Dashboard: "dashboard",
LogDrains: "log-drains",
};
export const PayloadEnabled = {
Default: "default",
Off: "off",
On: "on",
};
export const PayloadConsent = {
Granted: "granted",
Refused: "refused",
};
export const Decision = {
KeepOn: "keep_on",
TurnOff: "turn_off",
};
export const UserEventPayload386ActorType = {
Admin: "admin",
};
export const PayloadPlan = {
Enterprise: "enterprise",
Hobby: "hobby",
Pro: "pro",
};
export const UserEventPayloadPlan = {
Enterprise: "enterprise",
Hobby: "hobby",
Pro: "pro",
};
export const PreviousTeamRoles = {
Billing: "BILLING",
Contributor: "CONTRIBUTOR",
Developer: "DEVELOPER",
Member: "MEMBER",
Owner: "OWNER",
Security: "SECURITY",
Viewer: "VIEWER",
ViewerForPlus: "VIEWER_FOR_PLUS",
};
export const PayloadTeamRoles = {
Billing: "BILLING",
Contributor: "CONTRIBUTOR",
Developer: "DEVELOPER",
Member: "MEMBER",
Owner: "OWNER",
Security: "SECURITY",
Viewer: "VIEWER",
ViewerForPlus: "VIEWER_FOR_PLUS",
};
export const PreviousTeamPermissions = {
AiGatewayApiKeyOwnedBySelf: "AiGatewayApiKeyOwnedBySelf",
AiGatewayBudgetManager: "AiGatewayBudgetManager",
AiGatewayCredits: "AiGatewayCredits",
AiGatewaySettings: "AiGatewaySettings",
AiGatewayTranscriptsManager: "AiGatewayTranscriptsManager",
AiGatewayTranscriptsViewer: "AiGatewayTranscriptsViewer",
ConnectorManager: "ConnectorManager",
CreateProject: "CreateProject",
EnvVariableManager: "EnvVariableManager",
EnvironmentManager: "EnvironmentManager",
FullProductionDeployment: "FullProductionDeployment",
IntegrationManager: "IntegrationManager",
OrgAdmin: "OrgAdmin",
OrgViewer: "OrgViewer",
UsageViewer: "UsageViewer",
V0Builder: "V0Builder",
V0Chatter: "V0Chatter",
V0Viewer: "V0Viewer",
WorkflowDecryptor: "WorkflowDecryptor",
};
export const PayloadTeamPermissions = {
AiGatewayApiKeyOwnedBySelf: "AiGatewayApiKeyOwnedBySelf",
AiGatewayBudgetManager: "AiGatewayBudgetManager",
AiGatewayCredits: "AiGatewayCredits",
AiGatewaySettings: "AiGatewaySettings",
AiGatewayTranscriptsManager: "AiGatewayTranscriptsManager",
AiGatewayTranscriptsViewer: "AiGatewayTranscriptsViewer",
ConnectorManager: "ConnectorManager",
CreateProject: "CreateProject",
EnvVariableManager: "EnvVariableManager",
EnvironmentManager: "EnvironmentManager",
FullProductionDeployment: "FullProductionDeployment",
IntegrationManager: "IntegrationManager",
OrgAdmin: "OrgAdmin",
OrgViewer: "OrgViewer",
UsageViewer: "UsageViewer",
V0Builder: "V0Builder",
V0Chatter: "V0Chatter",
V0Viewer: "V0Viewer",
WorkflowDecryptor: "WorkflowDecryptor",
};
export const PayloadSource = {
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",
};
export const PayloadRole = {
Billing: "BILLING",
Contributor: "CONTRIBUTOR",
Developer: "DEVELOPER",
Member: "MEMBER",
Owner: "OWNER",
Security: "SECURITY",
Viewer: "VIEWER",
ViewerForPlus: "VIEWER_FOR_PLUS",
};
export const PreviousPlan = {
Enterprise: "enterprise",
Hobby: "hobby",
Pro: "pro",
};
export const NewPlan = {
Enterprise: "enterprise",
Hobby: "hobby",
Pro: "pro",
};
export const UserEventPayloadEnvironment = {
Preview: "preview",
Production: "production",
};
export const Enabled = {
Default: "default",
DefaultForce: "default-force",
Off: "off",
OffForce: "off-force",
On: "on",
OnForce: "on-force",
};
export const PayloadEnvironment = {
Preview: "preview",
Production: "production",
};
export const UserEventPayload361Role = {
Billing: "BILLING",
Contributor: "CONTRIBUTOR",
Developer: "DEVELOPER",
Member: "MEMBER",
Owner: "OWNER",
Security: "SECURITY",
Viewer: "VIEWER",
ViewerForPlus: "VIEWER_FOR_PLUS",
};
export const UserEventPayload360Previous = {
Basic: "basic",
Elastic: "elastic",
Enhanced: "enhanced",
Standard: "standard",
Turbo: "turbo",
};
export const UserEventPayload360Next = {
Basic: "basic",
Elastic: "elastic",
Enhanced: "enhanced",
Standard: "standard",
Turbo: "turbo",
};
export const PayloadReason = {
BasicFloor: "basic-floor",
BuildTimeoutFailure: "build-timeout-failure",
EnospcFailure: "enospc-failure",
EnterpriseFloor: "enterprise-floor",
HighPeakDisk: "high-peak-disk",
HighPeakMemory: "high-peak-memory",
LongBuildDuration: "long-build-duration",
OomFailure: "oom-failure",
PlanChange: "plan-change",
ProjectTransfer: "project-transfer",
ShortBuildDuration: "short-build-duration",
SustainedHighCpu: "sustained-high-cpu",
};
export const UserEventPayload359Previous = {
AutoApproval: "auto-approval",
Block: "block",
ManualApproval: "manual-approval",
};
export const UserEventPayload359Next = {
AutoApproval: "auto-approval",
Block: "block",
ManualApproval: "manual-approval",
};
/**
* Which repository visibilities get automatic reviews
*/
export const UserEventPayload355Scope = {
All: "all",
Private: "private",
Public: "public",
SelectedRepos: "selected_repos",
};
/**
* Which repository visibilities get automatic reviews
*/
export const UserEventPayload355NextScope = {
All: "all",
Private: "private",
Public: "public",
SelectedRepos: "selected_repos",
};
export const UserEventPayload353ActorType = {
Admin: "admin",
User: "user",
};
export const UserEventPayload352Type = {
Blob: "blob",
EdgeConfig: "edge-config",
Integration: "integration",
Postgres: "postgres",
Redis: "redis",
};
export const PayloadAccess = {
Private: "private",
Public: "public",
};
export const UserEventPayload350Type = {
Blob: "blob",
EdgeConfig: "edge-config",
Integration: "integration",
Postgres: "postgres",
Redis: "redis",
};
export const Access = {
Private: "private",
Public: "public",
};
export const UserEventPayload349Type = {
Blob: "blob",
EdgeConfig: "edge-config",
Integration: "integration",
Postgres: "postgres",
Redis: "redis",
};
export const UserEventPayload348Type = {
Blob: "blob",
EdgeConfig: "edge-config",
Integration: "integration",
Postgres: "postgres",
Redis: "redis",
};
export const UserEventPayload347Type = {
Blob: "blob",
EdgeConfig: "edge-config",
Integration: "integration",
Postgres: "postgres",
Redis: "redis",
};
export const StoreType = {
Postgres: "postgres",
Redis: "redis",
};
/**
* The budget type
*/
export const UserEventPayload344Type = {
Fixed: "fixed",
};
/**
* The acive pricing plan the team is billed with
*/
export const UserEventPayloadPricingPlan = {
Flex: "flex",
Legacy: "legacy",
Platform: "platform",
Plus: "plus",
Unbundled: "unbundled",
};
/**
* Which budget this is. Matches Copper SDK `BudgetScope`. Omitted on events published before team/org/project scopes existed (treat as team).
*/
export const UserEventPayload344Scope = {
Organization: "organization",
Project: "project",
Team: "team",
};
/**
* The budget type
*/
export const UserEventPayload344PrevBudgetType = {
Fixed: "fixed",
};
/**
* The acive pricing plan the team is billed with
*/
export const UserEventPayload344PricingPlan = {
Flex: "flex",
Legacy: "legacy",
Platform: "platform",
Plus: "plus",
Unbundled: "unbundled",
};
/**
* Which budget this is. Matches Copper SDK `BudgetScope`. Omitted on events published before team/org/project scopes existed (treat as team).
*/
export const UserEventPayload344PrevBudgetScope = {
Organization: "organization",
Project: "project",
Team: "team",
};
/**
* The budget type
*/
export const UserEventPayload343Type = {
Fixed: "fixed",
};
/**
* The acive pricing plan the team is billed with
*/
export const PayloadPricingPlan = {
Flex: "flex",
Legacy: "legacy",
Platform: "platform",
Plus: "plus",
Unbundled: "unbundled",
};
/**
* Which budget this is. Matches Copper SDK `BudgetScope`. Omitted on events published before team/org/project scopes existed (treat as team).
*/
export const UserEventPayload343Scope = {
Organization: "organization",
Project: "project",
Team: "team",
};
/**
* The budget type
*/
export const UserEventPayload342Type = {
Fixed: "fixed",
};
/**
* The acive pricing plan the team is billed with
*/
export const PricingPlan = {
Flex: "flex",
Legacy: "legacy",
Platform: "platform",
Plus: "plus",
Unbundled: "unbundled",
};
/**
* Which budget this is. Matches Copper SDK `BudgetScope`. Omitted on events published before team/org/project scopes existed (treat as team).
*/
export const UserEventPayload342Scope = {
Organization: "organization",
Project: "project",
Team: "team",
};
/** @internal */
export const FourHundredAndEight$inboundSchema = z.object({
teamId: types.string(),
teamName: types.string(),
});
export function fourHundredAndEightFromJSON(jsonString) {
return safeParse(jsonString, (x) => FourHundredAndEight$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FourHundredAndEight' from JSON`);
}
/** @internal */
export const FourHundredAndSeven$inboundSchema = z.object({
teamName: types.string(),
});
export function fourHundredAndSevenFromJSON(jsonString) {
return safeParse(jsonString, (x) => FourHundredAndSeven$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FourHundredAndSeven' from JSON`);
}
/** @internal */
export const FourHundredAndSix$inboundSchema = z.object({
username: types.string(),
});
export function fourHundredAndSixFromJSON(jsonString) {
return safeParse(jsonString, (x) => FourHundredAndSix$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FourHundredAndSix' from JSON`);
}
/** @internal */
export const UserEventPayload405ActorType$inboundSchema = z.nativeEnum(UserEventPayload405ActorType);
/** @internal */
export const FourHundredAndFive$inboundSchema = z.object({
deletedAt: z.nullable(types.number()).optional(),
username: types.string(),
actorId: types.string(),
actorType: UserEventPayload405ActorType$inboundSchema,
actorName: types.optional(types.string()),
});
export function fourHundredAndFiveFromJSON(jsonString) {
return safeParse(jsonString, (x) => FourHundredAndFive$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FourHundredAndFive' from JSON`);
}
/** @internal */
export const FourHundredAndFour$inboundSchema = z.object({
deletedAt: z.nullable(types.number()).optional(),
username: types.string(),
});
export function fourHundredAndFourFromJSON(jsonString) {
return safeParse(jsonString, (x) => FourHundredAndFour$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FourHundredAndFour' from JSON`);
}
/** @internal */
export const UserEventPayload403ActorType$inboundSchema = z.nativeEnum(UserEventPayload403ActorType);
/** @internal */
export const FourHundredAndThree$inboundSchema = z.object({
totp: types.boolean(),
recoveryCodes: types.number(),
actorId: types.optional(types.string()),
actorType: types.optional(UserEventPayload403ActorType$inboundSchema),
actorName: types.optional(types.string()),
reason: types.optional(types.string()),
});
export function fourHundredAndThreeFromJSON(jsonString) {
return safeParse(jsonString, (x) => FourHundredAndThree$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FourHundredAndThree' from JSON`);
}
/** @internal */
export const FourHundredAndTwo$inboundSchema = z.object({
teamName: types.optional(types.string()),
});
export function fourHundredAndTwoFromJSON(jsonString) {
return safeParse(jsonString, (x) => FourHundredAndTwo$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FourHundredAndTwo' from JSON`);
}
/** @internal */
export const UserEventPayloadReason$inboundSchema = z.nativeEnum(UserEventPayloadReason);
/** @internal */
export const FourHundredAndOne$inboundSchema = z.object({
reason: UserEventPayloadReason$inboundSchema,
});
export function fourHundredAndOneFromJSON(jsonString) {
return safeParse(jsonString, (x) => FourHundredAndOne$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FourHundredAndOne' from JSON`);
}
/** @internal */
export const UserEventPayload400Type$inboundSchema = z.nativeEnum(UserEventPayload400Type);
/** @internal */
export const Env$inboundSchema = z.nativeEnum(Env);
/** @internal */
export const Sampling$inboundSchema = z.object({
type: UserEventPayload400Type$inboundSchema,
rate: types.number(),
env: types.optional(Env$inboundSchema),
requestPath: types.optional(types.string()),
});
export function samplingFromJSON(jsonString) {
return safeParse(jsonString, (x) => Sampling$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Sampling' from JSON`);
}
/** @internal */
export const FourHundred$inboundSchema = z.object({
projectId: types.string(),
projectName: types.string(),
sampling: types.optional(z.array(z.lazy(() => Sampling$inboundSchema))),
});
export function fourHundredFromJSON(jsonString) {
return safeParse(jsonString, (x) => FourHundred$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FourHundred' from JSON`);
}
/** @internal */
export const UserEventPayload399ActorType$inboundSchema = z.nativeEnum(UserEventPayload399ActorType);
/** @internal */
export const ThreeHundredAndNinetyNine$inboundSchema = z.object({
slug: types.optional(types.string()),
actorId: types.string(),
actorType: UserEventPayload399ActorType$inboundSchema,
actorName: types.optional(types.string()),
});
export function threeHundredAndNinetyNineFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndNinetyNine$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndNinetyNine' from JSON`);
}
/** @internal */
export const ThreeHundredAndNinetyEight$inboundSchema = z.object({
slug: types.optional(types.string()),
});
export function threeHundredAndNinetyEightFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndNinetyEight$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndNinetyEight' from JSON`);
}
/** @internal */
export const ThreeHundredAndNinetySeven$inboundSchema = z.object({
fileId: types.string(),
});
export function threeHundredAndNinetySevenFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndNinetySeven$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndNinetySeven' from JSON`);
}
/** @internal */
export const ThreeHundredAndNinetySix$inboundSchema = z.object({
exportId: types.string(),
from: types.number(),
to: types.number(),
format: types.string(),
});
export function threeHundredAndNinetySixFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndNinetySix$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndNinetySix' from JSON`);
}
/** @internal */
export const ThreeHundredAndNinetyFive$inboundSchema = z.object({
tokenTypes: z.array(types.string()),
});
export function threeHundredAndNinetyFiveFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndNinetyFive$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndNinetyFive' from JSON`);
}
/** @internal */
export const ThreeHundredAndNinetyFour$inboundSchema = z.object({
domain: types.string(),
ips: z.array(types.string()),
});
export function threeHundredAndNinetyFourFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndNinetyFour$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndNinetyFour' from JSON`);
}
/** @internal */
export const Previous2$inboundSchema = z
.nativeEnum(Previous2);
/** @internal */
export const Previous1$inboundSchema = z.object({
accessGroupId: types.string(),
});
export function previous1FromJSON(jsonString) {
return safeParse(jsonString, (x) => Previous1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Previous1' from JSON`);
}
/** @internal */
export const UserEventPayload393Previous$inboundSchema = smartUnion([
z.lazy(() => Previous1$inboundSchema),
Previous2$inboundSchema,
]);
export function userEventPayload393PreviousFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload393Previous$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload393Previous' from JSON`);
}
/** @internal */
export const Next2$inboundSchema = z.nativeEnum(Next2);
/** @internal */
export const Next1$inboundSchema = z
.object({
accessGroupId: types.string(),
});
export function next1FromJSON(jsonString) {
return safeParse(jsonString, (x) => Next1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Next1' from JSON`);
}
/** @internal */
export const UserEventPayload393Next$inboundSchema = smartUnion([z.lazy(() => Next1$inboundSchema), Next2$inboundSchema]);
export function userEventPayload393NextFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload393Next$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload393Next' from JSON`);
}
/** @internal */
export const ThreeHundredAndNinetyThree$inboundSchema = z.object({
previous: types.optional(z.record(smartUnion([
z.lazy(() => Previous1$inboundSchema),
Previous2$inboundSchema,
]))),
next: types.optional(z.record(smartUnion([z.lazy(() => Next1$inboundSchema), Next2$inboundSchema]))),
});
export function threeHundredAndNinetyThreeFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndNinetyThree$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndNinetyThree' from JSON`);
}
/** @internal */
export const PayloadScope$inboundSchema = z.nativeEnum(PayloadScope);
/** @internal */
export const ThreeHundredAndNinetyTwo$inboundSchema = z.object({
enabled: types.boolean(),
scope: PayloadScope$inboundSchema,
});
export function threeHundredAndNinetyTwoFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndNinetyTwo$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndNinetyTwo' from JSON`);
}
/** @internal */
export const PayloadEnabled$inboundSchema = z.nativeEnum(PayloadEnabled);
/** @internal */
export const ThreeHundredAndNinetyOne$inboundSchema = z.object({
enabled: PayloadEnabled$inboundSchema,
});
export function threeHundredAndNinetyOneFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndNinetyOne$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndNinetyOne' from JSON`);
}
/** @internal */
export const ThreeHundredAndNinety$inboundSchema = z.object({
deletedCount: types.number(),
});
export function threeHundredAndNinetyFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndNinety$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndNinety' from JSON`);
}
/** @internal */
export const PayloadRemoteCaching$inboundSchema = z.object({
enabled: types.optional(types.boolean()),
});
export function payloadRemoteCachingFromJSON(jsonString) {
return safeParse(jsonString, (x) => PayloadRemoteCaching$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PayloadRemoteCaching' from JSON`);
}
/** @internal */
export const ThreeHundredAndEightyNine$inboundSchema = z.object({
remoteCaching: types.optional(z.lazy(() => PayloadRemoteCaching$inboundSchema)),
});
export function threeHundredAndEightyNineFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndEightyNine$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndEightyNine' from JSON`);
}
/** @internal */
export const PayloadConsent$inboundSchema = z.nativeEnum(PayloadConsent);
/** @internal */
export const ThreeHundredAndEightyEight$inboundSchema = z.object({
consent: PayloadConsent$inboundSchema,
});
export function threeHundredAndEightyEightFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndEightyEight$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndEightyEight' from JSON`);
}
/** @internal */
export const Decision$inboundSchema = z
.nativeEnum(Decision);
/** @internal */
export const ThreeHundredAndEightySeven$inboundSchema = z.object({
decision: Decision$inboundSchema,
version: types.string(),
});
export function threeHundredAndEightySevenFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndEightySeven$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndEightySeven' from JSON`);
}
/** @internal */
export const UserEventPayload386ActorType$inboundSchema = z.nativeEnum(UserEventPayload386ActorType);
/** @internal */
export const ThreeHundredAndEightySix$inboundSchema = z.object({
name: types.optional(types.string()),
actorId: types.string(),
actorType: UserEventPayload386ActorType$inboundSchema,
actorName: types.optional(types.string()),
});
export function threeHundredAndEightySixFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndEightySix$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndEightySix' from JSON`);
}
/** @internal */
export const ThreeHundredAndEightyFive$inboundSchema = z.object({
name: types.optional(types.string()),
});
export function threeHundredAndEightyFiveFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndEightyFive$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndEightyFive' from JSON`);
}
/** @internal */
export const ThreeHundredAndEightyFour$inboundSchema = z.object({
inviteCode: types.optional(types.string()),
});
export function threeHundredAndEightyFourFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndEightyFour$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndEightyFour' from JSON`);
}
/** @internal */
export const PayloadPlan$inboundSchema = z
.nativeEnum(PayloadPlan);
/** @internal */
export const ThreeHundredAndEightyThree$inboundSchema = z.object({
invoiceId: types.string(),
convertedFromTrial: types.boolean(),
plan: PayloadPlan$inboundSchema,
});
export function threeHundredAndEightyThreeFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndEightyThree$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndEightyThree' from JSON`);
}
/** @internal */
export const UserEventPayloadPlan$inboundSchema = z.nativeEnum(UserEventPayloadPlan);
/** @internal */
export const Trial$inboundSchema = z
.object({
start: types.number(),
end: types.number(),
});
export function trialFromJSON(jsonString) {
return safeParse(jsonString, (x) => Trial$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Trial' from JSON`);
}
/** @internal */
export const ThreeHundredAndEightyTwo$inboundSchema = z.object({
plan: UserEventPayloadPlan$inboundSchema,
trial: z.nullable(z.lazy(() => Trial$inboundSchema)).optional(),
});
export function threeHundredAndEightyTwoFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndEightyTwo$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndEightyTwo' from JSON`);
}
/** @internal */
export const ThreeHundredAndEightyOne$inboundSchema = z.object({
previousConcurrentBuilds: types.number(),
nextConcurrentBuilds: types.number(),
});
export function threeHundredAndEightyOneFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndEightyOne$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndEightyOne' from JSON`);
}
/** @internal */
export const ThreeHundredAndEighty$inboundSchema = z.object({
publicId: types.string(),
name: types.optional(types.string()),
});
export function threeHundredAndEightyFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndEighty$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndEighty' from JSON`);
}
/** @internal */
export const ThreeHundredAndSeventyNine$inboundSchema = z.object({
publicId: types.string(),
role: types.string(),
maxUses: types.number(),
expiresAt: types.string(),
name: types.optional(types.string()),
});
export function threeHundredAndSeventyNineFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndSeventyNine$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndSeventyNine' from JSON`);
}
/** @internal */
export const ThreeHundredAndSeventyEight$inboundSchema = z.object({
enforced: types.boolean(),
});
export function threeHundredAndSeventyEightFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndSeventyEight$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndSeventyEight' from JSON`);
}
/** @internal */
export const ThreeHundredAndSeventySeven$inboundSchema = z.object({
email: types.optional(types.string()),
authorized: types.boolean(),
reason: types.optional(types.string()),
});
export function threeHundredAndSeventySevenFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndSeventySeven$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndSeventySeven' from JSON`);
}
/** @internal */
export const PayloadUpdatedUser$inboundSchema = z.object({
username: types.string(),
email: types.string(),
});
export function payloadUpdatedUserFromJSON(jsonString) {
return safeParse(jsonString, (x) => PayloadUpdatedUser$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PayloadUpdatedUser' from JSON`);
}
/** @internal */
export const PreviousTeamRoles$inboundSchema = z.nativeEnum(PreviousTeamRoles);
/** @internal */
export const PayloadTeamRoles$inboundSchema = z.nativeEnum(PayloadTeamRoles);
/** @internal */
export const PreviousTeamPermissions$inboundSchema = z.nativeEnum(PreviousTeamPermissions);
/** @internal */
export const PayloadTeamPermissions$inboundSchema = z.nativeEnum(PayloadTeamPermissions);
/** @internal */
export const ThreeHundredAndSeventySix$inboundSchema = z.object({
directoryType: types.optional(types.string()),
ssoType: types.optional(types.string()),
updatedUser: types.optional(z.lazy(() => PayloadUpdatedUser$inboundSchema)),
role: types.optional(types.string()),
previousRole: types.string(),
previousTeamRoles: types.optional(z.array(PreviousTeamRoles$inboundSchema)),
teamRoles: types.optional(z.array(PayloadTeamRoles$inboundSchema)),
previousTeamPermissions: types.optional(z.array(PreviousTeamPermissions$inboundSchema)),
teamPermissions: types.optional(z.array(PayloadTeamPermissions$inboundSchema)),
updatedUid: types.optional(types.string()),
origin: types.optional(types.string()),
teamSlug: types.optional(types.string()),
});
export function threeHundredAndSeventySixFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndSeventySix$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndSeventySix' from JSON`);
}
/** @internal */
export const PayloadSource$inboundSchema = z.nativeEnum(PayloadSource);
/** @internal */
export const ThreeHundredAndSeventyFive$inboundSchema = z.object({
requestedTeamName: types.string(),
requestedTeamSlug: types.optional(types.string()),
requestedUserName: types.optional(types.string()),
gitUsername: types.optional(types.string()),
githubUsername: types.optional(types.string()),
gitlabUsername: types.optional(types.string()),
bitbucketUsername: types.optional(types.string()),
source: types.optional(PayloadSource$inboundSchema),
});
export function threeHundredAndSeventyFiveFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndSeventyFive$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndSeventyFive' from JSON`);
}
/** @internal */
export const UpdatedUser$inboundSchema = z.object({
username: types.string(),
email: types.string(),
});
export function updatedUserFromJSON(jsonString) {
return safeParse(jsonString, (x) => UpdatedUser$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdatedUser' from JSON`);
}
/** @internal */
export const InvitedBy$inboundSchema = z.object({
email: types.string(),
userId: types.optional(types.string()),
name: types.optional(types.string()),
});
export function invitedByFromJSON(jsonString) {
return safeParse(jsonString, (x) => InvitedBy$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InvitedBy' from JSON`);
}
/** @internal */
export const ThreeHundredAndSeventyFour$inboundSchema = z.object({
role: types.optional(types.string()),
uid: types.optional(types.string()),
updatedUid: types.optional(types.string()),
updatedUser: types.optional(z.lazy(() => UpdatedUser$inboundSchema)),
origin: types.optional(types.string()),
teamSlug: types.optional(types.string()),
teamRoles: types.optional(z.array(types.string())),
teamPermissions: types.optional(z.array(types.string())),
entitlements: types.optional(z.array(types.string())),
invitedBy: types.optional(z.lazy(() => InvitedBy$inboundSchema)),
});
export function threeHundredAndSeventyFourFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndSeventyFour$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndSeventyFour' from JSON`);
}
/** @internal */
export const UserEventPayload373User$inboundSchema = z.object({
id: types.string(),
username: types.string(),
});
export function userEventPayload373UserFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload373User$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload373User' from JSON`);
}
/** @internal */
export const ThreeHundredAndSeventyThree$inboundSchema = z.object({
entitlement: types.string(),
user: z.lazy(() => UserEventPayload373User$inboundSchema),
previousCanceledAt: types.optional(types.string()),
});
export function threeHundredAndSeventyThreeFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndSeventyThree$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndSeventyThree' from JSON`);
}
/** @internal */
export const UserEventPayloadUser$inboundSchema = z.object({
id: types.string(),
username: types.string(),
});
export function userEventPayloadUserFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayloadUser$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayloadUser' from JSON`);
}
/** @internal */
export const ThreeHundredAndSeventyTwo$inboundSchema = z.object({
entitlement: types.string(),
user: z.lazy(() => UserEventPayloadUser$inboundSchema),
});
export function threeHundredAndSeventyTwoFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndSeventyTwo$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndSeventyTwo' from JSON`);
}
/** @internal */
export const PayloadDeletedUser$inboundSchema = z.object({
username: types.string(),
email: types.string(),
});
export function payloadDeletedUserFromJSON(jsonString) {
return safeParse(jsonString, (x) => PayloadDeletedUser$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PayloadDeletedUser' from JSON`);
}
/** @internal */
export const PayloadRole$inboundSchema = z
.nativeEnum(PayloadRole);
/** @internal */
export const PreviousPlan$inboundSchema = z.nativeEnum(PreviousPlan);
/** @internal */
export const NewPlan$inboundSchema = z
.nativeEnum(NewPlan);
/** @internal */
export const ThreeHundredAndSeventyOne$inboundSchema = z.object({
deletedUser: types.optional(z.lazy(() => PayloadDeletedUser$inboundSchema)),
deletedUid: types.optional(types.string()),
githubUsername: z.nullable(types.string()).optional(),
gitlabUsername: z.nullable(types.string()).optional(),
bitbucketUsername: z.nullable(types.string()).optional(),
directoryType: types.optional(types.string()),
role: types.optional(PayloadRole$inboundSchema),
reason: types.optional(types.string()),
previousPlan: types.optional(PreviousPlan$inboundSchema),
newPlan: types.optional(NewPlan$inboundSchema),
automated: types.optional(types.boolean()),
});
export function threeHundredAndSeventyOneFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndSeventyOne$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndSeventyOne' from JSON`);
}
/** @internal */
export const ThreeHundredAndSeventy$inboundSchema = z.object({
teamName: types.string(),
username: types.optional(types.string()),
gitUsername: z.nullable(types.string()).optional(),
githubUsername: z.nullable(types.string()).optional(),
gitlabUsername: z.nullable(types.string()).optional(),
bitbucketUsername: z.nullable(types.string()).optional(),
});
export function threeHundredAndSeventyFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndSeventy$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndSeventy' from JSON`);
}
/** @internal */
export const ThreeHundredAndSixtyNine$inboundSchema = z.object({
teamName: types.string(),
username: types.optional(types.string()),
gitUsername: types.optional(types.string()),
githubUsername: z.nullable(types.string()).optional(),
gitlabUsername: z.nullable(types.string()).optional(),
bitbucketUsername: z.nullable(types.string()).optional(),
updatedUid: types.optional(types.string()),
teamId: types.optional(types.string()),
});
export function threeHundredAndSixtyNineFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndSixtyNine$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndSixtyNine' from JSON`);
}
/** @internal */
export const InvitedUser$inboundSchema = z.object({
username: types.string(),
email: types.string(),
});
export function invitedUserFromJSON(jsonString) {
return safeParse(jsonString, (x) => InvitedUser$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InvitedUser' from JSON`);
}
/** @internal */
export const ThreeHundredAndSixtyEight$inboundSchema = z.object({
directoryType: types.optional(types.string()),
ssoType: types.optional(types.string()),
invitedUser: types.optional(z.lazy(() => InvitedUser$inboundSchema)),
invitedEmail: types.optional(types.string()),
invitationRole: types.optional(types.string()),
entitlements: types.optional(z.array(types.string())),
invitedUid: types.optional(types.string()),
origin: types.optional(types.string()),
teamSlug: types.optional(types.string()),
});
export function threeHundredAndSixtyEightFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndSixtyEight$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndSixtyEight' from JSON`);
}
/** @internal */
export const ThreeHundredAndSixtySeven$inboundSchema = z.object({
deletedCount: types.number(),
inviteIds: z.array(types.string()),
});
export function threeHundredAndSixtySevenFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndSixtySeven$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndSixtySeven' from JSON`);
}
/** @internal */
export const ThreeHundredAndSixtySix$inboundSchema = z.object({
emailDomain: z.nullable(types.string()).optional(),
});
export function threeHundredAndSixtySixFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndSixtySix$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndSixtySix' from JSON`);
}
/** @internal */
export const UserEventPayloadEnvironment$inboundSchema = z.nativeEnum(UserEventPayloadEnvironment);
/** @internal */
export const Enabled$inboundSchema = z
.nativeEnum(Enabled);
/** @internal */
export const ThreeHundredAndSixtyFive$inboundSchema = z.object({
environment: UserEventPayloadEnvironment$inboundSchema,
enabled: Enabled$inboundSchema,
});
export function threeHundredAndSixtyFiveFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndSixtyFive$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndSixtyFive' from JSON`);
}
/** @internal */
export const PayloadEnvironment$inboundSchema = z.nativeEnum(PayloadEnvironment);
/** @internal */
export const ThreeHundredAndSixtyFour$inboundSchema = z.object({
projectId: types.string(),
projectName: types.string(),
enabled: types.nullable(types.boolean()),
environment: PayloadEnvironment$inboundSchema,
});
export function threeHundredAndSixtyFourFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndSixtyFour$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndSixtyFour' from JSON`);
}
/** @internal */
export const ThreeHundredAndSixtyThree$inboundSchema = z.object({
enabled: types.boolean(),
domain: types.optional(types.string()),
});
export function threeHundredAndSixtyThreeFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndSixtyThree$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndSixtyThree' from JSON`);
}
/** @internal */
export const UserEventPayload362Previous$inboundSchema = z.object({
gitSources: z.nullable(z.array(z.any())).optional(),
deploymentSources: z.nullable(z.array(z.any())).optional(),
});
export function userEventPayload362PreviousFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload362Previous$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload362Previous' from JSON`);
}
/** @internal */
export const UserEventPayload362Next$inboundSchema = z.object({
gitSources: z.nullable(z.array(z.any())).optional(),
deploymentSources: z.nullable(z.array(z.any())).optional(),
});
export function userEventPayload362NextFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload362Next$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload362Next' from JSON`);
}
/** @internal */
export const ThreeHundredAndSixtyTwo$inboundSchema = z.object({
previous: types.nullable(z.lazy(() => UserEventPayload362Previous$inboundSchema)),
next: types.nullable(z.lazy(() => UserEventPayload362Next$inboundSchema)),
});
export function threeHundredAndSixtyTwoFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndSixtyTwo$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndSixtyTwo' from JSON`);
}
/** @internal */
export const Reasons$inboundSchema = z.object({
slug: types.string(),
description: types.string(),
});
export function reasonsFromJSON(jsonString) {
return safeParse(jsonString, (x) => Reasons$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Reasons' from JSON`);
}
/** @internal */
export const UserEventPayload361Role$inboundSchema = z.nativeEnum(UserEventPayload361Role);
/** @internal */
export const UserEventPayloadRemovedUsers$inboundSchema = z.object({
role: UserEventPayload361Role$inboundSchema,
confirmed: types.boolean(),
confirmedAt: types.optional(types.number()),
});
export function userEventPayloadRemovedUsersFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayloadRemovedUsers$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayloadRemovedUsers' from JSON`);
}
/** @internal */
export const ThreeHundredAndSixtyOne$inboundSchema = z.object({
slug: types.string(),
teamId: types.string(),
by: types.string(),
byUid: types.optional(types.string()),
reasons: types.optional(z.array(z.lazy(() => Reasons$inboundSchema))),
removedUsers: types.optional(z.record(z.lazy(() => UserEventPayloadRemovedUsers$inboundSchema))),
removedMemberCount: types.optional(types.number()),
timestamp: types.optional(types.number()),
});
export function threeHundredAndSixtyOneFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndSixtyOne$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndSixtyOne' from JSON`);
}
/** @internal */
export const UserEventPayload360Previous$inboundSchema = z.nativeEnum(UserEventPayload360Previous);
/** @internal */
export const UserEventPayload360Next$inboundSchema = z.nativeEnum(UserEventPayload360Next);
/** @internal */
export const PayloadReason$inboundSchema = z.nativeEnum(PayloadReason);
/** @internal */
export const ThreeHundredAndSixty$inboundSchema = z.object({
previous: types.optional(UserEventPayload360Previous$inboundSchema),
next: types.optional(UserEventPayload360Next$inboundSchema),
isSystemInitiated: types.optional(types.boolean()),
reason: types.optional(PayloadReason$inboundSchema),
});
export function threeHundredAndSixtyFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndSixty$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndSixty' from JSON`);
}
/** @internal */
export const UserEventPayload359Previous$inboundSchema = z.nativeEnum(UserEventPayload359Previous);
/** @internal */
export const UserEventPayload359Next$inboundSchema = z.nativeEnum(UserEventPayload359Next);
/** @internal */
export const ThreeHundredAndFiftyNine$inboundSchema = z.object({
previous: types.nullable(UserEventPayload359Previous$inboundSchema),
next: types.nullable(UserEventPayload359Next$inboundSchema),
teamSlug: types.optional(types.string()),
});
export function threeHundredAndFiftyNineFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndFiftyNine$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndFiftyNine' from JSON`);
}
/** @internal */
export const ThreeHundredAndFiftyEight$inboundSchema = z.object({
eventId: types.string(),
sessionId: types.string(),
sessionKind: types.string(),
surface: types.string(),
occurredAt: types.number(),
planId: types.string(),
requestedScopes: z.array(types.string()),
elevatedScopes: z.array(types.string()),
mergedScopes: z.array(types.string()),
githubScopes: z.array(types.string()),
requestedScopeCount: types.number(),
elevatedScopeCount: types.number(),
mergedScopeCount: types.number(),
githubScopeCount: types.number(),
});
export function threeHundredAndFiftyEightFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndFiftyEight$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndFiftyEight' from JSON`);
}
/** @internal */
export const ThreeHundredAndFiftySeven$inboundSchema = z.object({
eventId: types.string(),
sessionId: types.string(),
sessionKind: types.string(),
surface: types.string(),
occurredAt: types.number(),
});
export function threeHundredAndFiftySevenFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndFiftySeven$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndFiftySeven' from JSON`);
}
/** @internal */
export const ThreeHundredAndFiftySix$inboundSchema = z.object({
trialCreditsIssuedAt: types.number(),
expiresAt: types.string(),
amount: types.string(),
currency: types.string(),
});
export function threeHundredAndFiftySixFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndFiftySix$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndFiftySix' from JSON`);
}
/** @internal */
export const UserEventPayload355Scope$inboundSchema = z.nativeEnum(UserEventPayload355Scope);
/** @internal */
export const UserEventPayload355Previous$inboundSchema = z.object({
enabled: types.boolean(),
scope: UserEventPayload355Scope$inboundSchema,
includeDrafts: types.boolean(),
selectedRepos: z.nullable(z.array(types.string())).optional(),
});
export function userEventPayload355PreviousFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload355Previous$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload355Previous' from JSON`);
}
/** @internal */
export const UserEventPayload355NextScope$inboundSchema = z.nativeEnum(UserEventPayload355NextScope);
/** @internal */
export const UserEventPayload355Next$inboundSchema = z.object({
enabled: types.boolean(),
scope: UserEventPayload355NextScope$inboundSchema,
includeDrafts: types.boolean(),
selectedRepos: z.nullable(z.array(types.string())).optional(),
});
export function userEventPayload355NextFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload355Next$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload355Next' from JSON`);
}
/** @internal */
export const ThreeHundredAndFiftyFive$inboundSchema = z.object({
previous: types.optional(z.lazy(() => UserEventPayload355Previous$inboundSchema)),
next: z.lazy(() => UserEventPayload355Next$inboundSchema),
});
export function threeHundredAndFiftyFiveFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndFiftyFive$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndFiftyFive' from JSON`);
}
/** @internal */
export const ThreeHundredAndFiftyFour$inboundSchema = z.object({
slug: types.string(),
});
export function threeHundredAndFiftyFourFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndFiftyFour$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndFiftyFour' from JSON`);
}
/** @internal */
export const UserEventPayload353ActorType$inboundSchema = z.nativeEnum(UserEventPayload353ActorType);
/** @internal */
export const ThreeHundredAndFiftyThree$inboundSchema = z.object({
actorId: types.optional(types.string()),
actorType: types.optional(UserEventPayload353ActorType$inboundSchema),
reason: types.optional(types.string()),
caseNumber: types.optional(types.string()),
client: types.optional(types.string()),
});
export function threeHundredAndFiftyThreeFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndFiftyThree$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndFiftyThree' from JSON`);
}
/** @internal */
export const UserEventPayload352Type$inboundSchema = z.nativeEnum(UserEventPayload352Type);
/** @internal */
export const PayloadAccess$inboundSchema = z.nativeEnum(PayloadAccess);
/** @internal */
export const ThreeHundredAndFiftyTwo$inboundSchema = z.object({
id: types.string(),
name: types.optional(types.string()),
computeUnitsMax: types.optional(types.number()),
computeUnitsMin: types.optional(types.number()),
suspendTimeoutSeconds: types.optional(types.number()),
type: UserEventPayload352Type$inboundSchema,
access: types.optional(PayloadAccess$inboundSchema),
locked: types.boolean(),
});
export function threeHundredAndFiftyTwoFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndFiftyTwo$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndFiftyTwo' from JSON`);
}
/** @internal */
export const UserEventPayload351Store$inboundSchema = z.object({
name: types.string(),
id: types.string(),
});
export function userEventPayload351StoreFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload351Store$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload351Store' from JSON`);
}
/** @internal */
export const ThreeHundredAndFiftyOne$inboundSchema = z.object({
store: z.lazy(() => UserEventPayload351Store$inboundSchema),
ownerId: types.optional(types.string()),
});
export function threeHundredAndFiftyOneFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndFiftyOne$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndFiftyOne' from JSON`);
}
/** @internal */
export const UserEventPayload350Type$inboundSchema = z.nativeEnum(UserEventPayload350Type);
/** @internal */
export const Access$inboundSchema = z
.nativeEnum(Access);
/** @internal */
export const ThreeHundredAndFifty$inboundSchema = z.object({
id: types.string(),
name: types.optional(types.string()),
computeUnitsMax: types.optional(types.number()),
computeUnitsMin: types.optional(types.number()),
suspendTimeoutSeconds: types.optional(types.number()),
type: UserEventPayload350Type$inboundSchema,
access: types.optional(Access$inboundSchema),
});
export function threeHundredAndFiftyFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndFifty$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndFifty' from JSON`);
}
/** @internal */
export const UserEventPayload349Type$inboundSchema = z.nativeEnum(UserEventPayload349Type);
/** @internal */
export const UserEventPayloadStore$inboundSchema = z.object({
id: types.string(),
name: types.optional(types.string()),
type: UserEventPayload349Type$inboundSchema,
});
export function userEventPayloadStoreFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayloadStore$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayloadStore' from JSON`);
}
/** @internal */
export const ThreeHundredAndFortyNine$inboundSchema = z.object({
transferRequestCode: types.string(),
store: z.lazy(() => UserEventPayloadStore$inboundSchema),
originTeamId: types.string(),
originTeamName: types.string(),
});
export function threeHundredAndFortyNineFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndFortyNine$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndFortyNine' from JSON`);
}
/** @internal */
export const UserEventPayload348Type$inboundSchema = z.nativeEnum(UserEventPayload348Type);
/** @internal */
export const PayloadStore$inboundSchema = z.object({
id: types.string(),
name: types.optional(types.string()),
type: UserEventPayload348Type$inboundSchema,
});
export function payloadStoreFromJSON(jsonString) {
return safeParse(jsonString, (x) => PayloadStore$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PayloadStore' from JSON`);
}
/** @internal */
export const ThreeHundredAndFortyEight$inboundSchema = z.object({
transferRequestCode: types.string(),
store: z.lazy(() => PayloadStore$inboundSchema),
destinationTeamId: types.string(),
destinationTeamName: types.string(),
});
export function threeHundredAndFortyEightFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndFortyEight$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndFortyEight' from JSON`);
}
/** @internal */
export const UserEventPayload347Type$inboundSchema = z.nativeEnum(UserEventPayload347Type);
/** @internal */
export const Store$inboundSchema = z
.object({
id: types.string(),
name: types.optional(types.string()),
type: UserEventPayload347Type$inboundSchema,
});
export function storeFromJSON(jsonString) {
return safeParse(jsonString, (x) => Store$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Store' from JSON`);
}
/** @internal */
export const ThreeHundredAndFortySeven$inboundSchema = z.object({
transferRequestCode: types.string(),
store: z.lazy(() => Store$inboundSchema),
});
export function threeHundredAndFortySevenFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndFortySeven$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndFortySeven' from JSON`);
}
/** @internal */
export const StoreType$inboundSchema = z
.nativeEnum(StoreType);
/** @internal */
export const ThreeHundredAndFortySix$inboundSchema = z.object({
storeType: StoreType$inboundSchema,
});
export function threeHundredAndFortySixFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndFortySix$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndFortySix' from JSON`);
}
/** @internal */
export const ThreeHundredAndFortyFive$inboundSchema = z.object({
webhookUrl: types.optional(types.string()),
});
export function threeHundredAndFortyFiveFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndFortyFive$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndFortyFive' from JSON`);
}
/** @internal */
export const UserEventPayload344Type$inboundSchema = z.nativeEnum(UserEventPayload344Type);
/** @internal */
export const UserEventPayloadPricingPlan$inboundSchema = z.nativeEnum(UserEventPayloadPricingPlan);
/** @internal */
export const UserEventPayload344Scope$inboundSchema = z.nativeEnum(UserEventPayload344Scope);
/** @internal */
export const UserEventPayload344Budget$inboundSchema = z.object({
type: UserEventPayload344Type$inboundSchema,
fixedBudget: types.number(),
previousSpend: z.array(types.number()),
notifiedAt: z.array(types.number()),
webhookId: types.optional(types.string()),
webhookNotified: types.optional(types.boolean()),
createdAt: types.number(),
updatedAt: types.optional(types.number()),
isActive: types.boolean(),
pauseProjects: types.optional(types.boolean()),
pricingPlan: types.optional(UserEventPayloadPricingPlan$inboundSchema),
scope: types.optional(UserEventPayload344Scope$inboundSchema),
scopeId: types.optional(types.string()),
teamId: types.string(),
id: types.string(),
});
export function userEventPayload344BudgetFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload344Budget$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload344Budget' from JSON`);
}
/** @internal */
export const UserEventPayload344PrevBudgetType$inboundSchema = z.nativeEnum(UserEventPayload344PrevBudgetType);
/** @internal */
export const UserEventPayload344PricingPlan$inboundSchema = z.nativeEnum(UserEventPayload344PricingPlan);
/** @internal */
export const UserEventPayload344PrevBudgetScope$inboundSchema = z.nativeEnum(UserEventPayload344PrevBudgetScope);
/** @internal */
export const PrevBudget$inboundSchema = z.object({
type: UserEventPayload344PrevBudgetType$inboundSchema,
fixedBudget: types.number(),
previousSpend: z.array(types.number()),
notifiedAt: z.array(types.number()),
webhookId: types.optional(types.string()),
webhookNotified: types.optional(types.boolean()),
createdAt: types.number(),
updatedAt: types.optional(types.number()),
isActive: types.boolean(),
pauseProjects: types.optional(types.boolean()),
pricingPlan: types.optional(UserEventPayload344PricingPlan$inboundSchema),
scope: types.optional(UserEventPayload344PrevBudgetScope$inboundSchema),
scopeId: types.optional(types.string()),
teamId: types.string(),
id: types.string(),
});
export function prevBudgetFromJSON(jsonString) {
return safeParse(jsonString, (x) => PrevBudget$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PrevBudget' from JSON`);
}
/** @internal */
export const ThreeHundredAndFortyFour$inboundSchema = z.object({
budget: z.lazy(() => UserEventPayload344Budget$inboundSchema),
prevBudget: types.optional(z.lazy(() => PrevBudget$inboundSchema)),
webhookUrl: types.optional(types.string()),
prevWebhookUrl: types.optional(types.string()),
});
export function threeHundredAndFortyFourFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndFortyFour$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndFortyFour' from JSON`);
}
/** @internal */
export const UserEventPayload343Type$inboundSchema = z.nativeEnum(UserEventPayload343Type);
/** @internal */
export const PayloadPricingPlan$inboundSchema = z.nativeEnum(PayloadPricingPlan);
/** @internal */
export const UserEventPayload343Scope$inboundSchema = z.nativeEnum(UserEventPayload343Scope);
/** @internal */
export const UserEventPayload343Budget$inboundSchema = z.object({
type: UserEventPayload343Type$inboundSchema,
fixedBudget: types.number(),
previousSpend: z.array(types.number()),
notifiedAt: z.array(types.number()),
webhookId: types.optional(types.string()),
webhookNotified: types.optional(types.boolean()),
createdAt: types.number(),
updatedAt: types.optional(types.number()),
isActive: types.boolean(),
pauseProjects: types.optional(types.boolean()),
pricingPlan: types.optional(PayloadPricingPlan$inboundSchema),
scope: types.optional(UserEventPayload343Scope$inboundSchema),
scopeId: types.optional(types.string()),
teamId: types.string(),
id: types.string(),
});
export function userEventPayload343BudgetFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload343Budget$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload343Budget' from JSON`);
}
/** @internal */
export const ThreeHundredAndFortyThree$inboundSchema = z.object({
budget: z.lazy(() => UserEventPayload343Budget$inboundSchema),
webhookUrl: types.optional(types.string()),
});
export function threeHundredAndFortyThreeFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndFortyThree$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndFortyThree' from JSON`);
}
/** @internal */
export const UserEventPayload342Type$inboundSchema = z.nativeEnum(UserEventPayload342Type);
/** @internal */
export const PricingPlan$inboundSchema = z
.nativeEnum(PricingPlan);
/** @internal */
export const UserEventPayload342Scope$inboundSchema = z.nativeEnum(UserEventPayload342Scope);
/** @internal */
export const UserEventPayload342Budget$inboundSchema = z.object({
type: UserEventPayload342Type$inboundSchema,
fixedBudget: types.number(),
previousSpend: z.array(types.number()),
notifiedAt: z.array(types.number()),
webhookId: types.optional(types.string()),
webhookNotified: types.optional(types.boolean()),
createdAt: types.number(),
updatedAt: types.optional(types.number()),
isActive: types.boolean(),
pauseProjects: types.optional(types.boolean()),
pricingPlan: types.optional(PricingPlan$inboundSchema),
scope: types.optional(UserEventPayload342Scope$inboundSchema),
scopeId: types.optional(types.string()),
teamId: types.string(),
id: types.string(),
});
export function userEventPayload342BudgetFromJSON(jsonString) {
return safeParse(jsonString, (x) => UserEventPayload342Budget$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UserEventPayload342Budget' from JSON`);
}
/** @internal */
export const ThreeHundredAndFortyTwo$inboundSchema = z.object({
budget: z.lazy(() => UserEventPayload342Budget$inboundSchema),
});
export function threeHundredAndFortyTwoFromJSON(jsonString) {
return safeParse(jsonString, (x) => ThreeHundredAndFortyTwo$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ThreeHundredAndFortyTwo' from JSON`);
}
//# sourceMappingURL=threehundredandfortytwo.js.map