@openeo/js-client 2.6.0 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/openeo.d.ts +340 -36
- package/openeo.js +1881 -1180
- package/openeo.min.js +1 -1
- package/package.json +2 -2
- package/src/capabilities.js +40 -0
- package/src/connection.js +159 -179
- package/src/env.js +13 -3
- package/src/logs.js +36 -0
- package/src/openeo.js +1 -1
- package/src/pages.js +349 -0
- package/src/typedefs.js +30 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ JavaScript/TypeScript client for the openEO API.
|
|
|
4
4
|
|
|
5
5
|
* [Documentation](https://open-eo.github.io/openeo-js-client/latest/).
|
|
6
6
|
|
|
7
|
-
The version of this client is **2.
|
|
7
|
+
The version of this client is **2.8.0** and supports **openEO API versions 1.x.x**.
|
|
8
8
|
Legacy versions are available as releases.
|
|
9
9
|
See the [CHANGELOG](CHANGELOG.md) for recent changes.
|
|
10
10
|
|
|
@@ -18,7 +18,7 @@ An *experimental* Typescript declaration file is available so that you can use t
|
|
|
18
18
|
|
|
19
19
|
To use it in a browser environment simply add the following code to your HTML file:
|
|
20
20
|
```html
|
|
21
|
-
<script src="https://cdn.jsdelivr.net/npm/axios@
|
|
21
|
+
<script src="https://cdn.jsdelivr.net/npm/axios@1/dist/axios.min.js"></script>
|
|
22
22
|
<script src="https://cdn.jsdelivr.net/npm/oidc-client@1/dist/oidc-client.min.js"></script> <!-- Only required if you'd like to enable authentication via OpenID Connect -->
|
|
23
23
|
<script src="https://cdn.jsdelivr.net/npm/multihashes@3/src/index.min.js"></script> <!-- Only required if you have checksums in the STAC metadata -->
|
|
24
24
|
<script src="https://cdn.jsdelivr.net/npm/@openeo/js-client@2/openeo.min.js"></script>
|
|
@@ -32,7 +32,7 @@ To install it in a NodeJS environment run:
|
|
|
32
32
|
Afterwards, you can import the package:
|
|
33
33
|
`const { OpenEO } = require('@openeo/js-client');`
|
|
34
34
|
|
|
35
|
-
### TypeScript
|
|
35
|
+
### TypeScript
|
|
36
36
|
|
|
37
37
|
Warning: The TypeScript integration is still **experimental**! Please help us improve it by opening issues or pull requests.
|
|
38
38
|
|
|
@@ -91,4 +91,4 @@ This package received major contributions from the following organizations:
|
|
|
91
91
|
|
|
92
92
|
There is an interactive web-based editor for coding using the openEO API,
|
|
93
93
|
which is based on the JavaScript client.
|
|
94
|
-
See [https://github.com/Open-EO/openeo-web-editor](https://github.com/Open-EO/openeo-web-editor) for more details.
|
|
94
|
+
See [https://github.com/Open-EO/openeo-web-editor](https://github.com/Open-EO/openeo-web-editor) for more details.
|
package/openeo.d.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { User, UserManager } from 'oidc-client';
|
|
4
4
|
import { ProcessRegistry } from '@openeo/js-commons';
|
|
5
5
|
import { Readable } from 'stream';
|
|
6
|
+
import axios from 'axios';
|
|
6
7
|
|
|
7
8
|
declare module OpenEO {
|
|
8
9
|
/**
|
|
@@ -197,6 +198,14 @@ declare module OpenEO {
|
|
|
197
198
|
* @hideconstructor
|
|
198
199
|
*/
|
|
199
200
|
export class Environment {
|
|
201
|
+
/**
|
|
202
|
+
* The axios instance to use for HTTP requests.
|
|
203
|
+
*
|
|
204
|
+
*
|
|
205
|
+
* @type {object}
|
|
206
|
+
* @static
|
|
207
|
+
*/
|
|
208
|
+
static axios: axios;
|
|
200
209
|
/**
|
|
201
210
|
* Returns the name of the Environment, `Node` or `Browser`.
|
|
202
211
|
*
|
|
@@ -241,7 +250,7 @@ declare module OpenEO {
|
|
|
241
250
|
* @param {string|Buffer} str - String to encode.
|
|
242
251
|
* @returns {string} String encoded in Base64.
|
|
243
252
|
*/
|
|
244
|
-
static base64encode(str: string|Buffer): string;
|
|
253
|
+
static base64encode(str: string | Buffer): string;
|
|
245
254
|
/**
|
|
246
255
|
* Detect the file name for the given data source.
|
|
247
256
|
*
|
|
@@ -302,14 +311,14 @@ declare module OpenEO {
|
|
|
302
311
|
username: string;
|
|
303
312
|
/**
|
|
304
313
|
* Authenticate with HTTP Basic.
|
|
305
|
-
*
|
|
314
|
+
*
|
|
306
315
|
* @async
|
|
307
|
-
* @param {string} username
|
|
308
|
-
* @param {string} password
|
|
316
|
+
* @param {string} username
|
|
317
|
+
* @param {string} password
|
|
309
318
|
* @returns {Promise<void>}
|
|
310
319
|
* @throws {Error}
|
|
311
320
|
*/
|
|
312
|
-
login(username: string, password: string)
|
|
321
|
+
login(username: string, password: string): Promise<void>;
|
|
313
322
|
}
|
|
314
323
|
/**
|
|
315
324
|
* Capabilities of a back-end.
|
|
@@ -395,6 +404,26 @@ declare module OpenEO {
|
|
|
395
404
|
* @returns {Array.<Link>} Array of link objects (href, title, rel, type)
|
|
396
405
|
*/
|
|
397
406
|
links(): Array<Link>;
|
|
407
|
+
/**
|
|
408
|
+
* Returns list of backends in the federation.
|
|
409
|
+
*
|
|
410
|
+
* @returns {Array.<FederationBackend>} Array of backends
|
|
411
|
+
*/
|
|
412
|
+
listFederation(): Array<FederationBackend>;
|
|
413
|
+
/**
|
|
414
|
+
* Given just the string ID of a backend within the federation, returns that backend's full details as a FederationBackend object.
|
|
415
|
+
*
|
|
416
|
+
* @param {string} backendId - The ID of a backend within the federation
|
|
417
|
+
* @returns {FederationBackend} The full details of the backend
|
|
418
|
+
*/
|
|
419
|
+
getFederationBackend(backendId: string): FederationBackend;
|
|
420
|
+
/**
|
|
421
|
+
* Given a list of string IDs of backends within the federation, returns those backends' full details as FederationBackend objects.
|
|
422
|
+
*
|
|
423
|
+
* @param {Array<string>} backendIds - The IDs of backends within the federation
|
|
424
|
+
* @returns {Array<FederationBackend>} An array in the same order as the input, containing for each position the full details of the backend
|
|
425
|
+
*/
|
|
426
|
+
getFederationBackends(backendIds: Array<string>): Array<FederationBackend>;
|
|
398
427
|
/**
|
|
399
428
|
* Lists all supported features.
|
|
400
429
|
*
|
|
@@ -806,9 +835,26 @@ declare module OpenEO {
|
|
|
806
835
|
* @type {Connection}
|
|
807
836
|
*/
|
|
808
837
|
protected connection: Connection;
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
838
|
+
/**
|
|
839
|
+
* @protected
|
|
840
|
+
* @type {string}
|
|
841
|
+
*/
|
|
842
|
+
protected endpoint: string;
|
|
843
|
+
/**
|
|
844
|
+
* @protected
|
|
845
|
+
* @type {string}
|
|
846
|
+
*/
|
|
847
|
+
protected lastId: string;
|
|
848
|
+
/**
|
|
849
|
+
* @protected
|
|
850
|
+
* @type {?string}
|
|
851
|
+
*/
|
|
852
|
+
protected level: string | null;
|
|
853
|
+
/**
|
|
854
|
+
* @protected
|
|
855
|
+
* @type {Set<string>}
|
|
856
|
+
*/
|
|
857
|
+
protected missing: Set<string>;
|
|
812
858
|
/**
|
|
813
859
|
* Retrieves the next log entries since the last request.
|
|
814
860
|
*
|
|
@@ -819,6 +865,16 @@ declare module OpenEO {
|
|
|
819
865
|
* @returns {Promise<Array.<Log>>}
|
|
820
866
|
*/
|
|
821
867
|
nextLogs(limit?: number): Promise<Array<Log>>;
|
|
868
|
+
/**
|
|
869
|
+
* Retrieves the backend identifiers that are (partially) missing in the logs.
|
|
870
|
+
*
|
|
871
|
+
* This is only filled after the first request using `nextLogs` or `next`.
|
|
872
|
+
*
|
|
873
|
+
* @returns {Array.<string>}
|
|
874
|
+
* @see {Logs#nextLogs}
|
|
875
|
+
* @see {Logs#next}
|
|
876
|
+
*/
|
|
877
|
+
getMissingBackends(): Array<string>;
|
|
822
878
|
/**
|
|
823
879
|
* Retrieves the next log entries since the last request.
|
|
824
880
|
*
|
|
@@ -1846,6 +1902,158 @@ declare module OpenEO {
|
|
|
1846
1902
|
*/
|
|
1847
1903
|
generateId(prefix?: string): string;
|
|
1848
1904
|
}
|
|
1905
|
+
/**
|
|
1906
|
+
* A class to handle pagination of resources.
|
|
1907
|
+
*
|
|
1908
|
+
* @abstract
|
|
1909
|
+
*/
|
|
1910
|
+
export class Pages {
|
|
1911
|
+
/**
|
|
1912
|
+
* Creates an instance of Pages.
|
|
1913
|
+
*
|
|
1914
|
+
* @param {Connection} connection
|
|
1915
|
+
* @param {string} endpoint
|
|
1916
|
+
* @param {string} key
|
|
1917
|
+
* @param {Constructor} cls - Class
|
|
1918
|
+
* @param {object} [params={}]
|
|
1919
|
+
* @param {string} primaryKey
|
|
1920
|
+
*/
|
|
1921
|
+
constructor(connection: Connection, endpoint: string, key: string, cls: Constructor, params?: object, primaryKey?: string);
|
|
1922
|
+
connection: Connection;
|
|
1923
|
+
nextUrl: string;
|
|
1924
|
+
key: string;
|
|
1925
|
+
primaryKey: string;
|
|
1926
|
+
cls: Constructor;
|
|
1927
|
+
params: any;
|
|
1928
|
+
/**
|
|
1929
|
+
* Returns true if there are more pages to fetch.
|
|
1930
|
+
*
|
|
1931
|
+
* @returns {boolean}
|
|
1932
|
+
*/
|
|
1933
|
+
hasNextPage(): boolean;
|
|
1934
|
+
/**
|
|
1935
|
+
* Returns the next page of resources.
|
|
1936
|
+
*
|
|
1937
|
+
* @async
|
|
1938
|
+
* @param {Array.<object>} oldObjects - Existing objects to update, if any.
|
|
1939
|
+
* @param {boolean} [toArray=true] - Whether to return the objects as a simplified array or as an object with all information.
|
|
1940
|
+
* @returns {Array.<object>}
|
|
1941
|
+
* @throws {Error}
|
|
1942
|
+
*/
|
|
1943
|
+
nextPage(oldObjects?: Array<object>, toArray?: boolean): Array<object>;
|
|
1944
|
+
/**
|
|
1945
|
+
* Ensures a variable is an array.
|
|
1946
|
+
*
|
|
1947
|
+
* @protected
|
|
1948
|
+
* @param {*} x
|
|
1949
|
+
* @returns {Array}
|
|
1950
|
+
*/
|
|
1951
|
+
protected _ensureArray(x: any): any[];
|
|
1952
|
+
/**
|
|
1953
|
+
* Creates a facade for the object, if needed.
|
|
1954
|
+
*
|
|
1955
|
+
* @protected
|
|
1956
|
+
* @param {object} obj
|
|
1957
|
+
* @returns {object}
|
|
1958
|
+
*/
|
|
1959
|
+
protected _createObject(obj: object): object;
|
|
1960
|
+
/**
|
|
1961
|
+
* Caches the plain objects if needed.
|
|
1962
|
+
*
|
|
1963
|
+
* @param {Array.<object>} objects
|
|
1964
|
+
* @returns {Array.<object>}
|
|
1965
|
+
*/
|
|
1966
|
+
_cache(objects: Array<object>): Array<object>;
|
|
1967
|
+
/**
|
|
1968
|
+
* Get the URL of the next page from a response.
|
|
1969
|
+
*
|
|
1970
|
+
* @protected
|
|
1971
|
+
* @param {AxiosResponse} response
|
|
1972
|
+
* @returns {string | null}
|
|
1973
|
+
*/
|
|
1974
|
+
protected _getNextLink(response: AxiosResponse): string | null;
|
|
1975
|
+
/**
|
|
1976
|
+
* Makes this class asynchronously iterable.
|
|
1977
|
+
*
|
|
1978
|
+
* @returns {AsyncIterator}
|
|
1979
|
+
*/
|
|
1980
|
+
[Symbol.asyncIterator](): AsyncIterator<any, any, any>;
|
|
1981
|
+
}
|
|
1982
|
+
/**
|
|
1983
|
+
* Paginate through collections.
|
|
1984
|
+
*/
|
|
1985
|
+
export class CollectionPages extends Pages {
|
|
1986
|
+
/**
|
|
1987
|
+
* Paginate through collections.
|
|
1988
|
+
*
|
|
1989
|
+
* @param {Connection} connection
|
|
1990
|
+
* @param {?number} limit
|
|
1991
|
+
*/
|
|
1992
|
+
constructor(connection: Connection, limit?: number | null);
|
|
1993
|
+
}
|
|
1994
|
+
/**
|
|
1995
|
+
* Paginate through collection items.
|
|
1996
|
+
*/
|
|
1997
|
+
export class ItemPages extends Pages {
|
|
1998
|
+
/**
|
|
1999
|
+
* Paginate through collection items.
|
|
2000
|
+
*
|
|
2001
|
+
* @param {Connection} connection
|
|
2002
|
+
* @param {string} collectionId
|
|
2003
|
+
* @param {object} params
|
|
2004
|
+
*/
|
|
2005
|
+
constructor(connection: Connection, collectionId: string, params: object);
|
|
2006
|
+
}
|
|
2007
|
+
/**
|
|
2008
|
+
* Paginate through jobs.
|
|
2009
|
+
*/
|
|
2010
|
+
export class JobPages extends Pages {
|
|
2011
|
+
/**
|
|
2012
|
+
* Paginate through jobs.
|
|
2013
|
+
*
|
|
2014
|
+
* @param {Connection} connection
|
|
2015
|
+
* @param {?number} limit
|
|
2016
|
+
*/
|
|
2017
|
+
constructor(connection: Connection, limit?: number | null);
|
|
2018
|
+
}
|
|
2019
|
+
/**
|
|
2020
|
+
* Paginate through processes.
|
|
2021
|
+
*/
|
|
2022
|
+
export class ProcessPages extends Pages {
|
|
2023
|
+
/**
|
|
2024
|
+
* Paginate through processes.
|
|
2025
|
+
*
|
|
2026
|
+
* @param {Connection} connection
|
|
2027
|
+
* @param {?number} limit
|
|
2028
|
+
* @param {?string} namespace
|
|
2029
|
+
*/
|
|
2030
|
+
constructor(connection: Connection, limit?: number | null, namespace?: string | null);
|
|
2031
|
+
namespace: string;
|
|
2032
|
+
}
|
|
2033
|
+
/**
|
|
2034
|
+
* Paginate through services.
|
|
2035
|
+
*/
|
|
2036
|
+
export class ServicePages extends Pages {
|
|
2037
|
+
/**
|
|
2038
|
+
* Paginate through services.
|
|
2039
|
+
*
|
|
2040
|
+
* @param {Connection} connection
|
|
2041
|
+
* @param {?number} limit
|
|
2042
|
+
*/
|
|
2043
|
+
constructor(connection: Connection, limit?: number | null);
|
|
2044
|
+
}
|
|
2045
|
+
/**
|
|
2046
|
+
* Paginate through user files.
|
|
2047
|
+
*/
|
|
2048
|
+
export class UserFilePages extends Pages {
|
|
2049
|
+
/**
|
|
2050
|
+
* Paginate through user files.
|
|
2051
|
+
*
|
|
2052
|
+
* @param {Connection} connection
|
|
2053
|
+
* @param {?number} limit
|
|
2054
|
+
*/
|
|
2055
|
+
constructor(connection: Connection, limit?: number | null);
|
|
2056
|
+
}
|
|
1849
2057
|
/**
|
|
1850
2058
|
* A connection to a back-end.
|
|
1851
2059
|
*/
|
|
@@ -1979,12 +2187,22 @@ declare module OpenEO {
|
|
|
1979
2187
|
* List all collections available on the back-end.
|
|
1980
2188
|
*
|
|
1981
2189
|
* The collections returned always comply to the latest STAC version (currently 1.0.0).
|
|
2190
|
+
* This function adds a self link to the response if not present.
|
|
1982
2191
|
*
|
|
1983
2192
|
* @async
|
|
1984
2193
|
* @returns {Promise<Collections>} A response compatible to the API specification.
|
|
1985
2194
|
* @throws {Error}
|
|
1986
2195
|
*/
|
|
1987
2196
|
listCollections(): Promise<Collections>;
|
|
2197
|
+
/**
|
|
2198
|
+
* Paginate through the collections available on the back-end.
|
|
2199
|
+
*
|
|
2200
|
+
* The collections returned always comply to the latest STAC version (currently 1.0.0).
|
|
2201
|
+
*
|
|
2202
|
+
* @param {?number} [limit=50] - The number of collections per request/page as integer. If `null`, requests all collections.
|
|
2203
|
+
* @returns {CollectionPages} A paged list of collections.
|
|
2204
|
+
*/
|
|
2205
|
+
paginateCollections(limit?: number | null): CollectionPages;
|
|
1988
2206
|
/**
|
|
1989
2207
|
* Get further information about a single collection.
|
|
1990
2208
|
*
|
|
@@ -1997,13 +2215,12 @@ declare module OpenEO {
|
|
|
1997
2215
|
*/
|
|
1998
2216
|
describeCollection(collectionId: string): Promise<Collection>;
|
|
1999
2217
|
/**
|
|
2000
|
-
*
|
|
2218
|
+
* Paginate through items for a specific collection.
|
|
2219
|
+
*
|
|
2001
2220
|
* May not be available for all collections.
|
|
2002
2221
|
*
|
|
2003
2222
|
* The items returned always comply to the latest STAC version (currently 1.0.0).
|
|
2004
2223
|
*
|
|
2005
|
-
* This is an experimental API and is subject to change.
|
|
2006
|
-
*
|
|
2007
2224
|
* @async
|
|
2008
2225
|
* @param {string} collectionId - Collection ID to request items for.
|
|
2009
2226
|
* @param {?Array.<number>} [spatialExtent=null] - Limits the items to the given bounding box in WGS84:
|
|
@@ -2016,10 +2233,10 @@ declare module OpenEO {
|
|
|
2016
2233
|
* each must be either an RFC 3339 compatible string or a Date object.
|
|
2017
2234
|
* Also supports open intervals by setting one of the boundaries to `null`, but never both.
|
|
2018
2235
|
* @param {?number} [limit=null] - The amount of items per request/page as integer. If `null` (default), the back-end decides.
|
|
2019
|
-
* @
|
|
2236
|
+
* @returns {Promise<ItemPages>} A response compatible to the API specification.
|
|
2020
2237
|
* @throws {Error}
|
|
2021
2238
|
*/
|
|
2022
|
-
listCollectionItems(collectionId: string, spatialExtent?: Array<number> | null, temporalExtent?: any[] | null, limit?: number | null):
|
|
2239
|
+
listCollectionItems(collectionId: string, spatialExtent?: Array<number> | null, temporalExtent?: any[] | null, limit?: number | null): Promise<ItemPages>;
|
|
2023
2240
|
/**
|
|
2024
2241
|
* Normalisation of the namespace to a value that is compatible with the OpenEO specs - EXPERIMENTAL.
|
|
2025
2242
|
*
|
|
@@ -2035,7 +2252,7 @@ declare module OpenEO {
|
|
|
2035
2252
|
*/
|
|
2036
2253
|
protected normalizeNamespace(namespace: string | null): string | null;
|
|
2037
2254
|
/**
|
|
2038
|
-
* List processes available on the back-end.
|
|
2255
|
+
* List all processes available on the back-end.
|
|
2039
2256
|
*
|
|
2040
2257
|
* Requests pre-defined processes by default.
|
|
2041
2258
|
* Set the namespace parameter to request processes from a specific namespace.
|
|
@@ -2043,12 +2260,28 @@ declare module OpenEO {
|
|
|
2043
2260
|
* Note: The list of namespaces can be retrieved by calling `listProcesses` without a namespace given.
|
|
2044
2261
|
* The namespaces are then listed in the property `namespaces`.
|
|
2045
2262
|
*
|
|
2263
|
+
* This function adds a self link to the response if not present.
|
|
2264
|
+
*
|
|
2046
2265
|
* @async
|
|
2047
2266
|
* @param {?string} [namespace=null] - Namespace of the processes (default to `null`, i.e. pre-defined processes). EXPERIMENTAL!
|
|
2048
2267
|
* @returns {Promise<Processes>} - A response compatible to the API specification.
|
|
2049
2268
|
* @throws {Error}
|
|
2050
2269
|
*/
|
|
2051
2270
|
listProcesses(namespace?: string | null): Promise<Processes>;
|
|
2271
|
+
/**
|
|
2272
|
+
* Paginate through the processes available on the back-end.
|
|
2273
|
+
*
|
|
2274
|
+
* Requests pre-defined processes by default.
|
|
2275
|
+
* Set the namespace parameter to request processes from a specific namespace.
|
|
2276
|
+
*
|
|
2277
|
+
* Note: The list of namespaces can be retrieved by calling `listProcesses` without a namespace given.
|
|
2278
|
+
* The namespaces are then listed in the property `namespaces`.
|
|
2279
|
+
*
|
|
2280
|
+
* @param {?string} [namespace=null] - Namespace of the processes (default to `null`, i.e. pre-defined processes). EXPERIMENTAL!
|
|
2281
|
+
* @param {?number} [limit=50] - The number of processes per request/page as integer. If `null`, requests all processes.
|
|
2282
|
+
* @returns {ProcessPages} A paged list of processes.
|
|
2283
|
+
*/
|
|
2284
|
+
paginateProcesses(namespace?: string | null, limit?: number | null): ProcessPages;
|
|
2052
2285
|
/**
|
|
2053
2286
|
* Get information about a single process.
|
|
2054
2287
|
*
|
|
@@ -2198,13 +2431,20 @@ declare module OpenEO {
|
|
|
2198
2431
|
*/
|
|
2199
2432
|
describeAccount(): Promise<UserAccount>;
|
|
2200
2433
|
/**
|
|
2201
|
-
*
|
|
2434
|
+
* List all files from the user workspace.
|
|
2202
2435
|
*
|
|
2203
2436
|
* @async
|
|
2204
2437
|
* @returns {Promise<ResponseArray.<UserFile>>} A list of files.
|
|
2205
2438
|
* @throws {Error}
|
|
2206
2439
|
*/
|
|
2207
2440
|
listFiles(): Promise<ResponseArray<UserFile>>;
|
|
2441
|
+
/**
|
|
2442
|
+
* Paginate through the files from the user workspace.
|
|
2443
|
+
*
|
|
2444
|
+
* @param {?number} [limit=50] - The number of files per request/page as integer. If `null`, requests all files.
|
|
2445
|
+
* @returns {ServicePages} A paged list of files.
|
|
2446
|
+
*/
|
|
2447
|
+
paginateFiles(limit?: number | null): ServicePages;
|
|
2208
2448
|
/**
|
|
2209
2449
|
* A callback that is executed on upload progress updates.
|
|
2210
2450
|
*
|
|
@@ -2253,12 +2493,12 @@ declare module OpenEO {
|
|
|
2253
2493
|
*
|
|
2254
2494
|
* @async
|
|
2255
2495
|
* @param {Process} process - User-defined process to validate.
|
|
2256
|
-
* @returns {Promise<
|
|
2496
|
+
* @returns {Promise<ValidationResult>} errors - A list of API compatible error objects. A valid process returns an empty list.
|
|
2257
2497
|
* @throws {Error}
|
|
2258
2498
|
*/
|
|
2259
|
-
validateProcess(process: Process): Promise<
|
|
2499
|
+
validateProcess(process: Process): Promise<ValidationResult>;
|
|
2260
2500
|
/**
|
|
2261
|
-
*
|
|
2501
|
+
* List all user-defined processes of the authenticated user.
|
|
2262
2502
|
*
|
|
2263
2503
|
* @async
|
|
2264
2504
|
* @param {Array.<UserProcess>} [oldProcesses=[]] - A list of existing user-defined processes to update.
|
|
@@ -2266,6 +2506,13 @@ declare module OpenEO {
|
|
|
2266
2506
|
* @throws {Error}
|
|
2267
2507
|
*/
|
|
2268
2508
|
listUserProcesses(oldProcesses?: Array<UserProcess>): Promise<ResponseArray<UserProcess>>;
|
|
2509
|
+
/**
|
|
2510
|
+
* Paginates through the user-defined processes of the authenticated user.
|
|
2511
|
+
*
|
|
2512
|
+
* @param {?number} [limit=50] - The number of processes per request/page as integer. If `null`, requests all processes.
|
|
2513
|
+
* @returns {ProcessPages} A paged list of user-defined processes.
|
|
2514
|
+
*/
|
|
2515
|
+
paginateUserProcesses(limit?: number | null): ProcessPages;
|
|
2269
2516
|
/**
|
|
2270
2517
|
* Creates a new stored user-defined process at the back-end.
|
|
2271
2518
|
*
|
|
@@ -2318,7 +2565,7 @@ declare module OpenEO {
|
|
|
2318
2565
|
*/
|
|
2319
2566
|
downloadResult(process: Process, targetPath: string, plan?: string | null, budget?: number | null, abortController?: AbortController | null): Promise<void>;
|
|
2320
2567
|
/**
|
|
2321
|
-
*
|
|
2568
|
+
* List all batch jobs of the authenticated user.
|
|
2322
2569
|
*
|
|
2323
2570
|
* @async
|
|
2324
2571
|
* @param {Array.<Job>} [oldJobs=[]] - A list of existing jobs to update.
|
|
@@ -2326,6 +2573,13 @@ declare module OpenEO {
|
|
|
2326
2573
|
* @throws {Error}
|
|
2327
2574
|
*/
|
|
2328
2575
|
listJobs(oldJobs?: Array<Job>): Promise<ResponseArray<Job>>;
|
|
2576
|
+
/**
|
|
2577
|
+
* Paginate through the batch jobs of the authenticated user.
|
|
2578
|
+
*
|
|
2579
|
+
* @param {?number} [limit=50] - The number of jobs per request/page as integer. If `null`, requests all jobs.
|
|
2580
|
+
* @returns {JobPages} A paged list of jobs.
|
|
2581
|
+
*/
|
|
2582
|
+
paginateJobs(limit?: number | null): JobPages;
|
|
2329
2583
|
/**
|
|
2330
2584
|
* Creates a new batch job at the back-end.
|
|
2331
2585
|
*
|
|
@@ -2350,7 +2604,7 @@ declare module OpenEO {
|
|
|
2350
2604
|
*/
|
|
2351
2605
|
getJob(id: string): Promise<Job>;
|
|
2352
2606
|
/**
|
|
2353
|
-
*
|
|
2607
|
+
* List all secondary web services of the authenticated user.
|
|
2354
2608
|
*
|
|
2355
2609
|
* @async
|
|
2356
2610
|
* @param {Array.<Service>} [oldServices=[]] - A list of existing services to update.
|
|
@@ -2358,6 +2612,13 @@ declare module OpenEO {
|
|
|
2358
2612
|
* @throws {Error}
|
|
2359
2613
|
*/
|
|
2360
2614
|
listServices(oldServices?: Array<Service>): Promise<ResponseArray<Job>>;
|
|
2615
|
+
/**
|
|
2616
|
+
* Paginate through the secondary web services of the authenticated user.
|
|
2617
|
+
*
|
|
2618
|
+
* @param {?number} [limit=50] - The number of services per request/page as integer. If `null` (default), requests all services.
|
|
2619
|
+
* @returns {ServicePages} A paged list of services.
|
|
2620
|
+
*/
|
|
2621
|
+
paginateServices(limit?: number | null): ServicePages;
|
|
2361
2622
|
/**
|
|
2362
2623
|
* Creates a new secondary web service at the back-end.
|
|
2363
2624
|
*
|
|
@@ -2384,17 +2645,6 @@ declare module OpenEO {
|
|
|
2384
2645
|
* @throws {Error}
|
|
2385
2646
|
*/
|
|
2386
2647
|
getService(id: string): Promise<Service>;
|
|
2387
|
-
/**
|
|
2388
|
-
* Adds additional response details to the array.
|
|
2389
|
-
*
|
|
2390
|
-
* Adds links and federation:missing.
|
|
2391
|
-
*
|
|
2392
|
-
* @protected
|
|
2393
|
-
* @param {Array.<*>} arr
|
|
2394
|
-
* @param {object.<string, *>} response
|
|
2395
|
-
* @returns {ResponseArray}
|
|
2396
|
-
*/
|
|
2397
|
-
protected _toResponseArray(arr: Array<any>, response: object<string, any>): ResponseArray;
|
|
2398
2648
|
/**
|
|
2399
2649
|
* Get the a link with the given rel type.
|
|
2400
2650
|
*
|
|
@@ -2407,7 +2657,7 @@ declare module OpenEO {
|
|
|
2407
2657
|
protected _getLinkHref(links: Array<Link>, rel: string | Array<string>): string | null;
|
|
2408
2658
|
/**
|
|
2409
2659
|
* Makes all links in the list absolute.
|
|
2410
|
-
*
|
|
2660
|
+
*
|
|
2411
2661
|
* @param {Array.<Link>} links - An array of links.
|
|
2412
2662
|
* @param {?string|AxiosResponse} [base=null] - The base url to use for relative links, or an response to derive the url from.
|
|
2413
2663
|
* @returns {Array.<Link>}
|
|
@@ -2486,11 +2736,11 @@ declare module OpenEO {
|
|
|
2486
2736
|
download(url: string, authorize: boolean): Promise<Readable | Blob>;
|
|
2487
2737
|
/**
|
|
2488
2738
|
* Get the authorization header for requests.
|
|
2489
|
-
*
|
|
2739
|
+
*
|
|
2490
2740
|
* @protected
|
|
2491
2741
|
* @returns {object.<string, string>}
|
|
2492
2742
|
*/
|
|
2493
|
-
protected _getAuthHeaders()
|
|
2743
|
+
protected _getAuthHeaders(): object<string, string>;
|
|
2494
2744
|
/**
|
|
2495
2745
|
* Sends a HTTP request.
|
|
2496
2746
|
*
|
|
@@ -2635,6 +2885,10 @@ declare module OpenEO {
|
|
|
2635
2885
|
export type Collections = {
|
|
2636
2886
|
collections: Array<Collection>;
|
|
2637
2887
|
links: Array<Link>;
|
|
2888
|
+
/**
|
|
2889
|
+
* "federation:missing"] A list of backends from the federation that are missing in the response data.
|
|
2890
|
+
*/
|
|
2891
|
+
"federation:missing": Array<string>;
|
|
2638
2892
|
};
|
|
2639
2893
|
export type Collection = object<string, any>;
|
|
2640
2894
|
export type FileTypesAPI = {
|
|
@@ -2815,17 +3069,62 @@ declare module OpenEO {
|
|
|
2815
3069
|
* EXPERIMENTAL!
|
|
2816
3070
|
*/
|
|
2817
3071
|
namespaces: Array<string> | null;
|
|
3072
|
+
/**
|
|
3073
|
+
* "federation:missing"] A list of backends from the federation that are missing in the response data.
|
|
3074
|
+
*/
|
|
3075
|
+
"federation:missing": Array<string>;
|
|
2818
3076
|
};
|
|
2819
3077
|
/**
|
|
2820
3078
|
* An openEO processing chain.
|
|
2821
3079
|
*/
|
|
2822
3080
|
export type Process = object<string, any>;
|
|
3081
|
+
/**
|
|
3082
|
+
* A back-end in the federation.
|
|
3083
|
+
*/
|
|
3084
|
+
export type FederationBackend = {
|
|
3085
|
+
/**
|
|
3086
|
+
* ID of the back-end within the federation.
|
|
3087
|
+
*/
|
|
3088
|
+
id: string;
|
|
3089
|
+
/**
|
|
3090
|
+
* URL to the versioned API endpoint of the back-end.
|
|
3091
|
+
*/
|
|
3092
|
+
url: string;
|
|
3093
|
+
/**
|
|
3094
|
+
* Name of the back-end.
|
|
3095
|
+
*/
|
|
3096
|
+
title: string;
|
|
3097
|
+
/**
|
|
3098
|
+
* A description of the back-end and its specifics.
|
|
3099
|
+
*/
|
|
3100
|
+
description: string;
|
|
3101
|
+
/**
|
|
3102
|
+
* Current status of the back-end (online or offline).
|
|
3103
|
+
*/
|
|
3104
|
+
status: string;
|
|
3105
|
+
/**
|
|
3106
|
+
* The time at which the status of the back-end was checked last, formatted as a RFC 3339 date-time.
|
|
3107
|
+
*/
|
|
3108
|
+
last_status_check: string;
|
|
3109
|
+
/**
|
|
3110
|
+
* If the `status` is `offline`: The time at which the back-end was checked and available the last time. Otherwise, this is equal to the property `last_status_check`. Formatted as a RFC 3339 date-time.
|
|
3111
|
+
*/
|
|
3112
|
+
last_successful_check: string;
|
|
3113
|
+
/**
|
|
3114
|
+
* Declares the back-end to be experimental.
|
|
3115
|
+
*/
|
|
3116
|
+
experimental: boolean;
|
|
3117
|
+
/**
|
|
3118
|
+
* Declares the back-end to be deprecated.
|
|
3119
|
+
*/
|
|
3120
|
+
deprecated: boolean;
|
|
3121
|
+
};
|
|
2823
3122
|
/**
|
|
2824
3123
|
* An array, but enriched with additional details from an openEO API response.
|
|
2825
3124
|
*
|
|
2826
3125
|
* Adds two properties: `links` and `federation:missing`.
|
|
2827
3126
|
*/
|
|
2828
|
-
export type ResponseArray =
|
|
3127
|
+
export type ResponseArray = any;
|
|
2829
3128
|
export type ServiceType = object<string, any>;
|
|
2830
3129
|
export type SyncResult = {
|
|
2831
3130
|
/**
|
|
@@ -2864,7 +3163,12 @@ declare module OpenEO {
|
|
|
2864
3163
|
budget: number | null;
|
|
2865
3164
|
links: Array<Link> | null;
|
|
2866
3165
|
};
|
|
2867
|
-
|
|
3166
|
+
/**
|
|
3167
|
+
* An array, but enriched with additional details from an openEO API response.
|
|
3168
|
+
*
|
|
3169
|
+
* Adds the property `federation:backends`.
|
|
3170
|
+
*/
|
|
3171
|
+
export type ValidationResult = any;
|
|
2868
3172
|
}
|
|
2869
3173
|
|
|
2870
3174
|
export = OpenEO;
|