// 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';
/**
 * SkillServiceApi - axios parameter creator
 * @export
 */
export const SkillServiceApiAxiosParamCreator = function (configuration) {
    return {
        /**
         *
         * @summary Create Skill
         * @param {EngineCreateSkillRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createSkill: async (body, options = {}) => {
            // verify required parameter 'body' is not null or undefined
            if (body === null || body === undefined) {
                throw new RequiredError('body', 'Required parameter body was null or undefined when calling createSkill.');
            }
            const localVarPath = `/call_center/skills`;
            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;
            }
            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 body !== 'string' ||
                localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data = needsSerialization
                ? JSON.stringify(body !== undefined ? body : {})
                : body || '';
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @param {string} skillId
         * @param {EngineSkillServiceCreateSkillAgentBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createSkillAgent: async (skillId, body, options = {}) => {
            // verify required parameter 'skillId' is not null or undefined
            if (skillId === null || skillId === undefined) {
                throw new RequiredError('skillId', 'Required parameter skillId was null or undefined when calling createSkillAgent.');
            }
            // verify required parameter 'body' is not null or undefined
            if (body === null || body === undefined) {
                throw new RequiredError('body', 'Required parameter body was null or undefined when calling createSkillAgent.');
            }
            const localVarPath = `/call_center/skills/{skill_id}/agents`.replace(`{${'skill_id'}}`, encodeURIComponent(String(skillId)));
            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;
            }
            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 body !== 'string' ||
                localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data = needsSerialization
                ? JSON.stringify(body !== undefined ? body : {})
                : body || '';
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary Remove Skill
         * @param {string} id
         * @param {string} [domainId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteSkill: async (id, domainId, 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 deleteSkill.');
            }
            const localVarPath = `/call_center/skills/{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;
            }
            if (domainId !== undefined) {
                localVarQueryParameter['domain_id'] = domainId;
            }
            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,
            };
        },
        /**
         *
         * @param {string} skillId
         * @param {EngineSkillServiceDeleteSkillAgentBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteSkillAgent: async (skillId, body, options = {}) => {
            // verify required parameter 'skillId' is not null or undefined
            if (skillId === null || skillId === undefined) {
                throw new RequiredError('skillId', 'Required parameter skillId was null or undefined when calling deleteSkillAgent.');
            }
            // verify required parameter 'body' is not null or undefined
            if (body === null || body === undefined) {
                throw new RequiredError('body', 'Required parameter body was null or undefined when calling deleteSkillAgent.');
            }
            const localVarPath = `/call_center/skills/{skill_id}/agents`.replace(`{${'skill_id'}}`, encodeURIComponent(String(skillId)));
            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;
            }
            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 body !== 'string' ||
                localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data = needsSerialization
                ? JSON.stringify(body !== undefined ? body : {})
                : body || '';
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @param {string} skillId
         * @param {EngineSkillServicePatchSkillAgentBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        patchSkillAgent: async (skillId, body, options = {}) => {
            // verify required parameter 'skillId' is not null or undefined
            if (skillId === null || skillId === undefined) {
                throw new RequiredError('skillId', 'Required parameter skillId was null or undefined when calling patchSkillAgent.');
            }
            // verify required parameter 'body' is not null or undefined
            if (body === null || body === undefined) {
                throw new RequiredError('body', 'Required parameter body was null or undefined when calling patchSkillAgent.');
            }
            const localVarPath = `/call_center/skills/{skill_id}/agents`.replace(`{${'skill_id'}}`, encodeURIComponent(String(skillId)));
            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;
            }
            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 body !== 'string' ||
                localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data = needsSerialization
                ? JSON.stringify(body !== undefined ? body : {})
                : body || '';
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary Skill item
         * @param {string} id
         * @param {string} [domainId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        readSkill: async (id, domainId, 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 readSkill.');
            }
            const localVarPath = `/call_center/skills/{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 (domainId !== undefined) {
                localVarQueryParameter['domain_id'] = domainId;
            }
            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 List of Skill
         * @param {number} [page]
         * @param {number} [size]
         * @param {string} [q]
         * @param {string} [sort]
         * @param {Array<string>} [fields]
         * @param {Array<number>} [id]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchSkill: async (page, size, q, sort, fields, id, options = {}) => {
            const localVarPath = `/call_center/skills`;
            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 (sort !== undefined) {
                localVarQueryParameter['sort'] = sort;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            if (id) {
                localVarQueryParameter['id'] = id;
            }
            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 For agents SearchSkillAgent
         * @param {string} skillId
         * @param {number} [page]
         * @param {number} [size]
         * @param {string} [q]
         * @param {string} [sort]
         * @param {Array<string>} [fields]
         * @param {Array<string>} [id]
         * @param {Array<string>} [agentId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchSkillAgent: async (skillId, page, size, q, sort, fields, id, agentId, options = {}) => {
            // verify required parameter 'skillId' is not null or undefined
            if (skillId === null || skillId === undefined) {
                throw new RequiredError('skillId', 'Required parameter skillId was null or undefined when calling searchSkillAgent.');
            }
            const localVarPath = `/call_center/skills/{skill_id}/agents`.replace(`{${'skill_id'}}`, encodeURIComponent(String(skillId)));
            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 (sort !== undefined) {
                localVarQueryParameter['sort'] = sort;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            if (id) {
                localVarQueryParameter['id'] = id;
            }
            if (agentId) {
                localVarQueryParameter['agent_id'] = agentId;
            }
            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 Skill
         * @param {string} id
         * @param {EngineSkillServiceUpdateSkillBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateSkill: async (id, body, 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 updateSkill.');
            }
            // verify required parameter 'body' is not null or undefined
            if (body === null || body === undefined) {
                throw new RequiredError('body', 'Required parameter body was null or undefined when calling updateSkill.');
            }
            const localVarPath = `/call_center/skills/{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;
            }
            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 body !== 'string' ||
                localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data = needsSerialization
                ? JSON.stringify(body !== undefined ? body : {})
                : body || '';
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
    };
};
/**
 * SkillServiceApi - functional programming interface
 * @export
 */
export const SkillServiceApiFp = function (configuration) {
    return {
        /**
         *
         * @summary Create Skill
         * @param {EngineCreateSkillRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createSkill(body, options) {
            const localVarAxiosArgs = await SkillServiceApiAxiosParamCreator(configuration).createSkill(body, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @param {string} skillId
         * @param {EngineSkillServiceCreateSkillAgentBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createSkillAgent(skillId, body, options) {
            const localVarAxiosArgs = await SkillServiceApiAxiosParamCreator(configuration).createSkillAgent(skillId, body, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary Remove Skill
         * @param {string} id
         * @param {string} [domainId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteSkill(id, domainId, options) {
            const localVarAxiosArgs = await SkillServiceApiAxiosParamCreator(configuration).deleteSkill(id, domainId, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @param {string} skillId
         * @param {EngineSkillServiceDeleteSkillAgentBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteSkillAgent(skillId, body, options) {
            const localVarAxiosArgs = await SkillServiceApiAxiosParamCreator(configuration).deleteSkillAgent(skillId, body, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @param {string} skillId
         * @param {EngineSkillServicePatchSkillAgentBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async patchSkillAgent(skillId, body, options) {
            const localVarAxiosArgs = await SkillServiceApiAxiosParamCreator(configuration).patchSkillAgent(skillId, body, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary Skill item
         * @param {string} id
         * @param {string} [domainId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async readSkill(id, domainId, options) {
            const localVarAxiosArgs = await SkillServiceApiAxiosParamCreator(configuration).readSkill(id, domainId, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary List of Skill
         * @param {number} [page]
         * @param {number} [size]
         * @param {string} [q]
         * @param {string} [sort]
         * @param {Array<string>} [fields]
         * @param {Array<number>} [id]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async searchSkill(page, size, q, sort, fields, id, options) {
            const localVarAxiosArgs = await SkillServiceApiAxiosParamCreator(configuration).searchSkill(page, size, q, sort, fields, id, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary For agents SearchSkillAgent
         * @param {string} skillId
         * @param {number} [page]
         * @param {number} [size]
         * @param {string} [q]
         * @param {string} [sort]
         * @param {Array<string>} [fields]
         * @param {Array<string>} [id]
         * @param {Array<string>} [agentId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async searchSkillAgent(skillId, page, size, q, sort, fields, id, agentId, options) {
            const localVarAxiosArgs = await SkillServiceApiAxiosParamCreator(configuration).searchSkillAgent(skillId, page, size, q, sort, fields, id, agentId, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary Update Skill
         * @param {string} id
         * @param {EngineSkillServiceUpdateSkillBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async updateSkill(id, body, options) {
            const localVarAxiosArgs = await SkillServiceApiAxiosParamCreator(configuration).updateSkill(id, body, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
    };
};
/**
 * SkillServiceApi - factory interface
 * @export
 */
export const SkillServiceApiFactory = function (configuration, basePath, axios) {
    return {
        /**
         *
         * @summary Create Skill
         * @param {EngineCreateSkillRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createSkill(body, options) {
            return SkillServiceApiFp(configuration)
                .createSkill(body, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {string} skillId
         * @param {EngineSkillServiceCreateSkillAgentBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createSkillAgent(skillId, body, options) {
            return SkillServiceApiFp(configuration)
                .createSkillAgent(skillId, body, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Remove Skill
         * @param {string} id
         * @param {string} [domainId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteSkill(id, domainId, options) {
            return SkillServiceApiFp(configuration)
                .deleteSkill(id, domainId, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {string} skillId
         * @param {EngineSkillServiceDeleteSkillAgentBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteSkillAgent(skillId, body, options) {
            return SkillServiceApiFp(configuration)
                .deleteSkillAgent(skillId, body, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {string} skillId
         * @param {EngineSkillServicePatchSkillAgentBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        patchSkillAgent(skillId, body, options) {
            return SkillServiceApiFp(configuration)
                .patchSkillAgent(skillId, body, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Skill item
         * @param {string} id
         * @param {string} [domainId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        readSkill(id, domainId, options) {
            return SkillServiceApiFp(configuration)
                .readSkill(id, domainId, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary List of Skill
         * @param {number} [page]
         * @param {number} [size]
         * @param {string} [q]
         * @param {string} [sort]
         * @param {Array<string>} [fields]
         * @param {Array<number>} [id]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchSkill(page, size, q, sort, fields, id, options) {
            return SkillServiceApiFp(configuration)
                .searchSkill(page, size, q, sort, fields, id, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary For agents SearchSkillAgent
         * @param {string} skillId
         * @param {number} [page]
         * @param {number} [size]
         * @param {string} [q]
         * @param {string} [sort]
         * @param {Array<string>} [fields]
         * @param {Array<string>} [id]
         * @param {Array<string>} [agentId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchSkillAgent(skillId, page, size, q, sort, fields, id, agentId, options) {
            return SkillServiceApiFp(configuration)
                .searchSkillAgent(skillId, page, size, q, sort, fields, id, agentId, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Update Skill
         * @param {string} id
         * @param {EngineSkillServiceUpdateSkillBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateSkill(id, body, options) {
            return SkillServiceApiFp(configuration)
                .updateSkill(id, body, options)
                .then((request) => request(axios, basePath));
        },
    };
};
/**
 * SkillServiceApi - object-oriented interface
 * @export
 * @class SkillServiceApi
 * @extends {BaseAPI}
 */
export class SkillServiceApi extends BaseAPI {
    /**
     *
     * @summary Create Skill
     * @param {EngineCreateSkillRequest} body
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof SkillServiceApi
     */
    createSkill(body, options) {
        return SkillServiceApiFp(this.configuration)
            .createSkill(body, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {string} skillId
     * @param {EngineSkillServiceCreateSkillAgentBody} body
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof SkillServiceApi
     */
    createSkillAgent(skillId, body, options) {
        return SkillServiceApiFp(this.configuration)
            .createSkillAgent(skillId, body, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Remove Skill
     * @param {string} id
     * @param {string} [domainId]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof SkillServiceApi
     */
    deleteSkill(id, domainId, options) {
        return SkillServiceApiFp(this.configuration)
            .deleteSkill(id, domainId, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {string} skillId
     * @param {EngineSkillServiceDeleteSkillAgentBody} body
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof SkillServiceApi
     */
    deleteSkillAgent(skillId, body, options) {
        return SkillServiceApiFp(this.configuration)
            .deleteSkillAgent(skillId, body, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {string} skillId
     * @param {EngineSkillServicePatchSkillAgentBody} body
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof SkillServiceApi
     */
    patchSkillAgent(skillId, body, options) {
        return SkillServiceApiFp(this.configuration)
            .patchSkillAgent(skillId, body, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Skill item
     * @param {string} id
     * @param {string} [domainId]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof SkillServiceApi
     */
    readSkill(id, domainId, options) {
        return SkillServiceApiFp(this.configuration)
            .readSkill(id, domainId, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary List of Skill
     * @param {number} [page]
     * @param {number} [size]
     * @param {string} [q]
     * @param {string} [sort]
     * @param {Array<string>} [fields]
     * @param {Array<number>} [id]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof SkillServiceApi
     */
    searchSkill(page, size, q, sort, fields, id, options) {
        return SkillServiceApiFp(this.configuration)
            .searchSkill(page, size, q, sort, fields, id, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary For agents SearchSkillAgent
     * @param {string} skillId
     * @param {number} [page]
     * @param {number} [size]
     * @param {string} [q]
     * @param {string} [sort]
     * @param {Array<string>} [fields]
     * @param {Array<string>} [id]
     * @param {Array<string>} [agentId]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof SkillServiceApi
     */
    searchSkillAgent(skillId, page, size, q, sort, fields, id, agentId, options) {
        return SkillServiceApiFp(this.configuration)
            .searchSkillAgent(skillId, page, size, q, sort, fields, id, agentId, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Update Skill
     * @param {string} id
     * @param {EngineSkillServiceUpdateSkillBody} body
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof SkillServiceApi
     */
    updateSkill(id, body, options) {
        return SkillServiceApiFp(this.configuration)
            .updateSkill(id, body, options)
            .then((request) => request(this.axios, this.basePath));
    }
}
//# sourceMappingURL=skill-service-api.js.map