UNPKG

arlas-api

Version:

ARLAS Api.

1,032 lines 550 kB
/// <reference path="./custom.d.ts" /> // tslint:disable /** * ARLAS Server APIs * Explore the content of ARLAS collections * * OpenAPI spec version: API_VERSION * Contact: contact@gisaia.com * * NOTE: This file is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the file 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 isomorphicFetch from "isomorphic-fetch"; var BASE_PATH = "/arlas".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 = isomorphicFetch; } 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 }; /** * @export * @namespace Aggregation */ export var Aggregation; (function (Aggregation) { /** * @export * @enum {string} */ var TypeEnum; (function (TypeEnum) { TypeEnum[TypeEnum["Datehistogram"] = 'datehistogram'] = "Datehistogram"; TypeEnum[TypeEnum["Geohash"] = 'geohash'] = "Geohash"; TypeEnum[TypeEnum["Geotile"] = 'geotile'] = "Geotile"; TypeEnum[TypeEnum["Histogram"] = 'histogram'] = "Histogram"; TypeEnum[TypeEnum["Term"] = 'term'] = "Term"; TypeEnum[TypeEnum["Geohex"] = 'geohex'] = "Geohex"; })(TypeEnum = Aggregation.TypeEnum || (Aggregation.TypeEnum = {})); /** * @export * @enum {string} */ var OrderEnum; (function (OrderEnum) { OrderEnum[OrderEnum["Asc"] = 'asc'] = "Asc"; OrderEnum[OrderEnum["Desc"] = 'desc'] = "Desc"; })(OrderEnum = Aggregation.OrderEnum || (Aggregation.OrderEnum = {})); /** * @export * @enum {string} */ var OnEnum; (function (OnEnum) { OnEnum[OnEnum["Field"] = 'field'] = "Field"; OnEnum[OnEnum["Count"] = 'count'] = "Count"; OnEnum[OnEnum["Result"] = 'result'] = "Result"; })(OnEnum = Aggregation.OnEnum || (Aggregation.OnEnum = {})); /** * @export * @enum {string} */ var AggregatedGeometriesEnum; (function (AggregatedGeometriesEnum) { AggregatedGeometriesEnum[AggregatedGeometriesEnum["BBOX"] = 'BBOX'] = "BBOX"; AggregatedGeometriesEnum[AggregatedGeometriesEnum["CENTROID"] = 'CENTROID'] = "CENTROID"; AggregatedGeometriesEnum[AggregatedGeometriesEnum["CELL"] = 'CELL'] = "CELL"; AggregatedGeometriesEnum[AggregatedGeometriesEnum["CELLCENTER"] = 'CELLCENTER'] = "CELLCENTER"; AggregatedGeometriesEnum[AggregatedGeometriesEnum["GEOHASH"] = 'GEOHASH'] = "GEOHASH"; AggregatedGeometriesEnum[AggregatedGeometriesEnum["GEOHASHCENTER"] = 'GEOHASH_CENTER'] = "GEOHASHCENTER"; })(AggregatedGeometriesEnum = Aggregation.AggregatedGeometriesEnum || (Aggregation.AggregatedGeometriesEnum = {})); })(Aggregation || (Aggregation = {})); /** * @export * @namespace CollectionReferenceDescriptionProperty */ export var CollectionReferenceDescriptionProperty; (function (CollectionReferenceDescriptionProperty) { /** * @export * @enum {string} */ var TypeEnum; (function (TypeEnum) { TypeEnum[TypeEnum["TEXT"] = 'TEXT'] = "TEXT"; TypeEnum[TypeEnum["KEYWORD"] = 'KEYWORD'] = "KEYWORD"; TypeEnum[TypeEnum["LONG"] = 'LONG'] = "LONG"; TypeEnum[TypeEnum["INTEGER"] = 'INTEGER'] = "INTEGER"; TypeEnum[TypeEnum["SHORT"] = 'SHORT'] = "SHORT"; TypeEnum[TypeEnum["BYTE"] = 'BYTE'] = "BYTE"; TypeEnum[TypeEnum["DOUBLE"] = 'DOUBLE'] = "DOUBLE"; TypeEnum[TypeEnum["FLOAT"] = 'FLOAT'] = "FLOAT"; TypeEnum[TypeEnum["DATE"] = 'DATE'] = "DATE"; TypeEnum[TypeEnum["BOOLEAN"] = 'BOOLEAN'] = "BOOLEAN"; TypeEnum[TypeEnum["BINARY"] = 'BINARY'] = "BINARY"; TypeEnum[TypeEnum["INTRANGE"] = 'INT_RANGE'] = "INTRANGE"; TypeEnum[TypeEnum["FLOATRANGE"] = 'FLOAT_RANGE'] = "FLOATRANGE"; TypeEnum[TypeEnum["LONGRANGE"] = 'LONG_RANGE'] = "LONGRANGE"; TypeEnum[TypeEnum["DOUBLERANGE"] = 'DOUBLE_RANGE'] = "DOUBLERANGE"; TypeEnum[TypeEnum["DATERANGE"] = 'DATE_RANGE'] = "DATERANGE"; TypeEnum[TypeEnum["OBJECT"] = 'OBJECT'] = "OBJECT"; TypeEnum[TypeEnum["NESTED"] = 'NESTED'] = "NESTED"; TypeEnum[TypeEnum["GEOPOINT"] = 'GEO_POINT'] = "GEOPOINT"; TypeEnum[TypeEnum["GEOSHAPE"] = 'GEO_SHAPE'] = "GEOSHAPE"; TypeEnum[TypeEnum["IP"] = 'IP'] = "IP"; TypeEnum[TypeEnum["COMPLETION"] = 'COMPLETION'] = "COMPLETION"; TypeEnum[TypeEnum["TOKENCOUNT"] = 'TOKEN_COUNT'] = "TOKENCOUNT"; TypeEnum[TypeEnum["MAPPERMURMUR3"] = 'MAPPER_MURMUR3'] = "MAPPERMURMUR3"; TypeEnum[TypeEnum["UNKNOWN"] = 'UNKNOWN'] = "UNKNOWN"; TypeEnum[TypeEnum["VARCHAR"] = 'VARCHAR'] = "VARCHAR"; TypeEnum[TypeEnum["CHAR"] = 'CHAR'] = "CHAR"; TypeEnum[TypeEnum["CHARACTER"] = 'CHARACTER'] = "CHARACTER"; TypeEnum[TypeEnum["BIT"] = 'BIT'] = "BIT"; TypeEnum[TypeEnum["TINYINT"] = 'TINYINT'] = "TINYINT"; TypeEnum[TypeEnum["SMALLINT"] = 'SMALLINT'] = "SMALLINT"; TypeEnum[TypeEnum["INT"] = 'INT'] = "INT"; TypeEnum[TypeEnum["BIGINT"] = 'BIGINT'] = "BIGINT"; TypeEnum[TypeEnum["DECIMAL"] = 'DECIMAL'] = "DECIMAL"; TypeEnum[TypeEnum["NUMERIC"] = 'NUMERIC'] = "NUMERIC"; TypeEnum[TypeEnum["REAL"] = 'REAL'] = "REAL"; TypeEnum[TypeEnum["DOUBLEPRECISION"] = 'DOUBLEPRECISION'] = "DOUBLEPRECISION"; TypeEnum[TypeEnum["TIMESTAMP"] = 'TIMESTAMP'] = "TIMESTAMP"; TypeEnum[TypeEnum["TIME"] = 'TIME'] = "TIME"; TypeEnum[TypeEnum["INTERVAL"] = 'INTERVAL'] = "INTERVAL"; TypeEnum[TypeEnum["GEOMETRY"] = 'GEOMETRY'] = "GEOMETRY"; TypeEnum[TypeEnum["GEOGRAPHY"] = 'GEOGRAPHY'] = "GEOGRAPHY"; TypeEnum[TypeEnum["POINT"] = 'POINT'] = "POINT"; TypeEnum[TypeEnum["LINESTRING"] = 'LINESTRING'] = "LINESTRING"; TypeEnum[TypeEnum["POLYGON"] = 'POLYGON'] = "POLYGON"; TypeEnum[TypeEnum["MULTIPOINT"] = 'MULTIPOINT'] = "MULTIPOINT"; TypeEnum[TypeEnum["MULTILINESTRING"] = 'MULTILINESTRING'] = "MULTILINESTRING"; TypeEnum[TypeEnum["MULTIPOLYGON"] = 'MULTIPOLYGON'] = "MULTIPOLYGON"; TypeEnum[TypeEnum["GEOMETRYCOLLECTION"] = 'GEOMETRYCOLLECTION'] = "GEOMETRYCOLLECTION"; TypeEnum[TypeEnum["MURMUR3"] = 'MURMUR3'] = "MURMUR3"; })(TypeEnum = CollectionReferenceDescriptionProperty.TypeEnum || (CollectionReferenceDescriptionProperty.TypeEnum = {})); })(CollectionReferenceDescriptionProperty || (CollectionReferenceDescriptionProperty = {})); /** * @export * @namespace ComputationRequest */ export var ComputationRequest; (function (ComputationRequest) { /** * @export * @enum {string} */ var MetricEnum; (function (MetricEnum) { MetricEnum[MetricEnum["AVG"] = 'AVG'] = "AVG"; MetricEnum[MetricEnum["MAX"] = 'MAX'] = "MAX"; MetricEnum[MetricEnum["MIN"] = 'MIN'] = "MIN"; MetricEnum[MetricEnum["SUM"] = 'SUM'] = "SUM"; MetricEnum[MetricEnum["CARDINALITY"] = 'CARDINALITY'] = "CARDINALITY"; MetricEnum[MetricEnum["SPANNING"] = 'SPANNING'] = "SPANNING"; MetricEnum[MetricEnum["GEOBBOX"] = 'GEOBBOX'] = "GEOBBOX"; MetricEnum[MetricEnum["GEOCENTROID"] = 'GEOCENTROID'] = "GEOCENTROID"; })(MetricEnum = ComputationRequest.MetricEnum || (ComputationRequest.MetricEnum = {})); })(ComputationRequest || (ComputationRequest = {})); /** * @export * @namespace ComputationResponse */ export var ComputationResponse; (function (ComputationResponse) { /** * @export * @enum {string} */ var MetricEnum; (function (MetricEnum) { MetricEnum[MetricEnum["AVG"] = 'AVG'] = "AVG"; MetricEnum[MetricEnum["MAX"] = 'MAX'] = "MAX"; MetricEnum[MetricEnum["MIN"] = 'MIN'] = "MIN"; MetricEnum[MetricEnum["SUM"] = 'SUM'] = "SUM"; MetricEnum[MetricEnum["CARDINALITY"] = 'CARDINALITY'] = "CARDINALITY"; MetricEnum[MetricEnum["SPANNING"] = 'SPANNING'] = "SPANNING"; MetricEnum[MetricEnum["GEOBBOX"] = 'GEOBBOX'] = "GEOBBOX"; MetricEnum[MetricEnum["GEOCENTROID"] = 'GEOCENTROID'] = "GEOCENTROID"; })(MetricEnum = ComputationResponse.MetricEnum || (ComputationResponse.MetricEnum = {})); })(ComputationResponse || (ComputationResponse = {})); /** * @export * @namespace Crs */ export var Crs; (function (Crs) { /** * @export * @enum {string} */ var TypeEnum; (function (TypeEnum) { TypeEnum[TypeEnum["Name"] = 'name'] = "Name"; TypeEnum[TypeEnum["Link"] = 'link'] = "Link"; })(TypeEnum = Crs.TypeEnum || (Crs.TypeEnum = {})); })(Crs || (Crs = {})); /** * @export * @namespace Expression */ export var Expression; (function (Expression) { /** * @export * @enum {string} */ var OpEnum; (function (OpEnum) { OpEnum[OpEnum["Eq"] = 'eq'] = "Eq"; OpEnum[OpEnum["Gte"] = 'gte'] = "Gte"; OpEnum[OpEnum["Gt"] = 'gt'] = "Gt"; OpEnum[OpEnum["Lte"] = 'lte'] = "Lte"; OpEnum[OpEnum["Lt"] = 'lt'] = "Lt"; OpEnum[OpEnum["Like"] = 'like'] = "Like"; OpEnum[OpEnum["Ne"] = 'ne'] = "Ne"; OpEnum[OpEnum["Range"] = 'range'] = "Range"; OpEnum[OpEnum["Within"] = 'within'] = "Within"; OpEnum[OpEnum["Notwithin"] = 'notwithin'] = "Notwithin"; OpEnum[OpEnum["Intersects"] = 'intersects'] = "Intersects"; OpEnum[OpEnum["Notintersects"] = 'notintersects'] = "Notintersects"; })(OpEnum = Expression.OpEnum || (Expression.OpEnum = {})); })(Expression || (Expression = {})); /** * @export * @namespace Interval */ export var Interval; (function (Interval) { /** * @export * @enum {string} */ var UnitEnum; (function (UnitEnum) { UnitEnum[UnitEnum["Year"] = 'year'] = "Year"; UnitEnum[UnitEnum["Quarter"] = 'quarter'] = "Quarter"; UnitEnum[UnitEnum["Month"] = 'month'] = "Month"; UnitEnum[UnitEnum["Week"] = 'week'] = "Week"; UnitEnum[UnitEnum["Day"] = 'day'] = "Day"; UnitEnum[UnitEnum["Hour"] = 'hour'] = "Hour"; UnitEnum[UnitEnum["Minute"] = 'minute'] = "Minute"; UnitEnum[UnitEnum["Second"] = 'second'] = "Second"; })(UnitEnum = Interval.UnitEnum || (Interval.UnitEnum = {})); })(Interval || (Interval = {})); /** * @export * @namespace Metric */ export var Metric; (function (Metric) { /** * @export * @enum {string} */ var CollectFctEnum; (function (CollectFctEnum) { CollectFctEnum[CollectFctEnum["AVG"] = 'AVG'] = "AVG"; CollectFctEnum[CollectFctEnum["CARDINALITY"] = 'CARDINALITY'] = "CARDINALITY"; CollectFctEnum[CollectFctEnum["MAX"] = 'MAX'] = "MAX"; CollectFctEnum[CollectFctEnum["MIN"] = 'MIN'] = "MIN"; CollectFctEnum[CollectFctEnum["SUM"] = 'SUM'] = "SUM"; CollectFctEnum[CollectFctEnum["GEOCENTROID"] = 'GEOCENTROID'] = "GEOCENTROID"; CollectFctEnum[CollectFctEnum["GEOBBOX"] = 'GEOBBOX'] = "GEOBBOX"; })(CollectFctEnum = Metric.CollectFctEnum || (Metric.CollectFctEnum = {})); })(Metric || (Metric = {})); /** * CollectionsApi - fetch parameter creator * @export */ export var CollectionsApiFetchParamCreator = function (configuration) { return { /** * Delete a collection reference in ARLAS * @summary Delete a collection reference * @param {string} collection collection * @param {boolean} [pretty] Pretty print * @param {*} [options] Override http request option. * @throws {RequiredError} */ _delete: function (collection, pretty, options) { if (options === void 0) { options = {}; } // verify required parameter 'collection' is not null or undefined if (collection === null || collection === undefined) { throw new RequiredError('collection', 'Required parameter collection was null or undefined when calling _delete.'); } var localVarPath = "/collections/{collection}" .replace("{" + "collection" + "}", encodeURIComponent(String(collection))); 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, }; }, /** * Get all collection references in ARLAS as json file * @summary Get all collection references as a json file * @param {*} [options] Override http request option. * @throws {RequiredError} */ exportCollections: function (options) { if (options === void 0) { options = {}; } var localVarPath = "/collections/_export"; var localVarUrlObj = url.parse(localVarPath, true); var localVarRequestOptions = Object.assign({ method: 'GET' }, options); var localVarHeaderParameter = {}; var localVarQueryParameter = {}; 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, }; }, /** * Get a collection reference in ARLAS * @summary Get a collection reference * @param {string} collection collection * @param {boolean} [pretty] Pretty print * @param {*} [options] Override http request option. * @throws {RequiredError} */ get: function (collection, pretty, options) { if (options === void 0) { options = {}; } // verify required parameter 'collection' is not null or undefined if (collection === null || collection === undefined) { throw new RequiredError('collection', 'Required parameter collection was null or undefined when calling get.'); } var localVarPath = "/collections/{collection}" .replace("{" + "collection" + "}", encodeURIComponent(String(collection))); 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, }; }, /** * Get all collection references in ARLAS * @summary Get all collection references * @param {boolean} [pretty] Pretty print * @param {*} [options] Override http request option. * @throws {RequiredError} */ getAll: function (pretty, options) { if (options === void 0) { options = {}; } var localVarPath = "/collections"; 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, }; }, /** * Add collection references in ARLAS from a json file * @summary Add collection references from a json file * @param {FormDataContentDisposition} [file] * @param {*} [options] Override http request option. * @throws {RequiredError} */ importCollections: function (file, options) { if (options === void 0) { options = {}; } var localVarPath = "/collections/_import"; var localVarUrlObj = url.parse(localVarPath, true); var localVarRequestOptions = Object.assign({ method: 'POST' }, options); var localVarHeaderParameter = {}; var localVarQueryParameter = {}; var localVarFormParams = new url.URLSearchParams(); if (file !== undefined) { localVarFormParams.set('file', file); } localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded'; 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); localVarRequestOptions.body = localVarFormParams.toString(); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Update a collection reference's organisations attribute. * @summary Update a collection reference's organisations attribute. * @param {CollectionReferenceUpdateOrg} body organisationsParamsUpdate * @param {string} collection collection * @param {boolean} [pretty] Pretty print * @param {*} [options] Override http request option. * @throws {RequiredError} */ patch: function (body, collection, pretty, options) { if (options === void 0) { options = {}; } // 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 patch.'); } // verify required parameter 'collection' is not null or undefined if (collection === null || collection === undefined) { throw new RequiredError('collection', 'Required parameter collection was null or undefined when calling patch.'); } var localVarPath = "/collections/{collection}/organisations" .replace("{" + "collection" + "}", encodeURIComponent(String(collection))); var localVarUrlObj = url.parse(localVarPath, true); var localVarRequestOptions = Object.assign({ method: 'PATCH' }, options); var localVarHeaderParameter = {}; var localVarQueryParameter = {}; 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 = ("CollectionReferenceUpdateOrg" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Update a collection reference's display collection name attribute. * @summary Update a collection reference's display collection name attribute. * @param {string} body collectionDisplayName * @param {string} collection collection * @param {boolean} [pretty] Pretty print * @param {*} [options] Override http request option. * @throws {RequiredError} */ patchCollectionDisplayName: function (body, collection, pretty, options) { if (options === void 0) { options = {}; } // 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 patchCollectionDisplayName.'); } // verify required parameter 'collection' is not null or undefined if (collection === null || collection === undefined) { throw new RequiredError('collection', 'Required parameter collection was null or undefined when calling patchCollectionDisplayName.'); } var localVarPath = "/collections/{collection}/display_names/collection" .replace("{" + "collection" + "}", encodeURIComponent(String(collection))); var localVarUrlObj = url.parse(localVarPath, true); var localVarRequestOptions = Object.assign({ method: 'PATCH' }, options); var localVarHeaderParameter = {}; var localVarQueryParameter = {}; 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(body || {}) : (body || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Update a collection reference's display fields name attribute. * @summary Update a collection reference's display fields name attribute. * @param {{ [key: string]: string; }} body fieldsDisplayNames * @param {string} collection collection * @param {boolean} [pretty] Pretty print * @param {*} [options] Override http request option. * @throws {RequiredError} */ patchFieldsDisplayNames: function (body, collection, pretty, options) { if (options === void 0) { options = {}; } // 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 patchFieldsDisplayNames.'); } // verify required parameter 'collection' is not null or undefined if (collection === null || collection === undefined) { throw new RequiredError('collection', 'Required parameter collection was null or undefined when calling patchFieldsDisplayNames.'); } var localVarPath = "/collections/{collection}/display_names/fields" .replace("{" + "collection" + "}", encodeURIComponent(String(collection))); var localVarUrlObj = url.parse(localVarPath, true); var localVarRequestOptions = Object.assign({ method: 'PATCH' }, options); var localVarHeaderParameter = {}; var localVarQueryParameter = {}; 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 = ("{ [key: string]: string; }" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Update a collection reference's display shape columns name attribute. * @summary Update a collection reference's display shape columns name attribute. * @param {{ [key: string]: string; }} body shapeColumnsDisplayNames * @param {string} collection collection * @param {boolean} [pretty] Pretty print * @param {*} [options] Override http request option. * @throws {RequiredError} */ patchShapeColumnsDisplayNames: function (body, collection, pretty, options) { if (options === void 0) { options = {}; } // 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 patchShapeColumnsDisplayNames.'); } // verify required parameter 'collection' is not null or undefined if (collection === null || collection === undefined) { throw new RequiredError('collection', 'Required parameter collection was null or undefined when calling patchShapeColumnsDisplayNames.'); } var localVarPath = "/collections/{collection}/display_names/shape_columns" .replace("{" + "collection" + "}", encodeURIComponent(String(collection))); var localVarUrlObj = url.parse(localVarPath, true); var localVarRequestOptions = Object.assign({ method: 'PATCH' }, options); var localVarHeaderParameter = {}; var localVarQueryParameter = {}; 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 = ("{ [key: string]: string; }" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, /** * Add a collection reference in ARLAS * @summary Add a collection reference * @param {CollectionReferenceParameters} body collectionParams * @param {string} collection collection * @param {boolean} [pretty] Pretty print * @param {boolean} [checkfields] * @param {*} [options] Override http request option. * @throws {RequiredError} */ put: function (body, collection, pretty, checkfields, options) { if (options === void 0) { options = {}; } // 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 put.'); } // verify required parameter 'collection' is not null or undefined if (collection === null || collection === undefined) { throw new RequiredError('collection', 'Required parameter collection was null or undefined when calling put.'); } var localVarPath = "/collections/{collection}" .replace("{" + "collection" + "}", encodeURIComponent(String(collection))); var localVarUrlObj = url.parse(localVarPath, true); var localVarRequestOptions = Object.assign({ method: 'PUT' }, options); var localVarHeaderParameter = {}; var localVarQueryParameter = {}; if (pretty !== undefined) { localVarQueryParameter['pretty'] = pretty; } if (checkfields !== undefined) { localVarQueryParameter['checkfields'] = checkfields; } 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 = ("CollectionReferenceParameters" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : (body || ""); return { url: url.format(localVarUrlObj), options: localVarRequestOptions, }; }, }; }; /** * CollectionsApi - functional programming interface * @export */ export var CollectionsApiFp = function (configuration) { return { /** * Delete a collection reference in ARLAS * @summary Delete a collection reference * @param {string} collection collection * @param {boolean} [pretty] Pretty print * @param {*} [options] Override http request option. * @throws {RequiredError} */ _delete: function (collection, pretty, options) { var localVarFetchArgs = CollectionsApiFetchParamCreator(configuration)._delete(collection, pretty, options); return function (fetch, basePath) { if (fetch === void 0) { fetch = isomorphicFetch; } 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; } }); }; }, /** * Get all collection references in ARLAS as json file * @summary Get all collection references as a json file * @param {*} [options] Override http request option. * @throws {RequiredError} */ exportCollections: function (options) { var localVarFetchArgs = CollectionsApiFetchParamCreator(configuration).exportCollections(options); return function (fetch, basePath) { if (fetch === void 0) { fetch = isomorphicFetch; } 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; } }); }; }, /** * Get a collection reference in ARLAS * @summary Get a collection reference * @param {string} collection collection * @param {boolean} [pretty] Pretty print * @param {*} [options] Override http request option. * @throws {RequiredError} */ get: function (collection, pretty, options) { var localVarFetchArgs = CollectionsApiFetchParamCreator(configuration).get(collection, pretty, options); return function (fetch, basePath) { if (fetch === void 0) { fetch = isomorphicFetch; } 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; } }); }; }, /** * Get all collection references in ARLAS * @summary Get all collection references * @param {boolean} [pretty] Pretty print * @param {*} [options] Override http request option. * @throws {RequiredError} */ getAll: function (pretty, options) { var localVarFetchArgs = CollectionsApiFetchParamCreator(configuration).getAll(pretty, options); return function (fetch, basePath) { if (fetch === void 0) { fetch = isomorphicFetch; } 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; } }); }; }, /** * Add collection references in ARLAS from a json file * @summary Add collection references from a json file * @param {FormDataContentDisposition} [file] * @param {*} [options] Override http request option. * @throws {RequiredError} */ importCollections: function (file, options) { var localVarFetchArgs = CollectionsApiFetchParamCreator(configuration).importCollections(file, options); return function (fetch, basePath) { if (fetch === void 0) { fetch = isomorphicFetch; } 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 a collection reference's organisations attribute. * @summary Update a collection reference's organisations attribute. * @param {CollectionReferenceUpdateOrg} body organisationsParamsUpdate * @param {string} collection collection * @param {boolean} [pretty] Pretty print * @param {*} [options] Override http request option. * @throws {RequiredError} */ patch: function (body, collection, pretty, options) { var localVarFetchArgs = CollectionsApiFetchParamCreator(configuration).patch(body, collection, pretty, options); return function (fetch, basePath) { if (fetch === void 0) { fetch = isomorphicFetch; } 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 a collection reference's display collection name attribute. * @summary Update a collection reference's display collection name attribute. * @param {string} body collectionDisplayName * @param {string} collection collection * @param {boolean} [pretty] Pretty print * @param {*} [options] Override http request option. * @throws {RequiredError} */ patchCollectionDisplayName: function (body, collection, pretty, options) { var localVarFetchArgs = CollectionsApiFetchParamCreator(configuration).patchCollectionDisplayName(body, collection, pretty, options); return function (fetch, basePath) { if (fetch === void 0) { fetch = isomorphicFetch; } 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 a collection reference's display fields name attribute. * @summary Update a collection reference's display fields name attribute. * @param {{ [key: string]: string; }} body fieldsDisplayNames * @param {string} collection collection * @param {boolean} [pretty] Pretty print * @param {*} [options] Override http request option. * @throws {RequiredError} */ patchFieldsDisplayNames: function (body, collection, pretty, options) { var localVarFetchArgs = CollectionsApiFetchParamCreator(configuration).patchFieldsDisplayNames(body, collection, pretty, options); return function (fetch, basePath) { if (fetch === void 0) { fetch = isomorphicFetch; } 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 a collection reference's display shape columns name attribute. * @summary Update a collection reference's display shape columns name attribute. * @param {{ [key: string]: string; }} body shapeColumnsDisplayNames * @param {string} collection collection * @param {boolean} [pretty] Pretty print * @param {*} [options] Override http request option. * @throws {RequiredError} */ patchShapeColumnsDisplayNames: function (body, collection, pretty, options) { var localVarFetchArgs = CollectionsApiFetchParamCreator(configuration).patchShapeColumnsDisplayNames(body, collection, pretty, options); return function (fetch, basePath) { if (fetch === void 0) { fetch = isomorphicFetch; } 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; } }); }; }, /** * Add a collection reference in ARLAS * @summary Add a collection reference * @param {CollectionReferenceParameters} body collectionParams * @param {string} collection collection * @param {boolean} [pretty] Pretty print * @param {boolean} [checkfields] * @param {*} [options] Override http request option. * @throws {RequiredError} */ put: function (body, collection, pretty, checkfields, options) { var localVarFetchArgs = CollectionsApiFetchParamCreator(configuration).put(body, collection, pretty, checkfields, options); return function (fetch, basePath) { if (fetch === void 0) { fetch = isomorphicFetch; } 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; } }); }; }, }; }; /** * CollectionsApi - factory interface * @export */ export var CollectionsApiFactory = function (configuration, fetch, basePath) { return { /** * Delete a collection reference in ARLAS * @summary Delete a collection reference * @param {string} collection collection * @param {boolean} [pretty] Pretty print * @param {*} [options] Override http request option. * @throws {RequiredError} */ _delete: function (collection, pretty, options) { return CollectionsApiFp(configuration)._delete(collection, pretty, options)(fetch, basePath); }, /** * Get all collection references in ARLAS as json file * @summary Get all collection references as a json file * @param {*} [options] Override http request option. * @throws {RequiredError} */ exportCollections: function (options) { return CollectionsApiFp(configuration).exportCollections(options)(fetch, basePath); }, /** * Get a collection reference in ARLAS * @summary Get a collection reference * @param {string} collection collection * @param {boolean} [pretty] Pretty print * @param {*} [options] Override http request option. * @throws {RequiredError} */ get: function (collection, pretty, options) { return CollectionsApiFp(configuration).get(collection, pretty, options)(fetch, basePath); }, /** * Get all collection references in ARLAS * @summary Get all collection references * @param {boolean} [pretty] Pretty print * @param {*} [options] Override http request option. * @throws {RequiredError} */ getAll: function (pretty, options) { return CollectionsApiFp(configuration).getAll(pretty, options)(fetch, basePath); }, /** * Add collection references in ARLAS from a json file * @summary Add collection references from a json file * @param {FormDataContentDisposition} [file] * @param {*} [options] Override http request option. * @throws {RequiredError} */ importCollections: function (file, options) { return CollectionsApiFp(configuration).importCollections(file, options)(fetch, basePath); }, /** * Update a collection reference's organisations attribute. * @summary Update a collection reference's organisations attribute. * @param {CollectionReferenceUpdateOrg} body organisationsParamsUpdate * @param {string} collection collection * @param {boolean} [pretty] Pretty print * @param {*} [options] Override http request option. * @throws {RequiredError} */ patch: function (body, collection, pretty, options) { return CollectionsApiFp(configuration).patch(body, collection, pretty, options)(fetch, basePath); }, /** * Update a collection reference's display collection name attribute. * @summary Update a collection reference's display collection name attribute. * @param {string} body collectionDisplayName * @param {string} collection collection * @param {boolean} [pretty] Pretty print * @param {*} [options] Override http request option. * @throws {RequiredError} */ patchCollectionDisplayName: function (body, collection, pretty, options) { return CollectionsApiFp(configuration).patchCollectionDisplayName(body, collection, pretty, options)(fetch, basePath); }, /** * Update a collection reference's display fields name attribute. * @summary Update a collection reference's display fields name attribute. * @param {{ [key: string]: string; }} body fieldsDisplayNames * @param {string} collection collection * @param {boolean} [pretty] Pretty print * @param {*} [options] Override http request option. * @throws {RequiredError} */ patchFieldsDisplayNames: function (body, collection, pretty, options) { return CollectionsApiFp(configuration).patchFieldsDisplayNames(body, collection, pretty, options)(fetch, basePath); }, /** * Update a collection reference's display shape columns name attribute. * @summary Update a collection reference's display shape columns name attribute. * @param {{ [key: string]: string; }} body shapeColumnsDisplayNames * @param {string} collection collection * @param {boolean} [pretty] Pretty print * @param {*} [options] Override http request option. * @throws {RequiredError} */ patchShapeColumnsDisplayNames: function (body, collection, pretty, options) { return CollectionsApiFp(configuration).patchShapeColumnsDisplayNames(body, collection, pretty, options)(fetch, basePath); }, /** * Add a collection reference in ARLAS * @summary Add a collection reference * @param {CollectionReferenceParameters} body collectionParams * @param {string} collection collection * @param {boolean} [pretty] Pretty print * @param {boolean} [checkfields] * @param {*} [options] Override http request option. * @throws {RequiredError} */ put: function (body, collection, pretty, checkfields, options) { return CollectionsApiFp(configuration).put(body, collection, pretty, checkfields, options)(fetch, basePath); }, }; }; /** * CollectionsApi - obj