arlas-persistence-api
Version:
Persists data
755 lines • 36.3 kB
JavaScript
/// <reference path="./custom.d.ts" />
// tslint:disable
/**
* ARLAS persistence API
* persistence REST services
*
* OpenAPI spec version: 24.0.8
* Contact: contact@gisaia.com
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
var __extends = (this && this.__extends) || (function () {
var extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
import * as url from "url";
import * as portableFetch from "portable-fetch";
var BASE_PATH = "http://localhost/arlas_persistence_server".replace(/\/+$/, "");
/**
*
* @export
*/
export var COLLECTION_FORMATS = {
csv: ",",
ssv: " ",
tsv: "\t",
pipes: "|",
};
/**
*
* @export
* @class BaseAPI
*/
var BaseAPI = (function () {
function BaseAPI(configuration, basePath, fetch) {
if (basePath === void 0) { basePath = BASE_PATH; }
if (fetch === void 0) { fetch = portableFetch; }
this.basePath = basePath;
this.fetch = fetch;
if (configuration) {
this.configuration = configuration;
this.basePath = configuration.basePath || this.basePath;
}
}
return BaseAPI;
}());
export { BaseAPI };
;
/**
*
* @export
* @class RequiredError
* @extends {Error}
*/
var RequiredError = (function (_super) {
__extends(RequiredError, _super);
function RequiredError(field, msg) {
var _this = _super.call(this, msg) || this;
_this.field = field;
return _this;
}
return RequiredError;
}(Error));
export { RequiredError };
/**
* PersistApi - fetch parameter creator
* @export
*/
export var PersistApiFetchParamCreator = function (configuration) {
return {
/**
* Store a new piece of data for the provided zone and key (auto generate id).
* @summary Store a new piece of data for the provided zone and key (auto generate id).
* @param {string} zone Zone of the document.
* @param {string} key The key of the data.
* @param {string} value Value to be persisted.
* @param {Array<string>} [readers] Comma separated values of groups authorized to read the data.
* @param {Array<string>} [writers] Comma separated values of groups authorized to modify the data.
* @param {boolean} [pretty] Pretty print
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
create: function (zone, key, value, readers, writers, pretty, options) {
if (options === void 0) { options = {}; }
// verify required parameter 'zone' is not null or undefined
if (zone === null || zone === undefined) {
throw new RequiredError('zone', 'Required parameter zone was null or undefined when calling create.');
}
// verify required parameter 'key' is not null or undefined
if (key === null || key === undefined) {
throw new RequiredError('key', 'Required parameter key was null or undefined when calling create.');
}
// verify required parameter 'value' is not null or undefined
if (value === null || value === undefined) {
throw new RequiredError('value', 'Required parameter value was null or undefined when calling create.');
}
var localVarPath = "/persist/resource/{zone}/{key}"
.replace("{" + "zone" + "}", encodeURIComponent(String(zone)))
.replace("{" + "key" + "}", encodeURIComponent(String(key)));
var localVarUrlObj = url.parse(localVarPath, true);
var localVarRequestOptions = Object.assign({ method: 'POST' }, options);
var localVarHeaderParameter = {};
var localVarQueryParameter = {};
if (readers) {
localVarQueryParameter['readers'] = readers;
}
if (writers) {
localVarQueryParameter['writers'] = writers;
}
if (pretty !== undefined) {
localVarQueryParameter['pretty'] = pretty;
}
localVarHeaderParameter['Content-Type'] = 'application/json;charset=utf-8';
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
var needsSerialization = ("string" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
localVarRequestOptions.body = needsSerialization ? JSON.stringify(value || {}) : (value || "");
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Delete an entry given its key and id.
* @summary Delete an entry given its key and id.
* @param {string} id The id of the data.
* @param {boolean} [pretty] Pretty print
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteById: function (id, pretty, options) {
if (options === void 0) { options = {}; }
// 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 deleteById.');
}
var localVarPath = "/persist/resource/id/{id}"
.replace("{" + "id" + "}", encodeURIComponent(String(id)));
var localVarUrlObj = url.parse(localVarPath, true);
var localVarRequestOptions = Object.assign({ method: 'DELETE' }, options);
var localVarHeaderParameter = {};
var localVarQueryParameter = {};
if (pretty !== undefined) {
localVarQueryParameter['pretty'] = pretty;
}
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Check the existence of an entry given its id.
* @summary Check the existence of an entry given its id.
* @param {string} id The id of the data.
* @param {boolean} [pretty] Pretty print
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
existsById: function (id, pretty, options) {
if (options === void 0) { options = {}; }
// 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 existsById.');
}
var localVarPath = "/persist/resource/exists/id/{id}"
.replace("{" + "id" + "}", encodeURIComponent(String(id)));
var localVarUrlObj = url.parse(localVarPath, true);
var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
var localVarHeaderParameter = {};
var localVarQueryParameter = {};
if (pretty !== undefined) {
localVarQueryParameter['pretty'] = pretty;
}
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Fetch an entry given its id.
* @summary Fetch an entry given its id.
* @param {string} id The id of the data.
* @param {boolean} [pretty] Pretty print
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getById: function (id, pretty, options) {
if (options === void 0) { options = {}; }
// 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 getById.');
}
var localVarPath = "/persist/resource/id/{id}"
.replace("{" + "id" + "}", encodeURIComponent(String(id)));
var localVarUrlObj = url.parse(localVarPath, true);
var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
var localVarHeaderParameter = {};
var localVarQueryParameter = {};
if (pretty !== undefined) {
localVarQueryParameter['pretty'] = pretty;
}
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Returns the users' groups allowed to interact with the given zone.
* @summary Returns the users' groups allowed to interact with the given zone.
* @param {string} zone Zone of the document.
* @param {boolean} [pretty] Pretty print
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getGroupsByZone: function (zone, pretty, options) {
if (options === void 0) { options = {}; }
// verify required parameter 'zone' is not null or undefined
if (zone === null || zone === undefined) {
throw new RequiredError('zone', 'Required parameter zone was null or undefined when calling getGroupsByZone.');
}
var localVarPath = "/persist/groups/{zone}"
.replace("{" + "zone" + "}", encodeURIComponent(String(zone)));
var localVarUrlObj = url.parse(localVarPath, true);
var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
var localVarHeaderParameter = {};
var localVarQueryParameter = {};
if (pretty !== undefined) {
localVarQueryParameter['pretty'] = pretty;
}
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Fetch a list of data related to a zone.
* @summary Fetch a list of data related to a zone.
* @param {string} zone Zone of the document.
* @param {number} [size] Page Size
* @param {number} [page] Page ID
* @param {string} [order] Date sort order
* @param {boolean} [pretty] Pretty print
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
list: function (zone, size, page, order, pretty, options) {
if (options === void 0) { options = {}; }
// verify required parameter 'zone' is not null or undefined
if (zone === null || zone === undefined) {
throw new RequiredError('zone', 'Required parameter zone was null or undefined when calling list.');
}
var localVarPath = "/persist/resources/{zone}"
.replace("{" + "zone" + "}", encodeURIComponent(String(zone)));
var localVarUrlObj = url.parse(localVarPath, true);
var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
var localVarHeaderParameter = {};
var localVarQueryParameter = {};
if (size !== undefined) {
localVarQueryParameter['size'] = size;
}
if (page !== undefined) {
localVarQueryParameter['page'] = page;
}
if (order !== undefined) {
localVarQueryParameter['order'] = order;
}
if (pretty !== undefined) {
localVarQueryParameter['pretty'] = pretty;
}
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
* Update an existing value.
* @summary Update an existing value.
* @param {string} id The id of the data.
* @param {string} value Value to be persisted.
* @param {number} last_update Previous date value of last modification known by client.
* @param {string} [key] The key of the data.
* @param {Array<string>} [readers] Comma separated values of groups authorized to read the data.
* @param {Array<string>} [writers] Comma separated values of groups authorized to modify the data.
* @param {boolean} [pretty] Pretty print
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
update: function (id, value, last_update, key, readers, writers, pretty, options) {
if (options === void 0) { options = {}; }
// 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 'value' is not null or undefined
if (value === null || value === undefined) {
throw new RequiredError('value', 'Required parameter value was null or undefined when calling update.');
}
// verify required parameter 'last_update' is not null or undefined
if (last_update === null || last_update === undefined) {
throw new RequiredError('last_update', 'Required parameter last_update was null or undefined when calling update.');
}
var localVarPath = "/persist/resource/id/{id}"
.replace("{" + "id" + "}", encodeURIComponent(String(id)));
var localVarUrlObj = url.parse(localVarPath, true);
var localVarRequestOptions = Object.assign({ method: 'PUT' }, options);
var localVarHeaderParameter = {};
var localVarQueryParameter = {};
if (key !== undefined) {
localVarQueryParameter['key'] = key;
}
if (readers) {
localVarQueryParameter['readers'] = readers;
}
if (writers) {
localVarQueryParameter['writers'] = writers;
}
if (last_update !== undefined) {
localVarQueryParameter['last_update'] = last_update;
}
if (pretty !== undefined) {
localVarQueryParameter['pretty'] = pretty;
}
localVarHeaderParameter['Content-Type'] = 'application/json;charset=utf-8';
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
delete localVarUrlObj.search;
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
var needsSerialization = ("string" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
localVarRequestOptions.body = needsSerialization ? JSON.stringify(value || {}) : (value || "");
return {
url: url.format(localVarUrlObj),
options: localVarRequestOptions,
};
},
};
};
/**
* PersistApi - functional programming interface
* @export
*/
export var PersistApiFp = function (configuration) {
return {
/**
* Store a new piece of data for the provided zone and key (auto generate id).
* @summary Store a new piece of data for the provided zone and key (auto generate id).
* @param {string} zone Zone of the document.
* @param {string} key The key of the data.
* @param {string} value Value to be persisted.
* @param {Array<string>} [readers] Comma separated values of groups authorized to read the data.
* @param {Array<string>} [writers] Comma separated values of groups authorized to modify the data.
* @param {boolean} [pretty] Pretty print
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
create: function (zone, key, value, readers, writers, pretty, options) {
var localVarFetchArgs = PersistApiFetchParamCreator(configuration).create(zone, key, value, readers, writers, pretty, options);
return function (fetch, basePath) {
if (fetch === void 0) { fetch = portableFetch; }
if (basePath === void 0) { basePath = BASE_PATH; }
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
if (response.status >= 200 && response.status < 300) {
return response.json();
}
else {
throw response;
}
});
};
},
/**
* Delete an entry given its key and id.
* @summary Delete an entry given its key and id.
* @param {string} id The id of the data.
* @param {boolean} [pretty] Pretty print
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteById: function (id, pretty, options) {
var localVarFetchArgs = PersistApiFetchParamCreator(configuration).deleteById(id, pretty, options);
return function (fetch, basePath) {
if (fetch === void 0) { fetch = portableFetch; }
if (basePath === void 0) { basePath = BASE_PATH; }
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
if (response.status >= 200 && response.status < 300) {
return response.json();
}
else {
throw response;
}
});
};
},
/**
* Check the existence of an entry given its id.
* @summary Check the existence of an entry given its id.
* @param {string} id The id of the data.
* @param {boolean} [pretty] Pretty print
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
existsById: function (id, pretty, options) {
var localVarFetchArgs = PersistApiFetchParamCreator(configuration).existsById(id, pretty, options);
return function (fetch, basePath) {
if (fetch === void 0) { fetch = portableFetch; }
if (basePath === void 0) { basePath = BASE_PATH; }
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
if (response.status >= 200 && response.status < 300) {
return response.json();
}
else {
throw response;
}
});
};
},
/**
* Fetch an entry given its id.
* @summary Fetch an entry given its id.
* @param {string} id The id of the data.
* @param {boolean} [pretty] Pretty print
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getById: function (id, pretty, options) {
var localVarFetchArgs = PersistApiFetchParamCreator(configuration).getById(id, pretty, options);
return function (fetch, basePath) {
if (fetch === void 0) { fetch = portableFetch; }
if (basePath === void 0) { basePath = BASE_PATH; }
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
if (response.status >= 200 && response.status < 300) {
return response.json();
}
else {
throw response;
}
});
};
},
/**
* Returns the users' groups allowed to interact with the given zone.
* @summary Returns the users' groups allowed to interact with the given zone.
* @param {string} zone Zone of the document.
* @param {boolean} [pretty] Pretty print
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getGroupsByZone: function (zone, pretty, options) {
var localVarFetchArgs = PersistApiFetchParamCreator(configuration).getGroupsByZone(zone, pretty, options);
return function (fetch, basePath) {
if (fetch === void 0) { fetch = portableFetch; }
if (basePath === void 0) { basePath = BASE_PATH; }
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
if (response.status >= 200 && response.status < 300) {
return response.json();
}
else {
throw response;
}
});
};
},
/**
* Fetch a list of data related to a zone.
* @summary Fetch a list of data related to a zone.
* @param {string} zone Zone of the document.
* @param {number} [size] Page Size
* @param {number} [page] Page ID
* @param {string} [order] Date sort order
* @param {boolean} [pretty] Pretty print
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
list: function (zone, size, page, order, pretty, options) {
var localVarFetchArgs = PersistApiFetchParamCreator(configuration).list(zone, size, page, order, pretty, options);
return function (fetch, basePath) {
if (fetch === void 0) { fetch = portableFetch; }
if (basePath === void 0) { basePath = BASE_PATH; }
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
if (response.status >= 200 && response.status < 300) {
return response.json();
}
else {
throw response;
}
});
};
},
/**
* Update an existing value.
* @summary Update an existing value.
* @param {string} id The id of the data.
* @param {string} value Value to be persisted.
* @param {number} last_update Previous date value of last modification known by client.
* @param {string} [key] The key of the data.
* @param {Array<string>} [readers] Comma separated values of groups authorized to read the data.
* @param {Array<string>} [writers] Comma separated values of groups authorized to modify the data.
* @param {boolean} [pretty] Pretty print
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
update: function (id, value, last_update, key, readers, writers, pretty, options) {
var localVarFetchArgs = PersistApiFetchParamCreator(configuration).update(id, value, last_update, key, readers, writers, pretty, options);
return function (fetch, basePath) {
if (fetch === void 0) { fetch = portableFetch; }
if (basePath === void 0) { basePath = BASE_PATH; }
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
if (response.status >= 200 && response.status < 300) {
return response.json();
}
else {
throw response;
}
});
};
},
};
};
/**
* PersistApi - factory interface
* @export
*/
export var PersistApiFactory = function (configuration, fetch, basePath) {
return {
/**
* Store a new piece of data for the provided zone and key (auto generate id).
* @summary Store a new piece of data for the provided zone and key (auto generate id).
* @param {string} zone Zone of the document.
* @param {string} key The key of the data.
* @param {string} value Value to be persisted.
* @param {Array<string>} [readers] Comma separated values of groups authorized to read the data.
* @param {Array<string>} [writers] Comma separated values of groups authorized to modify the data.
* @param {boolean} [pretty] Pretty print
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
create: function (zone, key, value, readers, writers, pretty, options) {
return PersistApiFp(configuration).create(zone, key, value, readers, writers, pretty, options)(fetch, basePath);
},
/**
* Delete an entry given its key and id.
* @summary Delete an entry given its key and id.
* @param {string} id The id of the data.
* @param {boolean} [pretty] Pretty print
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
deleteById: function (id, pretty, options) {
return PersistApiFp(configuration).deleteById(id, pretty, options)(fetch, basePath);
},
/**
* Check the existence of an entry given its id.
* @summary Check the existence of an entry given its id.
* @param {string} id The id of the data.
* @param {boolean} [pretty] Pretty print
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
existsById: function (id, pretty, options) {
return PersistApiFp(configuration).existsById(id, pretty, options)(fetch, basePath);
},
/**
* Fetch an entry given its id.
* @summary Fetch an entry given its id.
* @param {string} id The id of the data.
* @param {boolean} [pretty] Pretty print
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getById: function (id, pretty, options) {
return PersistApiFp(configuration).getById(id, pretty, options)(fetch, basePath);
},
/**
* Returns the users' groups allowed to interact with the given zone.
* @summary Returns the users' groups allowed to interact with the given zone.
* @param {string} zone Zone of the document.
* @param {boolean} [pretty] Pretty print
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
getGroupsByZone: function (zone, pretty, options) {
return PersistApiFp(configuration).getGroupsByZone(zone, pretty, options)(fetch, basePath);
},
/**
* Fetch a list of data related to a zone.
* @summary Fetch a list of data related to a zone.
* @param {string} zone Zone of the document.
* @param {number} [size] Page Size
* @param {number} [page] Page ID
* @param {string} [order] Date sort order
* @param {boolean} [pretty] Pretty print
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
list: function (zone, size, page, order, pretty, options) {
return PersistApiFp(configuration).list(zone, size, page, order, pretty, options)(fetch, basePath);
},
/**
* Update an existing value.
* @summary Update an existing value.
* @param {string} id The id of the data.
* @param {string} value Value to be persisted.
* @param {number} last_update Previous date value of last modification known by client.
* @param {string} [key] The key of the data.
* @param {Array<string>} [readers] Comma separated values of groups authorized to read the data.
* @param {Array<string>} [writers] Comma separated values of groups authorized to modify the data.
* @param {boolean} [pretty] Pretty print
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
update: function (id, value, last_update, key, readers, writers, pretty, options) {
return PersistApiFp(configuration).update(id, value, last_update, key, readers, writers, pretty, options)(fetch, basePath);
},
};
};
/**
* PersistApi - object-oriented interface
* @export
* @class PersistApi
* @extends {BaseAPI}
*/
var PersistApi = (function (_super) {
__extends(PersistApi, _super);
function PersistApi() {
return _super !== null && _super.apply(this, arguments) || this;
}
/**
* Store a new piece of data for the provided zone and key (auto generate id).
* @summary Store a new piece of data for the provided zone and key (auto generate id).
* @param {} zone Zone of the document.
* @param {} key The key of the data.
* @param {} value Value to be persisted.
* @param {} [readers] Comma separated values of groups authorized to read the data.
* @param {} [writers] Comma separated values of groups authorized to modify the data.
* @param {} [pretty] Pretty print
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PersistApi
*/
PersistApi.prototype.create = function (zone, key, value, readers, writers, pretty, options) {
return PersistApiFp(this.configuration).create(zone, key, value, readers, writers, pretty, options)(this.fetch, this.basePath);
};
/**
* Delete an entry given its key and id.
* @summary Delete an entry given its key and id.
* @param {} id The id of the data.
* @param {} [pretty] Pretty print
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PersistApi
*/
PersistApi.prototype.deleteById = function (id, pretty, options) {
return PersistApiFp(this.configuration).deleteById(id, pretty, options)(this.fetch, this.basePath);
};
/**
* Check the existence of an entry given its id.
* @summary Check the existence of an entry given its id.
* @param {} id The id of the data.
* @param {} [pretty] Pretty print
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PersistApi
*/
PersistApi.prototype.existsById = function (id, pretty, options) {
return PersistApiFp(this.configuration).existsById(id, pretty, options)(this.fetch, this.basePath);
};
/**
* Fetch an entry given its id.
* @summary Fetch an entry given its id.
* @param {} id The id of the data.
* @param {} [pretty] Pretty print
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PersistApi
*/
PersistApi.prototype.getById = function (id, pretty, options) {
return PersistApiFp(this.configuration).getById(id, pretty, options)(this.fetch, this.basePath);
};
/**
* Returns the users' groups allowed to interact with the given zone.
* @summary Returns the users' groups allowed to interact with the given zone.
* @param {} zone Zone of the document.
* @param {} [pretty] Pretty print
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PersistApi
*/
PersistApi.prototype.getGroupsByZone = function (zone, pretty, options) {
return PersistApiFp(this.configuration).getGroupsByZone(zone, pretty, options)(this.fetch, this.basePath);
};
/**
* Fetch a list of data related to a zone.
* @summary Fetch a list of data related to a zone.
* @param {} zone Zone of the document.
* @param {} [size] Page Size
* @param {} [page] Page ID
* @param {} [order] Date sort order
* @param {} [pretty] Pretty print
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PersistApi
*/
PersistApi.prototype.list = function (zone, size, page, order, pretty, options) {
return PersistApiFp(this.configuration).list(zone, size, page, order, pretty, options)(this.fetch, this.basePath);
};
/**
* Update an existing value.
* @summary Update an existing value.
* @param {} id The id of the data.
* @param {} value Value to be persisted.
* @param {} last_update Previous date value of last modification known by client.
* @param {} [key] The key of the data.
* @param {} [readers] Comma separated values of groups authorized to read the data.
* @param {} [writers] Comma separated values of groups authorized to modify the data.
* @param {} [pretty] Pretty print
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof PersistApi
*/
PersistApi.prototype.update = function (id, value, last_update, key, readers, writers, pretty, options) {
return PersistApiFp(this.configuration).update(id, value, last_update, key, readers, writers, pretty, options)(this.fetch, this.basePath);
};
return PersistApi;
}(BaseAPI));
export { PersistApi };
//# sourceMappingURL=api.js.map