Source
const localVarAxiosArgs = await QueueSkillServiceApiAxiosParamCreator(configuration).searchQueueSkill(queueId, page, size, q, sort, fields, id, skillId, bucketId, lvl, minCapacity, maxCapacity, enabled, options);
// tslint:disable
/**
* Webitel engine API
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 22.05.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';
/**
* QueueSkillServiceApi - axios parameter creator
* @export
*/
export const QueueSkillServiceApiAxiosParamCreator = function (configuration) {
return {
/**
*
* @param {number} queueId
* @param {EngineCreateQueueSkillRequest} body
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
createQueueSkill: async (queueId, body, options = {}) => {
// verify required parameter 'queueId' is not null or undefined
if (queueId === null || queueId === undefined) {
throw new RequiredError('queueId', 'Required parameter queueId was null or undefined when calling createQueueSkill.');
}
// 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 createQueueSkill.');
}
const localVarPath = `/call_center/queues/{queue_id}/skills`.replace(`{${'queue_id'}}`, encodeURIComponent(String(queueId)));
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 {number} queueId
* @param {number} id
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteQueueSkill: async (queueId, id, options = {}) => {