// 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';
/**
 * RecordsApi - axios parameter creator
 * @export
 */
export const RecordsApiAxiosParamCreator = function (configuration) {
    return {
        /**
         *
         * @summary Delete dataset records
         * @param {string} repo [&#x60;types.repo&#x60;]
         * @param {Array<string>} id [&#x60;record.id&#x60;]
         * @param {Array<string>} [fields] Fields to be retrieved into result dataset.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        _delete: (repo, id, fields, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'repo' is not null or undefined
            if (repo === null || repo === undefined) {
                throw new RequiredError('repo', 'Required parameter repo was null or undefined when calling _delete.');
            }
            // 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 _delete.');
            }
            const localVarPath = `/v2/dataset/{repo}`.replace(`{${'repo'}}`, encodeURIComponent(String(repo)));
            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;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            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,
            };
        }),
        /**
         * (Record) {
         * @summary Create dataset record
         * @param {string} repo [&#x60;types.repo&#x60;]
         * @param {object} record Record data.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        create: (repo, record, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'repo' is not null or undefined
            if (repo === null || repo === undefined) {
                throw new RequiredError('repo', 'Required parameter repo was null or undefined when calling create.');
            }
            // verify required parameter 'record' is not null or undefined
            if (record === null || record === undefined) {
                throw new RequiredError('record', 'Required parameter record was null or undefined when calling create.');
            }
            const localVarPath = `/v2/dataset/{repo}`.replace(`{${'repo'}}`, encodeURIComponent(String(repo)));
            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 record !== 'string' ||
                localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data = needsSerialization
                ? JSON.stringify(record !== undefined ? record : {})
                : record || '';
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        }),
        /**
         *
         * @summary Search dataset records
         * @param {string} repo [&#x60;types.repo&#x60;]
         * @param {number} [size] Number of result records (per page). Default: 16.
         * @param {number} [page] Page number of result set of records. Default: 1.
         * @param {Array<string>} [sort] Sort result dataset of records by fields. &#x60;&#x60;&#x60; sort ::&#x3D; *( ORDER name )  ORDER  &#x3D; ASC / DESC DESC   &#x3D; \&quot;-\&quot; / \&quot;!\&quot; ASC    &#x3D; [ \&quot;+\&quot; ]   ; Default &#x60;&#x60;&#x60;  Fields available  - &#x60;id&#x60;(seq) - &#x60;domain&#x60;{name} - &#x60;created_at&#x60; - &#x60;created_by&#x60;{name} - &#x60;updated_at&#x60; - &#x60;updated_by&#x60;{name}  Use ?fields&#x3D;&#x60;field.sort()&#x60; option to sort Edge fields.
         * @param {Array<string>} [fields] Fields [Q]uery to build result dataset record. &#x60;&#x60;&#x60; fields ::&#x3D; field [ *( \&quot;,\&quot; field ) ] field  ::&#x3D; name [ *( func ) ] [ inner ] inner  ::&#x3D; \&quot;{\&quot; fields \&quot;}\&quot; funcs  ::&#x3D; *( func ) func   ::&#x3D; \&quot;.\&quot; name \&quot;(\&quot; [ args ] \&quot;)\&quot; name   ::&#x3D; ALPHA / DIGIT / USCORE  ALPHA    &#x3D; %x41-5A / %x61-7A  ; \&quot;A\&quot;-\&quot;Z\&quot; / \&quot;a\&quot;-\&quot;z\&quot; DIGIT    &#x3D; %x30-39            ; \&quot;0\&quot;-\&quot;9\&quot; USCORE   &#x3D; %x5F ; underscore  ; \&quot;_\&quot; &#x60;&#x60;&#x60;
         * @param {string} [q] Search term: &#x60;?&#x60; - matches any character &#x60;*&#x60; - matches 0 or more characters e.g.: name,emails{type},labels etc...
         * @param {Array<string>} [id] [&#x60;record.id&#x60;]
         * @param {string} [filters] Filter string in CEL format.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        records: (repo, size, page, sort, fields, q, id, filters, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'repo' is not null or undefined
            if (repo === null || repo === undefined) {
                throw new RequiredError('repo', 'Required parameter repo was null or undefined when calling records.');
            }
            const localVarPath = `/v2/dataset/{repo}`.replace(`{${'repo'}}`, encodeURIComponent(String(repo)));
            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 (size !== undefined) {
                localVarQueryParameter['size'] = size;
            }
            if (page !== undefined) {
                localVarQueryParameter['page'] = page;
            }
            if (sort) {
                localVarQueryParameter['sort'] = sort;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            if (q !== undefined) {
                localVarQueryParameter['q'] = q;
            }
            if (id) {
                localVarQueryParameter['id'] = id;
            }
            if (filters !== undefined) {
                localVarQueryParameter['filters'] = filters;
            }
            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,
            };
        }),
        /**
         * (Record) {
         * @summary Locate dataset record
         * @param {string} repo [&#x60;types.repo&#x60;]
         * @param {string} id [&#x60;record.id&#x60;]
         * @param {Array<string>} [fields] Fields [Q]uery to build result dataset record. &#x60;&#x60;&#x60; fields ::&#x3D; field [ *( \&quot;,\&quot; field ) ] field  ::&#x3D; name [ *( func ) ] [ inner ] inner  ::&#x3D; \&quot;{\&quot; fields \&quot;}\&quot; funcs  ::&#x3D; *( func ) func   ::&#x3D; \&quot;.\&quot; name \&quot;(\&quot; [ args ] \&quot;)\&quot; name   ::&#x3D; ALPHA / DIGIT / USCORE  ALPHA    &#x3D; %x41-5A / %x61-7A  ; \&quot;A\&quot;-\&quot;Z\&quot; / \&quot;a\&quot;-\&quot;z\&quot; DIGIT    &#x3D; %x30-39            ; \&quot;0\&quot;-\&quot;9\&quot; USCORE   &#x3D; %x5F ; underscore  ; \&quot;_\&quot; &#x60;&#x60;&#x60;
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        records_1: (repo, id, fields, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'repo' is not null or undefined
            if (repo === null || repo === undefined) {
                throw new RequiredError('repo', 'Required parameter repo was null or undefined when calling records_1.');
            }
            // 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 records_1.');
            }
            const localVarPath = `/v2/dataset/{repo}/{id}`
                .replace(`{${'repo'}}`, encodeURIComponent(String(repo)))
                .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,
            };
        }),
        /**
         * (Record) {
         * @summary Update dataset record
         * @param {string} repo [&#x60;types.repo&#x60;] data source
         * @param {string} id [&#x60;record.id&#x60;] for update
         * @param {object} record Record data fields changes.
         * @param {Array<string>} [fields] Source Fields to return into result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        update: (repo, id, record, fields, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'repo' is not null or undefined
            if (repo === null || repo === undefined) {
                throw new RequiredError('repo', 'Required parameter repo was null or undefined when calling update.');
            }
            // 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 update.');
            }
            // verify required parameter 'record' is not null or undefined
            if (record === null || record === undefined) {
                throw new RequiredError('record', 'Required parameter record was null or undefined when calling update.');
            }
            const localVarPath = `/v2/dataset/{repo}/{id}`
                .replace(`{${'repo'}}`, encodeURIComponent(String(repo)))
                .replace(`{${'id'}}`, encodeURIComponent(String(id)));
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? yield configuration.apiKey('X-Webitel-Access')
                    : yield configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            localVarHeaderParameter['Content-Type'] = 'application/json';
            localVarUrlObj.query = Object.assign(Object.assign(Object.assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            const needsSerialization = typeof record !== 'string' ||
                localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data = needsSerialization
                ? JSON.stringify(record !== undefined ? record : {})
                : record || '';
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        }),
        /**
         * (Record) {
         * @summary Update dataset record
         * @param {string} repo [&#x60;types.repo&#x60;] data source
         * @param {string} id [&#x60;record.id&#x60;] for update
         * @param {object} record Record data fields changes.
         * @param {Array<string>} [fields] Source Fields to return into result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        update2: (repo, id, record, fields, options = {}) => __awaiter(this, void 0, void 0, function* () {
            // verify required parameter 'repo' is not null or undefined
            if (repo === null || repo === undefined) {
                throw new RequiredError('repo', 'Required parameter repo was null or undefined when calling update2.');
            }
            // 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 update2.');
            }
            // verify required parameter 'record' is not null or undefined
            if (record === null || record === undefined) {
                throw new RequiredError('record', 'Required parameter record was null or undefined when calling update2.');
            }
            const localVarPath = `/v2/dataset/{repo}/{id}`
                .replace(`{${'repo'}}`, encodeURIComponent(String(repo)))
                .replace(`{${'id'}}`, encodeURIComponent(String(id)));
            const localVarUrlObj = globalImportUrl.parse(localVarPath, true);
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
            const localVarHeaderParameter = {};
            const localVarQueryParameter = {};
            // authentication AccessToken required
            if (configuration && configuration.apiKey) {
                const localVarApiKeyValue = typeof configuration.apiKey === 'function'
                    ? yield configuration.apiKey('X-Webitel-Access')
                    : yield configuration.apiKey;
                localVarHeaderParameter['X-Webitel-Access'] = localVarApiKeyValue;
            }
            if (fields) {
                localVarQueryParameter['fields'] = fields;
            }
            localVarHeaderParameter['Content-Type'] = 'application/json';
            localVarUrlObj.query = Object.assign(Object.assign(Object.assign({}, localVarUrlObj.query), localVarQueryParameter), options.query);
            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
            delete localVarUrlObj.search;
            let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
            localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
            const needsSerialization = typeof record !== 'string' ||
                localVarRequestOptions.headers['Content-Type'] === 'application/json';
            localVarRequestOptions.data = needsSerialization
                ? JSON.stringify(record !== undefined ? record : {})
                : record || '';
            return {
                url: globalImportUrl.format(localVarUrlObj),
                options: localVarRequestOptions,
            };
        }),
    };
};
/**
 * RecordsApi - functional programming interface
 * @export
 */
export const RecordsApiFp = function (configuration) {
    return {
        /**
         *
         * @summary Delete dataset records
         * @param {string} repo [&#x60;types.repo&#x60;]
         * @param {Array<string>} id [&#x60;record.id&#x60;]
         * @param {Array<string>} [fields] Fields to be retrieved into result dataset.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        _delete(repo, id, fields, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield RecordsApiAxiosParamCreator(configuration)._delete(repo, 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);
                };
            });
        },
        /**
         * (Record) {
         * @summary Create dataset record
         * @param {string} repo [&#x60;types.repo&#x60;]
         * @param {object} record Record data.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        create(repo, record, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield RecordsApiAxiosParamCreator(configuration).create(repo, record, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         *
         * @summary Search dataset records
         * @param {string} repo [&#x60;types.repo&#x60;]
         * @param {number} [size] Number of result records (per page). Default: 16.
         * @param {number} [page] Page number of result set of records. Default: 1.
         * @param {Array<string>} [sort] Sort result dataset of records by fields. &#x60;&#x60;&#x60; sort ::&#x3D; *( ORDER name )  ORDER  &#x3D; ASC / DESC DESC   &#x3D; \&quot;-\&quot; / \&quot;!\&quot; ASC    &#x3D; [ \&quot;+\&quot; ]   ; Default &#x60;&#x60;&#x60;  Fields available  - &#x60;id&#x60;(seq) - &#x60;domain&#x60;{name} - &#x60;created_at&#x60; - &#x60;created_by&#x60;{name} - &#x60;updated_at&#x60; - &#x60;updated_by&#x60;{name}  Use ?fields&#x3D;&#x60;field.sort()&#x60; option to sort Edge fields.
         * @param {Array<string>} [fields] Fields [Q]uery to build result dataset record. &#x60;&#x60;&#x60; fields ::&#x3D; field [ *( \&quot;,\&quot; field ) ] field  ::&#x3D; name [ *( func ) ] [ inner ] inner  ::&#x3D; \&quot;{\&quot; fields \&quot;}\&quot; funcs  ::&#x3D; *( func ) func   ::&#x3D; \&quot;.\&quot; name \&quot;(\&quot; [ args ] \&quot;)\&quot; name   ::&#x3D; ALPHA / DIGIT / USCORE  ALPHA    &#x3D; %x41-5A / %x61-7A  ; \&quot;A\&quot;-\&quot;Z\&quot; / \&quot;a\&quot;-\&quot;z\&quot; DIGIT    &#x3D; %x30-39            ; \&quot;0\&quot;-\&quot;9\&quot; USCORE   &#x3D; %x5F ; underscore  ; \&quot;_\&quot; &#x60;&#x60;&#x60;
         * @param {string} [q] Search term: &#x60;?&#x60; - matches any character &#x60;*&#x60; - matches 0 or more characters e.g.: name,emails{type},labels etc...
         * @param {Array<string>} [id] [&#x60;record.id&#x60;]
         * @param {string} [filters] Filter string in CEL format.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        records(repo, size, page, sort, fields, q, id, filters, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield RecordsApiAxiosParamCreator(configuration).records(repo, size, page, sort, fields, q, id, filters, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         * (Record) {
         * @summary Locate dataset record
         * @param {string} repo [&#x60;types.repo&#x60;]
         * @param {string} id [&#x60;record.id&#x60;]
         * @param {Array<string>} [fields] Fields [Q]uery to build result dataset record. &#x60;&#x60;&#x60; fields ::&#x3D; field [ *( \&quot;,\&quot; field ) ] field  ::&#x3D; name [ *( func ) ] [ inner ] inner  ::&#x3D; \&quot;{\&quot; fields \&quot;}\&quot; funcs  ::&#x3D; *( func ) func   ::&#x3D; \&quot;.\&quot; name \&quot;(\&quot; [ args ] \&quot;)\&quot; name   ::&#x3D; ALPHA / DIGIT / USCORE  ALPHA    &#x3D; %x41-5A / %x61-7A  ; \&quot;A\&quot;-\&quot;Z\&quot; / \&quot;a\&quot;-\&quot;z\&quot; DIGIT    &#x3D; %x30-39            ; \&quot;0\&quot;-\&quot;9\&quot; USCORE   &#x3D; %x5F ; underscore  ; \&quot;_\&quot; &#x60;&#x60;&#x60;
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        records_1(repo, id, fields, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield RecordsApiAxiosParamCreator(configuration).records_1(repo, 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);
                };
            });
        },
        /**
         * (Record) {
         * @summary Update dataset record
         * @param {string} repo [&#x60;types.repo&#x60;] data source
         * @param {string} id [&#x60;record.id&#x60;] for update
         * @param {object} record Record data fields changes.
         * @param {Array<string>} [fields] Source Fields to return into result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        update(repo, id, record, fields, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield RecordsApiAxiosParamCreator(configuration).update(repo, id, record, fields, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
        /**
         * (Record) {
         * @summary Update dataset record
         * @param {string} repo [&#x60;types.repo&#x60;] data source
         * @param {string} id [&#x60;record.id&#x60;] for update
         * @param {object} record Record data fields changes.
         * @param {Array<string>} [fields] Source Fields to return into result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        update2(repo, id, record, fields, options) {
            return __awaiter(this, void 0, void 0, function* () {
                const localVarAxiosArgs = yield RecordsApiAxiosParamCreator(configuration).update2(repo, id, record, fields, options);
                return (axios = globalAxios, basePath = BASE_PATH) => {
                    const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
                    return axios.request(axiosRequestArgs);
                };
            });
        },
    };
};
/**
 * RecordsApi - factory interface
 * @export
 */
export const RecordsApiFactory = function (configuration, basePath, axios) {
    return {
        /**
         *
         * @summary Delete dataset records
         * @param {string} repo [&#x60;types.repo&#x60;]
         * @param {Array<string>} id [&#x60;record.id&#x60;]
         * @param {Array<string>} [fields] Fields to be retrieved into result dataset.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        _delete(repo, id, fields, options) {
            return RecordsApiFp(configuration)
                ._delete(repo, id, fields, options)
                .then((request) => request(axios, basePath));
        },
        /**
         * (Record) {
         * @summary Create dataset record
         * @param {string} repo [&#x60;types.repo&#x60;]
         * @param {object} record Record data.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        create(repo, record, options) {
            return RecordsApiFp(configuration)
                .create(repo, record, options)
                .then((request) => request(axios, basePath));
        },
        /**
         *
         * @summary Search dataset records
         * @param {string} repo [&#x60;types.repo&#x60;]
         * @param {number} [size] Number of result records (per page). Default: 16.
         * @param {number} [page] Page number of result set of records. Default: 1.
         * @param {Array<string>} [sort] Sort result dataset of records by fields. &#x60;&#x60;&#x60; sort ::&#x3D; *( ORDER name )  ORDER  &#x3D; ASC / DESC DESC   &#x3D; \&quot;-\&quot; / \&quot;!\&quot; ASC    &#x3D; [ \&quot;+\&quot; ]   ; Default &#x60;&#x60;&#x60;  Fields available  - &#x60;id&#x60;(seq) - &#x60;domain&#x60;{name} - &#x60;created_at&#x60; - &#x60;created_by&#x60;{name} - &#x60;updated_at&#x60; - &#x60;updated_by&#x60;{name}  Use ?fields&#x3D;&#x60;field.sort()&#x60; option to sort Edge fields.
         * @param {Array<string>} [fields] Fields [Q]uery to build result dataset record. &#x60;&#x60;&#x60; fields ::&#x3D; field [ *( \&quot;,\&quot; field ) ] field  ::&#x3D; name [ *( func ) ] [ inner ] inner  ::&#x3D; \&quot;{\&quot; fields \&quot;}\&quot; funcs  ::&#x3D; *( func ) func   ::&#x3D; \&quot;.\&quot; name \&quot;(\&quot; [ args ] \&quot;)\&quot; name   ::&#x3D; ALPHA / DIGIT / USCORE  ALPHA    &#x3D; %x41-5A / %x61-7A  ; \&quot;A\&quot;-\&quot;Z\&quot; / \&quot;a\&quot;-\&quot;z\&quot; DIGIT    &#x3D; %x30-39            ; \&quot;0\&quot;-\&quot;9\&quot; USCORE   &#x3D; %x5F ; underscore  ; \&quot;_\&quot; &#x60;&#x60;&#x60;
         * @param {string} [q] Search term: &#x60;?&#x60; - matches any character &#x60;*&#x60; - matches 0 or more characters e.g.: name,emails{type},labels etc...
         * @param {Array<string>} [id] [&#x60;record.id&#x60;]
         * @param {string} [filters] Filter string in CEL format.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        records(repo, size, page, sort, fields, q, id, filters, options) {
            return RecordsApiFp(configuration)
                .records(repo, size, page, sort, fields, q, id, filters, options)
                .then((request) => request(axios, basePath));
        },
        /**
         * (Record) {
         * @summary Locate dataset record
         * @param {string} repo [&#x60;types.repo&#x60;]
         * @param {string} id [&#x60;record.id&#x60;]
         * @param {Array<string>} [fields] Fields [Q]uery to build result dataset record. &#x60;&#x60;&#x60; fields ::&#x3D; field [ *( \&quot;,\&quot; field ) ] field  ::&#x3D; name [ *( func ) ] [ inner ] inner  ::&#x3D; \&quot;{\&quot; fields \&quot;}\&quot; funcs  ::&#x3D; *( func ) func   ::&#x3D; \&quot;.\&quot; name \&quot;(\&quot; [ args ] \&quot;)\&quot; name   ::&#x3D; ALPHA / DIGIT / USCORE  ALPHA    &#x3D; %x41-5A / %x61-7A  ; \&quot;A\&quot;-\&quot;Z\&quot; / \&quot;a\&quot;-\&quot;z\&quot; DIGIT    &#x3D; %x30-39            ; \&quot;0\&quot;-\&quot;9\&quot; USCORE   &#x3D; %x5F ; underscore  ; \&quot;_\&quot; &#x60;&#x60;&#x60;
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        records_1(repo, id, fields, options) {
            return RecordsApiFp(configuration)
                .records_1(repo, id, fields, options)
                .then((request) => request(axios, basePath));
        },
        /**
         * (Record) {
         * @summary Update dataset record
         * @param {string} repo [&#x60;types.repo&#x60;] data source
         * @param {string} id [&#x60;record.id&#x60;] for update
         * @param {object} record Record data fields changes.
         * @param {Array<string>} [fields] Source Fields to return into result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        update(repo, id, record, fields, options) {
            return RecordsApiFp(configuration)
                .update(repo, id, record, fields, options)
                .then((request) => request(axios, basePath));
        },
        /**
         * (Record) {
         * @summary Update dataset record
         * @param {string} repo [&#x60;types.repo&#x60;] data source
         * @param {string} id [&#x60;record.id&#x60;] for update
         * @param {object} record Record data fields changes.
         * @param {Array<string>} [fields] Source Fields to return into result.
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         */
        update2(repo, id, record, fields, options) {
            return RecordsApiFp(configuration)
                .update2(repo, id, record, fields, options)
                .then((request) => request(axios, basePath));
        },
    };
};
/**
 * RecordsApi - object-oriented interface
 * @export
 * @class RecordsApi
 * @extends {BaseAPI}
 */
export class RecordsApi extends BaseAPI {
    /**
     *
     * @summary Delete dataset records
     * @param {string} repo [&#x60;types.repo&#x60;]
     * @param {Array<string>} id [&#x60;record.id&#x60;]
     * @param {Array<string>} [fields] Fields to be retrieved into result dataset.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof RecordsApi
     */
    _delete(repo, id, fields, options) {
        return RecordsApiFp(this.configuration)
            ._delete(repo, id, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     * (Record) {
     * @summary Create dataset record
     * @param {string} repo [&#x60;types.repo&#x60;]
     * @param {object} record Record data.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof RecordsApi
     */
    create(repo, record, options) {
        return RecordsApiFp(this.configuration)
            .create(repo, record, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     *
     * @summary Search dataset records
     * @param {string} repo [&#x60;types.repo&#x60;]
     * @param {number} [size] Number of result records (per page). Default: 16.
     * @param {number} [page] Page number of result set of records. Default: 1.
     * @param {Array<string>} [sort] Sort result dataset of records by fields. &#x60;&#x60;&#x60; sort ::&#x3D; *( ORDER name )  ORDER  &#x3D; ASC / DESC DESC   &#x3D; \&quot;-\&quot; / \&quot;!\&quot; ASC    &#x3D; [ \&quot;+\&quot; ]   ; Default &#x60;&#x60;&#x60;  Fields available  - &#x60;id&#x60;(seq) - &#x60;domain&#x60;{name} - &#x60;created_at&#x60; - &#x60;created_by&#x60;{name} - &#x60;updated_at&#x60; - &#x60;updated_by&#x60;{name}  Use ?fields&#x3D;&#x60;field.sort()&#x60; option to sort Edge fields.
     * @param {Array<string>} [fields] Fields [Q]uery to build result dataset record. &#x60;&#x60;&#x60; fields ::&#x3D; field [ *( \&quot;,\&quot; field ) ] field  ::&#x3D; name [ *( func ) ] [ inner ] inner  ::&#x3D; \&quot;{\&quot; fields \&quot;}\&quot; funcs  ::&#x3D; *( func ) func   ::&#x3D; \&quot;.\&quot; name \&quot;(\&quot; [ args ] \&quot;)\&quot; name   ::&#x3D; ALPHA / DIGIT / USCORE  ALPHA    &#x3D; %x41-5A / %x61-7A  ; \&quot;A\&quot;-\&quot;Z\&quot; / \&quot;a\&quot;-\&quot;z\&quot; DIGIT    &#x3D; %x30-39            ; \&quot;0\&quot;-\&quot;9\&quot; USCORE   &#x3D; %x5F ; underscore  ; \&quot;_\&quot; &#x60;&#x60;&#x60;
     * @param {string} [q] Search term: &#x60;?&#x60; - matches any character &#x60;*&#x60; - matches 0 or more characters e.g.: name,emails{type},labels etc...
     * @param {Array<string>} [id] [&#x60;record.id&#x60;]
     * @param {string} [filters] Filter string in CEL format.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof RecordsApi
     */
    records(repo, size, page, sort, fields, q, id, filters, options) {
        return RecordsApiFp(this.configuration)
            .records(repo, size, page, sort, fields, q, id, filters, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     * (Record) {
     * @summary Locate dataset record
     * @param {string} repo [&#x60;types.repo&#x60;]
     * @param {string} id [&#x60;record.id&#x60;]
     * @param {Array<string>} [fields] Fields [Q]uery to build result dataset record. &#x60;&#x60;&#x60; fields ::&#x3D; field [ *( \&quot;,\&quot; field ) ] field  ::&#x3D; name [ *( func ) ] [ inner ] inner  ::&#x3D; \&quot;{\&quot; fields \&quot;}\&quot; funcs  ::&#x3D; *( func ) func   ::&#x3D; \&quot;.\&quot; name \&quot;(\&quot; [ args ] \&quot;)\&quot; name   ::&#x3D; ALPHA / DIGIT / USCORE  ALPHA    &#x3D; %x41-5A / %x61-7A  ; \&quot;A\&quot;-\&quot;Z\&quot; / \&quot;a\&quot;-\&quot;z\&quot; DIGIT    &#x3D; %x30-39            ; \&quot;0\&quot;-\&quot;9\&quot; USCORE   &#x3D; %x5F ; underscore  ; \&quot;_\&quot; &#x60;&#x60;&#x60;
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof RecordsApi
     */
    records_1(repo, id, fields, options) {
        return RecordsApiFp(this.configuration)
            .records_1(repo, id, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     * (Record) {
     * @summary Update dataset record
     * @param {string} repo [&#x60;types.repo&#x60;] data source
     * @param {string} id [&#x60;record.id&#x60;] for update
     * @param {object} record Record data fields changes.
     * @param {Array<string>} [fields] Source Fields to return into result.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof RecordsApi
     */
    update(repo, id, record, fields, options) {
        return RecordsApiFp(this.configuration)
            .update(repo, id, record, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
    /**
     * (Record) {
     * @summary Update dataset record
     * @param {string} repo [&#x60;types.repo&#x60;] data source
     * @param {string} id [&#x60;record.id&#x60;] for update
     * @param {object} record Record data fields changes.
     * @param {Array<string>} [fields] Source Fields to return into result.
     * @param {*} [options] Override http request option.
     * @throws {RequiredError}
     * @memberof RecordsApi
     */
    update2(repo, id, record, fields, options) {
        return RecordsApiFp(this.configuration)
            .update2(repo, id, record, fields, options)
            .then((request) => request(this.axios, this.basePath));
    }
}
//# sourceMappingURL=records-api.js.map