/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { DealAddKitRequest } from '../models/DealAddKitRequest';
import type { DealAddKitResponse } from '../models/DealAddKitResponse';
import type { DealAddProductRequest } from '../models/DealAddProductRequest';
import type { DealAddProductResponse } from '../models/DealAddProductResponse';
import type { DealAddServiceRequest } from '../models/DealAddServiceRequest';
import type { DealAddServiceResponse } from '../models/DealAddServiceResponse';
import type { DealAddServicesRequest } from '../models/DealAddServicesRequest';
import type { DealAddServicesResponse } from '../models/DealAddServicesResponse';
import type { DealChangeStatusRequest } from '../models/DealChangeStatusRequest';
import type { DealChangeStatusResponse } from '../models/DealChangeStatusResponse';
import type { DealCreateGuestUrlRequest } from '../models/DealCreateGuestUrlRequest';
import type { DealCreateGuestUrlResponse } from '../models/DealCreateGuestUrlResponse';
import type { DealCreateRequest } from '../models/DealCreateRequest';
import type { DealDeleteProductRequest } from '../models/DealDeleteProductRequest';
import type { DealDeleteProductResponse } from '../models/DealDeleteProductResponse';
import type { DealDeleteProductsRequest } from '../models/DealDeleteProductsRequest';
import type { DealDeleteProductsResponse } from '../models/DealDeleteProductsResponse';
import type { DealDeleteRequest } from '../models/DealDeleteRequest';
import type { DealDeleteResponse } from '../models/DealDeleteResponse';
import type { DealDeleteServiceRequest } from '../models/DealDeleteServiceRequest';
import type { DealDeleteServiceResponse } from '../models/DealDeleteServiceResponse';
import type { DealDeleteServicesRequest } from '../models/DealDeleteServicesRequest';
import type { DealDeleteServicesResponse } from '../models/DealDeleteServicesResponse';
import type { DealGetAllResponse } from '../models/DealGetAllResponse';
import type { DealProductAddKitRequest } from '../models/DealProductAddKitRequest';
import type { DealProductAddKitResponse } from '../models/DealProductAddKitResponse';
import type { DealQuickCreateRequest } from '../models/DealQuickCreateRequest';
import type { DealQuickCreateResponse } from '../models/DealQuickCreateResponse';
import type { DealSchema } from '../models/DealSchema';
import type { DealServicesCopyRequest } from '../models/DealServicesCopyRequest';
import type { DealServicesCopyResponse } from '../models/DealServicesCopyResponse';
import type { DealSummaryReorderRequest } from '../models/DealSummaryReorderRequest';
import type { DealSummaryResponse } from '../models/DealSummaryResponse';
import type { DealUpdateGeneralInfoRequest } from '../models/DealUpdateGeneralInfoRequest';
import type { DealUpdateGeneralInfoResponse } from '../models/DealUpdateGeneralInfoResponse';
import type { DealUpdateProductQuantityRequest } from '../models/DealUpdateProductQuantityRequest';
import type { DealUpdateProductQuantityResponse } from '../models/DealUpdateProductQuantityResponse';
import type { DealUpdateProductRequest } from '../models/DealUpdateProductRequest';
import type { DealUpdateProductResponse } from '../models/DealUpdateProductResponse';
import type { DealUpdateServiceQuantityRequest } from '../models/DealUpdateServiceQuantityRequest';
import type { DealUpdateServiceQuantityResponse } from '../models/DealUpdateServiceQuantityResponse';
import type { DealUpdateServiceRequest } from '../models/DealUpdateServiceRequest';
import type { DealUpdateServiceResponse } from '../models/DealUpdateServiceResponse';
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
export class DealService {
    /**
     * Create
     * @returns any Successful Response
     * @throws ApiError
     */
    public static createDealCreatePost({
        requestBody,
    }: {
        requestBody: DealCreateRequest,
    }): CancelablePromise<any> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/deal/create',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Delete
     * @returns DealDeleteResponse Successful Response
     * @throws ApiError
     */
    public static deleteDeal({
        requestBody,
    }: {
        requestBody: DealDeleteRequest,
    }): CancelablePromise<DealDeleteResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/deal/delete',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Quick Create
     * @returns DealQuickCreateResponse Successful Response
     * @throws ApiError
     */
    public static quickCreateDealQuickCreatePost({
        requestBody,
    }: {
        requestBody: DealQuickCreateRequest,
    }): CancelablePromise<DealQuickCreateResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/deal/quickCreate',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Change Status
     * @returns DealChangeStatusResponse Successful Response
     * @throws ApiError
     */
    public static changeStatusDealChangeStatusPost({
        requestBody,
    }: {
        requestBody: DealChangeStatusRequest,
    }): CancelablePromise<DealChangeStatusResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/deal/changeStatus',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Get Summary
     * @returns DealSummaryResponse Successful Response
     * @throws ApiError
     */
    public static getDealSummaries({
        full,
    }: {
        full: (boolean | null),
    }): CancelablePromise<DealSummaryResponse> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/deal/summaries',
            query: {
                'full': full,
            },
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Reorder
     * @returns DealSummaryResponse Successful Response
     * @throws ApiError
     */
    public static reorderDealSummaries({
        requestBody,
    }: {
        requestBody: DealSummaryReorderRequest,
    }): CancelablePromise<DealSummaryResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/deal/summaries/reorder',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Get All
     * @returns DealGetAllResponse Successful Response
     * @throws ApiError
     */
    public static getAllDeals(): CancelablePromise<DealGetAllResponse> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/deal/get-all',
        });
    }
    /**
     * Get Deal By Id
     * @returns DealSchema Successful Response
     * @throws ApiError
     */
    public static getDealById({
        dealId,
    }: {
        dealId: number,
    }): CancelablePromise<DealSchema> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/deal/get/{deal_id}',
            path: {
                'deal_id': dealId,
            },
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Update General Info
     * @returns DealUpdateGeneralInfoResponse Successful Response
     * @throws ApiError
     */
    public static updateDealGeneralInfo({
        requestBody,
    }: {
        requestBody: DealUpdateGeneralInfoRequest,
    }): CancelablePromise<DealUpdateGeneralInfoResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/deal/update-general-info',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Add Kit To Deal
     * @returns DealAddKitResponse Successful Response
     * @throws ApiError
     */
    public static addKitToDeal({
        requestBody,
    }: {
        requestBody: DealAddKitRequest,
    }): CancelablePromise<DealAddKitResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/deal/add-kit',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Create Guest Url
     * @returns DealCreateGuestUrlResponse Successful Response
     * @throws ApiError
     */
    public static createDealGuestUrl({
        requestBody,
    }: {
        requestBody: DealCreateGuestUrlRequest,
    }): CancelablePromise<DealCreateGuestUrlResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/deal/create-guest-url',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Services Add
     * @returns DealAddServicesResponse Successful Response
     * @throws ApiError
     */
    public static addMultipleDealServices({
        requestBody,
    }: {
        requestBody: DealAddServicesRequest,
    }): CancelablePromise<DealAddServicesResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/deal/services/add/multiple',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Services Add
     * @returns DealAddServiceResponse Successful Response
     * @throws ApiError
     */
    public static addDealService({
        requestBody,
    }: {
        requestBody: DealAddServiceRequest,
    }): CancelablePromise<DealAddServiceResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/deal/services/add',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Services Update Quantity
     * @returns DealUpdateServiceQuantityResponse Successful Response
     * @throws ApiError
     */
    public static updateDealServiceQuantity({
        requestBody,
    }: {
        requestBody: DealUpdateServiceQuantityRequest,
    }): CancelablePromise<DealUpdateServiceQuantityResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/deal/services/update-quantity',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Services Update
     * @returns DealUpdateServiceResponse Successful Response
     * @throws ApiError
     */
    public static updateDealService({
        requestBody,
    }: {
        requestBody: DealUpdateServiceRequest,
    }): CancelablePromise<DealUpdateServiceResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/deal/services/update',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Services Delete
     * @returns DealDeleteServiceResponse Successful Response
     * @throws ApiError
     */
    public static deleteDealService({
        requestBody,
    }: {
        requestBody: DealDeleteServiceRequest,
    }): CancelablePromise<DealDeleteServiceResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/deal/services/delete',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Services Delete
     * @returns DealDeleteServicesResponse Successful Response
     * @throws ApiError
     */
    public static deleteMultipleDealServices({
        requestBody,
    }: {
        requestBody: DealDeleteServicesRequest,
    }): CancelablePromise<DealDeleteServicesResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/deal/services/delete/multiple',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Services Copy
     * @returns DealServicesCopyResponse Successful Response
     * @throws ApiError
     */
    public static copyProductServices({
        requestBody,
    }: {
        requestBody: DealServicesCopyRequest,
    }): CancelablePromise<DealServicesCopyResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/deal/services/copy',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Products Update
     * @returns DealUpdateProductQuantityResponse Successful Response
     * @throws ApiError
     */
    public static updateDealProductQuantity({
        requestBody,
    }: {
        requestBody: DealUpdateProductQuantityRequest,
    }): CancelablePromise<DealUpdateProductQuantityResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/deal/products/update-quantity',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Products Add
     * @returns DealAddProductResponse Successful Response
     * @throws ApiError
     */
    public static addDealProduct({
        requestBody,
    }: {
        requestBody: DealAddProductRequest,
    }): CancelablePromise<DealAddProductResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/deal/products/add',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Products Delete
     * @returns DealDeleteProductResponse Successful Response
     * @throws ApiError
     */
    public static deleteDealProduct({
        requestBody,
    }: {
        requestBody: DealDeleteProductRequest,
    }): CancelablePromise<DealDeleteProductResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/deal/products/delete',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Products Delete
     * @returns DealDeleteProductsResponse Successful Response
     * @throws ApiError
     */
    public static deleteMultipleDealProducts({
        requestBody,
    }: {
        requestBody: DealDeleteProductsRequest,
    }): CancelablePromise<DealDeleteProductsResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/deal/products/delete/multiple',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Products Update
     * @returns DealUpdateProductResponse Successful Response
     * @throws ApiError
     */
    public static updateDealProduct({
        requestBody,
    }: {
        requestBody: DealUpdateProductRequest,
    }): CancelablePromise<DealUpdateProductResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/deal/product/update',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Add Kit To Deal Product
     * @returns DealProductAddKitResponse Successful Response
     * @throws ApiError
     */
    public static addKitToDealProduct({
        requestBody,
    }: {
        requestBody: DealProductAddKitRequest,
    }): CancelablePromise<DealProductAddKitResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/deal/product/add-kit',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
}
