// 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';
/**
 * AgentSkillServiceApi - axios parameter creator
 * @export
 */
export const AgentSkillServiceApiAxiosParamCreator = function (configuration) {
    return {
        /**
         *
         * @summary Create AgentSkill
         * @param {string} agentId
         * @param {EngineAgentSkillServiceCreateAgentSkillBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createAgentSkill: (agentId, body, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'agentId' is not null or undefined
            if (agentId === null || agentId === undefined) {
                throw new RequiredError('agentId', 'Required parameter agentId was null or undefined when calling createAgentSkill.');
            }
            // 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 createAgentSkill.');
            }
            const localVarPath = `/call_center/agents/{agent_id}/skills`.replace(`{${'agent_id'}}`, encodeURIComponent(String(agentId)));
            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;
            }
            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 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} agentId
         * @param {EngineAgentSkillServiceCreateAgentSkillsBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createAgentSkills: (agentId, body, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'agentId' is not null or undefined
            if (agentId === null || agentId === undefined) {
                throw new RequiredError('agentId', 'Required parameter agentId was null or undefined when calling createAgentSkills.');
            }
            // 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 createAgentSkills.');
            }
            const localVarPath = `/call_center/agents/{agent_id}/skills/bulk`.replace(`{${'agent_id'}}`, encodeURIComponent(String(agentId)));
            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;
            }
            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 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 AgentSkill
         * @param {string} agentId
         * @param {string} id
         * @param {string} [domainId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteAgentSkill: (agentId, id, domainId, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'agentId' is not null or undefined
            if (agentId === null || agentId === undefined) {
                throw new RequiredError('agentId', 'Required parameter agentId was null or undefined when calling deleteAgentSkill.');
            }
            // 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 deleteAgentSkill.');
            }
            const localVarPath = `/call_center/agents/{agent_id}/skills/{id}`
                .replace(`{${'agent_id'}}`, encodeURIComponent(String(agentId)))
                .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;
            }
            if (domainId !== undefined) {
                localVarQueryParameter['domain_id'] = domainId;
            }
            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,
            };
        }),
        /**
         *
         * @param {string} agentId
         * @param {Array<string>} [id]
         * @param {Array<string>} [skillId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteAgentSkills: (agentId, id, skillId, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'agentId' is not null or undefined
            if (agentId === null || agentId === undefined) {
                throw new RequiredError('agentId', 'Required parameter agentId was null or undefined when calling deleteAgentSkills.');
            }
            const localVarPath = `/call_center/agents/{agent_id}/skills`.replace(`{${'agent_id'}}`, encodeURIComponent(String(agentId)));
            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;
            }
            if (id) {
                localVarQueryParameter['id'] = id;
            }
            if (skillId) {
                localVarQueryParameter['skill_id'] = skillId;
            }
            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,
            };
        }),
        /**
         *
         * @param {string} agentId
         * @param {string} id
         * @param {EngineAgentSkillServicePatchAgentSkillBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        patchAgentSkill: (agentId, id, body, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'agentId' is not null or undefined
            if (agentId === null || agentId === undefined) {
                throw new RequiredError('agentId', 'Required parameter agentId was null or undefined when calling patchAgentSkill.');
            }
            // 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 patchAgentSkill.');
            }
            // 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 patchAgentSkill.');
            }
            const localVarPath = `/call_center/agents/{agent_id}/skills/{id}`
                .replace(`{${'agent_id'}}`, encodeURIComponent(String(agentId)))
                .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;
            }
            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 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} agentId
         * @param {EngineAgentSkillServicePatchAgentSkillsBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        patchAgentSkills: (agentId, body, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'agentId' is not null or undefined
            if (agentId === null || agentId === undefined) {
                throw new RequiredError('agentId', 'Required parameter agentId was null or undefined when calling patchAgentSkills.');
            }
            // 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 patchAgentSkills.');
            }
            const localVarPath = `/call_center/agents/{agent_id}/skills`.replace(`{${'agent_id'}}`, encodeURIComponent(String(agentId)));
            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;
            }
            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 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 AgentSkill item
         * @param {string} agentId
         * @param {string} id
         * @param {string} [domainId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        readAgentSkill: (agentId, id, domainId, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'agentId' is not null or undefined
            if (agentId === null || agentId === undefined) {
                throw new RequiredError('agentId', 'Required parameter agentId was null or undefined when calling readAgentSkill.');
            }
            // 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 readAgentSkill.');
            }
            const localVarPath = `/call_center/agents/{agent_id}/skills/{id}`
                .replace(`{${'agent_id'}}`, encodeURIComponent(String(agentId)))
                .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 (domainId !== undefined) {
                localVarQueryParameter['domain_id'] = domainId;
            }
            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 List of AgentSkill
         * @param {string} agentId
         * @param {number} [page]
         * @param {number} [size]
         * @param {string} [q]
         * @param {string} [sort]
         * @param {Array<string>} [fields]
         * @param {Array<string>} [id]
         * @param {Array<string>} [skillId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchAgentSkill: (agentId, page, size, q, sort, fields, id, skillId, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'agentId' is not null or undefined
            if (agentId === null || agentId === undefined) {
                throw new RequiredError('agentId', 'Required parameter agentId was null or undefined when calling searchAgentSkill.');
            }
            const localVarPath = `/call_center/agents/{agent_id}/skills`.replace(`{${'agent_id'}}`, encodeURIComponent(String(agentId)));
            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 (q !== undefined) {
                localVarQueryParameter['q'] = q;
            }
            if (sort !== undefined) {
                localVarQueryParameter['sort'] = sort;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            if (id) {
                localVarQueryParameter['id'] = id;
            }
            if (skillId) {
                localVarQueryParameter['skill_id'] = skillId;
            }
            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 SearchLookupAgentNotExistsSkill
         * @param {string} agentId
         * @param {number} [page]
         * @param {number} [size]
         * @param {string} [q]
         * @param {string} [domainId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchLookupAgentNotExistsSkill: (agentId, page, size, q, domainId, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'agentId' is not null or undefined
            if (agentId === null || agentId === undefined) {
                throw new RequiredError('agentId', 'Required parameter agentId was null or undefined when calling searchLookupAgentNotExistsSkill.');
            }
            const localVarPath = `/call_center/lookups/agents/skills/{agent_id}`.replace(`{${'agent_id'}}`, encodeURIComponent(String(agentId)));
            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 (q !== undefined) {
                localVarQueryParameter['q'] = q;
            }
            if (domainId !== undefined) {
                localVarQueryParameter['domain_id'] = domainId;
            }
            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 AgentSkill
         * @param {string} agentId
         * @param {string} id
         * @param {EngineAgentSkillServiceUpdateAgentSkillBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateAgentSkill: (agentId, id, body, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'agentId' is not null or undefined
            if (agentId === null || agentId === undefined) {
                throw new RequiredError('agentId', 'Required parameter agentId was null or undefined when calling updateAgentSkill.');
            }
            // 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 updateAgentSkill.');
            }
            // 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 updateAgentSkill.');
            }
            const localVarPath = `/call_center/agents/{agent_id}/skills/{id}`
                .replace(`{${'agent_id'}}`, encodeURIComponent(String(agentId)))
                .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;
            }
            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 body !== 'string' ||
                localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data = needsSerialization
                ? JSON.stringify(body !== undefined ? body : {})
                : body || '';
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        }),
    };
};
/**
 * AgentSkillServiceApi - functional programming interface
 * @export
 */
export const AgentSkillServiceApiFp = function (configuration) {
    return {
        /**
         *
         * @summary Create AgentSkill
         * @param {string} agentId
         * @param {EngineAgentSkillServiceCreateAgentSkillBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createAgentSkill(agentId, body, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield AgentSkillServiceApiAxiosParamCreator(configuration).createAgentSkill(agentId, body, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @param {string} agentId
         * @param {EngineAgentSkillServiceCreateAgentSkillsBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createAgentSkills(agentId, body, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield AgentSkillServiceApiAxiosParamCreator(configuration).createAgentSkills(agentId, body, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @summary Remove AgentSkill
         * @param {string} agentId
         * @param {string} id
         * @param {string} [domainId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteAgentSkill(agentId, id, domainId, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield AgentSkillServiceApiAxiosParamCreator(configuration).deleteAgentSkill(agentId, id, domainId, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @param {string} agentId
         * @param {Array<string>} [id]
         * @param {Array<string>} [skillId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteAgentSkills(agentId, id, skillId, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield AgentSkillServiceApiAxiosParamCreator(configuration).deleteAgentSkills(agentId, id, skillId, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @param {string} agentId
         * @param {string} id
         * @param {EngineAgentSkillServicePatchAgentSkillBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        patchAgentSkill(agentId, id, body, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield AgentSkillServiceApiAxiosParamCreator(configuration).patchAgentSkill(agentId, id, body, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @param {string} agentId
         * @param {EngineAgentSkillServicePatchAgentSkillsBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        patchAgentSkills(agentId, body, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield AgentSkillServiceApiAxiosParamCreator(configuration).patchAgentSkills(agentId, body, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @summary AgentSkill item
         * @param {string} agentId
         * @param {string} id
         * @param {string} [domainId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        readAgentSkill(agentId, id, domainId, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield AgentSkillServiceApiAxiosParamCreator(configuration).readAgentSkill(agentId, id, domainId, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @summary List of AgentSkill
         * @param {string} agentId
         * @param {number} [page]
         * @param {number} [size]
         * @param {string} [q]
         * @param {string} [sort]
         * @param {Array<string>} [fields]
         * @param {Array<string>} [id]
         * @param {Array<string>} [skillId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchAgentSkill(agentId, page, size, q, sort, fields, id, skillId, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield AgentSkillServiceApiAxiosParamCreator(configuration).searchAgentSkill(agentId, page, size, q, sort, fields, id, skillId, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @summary SearchLookupAgentNotExistsSkill
         * @param {string} agentId
         * @param {number} [page]
         * @param {number} [size]
         * @param {string} [q]
         * @param {string} [domainId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchLookupAgentNotExistsSkill(agentId, page, size, q, domainId, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield AgentSkillServiceApiAxiosParamCreator(configuration).searchLookupAgentNotExistsSkill(agentId, page, size, q, domainId, 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 AgentSkill
         * @param {string} agentId
         * @param {string} id
         * @param {EngineAgentSkillServiceUpdateAgentSkillBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateAgentSkill(agentId, id, body, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield AgentSkillServiceApiAxiosParamCreator(configuration).updateAgentSkill(agentId, id, body, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
    };
};
/**
 * AgentSkillServiceApi - factory interface
 * @export
 */
export const AgentSkillServiceApiFactory = function (configuration, basePath, axios) {
    return {
        /**
         *
         * @summary Create AgentSkill
         * @param {string} agentId
         * @param {EngineAgentSkillServiceCreateAgentSkillBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createAgentSkill(agentId, body, options) {
            return AgentSkillServiceApiFp(configuration)
                .createAgentSkill(agentId, body, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {string} agentId
         * @param {EngineAgentSkillServiceCreateAgentSkillsBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createAgentSkills(agentId, body, options) {
            return AgentSkillServiceApiFp(configuration)
                .createAgentSkills(agentId, body, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Remove AgentSkill
         * @param {string} agentId
         * @param {string} id
         * @param {string} [domainId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteAgentSkill(agentId, id, domainId, options) {
            return AgentSkillServiceApiFp(configuration)
                .deleteAgentSkill(agentId, id, domainId, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {string} agentId
         * @param {Array<string>} [id]
         * @param {Array<string>} [skillId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteAgentSkills(agentId, id, skillId, options) {
            return AgentSkillServiceApiFp(configuration)
                .deleteAgentSkills(agentId, id, skillId, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {string} agentId
         * @param {string} id
         * @param {EngineAgentSkillServicePatchAgentSkillBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        patchAgentSkill(agentId, id, body, options) {
            return AgentSkillServiceApiFp(configuration)
                .patchAgentSkill(agentId, id, body, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {string} agentId
         * @param {EngineAgentSkillServicePatchAgentSkillsBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        patchAgentSkills(agentId, body, options) {
            return AgentSkillServiceApiFp(configuration)
                .patchAgentSkills(agentId, body, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary AgentSkill item
         * @param {string} agentId
         * @param {string} id
         * @param {string} [domainId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        readAgentSkill(agentId, id, domainId, options) {
            return AgentSkillServiceApiFp(configuration)
                .readAgentSkill(agentId, id, domainId, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary List of AgentSkill
         * @param {string} agentId
         * @param {number} [page]
         * @param {number} [size]
         * @param {string} [q]
         * @param {string} [sort]
         * @param {Array<string>} [fields]
         * @param {Array<string>} [id]
         * @param {Array<string>} [skillId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchAgentSkill(agentId, page, size, q, sort, fields, id, skillId, options) {
            return AgentSkillServiceApiFp(configuration)
                .searchAgentSkill(agentId, page, size, q, sort, fields, id, skillId, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary SearchLookupAgentNotExistsSkill
         * @param {string} agentId
         * @param {number} [page]
         * @param {number} [size]
         * @param {string} [q]
         * @param {string} [domainId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchLookupAgentNotExistsSkill(agentId, page, size, q, domainId, options) {
            return AgentSkillServiceApiFp(configuration)
                .searchLookupAgentNotExistsSkill(agentId, page, size, q, domainId, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Update AgentSkill
         * @param {string} agentId
         * @param {string} id
         * @param {EngineAgentSkillServiceUpdateAgentSkillBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateAgentSkill(agentId, id, body, options) {
            return AgentSkillServiceApiFp(configuration)
                .updateAgentSkill(agentId, id, body, options)
                .then((request) => request(axios, basePath));
        },
    };
};
/**
 * AgentSkillServiceApi - object-oriented interface
 * @export
 * @class AgentSkillServiceApi
 * @extends {BaseAPI}
 */
export class AgentSkillServiceApi extends BaseAPI {
    /**
     *
     * @summary Create AgentSkill
     * @param {string} agentId
     * @param {EngineAgentSkillServiceCreateAgentSkillBody} body
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AgentSkillServiceApi
     */
    createAgentSkill(agentId, body, options) {
        return AgentSkillServiceApiFp(this.configuration)
            .createAgentSkill(agentId, body, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {string} agentId
     * @param {EngineAgentSkillServiceCreateAgentSkillsBody} body
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AgentSkillServiceApi
     */
    createAgentSkills(agentId, body, options) {
        return AgentSkillServiceApiFp(this.configuration)
            .createAgentSkills(agentId, body, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Remove AgentSkill
     * @param {string} agentId
     * @param {string} id
     * @param {string} [domainId]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AgentSkillServiceApi
     */
    deleteAgentSkill(agentId, id, domainId, options) {
        return AgentSkillServiceApiFp(this.configuration)
            .deleteAgentSkill(agentId, id, domainId, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {string} agentId
     * @param {Array<string>} [id]
     * @param {Array<string>} [skillId]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AgentSkillServiceApi
     */
    deleteAgentSkills(agentId, id, skillId, options) {
        return AgentSkillServiceApiFp(this.configuration)
            .deleteAgentSkills(agentId, id, skillId, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {string} agentId
     * @param {string} id
     * @param {EngineAgentSkillServicePatchAgentSkillBody} body
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AgentSkillServiceApi
     */
    patchAgentSkill(agentId, id, body, options) {
        return AgentSkillServiceApiFp(this.configuration)
            .patchAgentSkill(agentId, id, body, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {string} agentId
     * @param {EngineAgentSkillServicePatchAgentSkillsBody} body
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AgentSkillServiceApi
     */
    patchAgentSkills(agentId, body, options) {
        return AgentSkillServiceApiFp(this.configuration)
            .patchAgentSkills(agentId, body, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary AgentSkill item
     * @param {string} agentId
     * @param {string} id
     * @param {string} [domainId]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AgentSkillServiceApi
     */
    readAgentSkill(agentId, id, domainId, options) {
        return AgentSkillServiceApiFp(this.configuration)
            .readAgentSkill(agentId, id, domainId, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary List of AgentSkill
     * @param {string} agentId
     * @param {number} [page]
     * @param {number} [size]
     * @param {string} [q]
     * @param {string} [sort]
     * @param {Array<string>} [fields]
     * @param {Array<string>} [id]
     * @param {Array<string>} [skillId]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AgentSkillServiceApi
     */
    searchAgentSkill(agentId, page, size, q, sort, fields, id, skillId, options) {
        return AgentSkillServiceApiFp(this.configuration)
            .searchAgentSkill(agentId, page, size, q, sort, fields, id, skillId, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary SearchLookupAgentNotExistsSkill
     * @param {string} agentId
     * @param {number} [page]
     * @param {number} [size]
     * @param {string} [q]
     * @param {string} [domainId]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AgentSkillServiceApi
     */
    searchLookupAgentNotExistsSkill(agentId, page, size, q, domainId, options) {
        return AgentSkillServiceApiFp(this.configuration)
            .searchLookupAgentNotExistsSkill(agentId, page, size, q, domainId, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Update AgentSkill
     * @param {string} agentId
     * @param {string} id
     * @param {EngineAgentSkillServiceUpdateAgentSkillBody} body
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AgentSkillServiceApi
     */
    updateAgentSkill(agentId, id, body, options) {
        return AgentSkillServiceApiFp(this.configuration)
            .updateAgentSkill(agentId, id, body, options)
            .then((request) => request(this.axios, this.basePath));
    }
}
//# sourceMappingURL=agent-skill-service-api.js.map