/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../lib/schemas.js";
/**
 * The user's version. Will either be unset or `northstar`.
 */
export const AuthUserLimitedVersion = {
    Northstar: "northstar",
};
/** @internal */
export const AuthUserLimitedVersion$inboundSchema = z.nativeEnum(AuthUserLimitedVersion);
/** @internal */
export const AuthUserLimitedVersion$outboundSchema = AuthUserLimitedVersion$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var AuthUserLimitedVersion$;
(function (AuthUserLimitedVersion$) {
    /** @deprecated use `AuthUserLimitedVersion$inboundSchema` instead. */
    AuthUserLimitedVersion$.inboundSchema = AuthUserLimitedVersion$inboundSchema;
    /** @deprecated use `AuthUserLimitedVersion$outboundSchema` instead. */
    AuthUserLimitedVersion$.outboundSchema = AuthUserLimitedVersion$outboundSchema;
})(AuthUserLimitedVersion$ || (AuthUserLimitedVersion$ = {}));
/** @internal */
export const AuthUserLimited$inboundSchema = z.object({
    limited: z.boolean(),
    id: z.string(),
    email: z.string(),
    name: z.nullable(z.string()),
    username: z.string(),
    avatar: z.nullable(z.string()),
    defaultTeamId: z.nullable(z.string()),
    version: z.nullable(AuthUserLimitedVersion$inboundSchema),
});
/** @internal */
export const AuthUserLimited$outboundSchema = z.object({
    limited: z.boolean(),
    id: z.string(),
    email: z.string(),
    name: z.nullable(z.string()),
    username: z.string(),
    avatar: z.nullable(z.string()),
    defaultTeamId: z.nullable(z.string()),
    version: z.nullable(AuthUserLimitedVersion$outboundSchema),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var AuthUserLimited$;
(function (AuthUserLimited$) {
    /** @deprecated use `AuthUserLimited$inboundSchema` instead. */
    AuthUserLimited$.inboundSchema = AuthUserLimited$inboundSchema;
    /** @deprecated use `AuthUserLimited$outboundSchema` instead. */
    AuthUserLimited$.outboundSchema = AuthUserLimited$outboundSchema;
})(AuthUserLimited$ || (AuthUserLimited$ = {}));
export function authUserLimitedToJSON(authUserLimited) {
    return JSON.stringify(AuthUserLimited$outboundSchema.parse(authUserLimited));
}
export function authUserLimitedFromJSON(jsonString) {
    return safeParse(jsonString, (x) => AuthUserLimited$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AuthUserLimited' from JSON`);
}
//# sourceMappingURL=authuserlimited.js.map