/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../lib/schemas.js";
/**
 * Role of this user in the project.
 */
export const GetProjectMembersResponseBodyRole = {
    Admin: "ADMIN",
    ProjectDeveloper: "PROJECT_DEVELOPER",
    ProjectViewer: "PROJECT_VIEWER",
};
/**
 * Role of this user in the project.
 */
export const ComputedProjectRole = {
    Admin: "ADMIN",
    ProjectDeveloper: "PROJECT_DEVELOPER",
    ProjectViewer: "PROJECT_VIEWER",
};
/**
 * The role of this user in the team.
 */
export const ResponseBodyTeamRole = {
    Owner: "OWNER",
    Member: "MEMBER",
    Developer: "DEVELOPER",
    Security: "SECURITY",
    Billing: "BILLING",
    Viewer: "VIEWER",
    ViewerForPlus: "VIEWER_FOR_PLUS",
    Contributor: "CONTRIBUTOR",
};
/** @internal */
export const GetProjectMembersRequest$inboundSchema = z.object({
    idOrName: z.string(),
    limit: z.number().int().optional(),
    since: z.number().int().optional(),
    until: z.number().int().optional(),
    search: z.string().optional(),
    teamId: z.string().optional(),
    slug: z.string().optional(),
});
/** @internal */
export const GetProjectMembersRequest$outboundSchema = z.object({
    idOrName: z.string(),
    limit: z.number().int().optional(),
    since: z.number().int().optional(),
    until: z.number().int().optional(),
    search: z.string().optional(),
    teamId: z.string().optional(),
    slug: z.string().optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetProjectMembersRequest$;
(function (GetProjectMembersRequest$) {
    /** @deprecated use `GetProjectMembersRequest$inboundSchema` instead. */
    GetProjectMembersRequest$.inboundSchema = GetProjectMembersRequest$inboundSchema;
    /** @deprecated use `GetProjectMembersRequest$outboundSchema` instead. */
    GetProjectMembersRequest$.outboundSchema = GetProjectMembersRequest$outboundSchema;
})(GetProjectMembersRequest$ || (GetProjectMembersRequest$ = {}));
export function getProjectMembersRequestToJSON(getProjectMembersRequest) {
    return JSON.stringify(GetProjectMembersRequest$outboundSchema.parse(getProjectMembersRequest));
}
export function getProjectMembersRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetProjectMembersRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetProjectMembersRequest' from JSON`);
}
/** @internal */
export const GetProjectMembersResponseBodyRole$inboundSchema = z.nativeEnum(GetProjectMembersResponseBodyRole);
/** @internal */
export const GetProjectMembersResponseBodyRole$outboundSchema = GetProjectMembersResponseBodyRole$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetProjectMembersResponseBodyRole$;
(function (GetProjectMembersResponseBodyRole$) {
    /** @deprecated use `GetProjectMembersResponseBodyRole$inboundSchema` instead. */
    GetProjectMembersResponseBodyRole$.inboundSchema = GetProjectMembersResponseBodyRole$inboundSchema;
    /** @deprecated use `GetProjectMembersResponseBodyRole$outboundSchema` instead. */
    GetProjectMembersResponseBodyRole$.outboundSchema = GetProjectMembersResponseBodyRole$outboundSchema;
})(GetProjectMembersResponseBodyRole$ || (GetProjectMembersResponseBodyRole$ = {}));
/** @internal */
export const ComputedProjectRole$inboundSchema = z.nativeEnum(ComputedProjectRole);
/** @internal */
export const ComputedProjectRole$outboundSchema = ComputedProjectRole$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ComputedProjectRole$;
(function (ComputedProjectRole$) {
    /** @deprecated use `ComputedProjectRole$inboundSchema` instead. */
    ComputedProjectRole$.inboundSchema = ComputedProjectRole$inboundSchema;
    /** @deprecated use `ComputedProjectRole$outboundSchema` instead. */
    ComputedProjectRole$.outboundSchema = ComputedProjectRole$outboundSchema;
})(ComputedProjectRole$ || (ComputedProjectRole$ = {}));
/** @internal */
export const ResponseBodyTeamRole$inboundSchema = z.nativeEnum(ResponseBodyTeamRole);
/** @internal */
export const ResponseBodyTeamRole$outboundSchema = ResponseBodyTeamRole$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ResponseBodyTeamRole$;
(function (ResponseBodyTeamRole$) {
    /** @deprecated use `ResponseBodyTeamRole$inboundSchema` instead. */
    ResponseBodyTeamRole$.inboundSchema = ResponseBodyTeamRole$inboundSchema;
    /** @deprecated use `ResponseBodyTeamRole$outboundSchema` instead. */
    ResponseBodyTeamRole$.outboundSchema = ResponseBodyTeamRole$outboundSchema;
})(ResponseBodyTeamRole$ || (ResponseBodyTeamRole$ = {}));
/** @internal */
export const ResponseBodyMembers$inboundSchema = z.object({
    avatar: z.string().optional(),
    email: z.string(),
    role: GetProjectMembersResponseBodyRole$inboundSchema,
    computedProjectRole: ComputedProjectRole$inboundSchema,
    uid: z.string(),
    username: z.string(),
    name: z.string().optional(),
    createdAt: z.number(),
    teamRole: ResponseBodyTeamRole$inboundSchema,
});
/** @internal */
export const ResponseBodyMembers$outboundSchema = z.object({
    avatar: z.string().optional(),
    email: z.string(),
    role: GetProjectMembersResponseBodyRole$outboundSchema,
    computedProjectRole: ComputedProjectRole$outboundSchema,
    uid: z.string(),
    username: z.string(),
    name: z.string().optional(),
    createdAt: z.number(),
    teamRole: ResponseBodyTeamRole$outboundSchema,
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ResponseBodyMembers$;
(function (ResponseBodyMembers$) {
    /** @deprecated use `ResponseBodyMembers$inboundSchema` instead. */
    ResponseBodyMembers$.inboundSchema = ResponseBodyMembers$inboundSchema;
    /** @deprecated use `ResponseBodyMembers$outboundSchema` instead. */
    ResponseBodyMembers$.outboundSchema = ResponseBodyMembers$outboundSchema;
})(ResponseBodyMembers$ || (ResponseBodyMembers$ = {}));
export function responseBodyMembersToJSON(responseBodyMembers) {
    return JSON.stringify(ResponseBodyMembers$outboundSchema.parse(responseBodyMembers));
}
export function responseBodyMembersFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ResponseBodyMembers$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBodyMembers' from JSON`);
}
/** @internal */
export const GetProjectMembersResponseBodyPagination$inboundSchema = z.object({
    hasNext: z.boolean(),
    count: z.number(),
    next: z.nullable(z.number()),
    prev: z.nullable(z.number()),
});
/** @internal */
export const GetProjectMembersResponseBodyPagination$outboundSchema = z.object({
    hasNext: z.boolean(),
    count: z.number(),
    next: z.nullable(z.number()),
    prev: z.nullable(z.number()),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetProjectMembersResponseBodyPagination$;
(function (GetProjectMembersResponseBodyPagination$) {
    /** @deprecated use `GetProjectMembersResponseBodyPagination$inboundSchema` instead. */
    GetProjectMembersResponseBodyPagination$.inboundSchema = GetProjectMembersResponseBodyPagination$inboundSchema;
    /** @deprecated use `GetProjectMembersResponseBodyPagination$outboundSchema` instead. */
    GetProjectMembersResponseBodyPagination$.outboundSchema = GetProjectMembersResponseBodyPagination$outboundSchema;
})(GetProjectMembersResponseBodyPagination$ || (GetProjectMembersResponseBodyPagination$ = {}));
export function getProjectMembersResponseBodyPaginationToJSON(getProjectMembersResponseBodyPagination) {
    return JSON.stringify(GetProjectMembersResponseBodyPagination$outboundSchema.parse(getProjectMembersResponseBodyPagination));
}
export function getProjectMembersResponseBodyPaginationFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetProjectMembersResponseBodyPagination$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetProjectMembersResponseBodyPagination' from JSON`);
}
/** @internal */
export const GetProjectMembersResponseBody2$inboundSchema = z.object({
    members: z.array(z.lazy(() => ResponseBodyMembers$inboundSchema)),
    pagination: z.lazy(() => GetProjectMembersResponseBodyPagination$inboundSchema),
});
/** @internal */
export const GetProjectMembersResponseBody2$outboundSchema = z.object({
    members: z.array(z.lazy(() => ResponseBodyMembers$outboundSchema)),
    pagination: z.lazy(() => GetProjectMembersResponseBodyPagination$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetProjectMembersResponseBody2$;
(function (GetProjectMembersResponseBody2$) {
    /** @deprecated use `GetProjectMembersResponseBody2$inboundSchema` instead. */
    GetProjectMembersResponseBody2$.inboundSchema = GetProjectMembersResponseBody2$inboundSchema;
    /** @deprecated use `GetProjectMembersResponseBody2$outboundSchema` instead. */
    GetProjectMembersResponseBody2$.outboundSchema = GetProjectMembersResponseBody2$outboundSchema;
})(GetProjectMembersResponseBody2$ || (GetProjectMembersResponseBody2$ = {}));
export function getProjectMembersResponseBody2ToJSON(getProjectMembersResponseBody2) {
    return JSON.stringify(GetProjectMembersResponseBody2$outboundSchema.parse(getProjectMembersResponseBody2));
}
export function getProjectMembersResponseBody2FromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetProjectMembersResponseBody2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetProjectMembersResponseBody2' from JSON`);
}
/** @internal */
export const GetProjectMembersResponseBody1$inboundSchema = z.object({});
/** @internal */
export const GetProjectMembersResponseBody1$outboundSchema = z.object({});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetProjectMembersResponseBody1$;
(function (GetProjectMembersResponseBody1$) {
    /** @deprecated use `GetProjectMembersResponseBody1$inboundSchema` instead. */
    GetProjectMembersResponseBody1$.inboundSchema = GetProjectMembersResponseBody1$inboundSchema;
    /** @deprecated use `GetProjectMembersResponseBody1$outboundSchema` instead. */
    GetProjectMembersResponseBody1$.outboundSchema = GetProjectMembersResponseBody1$outboundSchema;
})(GetProjectMembersResponseBody1$ || (GetProjectMembersResponseBody1$ = {}));
export function getProjectMembersResponseBody1ToJSON(getProjectMembersResponseBody1) {
    return JSON.stringify(GetProjectMembersResponseBody1$outboundSchema.parse(getProjectMembersResponseBody1));
}
export function getProjectMembersResponseBody1FromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetProjectMembersResponseBody1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetProjectMembersResponseBody1' from JSON`);
}
/** @internal */
export const GetProjectMembersResponseBody$inboundSchema = z.union([
    z.lazy(() => GetProjectMembersResponseBody2$inboundSchema),
    z.lazy(() => GetProjectMembersResponseBody1$inboundSchema),
]);
/** @internal */
export const GetProjectMembersResponseBody$outboundSchema = z.union([
    z.lazy(() => GetProjectMembersResponseBody2$outboundSchema),
    z.lazy(() => GetProjectMembersResponseBody1$outboundSchema),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetProjectMembersResponseBody$;
(function (GetProjectMembersResponseBody$) {
    /** @deprecated use `GetProjectMembersResponseBody$inboundSchema` instead. */
    GetProjectMembersResponseBody$.inboundSchema = GetProjectMembersResponseBody$inboundSchema;
    /** @deprecated use `GetProjectMembersResponseBody$outboundSchema` instead. */
    GetProjectMembersResponseBody$.outboundSchema = GetProjectMembersResponseBody$outboundSchema;
})(GetProjectMembersResponseBody$ || (GetProjectMembersResponseBody$ = {}));
export function getProjectMembersResponseBodyToJSON(getProjectMembersResponseBody) {
    return JSON.stringify(GetProjectMembersResponseBody$outboundSchema.parse(getProjectMembersResponseBody));
}
export function getProjectMembersResponseBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetProjectMembersResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetProjectMembersResponseBody' from JSON`);
}
//# sourceMappingURL=getprojectmembersop.js.map