// 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';
/**
 * AgentAbsenceServiceApi - axios parameter creator
 * @export
 */
export const AgentAbsenceServiceApiAxiosParamCreator = function (configuration) {
    return {
        /**
         *
         * @summary Creates one-day-absence for one agent.
         * @param {string} agentId
         * @param {InlineObject4} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createAgentAbsence: async (agentId, body, options = {}) => {
            // verify required parameter 'agentId' is not null or undefined
            if (agentId === null || agentId === undefined) {
                throw new RequiredError('agentId', 'Required parameter agentId was null or undefined when calling createAgentAbsence.');
            }
            // 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 createAgentAbsence.');
            }
            const localVarPath = `/wfm/agents/{agent_id}/absences`.replace(`{${'agent_id'}}`, encodeURIComponent(String(agentId)));
            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 Creates absences for multiple specified agents.
         * @param {WfmCreateAgentsAbsencesRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createAgentsAbsences: 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 createAgentsAbsences.');
            }
            const localVarPath = `/wfm/agents/absences`;
            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 Deletes agent concrete absence by its id.
         * @param {string} agentId
         * @param {string} id
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteAgentAbsence: async (agentId, id, options = {}) => {
            // verify required parameter 'agentId' is not null or undefined
            if (agentId === null || agentId === undefined) {
                throw new RequiredError('agentId', 'Required parameter agentId was null or undefined when calling deleteAgentAbsence.');
            }
            // 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 deleteAgentAbsence.');
            }
            const localVarPath = `/wfm/agents/{agent_id}/absences/{id}`
                .replace(`{${'agent_id'}}`, encodeURIComponent(String(agentId)))
                .replace(`{${'id'}}`, encodeURIComponent(String(id)));
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = {
                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;
            }
            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 Reads one absence per agent by its id.
         * @param {string} agentId
         * @param {string} id
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        readAgentAbsence: async (agentId, id, options = {}) => {
            // verify required parameter 'agentId' is not null or undefined
            if (agentId === null || agentId === undefined) {
                throw new RequiredError('agentId', 'Required parameter agentId was null or undefined when calling readAgentAbsence.');
            }
            // 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 readAgentAbsence.');
            }
            const localVarPath = `/wfm/agents/{agent_id}/absences/{id}`
                .replace(`{${'agent_id'}}`, encodeURIComponent(String(agentId)))
                .replace(`{${'id'}}`, encodeURIComponent(String(id)));
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = {
                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;
            }
            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 Searches agent absences by filters.
         * @param {string} agentId
         * @param {number} [page]
         * @param {number} [size]
         * @param {string} [sort]
         * @param {Array<string>} [fields]
         * @param {Array<string>} [filters]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchAgentAbsence: async (agentId, page, size, sort, fields, filters, options = {}) => {
            // verify required parameter 'agentId' is not null or undefined
            if (agentId === null || agentId === undefined) {
                throw new RequiredError('agentId', 'Required parameter agentId was null or undefined when calling searchAgentAbsence.');
            }
            const localVarPath = `/wfm/agents/{agent_id}/absences`.replace(`{${'agent_id'}}`, encodeURIComponent(String(agentId)));
            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 (sort !== undefined) {
                localVarQueryParameter['sort'] = sort;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            if (filters) {
                localVarQueryParameter['filters'] = filters;
            }
            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 Searches absences by filters.
         * @param {string} [q] Searches by agent name.
         * @param {number} [page]
         * @param {number} [size]
         * @param {string} [sort]
         * @param {Array<string>} [fields]
         * @param {Array<string>} [filters]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchAgentsAbsences: async (q, page, size, sort, fields, filters, options = {}) => {
            const localVarPath = `/wfm/agents/absences`;
            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 (q !== undefined) {
                localVarQueryParameter['q'] = q;
            }
            if (page !== undefined) {
                localVarQueryParameter['page'] = page;
            }
            if (size !== undefined) {
                localVarQueryParameter['size'] = size;
            }
            if (sort !== undefined) {
                localVarQueryParameter['sort'] = sort;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            if (filters) {
                localVarQueryParameter['filters'] = filters;
            }
            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 Updates agent concrete absence by its id.
         * @param {string} agentId
         * @param {string} itemId
         * @param {InlineObject5} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateAgentAbsence: async (agentId, itemId, body, options = {}) => {
            // verify required parameter 'agentId' is not null or undefined
            if (agentId === null || agentId === undefined) {
                throw new RequiredError('agentId', 'Required parameter agentId was null or undefined when calling updateAgentAbsence.');
            }
            // verify required parameter 'itemId' is not null or undefined
            if (itemId === null || itemId === undefined) {
                throw new RequiredError('itemId', 'Required parameter itemId was null or undefined when calling updateAgentAbsence.');
            }
            // 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 updateAgentAbsence.');
            }
            const localVarPath = `/wfm/agents/{agent_id}/absences/{item.id}`
                .replace(`{${'agent_id'}}`, encodeURIComponent(String(agentId)))
                .replace(`{${'item.id'}}`, encodeURIComponent(String(itemId)));
            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,
            };
        },
    };
};
/**
 * AgentAbsenceServiceApi - functional programming interface
 * @export
 */
export const AgentAbsenceServiceApiFp = function (configuration) {
    return {
        /**
         *
         * @summary Creates one-day-absence for one agent.
         * @param {string} agentId
         * @param {InlineObject4} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createAgentAbsence(agentId, body, options) {
            const localVarAxiosArgs = await AgentAbsenceServiceApiAxiosParamCreator(configuration).createAgentAbsence(agentId, body, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary Creates absences for multiple specified agents.
         * @param {WfmCreateAgentsAbsencesRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async createAgentsAbsences(body, options) {
            const localVarAxiosArgs = await AgentAbsenceServiceApiAxiosParamCreator(configuration).createAgentsAbsences(body, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary Deletes agent concrete absence by its id.
         * @param {string} agentId
         * @param {string} id
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async deleteAgentAbsence(agentId, id, options) {
            const localVarAxiosArgs = await AgentAbsenceServiceApiAxiosParamCreator(configuration).deleteAgentAbsence(agentId, id, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary Reads one absence per agent by its id.
         * @param {string} agentId
         * @param {string} id
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async readAgentAbsence(agentId, id, options) {
            const localVarAxiosArgs = await AgentAbsenceServiceApiAxiosParamCreator(configuration).readAgentAbsence(agentId, id, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary Searches agent absences by filters.
         * @param {string} agentId
         * @param {number} [page]
         * @param {number} [size]
         * @param {string} [sort]
         * @param {Array<string>} [fields]
         * @param {Array<string>} [filters]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async searchAgentAbsence(agentId, page, size, sort, fields, filters, options) {
            const localVarAxiosArgs = await AgentAbsenceServiceApiAxiosParamCreator(configuration).searchAgentAbsence(agentId, page, size, sort, fields, filters, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary Searches absences by filters.
         * @param {string} [q] Searches by agent name.
         * @param {number} [page]
         * @param {number} [size]
         * @param {string} [sort]
         * @param {Array<string>} [fields]
         * @param {Array<string>} [filters]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async searchAgentsAbsences(q, page, size, sort, fields, filters, options) {
            const localVarAxiosArgs = await AgentAbsenceServiceApiAxiosParamCreator(configuration).searchAgentsAbsences(q, page, size, sort, fields, filters, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
        /**
         *
         * @summary Updates agent concrete absence by its id.
         * @param {string} agentId
         * @param {string} itemId
         * @param {InlineObject5} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        async updateAgentAbsence(agentId, itemId, body, options) {
            const localVarAxiosArgs = await AgentAbsenceServiceApiAxiosParamCreator(configuration).updateAgentAbsence(agentId, itemId, body, options);
            return (axios = globalAxios, basePath = BASE_PATH) => {
                const axiosRequestArgs = {
                    ...localVarAxiosArgs.options,
                    url: basePath + localVarAxiosArgs.url,
                };
                return axios.request(axiosRequestArgs);
            };
        },
    };
};
/**
 * AgentAbsenceServiceApi - factory interface
 * @export
 */
export const AgentAbsenceServiceApiFactory = function (configuration, basePath, axios) {
    return {
        /**
         *
         * @summary Creates one-day-absence for one agent.
         * @param {string} agentId
         * @param {InlineObject4} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createAgentAbsence(agentId, body, options) {
            return AgentAbsenceServiceApiFp(configuration)
                .createAgentAbsence(agentId, body, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Creates absences for multiple specified agents.
         * @param {WfmCreateAgentsAbsencesRequest} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createAgentsAbsences(body, options) {
            return AgentAbsenceServiceApiFp(configuration)
                .createAgentsAbsences(body, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Deletes agent concrete absence by its id.
         * @param {string} agentId
         * @param {string} id
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteAgentAbsence(agentId, id, options) {
            return AgentAbsenceServiceApiFp(configuration)
                .deleteAgentAbsence(agentId, id, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Reads one absence per agent by its id.
         * @param {string} agentId
         * @param {string} id
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        readAgentAbsence(agentId, id, options) {
            return AgentAbsenceServiceApiFp(configuration)
                .readAgentAbsence(agentId, id, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Searches agent absences by filters.
         * @param {string} agentId
         * @param {number} [page]
         * @param {number} [size]
         * @param {string} [sort]
         * @param {Array<string>} [fields]
         * @param {Array<string>} [filters]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchAgentAbsence(agentId, page, size, sort, fields, filters, options) {
            return AgentAbsenceServiceApiFp(configuration)
                .searchAgentAbsence(agentId, page, size, sort, fields, filters, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Searches absences by filters.
         * @param {string} [q] Searches by agent name.
         * @param {number} [page]
         * @param {number} [size]
         * @param {string} [sort]
         * @param {Array<string>} [fields]
         * @param {Array<string>} [filters]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        searchAgentsAbsences(q, page, size, sort, fields, filters, options) {
            return AgentAbsenceServiceApiFp(configuration)
                .searchAgentsAbsences(q, page, size, sort, fields, filters, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Updates agent concrete absence by its id.
         * @param {string} agentId
         * @param {string} itemId
         * @param {InlineObject5} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateAgentAbsence(agentId, itemId, body, options) {
            return AgentAbsenceServiceApiFp(configuration)
                .updateAgentAbsence(agentId, itemId, body, options)
                .then((request) => request(axios, basePath));
        },
    };
};
/**
 * AgentAbsenceServiceApi - object-oriented interface
 * @export
 * @class AgentAbsenceServiceApi
 * @extends {BaseAPI}
 */
export class AgentAbsenceServiceApi extends BaseAPI {
    /**
     *
     * @summary Creates one-day-absence for one agent.
     * @param {string} agentId
     * @param {InlineObject4} body
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AgentAbsenceServiceApi
     */
    createAgentAbsence(agentId, body, options) {
        return AgentAbsenceServiceApiFp(this.configuration)
            .createAgentAbsence(agentId, body, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Creates absences for multiple specified agents.
     * @param {WfmCreateAgentsAbsencesRequest} body
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AgentAbsenceServiceApi
     */
    createAgentsAbsences(body, options) {
        return AgentAbsenceServiceApiFp(this.configuration)
            .createAgentsAbsences(body, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Deletes agent concrete absence by its id.
     * @param {string} agentId
     * @param {string} id
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AgentAbsenceServiceApi
     */
    deleteAgentAbsence(agentId, id, options) {
        return AgentAbsenceServiceApiFp(this.configuration)
            .deleteAgentAbsence(agentId, id, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Reads one absence per agent by its id.
     * @param {string} agentId
     * @param {string} id
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AgentAbsenceServiceApi
     */
    readAgentAbsence(agentId, id, options) {
        return AgentAbsenceServiceApiFp(this.configuration)
            .readAgentAbsence(agentId, id, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Searches agent absences by filters.
     * @param {string} agentId
     * @param {number} [page]
     * @param {number} [size]
     * @param {string} [sort]
     * @param {Array<string>} [fields]
     * @param {Array<string>} [filters]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AgentAbsenceServiceApi
     */
    searchAgentAbsence(agentId, page, size, sort, fields, filters, options) {
        return AgentAbsenceServiceApiFp(this.configuration)
            .searchAgentAbsence(agentId, page, size, sort, fields, filters, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Searches absences by filters.
     * @param {string} [q] Searches by agent name.
     * @param {number} [page]
     * @param {number} [size]
     * @param {string} [sort]
     * @param {Array<string>} [fields]
     * @param {Array<string>} [filters]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AgentAbsenceServiceApi
     */
    searchAgentsAbsences(q, page, size, sort, fields, filters, options) {
        return AgentAbsenceServiceApiFp(this.configuration)
            .searchAgentsAbsences(q, page, size, sort, fields, filters, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Updates agent concrete absence by its id.
     * @param {string} agentId
     * @param {string} itemId
     * @param {InlineObject5} body
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AgentAbsenceServiceApi
     */
    updateAgentAbsence(agentId, itemId, body, options) {
        return AgentAbsenceServiceApiFp(this.configuration)
            .updateAgentAbsence(agentId, itemId, body, options)
            .then((request) => request(this.axios, this.basePath));
    }
}
//# sourceMappingURL=agent-absence-service-api.js.map