// 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 { __awaiter } from "tslib";
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';
/**
 * ServicesApi - axios parameter creator
 * @export
 */
export const ServicesApiAxiosParamCreator = function (configuration) {
    return {
        /**
         *
         * @summary Create a new service within a catalog
         * @param {WebitelCasesInputCreateService} input
         * @param {Array<string>} [fields]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createService: (input, fields, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // 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 createService.');
            }
            const localVarPath = `/cases/services`;
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? yield configuration.apiKey('X-Webitel-Access')
                    : yield configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            localVarHeaderParameter['Content-Type'] = 'application/json';
            localVarUrlObj.query = Object.assign(Object.assign(Object.assign({}, 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 = Object.assign(Object.assign(Object.assign({}, 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 service
         * @param {Array<string>} id ID of the service to be deleted
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteService: (id, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // 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 deleteService.');
            }
            const localVarPath = `/cases/services/{id}`.replace(`{${'id'}}`, encodeURIComponent(String(id)));
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? yield configuration.apiKey('X-Webitel-Access')
                    : yield configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            localVarUrlObj.query = Object.assign(Object.assign(Object.assign({}, 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 = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        }),
        /**
         *
         * @summary Retrieve a list of services or search services within a catalog
         * @param {number} [page] Page number for pagination
         * @param {number} [size] Number of records per page
         * @param {string} [sort] Sorting options by fields
         * @param {Array<string>} [id] List of IDs to filter the services
         * @param {string} [q] Search query string for filtering by name. Supports: - Wildcards (*) for substring matching - Placeholder (?) for single character substitution - Exact match for full names
         * @param {string} [rootId] Filter services by catalog ID (required)
         * @param {boolean} [state] Filter by state (true for active, false for inactive)
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listServices: (page, size, sort, id, q, rootId, state, fields, options = {}) => __awaiter(this, void 0, void 0, function* () {
            const localVarPath = `/cases/services`;
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? yield configuration.apiKey('X-Webitel-Access')
                    : yield configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            if (page !== undefined) {
                localVarQueryParameter['page'] = page;
            }
            if (size !== undefined) {
                localVarQueryParameter['size'] = size;
            }
            if (sort !== undefined) {
                localVarQueryParameter['sort'] = sort;
            }
            if (id) {
                localVarQueryParameter['id'] = id;
            }
            if (q !== undefined) {
                localVarQueryParameter['q'] = q;
            }
            if (rootId !== undefined) {
                localVarQueryParameter['root_id'] = rootId;
            }
            if (state !== undefined) {
                localVarQueryParameter['state'] = state;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            localVarUrlObj.query = Object.assign(Object.assign(Object.assign({}, 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 = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        }),
        /**
         *
         * @summary Locate a service by ID
         * @param {string} id ID of the service to be located
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        locateService: (id, fields, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // 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 locateService.');
            }
            const localVarPath = `/cases/services/{id}`.replace(`{${'id'}}`, encodeURIComponent(String(id)));
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? yield configuration.apiKey('X-Webitel-Access')
                    : yield configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            localVarUrlObj.query = Object.assign(Object.assign(Object.assign({}, 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 = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        }),
        /**
         *
         * @summary Update an existing service
         * @param {string} id ID of the service to be updated
         * @param {WebitelCasesInputService} input Input data for updating the service
         * @param {Array<string>} [fields]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateService: (id, input, fields, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // 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 updateService.');
            }
            // 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 updateService.');
            }
            const localVarPath = `/cases/services/{id}`.replace(`{${'id'}}`, encodeURIComponent(String(id)));
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? yield configuration.apiKey('X-Webitel-Access')
                    : yield configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            localVarHeaderParameter['Content-Type'] = 'application/json';
            localVarUrlObj.query = Object.assign(Object.assign(Object.assign({}, 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 = Object.assign(Object.assign(Object.assign({}, 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 service
         * @param {string} id ID of the service to be updated
         * @param {WebitelCasesInputService} input Input data for updating the service
         * @param {Array<string>} [fields]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateService2: (id, input, fields, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // 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 updateService2.');
            }
            // 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 updateService2.');
            }
            const localVarPath = `/cases/services/{id}`.replace(`{${'id'}}`, encodeURIComponent(String(id)));
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? yield configuration.apiKey('X-Webitel-Access')
                    : yield configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            localVarHeaderParameter['Content-Type'] = 'application/json';
            localVarUrlObj.query = Object.assign(Object.assign(Object.assign({}, 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 = Object.assign(Object.assign(Object.assign({}, 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,
            };
        }),
    };
};
/**
 * ServicesApi - functional programming interface
 * @export
 */
export const ServicesApiFp = function (configuration) {
    return {
        /**
         *
         * @summary Create a new service within a catalog
         * @param {WebitelCasesInputCreateService} input
         * @param {Array<string>} [fields]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createService(input, fields, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield ServicesApiAxiosParamCreator(configuration).createService(input, fields, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @summary Delete a service
         * @param {Array<string>} id ID of the service to be deleted
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteService(id, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield ServicesApiAxiosParamCreator(configuration).deleteService(id, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @summary Retrieve a list of services or search services within a catalog
         * @param {number} [page] Page number for pagination
         * @param {number} [size] Number of records per page
         * @param {string} [sort] Sorting options by fields
         * @param {Array<string>} [id] List of IDs to filter the services
         * @param {string} [q] Search query string for filtering by name. Supports: - Wildcards (*) for substring matching - Placeholder (?) for single character substitution - Exact match for full names
         * @param {string} [rootId] Filter services by catalog ID (required)
         * @param {boolean} [state] Filter by state (true for active, false for inactive)
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listServices(page, size, sort, id, q, rootId, state, fields, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield ServicesApiAxiosParamCreator(configuration).listServices(page, size, sort, id, q, rootId, state, fields, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @summary Locate a service by ID
         * @param {string} id ID of the service to be located
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        locateService(id, fields, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield ServicesApiAxiosParamCreator(configuration).locateService(id, fields, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @summary Update an existing service
         * @param {string} id ID of the service to be updated
         * @param {WebitelCasesInputService} input Input data for updating the service
         * @param {Array<string>} [fields]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateService(id, input, fields, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield ServicesApiAxiosParamCreator(configuration).updateService(id, input, fields, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @summary Update an existing service
         * @param {string} id ID of the service to be updated
         * @param {WebitelCasesInputService} input Input data for updating the service
         * @param {Array<string>} [fields]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateService2(id, input, fields, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield ServicesApiAxiosParamCreator(configuration).updateService2(id, input, fields, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
    };
};
/**
 * ServicesApi - factory interface
 * @export
 */
export const ServicesApiFactory = function (configuration, basePath, axios) {
    return {
        /**
         *
         * @summary Create a new service within a catalog
         * @param {WebitelCasesInputCreateService} input
         * @param {Array<string>} [fields]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createService(input, fields, options) {
            return ServicesApiFp(configuration)
                .createService(input, fields, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Delete a service
         * @param {Array<string>} id ID of the service to be deleted
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteService(id, options) {
            return ServicesApiFp(configuration)
                .deleteService(id, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Retrieve a list of services or search services within a catalog
         * @param {number} [page] Page number for pagination
         * @param {number} [size] Number of records per page
         * @param {string} [sort] Sorting options by fields
         * @param {Array<string>} [id] List of IDs to filter the services
         * @param {string} [q] Search query string for filtering by name. Supports: - Wildcards (*) for substring matching - Placeholder (?) for single character substitution - Exact match for full names
         * @param {string} [rootId] Filter services by catalog ID (required)
         * @param {boolean} [state] Filter by state (true for active, false for inactive)
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listServices(page, size, sort, id, q, rootId, state, fields, options) {
            return ServicesApiFp(configuration)
                .listServices(page, size, sort, id, q, rootId, state, fields, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Locate a service by ID
         * @param {string} id ID of the service to be located
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        locateService(id, fields, options) {
            return ServicesApiFp(configuration)
                .locateService(id, fields, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Update an existing service
         * @param {string} id ID of the service to be updated
         * @param {WebitelCasesInputService} input Input data for updating the service
         * @param {Array<string>} [fields]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateService(id, input, fields, options) {
            return ServicesApiFp(configuration)
                .updateService(id, input, fields, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Update an existing service
         * @param {string} id ID of the service to be updated
         * @param {WebitelCasesInputService} input Input data for updating the service
         * @param {Array<string>} [fields]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateService2(id, input, fields, options) {
            return ServicesApiFp(configuration)
                .updateService2(id, input, fields, options)
                .then((request) => request(axios, basePath));
        },
    };
};
/**
 * ServicesApi - object-oriented interface
 * @export
 * @class ServicesApi
 * @extends {BaseAPI}
 */
export class ServicesApi extends BaseAPI {
    /**
     *
     * @summary Create a new service within a catalog
     * @param {WebitelCasesInputCreateService} input
     * @param {Array<string>} [fields]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ServicesApi
     */
    createService(input, fields, options) {
        return ServicesApiFp(this.configuration)
            .createService(input, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Delete a service
     * @param {Array<string>} id ID of the service to be deleted
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ServicesApi
     */
    deleteService(id, options) {
        return ServicesApiFp(this.configuration)
            .deleteService(id, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Retrieve a list of services or search services within a catalog
     * @param {number} [page] Page number for pagination
     * @param {number} [size] Number of records per page
     * @param {string} [sort] Sorting options by fields
     * @param {Array<string>} [id] List of IDs to filter the services
     * @param {string} [q] Search query string for filtering by name. Supports: - Wildcards (*) for substring matching - Placeholder (?) for single character substitution - Exact match for full names
     * @param {string} [rootId] Filter services by catalog ID (required)
     * @param {boolean} [state] Filter by state (true for active, false for inactive)
     * @param {Array<string>} [fields] Fields to be retrieved as a result.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ServicesApi
     */
    listServices(page, size, sort, id, q, rootId, state, fields, options) {
        return ServicesApiFp(this.configuration)
            .listServices(page, size, sort, id, q, rootId, state, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Locate a service by ID
     * @param {string} id ID of the service to be located
     * @param {Array<string>} [fields] Fields to be retrieved as a result.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ServicesApi
     */
    locateService(id, fields, options) {
        return ServicesApiFp(this.configuration)
            .locateService(id, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Update an existing service
     * @param {string} id ID of the service to be updated
     * @param {WebitelCasesInputService} input Input data for updating the service
     * @param {Array<string>} [fields]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ServicesApi
     */
    updateService(id, input, fields, options) {
        return ServicesApiFp(this.configuration)
            .updateService(id, input, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Update an existing service
     * @param {string} id ID of the service to be updated
     * @param {WebitelCasesInputService} input Input data for updating the service
     * @param {Array<string>} [fields]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ServicesApi
     */
    updateService2(id, input, fields, options) {
        return ServicesApiFp(this.configuration)
            .updateService2(id, input, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
}
//# sourceMappingURL=services-api.js.map