// 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';
/**
 * QueueServiceApi - axios parameter creator
 * @export
 */
export const QueueServiceApiAxiosParamCreator = function (configuration) {
    return {
        /**
         *
         * @summary Create Queue
         * @param {EngineCreateQueueRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createQueue: 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 createQueue.');
            }
            const localVarPath = `/call_center/queues`;
            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 Queue
         * @param {string} id
         * @param {string} [domainId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteQueue: 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 deleteQueue.');
            }
            const localVarPath = `/call_center/queues/{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,
            };
        },
        /**
         *
         * @summary Patch Queue
         * @param {string} id
         * @param {EngineQueueServicePatchQueueBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        patchQueue: 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 patchQueue.');
            }
            // 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 patchQueue.');
            }
            const localVarPath = `/call_center/queues/{id}`.replace(`{${'id'}}`, encodeURIComponent(String(id)));
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = {
                method: 'PATCH',
                ...baseOptions,
                ...options,
            };
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? await configuration.apiKey('X-Webitel-Access')
                    : await configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            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 Queue item
         * @param {string} id
         * @param {string} [domainId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        readQueue: 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 readQueue.');
            }
            const localVarPath = `/call_center/queues/{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 Queue
         * @param {number} [page]
         * @param {number} [size]
         * @param {string} [q]
         * @param {string} [sort]
         * @param {Array<string>} [fields]
         * @param {Array<string>} [id]
         * @param {Array<number>} [type]
         * @param {Array<number>} [teamId]
         * @param {Array<string>} [tags]
         * @param {boolean} [enabled]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchQueue: async (page, size, q, sort, fields, id, type, teamId, tags, enabled, options = {}) => {
            const localVarPath = `/call_center/queues`;
            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 (type) {
                localVarQueryParameter['type'] = type;
            }
            if (teamId) {
                localVarQueryParameter['team_id'] = teamId;
            }
            if (tags) {
                localVarQueryParameter['tags'] = tags;
            }
            if (enabled !== undefined) {
                localVarQueryParameter['enabled'] = enabled;
            }
            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 {number} [page]
         * @param {number} [size]
         * @param {string} [joinedAtFrom]
         * @param {string} [joinedAtTo]
         * @param {string} [domainId]
         * @param {Array<string>} [fields]
         * @param {string} [sort]
         * @param {string} [q]
         * @param {Array<number>} [queueId]
         * @param {Array<number>} [teamId]
         * @param {Array<number>} [type]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchQueueReportGeneral: async (page, size, joinedAtFrom, joinedAtTo, domainId, fields, sort, q, queueId, teamId, type, options = {}) => {
            const localVarPath = `/call_center/queues/reports/general`;
            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 (joinedAtFrom !== undefined) {
                localVarQueryParameter['joined_at.from'] = joinedAtFrom;
            }
            if (joinedAtTo !== undefined) {
                localVarQueryParameter['joined_at.to'] = joinedAtTo;
            }
            if (domainId !== undefined) {
                localVarQueryParameter['domain_id'] = domainId;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            if (sort !== undefined) {
                localVarQueryParameter['sort'] = sort;
            }
            if (q !== undefined) {
                localVarQueryParameter['q'] = q;
            }
            if (queueId) {
                localVarQueryParameter['queue_id'] = queueId;
            }
            if (teamId) {
                localVarQueryParameter['team_id'] = teamId;
            }
            if (type) {
                localVarQueryParameter['type'] = type;
            }
            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 RoutingSchemaTags
         * @param {number} [page]
         * @param {number} [size]
         * @param {string} [q]
         * @param {string} [sort]
         * @param {Array<string>} [fields]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchQueueTags: async (page, size, q, sort, fields, options = {}) => {
            const localVarPath = `/call_center/queues/tags`;
            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;
            }
            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 Queue
         * @param {string} id
         * @param {EngineQueueServiceUpdateQueueBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateQueue: 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 updateQueue.');
            }
            // 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 updateQueue.');
            }
            const localVarPath = `/call_center/queues/{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,
            };
        },
    };
};
/**
 * QueueServiceApi - functional programming interface
 * @export
 */
export const QueueServiceApiFp = function (configuration) {
    return {
        /**
         *
         * @summary Create Queue
         * @param {EngineCreateQueueRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createQueue(body, options) {
            const localVarAxiosArgs = await QueueServiceApiAxiosParamCreator(configuration).createQueue(body, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary Remove Queue
         * @param {string} id
         * @param {string} [domainId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteQueue(id, domainId, options) {
            const localVarAxiosArgs = await QueueServiceApiAxiosParamCreator(configuration).deleteQueue(id, domainId, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary Patch Queue
         * @param {string} id
         * @param {EngineQueueServicePatchQueueBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async patchQueue(id, body, options) {
            const localVarAxiosArgs = await QueueServiceApiAxiosParamCreator(configuration).patchQueue(id, body, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary Queue item
         * @param {string} id
         * @param {string} [domainId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async readQueue(id, domainId, options) {
            const localVarAxiosArgs = await QueueServiceApiAxiosParamCreator(configuration).readQueue(id, domainId, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary List of Queue
         * @param {number} [page]
         * @param {number} [size]
         * @param {string} [q]
         * @param {string} [sort]
         * @param {Array<string>} [fields]
         * @param {Array<string>} [id]
         * @param {Array<number>} [type]
         * @param {Array<number>} [teamId]
         * @param {Array<string>} [tags]
         * @param {boolean} [enabled]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async searchQueue(page, size, q, sort, fields, id, type, teamId, tags, enabled, options) {
            const localVarAxiosArgs = await QueueServiceApiAxiosParamCreator(configuration).searchQueue(page, size, q, sort, fields, id, type, teamId, tags, enabled, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @param {number} [page]
         * @param {number} [size]
         * @param {string} [joinedAtFrom]
         * @param {string} [joinedAtTo]
         * @param {string} [domainId]
         * @param {Array<string>} [fields]
         * @param {string} [sort]
         * @param {string} [q]
         * @param {Array<number>} [queueId]
         * @param {Array<number>} [teamId]
         * @param {Array<number>} [type]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async searchQueueReportGeneral(page, size, joinedAtFrom, joinedAtTo, domainId, fields, sort, q, queueId, teamId, type, options) {
            const localVarAxiosArgs = await QueueServiceApiAxiosParamCreator(configuration).searchQueueReportGeneral(page, size, joinedAtFrom, joinedAtTo, domainId, fields, sort, q, queueId, teamId, type, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary List RoutingSchemaTags
         * @param {number} [page]
         * @param {number} [size]
         * @param {string} [q]
         * @param {string} [sort]
         * @param {Array<string>} [fields]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async searchQueueTags(page, size, q, sort, fields, options) {
            const localVarAxiosArgs = await QueueServiceApiAxiosParamCreator(configuration).searchQueueTags(page, size, q, sort, fields, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary Update Queue
         * @param {string} id
         * @param {EngineQueueServiceUpdateQueueBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async updateQueue(id, body, options) {
            const localVarAxiosArgs = await QueueServiceApiAxiosParamCreator(configuration).updateQueue(id, body, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
    };
};
/**
 * QueueServiceApi - factory interface
 * @export
 */
export const QueueServiceApiFactory = function (configuration, basePath, axios) {
    return {
        /**
         *
         * @summary Create Queue
         * @param {EngineCreateQueueRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createQueue(body, options) {
            return QueueServiceApiFp(configuration)
                .createQueue(body, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Remove Queue
         * @param {string} id
         * @param {string} [domainId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteQueue(id, domainId, options) {
            return QueueServiceApiFp(configuration)
                .deleteQueue(id, domainId, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Patch Queue
         * @param {string} id
         * @param {EngineQueueServicePatchQueueBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        patchQueue(id, body, options) {
            return QueueServiceApiFp(configuration)
                .patchQueue(id, body, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Queue item
         * @param {string} id
         * @param {string} [domainId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        readQueue(id, domainId, options) {
            return QueueServiceApiFp(configuration)
                .readQueue(id, domainId, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary List of Queue
         * @param {number} [page]
         * @param {number} [size]
         * @param {string} [q]
         * @param {string} [sort]
         * @param {Array<string>} [fields]
         * @param {Array<string>} [id]
         * @param {Array<number>} [type]
         * @param {Array<number>} [teamId]
         * @param {Array<string>} [tags]
         * @param {boolean} [enabled]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchQueue(page, size, q, sort, fields, id, type, teamId, tags, enabled, options) {
            return QueueServiceApiFp(configuration)
                .searchQueue(page, size, q, sort, fields, id, type, teamId, tags, enabled, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {number} [page]
         * @param {number} [size]
         * @param {string} [joinedAtFrom]
         * @param {string} [joinedAtTo]
         * @param {string} [domainId]
         * @param {Array<string>} [fields]
         * @param {string} [sort]
         * @param {string} [q]
         * @param {Array<number>} [queueId]
         * @param {Array<number>} [teamId]
         * @param {Array<number>} [type]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchQueueReportGeneral(page, size, joinedAtFrom, joinedAtTo, domainId, fields, sort, q, queueId, teamId, type, options) {
            return QueueServiceApiFp(configuration)
                .searchQueueReportGeneral(page, size, joinedAtFrom, joinedAtTo, domainId, fields, sort, q, queueId, teamId, type, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary List RoutingSchemaTags
         * @param {number} [page]
         * @param {number} [size]
         * @param {string} [q]
         * @param {string} [sort]
         * @param {Array<string>} [fields]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchQueueTags(page, size, q, sort, fields, options) {
            return QueueServiceApiFp(configuration)
                .searchQueueTags(page, size, q, sort, fields, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Update Queue
         * @param {string} id
         * @param {EngineQueueServiceUpdateQueueBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateQueue(id, body, options) {
            return QueueServiceApiFp(configuration)
                .updateQueue(id, body, options)
                .then((request) => request(axios, basePath));
        },
    };
};
/**
 * QueueServiceApi - object-oriented interface
 * @export
 * @class QueueServiceApi
 * @extends {BaseAPI}
 */
export class QueueServiceApi extends BaseAPI {
    /**
     *
     * @summary Create Queue
     * @param {EngineCreateQueueRequest} body
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof QueueServiceApi
     */
    createQueue(body, options) {
        return QueueServiceApiFp(this.configuration)
            .createQueue(body, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Remove Queue
     * @param {string} id
     * @param {string} [domainId]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof QueueServiceApi
     */
    deleteQueue(id, domainId, options) {
        return QueueServiceApiFp(this.configuration)
            .deleteQueue(id, domainId, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Patch Queue
     * @param {string} id
     * @param {EngineQueueServicePatchQueueBody} body
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof QueueServiceApi
     */
    patchQueue(id, body, options) {
        return QueueServiceApiFp(this.configuration)
            .patchQueue(id, body, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Queue item
     * @param {string} id
     * @param {string} [domainId]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof QueueServiceApi
     */
    readQueue(id, domainId, options) {
        return QueueServiceApiFp(this.configuration)
            .readQueue(id, domainId, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary List of Queue
     * @param {number} [page]
     * @param {number} [size]
     * @param {string} [q]
     * @param {string} [sort]
     * @param {Array<string>} [fields]
     * @param {Array<string>} [id]
     * @param {Array<number>} [type]
     * @param {Array<number>} [teamId]
     * @param {Array<string>} [tags]
     * @param {boolean} [enabled]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof QueueServiceApi
     */
    searchQueue(page, size, q, sort, fields, id, type, teamId, tags, enabled, options) {
        return QueueServiceApiFp(this.configuration)
            .searchQueue(page, size, q, sort, fields, id, type, teamId, tags, enabled, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {number} [page]
     * @param {number} [size]
     * @param {string} [joinedAtFrom]
     * @param {string} [joinedAtTo]
     * @param {string} [domainId]
     * @param {Array<string>} [fields]
     * @param {string} [sort]
     * @param {string} [q]
     * @param {Array<number>} [queueId]
     * @param {Array<number>} [teamId]
     * @param {Array<number>} [type]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof QueueServiceApi
     */
    searchQueueReportGeneral(page, size, joinedAtFrom, joinedAtTo, domainId, fields, sort, q, queueId, teamId, type, options) {
        return QueueServiceApiFp(this.configuration)
            .searchQueueReportGeneral(page, size, joinedAtFrom, joinedAtTo, domainId, fields, sort, q, queueId, teamId, type, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary List RoutingSchemaTags
     * @param {number} [page]
     * @param {number} [size]
     * @param {string} [q]
     * @param {string} [sort]
     * @param {Array<string>} [fields]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof QueueServiceApi
     */
    searchQueueTags(page, size, q, sort, fields, options) {
        return QueueServiceApiFp(this.configuration)
            .searchQueueTags(page, size, q, sort, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Update Queue
     * @param {string} id
     * @param {EngineQueueServiceUpdateQueueBody} body
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof QueueServiceApi
     */
    updateQueue(id, body, options) {
        return QueueServiceApiFp(this.configuration)
            .updateQueue(id, body, options)
            .then((request) => request(this.axios, this.basePath));
    }
}
//# sourceMappingURL=queue-service-api.js.map