// 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';
/**
 * DynamicConditionsApi - axios parameter creator
 * @export
 */
export const DynamicConditionsApiAxiosParamCreator = function (configuration) {
    return {
        /**
         *
         * @summary Create a new condition
         * @param {string} groupId The ID of the group to which the condition belongs.
         * @param {WebitelContactsDynamicConditionsCreateConditionBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createCondition: (groupId, body, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'groupId' is not null or undefined
            if (groupId === null || groupId === undefined) {
                throw new RequiredError('groupId', 'Required parameter groupId was null or undefined when calling createCondition.');
            }
            // 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 createCondition.');
            }
            const localVarPath = `/contacts/groups/{group_id}/conditions`.replace(`{${'group_id'}}`, encodeURIComponent(String(groupId)));
            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,
            };
        }),
        /**
         *
         * @summary Delete a condition
         * @param {string} id The unique ID of the condition to delete.  Unique ID of the condition.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteCondition: (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 deleteCondition.');
            }
            const localVarPath = `/contacts/groups/conditions/{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 conditions
         * @param {string} groupId The ID of the group to which the conditions belong.
         * @param {number} [page] Page number of result dataset records. offset &#x3D; (page*size)
         * @param {number} [size] Size count of records on result page. limit &#x3D; (size++)
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {Array<string>} [sort] Sort the result according to fields.
         * @param {string} [q] Search term for conditions.
         * @param {Array<string>} [id] Filter by unique IDs.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listConditions: (groupId, page, size, fields, sort, q, id, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'groupId' is not null or undefined
            if (groupId === null || groupId === undefined) {
                throw new RequiredError('groupId', 'Required parameter groupId was null or undefined when calling listConditions.');
            }
            const localVarPath = `/contacts/groups/{group_id}/conditions`.replace(`{${'group_id'}}`, encodeURIComponent(String(groupId)));
            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) {
                localVarQueryParameter['sort'] = sort;
            }
            if (q !== undefined) {
                localVarQueryParameter['q'] = q;
            }
            if (id) {
                localVarQueryParameter['id'] = id;
            }
            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 condition by ID
         * @param {string} id Unique ID of the condition.
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        locateCondition: (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 locateCondition.');
            }
            const localVarPath = `/contacts/groups/conditions/{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 condition
         * @param {string} id The unique ID of the condition to update.
         * @param {WebitelContactsInputCondition} input Input details for the condition.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateCondition: (id, input, 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 updateCondition.');
            }
            // 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 updateCondition.');
            }
            const localVarPath = `/contacts/groups/conditions/{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;
            }
            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 condition
         * @param {string} id The unique ID of the condition to update.
         * @param {WebitelContactsInputCondition} input Input details for the condition.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateCondition2: (id, input, 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 updateCondition2.');
            }
            // 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 updateCondition2.');
            }
            const localVarPath = `/contacts/groups/conditions/{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;
            }
            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,
            };
        }),
    };
};
/**
 * DynamicConditionsApi - functional programming interface
 * @export
 */
export const DynamicConditionsApiFp = function (configuration) {
    return {
        /**
         *
         * @summary Create a new condition
         * @param {string} groupId The ID of the group to which the condition belongs.
         * @param {WebitelContactsDynamicConditionsCreateConditionBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createCondition(groupId, body, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield DynamicConditionsApiAxiosParamCreator(configuration).createCondition(groupId, body, 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 condition
         * @param {string} id The unique ID of the condition to delete.  Unique ID of the condition.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteCondition(id, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield DynamicConditionsApiAxiosParamCreator(configuration).deleteCondition(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 conditions
         * @param {string} groupId The ID of the group to which the conditions belong.
         * @param {number} [page] Page number of result dataset records. offset &#x3D; (page*size)
         * @param {number} [size] Size count of records on result page. limit &#x3D; (size++)
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {Array<string>} [sort] Sort the result according to fields.
         * @param {string} [q] Search term for conditions.
         * @param {Array<string>} [id] Filter by unique IDs.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listConditions(groupId, page, size, fields, sort, q, id, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield DynamicConditionsApiAxiosParamCreator(configuration).listConditions(groupId, page, size, fields, sort, q, 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 Locate a condition by ID
         * @param {string} id Unique ID of the condition.
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        locateCondition(id, fields, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield DynamicConditionsApiAxiosParamCreator(configuration).locateCondition(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 condition
         * @param {string} id The unique ID of the condition to update.
         * @param {WebitelContactsInputCondition} input Input details for the condition.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateCondition(id, input, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield DynamicConditionsApiAxiosParamCreator(configuration).updateCondition(id, input, 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 condition
         * @param {string} id The unique ID of the condition to update.
         * @param {WebitelContactsInputCondition} input Input details for the condition.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateCondition2(id, input, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield DynamicConditionsApiAxiosParamCreator(configuration).updateCondition2(id, input, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
    };
};
/**
 * DynamicConditionsApi - factory interface
 * @export
 */
export const DynamicConditionsApiFactory = function (configuration, basePath, axios) {
    return {
        /**
         *
         * @summary Create a new condition
         * @param {string} groupId The ID of the group to which the condition belongs.
         * @param {WebitelContactsDynamicConditionsCreateConditionBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createCondition(groupId, body, options) {
            return DynamicConditionsApiFp(configuration)
                .createCondition(groupId, body, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Delete a condition
         * @param {string} id The unique ID of the condition to delete.  Unique ID of the condition.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteCondition(id, options) {
            return DynamicConditionsApiFp(configuration)
                .deleteCondition(id, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Retrieve a list of conditions
         * @param {string} groupId The ID of the group to which the conditions belong.
         * @param {number} [page] Page number of result dataset records. offset &#x3D; (page*size)
         * @param {number} [size] Size count of records on result page. limit &#x3D; (size++)
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {Array<string>} [sort] Sort the result according to fields.
         * @param {string} [q] Search term for conditions.
         * @param {Array<string>} [id] Filter by unique IDs.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listConditions(groupId, page, size, fields, sort, q, id, options) {
            return DynamicConditionsApiFp(configuration)
                .listConditions(groupId, page, size, fields, sort, q, id, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Locate a condition by ID
         * @param {string} id Unique ID of the condition.
         * @param {Array<string>} [fields] Fields to be retrieved as a result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        locateCondition(id, fields, options) {
            return DynamicConditionsApiFp(configuration)
                .locateCondition(id, fields, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Update an existing condition
         * @param {string} id The unique ID of the condition to update.
         * @param {WebitelContactsInputCondition} input Input details for the condition.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateCondition(id, input, options) {
            return DynamicConditionsApiFp(configuration)
                .updateCondition(id, input, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Update an existing condition
         * @param {string} id The unique ID of the condition to update.
         * @param {WebitelContactsInputCondition} input Input details for the condition.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateCondition2(id, input, options) {
            return DynamicConditionsApiFp(configuration)
                .updateCondition2(id, input, options)
                .then((request) => request(axios, basePath));
        },
    };
};
/**
 * DynamicConditionsApi - object-oriented interface
 * @export
 * @class DynamicConditionsApi
 * @extends {BaseAPI}
 */
export class DynamicConditionsApi extends BaseAPI {
    /**
     *
     * @summary Create a new condition
     * @param {string} groupId The ID of the group to which the condition belongs.
     * @param {WebitelContactsDynamicConditionsCreateConditionBody} body
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DynamicConditionsApi
     */
    createCondition(groupId, body, options) {
        return DynamicConditionsApiFp(this.configuration)
            .createCondition(groupId, body, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Delete a condition
     * @param {string} id The unique ID of the condition to delete.  Unique ID of the condition.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DynamicConditionsApi
     */
    deleteCondition(id, options) {
        return DynamicConditionsApiFp(this.configuration)
            .deleteCondition(id, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Retrieve a list of conditions
     * @param {string} groupId The ID of the group to which the conditions belong.
     * @param {number} [page] Page number of result dataset records. offset &#x3D; (page*size)
     * @param {number} [size] Size count of records on result page. limit &#x3D; (size++)
     * @param {Array<string>} [fields] Fields to be retrieved as a result.
     * @param {Array<string>} [sort] Sort the result according to fields.
     * @param {string} [q] Search term for conditions.
     * @param {Array<string>} [id] Filter by unique IDs.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DynamicConditionsApi
     */
    listConditions(groupId, page, size, fields, sort, q, id, options) {
        return DynamicConditionsApiFp(this.configuration)
            .listConditions(groupId, page, size, fields, sort, q, id, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Locate a condition by ID
     * @param {string} id Unique ID of the condition.
     * @param {Array<string>} [fields] Fields to be retrieved as a result.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DynamicConditionsApi
     */
    locateCondition(id, fields, options) {
        return DynamicConditionsApiFp(this.configuration)
            .locateCondition(id, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Update an existing condition
     * @param {string} id The unique ID of the condition to update.
     * @param {WebitelContactsInputCondition} input Input details for the condition.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DynamicConditionsApi
     */
    updateCondition(id, input, options) {
        return DynamicConditionsApiFp(this.configuration)
            .updateCondition(id, input, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Update an existing condition
     * @param {string} id The unique ID of the condition to update.
     * @param {WebitelContactsInputCondition} input Input details for the condition.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DynamicConditionsApi
     */
    updateCondition2(id, input, options) {
        return DynamicConditionsApiFp(this.configuration)
            .updateCondition2(id, input, options)
            .then((request) => request(this.axios, this.basePath));
    }
}
//# sourceMappingURL=dynamic-conditions-api.js.map