// 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';
/**
 * CloseReasonGroupsApi - axios parameter creator
 * @export
 */
export const CloseReasonGroupsApiAxiosParamCreator = function (configuration) {
    return {
        /**
         *
         * @summary Create a new close reason group
         * @param {WebitelCasesInputCloseReasonGroup} input
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createCloseReasonGroup: (input, fields, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'input' is not null or undefined
            if (input === null || input === undefined) {
                throw new RequiredError('input', 'Required parameter input was null or undefined when calling createCloseReasonGroup.');
            }
            const localVarPath = `/cases/close_reason_groups`;
            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;
            }
            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 input !== 'string' ||
                localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data = needsSerialization
                ? JSON.stringify(input !== undefined ? input : {})
                : input || '';
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        }),
        /**
         *
         * @summary Delete a close reason group
         * @param {string} id
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteCloseReasonGroup: (id, 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 deleteCloseReasonGroup.');
            }
            const localVarPath = `/cases/close_reason_groups/{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;
            }
            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,
            };
        }),
        /**
         *
         * @summary Retrieve a list of close reason groups or search close reason groups
         * @param {number} [page]
         * @param {number} [size]
         * @param {Array<string>} [fields]
         * @param {string} [sort]
         * @param {Array<string>} [id]
         * @param {string} [q]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listCloseReasonGroups: (page, size, fields, sort, id, q, options = {}) => __awaiter(this, void 0, void 0, function* () {
            const localVarPath = `/cases/close_reason_groups`;
            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 (page !== undefined) {
                localVarQueryParameter['page'] = page;
            }
            if (size !== undefined) {
                localVarQueryParameter['size'] = size;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            if (sort !== undefined) {
                localVarQueryParameter['sort'] = sort;
            }
            if (id) {
                localVarQueryParameter['id'] = id;
            }
            if (q !== undefined) {
                localVarQueryParameter['q'] = q;
            }
            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,
            };
        }),
        /**
         *
         * @summary Locate a close reason group by ID
         * @param {string} id
         * @param {Array<string>} [fields]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        locateCloseReasonGroup: (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 locateCloseReasonGroup.');
            }
            const localVarPath = `/cases/close_reason_groups/{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,
            };
        }),
        /**
         *
         * @summary Update an existing close reason group
         * @param {string} id
         * @param {WebitelCasesInputCloseReasonGroup} input
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateCloseReasonGroup: (id, input, 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 updateCloseReasonGroup.');
            }
            // verify required parameter 'input' is not null or undefined
            if (input === null || input === undefined) {
                throw new RequiredError('input', 'Required parameter input was null or undefined when calling updateCloseReasonGroup.');
            }
            const localVarPath = `/cases/close_reason_groups/{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: '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 input !== 'string' ||
                localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data = needsSerialization
                ? JSON.stringify(input !== undefined ? input : {})
                : input || '';
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        }),
        /**
         *
         * @summary Update an existing close reason group
         * @param {string} id
         * @param {WebitelCasesInputCloseReasonGroup} input
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateCloseReasonGroup2: (id, input, 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 updateCloseReasonGroup2.');
            }
            // verify required parameter 'input' is not null or undefined
            if (input === null || input === undefined) {
                throw new RequiredError('input', 'Required parameter input was null or undefined when calling updateCloseReasonGroup2.');
            }
            const localVarPath = `/cases/close_reason_groups/{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: '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 input !== 'string' ||
                localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data = needsSerialization
                ? JSON.stringify(input !== undefined ? input : {})
                : input || '';
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        }),
    };
};
/**
 * CloseReasonGroupsApi - functional programming interface
 * @export
 */
export const CloseReasonGroupsApiFp = function (configuration) {
    return {
        /**
         *
         * @summary Create a new close reason group
         * @param {WebitelCasesInputCloseReasonGroup} input
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createCloseReasonGroup(input, fields, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield CloseReasonGroupsApiAxiosParamCreator(configuration).createCloseReasonGroup(input, fields, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @summary Delete a close reason group
         * @param {string} id
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteCloseReasonGroup(id, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield CloseReasonGroupsApiAxiosParamCreator(configuration).deleteCloseReasonGroup(id, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @summary Retrieve a list of close reason groups or search close reason groups
         * @param {number} [page]
         * @param {number} [size]
         * @param {Array<string>} [fields]
         * @param {string} [sort]
         * @param {Array<string>} [id]
         * @param {string} [q]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listCloseReasonGroups(page, size, fields, sort, id, q, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield CloseReasonGroupsApiAxiosParamCreator(configuration).listCloseReasonGroups(page, size, fields, sort, id, q, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @summary Locate a close reason group by ID
         * @param {string} id
         * @param {Array<string>} [fields]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        locateCloseReasonGroup(id, fields, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield CloseReasonGroupsApiAxiosParamCreator(configuration).locateCloseReasonGroup(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);
                };
            });
        },
        /**
         *
         * @summary Update an existing close reason group
         * @param {string} id
         * @param {WebitelCasesInputCloseReasonGroup} input
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateCloseReasonGroup(id, input, fields, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield CloseReasonGroupsApiAxiosParamCreator(configuration).updateCloseReasonGroup(id, input, fields, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @summary Update an existing close reason group
         * @param {string} id
         * @param {WebitelCasesInputCloseReasonGroup} input
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateCloseReasonGroup2(id, input, fields, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield CloseReasonGroupsApiAxiosParamCreator(configuration).updateCloseReasonGroup2(id, input, fields, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
    };
};
/**
 * CloseReasonGroupsApi - factory interface
 * @export
 */
export const CloseReasonGroupsApiFactory = function (configuration, basePath, axios) {
    return {
        /**
         *
         * @summary Create a new close reason group
         * @param {WebitelCasesInputCloseReasonGroup} input
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createCloseReasonGroup(input, fields, options) {
            return CloseReasonGroupsApiFp(configuration)
                .createCloseReasonGroup(input, fields, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Delete a close reason group
         * @param {string} id
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteCloseReasonGroup(id, options) {
            return CloseReasonGroupsApiFp(configuration)
                .deleteCloseReasonGroup(id, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Retrieve a list of close reason groups or search close reason groups
         * @param {number} [page]
         * @param {number} [size]
         * @param {Array<string>} [fields]
         * @param {string} [sort]
         * @param {Array<string>} [id]
         * @param {string} [q]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listCloseReasonGroups(page, size, fields, sort, id, q, options) {
            return CloseReasonGroupsApiFp(configuration)
                .listCloseReasonGroups(page, size, fields, sort, id, q, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Locate a close reason group by ID
         * @param {string} id
         * @param {Array<string>} [fields]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        locateCloseReasonGroup(id, fields, options) {
            return CloseReasonGroupsApiFp(configuration)
                .locateCloseReasonGroup(id, fields, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Update an existing close reason group
         * @param {string} id
         * @param {WebitelCasesInputCloseReasonGroup} input
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateCloseReasonGroup(id, input, fields, options) {
            return CloseReasonGroupsApiFp(configuration)
                .updateCloseReasonGroup(id, input, fields, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Update an existing close reason group
         * @param {string} id
         * @param {WebitelCasesInputCloseReasonGroup} input
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateCloseReasonGroup2(id, input, fields, options) {
            return CloseReasonGroupsApiFp(configuration)
                .updateCloseReasonGroup2(id, input, fields, options)
                .then((request) => request(axios, basePath));
        },
    };
};
/**
 * CloseReasonGroupsApi - object-oriented interface
 * @export
 * @class CloseReasonGroupsApi
 * @extends {BaseAPI}
 */
export class CloseReasonGroupsApi extends BaseAPI {
    /**
     *
     * @summary Create a new close reason group
     * @param {WebitelCasesInputCloseReasonGroup} input
     * @param {Array<string>} [fields] Fields to be retrieved as a result.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CloseReasonGroupsApi
     */
    createCloseReasonGroup(input, fields, options) {
        return CloseReasonGroupsApiFp(this.configuration)
            .createCloseReasonGroup(input, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Delete a close reason group
     * @param {string} id
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CloseReasonGroupsApi
     */
    deleteCloseReasonGroup(id, options) {
        return CloseReasonGroupsApiFp(this.configuration)
            .deleteCloseReasonGroup(id, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Retrieve a list of close reason groups or search close reason groups
     * @param {number} [page]
     * @param {number} [size]
     * @param {Array<string>} [fields]
     * @param {string} [sort]
     * @param {Array<string>} [id]
     * @param {string} [q]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CloseReasonGroupsApi
     */
    listCloseReasonGroups(page, size, fields, sort, id, q, options) {
        return CloseReasonGroupsApiFp(this.configuration)
            .listCloseReasonGroups(page, size, fields, sort, id, q, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Locate a close reason group by ID
     * @param {string} id
     * @param {Array<string>} [fields]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CloseReasonGroupsApi
     */
    locateCloseReasonGroup(id, fields, options) {
        return CloseReasonGroupsApiFp(this.configuration)
            .locateCloseReasonGroup(id, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Update an existing close reason group
     * @param {string} id
     * @param {WebitelCasesInputCloseReasonGroup} input
     * @param {Array<string>} [fields] Fields to be retrieved as a result.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CloseReasonGroupsApi
     */
    updateCloseReasonGroup(id, input, fields, options) {
        return CloseReasonGroupsApiFp(this.configuration)
            .updateCloseReasonGroup(id, input, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Update an existing close reason group
     * @param {string} id
     * @param {WebitelCasesInputCloseReasonGroup} input
     * @param {Array<string>} [fields] Fields to be retrieved as a result.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof CloseReasonGroupsApi
     */
    updateCloseReasonGroup2(id, input, fields, options) {
        return CloseReasonGroupsApiFp(this.configuration)
            .updateCloseReasonGroup2(id, input, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
}
//# sourceMappingURL=close-reason-groups-api.js.map