// This file is auto-generated by @hey-api/openapi-ts

import type { Client, Options as ClientOptions, TDataShape } from "./client";
import { client as _heyApiClient } from "./client.gen";
import type {
    AddKitToDealData,
    AddKitToDealErrors,
    AddKitToDealProductData,
    AddKitToDealProductErrors,
    AddKitToDealProductResponses,
    AddKitToDealResponses,
    CreateBarcodeTemplateData,
    CreateBarcodeTemplateErrors,
    CreateBarcodeTemplateResponses,
    CreateBoardData,
    CreateBoardErrors,
    CreateBoardResponses,
    CreateClientData,
    CreateClientErrors,
    CreateClientResponses,
    CreateDealData,
    CreateDealErrors,
    CreateDealProductData,
    CreateDealProductErrors,
    CreateDealProductResponses,
    CreateDealProductServiceData,
    CreateDealProductServiceErrors,
    CreateDealProductServiceResponses,
    CreateDealResponses,
    CreateDealServiceData,
    CreateDealServiceErrors,
    CreateDealServiceResponses,
    CreateProductData,
    CreateProductErrors,
    CreateProductResponses,
    CreateProjectData,
    CreateProjectErrors,
    CreateProjectResponses,
    CreateServiceCategoryData,
    CreateServiceCategoryErrors,
    CreateServiceCategoryResponses,
    CreateServiceData,
    CreateServiceErrors,
    CreateServiceResponses,
    CreateServicesKitData,
    CreateServicesKitErrors,
    CreateServicesKitResponses,
    CreateStatusData,
    CreateStatusErrors,
    CreateStatusResponses,
    DeleteBarcodeTemplateData,
    DeleteBarcodeTemplateErrors,
    DeleteBarcodeTemplateResponses,
    DeleteBoardData,
    DeleteBoardErrors,
    DeleteBoardResponses,
    DeleteClientData,
    DeleteClientErrors,
    DeleteClientResponses,
    DeleteDealData,
    DeleteDealErrors,
    DeleteDealProductData,
    DeleteDealProductErrors,
    DeleteDealProductResponses,
    DeleteDealProductServiceData,
    DeleteDealProductServiceErrors,
    DeleteDealProductServiceResponses,
    DeleteDealResponses,
    DeleteDealServiceData,
    DeleteDealServiceErrors,
    DeleteDealServiceResponses,
    DeleteProductData,
    DeleteProductErrors,
    DeleteProductResponses,
    DeleteProjectData,
    DeleteProjectErrors,
    DeleteProjectResponses,
    DeleteServiceCategoryData,
    DeleteServiceCategoryErrors,
    DeleteServiceCategoryResponses,
    DeleteServiceData,
    DeleteServiceErrors,
    DeleteServiceResponses,
    DeleteServicesKitData,
    DeleteServicesKitErrors,
    DeleteServicesKitResponses,
    DeleteStatusData,
    DeleteStatusErrors,
    DeleteStatusResponses,
    DuplicateProductServicesData,
    DuplicateProductServicesErrors,
    DuplicateProductServicesResponses,
    GetBarcodeTemplateAttributesData,
    GetBarcodeTemplateAttributesResponses,
    GetBarcodeTemplatesData,
    GetBarcodeTemplateSizesData,
    GetBarcodeTemplateSizesResponses,
    GetBarcodeTemplatesResponses,
    GetBoardsData,
    GetBoardsErrors,
    GetBoardsResponses,
    GetBuiltInModulesData,
    GetBuiltInModulesResponses,
    GetClientsData,
    GetClientsResponses,
    GetDealProductsData,
    GetDealProductsErrors,
    GetDealProductsResponses,
    GetDealsData,
    GetDealsErrors,
    GetDealServicesData,
    GetDealServicesErrors,
    GetDealServicesResponses,
    GetDealsResponses,
    GetProductsData,
    GetProductsErrors,
    GetProductsResponses,
    GetProjectsData,
    GetProjectsResponses,
    GetServiceCategoriesData,
    GetServiceCategoriesResponses,
    GetServicesData,
    GetServicesKitsData,
    GetServicesKitsResponses,
    GetServicesResponses,
    GetStatusesData,
    GetStatusesErrors,
    GetStatusesResponses,
    GetStatusHistoryData,
    GetStatusHistoryErrors,
    GetStatusHistoryResponses,
    UpdateBarcodeTemplateData,
    UpdateBarcodeTemplateErrors,
    UpdateBarcodeTemplateResponses,
    UpdateBoardData,
    UpdateBoardErrors,
    UpdateBoardResponses,
    UpdateClientData,
    UpdateClientErrors,
    UpdateClientResponses,
    UpdateDealData,
    UpdateDealErrors,
    UpdateDealProductData,
    UpdateDealProductErrors,
    UpdateDealProductResponses,
    UpdateDealProductServiceData,
    UpdateDealProductServiceErrors,
    UpdateDealProductServiceResponses,
    UpdateDealResponses,
    UpdateDealServiceData,
    UpdateDealServiceErrors,
    UpdateDealServiceResponses,
    UpdateProductData,
    UpdateProductErrors,
    UpdateProductResponses,
    UpdateProjectData,
    UpdateProjectErrors,
    UpdateProjectResponses,
    UpdateServiceCategoryData,
    UpdateServiceCategoryErrors,
    UpdateServiceCategoryResponses,
    UpdateServiceData,
    UpdateServiceErrors,
    UpdateServiceResponses,
    UpdateServicesKitData,
    UpdateServicesKitErrors,
    UpdateServicesKitResponses,
    UpdateStatusData,
    UpdateStatusErrors,
    UpdateStatusResponses,
} from "./types.gen";
import {
    zAddKitToDealData,
    zAddKitToDealProductData,
    zAddKitToDealProductResponse,
    zAddKitToDealResponse,
    zCreateBarcodeTemplateData,
    zCreateBarcodeTemplateResponse2,
    zCreateBoardData,
    zCreateBoardResponse2,
    zCreateClientData,
    zCreateClientResponse2,
    zCreateDealData,
    zCreateDealProductData,
    zCreateDealProductResponse2,
    zCreateDealProductServiceData,
    zCreateDealProductServiceResponse,
    zCreateDealResponse2,
    zCreateDealServiceData,
    zCreateDealServiceResponse2,
    zCreateProductData,
    zCreateProductResponse2,
    zCreateProjectData,
    zCreateProjectResponse2,
    zCreateServiceCategoryData,
    zCreateServiceCategoryResponse2,
    zCreateServiceData,
    zCreateServiceResponse2,
    zCreateServicesKitData,
    zCreateServicesKitResponse2,
    zCreateStatusData,
    zCreateStatusResponse2,
    zDeleteBarcodeTemplateData,
    zDeleteBarcodeTemplateResponse2,
    zDeleteBoardData,
    zDeleteBoardResponse2,
    zDeleteClientData,
    zDeleteClientResponse2,
    zDeleteDealData,
    zDeleteDealProductData,
    zDeleteDealProductResponse2,
    zDeleteDealProductServiceData,
    zDeleteDealProductServiceResponse,
    zDeleteDealResponse2,
    zDeleteDealServiceData,
    zDeleteDealServiceResponse2,
    zDeleteProductData,
    zDeleteProductResponse2,
    zDeleteProjectData,
    zDeleteProjectResponse2,
    zDeleteServiceCategoryData,
    zDeleteServiceCategoryResponse2,
    zDeleteServiceData,
    zDeleteServiceResponse2,
    zDeleteServicesKitData,
    zDeleteServicesKitResponse2,
    zDeleteStatusData,
    zDeleteStatusResponse2,
    zDuplicateProductServicesData,
    zDuplicateProductServicesResponse,
    zGetBarcodeTemplateAttributesData,
    zGetBarcodeTemplateAttributesResponse,
    zGetBarcodeTemplatesData,
    zGetBarcodeTemplateSizesData,
    zGetBarcodeTemplateSizesResponse2,
    zGetBarcodeTemplatesResponse2,
    zGetBoardsData,
    zGetBoardsResponse2,
    zGetBuiltInModulesData,
    zGetBuiltInModulesResponse,
    zGetClientsData,
    zGetClientsResponse2,
    zGetDealProductsData,
    zGetDealProductsResponse2,
    zGetDealsData,
    zGetDealServicesData,
    zGetDealServicesResponse2,
    zGetDealsResponse2,
    zGetProductsData,
    zGetProductsResponse2,
    zGetProjectsData,
    zGetProjectsResponse2,
    zGetServiceCategoriesData,
    zGetServiceCategoriesResponse2,
    zGetServicesData,
    zGetServicesKitsData,
    zGetServicesKitsResponse,
    zGetServicesResponse2,
    zGetStatusesData,
    zGetStatusesResponse2,
    zGetStatusHistoryData,
    zGetStatusHistoryResponse2,
    zUpdateBarcodeTemplateData,
    zUpdateBarcodeTemplateResponse2,
    zUpdateBoardData,
    zUpdateBoardResponse2,
    zUpdateClientData,
    zUpdateClientResponse2,
    zUpdateDealData,
    zUpdateDealProductData,
    zUpdateDealProductResponse2,
    zUpdateDealProductServiceData,
    zUpdateDealProductServiceResponse,
    zUpdateDealResponse2,
    zUpdateDealServiceData,
    zUpdateDealServiceResponse2,
    zUpdateProductData,
    zUpdateProductResponse2,
    zUpdateProjectData,
    zUpdateProjectResponse2,
    zUpdateServiceCategoryData,
    zUpdateServiceCategoryResponse2,
    zUpdateServiceData,
    zUpdateServiceResponse2,
    zUpdateServicesKitData,
    zUpdateServicesKitResponse2,
    zUpdateStatusData,
    zUpdateStatusResponse2,
} from "./zod.gen";

export type Options<
    TData extends TDataShape = TDataShape,
    ThrowOnError extends boolean = boolean,
> = ClientOptions<TData, ThrowOnError> & {
    /**
     * You can provide a client instance returned by `createClient()` instead of
     * individual options. This might be also useful if you want to implement a
     * custom client.
     */
    client?: Client;
    /**
     * You can pass arbitrary values through the `meta` object. This can be
     * used to access values that aren't defined as part of the SDK function.
     */
    meta?: Record<string, unknown>;
};

/**
 * Get Boards
 */
export const getBoards = <ThrowOnError extends boolean = false>(
    options: Options<GetBoardsData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).get<
        GetBoardsResponses,
        GetBoardsErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zGetBoardsData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zGetBoardsResponse2.parseAsync(data);
        },
        url: "/board/{projectId}",
        ...options,
    });
};

/**
 * Create Board
 */
export const createBoard = <ThrowOnError extends boolean = false>(
    options: Options<CreateBoardData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).post<
        CreateBoardResponses,
        CreateBoardErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zCreateBoardData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zCreateBoardResponse2.parseAsync(data);
        },
        url: "/board/",
        ...options,
        headers: {
            "Content-Type": "application/json",
            ...options.headers,
        },
    });
};

/**
 * Delete Board
 */
export const deleteBoard = <ThrowOnError extends boolean = false>(
    options: Options<DeleteBoardData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).delete<
        DeleteBoardResponses,
        DeleteBoardErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zDeleteBoardData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zDeleteBoardResponse2.parseAsync(data);
        },
        url: "/board/{pk}",
        ...options,
    });
};

/**
 * Update Board
 */
export const updateBoard = <ThrowOnError extends boolean = false>(
    options: Options<UpdateBoardData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).patch<
        UpdateBoardResponses,
        UpdateBoardErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zUpdateBoardData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zUpdateBoardResponse2.parseAsync(data);
        },
        url: "/board/{pk}",
        ...options,
        headers: {
            "Content-Type": "application/json",
            ...options.headers,
        },
    });
};

/**
 * Get Deals
 */
export const getDeals = <ThrowOnError extends boolean = false>(
    options?: Options<GetDealsData, ThrowOnError>
) => {
    return (options?.client ?? _heyApiClient).get<
        GetDealsResponses,
        GetDealsErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zGetDealsData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zGetDealsResponse2.parseAsync(data);
        },
        url: "/deal/",
        ...options,
    });
};

/**
 * Create Deal
 */
export const createDeal = <ThrowOnError extends boolean = false>(
    options: Options<CreateDealData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).post<
        CreateDealResponses,
        CreateDealErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zCreateDealData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zCreateDealResponse2.parseAsync(data);
        },
        url: "/deal/",
        ...options,
        headers: {
            "Content-Type": "application/json",
            ...options.headers,
        },
    });
};

/**
 * Delete Deal
 */
export const deleteDeal = <ThrowOnError extends boolean = false>(
    options: Options<DeleteDealData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).delete<
        DeleteDealResponses,
        DeleteDealErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zDeleteDealData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zDeleteDealResponse2.parseAsync(data);
        },
        url: "/deal/{pk}",
        ...options,
    });
};

/**
 * Update Deal
 */
export const updateDeal = <ThrowOnError extends boolean = false>(
    options: Options<UpdateDealData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).patch<
        UpdateDealResponses,
        UpdateDealErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zUpdateDealData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zUpdateDealResponse2.parseAsync(data);
        },
        url: "/deal/{pk}",
        ...options,
        headers: {
            "Content-Type": "application/json",
            ...options.headers,
        },
    });
};

/**
 * Get Built In Modules
 */
export const getBuiltInModules = <ThrowOnError extends boolean = false>(
    options?: Options<GetBuiltInModulesData, ThrowOnError>
) => {
    return (options?.client ?? _heyApiClient).get<
        GetBuiltInModulesResponses,
        unknown,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zGetBuiltInModulesData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zGetBuiltInModulesResponse.parseAsync(data);
        },
        url: "/module/built-in/",
        ...options,
    });
};

/**
 * Get Projects
 */
export const getProjects = <ThrowOnError extends boolean = false>(
    options?: Options<GetProjectsData, ThrowOnError>
) => {
    return (options?.client ?? _heyApiClient).get<
        GetProjectsResponses,
        unknown,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zGetProjectsData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zGetProjectsResponse2.parseAsync(data);
        },
        url: "/project/",
        ...options,
    });
};

/**
 * Create Project
 */
export const createProject = <ThrowOnError extends boolean = false>(
    options: Options<CreateProjectData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).post<
        CreateProjectResponses,
        CreateProjectErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zCreateProjectData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zCreateProjectResponse2.parseAsync(data);
        },
        url: "/project/",
        ...options,
        headers: {
            "Content-Type": "application/json",
            ...options.headers,
        },
    });
};

/**
 * Delete Project
 */
export const deleteProject = <ThrowOnError extends boolean = false>(
    options: Options<DeleteProjectData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).delete<
        DeleteProjectResponses,
        DeleteProjectErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zDeleteProjectData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zDeleteProjectResponse2.parseAsync(data);
        },
        url: "/project/{pk}",
        ...options,
    });
};

/**
 * Update Project
 */
export const updateProject = <ThrowOnError extends boolean = false>(
    options: Options<UpdateProjectData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).patch<
        UpdateProjectResponses,
        UpdateProjectErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zUpdateProjectData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zUpdateProjectResponse2.parseAsync(data);
        },
        url: "/project/{pk}",
        ...options,
        headers: {
            "Content-Type": "application/json",
            ...options.headers,
        },
    });
};

/**
 * Get Statuses
 */
export const getStatuses = <ThrowOnError extends boolean = false>(
    options: Options<GetStatusesData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).get<
        GetStatusesResponses,
        GetStatusesErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zGetStatusesData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zGetStatusesResponse2.parseAsync(data);
        },
        url: "/status/{boardId}",
        ...options,
    });
};

/**
 * Create Status
 */
export const createStatus = <ThrowOnError extends boolean = false>(
    options: Options<CreateStatusData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).post<
        CreateStatusResponses,
        CreateStatusErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zCreateStatusData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zCreateStatusResponse2.parseAsync(data);
        },
        url: "/status/",
        ...options,
        headers: {
            "Content-Type": "application/json",
            ...options.headers,
        },
    });
};

/**
 * Delete Status
 */
export const deleteStatus = <ThrowOnError extends boolean = false>(
    options: Options<DeleteStatusData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).delete<
        DeleteStatusResponses,
        DeleteStatusErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zDeleteStatusData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zDeleteStatusResponse2.parseAsync(data);
        },
        url: "/status/{pk}",
        ...options,
    });
};

/**
 * Update Status
 */
export const updateStatus = <ThrowOnError extends boolean = false>(
    options: Options<UpdateStatusData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).patch<
        UpdateStatusResponses,
        UpdateStatusErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zUpdateStatusData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zUpdateStatusResponse2.parseAsync(data);
        },
        url: "/status/{pk}",
        ...options,
        headers: {
            "Content-Type": "application/json",
            ...options.headers,
        },
    });
};

/**
 * Get Status History
 */
export const getStatusHistory = <ThrowOnError extends boolean = false>(
    options: Options<GetStatusHistoryData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).get<
        GetStatusHistoryResponses,
        GetStatusHistoryErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zGetStatusHistoryData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zGetStatusHistoryResponse2.parseAsync(data);
        },
        url: "/status/history/{dealId}",
        ...options,
    });
};

/**
 * Get Clients
 */
export const getClients = <ThrowOnError extends boolean = false>(
    options?: Options<GetClientsData, ThrowOnError>
) => {
    return (options?.client ?? _heyApiClient).get<
        GetClientsResponses,
        unknown,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zGetClientsData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zGetClientsResponse2.parseAsync(data);
        },
        url: "/modules/clients/client/",
        ...options,
    });
};

/**
 * Create Client
 */
export const createClient = <ThrowOnError extends boolean = false>(
    options: Options<CreateClientData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).post<
        CreateClientResponses,
        CreateClientErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zCreateClientData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zCreateClientResponse2.parseAsync(data);
        },
        url: "/modules/clients/client/",
        ...options,
        headers: {
            "Content-Type": "application/json",
            ...options.headers,
        },
    });
};

/**
 * Delete Product
 */
export const deleteClient = <ThrowOnError extends boolean = false>(
    options: Options<DeleteClientData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).delete<
        DeleteClientResponses,
        DeleteClientErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zDeleteClientData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zDeleteClientResponse2.parseAsync(data);
        },
        url: "/modules/clients/client/{pk}",
        ...options,
    });
};

/**
 * Update Client
 */
export const updateClient = <ThrowOnError extends boolean = false>(
    options: Options<UpdateClientData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).patch<
        UpdateClientResponses,
        UpdateClientErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zUpdateClientData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zUpdateClientResponse2.parseAsync(data);
        },
        url: "/modules/clients/client/{pk}",
        ...options,
        headers: {
            "Content-Type": "application/json",
            ...options.headers,
        },
    });
};

/**
 * Get Barcode Templates
 */
export const getBarcodeTemplates = <ThrowOnError extends boolean = false>(
    options?: Options<GetBarcodeTemplatesData, ThrowOnError>
) => {
    return (options?.client ?? _heyApiClient).get<
        GetBarcodeTemplatesResponses,
        unknown,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zGetBarcodeTemplatesData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zGetBarcodeTemplatesResponse2.parseAsync(data);
        },
        url: "/modules/fulfillment-base/barcode-template/",
        ...options,
    });
};

/**
 * Create Barcode Template
 */
export const createBarcodeTemplate = <ThrowOnError extends boolean = false>(
    options: Options<CreateBarcodeTemplateData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).post<
        CreateBarcodeTemplateResponses,
        CreateBarcodeTemplateErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zCreateBarcodeTemplateData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zCreateBarcodeTemplateResponse2.parseAsync(data);
        },
        url: "/modules/fulfillment-base/barcode-template/",
        ...options,
        headers: {
            "Content-Type": "application/json",
            ...options.headers,
        },
    });
};

/**
 * Delete Barcode Template
 */
export const deleteBarcodeTemplate = <ThrowOnError extends boolean = false>(
    options: Options<DeleteBarcodeTemplateData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).delete<
        DeleteBarcodeTemplateResponses,
        DeleteBarcodeTemplateErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zDeleteBarcodeTemplateData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zDeleteBarcodeTemplateResponse2.parseAsync(data);
        },
        url: "/modules/fulfillment-base/barcode-template/{pk}",
        ...options,
    });
};

/**
 * Update Barcode Template
 */
export const updateBarcodeTemplate = <ThrowOnError extends boolean = false>(
    options: Options<UpdateBarcodeTemplateData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).patch<
        UpdateBarcodeTemplateResponses,
        UpdateBarcodeTemplateErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zUpdateBarcodeTemplateData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zUpdateBarcodeTemplateResponse2.parseAsync(data);
        },
        url: "/modules/fulfillment-base/barcode-template/{pk}",
        ...options,
        headers: {
            "Content-Type": "application/json",
            ...options.headers,
        },
    });
};

/**
 * Get Barcode Template Attributes
 */
export const getBarcodeTemplateAttributes = <
    ThrowOnError extends boolean = false,
>(
    options?: Options<GetBarcodeTemplateAttributesData, ThrowOnError>
) => {
    return (options?.client ?? _heyApiClient).get<
        GetBarcodeTemplateAttributesResponses,
        unknown,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zGetBarcodeTemplateAttributesData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zGetBarcodeTemplateAttributesResponse.parseAsync(data);
        },
        url: "/modules/fulfillment-base/barcode-template/attributes",
        ...options,
    });
};

/**
 * Get Barcode Template Sizes
 */
export const getBarcodeTemplateSizes = <ThrowOnError extends boolean = false>(
    options?: Options<GetBarcodeTemplateSizesData, ThrowOnError>
) => {
    return (options?.client ?? _heyApiClient).get<
        GetBarcodeTemplateSizesResponses,
        unknown,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zGetBarcodeTemplateSizesData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zGetBarcodeTemplateSizesResponse2.parseAsync(data);
        },
        url: "/modules/fulfillment-base/barcode-template/sizes",
        ...options,
    });
};

/**
 * Get Deal Products
 */
export const getDealProducts = <ThrowOnError extends boolean = false>(
    options: Options<GetDealProductsData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).get<
        GetDealProductsResponses,
        GetDealProductsErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zGetDealProductsData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zGetDealProductsResponse2.parseAsync(data);
        },
        url: "/modules/fulfillment-base/deal-product/{dealId}",
        ...options,
    });
};

/**
 * Create Deal Product
 */
export const createDealProduct = <ThrowOnError extends boolean = false>(
    options: Options<CreateDealProductData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).post<
        CreateDealProductResponses,
        CreateDealProductErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zCreateDealProductData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zCreateDealProductResponse2.parseAsync(data);
        },
        url: "/modules/fulfillment-base/deal-product/",
        ...options,
        headers: {
            "Content-Type": "application/json",
            ...options.headers,
        },
    });
};

/**
 * Delete Deal Product
 */
export const deleteDealProduct = <ThrowOnError extends boolean = false>(
    options: Options<DeleteDealProductData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).delete<
        DeleteDealProductResponses,
        DeleteDealProductErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zDeleteDealProductData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zDeleteDealProductResponse2.parseAsync(data);
        },
        url: "/modules/fulfillment-base/deal-product/{dealId}/product/{productId}",
        ...options,
    });
};

/**
 * Update Deal Product
 */
export const updateDealProduct = <ThrowOnError extends boolean = false>(
    options: Options<UpdateDealProductData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).patch<
        UpdateDealProductResponses,
        UpdateDealProductErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zUpdateDealProductData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zUpdateDealProductResponse2.parseAsync(data);
        },
        url: "/modules/fulfillment-base/deal-product/{dealId}/product/{productId}",
        ...options,
        headers: {
            "Content-Type": "application/json",
            ...options.headers,
        },
    });
};

/**
 * Create Deal Product Service
 */
export const createDealProductService = <ThrowOnError extends boolean = false>(
    options: Options<CreateDealProductServiceData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).post<
        CreateDealProductServiceResponses,
        CreateDealProductServiceErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zCreateDealProductServiceData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zCreateDealProductServiceResponse.parseAsync(data);
        },
        url: "/modules/fulfillment-base/deal-product/service",
        ...options,
        headers: {
            "Content-Type": "application/json",
            ...options.headers,
        },
    });
};

/**
 * Delete Deal Product Service
 */
export const deleteDealProductService = <ThrowOnError extends boolean = false>(
    options: Options<DeleteDealProductServiceData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).delete<
        DeleteDealProductServiceResponses,
        DeleteDealProductServiceErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zDeleteDealProductServiceData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zDeleteDealProductServiceResponse.parseAsync(data);
        },
        url: "/modules/fulfillment-base/deal-product/{dealId}/product/{productId}/service/{serviceId}",
        ...options,
    });
};

/**
 * Update Deal Product Service
 */
export const updateDealProductService = <ThrowOnError extends boolean = false>(
    options: Options<UpdateDealProductServiceData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).patch<
        UpdateDealProductServiceResponses,
        UpdateDealProductServiceErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zUpdateDealProductServiceData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zUpdateDealProductServiceResponse.parseAsync(data);
        },
        url: "/modules/fulfillment-base/deal-product/{dealId}/product/{productId}/service/{serviceId}",
        ...options,
        headers: {
            "Content-Type": "application/json",
            ...options.headers,
        },
    });
};

/**
 * Copy Product Services
 */
export const duplicateProductServices = <ThrowOnError extends boolean = false>(
    options: Options<DuplicateProductServicesData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).post<
        DuplicateProductServicesResponses,
        DuplicateProductServicesErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zDuplicateProductServicesData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zDuplicateProductServicesResponse.parseAsync(data);
        },
        url: "/modules/fulfillment-base/deal-product/services/duplicate",
        ...options,
        headers: {
            "Content-Type": "application/json",
            ...options.headers,
        },
    });
};

/**
 * Add Kit To Deal Product
 */
export const addKitToDealProduct = <ThrowOnError extends boolean = false>(
    options: Options<AddKitToDealProductData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).post<
        AddKitToDealProductResponses,
        AddKitToDealProductErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zAddKitToDealProductData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zAddKitToDealProductResponse.parseAsync(data);
        },
        url: "/modules/fulfillment-base/deal-product/add-services-kit",
        ...options,
        headers: {
            "Content-Type": "application/json",
            ...options.headers,
        },
    });
};

/**
 * Get Deal Services
 */
export const getDealServices = <ThrowOnError extends boolean = false>(
    options: Options<GetDealServicesData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).get<
        GetDealServicesResponses,
        GetDealServicesErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zGetDealServicesData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zGetDealServicesResponse2.parseAsync(data);
        },
        url: "/modules/fulfillment-base/deal-service/{dealId}",
        ...options,
    });
};

/**
 * Create Deal Service
 */
export const createDealService = <ThrowOnError extends boolean = false>(
    options: Options<CreateDealServiceData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).post<
        CreateDealServiceResponses,
        CreateDealServiceErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zCreateDealServiceData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zCreateDealServiceResponse2.parseAsync(data);
        },
        url: "/modules/fulfillment-base/deal-service/",
        ...options,
        headers: {
            "Content-Type": "application/json",
            ...options.headers,
        },
    });
};

/**
 * Delete Deal Service
 */
export const deleteDealService = <ThrowOnError extends boolean = false>(
    options: Options<DeleteDealServiceData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).delete<
        DeleteDealServiceResponses,
        DeleteDealServiceErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zDeleteDealServiceData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zDeleteDealServiceResponse2.parseAsync(data);
        },
        url: "/modules/fulfillment-base/deal-service/{dealId}/service/{serviceId}",
        ...options,
    });
};

/**
 * Update Deal Service
 */
export const updateDealService = <ThrowOnError extends boolean = false>(
    options: Options<UpdateDealServiceData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).patch<
        UpdateDealServiceResponses,
        UpdateDealServiceErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zUpdateDealServiceData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zUpdateDealServiceResponse2.parseAsync(data);
        },
        url: "/modules/fulfillment-base/deal-service/{dealId}/service/{serviceId}",
        ...options,
        headers: {
            "Content-Type": "application/json",
            ...options.headers,
        },
    });
};

/**
 * Add Kit To Deal
 */
export const addKitToDeal = <ThrowOnError extends boolean = false>(
    options: Options<AddKitToDealData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).post<
        AddKitToDealResponses,
        AddKitToDealErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zAddKitToDealData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zAddKitToDealResponse.parseAsync(data);
        },
        url: "/modules/fulfillment-base/deal-service/add-services-kit",
        ...options,
        headers: {
            "Content-Type": "application/json",
            ...options.headers,
        },
    });
};

/**
 * Get Products
 */
export const getProducts = <ThrowOnError extends boolean = false>(
    options?: Options<GetProductsData, ThrowOnError>
) => {
    return (options?.client ?? _heyApiClient).get<
        GetProductsResponses,
        GetProductsErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zGetProductsData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zGetProductsResponse2.parseAsync(data);
        },
        url: "/modules/fulfillment-base/product/",
        ...options,
    });
};

/**
 * Create Product
 */
export const createProduct = <ThrowOnError extends boolean = false>(
    options: Options<CreateProductData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).post<
        CreateProductResponses,
        CreateProductErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zCreateProductData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zCreateProductResponse2.parseAsync(data);
        },
        url: "/modules/fulfillment-base/product/",
        ...options,
        headers: {
            "Content-Type": "application/json",
            ...options.headers,
        },
    });
};

/**
 * Delete Product
 */
export const deleteProduct = <ThrowOnError extends boolean = false>(
    options: Options<DeleteProductData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).delete<
        DeleteProductResponses,
        DeleteProductErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zDeleteProductData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zDeleteProductResponse2.parseAsync(data);
        },
        url: "/modules/fulfillment-base/product/{pk}",
        ...options,
    });
};

/**
 * Update Product
 */
export const updateProduct = <ThrowOnError extends boolean = false>(
    options: Options<UpdateProductData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).patch<
        UpdateProductResponses,
        UpdateProductErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zUpdateProductData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zUpdateProductResponse2.parseAsync(data);
        },
        url: "/modules/fulfillment-base/product/{pk}",
        ...options,
        headers: {
            "Content-Type": "application/json",
            ...options.headers,
        },
    });
};

/**
 * Get Services
 */
export const getServices = <ThrowOnError extends boolean = false>(
    options?: Options<GetServicesData, ThrowOnError>
) => {
    return (options?.client ?? _heyApiClient).get<
        GetServicesResponses,
        unknown,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zGetServicesData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zGetServicesResponse2.parseAsync(data);
        },
        url: "/modules/fulfillment-base/service/",
        ...options,
    });
};

/**
 * Create Service
 */
export const createService = <ThrowOnError extends boolean = false>(
    options: Options<CreateServiceData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).post<
        CreateServiceResponses,
        CreateServiceErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zCreateServiceData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zCreateServiceResponse2.parseAsync(data);
        },
        url: "/modules/fulfillment-base/service/",
        ...options,
        headers: {
            "Content-Type": "application/json",
            ...options.headers,
        },
    });
};

/**
 * Delete Service
 */
export const deleteService = <ThrowOnError extends boolean = false>(
    options: Options<DeleteServiceData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).delete<
        DeleteServiceResponses,
        DeleteServiceErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zDeleteServiceData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zDeleteServiceResponse2.parseAsync(data);
        },
        url: "/modules/fulfillment-base/service/{pk}",
        ...options,
    });
};

/**
 * Update Service
 */
export const updateService = <ThrowOnError extends boolean = false>(
    options: Options<UpdateServiceData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).patch<
        UpdateServiceResponses,
        UpdateServiceErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zUpdateServiceData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zUpdateServiceResponse2.parseAsync(data);
        },
        url: "/modules/fulfillment-base/service/{pk}",
        ...options,
        headers: {
            "Content-Type": "application/json",
            ...options.headers,
        },
    });
};

/**
 * Get Services Categories
 */
export const getServiceCategories = <ThrowOnError extends boolean = false>(
    options?: Options<GetServiceCategoriesData, ThrowOnError>
) => {
    return (options?.client ?? _heyApiClient).get<
        GetServiceCategoriesResponses,
        unknown,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zGetServiceCategoriesData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zGetServiceCategoriesResponse2.parseAsync(data);
        },
        url: "/modules/fulfillment-base/service-category/",
        ...options,
    });
};

/**
 * Create Service Category
 */
export const createServiceCategory = <ThrowOnError extends boolean = false>(
    options: Options<CreateServiceCategoryData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).post<
        CreateServiceCategoryResponses,
        CreateServiceCategoryErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zCreateServiceCategoryData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zCreateServiceCategoryResponse2.parseAsync(data);
        },
        url: "/modules/fulfillment-base/service-category/",
        ...options,
        headers: {
            "Content-Type": "application/json",
            ...options.headers,
        },
    });
};

/**
 * Delete Service Category
 */
export const deleteServiceCategory = <ThrowOnError extends boolean = false>(
    options: Options<DeleteServiceCategoryData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).delete<
        DeleteServiceCategoryResponses,
        DeleteServiceCategoryErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zDeleteServiceCategoryData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zDeleteServiceCategoryResponse2.parseAsync(data);
        },
        url: "/modules/fulfillment-base/service-category/{pk}",
        ...options,
    });
};

/**
 * Update Service Category
 */
export const updateServiceCategory = <ThrowOnError extends boolean = false>(
    options: Options<UpdateServiceCategoryData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).patch<
        UpdateServiceCategoryResponses,
        UpdateServiceCategoryErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zUpdateServiceCategoryData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zUpdateServiceCategoryResponse2.parseAsync(data);
        },
        url: "/modules/fulfillment-base/service-category/{pk}",
        ...options,
        headers: {
            "Content-Type": "application/json",
            ...options.headers,
        },
    });
};

/**
 * Get Services Kits
 */
export const getServicesKits = <ThrowOnError extends boolean = false>(
    options?: Options<GetServicesKitsData, ThrowOnError>
) => {
    return (options?.client ?? _heyApiClient).get<
        GetServicesKitsResponses,
        unknown,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zGetServicesKitsData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zGetServicesKitsResponse.parseAsync(data);
        },
        url: "/modules/fulfillment-base/services-kit/",
        ...options,
    });
};

/**
 * Create Services Kit
 */
export const createServicesKit = <ThrowOnError extends boolean = false>(
    options: Options<CreateServicesKitData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).post<
        CreateServicesKitResponses,
        CreateServicesKitErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zCreateServicesKitData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zCreateServicesKitResponse2.parseAsync(data);
        },
        url: "/modules/fulfillment-base/services-kit/",
        ...options,
        headers: {
            "Content-Type": "application/json",
            ...options.headers,
        },
    });
};

/**
 * Delete Services Kit
 */
export const deleteServicesKit = <ThrowOnError extends boolean = false>(
    options: Options<DeleteServicesKitData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).delete<
        DeleteServicesKitResponses,
        DeleteServicesKitErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zDeleteServicesKitData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zDeleteServicesKitResponse2.parseAsync(data);
        },
        url: "/modules/fulfillment-base/services-kit/{pk}",
        ...options,
    });
};

/**
 * Update Services Kit
 */
export const updateServicesKit = <ThrowOnError extends boolean = false>(
    options: Options<UpdateServicesKitData, ThrowOnError>
) => {
    return (options.client ?? _heyApiClient).patch<
        UpdateServicesKitResponses,
        UpdateServicesKitErrors,
        ThrowOnError
    >({
        requestValidator: async data => {
            return await zUpdateServicesKitData.parseAsync(data);
        },
        responseType: "json",
        responseValidator: async data => {
            return await zUpdateServicesKitResponse2.parseAsync(data);
        },
        url: "/modules/fulfillment-base/services-kit/{pk}",
        ...options,
        headers: {
            "Content-Type": "application/json",
            ...options.headers,
        },
    });
};
