// 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';
/**
 * DynamicGroupsApi - axios parameter creator
 * @export
 */
export const DynamicGroupsApiAxiosParamCreator = function (configuration) {
    return {
        /**
         *
         * @summary Create a new dynamic group
         * @param {WebitelContactsCreateDynamicGroupRequest} body Request message for creating a new dynamic group.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createDynamicGroup: (body, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'body' is not null or undefined
            if (body === null || body === undefined) {
                throw new RequiredError('body', 'Required parameter body was null or undefined when calling createDynamicGroup.');
            }
            const localVarPath = `/contacts/groups/dynamic`;
            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 dynamic group
         * @param {string} id The unique ID of the dynamic group to delete.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteDynamicGroup: (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 deleteDynamicGroup.');
            }
            const localVarPath = `/contacts/groups/{id}/dynamic`.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 dynamic groups or search dynamic groups
         * @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 {Array<string>} [id] Filter by unique IDs.
         * @param {string} [q] Search term: group name; &#x60;?&#x60; - matches any one character &#x60;*&#x60; - matches 0 or more characters
         * @param {string} [name] Filter by group name.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listDynamicGroups: (page, size, fields, sort, id, q, name, options = {}) => __awaiter(this, void 0, void 0, function* () {
            const localVarPath = `/contacts/groups/dynamic`;
            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 (id) {
                localVarQueryParameter['id'] = id;
            }
            if (q !== undefined) {
                localVarQueryParameter['q'] = q;
            }
            if (name !== undefined) {
                localVarQueryParameter['name'] = name;
            }
            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 dynamic group by ID
         * @param {string} id
         * @param {Array<string>} [fields]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        locateDynamicGroup: (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 locateDynamicGroup.');
            }
            const localVarPath = `/contacts/groups/{id}/dynamic`.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 dynamic group
         * @param {string} id The unique ID of the dynamic group to update.
         * @param {WebitelContactsDynamicGroupInput} input Input details for the dynamic group.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateDynamicGroup: (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 updateDynamicGroup.');
            }
            // 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 updateDynamicGroup.');
            }
            const localVarPath = `/contacts/groups/{id}/dynamic`.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 dynamic group
         * @param {string} id The unique ID of the dynamic group to update.
         * @param {WebitelContactsDynamicGroupInput} input Input details for the dynamic group.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateDynamicGroup2: (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 updateDynamicGroup2.');
            }
            // 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 updateDynamicGroup2.');
            }
            const localVarPath = `/contacts/groups/{id}/dynamic`.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,
            };
        }),
    };
};
/**
 * DynamicGroupsApi - functional programming interface
 * @export
 */
export const DynamicGroupsApiFp = function (configuration) {
    return {
        /**
         *
         * @summary Create a new dynamic group
         * @param {WebitelContactsCreateDynamicGroupRequest} body Request message for creating a new dynamic group.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createDynamicGroup(body, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield DynamicGroupsApiAxiosParamCreator(configuration).createDynamicGroup(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 dynamic group
         * @param {string} id The unique ID of the dynamic group to delete.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteDynamicGroup(id, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield DynamicGroupsApiAxiosParamCreator(configuration).deleteDynamicGroup(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 dynamic groups or search dynamic groups
         * @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 {Array<string>} [id] Filter by unique IDs.
         * @param {string} [q] Search term: group name; &#x60;?&#x60; - matches any one character &#x60;*&#x60; - matches 0 or more characters
         * @param {string} [name] Filter by group name.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listDynamicGroups(page, size, fields, sort, id, q, name, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield DynamicGroupsApiAxiosParamCreator(configuration).listDynamicGroups(page, size, fields, sort, id, q, name, 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 dynamic group by ID
         * @param {string} id
         * @param {Array<string>} [fields]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        locateDynamicGroup(id, fields, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield DynamicGroupsApiAxiosParamCreator(configuration).locateDynamicGroup(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 dynamic group
         * @param {string} id The unique ID of the dynamic group to update.
         * @param {WebitelContactsDynamicGroupInput} input Input details for the dynamic group.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateDynamicGroup(id, input, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield DynamicGroupsApiAxiosParamCreator(configuration).updateDynamicGroup(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 dynamic group
         * @param {string} id The unique ID of the dynamic group to update.
         * @param {WebitelContactsDynamicGroupInput} input Input details for the dynamic group.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateDynamicGroup2(id, input, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield DynamicGroupsApiAxiosParamCreator(configuration).updateDynamicGroup2(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);
                };
            });
        },
    };
};
/**
 * DynamicGroupsApi - factory interface
 * @export
 */
export const DynamicGroupsApiFactory = function (configuration, basePath, axios) {
    return {
        /**
         *
         * @summary Create a new dynamic group
         * @param {WebitelContactsCreateDynamicGroupRequest} body Request message for creating a new dynamic group.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        createDynamicGroup(body, options) {
            return DynamicGroupsApiFp(configuration)
                .createDynamicGroup(body, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Delete a dynamic group
         * @param {string} id The unique ID of the dynamic group to delete.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        deleteDynamicGroup(id, options) {
            return DynamicGroupsApiFp(configuration)
                .deleteDynamicGroup(id, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Retrieve a list of dynamic groups or search dynamic groups
         * @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 {Array<string>} [id] Filter by unique IDs.
         * @param {string} [q] Search term: group name; &#x60;?&#x60; - matches any one character &#x60;*&#x60; - matches 0 or more characters
         * @param {string} [name] Filter by group name.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listDynamicGroups(page, size, fields, sort, id, q, name, options) {
            return DynamicGroupsApiFp(configuration)
                .listDynamicGroups(page, size, fields, sort, id, q, name, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Locate a dynamic group by ID
         * @param {string} id
         * @param {Array<string>} [fields]
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        locateDynamicGroup(id, fields, options) {
            return DynamicGroupsApiFp(configuration)
                .locateDynamicGroup(id, fields, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Update an existing dynamic group
         * @param {string} id The unique ID of the dynamic group to update.
         * @param {WebitelContactsDynamicGroupInput} input Input details for the dynamic group.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateDynamicGroup(id, input, options) {
            return DynamicGroupsApiFp(configuration)
                .updateDynamicGroup(id, input, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Update an existing dynamic group
         * @param {string} id The unique ID of the dynamic group to update.
         * @param {WebitelContactsDynamicGroupInput} input Input details for the dynamic group.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        updateDynamicGroup2(id, input, options) {
            return DynamicGroupsApiFp(configuration)
                .updateDynamicGroup2(id, input, options)
                .then((request) => request(axios, basePath));
        },
    };
};
/**
 * DynamicGroupsApi - object-oriented interface
 * @export
 * @class DynamicGroupsApi
 * @extends {BaseAPI}
 */
export class DynamicGroupsApi extends BaseAPI {
    /**
     *
     * @summary Create a new dynamic group
     * @param {WebitelContactsCreateDynamicGroupRequest} body Request message for creating a new dynamic group.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DynamicGroupsApi
     */
    createDynamicGroup(body, options) {
        return DynamicGroupsApiFp(this.configuration)
            .createDynamicGroup(body, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Delete a dynamic group
     * @param {string} id The unique ID of the dynamic group to delete.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DynamicGroupsApi
     */
    deleteDynamicGroup(id, options) {
        return DynamicGroupsApiFp(this.configuration)
            .deleteDynamicGroup(id, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Retrieve a list of dynamic groups or search dynamic groups
     * @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 {Array<string>} [id] Filter by unique IDs.
     * @param {string} [q] Search term: group name; &#x60;?&#x60; - matches any one character &#x60;*&#x60; - matches 0 or more characters
     * @param {string} [name] Filter by group name.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DynamicGroupsApi
     */
    listDynamicGroups(page, size, fields, sort, id, q, name, options) {
        return DynamicGroupsApiFp(this.configuration)
            .listDynamicGroups(page, size, fields, sort, id, q, name, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Locate a dynamic group by ID
     * @param {string} id
     * @param {Array<string>} [fields]
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DynamicGroupsApi
     */
    locateDynamicGroup(id, fields, options) {
        return DynamicGroupsApiFp(this.configuration)
            .locateDynamicGroup(id, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Update an existing dynamic group
     * @param {string} id The unique ID of the dynamic group to update.
     * @param {WebitelContactsDynamicGroupInput} input Input details for the dynamic group.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DynamicGroupsApi
     */
    updateDynamicGroup(id, input, options) {
        return DynamicGroupsApiFp(this.configuration)
            .updateDynamicGroup(id, input, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Update an existing dynamic group
     * @param {string} id The unique ID of the dynamic group to update.
     * @param {WebitelContactsDynamicGroupInput} input Input details for the dynamic group.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof DynamicGroupsApi
     */
    updateDynamicGroup2(id, input, options) {
        return DynamicGroupsApiFp(this.configuration)
            .updateDynamicGroup2(id, input, options)
            .then((request) => request(this.axios, this.basePath));
    }
}
//# sourceMappingURL=dynamic-groups-api.js.map