// tslint:disable
/**
 * Webitel API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 24.04.0
 * Contact: support@webitel.com
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */
import { __awaiter } from "tslib";
import * as globalImportUrl from 'url';
import globalAxios from 'axios';
// Some imports not used depending on template conditions
// @ts-ignore
import { BASE_PATH, BaseAPI, RequiredError, } from '../base';
/**
 * UsersApi - axios parameter creator
 * @export
 */
export const UsersApiAxiosParamCreator = function (configuration) {
    return {
        /**
         *
         * @param {ApiCreateUserRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createUser: (body, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // 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 createUser.');
            }
            const localVarPath = `/users`;
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? yield configuration.apiKey('X-Webitel-Access')
                    : yield configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            localVarHeaderParameter['Content-Type'] = 'application/json';
            localVarUrlObj.query = Object.assign(Object.assign(Object.assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            const needsSerialization = typeof body !== 'string' ||
                localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data = needsSerialization
                ? JSON.stringify(body !== undefined ? body : {})
                : body || '';
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        }),
        /**
         *
         * @param {string} id ONE /users/{id}
         * @param {Array<string>} [selection] MANY /users .ids&#x3D;[id,...]
         * @param {boolean} [permanent]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteUsers: (id, selection, permanent, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // 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 deleteUsers.');
            }
            const localVarPath = `/users/{id}`.replace(`{${'id'}}`, encodeURIComponent(String(id)));
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? yield configuration.apiKey('X-Webitel-Access')
                    : yield configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            if (selection) {
                localVarQueryParameter['selection'] = selection;
            }
            if (permanent !== undefined) {
                localVarQueryParameter['permanent'] = permanent;
            }
            localVarUrlObj.query = Object.assign(Object.assign(Object.assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        }),
        /**
         *
         * @param {Array<string>} selection MANY /users .ids&#x3D;[id,...]
         * @param {string} [id] ONE /users/{id}
         * @param {boolean} [permanent]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteUsers2: (selection, id, permanent, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'selection' is not null or undefined
            if (selection === null || selection === undefined) {
                throw new RequiredError('selection', 'Required parameter selection was null or undefined when calling deleteUsers2.');
            }
            const localVarPath = `/users`;
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? yield configuration.apiKey('X-Webitel-Access')
                    : yield configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            if (id !== undefined) {
                localVarQueryParameter['id'] = id;
            }
            if (permanent !== undefined) {
                localVarQueryParameter['permanent'] = permanent;
            }
            localVarHeaderParameter['Content-Type'] = 'application/json';
            localVarUrlObj.query = Object.assign(Object.assign(Object.assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            const needsSerialization = typeof selection !== 'string' ||
                localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data = needsSerialization
                ? JSON.stringify(selection !== undefined ? selection : {})
                : selection || '';
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        }),
        /**
         *
         * @param {string} id
         * @param {object} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        logoutUser: (id, body, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // 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 logoutUser.');
            }
            // 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 logoutUser.');
            }
            const localVarPath = `/users/{id}/logout`.replace(`{${'id'}}`, encodeURIComponent(String(id)));
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? yield configuration.apiKey('X-Webitel-Access')
                    : yield configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            localVarHeaderParameter['Content-Type'] = 'application/json';
            localVarUrlObj.query = Object.assign(Object.assign(Object.assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            const needsSerialization = typeof body !== 'string' ||
                localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data = needsSerialization
                ? JSON.stringify(body !== undefined ? body : {})
                : body || '';
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        }),
        /**
         *
         * @param {string} id
         * @param {Array<string>} [fields] partial output
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        readUser: (id, fields, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // 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 readUser.');
            }
            const localVarPath = `/users/{id}`.replace(`{${'id'}}`, encodeURIComponent(String(id)));
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? yield configuration.apiKey('X-Webitel-Access')
                    : yield configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            localVarUrlObj.query = Object.assign(Object.assign(Object.assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        }),
        /**
         *
         * @param {string} [id]
         * @param {Array<string>} [fields] partial output
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        readUser2: (id, fields, options = {}) => __awaiter(this, void 0, void 0, function* () {
            const localVarPath = `/user`;
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? yield configuration.apiKey('X-Webitel-Access')
                    : yield configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            if (id !== undefined) {
                localVarQueryParameter['id'] = id;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            localVarUrlObj.query = Object.assign(Object.assign(Object.assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        }),
        /**
         *
         * @param {Array<string>} [id] ----- Base Filters ---------------------------  filter: .id &#x3D; any({id}...)
         * @param {Array<string>} [notId] filter: .id &lt;&gt; all({not_ids}...)
         * @param {string} [q] ----- User-specific Filters ------------------  filter: (.name|.username|.extension|.status) ILIKE \&#39;{q}\&#39;
         * @param {string} [name] filter: .name ILIKE \&#39;{name}\&#39;
         * @param {string} [status] filter: .status ILIKE \&#39;{status}\&#39;
         * @param {string} [username] filter: .username ILIKE \&#39;{username}\&#39;
         * @param {string} [extension] filter: .extension LIKE \&#39;{extension}\&#39;
         * @param {boolean} [any] ----- View Modes ----------------------------- NOTE: by default, search NOT \&#39;deleted\&#39; objects ONLY  filter: include \&#39;deleted\&#39; ALSO ! (inactive)
         * @param {boolean} [deleted] filter: .deleted_at NOTNULL (view: RECYCLE)
         * @param {string} [presenceStatus]
         * @param {string} [presenceNote]
         * @param {Array<string>} [fields] // navigation filter repeated int64 roles &#x3D; 7; ----- Search Options -------------------------  select: output (fields,...)
         * @param {Array<string>} [sort] select: order by (fields,...)
         * @param {number} [page] select: offset {page}
         * @param {number} [size] select: limit {size}
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchUsers: (id, notId, q, name, status, username, extension, any, deleted, presenceStatus, presenceNote, fields, sort, page, size, options = {}) => __awaiter(this, void 0, void 0, function* () {
            const localVarPath = `/users`;
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? yield configuration.apiKey('X-Webitel-Access')
                    : yield configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            if (id) {
                localVarQueryParameter['id'] = id;
            }
            if (notId) {
                localVarQueryParameter['not_id'] = notId;
            }
            if (q !== undefined) {
                localVarQueryParameter['q'] = q;
            }
            if (name !== undefined) {
                localVarQueryParameter['name'] = name;
            }
            if (status !== undefined) {
                localVarQueryParameter['status'] = status;
            }
            if (username !== undefined) {
                localVarQueryParameter['username'] = username;
            }
            if (extension !== undefined) {
                localVarQueryParameter['extension'] = extension;
            }
            if (any !== undefined) {
                localVarQueryParameter['any'] = any;
            }
            if (deleted !== undefined) {
                localVarQueryParameter['deleted'] = deleted;
            }
            if (presenceStatus !== undefined) {
                localVarQueryParameter['presence.status'] = presenceStatus;
            }
            if (presenceNote !== undefined) {
                localVarQueryParameter['presence.note'] = presenceNote;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            if (sort) {
                localVarQueryParameter['sort'] = sort;
            }
            if (page !== undefined) {
                localVarQueryParameter['page'] = page;
            }
            if (size !== undefined) {
                localVarQueryParameter['size'] = size;
            }
            localVarUrlObj.query = Object.assign(Object.assign(Object.assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        }),
        /**
         *
         * @param {ApiSearchUsersRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchUsers2: (body, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // 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 searchUsers2.');
            }
            const localVarPath = `/users/search`;
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? yield configuration.apiKey('X-Webitel-Access')
                    : yield configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            localVarHeaderParameter['Content-Type'] = 'application/json';
            localVarUrlObj.query = Object.assign(Object.assign(Object.assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            const needsSerialization = typeof body !== 'string' ||
                localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data = needsSerialization
                ? JSON.stringify(body !== undefined ? body : {})
                : body || '';
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        }),
        /**
         *
         * @param {string} userId Object ID
         * @param {BodyModificationsChanges} user
         * @param {Array<string>} [fields] PATCH: partial update
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateUser: (userId, user, fields, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'userId' is not null or undefined
            if (userId === null || userId === undefined) {
                throw new RequiredError('userId', 'Required parameter userId was null or undefined when calling updateUser.');
            }
            // verify required parameter 'user' is not null or undefined
            if (user === null || user === undefined) {
                throw new RequiredError('user', 'Required parameter user was null or undefined when calling updateUser.');
            }
            const localVarPath = `/users/{user.id}`.replace(`{${'user.id'}}`, encodeURIComponent(String(userId)));
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? yield configuration.apiKey('X-Webitel-Access')
                    : yield configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            localVarHeaderParameter['Content-Type'] = 'application/json';
            localVarUrlObj.query = Object.assign(Object.assign(Object.assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            const needsSerialization = typeof user !== 'string' ||
                localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data = needsSerialization
                ? JSON.stringify(user !== undefined ? user : {})
                : user || '';
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        }),
        /**
         *
         * @param {string} userId Object ID
         * @param {BodyModificationsChanges1} user
         * @param {Array<string>} [fields] PATCH: partial update
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateUser2: (userId, user, fields, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'userId' is not null or undefined
            if (userId === null || userId === undefined) {
                throw new RequiredError('userId', 'Required parameter userId was null or undefined when calling updateUser2.');
            }
            // verify required parameter 'user' is not null or undefined
            if (user === null || user === undefined) {
                throw new RequiredError('user', 'Required parameter user was null or undefined when calling updateUser2.');
            }
            const localVarPath = `/users/{user.id}`.replace(`{${'user.id'}}`, encodeURIComponent(String(userId)));
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? yield configuration.apiKey('X-Webitel-Access')
                    : yield configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            localVarHeaderParameter['Content-Type'] = 'application/json';
            localVarUrlObj.query = Object.assign(Object.assign(Object.assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            const needsSerialization = typeof user !== 'string' ||
                localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data = needsSerialization
                ? JSON.stringify(user !== undefined ? user : {})
                : user || '';
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        }),
    };
};
/**
 * UsersApi - functional programming interface
 * @export
 */
export const UsersApiFp = function (configuration) {
    return {
        /**
         *
         * @param {ApiCreateUserRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createUser(body, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield UsersApiAxiosParamCreator(configuration).createUser(body, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @param {string} id ONE /users/{id}
         * @param {Array<string>} [selection] MANY /users .ids&#x3D;[id,...]
         * @param {boolean} [permanent]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteUsers(id, selection, permanent, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield UsersApiAxiosParamCreator(configuration).deleteUsers(id, selection, permanent, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @param {Array<string>} selection MANY /users .ids&#x3D;[id,...]
         * @param {string} [id] ONE /users/{id}
         * @param {boolean} [permanent]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteUsers2(selection, id, permanent, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield UsersApiAxiosParamCreator(configuration).deleteUsers2(selection, id, permanent, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @param {string} id
         * @param {object} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        logoutUser(id, body, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield UsersApiAxiosParamCreator(configuration).logoutUser(id, body, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @param {string} id
         * @param {Array<string>} [fields] partial output
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        readUser(id, fields, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield UsersApiAxiosParamCreator(configuration).readUser(id, fields, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @param {string} [id]
         * @param {Array<string>} [fields] partial output
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        readUser2(id, fields, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield UsersApiAxiosParamCreator(configuration).readUser2(id, fields, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @param {Array<string>} [id] ----- Base Filters ---------------------------  filter: .id &#x3D; any({id}...)
         * @param {Array<string>} [notId] filter: .id &lt;&gt; all({not_ids}...)
         * @param {string} [q] ----- User-specific Filters ------------------  filter: (.name|.username|.extension|.status) ILIKE \&#39;{q}\&#39;
         * @param {string} [name] filter: .name ILIKE \&#39;{name}\&#39;
         * @param {string} [status] filter: .status ILIKE \&#39;{status}\&#39;
         * @param {string} [username] filter: .username ILIKE \&#39;{username}\&#39;
         * @param {string} [extension] filter: .extension LIKE \&#39;{extension}\&#39;
         * @param {boolean} [any] ----- View Modes ----------------------------- NOTE: by default, search NOT \&#39;deleted\&#39; objects ONLY  filter: include \&#39;deleted\&#39; ALSO ! (inactive)
         * @param {boolean} [deleted] filter: .deleted_at NOTNULL (view: RECYCLE)
         * @param {string} [presenceStatus]
         * @param {string} [presenceNote]
         * @param {Array<string>} [fields] // navigation filter repeated int64 roles &#x3D; 7; ----- Search Options -------------------------  select: output (fields,...)
         * @param {Array<string>} [sort] select: order by (fields,...)
         * @param {number} [page] select: offset {page}
         * @param {number} [size] select: limit {size}
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchUsers(id, notId, q, name, status, username, extension, any, deleted, presenceStatus, presenceNote, fields, sort, page, size, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield UsersApiAxiosParamCreator(configuration).searchUsers(id, notId, q, name, status, username, extension, any, deleted, presenceStatus, presenceNote, fields, sort, page, size, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @param {ApiSearchUsersRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchUsers2(body, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield UsersApiAxiosParamCreator(configuration).searchUsers2(body, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @param {string} userId Object ID
         * @param {BodyModificationsChanges} user
         * @param {Array<string>} [fields] PATCH: partial update
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateUser(userId, user, fields, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield UsersApiAxiosParamCreator(configuration).updateUser(userId, user, fields, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @param {string} userId Object ID
         * @param {BodyModificationsChanges1} user
         * @param {Array<string>} [fields] PATCH: partial update
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateUser2(userId, user, fields, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield UsersApiAxiosParamCreator(configuration).updateUser2(userId, user, fields, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
    };
};
/**
 * UsersApi - factory interface
 * @export
 */
export const UsersApiFactory = function (configuration, basePath, axios) {
    return {
        /**
         *
         * @param {ApiCreateUserRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createUser(body, options) {
            return UsersApiFp(configuration)
                .createUser(body, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {string} id ONE /users/{id}
         * @param {Array<string>} [selection] MANY /users .ids&#x3D;[id,...]
         * @param {boolean} [permanent]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteUsers(id, selection, permanent, options) {
            return UsersApiFp(configuration)
                .deleteUsers(id, selection, permanent, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {Array<string>} selection MANY /users .ids&#x3D;[id,...]
         * @param {string} [id] ONE /users/{id}
         * @param {boolean} [permanent]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteUsers2(selection, id, permanent, options) {
            return UsersApiFp(configuration)
                .deleteUsers2(selection, id, permanent, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {string} id
         * @param {object} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        logoutUser(id, body, options) {
            return UsersApiFp(configuration)
                .logoutUser(id, body, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {string} id
         * @param {Array<string>} [fields] partial output
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        readUser(id, fields, options) {
            return UsersApiFp(configuration)
                .readUser(id, fields, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {string} [id]
         * @param {Array<string>} [fields] partial output
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        readUser2(id, fields, options) {
            return UsersApiFp(configuration)
                .readUser2(id, fields, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {Array<string>} [id] ----- Base Filters ---------------------------  filter: .id &#x3D; any({id}...)
         * @param {Array<string>} [notId] filter: .id &lt;&gt; all({not_ids}...)
         * @param {string} [q] ----- User-specific Filters ------------------  filter: (.name|.username|.extension|.status) ILIKE \&#39;{q}\&#39;
         * @param {string} [name] filter: .name ILIKE \&#39;{name}\&#39;
         * @param {string} [status] filter: .status ILIKE \&#39;{status}\&#39;
         * @param {string} [username] filter: .username ILIKE \&#39;{username}\&#39;
         * @param {string} [extension] filter: .extension LIKE \&#39;{extension}\&#39;
         * @param {boolean} [any] ----- View Modes ----------------------------- NOTE: by default, search NOT \&#39;deleted\&#39; objects ONLY  filter: include \&#39;deleted\&#39; ALSO ! (inactive)
         * @param {boolean} [deleted] filter: .deleted_at NOTNULL (view: RECYCLE)
         * @param {string} [presenceStatus]
         * @param {string} [presenceNote]
         * @param {Array<string>} [fields] // navigation filter repeated int64 roles &#x3D; 7; ----- Search Options -------------------------  select: output (fields,...)
         * @param {Array<string>} [sort] select: order by (fields,...)
         * @param {number} [page] select: offset {page}
         * @param {number} [size] select: limit {size}
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchUsers(id, notId, q, name, status, username, extension, any, deleted, presenceStatus, presenceNote, fields, sort, page, size, options) {
            return UsersApiFp(configuration)
                .searchUsers(id, notId, q, name, status, username, extension, any, deleted, presenceStatus, presenceNote, fields, sort, page, size, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {ApiSearchUsersRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchUsers2(body, options) {
            return UsersApiFp(configuration)
                .searchUsers2(body, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {string} userId Object ID
         * @param {BodyModificationsChanges} user
         * @param {Array<string>} [fields] PATCH: partial update
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateUser(userId, user, fields, options) {
            return UsersApiFp(configuration)
                .updateUser(userId, user, fields, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {string} userId Object ID
         * @param {BodyModificationsChanges1} user
         * @param {Array<string>} [fields] PATCH: partial update
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateUser2(userId, user, fields, options) {
            return UsersApiFp(configuration)
                .updateUser2(userId, user, fields, options)
                .then((request) => request(axios, basePath));
        },
    };
};
/**
 * UsersApi - object-oriented interface
 * @export
 * @class UsersApi
 * @extends {BaseAPI}
 */
export class UsersApi extends BaseAPI {
    /**
     *
     * @param {ApiCreateUserRequest} body
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof UsersApi
     */
    createUser(body, options) {
        return UsersApiFp(this.configuration)
            .createUser(body, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {string} id ONE /users/{id}
     * @param {Array<string>} [selection] MANY /users .ids&#x3D;[id,...]
     * @param {boolean} [permanent]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof UsersApi
     */
    deleteUsers(id, selection, permanent, options) {
        return UsersApiFp(this.configuration)
            .deleteUsers(id, selection, permanent, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {Array<string>} selection MANY /users .ids&#x3D;[id,...]
     * @param {string} [id] ONE /users/{id}
     * @param {boolean} [permanent]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof UsersApi
     */
    deleteUsers2(selection, id, permanent, options) {
        return UsersApiFp(this.configuration)
            .deleteUsers2(selection, id, permanent, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {string} id
     * @param {object} body
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof UsersApi
     */
    logoutUser(id, body, options) {
        return UsersApiFp(this.configuration)
            .logoutUser(id, body, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {string} id
     * @param {Array<string>} [fields] partial output
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof UsersApi
     */
    readUser(id, fields, options) {
        return UsersApiFp(this.configuration)
            .readUser(id, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {string} [id]
     * @param {Array<string>} [fields] partial output
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof UsersApi
     */
    readUser2(id, fields, options) {
        return UsersApiFp(this.configuration)
            .readUser2(id, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {Array<string>} [id] ----- Base Filters ---------------------------  filter: .id &#x3D; any({id}...)
     * @param {Array<string>} [notId] filter: .id &lt;&gt; all({not_ids}...)
     * @param {string} [q] ----- User-specific Filters ------------------  filter: (.name|.username|.extension|.status) ILIKE \&#39;{q}\&#39;
     * @param {string} [name] filter: .name ILIKE \&#39;{name}\&#39;
     * @param {string} [status] filter: .status ILIKE \&#39;{status}\&#39;
     * @param {string} [username] filter: .username ILIKE \&#39;{username}\&#39;
     * @param {string} [extension] filter: .extension LIKE \&#39;{extension}\&#39;
     * @param {boolean} [any] ----- View Modes ----------------------------- NOTE: by default, search NOT \&#39;deleted\&#39; objects ONLY  filter: include \&#39;deleted\&#39; ALSO ! (inactive)
     * @param {boolean} [deleted] filter: .deleted_at NOTNULL (view: RECYCLE)
     * @param {string} [presenceStatus]
     * @param {string} [presenceNote]
     * @param {Array<string>} [fields] // navigation filter repeated int64 roles &#x3D; 7; ----- Search Options -------------------------  select: output (fields,...)
     * @param {Array<string>} [sort] select: order by (fields,...)
     * @param {number} [page] select: offset {page}
     * @param {number} [size] select: limit {size}
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof UsersApi
     */
    searchUsers(id, notId, q, name, status, username, extension, any, deleted, presenceStatus, presenceNote, fields, sort, page, size, options) {
        return UsersApiFp(this.configuration)
            .searchUsers(id, notId, q, name, status, username, extension, any, deleted, presenceStatus, presenceNote, fields, sort, page, size, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {ApiSearchUsersRequest} body
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof UsersApi
     */
    searchUsers2(body, options) {
        return UsersApiFp(this.configuration)
            .searchUsers2(body, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {string} userId Object ID
     * @param {BodyModificationsChanges} user
     * @param {Array<string>} [fields] PATCH: partial update
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof UsersApi
     */
    updateUser(userId, user, fields, options) {
        return UsersApiFp(this.configuration)
            .updateUser(userId, user, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {string} userId Object ID
     * @param {BodyModificationsChanges1} user
     * @param {Array<string>} [fields] PATCH: partial update
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof UsersApi
     */
    updateUser2(userId, user, fields, options) {
        return UsersApiFp(this.configuration)
            .updateUser2(userId, user, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
}
//# sourceMappingURL=users-api.js.map