"use strict";
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    var desc = Object.getOwnPropertyDescriptor(m, k);
    if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
      desc = { enumerable: true, get: function() { return m[k]; } };
    }
    Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
    if (k2 === undefined) k2 = k;
    o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
    Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
    o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
    __setModuleDefault(result, mod);
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Category$ = exports.Category$outboundSchema = exports.Category$inboundSchema = exports.Level$ = exports.Level$outboundSchema = exports.Level$inboundSchema = exports.CategoryValue$ = exports.CategoryValue$outboundSchema = exports.CategoryValue$inboundSchema = exports.CategorySourceValue$ = exports.CategorySourceValue$outboundSchema = exports.CategorySourceValue$inboundSchema = exports.Category4$ = exports.Category4$outboundSchema = exports.Category4$inboundSchema = exports.CategoryValue = void 0;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../../lib/primitives.js");
const enums_js_1 = require("../../types/enums.js");
var CategoryValue;
(function (CategoryValue) {
    CategoryValue["Primary"] = "primary";
    CategoryValue["Secondary"] = "secondary";
})(CategoryValue || (exports.CategoryValue = CategoryValue = {}));
/** @internal */
exports.Category4$inboundSchema = z.object({});
/** @internal */
exports.Category4$outboundSchema = z.object({});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Category4$;
(function (Category4$) {
    /** @deprecated use `Category4$inboundSchema` instead. */
    Category4$.inboundSchema = exports.Category4$inboundSchema;
    /** @deprecated use `Category4$outboundSchema` instead. */
    Category4$.outboundSchema = exports.Category4$outboundSchema;
})(Category4$ || (exports.Category4$ = Category4$ = {}));
/** @internal */
exports.CategorySourceValue$inboundSchema = z.union([
    z.lazy(() => exports.Category4$inboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/** @internal */
exports.CategorySourceValue$outboundSchema = z.union([
    z.lazy(() => exports.Category4$outboundSchema),
    z.string(),
    z.number(),
    z.boolean(),
    z.array(z.any()),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CategorySourceValue$;
(function (CategorySourceValue$) {
    /** @deprecated use `CategorySourceValue$inboundSchema` instead. */
    CategorySourceValue$.inboundSchema = exports.CategorySourceValue$inboundSchema;
    /** @deprecated use `CategorySourceValue$outboundSchema` instead. */
    CategorySourceValue$.outboundSchema = exports.CategorySourceValue$outboundSchema;
})(CategorySourceValue$ || (exports.CategorySourceValue$ = CategorySourceValue$ = {}));
/** @internal */
exports.CategoryValue$inboundSchema = z
    .union([
    z.nativeEnum(CategoryValue),
    z.string().transform(enums_js_1.catchUnrecognizedEnum),
]);
/** @internal */
exports.CategoryValue$outboundSchema = z.union([
    z.nativeEnum(CategoryValue),
    z.string().and(z.custom()),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var CategoryValue$;
(function (CategoryValue$) {
    /** @deprecated use `CategoryValue$inboundSchema` instead. */
    CategoryValue$.inboundSchema = exports.CategoryValue$inboundSchema;
    /** @deprecated use `CategoryValue$outboundSchema` instead. */
    CategoryValue$.outboundSchema = exports.CategoryValue$outboundSchema;
})(CategoryValue$ || (exports.CategoryValue$ = CategoryValue$ = {}));
/** @internal */
exports.Level$inboundSchema = z
    .object({
    source_value: z.nullable(z.union([
        z.lazy(() => exports.Category4$inboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.CategoryValue$inboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "source_value": "sourceValue",
    });
});
/** @internal */
exports.Level$outboundSchema = z.object({
    sourceValue: z.nullable(z.union([
        z.lazy(() => exports.Category4$outboundSchema),
        z.string(),
        z.number(),
        z.boolean(),
        z.array(z.any()),
    ])).optional(),
    value: z.nullable(exports.CategoryValue$outboundSchema).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        sourceValue: "source_value",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Level$;
(function (Level$) {
    /** @deprecated use `Level$inboundSchema` instead. */
    Level$.inboundSchema = exports.Level$inboundSchema;
    /** @deprecated use `Level$outboundSchema` instead. */
    Level$.outboundSchema = exports.Level$outboundSchema;
})(Level$ || (exports.Level$ = Level$ = {}));
/** @internal */
exports.Category$inboundSchema = z.object({
    active: z.nullable(z.boolean()).optional(),
    id: z.nullable(z.string()).optional(),
    level: z.nullable(z.lazy(() => exports.Level$inboundSchema)).optional(),
    name: z.nullable(z.string()).optional(),
    remote_id: z.nullable(z.string()).optional(),
    unified_custom_fields: z.nullable(z.record(z.any())).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "remote_id": "remoteId",
        "unified_custom_fields": "unifiedCustomFields",
    });
});
/** @internal */
exports.Category$outboundSchema = z.object({
    active: z.nullable(z.boolean()).optional(),
    id: z.nullable(z.string()).optional(),
    level: z.nullable(z.lazy(() => exports.Level$outboundSchema)).optional(),
    name: z.nullable(z.string()).optional(),
    remoteId: z.nullable(z.string()).optional(),
    unifiedCustomFields: z.nullable(z.record(z.any())).optional(),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        remoteId: "remote_id",
        unifiedCustomFields: "unified_custom_fields",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var Category$;
(function (Category$) {
    /** @deprecated use `Category$inboundSchema` instead. */
    Category$.inboundSchema = exports.Category$inboundSchema;
    /** @deprecated use `Category$outboundSchema` instead. */
    Category$.outboundSchema = exports.Category$outboundSchema;
})(Category$ || (exports.Category$ = Category$ = {}));
//# sourceMappingURL=category.js.map