// 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';
/**
 * CatalogsApi - axios parameter creator
 * @export
 */
export const CatalogsApiAxiosParamCreator = function (configuration) {
    return {
        /**
         *
         * @summary Create a new catalog
         * @param {WebitelCasesInputCatalog} input
         * @param {Array<string>} [fields]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createCatalog: 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 createCatalog.');
            }
            const localVarPath = `/cases/catalogs`;
            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 Delete a catalog
         * @param {Array<string>} id ID of the catalog to be deleted
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteCatalog: async (id, options = {}) => {
            // verify required parameter 'id' is not null or undefined
            if (id === null || id === undefined) {
                throw new RequiredError('id', 'Required parameter id was null or undefined when calling deleteCatalog.');
            }
            const localVarPath = `/cases/catalogs/{id}`.replace(`{${'id'}}`, encodeURIComponent(String(id)));
            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;
            }
            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 Retrieve a list of catalogs or search catalogs
         * @param {number} [page] Page number for pagination
         * @param {number} [size] Number of records per page
         * @param {Array<string>} [fields] Fields to be retrieved as a result. If the user passes \&quot;-\&quot; as the value for fields, it will retrieve all available fields for each catalog.
         * @param {string} [sort] Sorting options by fields
         * @param {Array<string>} [id] List of IDs to filter the catalogs
         * @param {string} [query] Search query string for filtering by name. Supports: - Wildcards (*) for substring matching - Placeholder (?) for single character substitution - Exact match for full names
         * @param {boolean} [state] Filter by state (true for active, false for inactive)
         * @param {string} [depth] Filter by the depth of the hierarchy to retrieve services. The depth indicates how many ancestor levels of services will be included for each catalog. - A depth of 0 includes only the direct catalog. - A depth of 1 includes the catalog and its immediate services. - By default the depth is limited by 3,   meaning all nested services and sub-services will be included.
         * @param {Array<string>} [subFields] Fields to be retrieved as a result for [SUBSERVICES]. If the user passes \&quot;-\&quot; as the value for fields, it will retrieve all available fields for each catalog subservices.
         * @param {boolean} [hasSubservices] Filter catalogs with subservices
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listCatalogs: async (page, size, fields, sort, id, query, state, depth, subFields, hasSubservices, options = {}) => {
            const localVarPath = `/cases/catalogs`;
            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 (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            if (sort !== undefined) {
                localVarQueryParameter['sort'] = sort;
            }
            if (id) {
                localVarQueryParameter['id'] = id;
            }
            if (query !== undefined) {
                localVarQueryParameter['query'] = query;
            }
            if (state !== undefined) {
                localVarQueryParameter['state'] = state;
            }
            if (depth !== undefined) {
                localVarQueryParameter['depth'] = depth;
            }
            if (subFields) {
                localVarQueryParameter['sub_fields'] = subFields;
            }
            if (hasSubservices !== undefined) {
                localVarQueryParameter['hasSubservices'] = hasSubservices;
            }
            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 Locate a catalog by ID
         * @param {string} id ID of the catalog to be located
         * @param {Array<string>} [fields] Fields to be retrieved as a result. If the user passes \&quot;-\&quot; as the value for fields, it will retrieve all available fields for each catalog.
         * @param {Array<string>} [subFields] Fields to be retrieved as a result for [SUBSERVICES]. If the user passes \&quot;-\&quot; as the value for fields, it will retrieve all available fields for each catalog subservices.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        locateCatalog: async (id, fields, subFields, options = {}) => {
            // verify required parameter 'id' is not null or undefined
            if (id === null || id === undefined) {
                throw new RequiredError('id', 'Required parameter id was null or undefined when calling locateCatalog.');
            }
            const localVarPath = `/cases/catalogs/{id}`.replace(`{${'id'}}`, encodeURIComponent(String(id)));
            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;
            }
            if (subFields) {
                localVarQueryParameter['sub_fields'] = subFields;
            }
            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 Update an existing catalog
         * @param {string} id ID of the catalog to be updated
         * @param {WebitelCasesInputCatalog} input Input data for updating the catalog
         * @param {Array<string>} [fields]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateCatalog: async (id, input, fields, options = {}) => {
            // verify required parameter 'id' is not null or undefined
            if (id === null || id === undefined) {
                throw new RequiredError('id', 'Required parameter id was null or undefined when calling updateCatalog.');
            }
            // 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 updateCatalog.');
            }
            const localVarPath = `/cases/catalogs/{id}`.replace(`{${'id'}}`, encodeURIComponent(String(id)));
            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 (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 Update an existing catalog
         * @param {string} id ID of the catalog to be updated
         * @param {WebitelCasesInputCatalog} input Input data for updating the catalog
         * @param {Array<string>} [fields]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateCatalog2: async (id, input, fields, options = {}) => {
            // verify required parameter 'id' is not null or undefined
            if (id === null || id === undefined) {
                throw new RequiredError('id', 'Required parameter id was null or undefined when calling updateCatalog2.');
            }
            // 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 updateCatalog2.');
            }
            const localVarPath = `/cases/catalogs/{id}`.replace(`{${'id'}}`, encodeURIComponent(String(id)));
            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 (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,
            };
        },
    };
};
/**
 * CatalogsApi - functional programming interface
 * @export
 */
export const CatalogsApiFp = function (configuration) {
    return {
        /**
         *
         * @summary Create a new catalog
         * @param {WebitelCasesInputCatalog} input
         * @param {Array<string>} [fields]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createCatalog(input, fields, options) {
            const localVarAxiosArgs = await CatalogsApiAxiosParamCreator(configuration).createCatalog(input, fields, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary Delete a catalog
         * @param {Array<string>} id ID of the catalog to be deleted
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteCatalog(id, options) {
            const localVarAxiosArgs = await CatalogsApiAxiosParamCreator(configuration).deleteCatalog(id, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary Retrieve a list of catalogs or search catalogs
         * @param {number} [page] Page number for pagination
         * @param {number} [size] Number of records per page
         * @param {Array<string>} [fields] Fields to be retrieved as a result. If the user passes \&quot;-\&quot; as the value for fields, it will retrieve all available fields for each catalog.
         * @param {string} [sort] Sorting options by fields
         * @param {Array<string>} [id] List of IDs to filter the catalogs
         * @param {string} [query] Search query string for filtering by name. Supports: - Wildcards (*) for substring matching - Placeholder (?) for single character substitution - Exact match for full names
         * @param {boolean} [state] Filter by state (true for active, false for inactive)
         * @param {string} [depth] Filter by the depth of the hierarchy to retrieve services. The depth indicates how many ancestor levels of services will be included for each catalog. - A depth of 0 includes only the direct catalog. - A depth of 1 includes the catalog and its immediate services. - By default the depth is limited by 3,   meaning all nested services and sub-services will be included.
         * @param {Array<string>} [subFields] Fields to be retrieved as a result for [SUBSERVICES]. If the user passes \&quot;-\&quot; as the value for fields, it will retrieve all available fields for each catalog subservices.
         * @param {boolean} [hasSubservices] Filter catalogs with subservices
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async listCatalogs(page, size, fields, sort, id, query, state, depth, subFields, hasSubservices, options) {
            const localVarAxiosArgs = await CatalogsApiAxiosParamCreator(configuration).listCatalogs(page, size, fields, sort, id, query, state, depth, subFields, hasSubservices, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary Locate a catalog by ID
         * @param {string} id ID of the catalog to be located
         * @param {Array<string>} [fields] Fields to be retrieved as a result. If the user passes \&quot;-\&quot; as the value for fields, it will retrieve all available fields for each catalog.
         * @param {Array<string>} [subFields] Fields to be retrieved as a result for [SUBSERVICES]. If the user passes \&quot;-\&quot; as the value for fields, it will retrieve all available fields for each catalog subservices.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async locateCatalog(id, fields, subFields, options) {
            const localVarAxiosArgs = await CatalogsApiAxiosParamCreator(configuration).locateCatalog(id, fields, subFields, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary Update an existing catalog
         * @param {string} id ID of the catalog to be updated
         * @param {WebitelCasesInputCatalog} input Input data for updating the catalog
         * @param {Array<string>} [fields]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async updateCatalog(id, input, fields, options) {
            const localVarAxiosArgs = await CatalogsApiAxiosParamCreator(configuration).updateCatalog(id, input, fields, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary Update an existing catalog
         * @param {string} id ID of the catalog to be updated
         * @param {WebitelCasesInputCatalog} input Input data for updating the catalog
         * @param {Array<string>} [fields]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async updateCatalog2(id, input, fields, options) {
            const localVarAxiosArgs = await CatalogsApiAxiosParamCreator(configuration).updateCatalog2(id, input, fields, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
    };
};
/**
 * CatalogsApi - factory interface
 * @export
 */
export const CatalogsApiFactory = function (configuration, basePath, axios) {
    return {
        /**
         *
         * @summary Create a new catalog
         * @param {WebitelCasesInputCatalog} input
         * @param {Array<string>} [fields]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createCatalog(input, fields, options) {
            return CatalogsApiFp(configuration)
                .createCatalog(input, fields, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Delete a catalog
         * @param {Array<string>} id ID of the catalog to be deleted
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteCatalog(id, options) {
            return CatalogsApiFp(configuration)
                .deleteCatalog(id, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Retrieve a list of catalogs or search catalogs
         * @param {number} [page] Page number for pagination
         * @param {number} [size] Number of records per page
         * @param {Array<string>} [fields] Fields to be retrieved as a result. If the user passes \&quot;-\&quot; as the value for fields, it will retrieve all available fields for each catalog.
         * @param {string} [sort] Sorting options by fields
         * @param {Array<string>} [id] List of IDs to filter the catalogs
         * @param {string} [query] Search query string for filtering by name. Supports: - Wildcards (*) for substring matching - Placeholder (?) for single character substitution - Exact match for full names
         * @param {boolean} [state] Filter by state (true for active, false for inactive)
         * @param {string} [depth] Filter by the depth of the hierarchy to retrieve services. The depth indicates how many ancestor levels of services will be included for each catalog. - A depth of 0 includes only the direct catalog. - A depth of 1 includes the catalog and its immediate services. - By default the depth is limited by 3,   meaning all nested services and sub-services will be included.
         * @param {Array<string>} [subFields] Fields to be retrieved as a result for [SUBSERVICES]. If the user passes \&quot;-\&quot; as the value for fields, it will retrieve all available fields for each catalog subservices.
         * @param {boolean} [hasSubservices] Filter catalogs with subservices
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listCatalogs(page, size, fields, sort, id, query, state, depth, subFields, hasSubservices, options) {
            return CatalogsApiFp(configuration)
                .listCatalogs(page, size, fields, sort, id, query, state, depth, subFields, hasSubservices, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Locate a catalog by ID
         * @param {string} id ID of the catalog to be located
         * @param {Array<string>} [fields] Fields to be retrieved as a result. If the user passes \&quot;-\&quot; as the value for fields, it will retrieve all available fields for each catalog.
         * @param {Array<string>} [subFields] Fields to be retrieved as a result for [SUBSERVICES]. If the user passes \&quot;-\&quot; as the value for fields, it will retrieve all available fields for each catalog subservices.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        locateCatalog(id, fields, subFields, options) {
            return CatalogsApiFp(configuration)
                .locateCatalog(id, fields, subFields, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Update an existing catalog
         * @param {string} id ID of the catalog to be updated
         * @param {WebitelCasesInputCatalog} input Input data for updating the catalog
         * @param {Array<string>} [fields]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateCatalog(id, input, fields, options) {
            return CatalogsApiFp(configuration)
                .updateCatalog(id, input, fields, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Update an existing catalog
         * @param {string} id ID of the catalog to be updated
         * @param {WebitelCasesInputCatalog} input Input data for updating the catalog
         * @param {Array<string>} [fields]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateCatalog2(id, input, fields, options) {
            return CatalogsApiFp(configuration)
                .updateCatalog2(id, input, fields, options)
                .then((request) => request(axios, basePath));
        },
    };
};
/**
 * CatalogsApi - object-oriented interface
 * @export
 * @class CatalogsApi
 * @extends {BaseAPI}
 */
export class CatalogsApi extends BaseAPI {
    /**
     *
     * @summary Create a new catalog
     * @param {WebitelCasesInputCatalog} input
     * @param {Array<string>} [fields]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CatalogsApi
     */
    createCatalog(input, fields, options) {
        return CatalogsApiFp(this.configuration)
            .createCatalog(input, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Delete a catalog
     * @param {Array<string>} id ID of the catalog to be deleted
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CatalogsApi
     */
    deleteCatalog(id, options) {
        return CatalogsApiFp(this.configuration)
            .deleteCatalog(id, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Retrieve a list of catalogs or search catalogs
     * @param {number} [page] Page number for pagination
     * @param {number} [size] Number of records per page
     * @param {Array<string>} [fields] Fields to be retrieved as a result. If the user passes \&quot;-\&quot; as the value for fields, it will retrieve all available fields for each catalog.
     * @param {string} [sort] Sorting options by fields
     * @param {Array<string>} [id] List of IDs to filter the catalogs
     * @param {string} [query] Search query string for filtering by name. Supports: - Wildcards (*) for substring matching - Placeholder (?) for single character substitution - Exact match for full names
     * @param {boolean} [state] Filter by state (true for active, false for inactive)
     * @param {string} [depth] Filter by the depth of the hierarchy to retrieve services. The depth indicates how many ancestor levels of services will be included for each catalog. - A depth of 0 includes only the direct catalog. - A depth of 1 includes the catalog and its immediate services. - By default the depth is limited by 3,   meaning all nested services and sub-services will be included.
     * @param {Array<string>} [subFields] Fields to be retrieved as a result for [SUBSERVICES]. If the user passes \&quot;-\&quot; as the value for fields, it will retrieve all available fields for each catalog subservices.
     * @param {boolean} [hasSubservices] Filter catalogs with subservices
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CatalogsApi
     */
    listCatalogs(page, size, fields, sort, id, query, state, depth, subFields, hasSubservices, options) {
        return CatalogsApiFp(this.configuration)
            .listCatalogs(page, size, fields, sort, id, query, state, depth, subFields, hasSubservices, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Locate a catalog by ID
     * @param {string} id ID of the catalog to be located
     * @param {Array<string>} [fields] Fields to be retrieved as a result. If the user passes \&quot;-\&quot; as the value for fields, it will retrieve all available fields for each catalog.
     * @param {Array<string>} [subFields] Fields to be retrieved as a result for [SUBSERVICES]. If the user passes \&quot;-\&quot; as the value for fields, it will retrieve all available fields for each catalog subservices.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CatalogsApi
     */
    locateCatalog(id, fields, subFields, options) {
        return CatalogsApiFp(this.configuration)
            .locateCatalog(id, fields, subFields, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Update an existing catalog
     * @param {string} id ID of the catalog to be updated
     * @param {WebitelCasesInputCatalog} input Input data for updating the catalog
     * @param {Array<string>} [fields]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CatalogsApi
     */
    updateCatalog(id, input, fields, options) {
        return CatalogsApiFp(this.configuration)
            .updateCatalog(id, input, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Update an existing catalog
     * @param {string} id ID of the catalog to be updated
     * @param {WebitelCasesInputCatalog} input Input data for updating the catalog
     * @param {Array<string>} [fields]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CatalogsApi
     */
    updateCatalog2(id, input, fields, options) {
        return CatalogsApiFp(this.configuration)
            .updateCatalog2(id, input, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
}
//# sourceMappingURL=catalogs-api.js.map