/*
 * 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 GetAllLineItemsOrderBy = {
    Asc: "asc",
    Desc: "desc",
};
/** @internal */
export const GetAllLineItemsOrderBy$inboundSchema = z.nativeEnum(GetAllLineItemsOrderBy);
/** @internal */
export const GetAllLineItemsOrderBy$outboundSchema = GetAllLineItemsOrderBy$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetAllLineItemsOrderBy$;
(function (GetAllLineItemsOrderBy$) {
    /** @deprecated use `GetAllLineItemsOrderBy$inboundSchema` instead. */
    GetAllLineItemsOrderBy$.inboundSchema = GetAllLineItemsOrderBy$inboundSchema;
    /** @deprecated use `GetAllLineItemsOrderBy$outboundSchema` instead. */
    GetAllLineItemsOrderBy$.outboundSchema = GetAllLineItemsOrderBy$outboundSchema;
})(GetAllLineItemsOrderBy$ || (GetAllLineItemsOrderBy$ = {}));
/** @internal */
export const GetAllLineItemsRequest$inboundSchema = z.object({
    fields: z.string().optional(),
    limit: z.number().int().default(100),
    offset: z.number().int().default(0),
    sort: z.string().optional(),
    orderBy: GetAllLineItemsOrderBy$inboundSchema.optional(),
    filter: z.string().optional(),
    search: z.string().optional(),
});
/** @internal */
export const GetAllLineItemsRequest$outboundSchema = z.object({
    fields: z.string().optional(),
    limit: z.number().int().default(100),
    offset: z.number().int().default(0),
    sort: z.string().optional(),
    orderBy: GetAllLineItemsOrderBy$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 GetAllLineItemsRequest$;
(function (GetAllLineItemsRequest$) {
    /** @deprecated use `GetAllLineItemsRequest$inboundSchema` instead. */
    GetAllLineItemsRequest$.inboundSchema = GetAllLineItemsRequest$inboundSchema;
    /** @deprecated use `GetAllLineItemsRequest$outboundSchema` instead. */
    GetAllLineItemsRequest$.outboundSchema = GetAllLineItemsRequest$outboundSchema;
})(GetAllLineItemsRequest$ || (GetAllLineItemsRequest$ = {}));
export function getAllLineItemsRequestToJSON(getAllLineItemsRequest) {
    return JSON.stringify(GetAllLineItemsRequest$outboundSchema.parse(getAllLineItemsRequest));
}
export function getAllLineItemsRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLineItemsRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLineItemsRequest' from JSON`);
}
/** @internal */
export const GetAllLineItemsResponseBody$inboundSchema = z.object({
    lineItems: z.array(components.LineItem$inboundSchema),
    totalCount: z.number(),
    pageCount: z.number(),
    pageNumber: z.number(),
    offset: z.number(),
    limit: z.number(),
});
/** @internal */
export const GetAllLineItemsResponseBody$outboundSchema = z.object({
    lineItems: z.array(components.LineItem$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 GetAllLineItemsResponseBody$;
(function (GetAllLineItemsResponseBody$) {
    /** @deprecated use `GetAllLineItemsResponseBody$inboundSchema` instead. */
    GetAllLineItemsResponseBody$.inboundSchema = GetAllLineItemsResponseBody$inboundSchema;
    /** @deprecated use `GetAllLineItemsResponseBody$outboundSchema` instead. */
    GetAllLineItemsResponseBody$.outboundSchema = GetAllLineItemsResponseBody$outboundSchema;
})(GetAllLineItemsResponseBody$ || (GetAllLineItemsResponseBody$ = {}));
export function getAllLineItemsResponseBodyToJSON(getAllLineItemsResponseBody) {
    return JSON.stringify(GetAllLineItemsResponseBody$outboundSchema.parse(getAllLineItemsResponseBody));
}
export function getAllLineItemsResponseBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLineItemsResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLineItemsResponseBody' from JSON`);
}
/** @internal */
export const GetAllLineItemsResponse$inboundSchema = z.object({
    Result: z.lazy(() => GetAllLineItemsResponseBody$inboundSchema),
}).transform((v) => {
    return remap$(v, {
        "Result": "result",
    });
});
/** @internal */
export const GetAllLineItemsResponse$outboundSchema = z.object({
    result: z.lazy(() => GetAllLineItemsResponseBody$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 GetAllLineItemsResponse$;
(function (GetAllLineItemsResponse$) {
    /** @deprecated use `GetAllLineItemsResponse$inboundSchema` instead. */
    GetAllLineItemsResponse$.inboundSchema = GetAllLineItemsResponse$inboundSchema;
    /** @deprecated use `GetAllLineItemsResponse$outboundSchema` instead. */
    GetAllLineItemsResponse$.outboundSchema = GetAllLineItemsResponse$outboundSchema;
})(GetAllLineItemsResponse$ || (GetAllLineItemsResponse$ = {}));
export function getAllLineItemsResponseToJSON(getAllLineItemsResponse) {
    return JSON.stringify(GetAllLineItemsResponse$outboundSchema.parse(getAllLineItemsResponse));
}
export function getAllLineItemsResponseFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetAllLineItemsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetAllLineItemsResponse' from JSON`);
}
//# sourceMappingURL=getalllineitems.js.map