// tslint:disable
/**
 * Webitel API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 24.04.0
 * Contact: support@webitel.com
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */
import * as globalImportUrl from 'url';
import globalAxios from 'axios';
// Some imports not used depending on template conditions
// @ts-ignore
import { BASE_PATH, BaseAPI, RequiredError, } from '../base';
/**
 * CasesApi - axios parameter creator
 * @export
 */
export const CasesApiAxiosParamCreator = function (configuration) {
    return {
        /**
         *
         * @summary RPC method for creating a new case.
         * @param {WebitelCasesInputCreateCase} input Input data for creating the case.
         * @param {Array<string>} [fields] List of fields to include in the response.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createCase: async (input, fields, options = {}) => {
            // verify required parameter 'input' is not null or undefined
            if (input === null || input === undefined) {
                throw new RequiredError('input', 'Required parameter input was null or undefined when calling createCase.');
            }
            const localVarPath = `/cases`;
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = {
                method: 'POST',
                ...baseOptions,
                ...options,
            };
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? await configuration.apiKey('X-Webitel-Access')
                    : await configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            localVarHeaderParameter['Content-Type'] = 'application/json';
            localVarUrlObj.query = {
                ...localVarUrlObj.query,
                ...localVarQueryParameter,
                ...options.query,
            };
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {
                ...localVarHeaderParameter,
                ...headersFromBaseOptions,
                ...options.headers,
            };
            const needsSerialization = typeof input !== 'string' ||
                localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data = needsSerialization
                ? JSON.stringify(input !== undefined ? input : {})
                : input || '';
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary RPC method for deleting an existing case by its etag.
         * @param {string} etag Unique etag identifier of the case.
         * @param {Array<string>} [fields] List of fields to include in the deleted case response.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteCase: async (etag, fields, options = {}) => {
            // verify required parameter 'etag' is not null or undefined
            if (etag === null || etag === undefined) {
                throw new RequiredError('etag', 'Required parameter etag was null or undefined when calling deleteCase.');
            }
            const localVarPath = `/cases/{etag}`.replace(`{${'etag'}}`, encodeURIComponent(String(etag)));
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = {
                method: 'DELETE',
                ...baseOptions,
                ...options,
            };
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? await configuration.apiKey('X-Webitel-Access')
                    : await configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            localVarUrlObj.query = {
                ...localVarUrlObj.query,
                ...localVarQueryParameter,
                ...options.query,
            };
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {
                ...localVarHeaderParameter,
                ...headersFromBaseOptions,
                ...options.headers,
            };
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary RPC method to retrieve a specific case by its etag identifier.
         * @param {string} etag Unique etag identifier of the case.
         * @param {Array<string>} [fields] List of fields to include in the response.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        locateCase: async (etag, fields, options = {}) => {
            // verify required parameter 'etag' is not null or undefined
            if (etag === null || etag === undefined) {
                throw new RequiredError('etag', 'Required parameter etag was null or undefined when calling locateCase.');
            }
            const localVarPath = `/cases/{etag}`.replace(`{${'etag'}}`, encodeURIComponent(String(etag)));
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = {
                method: 'GET',
                ...baseOptions,
                ...options,
            };
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? await configuration.apiKey('X-Webitel-Access')
                    : await configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            localVarUrlObj.query = {
                ...localVarUrlObj.query,
                ...localVarQueryParameter,
                ...options.query,
            };
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {
                ...localVarHeaderParameter,
                ...headersFromBaseOptions,
                ...options.headers,
            };
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary RPC method for searching cases.
         * @param {number} [page] Page number for pagination.
         * @param {number} [size] Number of results per page.
         * @param {string} [q] Query string for searching cases.
         * @param {Array<string>} [ids] List of specific case IDs to retrieve.
         * @param {string} [sort] Sorting criteria (e.g., field:asc).
         * @param {Array<string>} [fields] List of fields to include in the response.
         * @param {Array<string>} [filters] Key-value pairs for additional filtering.
         * @param {string} [contactId] Contact ID for filtering cases.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchCases: async (page, size, q, ids, sort, fields, filters, contactId, options = {}) => {
            const localVarPath = `/cases`;
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = {
                method: 'GET',
                ...baseOptions,
                ...options,
            };
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? await configuration.apiKey('X-Webitel-Access')
                    : await configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            if (page !== undefined) {
                localVarQueryParameter['page'] = page;
            }
            if (size !== undefined) {
                localVarQueryParameter['size'] = size;
            }
            if (q !== undefined) {
                localVarQueryParameter['q'] = q;
            }
            if (ids) {
                localVarQueryParameter['ids'] = ids;
            }
            if (sort !== undefined) {
                localVarQueryParameter['sort'] = sort;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            if (filters) {
                localVarQueryParameter['filters'] = filters;
            }
            if (contactId !== undefined) {
                localVarQueryParameter['contact_id'] = contactId;
            }
            localVarUrlObj.query = {
                ...localVarUrlObj.query,
                ...localVarQueryParameter,
                ...options.query,
            };
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {
                ...localVarHeaderParameter,
                ...headersFromBaseOptions,
                ...options.headers,
            };
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary RPC method for searching cases.
         * @param {string} contactId Contact ID for filtering cases.
         * @param {number} [page] Page number for pagination.
         * @param {number} [size] Number of results per page.
         * @param {string} [q] Query string for searching cases.
         * @param {Array<string>} [ids] List of specific case IDs to retrieve.
         * @param {string} [sort] Sorting criteria (e.g., field:asc).
         * @param {Array<string>} [fields] List of fields to include in the response.
         * @param {Array<string>} [filters] Key-value pairs for additional filtering.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchCases2: async (contactId, page, size, q, ids, sort, fields, filters, options = {}) => {
            // verify required parameter 'contactId' is not null or undefined
            if (contactId === null || contactId === undefined) {
                throw new RequiredError('contactId', 'Required parameter contactId was null or undefined when calling searchCases2.');
            }
            const localVarPath = `/contacts/{contact_id}/cases`.replace(`{${'contact_id'}}`, encodeURIComponent(String(contactId)));
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = {
                method: 'GET',
                ...baseOptions,
                ...options,
            };
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? await configuration.apiKey('X-Webitel-Access')
                    : await configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            if (page !== undefined) {
                localVarQueryParameter['page'] = page;
            }
            if (size !== undefined) {
                localVarQueryParameter['size'] = size;
            }
            if (q !== undefined) {
                localVarQueryParameter['q'] = q;
            }
            if (ids) {
                localVarQueryParameter['ids'] = ids;
            }
            if (sort !== undefined) {
                localVarQueryParameter['sort'] = sort;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            if (filters) {
                localVarQueryParameter['filters'] = filters;
            }
            localVarUrlObj.query = {
                ...localVarUrlObj.query,
                ...localVarQueryParameter,
                ...options.query,
            };
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {
                ...localVarHeaderParameter,
                ...headersFromBaseOptions,
                ...options.headers,
            };
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary RPC method for updating an existing case.
         * @param {string} inputEtag
         * @param {InputDataWithUpdatedFields} input
         * @param {Array<string>} [xJsonMask] List of JSON fields to update.
         * @param {Array<string>} [fields] List of fields to include in the response.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateCase: async (inputEtag, input, xJsonMask, fields, options = {}) => {
            // verify required parameter 'inputEtag' is not null or undefined
            if (inputEtag === null || inputEtag === undefined) {
                throw new RequiredError('inputEtag', 'Required parameter inputEtag was null or undefined when calling updateCase.');
            }
            // verify required parameter 'input' is not null or undefined
            if (input === null || input === undefined) {
                throw new RequiredError('input', 'Required parameter input was null or undefined when calling updateCase.');
            }
            const localVarPath = `/cases/{input.etag}`.replace(`{${'input.etag'}}`, encodeURIComponent(String(inputEtag)));
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = {
                method: 'PUT',
                ...baseOptions,
                ...options,
            };
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? await configuration.apiKey('X-Webitel-Access')
                    : await configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            if (xJsonMask) {
                localVarQueryParameter['x_json_mask'] = xJsonMask;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            localVarHeaderParameter['Content-Type'] = 'application/json';
            localVarUrlObj.query = {
                ...localVarUrlObj.query,
                ...localVarQueryParameter,
                ...options.query,
            };
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {
                ...localVarHeaderParameter,
                ...headersFromBaseOptions,
                ...options.headers,
            };
            const needsSerialization = typeof input !== 'string' ||
                localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data = needsSerialization
                ? JSON.stringify(input !== undefined ? input : {})
                : input || '';
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary RPC method for updating an existing case.
         * @param {string} inputEtag
         * @param {InputDataWithUpdatedFields1} input
         * @param {Array<string>} [xJsonMask] List of JSON fields to update.
         * @param {Array<string>} [fields] List of fields to include in the response.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateCase2: async (inputEtag, input, xJsonMask, fields, options = {}) => {
            // verify required parameter 'inputEtag' is not null or undefined
            if (inputEtag === null || inputEtag === undefined) {
                throw new RequiredError('inputEtag', 'Required parameter inputEtag was null or undefined when calling updateCase2.');
            }
            // verify required parameter 'input' is not null or undefined
            if (input === null || input === undefined) {
                throw new RequiredError('input', 'Required parameter input was null or undefined when calling updateCase2.');
            }
            const localVarPath = `/cases/{input.etag}`.replace(`{${'input.etag'}}`, encodeURIComponent(String(inputEtag)));
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = {
                method: 'PATCH',
                ...baseOptions,
                ...options,
            };
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? await configuration.apiKey('X-Webitel-Access')
                    : await configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            if (xJsonMask) {
                localVarQueryParameter['x_json_mask'] = xJsonMask;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            localVarHeaderParameter['Content-Type'] = 'application/json';
            localVarUrlObj.query = {
                ...localVarUrlObj.query,
                ...localVarQueryParameter,
                ...options.query,
            };
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {
                ...localVarHeaderParameter,
                ...headersFromBaseOptions,
                ...options.headers,
            };
            const needsSerialization = typeof input !== 'string' ||
                localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data = needsSerialization
                ? JSON.stringify(input !== undefined ? input : {})
                : input || '';
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
    };
};
/**
 * CasesApi - functional programming interface
 * @export
 */
export const CasesApiFp = function (configuration) {
    return {
        /**
         *
         * @summary RPC method for creating a new case.
         * @param {WebitelCasesInputCreateCase} input Input data for creating the case.
         * @param {Array<string>} [fields] List of fields to include in the response.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createCase(input, fields, options) {
            const localVarAxiosArgs = await CasesApiAxiosParamCreator(configuration).createCase(input, fields, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary RPC method for deleting an existing case by its etag.
         * @param {string} etag Unique etag identifier of the case.
         * @param {Array<string>} [fields] List of fields to include in the deleted case response.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteCase(etag, fields, options) {
            const localVarAxiosArgs = await CasesApiAxiosParamCreator(configuration).deleteCase(etag, fields, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary RPC method to retrieve a specific case by its etag identifier.
         * @param {string} etag Unique etag identifier of the case.
         * @param {Array<string>} [fields] List of fields to include in the response.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async locateCase(etag, fields, options) {
            const localVarAxiosArgs = await CasesApiAxiosParamCreator(configuration).locateCase(etag, fields, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary RPC method for searching cases.
         * @param {number} [page] Page number for pagination.
         * @param {number} [size] Number of results per page.
         * @param {string} [q] Query string for searching cases.
         * @param {Array<string>} [ids] List of specific case IDs to retrieve.
         * @param {string} [sort] Sorting criteria (e.g., field:asc).
         * @param {Array<string>} [fields] List of fields to include in the response.
         * @param {Array<string>} [filters] Key-value pairs for additional filtering.
         * @param {string} [contactId] Contact ID for filtering cases.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async searchCases(page, size, q, ids, sort, fields, filters, contactId, options) {
            const localVarAxiosArgs = await CasesApiAxiosParamCreator(configuration).searchCases(page, size, q, ids, sort, fields, filters, contactId, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary RPC method for searching cases.
         * @param {string} contactId Contact ID for filtering cases.
         * @param {number} [page] Page number for pagination.
         * @param {number} [size] Number of results per page.
         * @param {string} [q] Query string for searching cases.
         * @param {Array<string>} [ids] List of specific case IDs to retrieve.
         * @param {string} [sort] Sorting criteria (e.g., field:asc).
         * @param {Array<string>} [fields] List of fields to include in the response.
         * @param {Array<string>} [filters] Key-value pairs for additional filtering.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async searchCases2(contactId, page, size, q, ids, sort, fields, filters, options) {
            const localVarAxiosArgs = await CasesApiAxiosParamCreator(configuration).searchCases2(contactId, page, size, q, ids, sort, fields, filters, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary RPC method for updating an existing case.
         * @param {string} inputEtag
         * @param {InputDataWithUpdatedFields} input
         * @param {Array<string>} [xJsonMask] List of JSON fields to update.
         * @param {Array<string>} [fields] List of fields to include in the response.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async updateCase(inputEtag, input, xJsonMask, fields, options) {
            const localVarAxiosArgs = await CasesApiAxiosParamCreator(configuration).updateCase(inputEtag, input, xJsonMask, fields, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary RPC method for updating an existing case.
         * @param {string} inputEtag
         * @param {InputDataWithUpdatedFields1} input
         * @param {Array<string>} [xJsonMask] List of JSON fields to update.
         * @param {Array<string>} [fields] List of fields to include in the response.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async updateCase2(inputEtag, input, xJsonMask, fields, options) {
            const localVarAxiosArgs = await CasesApiAxiosParamCreator(configuration).updateCase2(inputEtag, input, xJsonMask, fields, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
    };
};
/**
 * CasesApi - factory interface
 * @export
 */
export const CasesApiFactory = function (configuration, basePath, axios) {
    return {
        /**
         *
         * @summary RPC method for creating a new case.
         * @param {WebitelCasesInputCreateCase} input Input data for creating the case.
         * @param {Array<string>} [fields] List of fields to include in the response.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createCase(input, fields, options) {
            return CasesApiFp(configuration)
                .createCase(input, fields, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary RPC method for deleting an existing case by its etag.
         * @param {string} etag Unique etag identifier of the case.
         * @param {Array<string>} [fields] List of fields to include in the deleted case response.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteCase(etag, fields, options) {
            return CasesApiFp(configuration)
                .deleteCase(etag, fields, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary RPC method to retrieve a specific case by its etag identifier.
         * @param {string} etag Unique etag identifier of the case.
         * @param {Array<string>} [fields] List of fields to include in the response.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        locateCase(etag, fields, options) {
            return CasesApiFp(configuration)
                .locateCase(etag, fields, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary RPC method for searching cases.
         * @param {number} [page] Page number for pagination.
         * @param {number} [size] Number of results per page.
         * @param {string} [q] Query string for searching cases.
         * @param {Array<string>} [ids] List of specific case IDs to retrieve.
         * @param {string} [sort] Sorting criteria (e.g., field:asc).
         * @param {Array<string>} [fields] List of fields to include in the response.
         * @param {Array<string>} [filters] Key-value pairs for additional filtering.
         * @param {string} [contactId] Contact ID for filtering cases.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchCases(page, size, q, ids, sort, fields, filters, contactId, options) {
            return CasesApiFp(configuration)
                .searchCases(page, size, q, ids, sort, fields, filters, contactId, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary RPC method for searching cases.
         * @param {string} contactId Contact ID for filtering cases.
         * @param {number} [page] Page number for pagination.
         * @param {number} [size] Number of results per page.
         * @param {string} [q] Query string for searching cases.
         * @param {Array<string>} [ids] List of specific case IDs to retrieve.
         * @param {string} [sort] Sorting criteria (e.g., field:asc).
         * @param {Array<string>} [fields] List of fields to include in the response.
         * @param {Array<string>} [filters] Key-value pairs for additional filtering.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchCases2(contactId, page, size, q, ids, sort, fields, filters, options) {
            return CasesApiFp(configuration)
                .searchCases2(contactId, page, size, q, ids, sort, fields, filters, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary RPC method for updating an existing case.
         * @param {string} inputEtag
         * @param {InputDataWithUpdatedFields} input
         * @param {Array<string>} [xJsonMask] List of JSON fields to update.
         * @param {Array<string>} [fields] List of fields to include in the response.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateCase(inputEtag, input, xJsonMask, fields, options) {
            return CasesApiFp(configuration)
                .updateCase(inputEtag, input, xJsonMask, fields, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary RPC method for updating an existing case.
         * @param {string} inputEtag
         * @param {InputDataWithUpdatedFields1} input
         * @param {Array<string>} [xJsonMask] List of JSON fields to update.
         * @param {Array<string>} [fields] List of fields to include in the response.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateCase2(inputEtag, input, xJsonMask, fields, options) {
            return CasesApiFp(configuration)
                .updateCase2(inputEtag, input, xJsonMask, fields, options)
                .then((request) => request(axios, basePath));
        },
    };
};
/**
 * CasesApi - object-oriented interface
 * @export
 * @class CasesApi
 * @extends {BaseAPI}
 */
export class CasesApi extends BaseAPI {
    /**
     *
     * @summary RPC method for creating a new case.
     * @param {WebitelCasesInputCreateCase} input Input data for creating the case.
     * @param {Array<string>} [fields] List of fields to include in the response.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CasesApi
     */
    createCase(input, fields, options) {
        return CasesApiFp(this.configuration)
            .createCase(input, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary RPC method for deleting an existing case by its etag.
     * @param {string} etag Unique etag identifier of the case.
     * @param {Array<string>} [fields] List of fields to include in the deleted case response.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CasesApi
     */
    deleteCase(etag, fields, options) {
        return CasesApiFp(this.configuration)
            .deleteCase(etag, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary RPC method to retrieve a specific case by its etag identifier.
     * @param {string} etag Unique etag identifier of the case.
     * @param {Array<string>} [fields] List of fields to include in the response.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CasesApi
     */
    locateCase(etag, fields, options) {
        return CasesApiFp(this.configuration)
            .locateCase(etag, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary RPC method for searching cases.
     * @param {number} [page] Page number for pagination.
     * @param {number} [size] Number of results per page.
     * @param {string} [q] Query string for searching cases.
     * @param {Array<string>} [ids] List of specific case IDs to retrieve.
     * @param {string} [sort] Sorting criteria (e.g., field:asc).
     * @param {Array<string>} [fields] List of fields to include in the response.
     * @param {Array<string>} [filters] Key-value pairs for additional filtering.
     * @param {string} [contactId] Contact ID for filtering cases.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CasesApi
     */
    searchCases(page, size, q, ids, sort, fields, filters, contactId, options) {
        return CasesApiFp(this.configuration)
            .searchCases(page, size, q, ids, sort, fields, filters, contactId, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary RPC method for searching cases.
     * @param {string} contactId Contact ID for filtering cases.
     * @param {number} [page] Page number for pagination.
     * @param {number} [size] Number of results per page.
     * @param {string} [q] Query string for searching cases.
     * @param {Array<string>} [ids] List of specific case IDs to retrieve.
     * @param {string} [sort] Sorting criteria (e.g., field:asc).
     * @param {Array<string>} [fields] List of fields to include in the response.
     * @param {Array<string>} [filters] Key-value pairs for additional filtering.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CasesApi
     */
    searchCases2(contactId, page, size, q, ids, sort, fields, filters, options) {
        return CasesApiFp(this.configuration)
            .searchCases2(contactId, page, size, q, ids, sort, fields, filters, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary RPC method for updating an existing case.
     * @param {string} inputEtag
     * @param {InputDataWithUpdatedFields} input
     * @param {Array<string>} [xJsonMask] List of JSON fields to update.
     * @param {Array<string>} [fields] List of fields to include in the response.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CasesApi
     */
    updateCase(inputEtag, input, xJsonMask, fields, options) {
        return CasesApiFp(this.configuration)
            .updateCase(inputEtag, input, xJsonMask, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary RPC method for updating an existing case.
     * @param {string} inputEtag
     * @param {InputDataWithUpdatedFields1} input
     * @param {Array<string>} [xJsonMask] List of JSON fields to update.
     * @param {Array<string>} [fields] List of fields to include in the response.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CasesApi
     */
    updateCase2(inputEtag, input, xJsonMask, fields, options) {
        return CasesApiFp(this.configuration)
            .updateCase2(inputEtag, input, xJsonMask, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
}
//# sourceMappingURL=cases-api.js.map