// 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';
/**
 * AccessStoreApi - axios parameter creator
 * @export
 */
export const AccessStoreApiAxiosParamCreator = function (configuration) {
    return {
        /**
         *
         * @summary default: TODO: indicate objclass=default as a default rights repo
         * @param {string} objectName display name
         * @param {string} objectId identifier
         * @param {Array<string>} [grantor] --- filters ---  [optional] [FROM] each rule owner is any of role(s) id; user -or- role
         * @param {Array<string>} [grantee] [optional] [TO] subject role(s) id; user -or- role
         * @param {Array<string>} [granted] [xrwdxrwd] [R]ecord-[b]ased-[A]ccess-[C]ontrol level check(!)
         * @param {string} [q] [optional] [TO] subject.name ILIKE ?q&#x3D;; user -or- role
         * @param {Array<string>} [fields] ----- Select Options -------------------------  attributes list
         * @param {Array<string>} [sort] e.g.: \&quot;updated_at\&quot; - ASC; \&quot;!updated_at\&quot; - DESC;
         * @param {number} [size] pagedResultsControl  default: 16
         * @param {number} [page] default: 1
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listDefaultAccess: (objectName, objectId, grantor, grantee, granted, q, fields, sort, size, page, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'objectName' is not null or undefined
            if (objectName === null || objectName === undefined) {
                throw new RequiredError('objectName', 'Required parameter objectName was null or undefined when calling listDefaultAccess.');
            }
            // verify required parameter 'objectId' is not null or undefined
            if (objectId === null || objectId === undefined) {
                throw new RequiredError('objectId', 'Required parameter objectId was null or undefined when calling listDefaultAccess.');
            }
            const localVarPath = `/acl/{object.name}/{object.id}`
                .replace(`{${'object.name'}}`, encodeURIComponent(String(objectName)))
                .replace(`{${'object.id'}}`, encodeURIComponent(String(objectId)));
            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 (grantor) {
                localVarQueryParameter['grantor'] = grantor;
            }
            if (grantee) {
                localVarQueryParameter['grantee'] = grantee;
            }
            if (granted) {
                localVarQueryParameter['granted'] = granted;
            }
            if (q !== undefined) {
                localVarQueryParameter['q'] = q;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            if (sort) {
                localVarQueryParameter['sort'] = sort;
            }
            if (size !== undefined) {
                localVarQueryParameter['size'] = size;
            }
            if (page !== undefined) {
                localVarQueryParameter['page'] = page;
            }
            localVarUrlObj.query = Object.assign(Object.assign(Object.assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        }),
        /**
         *
         * @param {string} objectName display name
         * @param {string} objectId identifier
         * @param {Array<string>} [grantor] --- filters ---  [optional] [FROM] each rule owner is any of role(s) id; user -or- role
         * @param {Array<string>} [grantee] [optional] [TO] subject role(s) id; user -or- role
         * @param {Array<string>} [granted] [xrwdxrwd] [R]ecord-[b]ased-[A]ccess-[C]ontrol level check(!)
         * @param {string} [q] [optional] [TO] subject.name ILIKE ?q&#x3D;; user -or- role
         * @param {Array<string>} [fields] ----- Select Options -------------------------  attributes list
         * @param {Array<string>} [sort] e.g.: \&quot;updated_at\&quot; - ASC; \&quot;!updated_at\&quot; - DESC;
         * @param {number} [size] pagedResultsControl  default: 16
         * @param {number} [page] default: 1
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listObjectAccess: (objectName, objectId, grantor, grantee, granted, q, fields, sort, size, page, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'objectName' is not null or undefined
            if (objectName === null || objectName === undefined) {
                throw new RequiredError('objectName', 'Required parameter objectName was null or undefined when calling listObjectAccess.');
            }
            // verify required parameter 'objectId' is not null or undefined
            if (objectId === null || objectId === undefined) {
                throw new RequiredError('objectId', 'Required parameter objectId was null or undefined when calling listObjectAccess.');
            }
            const localVarPath = `/{object.name}/{object.id}/acl`
                .replace(`{${'object.name'}}`, encodeURIComponent(String(objectName)))
                .replace(`{${'object.id'}}`, encodeURIComponent(String(objectId)));
            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 (grantor) {
                localVarQueryParameter['grantor'] = grantor;
            }
            if (grantee) {
                localVarQueryParameter['grantee'] = grantee;
            }
            if (granted) {
                localVarQueryParameter['granted'] = granted;
            }
            if (q !== undefined) {
                localVarQueryParameter['q'] = q;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            if (sort) {
                localVarQueryParameter['sort'] = sort;
            }
            if (size !== undefined) {
                localVarQueryParameter['size'] = size;
            }
            if (page !== undefined) {
                localVarQueryParameter['page'] = page;
            }
            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 Same as UpdateAccess except for DEFAULT access control system
         * @param {string} objectName display name
         * @param {string} objectId identifier
         * @param {string} grantor [FOR] creator user/role
         * @param {ApiAccessStoreToggleDefaultAccessBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        toggleDefaultAccess: (objectName, objectId, grantor, body, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'objectName' is not null or undefined
            if (objectName === null || objectName === undefined) {
                throw new RequiredError('objectName', 'Required parameter objectName was null or undefined when calling toggleDefaultAccess.');
            }
            // verify required parameter 'objectId' is not null or undefined
            if (objectId === null || objectId === undefined) {
                throw new RequiredError('objectId', 'Required parameter objectId was null or undefined when calling toggleDefaultAccess.');
            }
            // verify required parameter 'grantor' is not null or undefined
            if (grantor === null || grantor === undefined) {
                throw new RequiredError('grantor', 'Required parameter grantor was null or undefined when calling toggleDefaultAccess.');
            }
            // 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 toggleDefaultAccess.');
            }
            const localVarPath = `/acl/{object.name}/{object.id}/grantor/{grantor}`
                .replace(`{${'object.name'}}`, encodeURIComponent(String(objectName)))
                .replace(`{${'object.id'}}`, encodeURIComponent(String(objectId)))
                .replace(`{${'grantor'}}`, encodeURIComponent(String(grantor)));
            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 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 TODO: replace with GrantAccess API, to become command like GRANT REVOKE ... with empty access rights string
         * @param {string} objectName display name
         * @param {string} objectId identifier
         * @param {Array<ApiGrantAccessRequestV1>} list
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        toggleObjectAccess: (objectName, objectId, list, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'objectName' is not null or undefined
            if (objectName === null || objectName === undefined) {
                throw new RequiredError('objectName', 'Required parameter objectName was null or undefined when calling toggleObjectAccess.');
            }
            // verify required parameter 'objectId' is not null or undefined
            if (objectId === null || objectId === undefined) {
                throw new RequiredError('objectId', 'Required parameter objectId was null or undefined when calling toggleObjectAccess.');
            }
            // verify required parameter 'list' is not null or undefined
            if (list === null || list === undefined) {
                throw new RequiredError('list', 'Required parameter list was null or undefined when calling toggleObjectAccess.');
            }
            const localVarPath = `/{object.name}/{object.id}/acl`
                .replace(`{${'object.name'}}`, encodeURIComponent(String(objectName)))
                .replace(`{${'object.id'}}`, encodeURIComponent(String(objectId)));
            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 list !== 'string' ||
                localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data = needsSerialization
                ? JSON.stringify(list !== undefined ? list : {})
                : list || '';
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        }),
    };
};
/**
 * AccessStoreApi - functional programming interface
 * @export
 */
export const AccessStoreApiFp = function (configuration) {
    return {
        /**
         *
         * @summary default: TODO: indicate objclass=default as a default rights repo
         * @param {string} objectName display name
         * @param {string} objectId identifier
         * @param {Array<string>} [grantor] --- filters ---  [optional] [FROM] each rule owner is any of role(s) id; user -or- role
         * @param {Array<string>} [grantee] [optional] [TO] subject role(s) id; user -or- role
         * @param {Array<string>} [granted] [xrwdxrwd] [R]ecord-[b]ased-[A]ccess-[C]ontrol level check(!)
         * @param {string} [q] [optional] [TO] subject.name ILIKE ?q&#x3D;; user -or- role
         * @param {Array<string>} [fields] ----- Select Options -------------------------  attributes list
         * @param {Array<string>} [sort] e.g.: \&quot;updated_at\&quot; - ASC; \&quot;!updated_at\&quot; - DESC;
         * @param {number} [size] pagedResultsControl  default: 16
         * @param {number} [page] default: 1
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listDefaultAccess(objectName, objectId, grantor, grantee, granted, q, fields, sort, size, page, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield AccessStoreApiAxiosParamCreator(configuration).listDefaultAccess(objectName, objectId, grantor, grantee, granted, q, fields, sort, size, page, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @param {string} objectName display name
         * @param {string} objectId identifier
         * @param {Array<string>} [grantor] --- filters ---  [optional] [FROM] each rule owner is any of role(s) id; user -or- role
         * @param {Array<string>} [grantee] [optional] [TO] subject role(s) id; user -or- role
         * @param {Array<string>} [granted] [xrwdxrwd] [R]ecord-[b]ased-[A]ccess-[C]ontrol level check(!)
         * @param {string} [q] [optional] [TO] subject.name ILIKE ?q&#x3D;; user -or- role
         * @param {Array<string>} [fields] ----- Select Options -------------------------  attributes list
         * @param {Array<string>} [sort] e.g.: \&quot;updated_at\&quot; - ASC; \&quot;!updated_at\&quot; - DESC;
         * @param {number} [size] pagedResultsControl  default: 16
         * @param {number} [page] default: 1
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listObjectAccess(objectName, objectId, grantor, grantee, granted, q, fields, sort, size, page, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield AccessStoreApiAxiosParamCreator(configuration).listObjectAccess(objectName, objectId, grantor, grantee, granted, q, fields, sort, size, page, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @summary Same as UpdateAccess except for DEFAULT access control system
         * @param {string} objectName display name
         * @param {string} objectId identifier
         * @param {string} grantor [FOR] creator user/role
         * @param {ApiAccessStoreToggleDefaultAccessBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        toggleDefaultAccess(objectName, objectId, grantor, body, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield AccessStoreApiAxiosParamCreator(configuration).toggleDefaultAccess(objectName, objectId, grantor, 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 TODO: replace with GrantAccess API, to become command like GRANT REVOKE ... with empty access rights string
         * @param {string} objectName display name
         * @param {string} objectId identifier
         * @param {Array<ApiGrantAccessRequestV1>} list
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        toggleObjectAccess(objectName, objectId, list, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield AccessStoreApiAxiosParamCreator(configuration).toggleObjectAccess(objectName, objectId, list, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
    };
};
/**
 * AccessStoreApi - factory interface
 * @export
 */
export const AccessStoreApiFactory = function (configuration, basePath, axios) {
    return {
        /**
         *
         * @summary default: TODO: indicate objclass=default as a default rights repo
         * @param {string} objectName display name
         * @param {string} objectId identifier
         * @param {Array<string>} [grantor] --- filters ---  [optional] [FROM] each rule owner is any of role(s) id; user -or- role
         * @param {Array<string>} [grantee] [optional] [TO] subject role(s) id; user -or- role
         * @param {Array<string>} [granted] [xrwdxrwd] [R]ecord-[b]ased-[A]ccess-[C]ontrol level check(!)
         * @param {string} [q] [optional] [TO] subject.name ILIKE ?q&#x3D;; user -or- role
         * @param {Array<string>} [fields] ----- Select Options -------------------------  attributes list
         * @param {Array<string>} [sort] e.g.: \&quot;updated_at\&quot; - ASC; \&quot;!updated_at\&quot; - DESC;
         * @param {number} [size] pagedResultsControl  default: 16
         * @param {number} [page] default: 1
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listDefaultAccess(objectName, objectId, grantor, grantee, granted, q, fields, sort, size, page, options) {
            return AccessStoreApiFp(configuration)
                .listDefaultAccess(objectName, objectId, grantor, grantee, granted, q, fields, sort, size, page, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @param {string} objectName display name
         * @param {string} objectId identifier
         * @param {Array<string>} [grantor] --- filters ---  [optional] [FROM] each rule owner is any of role(s) id; user -or- role
         * @param {Array<string>} [grantee] [optional] [TO] subject role(s) id; user -or- role
         * @param {Array<string>} [granted] [xrwdxrwd] [R]ecord-[b]ased-[A]ccess-[C]ontrol level check(!)
         * @param {string} [q] [optional] [TO] subject.name ILIKE ?q&#x3D;; user -or- role
         * @param {Array<string>} [fields] ----- Select Options -------------------------  attributes list
         * @param {Array<string>} [sort] e.g.: \&quot;updated_at\&quot; - ASC; \&quot;!updated_at\&quot; - DESC;
         * @param {number} [size] pagedResultsControl  default: 16
         * @param {number} [page] default: 1
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        listObjectAccess(objectName, objectId, grantor, grantee, granted, q, fields, sort, size, page, options) {
            return AccessStoreApiFp(configuration)
                .listObjectAccess(objectName, objectId, grantor, grantee, granted, q, fields, sort, size, page, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Same as UpdateAccess except for DEFAULT access control system
         * @param {string} objectName display name
         * @param {string} objectId identifier
         * @param {string} grantor [FOR] creator user/role
         * @param {ApiAccessStoreToggleDefaultAccessBody} body
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        toggleDefaultAccess(objectName, objectId, grantor, body, options) {
            return AccessStoreApiFp(configuration)
                .toggleDefaultAccess(objectName, objectId, grantor, body, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary TODO: replace with GrantAccess API, to become command like GRANT REVOKE ... with empty access rights string
         * @param {string} objectName display name
         * @param {string} objectId identifier
         * @param {Array<ApiGrantAccessRequestV1>} list
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        toggleObjectAccess(objectName, objectId, list, options) {
            return AccessStoreApiFp(configuration)
                .toggleObjectAccess(objectName, objectId, list, options)
                .then((request) => request(axios, basePath));
        },
    };
};
/**
 * AccessStoreApi - object-oriented interface
 * @export
 * @class AccessStoreApi
 * @extends {BaseAPI}
 */
export class AccessStoreApi extends BaseAPI {
    /**
     *
     * @summary default: TODO: indicate objclass=default as a default rights repo
     * @param {string} objectName display name
     * @param {string} objectId identifier
     * @param {Array<string>} [grantor] --- filters ---  [optional] [FROM] each rule owner is any of role(s) id; user -or- role
     * @param {Array<string>} [grantee] [optional] [TO] subject role(s) id; user -or- role
     * @param {Array<string>} [granted] [xrwdxrwd] [R]ecord-[b]ased-[A]ccess-[C]ontrol level check(!)
     * @param {string} [q] [optional] [TO] subject.name ILIKE ?q&#x3D;; user -or- role
     * @param {Array<string>} [fields] ----- Select Options -------------------------  attributes list
     * @param {Array<string>} [sort] e.g.: \&quot;updated_at\&quot; - ASC; \&quot;!updated_at\&quot; - DESC;
     * @param {number} [size] pagedResultsControl  default: 16
     * @param {number} [page] default: 1
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AccessStoreApi
     */
    listDefaultAccess(objectName, objectId, grantor, grantee, granted, q, fields, sort, size, page, options) {
        return AccessStoreApiFp(this.configuration)
            .listDefaultAccess(objectName, objectId, grantor, grantee, granted, q, fields, sort, size, page, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @param {string} objectName display name
     * @param {string} objectId identifier
     * @param {Array<string>} [grantor] --- filters ---  [optional] [FROM] each rule owner is any of role(s) id; user -or- role
     * @param {Array<string>} [grantee] [optional] [TO] subject role(s) id; user -or- role
     * @param {Array<string>} [granted] [xrwdxrwd] [R]ecord-[b]ased-[A]ccess-[C]ontrol level check(!)
     * @param {string} [q] [optional] [TO] subject.name ILIKE ?q&#x3D;; user -or- role
     * @param {Array<string>} [fields] ----- Select Options -------------------------  attributes list
     * @param {Array<string>} [sort] e.g.: \&quot;updated_at\&quot; - ASC; \&quot;!updated_at\&quot; - DESC;
     * @param {number} [size] pagedResultsControl  default: 16
     * @param {number} [page] default: 1
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AccessStoreApi
     */
    listObjectAccess(objectName, objectId, grantor, grantee, granted, q, fields, sort, size, page, options) {
        return AccessStoreApiFp(this.configuration)
            .listObjectAccess(objectName, objectId, grantor, grantee, granted, q, fields, sort, size, page, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Same as UpdateAccess except for DEFAULT access control system
     * @param {string} objectName display name
     * @param {string} objectId identifier
     * @param {string} grantor [FOR] creator user/role
     * @param {ApiAccessStoreToggleDefaultAccessBody} body
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AccessStoreApi
     */
    toggleDefaultAccess(objectName, objectId, grantor, body, options) {
        return AccessStoreApiFp(this.configuration)
            .toggleDefaultAccess(objectName, objectId, grantor, body, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary TODO: replace with GrantAccess API, to become command like GRANT REVOKE ... with empty access rights string
     * @param {string} objectName display name
     * @param {string} objectId identifier
     * @param {Array<ApiGrantAccessRequestV1>} list
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof AccessStoreApi
     */
    toggleObjectAccess(objectName, objectId, list, options) {
        return AccessStoreApiFp(this.configuration)
            .toggleObjectAccess(objectName, objectId, list, options)
            .then((request) => request(this.axios, this.basePath));
    }
}
//# sourceMappingURL=access-store-api.js.map