// 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';
/**
 * ListServiceApi - axios parameter creator
 * @export
 */
export const ListServiceApiAxiosParamCreator = function (configuration) {
    return {
        /**
         *
         * @summary Create List
         * @param {EngineCreateListRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createList: 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 createList.');
            }
            const localVarPath = `/call_center/list`;
            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 Create ListCommunication
         * @param {string} listId
         * @param {EngineListServiceCreateListCommunicationBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createListCommunication: async (listId, body, options = {}) => {
            // verify required parameter 'listId' is not null or undefined
            if (listId === null || listId === undefined) {
                throw new RequiredError('listId', 'Required parameter listId was null or undefined when calling createListCommunication.');
            }
            // 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 createListCommunication.');
            }
            const localVarPath = `/call_center/list/{list_id}/communication`.replace(`{${'list_id'}}`, encodeURIComponent(String(listId)));
            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 list
         * @param {string} id
         * @param {string} [domainId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteList: 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 deleteList.');
            }
            const localVarPath = `/call_center/list/{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 Remove ListCommunication
         * @param {string} listId
         * @param {string} id
         * @param {string} [domainId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteListCommunication: async (listId, id, domainId, options = {}) => {
            // verify required parameter 'listId' is not null or undefined
            if (listId === null || listId === undefined) {
                throw new RequiredError('listId', 'Required parameter listId was null or undefined when calling deleteListCommunication.');
            }
            // 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 deleteListCommunication.');
            }
            const localVarPath = `/call_center/list/{list_id}/communication/{id}`
                .replace(`{${'list_id'}}`, encodeURIComponent(String(listId)))
                .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 List item
         * @param {string} id
         * @param {string} [domainId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        readList: 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 readList.');
            }
            const localVarPath = `/call_center/list/{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 item
         * @param {string} listId
         * @param {string} id
         * @param {string} [domainId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        readListCommunication: async (listId, id, domainId, options = {}) => {
            // verify required parameter 'listId' is not null or undefined
            if (listId === null || listId === undefined) {
                throw new RequiredError('listId', 'Required parameter listId was null or undefined when calling readListCommunication.');
            }
            // 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 readListCommunication.');
            }
            const localVarPath = `/call_center/list/{list_id}/communication/{id}`
                .replace(`{${'list_id'}}`, encodeURIComponent(String(listId)))
                .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 List
         * @param {number} [page]
         * @param {number} [size]
         * @param {string} [q]
         * @param {string} [sort]
         * @param {Array<string>} [fields]
         * @param {Array<number>} [id]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchList: async (page, size, q, sort, fields, id, options = {}) => {
            const localVarPath = `/call_center/list`;
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = {
                method: 'GET',
                ...baseOptions,
                ...options,
            };
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? await configuration.apiKey('X-Webitel-Access')
                    : await configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            if (page !== undefined) {
                localVarQueryParameter['page'] = page;
            }
            if (size !== undefined) {
                localVarQueryParameter['size'] = size;
            }
            if (q !== undefined) {
                localVarQueryParameter['q'] = q;
            }
            if (sort !== undefined) {
                localVarQueryParameter['sort'] = sort;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            if (id) {
                localVarQueryParameter['id'] = id;
            }
            localVarUrlObj.query = {
                ...localVarUrlObj.query,
                ...localVarQueryParameter,
                ...options.query,
            };
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = {
                ...localVarHeaderParameter,
                ...headersFromBaseOptions,
                ...options.headers,
            };
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        },
        /**
         *
         * @summary List of List
         * @param {string} listId
         * @param {number} [page]
         * @param {number} [size]
         * @param {string} [q]
         * @param {string} [sort]
         * @param {Array<string>} [fields]
         * @param {Array<number>} [id]
         * @param {string} [expireAtFrom]
         * @param {string} [expireAtTo]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchListCommunication: async (listId, page, size, q, sort, fields, id, expireAtFrom, expireAtTo, options = {}) => {
            // verify required parameter 'listId' is not null or undefined
            if (listId === null || listId === undefined) {
                throw new RequiredError('listId', 'Required parameter listId was null or undefined when calling searchListCommunication.');
            }
            const localVarPath = `/call_center/list/{list_id}/communication`.replace(`{${'list_id'}}`, encodeURIComponent(String(listId)));
            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 (expireAtFrom !== undefined) {
                localVarQueryParameter['expire_at.from'] = expireAtFrom;
            }
            if (expireAtTo !== undefined) {
                localVarQueryParameter['expire_at.to'] = expireAtTo;
            }
            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 list
         * @param {string} id
         * @param {EngineListServiceUpdateListBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateList: 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 updateList.');
            }
            // 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 updateList.');
            }
            const localVarPath = `/call_center/list/{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,
            };
        },
        /**
         *
         * @summary Update ListCommunication
         * @param {string} listId
         * @param {string} id
         * @param {EngineListServiceUpdateListCommunicationBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateListCommunication: async (listId, id, body, options = {}) => {
            // verify required parameter 'listId' is not null or undefined
            if (listId === null || listId === undefined) {
                throw new RequiredError('listId', 'Required parameter listId was null or undefined when calling updateListCommunication.');
            }
            // 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 updateListCommunication.');
            }
            // 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 updateListCommunication.');
            }
            const localVarPath = `/call_center/list/{list_id}/communication/{id}`
                .replace(`{${'list_id'}}`, encodeURIComponent(String(listId)))
                .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,
            };
        },
    };
};
/**
 * ListServiceApi - functional programming interface
 * @export
 */
export const ListServiceApiFp = function (configuration) {
    return {
        /**
         *
         * @summary Create List
         * @param {EngineCreateListRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createList(body, options) {
            const localVarAxiosArgs = await ListServiceApiAxiosParamCreator(configuration).createList(body, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary Create ListCommunication
         * @param {string} listId
         * @param {EngineListServiceCreateListCommunicationBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createListCommunication(listId, body, options) {
            const localVarAxiosArgs = await ListServiceApiAxiosParamCreator(configuration).createListCommunication(listId, body, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary Remove list
         * @param {string} id
         * @param {string} [domainId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteList(id, domainId, options) {
            const localVarAxiosArgs = await ListServiceApiAxiosParamCreator(configuration).deleteList(id, domainId, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary Remove ListCommunication
         * @param {string} listId
         * @param {string} id
         * @param {string} [domainId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteListCommunication(listId, id, domainId, options) {
            const localVarAxiosArgs = await ListServiceApiAxiosParamCreator(configuration).deleteListCommunication(listId, id, domainId, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary List item
         * @param {string} id
         * @param {string} [domainId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async readList(id, domainId, options) {
            const localVarAxiosArgs = await ListServiceApiAxiosParamCreator(configuration).readList(id, domainId, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary List item
         * @param {string} listId
         * @param {string} id
         * @param {string} [domainId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async readListCommunication(listId, id, domainId, options) {
            const localVarAxiosArgs = await ListServiceApiAxiosParamCreator(configuration).readListCommunication(listId, id, domainId, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary List of List
         * @param {number} [page]
         * @param {number} [size]
         * @param {string} [q]
         * @param {string} [sort]
         * @param {Array<string>} [fields]
         * @param {Array<number>} [id]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async searchList(page, size, q, sort, fields, id, options) {
            const localVarAxiosArgs = await ListServiceApiAxiosParamCreator(configuration).searchList(page, size, q, sort, fields, id, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary List of List
         * @param {string} listId
         * @param {number} [page]
         * @param {number} [size]
         * @param {string} [q]
         * @param {string} [sort]
         * @param {Array<string>} [fields]
         * @param {Array<number>} [id]
         * @param {string} [expireAtFrom]
         * @param {string} [expireAtTo]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async searchListCommunication(listId, page, size, q, sort, fields, id, expireAtFrom, expireAtTo, options) {
            const localVarAxiosArgs = await ListServiceApiAxiosParamCreator(configuration).searchListCommunication(listId, page, size, q, sort, fields, id, expireAtFrom, expireAtTo, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary Update list
         * @param {string} id
         * @param {EngineListServiceUpdateListBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async updateList(id, body, options) {
            const localVarAxiosArgs = await ListServiceApiAxiosParamCreator(configuration).updateList(id, body, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary Update ListCommunication
         * @param {string} listId
         * @param {string} id
         * @param {EngineListServiceUpdateListCommunicationBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async updateListCommunication(listId, id, body, options) {
            const localVarAxiosArgs = await ListServiceApiAxiosParamCreator(configuration).updateListCommunication(listId, id, body, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
    };
};
/**
 * ListServiceApi - factory interface
 * @export
 */
export const ListServiceApiFactory = function (configuration, basePath, axios) {
    return {
        /**
         *
         * @summary Create List
         * @param {EngineCreateListRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createList(body, options) {
            return ListServiceApiFp(configuration)
                .createList(body, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Create ListCommunication
         * @param {string} listId
         * @param {EngineListServiceCreateListCommunicationBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createListCommunication(listId, body, options) {
            return ListServiceApiFp(configuration)
                .createListCommunication(listId, body, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Remove list
         * @param {string} id
         * @param {string} [domainId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteList(id, domainId, options) {
            return ListServiceApiFp(configuration)
                .deleteList(id, domainId, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Remove ListCommunication
         * @param {string} listId
         * @param {string} id
         * @param {string} [domainId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteListCommunication(listId, id, domainId, options) {
            return ListServiceApiFp(configuration)
                .deleteListCommunication(listId, id, domainId, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary List item
         * @param {string} id
         * @param {string} [domainId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        readList(id, domainId, options) {
            return ListServiceApiFp(configuration)
                .readList(id, domainId, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary List item
         * @param {string} listId
         * @param {string} id
         * @param {string} [domainId]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        readListCommunication(listId, id, domainId, options) {
            return ListServiceApiFp(configuration)
                .readListCommunication(listId, id, domainId, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary List of List
         * @param {number} [page]
         * @param {number} [size]
         * @param {string} [q]
         * @param {string} [sort]
         * @param {Array<string>} [fields]
         * @param {Array<number>} [id]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchList(page, size, q, sort, fields, id, options) {
            return ListServiceApiFp(configuration)
                .searchList(page, size, q, sort, fields, id, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary List of List
         * @param {string} listId
         * @param {number} [page]
         * @param {number} [size]
         * @param {string} [q]
         * @param {string} [sort]
         * @param {Array<string>} [fields]
         * @param {Array<number>} [id]
         * @param {string} [expireAtFrom]
         * @param {string} [expireAtTo]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchListCommunication(listId, page, size, q, sort, fields, id, expireAtFrom, expireAtTo, options) {
            return ListServiceApiFp(configuration)
                .searchListCommunication(listId, page, size, q, sort, fields, id, expireAtFrom, expireAtTo, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Update list
         * @param {string} id
         * @param {EngineListServiceUpdateListBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateList(id, body, options) {
            return ListServiceApiFp(configuration)
                .updateList(id, body, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Update ListCommunication
         * @param {string} listId
         * @param {string} id
         * @param {EngineListServiceUpdateListCommunicationBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateListCommunication(listId, id, body, options) {
            return ListServiceApiFp(configuration)
                .updateListCommunication(listId, id, body, options)
                .then((request) => request(axios, basePath));
        },
    };
};
/**
 * ListServiceApi - object-oriented interface
 * @export
 * @class ListServiceApi
 * @extends {BaseAPI}
 */
export class ListServiceApi extends BaseAPI {
    /**
     *
     * @summary Create List
     * @param {EngineCreateListRequest} body
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ListServiceApi
     */
    createList(body, options) {
        return ListServiceApiFp(this.configuration)
            .createList(body, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Create ListCommunication
     * @param {string} listId
     * @param {EngineListServiceCreateListCommunicationBody} body
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ListServiceApi
     */
    createListCommunication(listId, body, options) {
        return ListServiceApiFp(this.configuration)
            .createListCommunication(listId, body, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Remove list
     * @param {string} id
     * @param {string} [domainId]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ListServiceApi
     */
    deleteList(id, domainId, options) {
        return ListServiceApiFp(this.configuration)
            .deleteList(id, domainId, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Remove ListCommunication
     * @param {string} listId
     * @param {string} id
     * @param {string} [domainId]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ListServiceApi
     */
    deleteListCommunication(listId, id, domainId, options) {
        return ListServiceApiFp(this.configuration)
            .deleteListCommunication(listId, id, domainId, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary List item
     * @param {string} id
     * @param {string} [domainId]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ListServiceApi
     */
    readList(id, domainId, options) {
        return ListServiceApiFp(this.configuration)
            .readList(id, domainId, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary List item
     * @param {string} listId
     * @param {string} id
     * @param {string} [domainId]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ListServiceApi
     */
    readListCommunication(listId, id, domainId, options) {
        return ListServiceApiFp(this.configuration)
            .readListCommunication(listId, id, domainId, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary List of List
     * @param {number} [page]
     * @param {number} [size]
     * @param {string} [q]
     * @param {string} [sort]
     * @param {Array<string>} [fields]
     * @param {Array<number>} [id]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ListServiceApi
     */
    searchList(page, size, q, sort, fields, id, options) {
        return ListServiceApiFp(this.configuration)
            .searchList(page, size, q, sort, fields, id, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary List of List
     * @param {string} listId
     * @param {number} [page]
     * @param {number} [size]
     * @param {string} [q]
     * @param {string} [sort]
     * @param {Array<string>} [fields]
     * @param {Array<number>} [id]
     * @param {string} [expireAtFrom]
     * @param {string} [expireAtTo]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ListServiceApi
     */
    searchListCommunication(listId, page, size, q, sort, fields, id, expireAtFrom, expireAtTo, options) {
        return ListServiceApiFp(this.configuration)
            .searchListCommunication(listId, page, size, q, sort, fields, id, expireAtFrom, expireAtTo, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Update list
     * @param {string} id
     * @param {EngineListServiceUpdateListBody} body
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ListServiceApi
     */
    updateList(id, body, options) {
        return ListServiceApiFp(this.configuration)
            .updateList(id, body, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Update ListCommunication
     * @param {string} listId
     * @param {string} id
     * @param {EngineListServiceUpdateListCommunicationBody} body
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof ListServiceApi
     */
    updateListCommunication(listId, id, body, options) {
        return ListServiceApiFp(this.configuration)
            .updateListCommunication(listId, id, body, options)
            .then((request) => request(this.axios, this.basePath));
    }
}
//# sourceMappingURL=list-service-api.js.map