/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { remap as remap$ } from "../lib/primitives.js";
import { safeParse } from "../lib/schemas.js";
/**
 * The role of the user to invite
 */
export const InviteUserToTeamRole = {
    Owner: "OWNER",
    Member: "MEMBER",
    Developer: "DEVELOPER",
    Security: "SECURITY",
    Billing: "BILLING",
    Viewer: "VIEWER",
    ViewerForPlus: "VIEWER_FOR_PLUS",
    Contributor: "CONTRIBUTOR",
};
/**
 * Sets the project roles for the invited user
 */
export const InviteUserToTeamTeamsRole = {
    Admin: "ADMIN",
    ProjectViewer: "PROJECT_VIEWER",
    ProjectDeveloper: "PROJECT_DEVELOPER",
};
export const InviteUserToTeamResponseBodyRole = {
    Owner: "OWNER",
    Member: "MEMBER",
    Developer: "DEVELOPER",
    Security: "SECURITY",
    Billing: "BILLING",
    Viewer: "VIEWER",
    ViewerForPlus: "VIEWER_FOR_PLUS",
    Contributor: "CONTRIBUTOR",
};
export const InviteUserToTeamResponseBodyTeamRoles = {
    Owner: "OWNER",
    Member: "MEMBER",
    Developer: "DEVELOPER",
    Security: "SECURITY",
    Billing: "BILLING",
    Viewer: "VIEWER",
    ViewerForPlus: "VIEWER_FOR_PLUS",
    Contributor: "CONTRIBUTOR",
};
export const InviteUserToTeamResponseBodyTeamPermissions = {
    CreateProject: "CreateProject",
    FullProductionDeployment: "FullProductionDeployment",
    UsageViewer: "UsageViewer",
    EnvVariableManager: "EnvVariableManager",
    EnvironmentManager: "EnvironmentManager",
    V0Builder: "V0Builder",
    V0Chatter: "V0Chatter",
    V0Viewer: "V0Viewer",
};
/**
 * The role used for the invitation
 */
export const ResponseBodyRole = {
    Owner: "OWNER",
    Member: "MEMBER",
    Developer: "DEVELOPER",
    Security: "SECURITY",
    Billing: "BILLING",
    Viewer: "VIEWER",
    ViewerForPlus: "VIEWER_FOR_PLUS",
    Contributor: "CONTRIBUTOR",
};
/**
 * The team roles of the user
 */
export const ResponseBodyTeamRoles = {
    Owner: "OWNER",
    Member: "MEMBER",
    Developer: "DEVELOPER",
    Security: "SECURITY",
    Billing: "BILLING",
    Viewer: "VIEWER",
    ViewerForPlus: "VIEWER_FOR_PLUS",
    Contributor: "CONTRIBUTOR",
};
/**
 * The team permissions of the user
 */
export const ResponseBodyTeamPermissions = {
    CreateProject: "CreateProject",
    FullProductionDeployment: "FullProductionDeployment",
    UsageViewer: "UsageViewer",
    EnvVariableManager: "EnvVariableManager",
    EnvironmentManager: "EnvironmentManager",
    V0Builder: "V0Builder",
    V0Chatter: "V0Chatter",
    V0Viewer: "V0Viewer",
};
/** @internal */
export const InviteUserToTeamRole$inboundSchema = z.nativeEnum(InviteUserToTeamRole);
/** @internal */
export const InviteUserToTeamRole$outboundSchema = InviteUserToTeamRole$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var InviteUserToTeamRole$;
(function (InviteUserToTeamRole$) {
    /** @deprecated use `InviteUserToTeamRole$inboundSchema` instead. */
    InviteUserToTeamRole$.inboundSchema = InviteUserToTeamRole$inboundSchema;
    /** @deprecated use `InviteUserToTeamRole$outboundSchema` instead. */
    InviteUserToTeamRole$.outboundSchema = InviteUserToTeamRole$outboundSchema;
})(InviteUserToTeamRole$ || (InviteUserToTeamRole$ = {}));
/** @internal */
export const InviteUserToTeamTeamsRole$inboundSchema = z.nativeEnum(InviteUserToTeamTeamsRole);
/** @internal */
export const InviteUserToTeamTeamsRole$outboundSchema = InviteUserToTeamTeamsRole$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var InviteUserToTeamTeamsRole$;
(function (InviteUserToTeamTeamsRole$) {
    /** @deprecated use `InviteUserToTeamTeamsRole$inboundSchema` instead. */
    InviteUserToTeamTeamsRole$.inboundSchema = InviteUserToTeamTeamsRole$inboundSchema;
    /** @deprecated use `InviteUserToTeamTeamsRole$outboundSchema` instead. */
    InviteUserToTeamTeamsRole$.outboundSchema = InviteUserToTeamTeamsRole$outboundSchema;
})(InviteUserToTeamTeamsRole$ || (InviteUserToTeamTeamsRole$ = {}));
/** @internal */
export const InviteUserToTeamProjects$inboundSchema = z.object({
    projectId: z.string(),
    role: InviteUserToTeamTeamsRole$inboundSchema,
});
/** @internal */
export const InviteUserToTeamProjects$outboundSchema = z.object({
    projectId: z.string(),
    role: InviteUserToTeamTeamsRole$outboundSchema,
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var InviteUserToTeamProjects$;
(function (InviteUserToTeamProjects$) {
    /** @deprecated use `InviteUserToTeamProjects$inboundSchema` instead. */
    InviteUserToTeamProjects$.inboundSchema = InviteUserToTeamProjects$inboundSchema;
    /** @deprecated use `InviteUserToTeamProjects$outboundSchema` instead. */
    InviteUserToTeamProjects$.outboundSchema = InviteUserToTeamProjects$outboundSchema;
})(InviteUserToTeamProjects$ || (InviteUserToTeamProjects$ = {}));
export function inviteUserToTeamProjectsToJSON(inviteUserToTeamProjects) {
    return JSON.stringify(InviteUserToTeamProjects$outboundSchema.parse(inviteUserToTeamProjects));
}
export function inviteUserToTeamProjectsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => InviteUserToTeamProjects$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InviteUserToTeamProjects' from JSON`);
}
/** @internal */
export const InviteUserToTeamRequestBody$inboundSchema = z.object({
    uid: z.string().optional(),
    email: z.string().optional(),
    role: InviteUserToTeamRole$inboundSchema.default("MEMBER"),
    projects: z.array(z.lazy(() => InviteUserToTeamProjects$inboundSchema))
        .optional(),
});
/** @internal */
export const InviteUserToTeamRequestBody$outboundSchema = z.object({
    uid: z.string().optional(),
    email: z.string().optional(),
    role: InviteUserToTeamRole$outboundSchema.default("MEMBER"),
    projects: z.array(z.lazy(() => InviteUserToTeamProjects$outboundSchema))
        .optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var InviteUserToTeamRequestBody$;
(function (InviteUserToTeamRequestBody$) {
    /** @deprecated use `InviteUserToTeamRequestBody$inboundSchema` instead. */
    InviteUserToTeamRequestBody$.inboundSchema = InviteUserToTeamRequestBody$inboundSchema;
    /** @deprecated use `InviteUserToTeamRequestBody$outboundSchema` instead. */
    InviteUserToTeamRequestBody$.outboundSchema = InviteUserToTeamRequestBody$outboundSchema;
})(InviteUserToTeamRequestBody$ || (InviteUserToTeamRequestBody$ = {}));
export function inviteUserToTeamRequestBodyToJSON(inviteUserToTeamRequestBody) {
    return JSON.stringify(InviteUserToTeamRequestBody$outboundSchema.parse(inviteUserToTeamRequestBody));
}
export function inviteUserToTeamRequestBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => InviteUserToTeamRequestBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InviteUserToTeamRequestBody' from JSON`);
}
/** @internal */
export const InviteUserToTeamRequest$inboundSchema = z.object({
    teamId: z.string(),
    RequestBody: z.lazy(() => InviteUserToTeamRequestBody$inboundSchema),
}).transform((v) => {
    return remap$(v, {
        "RequestBody": "requestBody",
    });
});
/** @internal */
export const InviteUserToTeamRequest$outboundSchema = z.object({
    teamId: z.string(),
    requestBody: z.lazy(() => InviteUserToTeamRequestBody$outboundSchema),
}).transform((v) => {
    return remap$(v, {
        requestBody: "RequestBody",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var InviteUserToTeamRequest$;
(function (InviteUserToTeamRequest$) {
    /** @deprecated use `InviteUserToTeamRequest$inboundSchema` instead. */
    InviteUserToTeamRequest$.inboundSchema = InviteUserToTeamRequest$inboundSchema;
    /** @deprecated use `InviteUserToTeamRequest$outboundSchema` instead. */
    InviteUserToTeamRequest$.outboundSchema = InviteUserToTeamRequest$outboundSchema;
})(InviteUserToTeamRequest$ || (InviteUserToTeamRequest$ = {}));
export function inviteUserToTeamRequestToJSON(inviteUserToTeamRequest) {
    return JSON.stringify(InviteUserToTeamRequest$outboundSchema.parse(inviteUserToTeamRequest));
}
export function inviteUserToTeamRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => InviteUserToTeamRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InviteUserToTeamRequest' from JSON`);
}
/** @internal */
export const InviteUserToTeamResponseBodyRole$inboundSchema = z.nativeEnum(InviteUserToTeamResponseBodyRole);
/** @internal */
export const InviteUserToTeamResponseBodyRole$outboundSchema = InviteUserToTeamResponseBodyRole$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var InviteUserToTeamResponseBodyRole$;
(function (InviteUserToTeamResponseBodyRole$) {
    /** @deprecated use `InviteUserToTeamResponseBodyRole$inboundSchema` instead. */
    InviteUserToTeamResponseBodyRole$.inboundSchema = InviteUserToTeamResponseBodyRole$inboundSchema;
    /** @deprecated use `InviteUserToTeamResponseBodyRole$outboundSchema` instead. */
    InviteUserToTeamResponseBodyRole$.outboundSchema = InviteUserToTeamResponseBodyRole$outboundSchema;
})(InviteUserToTeamResponseBodyRole$ || (InviteUserToTeamResponseBodyRole$ = {}));
/** @internal */
export const InviteUserToTeamResponseBodyTeamRoles$inboundSchema = z.nativeEnum(InviteUserToTeamResponseBodyTeamRoles);
/** @internal */
export const InviteUserToTeamResponseBodyTeamRoles$outboundSchema = InviteUserToTeamResponseBodyTeamRoles$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var InviteUserToTeamResponseBodyTeamRoles$;
(function (InviteUserToTeamResponseBodyTeamRoles$) {
    /** @deprecated use `InviteUserToTeamResponseBodyTeamRoles$inboundSchema` instead. */
    InviteUserToTeamResponseBodyTeamRoles$.inboundSchema = InviteUserToTeamResponseBodyTeamRoles$inboundSchema;
    /** @deprecated use `InviteUserToTeamResponseBodyTeamRoles$outboundSchema` instead. */
    InviteUserToTeamResponseBodyTeamRoles$.outboundSchema = InviteUserToTeamResponseBodyTeamRoles$outboundSchema;
})(InviteUserToTeamResponseBodyTeamRoles$ || (InviteUserToTeamResponseBodyTeamRoles$ = {}));
/** @internal */
export const InviteUserToTeamResponseBodyTeamPermissions$inboundSchema = z
    .nativeEnum(InviteUserToTeamResponseBodyTeamPermissions);
/** @internal */
export const InviteUserToTeamResponseBodyTeamPermissions$outboundSchema = InviteUserToTeamResponseBodyTeamPermissions$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var InviteUserToTeamResponseBodyTeamPermissions$;
(function (InviteUserToTeamResponseBodyTeamPermissions$) {
    /** @deprecated use `InviteUserToTeamResponseBodyTeamPermissions$inboundSchema` instead. */
    InviteUserToTeamResponseBodyTeamPermissions$.inboundSchema = InviteUserToTeamResponseBodyTeamPermissions$inboundSchema;
    /** @deprecated use `InviteUserToTeamResponseBodyTeamPermissions$outboundSchema` instead. */
    InviteUserToTeamResponseBodyTeamPermissions$.outboundSchema = InviteUserToTeamResponseBodyTeamPermissions$outboundSchema;
})(InviteUserToTeamResponseBodyTeamPermissions$ || (InviteUserToTeamResponseBodyTeamPermissions$ = {}));
/** @internal */
export const InviteUserToTeamResponseBody2$inboundSchema = z.object({
    uid: z.string(),
    username: z.string(),
    role: InviteUserToTeamResponseBodyRole$inboundSchema,
    teamRoles: z.array(InviteUserToTeamResponseBodyTeamRoles$inboundSchema)
        .optional(),
    teamPermissions: z.array(InviteUserToTeamResponseBodyTeamPermissions$inboundSchema).optional(),
});
/** @internal */
export const InviteUserToTeamResponseBody2$outboundSchema = z.object({
    uid: z.string(),
    username: z.string(),
    role: InviteUserToTeamResponseBodyRole$outboundSchema,
    teamRoles: z.array(InviteUserToTeamResponseBodyTeamRoles$outboundSchema)
        .optional(),
    teamPermissions: z.array(InviteUserToTeamResponseBodyTeamPermissions$outboundSchema).optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var InviteUserToTeamResponseBody2$;
(function (InviteUserToTeamResponseBody2$) {
    /** @deprecated use `InviteUserToTeamResponseBody2$inboundSchema` instead. */
    InviteUserToTeamResponseBody2$.inboundSchema = InviteUserToTeamResponseBody2$inboundSchema;
    /** @deprecated use `InviteUserToTeamResponseBody2$outboundSchema` instead. */
    InviteUserToTeamResponseBody2$.outboundSchema = InviteUserToTeamResponseBody2$outboundSchema;
})(InviteUserToTeamResponseBody2$ || (InviteUserToTeamResponseBody2$ = {}));
export function inviteUserToTeamResponseBody2ToJSON(inviteUserToTeamResponseBody2) {
    return JSON.stringify(InviteUserToTeamResponseBody2$outboundSchema.parse(inviteUserToTeamResponseBody2));
}
export function inviteUserToTeamResponseBody2FromJSON(jsonString) {
    return safeParse(jsonString, (x) => InviteUserToTeamResponseBody2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InviteUserToTeamResponseBody2' from JSON`);
}
/** @internal */
export const ResponseBodyRole$inboundSchema = z.nativeEnum(ResponseBodyRole);
/** @internal */
export const ResponseBodyRole$outboundSchema = ResponseBodyRole$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ResponseBodyRole$;
(function (ResponseBodyRole$) {
    /** @deprecated use `ResponseBodyRole$inboundSchema` instead. */
    ResponseBodyRole$.inboundSchema = ResponseBodyRole$inboundSchema;
    /** @deprecated use `ResponseBodyRole$outboundSchema` instead. */
    ResponseBodyRole$.outboundSchema = ResponseBodyRole$outboundSchema;
})(ResponseBodyRole$ || (ResponseBodyRole$ = {}));
/** @internal */
export const ResponseBodyTeamRoles$inboundSchema = z.nativeEnum(ResponseBodyTeamRoles);
/** @internal */
export const ResponseBodyTeamRoles$outboundSchema = ResponseBodyTeamRoles$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ResponseBodyTeamRoles$;
(function (ResponseBodyTeamRoles$) {
    /** @deprecated use `ResponseBodyTeamRoles$inboundSchema` instead. */
    ResponseBodyTeamRoles$.inboundSchema = ResponseBodyTeamRoles$inboundSchema;
    /** @deprecated use `ResponseBodyTeamRoles$outboundSchema` instead. */
    ResponseBodyTeamRoles$.outboundSchema = ResponseBodyTeamRoles$outboundSchema;
})(ResponseBodyTeamRoles$ || (ResponseBodyTeamRoles$ = {}));
/** @internal */
export const ResponseBodyTeamPermissions$inboundSchema = z.nativeEnum(ResponseBodyTeamPermissions);
/** @internal */
export const ResponseBodyTeamPermissions$outboundSchema = ResponseBodyTeamPermissions$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ResponseBodyTeamPermissions$;
(function (ResponseBodyTeamPermissions$) {
    /** @deprecated use `ResponseBodyTeamPermissions$inboundSchema` instead. */
    ResponseBodyTeamPermissions$.inboundSchema = ResponseBodyTeamPermissions$inboundSchema;
    /** @deprecated use `ResponseBodyTeamPermissions$outboundSchema` instead. */
    ResponseBodyTeamPermissions$.outboundSchema = ResponseBodyTeamPermissions$outboundSchema;
})(ResponseBodyTeamPermissions$ || (ResponseBodyTeamPermissions$ = {}));
/** @internal */
export const InviteUserToTeamResponseBody1$inboundSchema = z.object({
    uid: z.string(),
    username: z.string(),
    email: z.string().optional(),
    role: ResponseBodyRole$inboundSchema,
    teamRoles: z.array(ResponseBodyTeamRoles$inboundSchema).optional(),
    teamPermissions: z.array(ResponseBodyTeamPermissions$inboundSchema)
        .optional(),
});
/** @internal */
export const InviteUserToTeamResponseBody1$outboundSchema = z.object({
    uid: z.string(),
    username: z.string(),
    email: z.string().optional(),
    role: ResponseBodyRole$outboundSchema,
    teamRoles: z.array(ResponseBodyTeamRoles$outboundSchema).optional(),
    teamPermissions: z.array(ResponseBodyTeamPermissions$outboundSchema)
        .optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var InviteUserToTeamResponseBody1$;
(function (InviteUserToTeamResponseBody1$) {
    /** @deprecated use `InviteUserToTeamResponseBody1$inboundSchema` instead. */
    InviteUserToTeamResponseBody1$.inboundSchema = InviteUserToTeamResponseBody1$inboundSchema;
    /** @deprecated use `InviteUserToTeamResponseBody1$outboundSchema` instead. */
    InviteUserToTeamResponseBody1$.outboundSchema = InviteUserToTeamResponseBody1$outboundSchema;
})(InviteUserToTeamResponseBody1$ || (InviteUserToTeamResponseBody1$ = {}));
export function inviteUserToTeamResponseBody1ToJSON(inviteUserToTeamResponseBody1) {
    return JSON.stringify(InviteUserToTeamResponseBody1$outboundSchema.parse(inviteUserToTeamResponseBody1));
}
export function inviteUserToTeamResponseBody1FromJSON(jsonString) {
    return safeParse(jsonString, (x) => InviteUserToTeamResponseBody1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InviteUserToTeamResponseBody1' from JSON`);
}
/** @internal */
export const InviteUserToTeamResponseBody$inboundSchema = z.union([
    z.lazy(() => InviteUserToTeamResponseBody1$inboundSchema),
    z.lazy(() => InviteUserToTeamResponseBody2$inboundSchema),
]);
/** @internal */
export const InviteUserToTeamResponseBody$outboundSchema = z.union([
    z.lazy(() => InviteUserToTeamResponseBody1$outboundSchema),
    z.lazy(() => InviteUserToTeamResponseBody2$outboundSchema),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var InviteUserToTeamResponseBody$;
(function (InviteUserToTeamResponseBody$) {
    /** @deprecated use `InviteUserToTeamResponseBody$inboundSchema` instead. */
    InviteUserToTeamResponseBody$.inboundSchema = InviteUserToTeamResponseBody$inboundSchema;
    /** @deprecated use `InviteUserToTeamResponseBody$outboundSchema` instead. */
    InviteUserToTeamResponseBody$.outboundSchema = InviteUserToTeamResponseBody$outboundSchema;
})(InviteUserToTeamResponseBody$ || (InviteUserToTeamResponseBody$ = {}));
export function inviteUserToTeamResponseBodyToJSON(inviteUserToTeamResponseBody) {
    return JSON.stringify(InviteUserToTeamResponseBody$outboundSchema.parse(inviteUserToTeamResponseBody));
}
export function inviteUserToTeamResponseBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => InviteUserToTeamResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InviteUserToTeamResponseBody' from JSON`);
}
//# sourceMappingURL=inviteusertoteamop.js.map