/*
 * 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";
import * as components from "../components/index.js";
/**
 * The order to sort the response by
 */
export const GetAllCategoriesOrderBy = {
    Asc: "asc",
    Desc: "desc",
};
/** @internal */
export const GetAllCategoriesOrderBy$inboundSchema = z.nativeEnum(GetAllCategoriesOrderBy);
/** @internal */
export const GetAllCategoriesOrderBy$outboundSchema = GetAllCategoriesOrderBy$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetAllCategoriesOrderBy$;
(function (GetAllCategoriesOrderBy$) {
    /** @deprecated use `GetAllCategoriesOrderBy$inboundSchema` instead. */
    GetAllCategoriesOrderBy$.inboundSchema = GetAllCategoriesOrderBy$inboundSchema;
    /** @deprecated use `GetAllCategoriesOrderBy$outboundSchema` instead. */
    GetAllCategoriesOrderBy$.outboundSchema = GetAllCategoriesOrderBy$outboundSchema;
})(GetAllCategoriesOrderBy$ || (GetAllCategoriesOrderBy$ = {}));
/** @internal */
export const 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: GetAllCategoriesOrderBy$inboundSchema.optional(),
    filter: z.string().optional(),
    search: z.string().optional(),
});
/** @internal */
export const 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: 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.
 */
export var GetAllCategoriesRequest$;
(function (GetAllCategoriesRequest$) {
    /** @deprecated use `GetAllCategoriesRequest$inboundSchema` instead. */
    GetAllCategoriesRequest$.inboundSchema = GetAllCategoriesRequest$inboundSchema;
    /** @deprecated use `GetAllCategoriesRequest$outboundSchema` instead. */
    GetAllCategoriesRequest$.outboundSchema = GetAllCategoriesRequest$outboundSchema;
})(GetAllCategoriesRequest$ || (GetAllCategoriesRequest$ = {}));
export function getAllCategoriesRequestToJSON(getAllCategoriesRequest) {
    return JSON.stringify(GetAllCategoriesRequest$outboundSchema.parse(getAllCategoriesRequest));
}
export function getAllCategoriesRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllCategoriesRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllCategoriesRequest' from JSON`);
}
/** @internal */
export const 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 */
export const 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.
 */
export var GetAllCategoriesResponseBody$;
(function (GetAllCategoriesResponseBody$) {
    /** @deprecated use `GetAllCategoriesResponseBody$inboundSchema` instead. */
    GetAllCategoriesResponseBody$.inboundSchema = GetAllCategoriesResponseBody$inboundSchema;
    /** @deprecated use `GetAllCategoriesResponseBody$outboundSchema` instead. */
    GetAllCategoriesResponseBody$.outboundSchema = GetAllCategoriesResponseBody$outboundSchema;
})(GetAllCategoriesResponseBody$ || (GetAllCategoriesResponseBody$ = {}));
export function getAllCategoriesResponseBodyToJSON(getAllCategoriesResponseBody) {
    return JSON.stringify(GetAllCategoriesResponseBody$outboundSchema.parse(getAllCategoriesResponseBody));
}
export function getAllCategoriesResponseBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllCategoriesResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllCategoriesResponseBody' from JSON`);
}
/** @internal */
export const GetAllCategoriesResponse$inboundSchema = z.object({
    Result: z.lazy(() => GetAllCategoriesResponseBody$inboundSchema),
}).transform((v) => {
    return remap$(v, {
        "Result": "result",
    });
});
/** @internal */
export const GetAllCategoriesResponse$outboundSchema = z.object({
    result: z.lazy(() => GetAllCategoriesResponseBody$outboundSchema),
}).transform((v) => {
    return 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.
 */
export var GetAllCategoriesResponse$;
(function (GetAllCategoriesResponse$) {
    /** @deprecated use `GetAllCategoriesResponse$inboundSchema` instead. */
    GetAllCategoriesResponse$.inboundSchema = GetAllCategoriesResponse$inboundSchema;
    /** @deprecated use `GetAllCategoriesResponse$outboundSchema` instead. */
    GetAllCategoriesResponse$.outboundSchema = GetAllCategoriesResponse$outboundSchema;
})(GetAllCategoriesResponse$ || (GetAllCategoriesResponse$ = {}));
export function getAllCategoriesResponseToJSON(getAllCategoriesResponse) {
    return JSON.stringify(GetAllCategoriesResponse$outboundSchema.parse(getAllCategoriesResponse));
}
export function getAllCategoriesResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllCategoriesResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllCategoriesResponse' from JSON`);
}
//# sourceMappingURL=getallcategories.js.map