@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>
192 lines • 8.28 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 LimitedBy = {
Invalidated: "invalidated",
Mfa: "mfa",
Scope: "scope",
};
/**
* Controls whether directory sync events are processed. - 'SETUP': Directory connected but role mappings not yet configured. Events are acknowledged but not processed. - 'ACTIVE': Fully configured. Events are processed normally. - undefined: Legacy directory (pre-feature), treat as 'ACTIVE' for backwards compatibility.
*/
export const TeamLimitedSyncState = {
Active: "ACTIVE",
Setup: "SETUP",
};
/**
* Controls whether directory sync events are processed. - 'SETUP': Directory connected but role mappings not yet configured. Events are acknowledged but not processed. - 'ACTIVE': Fully configured. Events are processed normally. - undefined: Legacy directory (pre-feature), treat as 'ACTIVE' for backwards compatibility.
*/
export const TeamLimitedSamlSyncState = {
Active: "ACTIVE",
Setup: "SETUP",
};
export const TeamLimitedRole = {
Billing: "BILLING",
Contributor: "CONTRIBUTOR",
Developer: "DEVELOPER",
Member: "MEMBER",
Owner: "OWNER",
Security: "SECURITY",
Viewer: "VIEWER",
ViewerForPlus: "VIEWER_FOR_PLUS",
};
export const TeamLimitedTeamRoles = {
Billing: "BILLING",
Contributor: "CONTRIBUTOR",
Developer: "DEVELOPER",
Member: "MEMBER",
Owner: "OWNER",
Security: "SECURITY",
Viewer: "VIEWER",
ViewerForPlus: "VIEWER_FOR_PLUS",
};
export const TeamLimitedTeamPermissions = {
CreateProject: "CreateProject",
EnvVariableManager: "EnvVariableManager",
EnvironmentManager: "EnvironmentManager",
FullProductionDeployment: "FullProductionDeployment",
IntegrationManager: "IntegrationManager",
OrgAdmin: "OrgAdmin",
OrgViewer: "OrgViewer",
UsageViewer: "UsageViewer",
V0Builder: "V0Builder",
V0Chatter: "V0Chatter",
V0Viewer: "V0Viewer",
};
export const TeamLimitedOrigin = {
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",
};
/** @internal */
export const LimitedBy$inboundSchema = z
.nativeEnum(LimitedBy);
/** @internal */
export const TeamLimitedSyncState$inboundSchema = z.nativeEnum(TeamLimitedSyncState);
/** @internal */
export const TeamLimitedConnection$inboundSchema = z.object({
status: types.string(),
type: types.string(),
state: types.string(),
connectedAt: types.number(),
lastReceivedWebhookEvent: types.optional(types.number()),
lastSyncedAt: types.optional(types.number()),
syncState: types.optional(TeamLimitedSyncState$inboundSchema),
});
export function teamLimitedConnectionFromJSON(jsonString) {
return safeParse(jsonString, (x) => TeamLimitedConnection$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TeamLimitedConnection' from JSON`);
}
/** @internal */
export const TeamLimitedSamlSyncState$inboundSchema = z.nativeEnum(TeamLimitedSamlSyncState);
/** @internal */
export const TeamLimitedDirectory$inboundSchema = z.object({
type: types.string(),
state: types.string(),
connectedAt: types.number(),
lastReceivedWebhookEvent: types.optional(types.number()),
lastSyncedAt: types.optional(types.number()),
syncState: types.optional(TeamLimitedSamlSyncState$inboundSchema),
});
export function teamLimitedDirectoryFromJSON(jsonString) {
return safeParse(jsonString, (x) => TeamLimitedDirectory$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TeamLimitedDirectory' from JSON`);
}
/** @internal */
export const TeamLimitedSaml$inboundSchema = z.object({
connection: types.optional(z.lazy(() => TeamLimitedConnection$inboundSchema)),
directory: types.optional(z.lazy(() => TeamLimitedDirectory$inboundSchema)),
enforced: types.boolean(),
});
export function teamLimitedSamlFromJSON(jsonString) {
return safeParse(jsonString, (x) => TeamLimitedSaml$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TeamLimitedSaml' from JSON`);
}
/** @internal */
export const TeamLimitedEntitlements$inboundSchema = z.object({
entitlement: types.string(),
});
export function teamLimitedEntitlementsFromJSON(jsonString) {
return safeParse(jsonString, (x) => TeamLimitedEntitlements$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TeamLimitedEntitlements' from JSON`);
}
/** @internal */
export const TeamLimitedRole$inboundSchema = z.nativeEnum(TeamLimitedRole);
/** @internal */
export const TeamLimitedTeamRoles$inboundSchema = z.nativeEnum(TeamLimitedTeamRoles);
/** @internal */
export const TeamLimitedTeamPermissions$inboundSchema = z.nativeEnum(TeamLimitedTeamPermissions);
/** @internal */
export const TeamLimitedOrigin$inboundSchema = z.nativeEnum(TeamLimitedOrigin);
/** @internal */
export const TeamLimitedGitUserId$inboundSchema = smartUnion([types.string(), types.number()]);
export function teamLimitedGitUserIdFromJSON(jsonString) {
return safeParse(jsonString, (x) => TeamLimitedGitUserId$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TeamLimitedGitUserId' from JSON`);
}
/** @internal */
export const TeamLimitedJoinedFrom$inboundSchema = z.object({
origin: TeamLimitedOrigin$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 teamLimitedJoinedFromFromJSON(jsonString) {
return safeParse(jsonString, (x) => TeamLimitedJoinedFrom$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TeamLimitedJoinedFrom' from JSON`);
}
/** @internal */
export const TeamLimitedMembership$inboundSchema = z.object({
uid: types.optional(types.string()),
entitlements: types.optional(z.array(z.lazy(() => TeamLimitedEntitlements$inboundSchema))),
teamId: types.optional(types.string()),
confirmed: types.literal(true),
accessRequestedAt: types.optional(types.number()),
role: TeamLimitedRole$inboundSchema,
teamRoles: types.optional(z.array(TeamLimitedTeamRoles$inboundSchema)),
teamPermissions: types.optional(z.array(TeamLimitedTeamPermissions$inboundSchema)),
createdAt: types.number(),
created: types.number(),
joinedFrom: types.optional(z.lazy(() => TeamLimitedJoinedFrom$inboundSchema)),
});
export function teamLimitedMembershipFromJSON(jsonString) {
return safeParse(jsonString, (x) => TeamLimitedMembership$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TeamLimitedMembership' from JSON`);
}
/** @internal */
export const TeamLimited$inboundSchema = z.object({
limited: types.literal(true),
limitedBy: z.array(LimitedBy$inboundSchema),
saml: types.optional(z.lazy(() => TeamLimitedSaml$inboundSchema)),
id: types.string(),
slug: types.string(),
name: types.nullable(types.string()),
avatar: types.nullable(types.string()),
membership: types.optional(z.lazy(() => TeamLimitedMembership$inboundSchema)),
createdAt: types.number(),
parentId: types.optional(types.string()),
});
export function teamLimitedFromJSON(jsonString) {
return safeParse(jsonString, (x) => TeamLimited$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TeamLimited' from JSON`);
}
//# sourceMappingURL=teamlimited.js.map