@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>
292 lines • 13.8 kB
TypeScript
import * as z from "zod/v3";
import { ClosedEnum } from "../types/enums.js";
import { Result as SafeParseResult } from "../types/fp.js";
import { SDKValidationError } from "./sdkvalidationerror.js";
export declare const LimitedBy: {
readonly Invalidated: "invalidated";
readonly Mfa: "mfa";
readonly Scope: "scope";
};
export type LimitedBy = ClosedEnum<typeof LimitedBy>;
/**
* 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 declare const TeamLimitedSyncState: {
readonly Active: "ACTIVE";
readonly 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 type TeamLimitedSyncState = ClosedEnum<typeof TeamLimitedSyncState>;
/**
* Information for the SAML Single Sign-On configuration.
*/
export type TeamLimitedConnection = {
/**
* The Identity Provider "type", for example Okta.
*/
type: string;
/**
* Current state of the connection.
*/
state: string;
/**
* Timestamp (in milliseconds) of when the configuration was connected.
*/
connectedAt: number;
/**
* Timestamp (in milliseconds) of when the last webhook event was received from WorkOS.
*/
lastReceivedWebhookEvent?: number | undefined;
/**
* Timestamp (in milliseconds) of when the last directory sync was performed.
*/
lastSyncedAt?: number | undefined;
/**
* 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.
*/
syncState?: TeamLimitedSyncState | undefined;
status: string;
};
/**
* 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 declare const TeamLimitedSamlSyncState: {
readonly Active: "ACTIVE";
readonly 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 type TeamLimitedSamlSyncState = ClosedEnum<typeof TeamLimitedSamlSyncState>;
/**
* Information for the Directory Sync configuration.
*/
export type TeamLimitedDirectory = {
/**
* The Identity Provider "type", for example Okta.
*/
type: string;
/**
* Current state of the connection.
*/
state: string;
/**
* Timestamp (in milliseconds) of when the configuration was connected.
*/
connectedAt: number;
/**
* Timestamp (in milliseconds) of when the last webhook event was received from WorkOS.
*/
lastReceivedWebhookEvent?: number | undefined;
/**
* Timestamp (in milliseconds) of when the last directory sync was performed.
*/
lastSyncedAt?: number | undefined;
/**
* 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.
*/
syncState?: TeamLimitedSamlSyncState | undefined;
};
/**
* When "Single Sign-On (SAML)" is configured, this object contains information that allows the client-side to identify whether or not this Team has SAML enforced.
*/
export type TeamLimitedSaml = {
/**
* Information for the SAML Single Sign-On configuration.
*/
connection?: TeamLimitedConnection | undefined;
/**
* Information for the Directory Sync configuration.
*/
directory?: TeamLimitedDirectory | undefined;
/**
* When `true`, interactions with the Team **must** be done with an authentication token that has been authenticated with the Team's SAML Single Sign-On provider.
*/
enforced: boolean;
};
export type TeamLimitedEntitlements = {
entitlement: string;
};
export declare const TeamLimitedRole: {
readonly Billing: "BILLING";
readonly Contributor: "CONTRIBUTOR";
readonly Developer: "DEVELOPER";
readonly Member: "MEMBER";
readonly Owner: "OWNER";
readonly Security: "SECURITY";
readonly Viewer: "VIEWER";
readonly ViewerForPlus: "VIEWER_FOR_PLUS";
};
export type TeamLimitedRole = ClosedEnum<typeof TeamLimitedRole>;
export declare const TeamLimitedTeamRoles: {
readonly Billing: "BILLING";
readonly Contributor: "CONTRIBUTOR";
readonly Developer: "DEVELOPER";
readonly Member: "MEMBER";
readonly Owner: "OWNER";
readonly Security: "SECURITY";
readonly Viewer: "VIEWER";
readonly ViewerForPlus: "VIEWER_FOR_PLUS";
};
export type TeamLimitedTeamRoles = ClosedEnum<typeof TeamLimitedTeamRoles>;
export declare const TeamLimitedTeamPermissions: {
readonly AiGatewayApiKeyOwnedBySelf: "AiGatewayApiKeyOwnedBySelf";
readonly AiGatewayBudgetManager: "AiGatewayBudgetManager";
readonly AiGatewayCredits: "AiGatewayCredits";
readonly AiGatewaySettings: "AiGatewaySettings";
readonly AiGatewayTranscriptsManager: "AiGatewayTranscriptsManager";
readonly AiGatewayTranscriptsViewer: "AiGatewayTranscriptsViewer";
readonly ConnectorManager: "ConnectorManager";
readonly CreateProject: "CreateProject";
readonly EnvVariableManager: "EnvVariableManager";
readonly EnvironmentManager: "EnvironmentManager";
readonly FullProductionDeployment: "FullProductionDeployment";
readonly IntegrationManager: "IntegrationManager";
readonly OrgAdmin: "OrgAdmin";
readonly OrgViewer: "OrgViewer";
readonly UsageViewer: "UsageViewer";
readonly V0Builder: "V0Builder";
readonly V0Chatter: "V0Chatter";
readonly V0Viewer: "V0Viewer";
readonly WorkflowDecryptor: "WorkflowDecryptor";
};
export type TeamLimitedTeamPermissions = ClosedEnum<typeof TeamLimitedTeamPermissions>;
export declare const TeamLimitedOrigin: {
readonly AccountUpdate: "account-update";
readonly Bitbucket: "bitbucket";
readonly Dsync: "dsync";
readonly Feedback: "feedback";
readonly Github: "github";
readonly Gitlab: "gitlab";
readonly Import: "import";
readonly Link: "link";
readonly Mail: "mail";
readonly NsnbAutoApprove: "nsnb-auto-approve";
readonly NsnbHobbyUpgrade: "nsnb-hobby-upgrade";
readonly NsnbInvite: "nsnb-invite";
readonly NsnbRedeploy: "nsnb-redeploy";
readonly NsnbRedeployAttributionCard: "nsnb-redeploy-attribution-card";
readonly NsnbRequestAccess: "nsnb-request-access";
readonly NsnbViewerUpgrade: "nsnb-viewer-upgrade";
readonly OrganizationTeams: "organization-teams";
readonly Saml: "saml";
readonly Teams: "teams";
};
export type TeamLimitedOrigin = ClosedEnum<typeof TeamLimitedOrigin>;
export type TeamLimitedGitUserId = string | number;
export type TeamLimitedJoinedFrom = {
origin: TeamLimitedOrigin;
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;
};
/**
* The membership of the authenticated User in relation to the Team.
*/
export type TeamLimitedMembership = {
uid?: string | undefined;
entitlements?: Array<TeamLimitedEntitlements> | undefined;
teamId?: string | undefined;
confirmed: true;
accessRequestedAt?: number | undefined;
role: TeamLimitedRole;
teamRoles?: Array<TeamLimitedTeamRoles> | undefined;
teamPermissions?: Array<TeamLimitedTeamPermissions> | undefined;
createdAt: number;
created: number;
joinedFrom?: TeamLimitedJoinedFrom | undefined;
};
/**
* A limited form of data representing a Team, due to the authentication token missing privileges to read the full Team data.
*/
export type TeamLimited = {
/**
* Property indicating that this Team data contains only limited information, due to the authentication token missing privileges to read the full Team data or due to team having MFA enforced and the user not having MFA enabled. Re-login with the Team's configured SAML Single Sign-On provider in order to upgrade the authentication token with the necessary privileges.
*/
limited: true;
limitedBy: Array<LimitedBy>;
/**
* When "Single Sign-On (SAML)" is configured, this object contains information that allows the client-side to identify whether or not this Team has SAML enforced.
*/
saml?: TeamLimitedSaml | undefined;
/**
* The Team's unique identifier.
*/
id: string;
/**
* The Team's slug, which is unique across the Vercel platform.
*/
slug: string;
/**
* Name associated with the Team account, or `null` if none has been provided.
*/
name: string | null;
/**
* The ID of the file used as avatar for this Team.
*/
avatar: string | null;
/**
* The membership of the authenticated User in relation to the Team.
*/
membership?: TeamLimitedMembership | undefined;
/**
* UNIX timestamp (in milliseconds) when the Team was created.
*/
createdAt: number;
/**
* The organizationId for teams that belong to an organization (set on both the organization's root team and its child teams).
*/
parentId?: string | undefined;
/**
* Best-effort ID of the organization’s root billing team. When present, compare `orgRootTeamId === id` to identify the root team. It may be omitted even when `parentId` is set if organization resolution fails or the referenced organization is missing. Always omitted for non-organization teams.
*/
orgRootTeamId?: string | undefined;
};
/** @internal */
export declare const LimitedBy$inboundSchema: z.ZodNativeEnum<typeof LimitedBy>;
/** @internal */
export declare const TeamLimitedSyncState$inboundSchema: z.ZodNativeEnum<typeof TeamLimitedSyncState>;
/** @internal */
export declare const TeamLimitedConnection$inboundSchema: z.ZodType<TeamLimitedConnection, z.ZodTypeDef, unknown>;
export declare function teamLimitedConnectionFromJSON(jsonString: string): SafeParseResult<TeamLimitedConnection, SDKValidationError>;
/** @internal */
export declare const TeamLimitedSamlSyncState$inboundSchema: z.ZodNativeEnum<typeof TeamLimitedSamlSyncState>;
/** @internal */
export declare const TeamLimitedDirectory$inboundSchema: z.ZodType<TeamLimitedDirectory, z.ZodTypeDef, unknown>;
export declare function teamLimitedDirectoryFromJSON(jsonString: string): SafeParseResult<TeamLimitedDirectory, SDKValidationError>;
/** @internal */
export declare const TeamLimitedSaml$inboundSchema: z.ZodType<TeamLimitedSaml, z.ZodTypeDef, unknown>;
export declare function teamLimitedSamlFromJSON(jsonString: string): SafeParseResult<TeamLimitedSaml, SDKValidationError>;
/** @internal */
export declare const TeamLimitedEntitlements$inboundSchema: z.ZodType<TeamLimitedEntitlements, z.ZodTypeDef, unknown>;
export declare function teamLimitedEntitlementsFromJSON(jsonString: string): SafeParseResult<TeamLimitedEntitlements, SDKValidationError>;
/** @internal */
export declare const TeamLimitedRole$inboundSchema: z.ZodNativeEnum<typeof TeamLimitedRole>;
/** @internal */
export declare const TeamLimitedTeamRoles$inboundSchema: z.ZodNativeEnum<typeof TeamLimitedTeamRoles>;
/** @internal */
export declare const TeamLimitedTeamPermissions$inboundSchema: z.ZodNativeEnum<typeof TeamLimitedTeamPermissions>;
/** @internal */
export declare const TeamLimitedOrigin$inboundSchema: z.ZodNativeEnum<typeof TeamLimitedOrigin>;
/** @internal */
export declare const TeamLimitedGitUserId$inboundSchema: z.ZodType<TeamLimitedGitUserId, z.ZodTypeDef, unknown>;
export declare function teamLimitedGitUserIdFromJSON(jsonString: string): SafeParseResult<TeamLimitedGitUserId, SDKValidationError>;
/** @internal */
export declare const TeamLimitedJoinedFrom$inboundSchema: z.ZodType<TeamLimitedJoinedFrom, z.ZodTypeDef, unknown>;
export declare function teamLimitedJoinedFromFromJSON(jsonString: string): SafeParseResult<TeamLimitedJoinedFrom, SDKValidationError>;
/** @internal */
export declare const TeamLimitedMembership$inboundSchema: z.ZodType<TeamLimitedMembership, z.ZodTypeDef, unknown>;
export declare function teamLimitedMembershipFromJSON(jsonString: string): SafeParseResult<TeamLimitedMembership, SDKValidationError>;
/** @internal */
export declare const TeamLimited$inboundSchema: z.ZodType<TeamLimited, z.ZodTypeDef, unknown>;
export declare function teamLimitedFromJSON(jsonString: string): SafeParseResult<TeamLimited, SDKValidationError>;
//# sourceMappingURL=teamlimited.d.ts.map