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>

90 lines 3.79 kB
/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; import * as types from "../types/primitives.js"; export const UpdateTeamMemberTeamPermissions = { ConnectorManager: "ConnectorManager", IntegrationManager: "IntegrationManager", CreateProject: "CreateProject", FullProductionDeployment: "FullProductionDeployment", UsageViewer: "UsageViewer", EnvVariableManager: "EnvVariableManager", EnvironmentManager: "EnvironmentManager", WorkflowDecryptor: "WorkflowDecryptor", OrgAdmin: "OrgAdmin", OrgViewer: "OrgViewer", AiGatewaySettings: "AiGatewaySettings", AiGatewayCredits: "AiGatewayCredits", AiGatewayApiKeyOwnedBySelf: "AiGatewayApiKeyOwnedBySelf", AiGatewayBudgetManager: "AiGatewayBudgetManager", AiGatewayTranscriptsManager: "AiGatewayTranscriptsManager", AiGatewayTranscriptsViewer: "AiGatewayTranscriptsViewer", V0Builder: "V0Builder", V0Chatter: "V0Chatter", V0Viewer: "V0Viewer", }; /** * The project role of the member that will be added. \"null\" will remove this project level role. */ export const UpdateTeamMemberRole = { Admin: "ADMIN", ProjectViewer: "PROJECT_VIEWER", ProjectDeveloper: "PROJECT_DEVELOPER", }; /** @internal */ export const UpdateTeamMemberTeamPermissions$outboundSchema = z.nativeEnum(UpdateTeamMemberTeamPermissions); /** @internal */ export const UpdateTeamMemberRole$outboundSchema = z.nativeEnum(UpdateTeamMemberRole); /** @internal */ export const UpdateTeamMemberProjects$outboundSchema = z.object({ projectId: z.string(), role: z.nullable(UpdateTeamMemberRole$outboundSchema), }); export function updateTeamMemberProjectsToJSON(updateTeamMemberProjects) { return JSON.stringify(UpdateTeamMemberProjects$outboundSchema.parse(updateTeamMemberProjects)); } /** @internal */ export const UpdateTeamMemberJoinedFrom$outboundSchema = z.object({ ssoUserId: z.nullable(z.any()).optional(), }); export function updateTeamMemberJoinedFromToJSON(updateTeamMemberJoinedFrom) { return JSON.stringify(UpdateTeamMemberJoinedFrom$outboundSchema.parse(updateTeamMemberJoinedFrom)); } /** @internal */ export const UpdateTeamMemberRequestBody$outboundSchema = z.object({ confirmed: z.literal(true).optional(), role: z.string().default("MEMBER"), teamPermissions: z.array(UpdateTeamMemberTeamPermissions$outboundSchema) .optional(), projects: z.array(z.lazy(() => UpdateTeamMemberProjects$outboundSchema)) .optional(), joinedFrom: z.lazy(() => UpdateTeamMemberJoinedFrom$outboundSchema) .optional(), }); export function updateTeamMemberRequestBodyToJSON(updateTeamMemberRequestBody) { return JSON.stringify(UpdateTeamMemberRequestBody$outboundSchema.parse(updateTeamMemberRequestBody)); } /** @internal */ export const UpdateTeamMemberRequest$outboundSchema = z.object({ uid: z.string(), teamId: z.string(), requestBody: z.lazy(() => UpdateTeamMemberRequestBody$outboundSchema), }).transform((v) => { return remap$(v, { requestBody: "RequestBody", }); }); export function updateTeamMemberRequestToJSON(updateTeamMemberRequest) { return JSON.stringify(UpdateTeamMemberRequest$outboundSchema.parse(updateTeamMemberRequest)); } /** @internal */ export const UpdateTeamMemberResponseBody$inboundSchema = z.object({ id: types.string(), }); export function updateTeamMemberResponseBodyFromJSON(jsonString) { return safeParse(jsonString, (x) => UpdateTeamMemberResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateTeamMemberResponseBody' from JSON`); } //# sourceMappingURL=updateteammemberop.js.map