/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { CreateResidualBoxRequest } from '../models/CreateResidualBoxRequest';
import type { CreateResidualBoxResponse } from '../models/CreateResidualBoxResponse';
import type { CreateResidualPalletRequest } from '../models/CreateResidualPalletRequest';
import type { CreateResidualPalletResponse } from '../models/CreateResidualPalletResponse';
import type { CreateResidualProductRequest } from '../models/CreateResidualProductRequest';
import type { CreateResidualProductResponse } from '../models/CreateResidualProductResponse';
import type { DeleteResidualBoxResponse } from '../models/DeleteResidualBoxResponse';
import type { DeleteResidualPalletResponse } from '../models/DeleteResidualPalletResponse';
import type { DeleteResidualProductResponse } from '../models/DeleteResidualProductResponse';
import type { GetResidualBoxResponse } from '../models/GetResidualBoxResponse';
import type { GetResidualPalletResponse } from '../models/GetResidualPalletResponse';
import type { LoadReceiptRequest } from '../models/LoadReceiptRequest';
import type { LoadReceiptResponse } from '../models/LoadReceiptResponse';
import type { UpdateResidualProductRequest } from '../models/UpdateResidualProductRequest';
import type { UpdateResidualProductResponse } from '../models/UpdateResidualProductResponse';
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
export class ResiduesService {
    /**
     * Get Pallet
     * @returns GetResidualPalletResponse Successful Response
     * @throws ApiError
     */
    public static getResidualPallet({
        palletId,
    }: {
        palletId: number,
    }): CancelablePromise<GetResidualPalletResponse> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/residues/pallet/{pallet_id}',
            path: {
                'pallet_id': palletId,
            },
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Delete Pallet
     * @returns DeleteResidualPalletResponse Successful Response
     * @throws ApiError
     */
    public static deleteResidualPallet({
        palletId,
    }: {
        palletId: number,
    }): CancelablePromise<DeleteResidualPalletResponse> {
        return __request(OpenAPI, {
            method: 'DELETE',
            url: '/residues/pallet/{pallet_id}',
            path: {
                'pallet_id': palletId,
            },
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Create Pallet
     * @returns CreateResidualPalletResponse Successful Response
     * @throws ApiError
     */
    public static createResidualPallet({
        requestBody,
    }: {
        requestBody: CreateResidualPalletRequest,
    }): CancelablePromise<CreateResidualPalletResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/residues/pallet',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Create Residual Product
     * @returns CreateResidualProductResponse Successful Response
     * @throws ApiError
     */
    public static createResidualProduct({
        requestBody,
    }: {
        requestBody: CreateResidualProductRequest,
    }): CancelablePromise<CreateResidualProductResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/residues/product',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Update Residual Product
     * @returns UpdateResidualProductResponse Successful Response
     * @throws ApiError
     */
    public static updateResidualProduct({
        residualProductId,
        requestBody,
    }: {
        residualProductId: number,
        requestBody: UpdateResidualProductRequest,
    }): CancelablePromise<UpdateResidualProductResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/residues/product/{residual_product_id}',
            path: {
                'residual_product_id': residualProductId,
            },
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Delete Residual Product
     * @returns DeleteResidualProductResponse Successful Response
     * @throws ApiError
     */
    public static deleteResidualProduct({
        residualProductId,
    }: {
        residualProductId: number,
    }): CancelablePromise<DeleteResidualProductResponse> {
        return __request(OpenAPI, {
            method: 'DELETE',
            url: '/residues/product/{residual_product_id}',
            path: {
                'residual_product_id': residualProductId,
            },
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Get Box
     * @returns GetResidualBoxResponse Successful Response
     * @throws ApiError
     */
    public static getResidualBox({
        boxId,
    }: {
        boxId: number,
    }): CancelablePromise<GetResidualBoxResponse> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/residues/box/{box_id}',
            path: {
                'box_id': boxId,
            },
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Delete Box
     * @returns DeleteResidualBoxResponse Successful Response
     * @throws ApiError
     */
    public static deleteResidualBox({
        boxId,
    }: {
        boxId: number,
    }): CancelablePromise<DeleteResidualBoxResponse> {
        return __request(OpenAPI, {
            method: 'DELETE',
            url: '/residues/box/{box_id}',
            path: {
                'box_id': boxId,
            },
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Create Box
     * @returns CreateResidualBoxResponse Successful Response
     * @throws ApiError
     */
    public static createResidualBox({
        requestBody,
    }: {
        requestBody: CreateResidualBoxRequest,
    }): CancelablePromise<CreateResidualBoxResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/residues/box',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Receipt
     * @returns LoadReceiptResponse Successful Response
     * @throws ApiError
     */
    public static receipt({
        requestBody,
    }: {
        requestBody: LoadReceiptRequest,
    }): CancelablePromise<LoadReceiptResponse> {
        return __request(OpenAPI, {
            method: 'POST',
            url: '/residues/receipt',
            body: requestBody,
            mediaType: 'application/json',
            errors: {
                422: `Validation Error`,
            },
        });
    }
    /**
     * Generate Pdf
     * @returns any Successful Response
     * @throws ApiError
     */
    public static getPdf({
        palletIds = '',
        boxIds = '',
    }: {
        palletIds?: string,
        boxIds?: string,
    }): CancelablePromise<any> {
        return __request(OpenAPI, {
            method: 'GET',
            url: '/residues/pdf/',
            query: {
                'pallet_ids': palletIds,
                'box_ids': boxIds,
            },
            errors: {
                422: `Validation Error`,
            },
        });
    }
}
