/* generated using openapi-typescript-codegen -- do no edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
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 { DealCreateRequest } from '../models/DealCreateRequest';
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 { DealQuickCreateRequest } from '../models/DealQuickCreateRequest';
import type { DealQuickCreateResponse } from '../models/DealQuickCreateResponse';
import type { DealSchema } from '../models/DealSchema';
import type { DealSummaryResponse } from '../models/DealSummaryResponse';
import type { DealUpdateServiceQuantityRequest } from '../models/DealUpdateServiceQuantityRequest';
import type { DealUpdateServiceQuantityResponse } from '../models/DealUpdateServiceQuantityResponse';
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`,
            },
        });
    }
    /**
     * 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(): CancelablePromise<DealSummaryResponse> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/deal/summaries',
        });
    }
    /**
     * 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
     * @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 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`,
            },
        });
    }
    /**
     * 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`,
            },
        });
    }
}
