"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 () {
    var ownKeys = function(o) {
        ownKeys = Object.getOwnPropertyNames || function (o) {
            var ar = [];
            for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
            return ar;
        };
        return ownKeys(o);
    };
    return function (mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
        __setModuleDefault(result, mod);
        return result;
    };
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetAllCategoriesResponse$ = exports.GetAllCategoriesResponse$outboundSchema = exports.GetAllCategoriesResponse$inboundSchema = exports.GetAllCategoriesResponseBody$ = exports.GetAllCategoriesResponseBody$outboundSchema = exports.GetAllCategoriesResponseBody$inboundSchema = exports.GetAllCategoriesRequest$ = exports.GetAllCategoriesRequest$outboundSchema = exports.GetAllCategoriesRequest$inboundSchema = exports.GetAllCategoriesOrderBy$ = exports.GetAllCategoriesOrderBy$outboundSchema = exports.GetAllCategoriesOrderBy$inboundSchema = exports.GetAllCategoriesOrderBy = void 0;
exports.getAllCategoriesRequestToJSON = getAllCategoriesRequestToJSON;
exports.getAllCategoriesRequestFromJSON = getAllCategoriesRequestFromJSON;
exports.getAllCategoriesResponseBodyToJSON = getAllCategoriesResponseBodyToJSON;
exports.getAllCategoriesResponseBodyFromJSON = getAllCategoriesResponseBodyFromJSON;
exports.getAllCategoriesResponseToJSON = getAllCategoriesResponseToJSON;
exports.getAllCategoriesResponseFromJSON = getAllCategoriesResponseFromJSON;
const z = __importStar(require("zod"));
const primitives_js_1 = require("../../lib/primitives.js");
const schemas_js_1 = require("../../lib/schemas.js");
const components = __importStar(require("../components/index.js"));
/**
 * The order to sort the response by
 */
exports.GetAllCategoriesOrderBy = {
    Asc: "asc",
    Desc: "desc",
};
/** @internal */
exports.GetAllCategoriesOrderBy$inboundSchema = z.nativeEnum(exports.GetAllCategoriesOrderBy);
/** @internal */
exports.GetAllCategoriesOrderBy$outboundSchema = exports.GetAllCategoriesOrderBy$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetAllCategoriesOrderBy$;
(function (GetAllCategoriesOrderBy$) {
    /** @deprecated use `GetAllCategoriesOrderBy$inboundSchema` instead. */
    GetAllCategoriesOrderBy$.inboundSchema = exports.GetAllCategoriesOrderBy$inboundSchema;
    /** @deprecated use `GetAllCategoriesOrderBy$outboundSchema` instead. */
    GetAllCategoriesOrderBy$.outboundSchema = exports.GetAllCategoriesOrderBy$outboundSchema;
})(GetAllCategoriesOrderBy$ || (exports.GetAllCategoriesOrderBy$ = GetAllCategoriesOrderBy$ = {}));
/** @internal */
exports.GetAllCategoriesRequest$inboundSchema = z.object({
    fields: z.string().optional(),
    limit: z.number().int().default(100),
    offset: z.number().int().default(0),
    sort: z.string().optional(),
    orderBy: exports.GetAllCategoriesOrderBy$inboundSchema.optional(),
    filter: z.string().optional(),
    search: z.string().optional(),
});
/** @internal */
exports.GetAllCategoriesRequest$outboundSchema = z.object({
    fields: z.string().optional(),
    limit: z.number().int().default(100),
    offset: z.number().int().default(0),
    sort: z.string().optional(),
    orderBy: exports.GetAllCategoriesOrderBy$outboundSchema.optional(),
    filter: z.string().optional(),
    search: z.string().optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetAllCategoriesRequest$;
(function (GetAllCategoriesRequest$) {
    /** @deprecated use `GetAllCategoriesRequest$inboundSchema` instead. */
    GetAllCategoriesRequest$.inboundSchema = exports.GetAllCategoriesRequest$inboundSchema;
    /** @deprecated use `GetAllCategoriesRequest$outboundSchema` instead. */
    GetAllCategoriesRequest$.outboundSchema = exports.GetAllCategoriesRequest$outboundSchema;
})(GetAllCategoriesRequest$ || (exports.GetAllCategoriesRequest$ = GetAllCategoriesRequest$ = {}));
function getAllCategoriesRequestToJSON(getAllCategoriesRequest) {
    return JSON.stringify(exports.GetAllCategoriesRequest$outboundSchema.parse(getAllCategoriesRequest));
}
function getAllCategoriesRequestFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetAllCategoriesRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllCategoriesRequest' from JSON`);
}
/** @internal */
exports.GetAllCategoriesResponseBody$inboundSchema = z.object({
    categories: z.array(components.Category$inboundSchema),
    totalCount: z.number(),
    pageCount: z.number(),
    pageNumber: z.number(),
    offset: z.number(),
    limit: z.number(),
});
/** @internal */
exports.GetAllCategoriesResponseBody$outboundSchema = z.object({
    categories: z.array(components.Category$outboundSchema),
    totalCount: z.number(),
    pageCount: z.number(),
    pageNumber: z.number(),
    offset: z.number(),
    limit: z.number(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetAllCategoriesResponseBody$;
(function (GetAllCategoriesResponseBody$) {
    /** @deprecated use `GetAllCategoriesResponseBody$inboundSchema` instead. */
    GetAllCategoriesResponseBody$.inboundSchema = exports.GetAllCategoriesResponseBody$inboundSchema;
    /** @deprecated use `GetAllCategoriesResponseBody$outboundSchema` instead. */
    GetAllCategoriesResponseBody$.outboundSchema = exports.GetAllCategoriesResponseBody$outboundSchema;
})(GetAllCategoriesResponseBody$ || (exports.GetAllCategoriesResponseBody$ = GetAllCategoriesResponseBody$ = {}));
function getAllCategoriesResponseBodyToJSON(getAllCategoriesResponseBody) {
    return JSON.stringify(exports.GetAllCategoriesResponseBody$outboundSchema.parse(getAllCategoriesResponseBody));
}
function getAllCategoriesResponseBodyFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetAllCategoriesResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllCategoriesResponseBody' from JSON`);
}
/** @internal */
exports.GetAllCategoriesResponse$inboundSchema = z.object({
    Result: z.lazy(() => exports.GetAllCategoriesResponseBody$inboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        "Result": "result",
    });
});
/** @internal */
exports.GetAllCategoriesResponse$outboundSchema = z.object({
    result: z.lazy(() => exports.GetAllCategoriesResponseBody$outboundSchema),
}).transform((v) => {
    return (0, primitives_js_1.remap)(v, {
        result: "Result",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
var GetAllCategoriesResponse$;
(function (GetAllCategoriesResponse$) {
    /** @deprecated use `GetAllCategoriesResponse$inboundSchema` instead. */
    GetAllCategoriesResponse$.inboundSchema = exports.GetAllCategoriesResponse$inboundSchema;
    /** @deprecated use `GetAllCategoriesResponse$outboundSchema` instead. */
    GetAllCategoriesResponse$.outboundSchema = exports.GetAllCategoriesResponse$outboundSchema;
})(GetAllCategoriesResponse$ || (exports.GetAllCategoriesResponse$ = GetAllCategoriesResponse$ = {}));
function getAllCategoriesResponseToJSON(getAllCategoriesResponse) {
    return JSON.stringify(exports.GetAllCategoriesResponse$outboundSchema.parse(getAllCategoriesResponse));
}
function getAllCategoriesResponseFromJSON(jsonString) {
    return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.GetAllCategoriesResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllCategoriesResponse' from JSON`);
}
//# sourceMappingURL=getallcategories.js.map