UNPKG

@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>

240 lines 10 kB
/* * 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"; /** * Only return members with the specified team role. */ export const QueryParamRole = { Owner: "OWNER", Member: "MEMBER", Developer: "DEVELOPER", Security: "SECURITY", Billing: "BILLING", Viewer: "VIEWER", ViewerForPlus: "VIEWER_FOR_PLUS", Contributor: "CONTRIBUTOR", }; /** * Role of this user in the team. */ export const GetTeamMembersRole = { Billing: "BILLING", Contributor: "CONTRIBUTOR", Developer: "DEVELOPER", Member: "MEMBER", Owner: "OWNER", Security: "SECURITY", Viewer: "VIEWER", ViewerForPlus: "VIEWER_FOR_PLUS", }; export const GetTeamMembersOrigin = { 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 GetTeamMembersTeamsResponseRole = { Admin: "ADMIN", ProjectDeveloper: "PROJECT_DEVELOPER", ProjectGuest: "PROJECT_GUEST", ProjectViewer: "PROJECT_VIEWER", }; export const GetTeamMembersTeamsRole = { Billing: "BILLING", Contributor: "CONTRIBUTOR", Developer: "DEVELOPER", Member: "MEMBER", Owner: "OWNER", Security: "SECURITY", Viewer: "VIEWER", ViewerForPlus: "VIEWER_FOR_PLUS", }; export const GetTeamMembersTeamRoles = { Billing: "BILLING", Contributor: "CONTRIBUTOR", Developer: "DEVELOPER", Member: "MEMBER", Owner: "OWNER", Security: "SECURITY", Viewer: "VIEWER", ViewerForPlus: "VIEWER_FOR_PLUS", }; export const GetTeamMembersTeamPermissions = { CreateProject: "CreateProject", EnvVariableManager: "EnvVariableManager", EnvironmentManager: "EnvironmentManager", FullProductionDeployment: "FullProductionDeployment", IntegrationManager: "IntegrationManager", OrgAdmin: "OrgAdmin", OrgViewer: "OrgViewer", UsageViewer: "UsageViewer", V0Builder: "V0Builder", V0Chatter: "V0Chatter", V0Viewer: "V0Viewer", }; export const GetTeamMembersTeamsProjects = { Admin: "ADMIN", ProjectDeveloper: "PROJECT_DEVELOPER", ProjectGuest: "PROJECT_GUEST", ProjectViewer: "PROJECT_VIEWER", }; /** @internal */ export const QueryParamRole$outboundSchema = z.nativeEnum(QueryParamRole); /** @internal */ export const GetTeamMembersRequest$outboundSchema = z.object({ limit: z.number().optional(), since: z.number().optional(), until: z.number().optional(), search: z.string().optional(), role: QueryParamRole$outboundSchema.optional(), excludeProject: z.string().optional(), eligibleMembersForProjectId: z.string().optional(), teamId: z.string(), slug: z.string().optional(), }); export function getTeamMembersRequestToJSON(getTeamMembersRequest) { return JSON.stringify(GetTeamMembersRequest$outboundSchema.parse(getTeamMembersRequest)); } /** @internal */ export const GetTeamMembersGithub$inboundSchema = z.object({ login: types.optional(types.string()), }); export function getTeamMembersGithubFromJSON(jsonString) { return safeParse(jsonString, (x) => GetTeamMembersGithub$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetTeamMembersGithub' from JSON`); } /** @internal */ export const GetTeamMembersGitlab$inboundSchema = z.object({ login: types.optional(types.string()), }); export function getTeamMembersGitlabFromJSON(jsonString) { return safeParse(jsonString, (x) => GetTeamMembersGitlab$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetTeamMembersGitlab' from JSON`); } /** @internal */ export const GetTeamMembersBitbucket$inboundSchema = z.object({ login: types.optional(types.string()), }); export function getTeamMembersBitbucketFromJSON(jsonString) { return safeParse(jsonString, (x) => GetTeamMembersBitbucket$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetTeamMembersBitbucket' from JSON`); } /** @internal */ export const GetTeamMembersRole$inboundSchema = z.nativeEnum(GetTeamMembersRole); /** @internal */ export const GetTeamMembersOrigin$inboundSchema = z.nativeEnum(GetTeamMembersOrigin); /** @internal */ export const GetTeamMembersGitUserId$inboundSchema = smartUnion([types.string(), types.number()]); export function getTeamMembersGitUserIdFromJSON(jsonString) { return safeParse(jsonString, (x) => GetTeamMembersGitUserId$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetTeamMembersGitUserId' from JSON`); } /** @internal */ export const GetTeamMembersJoinedFrom$inboundSchema = z.object({ origin: GetTeamMembersOrigin$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 getTeamMembersJoinedFromFromJSON(jsonString) { return safeParse(jsonString, (x) => GetTeamMembersJoinedFrom$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetTeamMembersJoinedFrom' from JSON`); } /** @internal */ export const GetTeamMembersTeamsResponseRole$inboundSchema = z.nativeEnum(GetTeamMembersTeamsResponseRole); /** @internal */ export const GetTeamMembersProjects$inboundSchema = z.object({ name: types.string(), id: types.string(), role: types.optional(GetTeamMembersTeamsResponseRole$inboundSchema), }); export function getTeamMembersProjectsFromJSON(jsonString) { return safeParse(jsonString, (x) => GetTeamMembersProjects$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetTeamMembersProjects' from JSON`); } /** @internal */ export const GetTeamMembersMembers$inboundSchema = z.object({ avatar: types.optional(types.string()), confirmed: types.boolean(), email: types.string(), github: types.optional(z.lazy(() => GetTeamMembersGithub$inboundSchema)), gitlab: types.optional(z.lazy(() => GetTeamMembersGitlab$inboundSchema)), bitbucket: types.optional(z.lazy(() => GetTeamMembersBitbucket$inboundSchema)), role: GetTeamMembersRole$inboundSchema, uid: types.string(), username: types.string(), name: types.optional(types.string()), createdAt: types.number(), accessRequestedAt: types.optional(types.number()), joinedFrom: types.optional(z.lazy(() => GetTeamMembersJoinedFrom$inboundSchema)), projects: types.optional(z.array(z.lazy(() => GetTeamMembersProjects$inboundSchema))), isEnterpriseManaged: types.optional(types.boolean()), }); export function getTeamMembersMembersFromJSON(jsonString) { return safeParse(jsonString, (x) => GetTeamMembersMembers$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetTeamMembersMembers' from JSON`); } /** @internal */ export const GetTeamMembersTeamsRole$inboundSchema = z.nativeEnum(GetTeamMembersTeamsRole); /** @internal */ export const GetTeamMembersTeamRoles$inboundSchema = z.nativeEnum(GetTeamMembersTeamRoles); /** @internal */ export const GetTeamMembersTeamPermissions$inboundSchema = z.nativeEnum(GetTeamMembersTeamPermissions); /** @internal */ export const GetTeamMembersTeamsProjects$inboundSchema = z.nativeEnum(GetTeamMembersTeamsProjects); /** @internal */ export const EmailInviteCodes$inboundSchema = z.object({ accessGroups: types.optional(z.array(types.string())), id: types.string(), email: types.optional(types.string()), role: types.optional(GetTeamMembersTeamsRole$inboundSchema), teamRoles: types.optional(z.array(GetTeamMembersTeamRoles$inboundSchema)), teamPermissions: types.optional(z.array(GetTeamMembersTeamPermissions$inboundSchema)), isDSyncUser: types.boolean(), createdAt: types.optional(types.number()), expired: types.optional(types.literal(true)), projects: types.optional(z.record(GetTeamMembersTeamsProjects$inboundSchema)), entitlements: types.optional(z.array(types.string())), }); export function emailInviteCodesFromJSON(jsonString) { return safeParse(jsonString, (x) => EmailInviteCodes$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EmailInviteCodes' from JSON`); } /** @internal */ export const GetTeamMembersPagination$inboundSchema = z.object({ hasNext: types.boolean(), count: types.number(), next: types.nullable(types.number()), prev: types.nullable(types.number()), }); export function getTeamMembersPaginationFromJSON(jsonString) { return safeParse(jsonString, (x) => GetTeamMembersPagination$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetTeamMembersPagination' from JSON`); } /** @internal */ export const GetTeamMembersResponseBody$inboundSchema = z.object({ members: z.array(z.lazy(() => GetTeamMembersMembers$inboundSchema)), emailInviteCodes: types.optional(z.array(z.lazy(() => EmailInviteCodes$inboundSchema))), pagination: z.lazy(() => GetTeamMembersPagination$inboundSchema), }); export function getTeamMembersResponseBodyFromJSON(jsonString) { return safeParse(jsonString, (x) => GetTeamMembersResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetTeamMembersResponseBody' from JSON`); } //# sourceMappingURL=getteammembersop.js.map