@openeo/js-client 2.5.1 → 2.7.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/LICENSE +201 -201
- package/README.md +94 -84
- package/openeo.d.ts +310 -72
- package/openeo.js +5412 -5191
- package/openeo.min.js +1 -1
- package/package.json +72 -70
- package/src/authprovider.js +147 -138
- package/src/baseentity.js +162 -162
- package/src/basicprovider.js +69 -48
- package/src/browser.js +168 -168
- package/src/builder/builder.js +400 -400
- package/src/builder/formula.js +211 -211
- package/src/builder/node.js +268 -268
- package/src/builder/parameter.js +144 -144
- package/src/builder/tapdigit.js +489 -489
- package/src/capabilities.js +274 -220
- package/src/connection.js +1290 -1211
- package/src/env.js +16 -6
- package/src/filetypes.js +111 -111
- package/src/job.js +323 -322
- package/src/logs.js +109 -68
- package/src/node.js +168 -168
- package/src/oidcprovider.js +387 -375
- package/src/openeo.js +137 -138
- package/src/pages.js +349 -0
- package/src/service.js +222 -221
- package/src/typedefs.js +271 -243
- package/src/userfile.js +128 -128
- package/src/userprocess.js +166 -166
package/openeo.d.ts
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import { User, UserManager } from 'oidc-client';
|
|
4
4
|
import { ProcessRegistry } from '@openeo/js-commons';
|
|
5
5
|
import { Readable } from 'stream';
|
|
6
|
-
import { AbortController } from "node-abort-controller";
|
|
7
6
|
|
|
8
7
|
declare module OpenEO {
|
|
9
8
|
/**
|
|
@@ -36,6 +35,12 @@ declare module OpenEO {
|
|
|
36
35
|
* @returns {string}
|
|
37
36
|
*/
|
|
38
37
|
getId(): string;
|
|
38
|
+
/**
|
|
39
|
+
* Returns a display name for the authenticated user.
|
|
40
|
+
*
|
|
41
|
+
* @returns {string?} Name of the user or `null`
|
|
42
|
+
*/
|
|
43
|
+
getDisplayName(): string | null;
|
|
39
44
|
/**
|
|
40
45
|
* Returns the type of the authentication procedure as specified by the API, e.g. `oidc` or `basic`.
|
|
41
46
|
*
|
|
@@ -78,6 +83,14 @@ declare module OpenEO {
|
|
|
78
83
|
* @param {?string} token
|
|
79
84
|
*/
|
|
80
85
|
setToken(token: string | null): void;
|
|
86
|
+
/**
|
|
87
|
+
* Abstract method that extending classes implement the login process with.
|
|
88
|
+
*
|
|
89
|
+
* @async
|
|
90
|
+
* @param {...*} args
|
|
91
|
+
* @throws {Error}
|
|
92
|
+
*/
|
|
93
|
+
login(...args: any[]): Promise<void>;
|
|
81
94
|
/**
|
|
82
95
|
* Logout from the established session.
|
|
83
96
|
*
|
|
@@ -98,9 +111,9 @@ declare module OpenEO {
|
|
|
98
111
|
* Creates an instance of this object.
|
|
99
112
|
*
|
|
100
113
|
* @param {Connection} connection - A Connection object representing an established connection to an openEO back-end.
|
|
101
|
-
* @param {Array} properties - A mapping from the API property names to the JS client property names (usually to convert between snake_case and camelCase), e.g. `["id", "title", ["process_graph", "processGraph"]]`
|
|
114
|
+
* @param {Array.<string|Array.<string>>} properties - A mapping from the API property names to the JS client property names (usually to convert between snake_case and camelCase), e.g. `["id", "title", ["process_graph", "processGraph"]]`
|
|
102
115
|
*/
|
|
103
|
-
constructor(connection: Connection, properties?:
|
|
116
|
+
constructor(connection: Connection, properties?: Array<string | Array<string>>);
|
|
104
117
|
/**
|
|
105
118
|
* @protected
|
|
106
119
|
* @type {Connection}
|
|
@@ -184,6 +197,14 @@ declare module OpenEO {
|
|
|
184
197
|
* @hideconstructor
|
|
185
198
|
*/
|
|
186
199
|
export class Environment {
|
|
200
|
+
/**
|
|
201
|
+
* The axios instance to use for HTTP requests.
|
|
202
|
+
*
|
|
203
|
+
*
|
|
204
|
+
* @type {object}
|
|
205
|
+
* @static
|
|
206
|
+
*/
|
|
207
|
+
static axios: object;
|
|
187
208
|
/**
|
|
188
209
|
* Returns the name of the Environment, `Node` or `Browser`.
|
|
189
210
|
*
|
|
@@ -228,7 +249,7 @@ declare module OpenEO {
|
|
|
228
249
|
* @param {string|Buffer} str - String to encode.
|
|
229
250
|
* @returns {string} String encoded in Base64.
|
|
230
251
|
*/
|
|
231
|
-
static base64encode(str: string|Buffer): string;
|
|
252
|
+
static base64encode(str: string | Buffer): string;
|
|
232
253
|
/**
|
|
233
254
|
* Detect the file name for the given data source.
|
|
234
255
|
*
|
|
@@ -286,16 +307,17 @@ declare module OpenEO {
|
|
|
286
307
|
* @param {Connection} connection - A Connection object representing an established connection to an openEO back-end.
|
|
287
308
|
*/
|
|
288
309
|
constructor(connection: Connection);
|
|
310
|
+
username: string;
|
|
289
311
|
/**
|
|
290
312
|
* Authenticate with HTTP Basic.
|
|
291
|
-
*
|
|
313
|
+
*
|
|
292
314
|
* @async
|
|
293
|
-
* @param {string} username
|
|
294
|
-
* @param {string} password
|
|
315
|
+
* @param {string} username
|
|
316
|
+
* @param {string} password
|
|
295
317
|
* @returns {Promise<void>}
|
|
296
318
|
* @throws {Error}
|
|
297
319
|
*/
|
|
298
|
-
login(username: string, password: string)
|
|
320
|
+
login(username: string, password: string): Promise<void>;
|
|
299
321
|
}
|
|
300
322
|
/**
|
|
301
323
|
* Capabilities of a back-end.
|
|
@@ -313,17 +335,32 @@ declare module OpenEO {
|
|
|
313
335
|
* @type {object.<string, *>}
|
|
314
336
|
*/
|
|
315
337
|
private data;
|
|
338
|
+
/**
|
|
339
|
+
* @private
|
|
340
|
+
* @ignore
|
|
341
|
+
* @type {object.<string, string>}
|
|
342
|
+
*/
|
|
343
|
+
private featureMap;
|
|
316
344
|
/**
|
|
317
345
|
* @private
|
|
318
346
|
* @type {Array.<string>}
|
|
319
347
|
*/
|
|
320
348
|
private features;
|
|
321
349
|
/**
|
|
322
|
-
*
|
|
323
|
-
*
|
|
324
|
-
*
|
|
350
|
+
* Validates the capabilities.
|
|
351
|
+
*
|
|
352
|
+
* Throws an error in case of an issue, otherwise just passes.
|
|
353
|
+
*
|
|
354
|
+
* @protected
|
|
355
|
+
* @throws {Error}
|
|
325
356
|
*/
|
|
326
|
-
|
|
357
|
+
protected validate(): void;
|
|
358
|
+
/**
|
|
359
|
+
* Initializes the class.
|
|
360
|
+
*
|
|
361
|
+
* @protected
|
|
362
|
+
*/
|
|
363
|
+
protected init(): void;
|
|
327
364
|
/**
|
|
328
365
|
* Returns the capabilities response as a JSON serializable representation of the data that is API compliant.
|
|
329
366
|
*
|
|
@@ -366,6 +403,12 @@ declare module OpenEO {
|
|
|
366
403
|
* @returns {Array.<Link>} Array of link objects (href, title, rel, type)
|
|
367
404
|
*/
|
|
368
405
|
links(): Array<Link>;
|
|
406
|
+
/**
|
|
407
|
+
* Returns list of backends in the federation.
|
|
408
|
+
*
|
|
409
|
+
* @returns {Array.<FederationBackend>} Array of backends
|
|
410
|
+
*/
|
|
411
|
+
listFederation(): Array<FederationBackend>;
|
|
369
412
|
/**
|
|
370
413
|
* Lists all supported features.
|
|
371
414
|
*
|
|
@@ -391,6 +434,14 @@ declare module OpenEO {
|
|
|
391
434
|
* @returns {Array.<BillingPlan>} Billing plans
|
|
392
435
|
*/
|
|
393
436
|
listPlans(): Array<BillingPlan>;
|
|
437
|
+
/**
|
|
438
|
+
* Migrates a response, if required.
|
|
439
|
+
*
|
|
440
|
+
* @param {AxiosResponse} response
|
|
441
|
+
* @protected
|
|
442
|
+
* @returns {AxiosResponse}
|
|
443
|
+
*/
|
|
444
|
+
protected migrate(response: AxiosResponse): AxiosResponse;
|
|
394
445
|
}
|
|
395
446
|
/**
|
|
396
447
|
* The Authentication Provider for OpenID Connect.
|
|
@@ -516,6 +567,20 @@ declare module OpenEO {
|
|
|
516
567
|
* @see OidcProvider#addListener
|
|
517
568
|
*/
|
|
518
569
|
removeListener(event: string, scope?: string): void;
|
|
570
|
+
/**
|
|
571
|
+
* Authenticate with OpenID Connect (OIDC).
|
|
572
|
+
*
|
|
573
|
+
* Supported only in Browser environments.
|
|
574
|
+
*
|
|
575
|
+
* @async
|
|
576
|
+
* @param {object.<string, *>} [options={}] - Object with authentication options.
|
|
577
|
+
* @param {boolean} [requestRefreshToken=false] - If set to `true`, adds a scope to request a refresh token.
|
|
578
|
+
* @returns {Promise<void>}
|
|
579
|
+
* @throws {Error}
|
|
580
|
+
* @see https://github.com/IdentityModel/oidc-client-js/wiki#other-optional-settings
|
|
581
|
+
* @see {OidcProvider#refreshTokenScope}
|
|
582
|
+
*/
|
|
583
|
+
login(options?: object<string, any>, requestRefreshToken?: boolean): Promise<void>;
|
|
519
584
|
/**
|
|
520
585
|
* Returns the options for the OIDC client library.
|
|
521
586
|
*
|
|
@@ -568,25 +633,11 @@ declare module OpenEO {
|
|
|
568
633
|
* @see OidcProvider#setClientId
|
|
569
634
|
*/
|
|
570
635
|
detectDefaultClient(): OidcClient | null;
|
|
571
|
-
/**
|
|
572
|
-
* Authenticate with OpenID Connect (OIDC).
|
|
573
|
-
*
|
|
574
|
-
* Supported only in Browser environments.
|
|
575
|
-
*
|
|
576
|
-
* @async
|
|
577
|
-
* @param {object.<string, *>} [options={}] - Object with authentication options.
|
|
578
|
-
* @param {boolean} [requestRefreshToken=false] - If set to `true`, adds a scope to request a refresh token.
|
|
579
|
-
* @returns {Promise<void>}
|
|
580
|
-
* @throws {Error}
|
|
581
|
-
* @see https://github.com/IdentityModel/oidc-client-js/wiki#other-optional-settings
|
|
582
|
-
* @see {OidcProvider#refreshTokenScope}
|
|
583
|
-
*/
|
|
584
|
-
login(options?: any, requestRefreshToken?: boolean) : void;
|
|
585
636
|
}
|
|
586
637
|
export namespace OidcProvider {
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
638
|
+
let uiMethod: string;
|
|
639
|
+
let redirectUrl: string;
|
|
640
|
+
let grants: Array<string>;
|
|
590
641
|
}
|
|
591
642
|
/**
|
|
592
643
|
* Manages the files types supported by the back-end.
|
|
@@ -761,15 +812,34 @@ declare module OpenEO {
|
|
|
761
812
|
*
|
|
762
813
|
* @param {Connection} connection - A Connection object representing an established connection to an openEO back-end.
|
|
763
814
|
* @param {string} endpoint - The relative endpoint to request the logs from, usually `/jobs/.../logs` or `/services/.../logs` with `...` being the actual job or service id.
|
|
815
|
+
* @param {?string} [level=null] - Minimum level of logs to return.
|
|
764
816
|
*/
|
|
765
|
-
constructor(connection: Connection, endpoint: string);
|
|
817
|
+
constructor(connection: Connection, endpoint: string, level?: string | null);
|
|
766
818
|
/**
|
|
767
819
|
* @protected
|
|
768
820
|
* @type {Connection}
|
|
769
821
|
*/
|
|
770
822
|
protected connection: Connection;
|
|
771
|
-
|
|
772
|
-
|
|
823
|
+
/**
|
|
824
|
+
* @protected
|
|
825
|
+
* @type {string}
|
|
826
|
+
*/
|
|
827
|
+
protected endpoint: string;
|
|
828
|
+
/**
|
|
829
|
+
* @protected
|
|
830
|
+
* @type {string}
|
|
831
|
+
*/
|
|
832
|
+
protected lastId: string;
|
|
833
|
+
/**
|
|
834
|
+
* @protected
|
|
835
|
+
* @type {?string}
|
|
836
|
+
*/
|
|
837
|
+
protected level: string | null;
|
|
838
|
+
/**
|
|
839
|
+
* @protected
|
|
840
|
+
* @type {Set<string>}
|
|
841
|
+
*/
|
|
842
|
+
protected missing: Set<string>;
|
|
773
843
|
/**
|
|
774
844
|
* Retrieves the next log entries since the last request.
|
|
775
845
|
*
|
|
@@ -780,6 +850,16 @@ declare module OpenEO {
|
|
|
780
850
|
* @returns {Promise<Array.<Log>>}
|
|
781
851
|
*/
|
|
782
852
|
nextLogs(limit?: number): Promise<Array<Log>>;
|
|
853
|
+
/**
|
|
854
|
+
* Retrieves the backend identifiers that are (partially) missing in the logs.
|
|
855
|
+
*
|
|
856
|
+
* This is only filled after the first request using `nextLogs` or `next`.
|
|
857
|
+
*
|
|
858
|
+
* @returns {Array.<string>}
|
|
859
|
+
* @see {Logs#nextLogs}
|
|
860
|
+
* @see {Logs#next}
|
|
861
|
+
*/
|
|
862
|
+
getMissingBackends(): Array<string>;
|
|
783
863
|
/**
|
|
784
864
|
* Retrieves the next log entries since the last request.
|
|
785
865
|
*
|
|
@@ -829,7 +909,7 @@ declare module OpenEO {
|
|
|
829
909
|
* @readonly
|
|
830
910
|
* @type {?Process}
|
|
831
911
|
*/
|
|
832
|
-
public readonly process: Process;
|
|
912
|
+
public readonly process: Process | null;
|
|
833
913
|
/**
|
|
834
914
|
* The current status of a batch job.
|
|
835
915
|
* One of "created", "queued", "running", "canceled", "finished" or "error".
|
|
@@ -926,9 +1006,10 @@ declare module OpenEO {
|
|
|
926
1006
|
/**
|
|
927
1007
|
* Get logs for the batch job from the back-end.
|
|
928
1008
|
*
|
|
1009
|
+
* @param {?string} [level=null] - Minimum level of logs to return.
|
|
929
1010
|
* @returns {Logs}
|
|
930
1011
|
*/
|
|
931
|
-
debugJob(): Logs;
|
|
1012
|
+
debugJob(level?: string | null): Logs;
|
|
932
1013
|
/**
|
|
933
1014
|
* Checks for status changes and new log entries every x seconds.
|
|
934
1015
|
*
|
|
@@ -1049,7 +1130,7 @@ declare module OpenEO {
|
|
|
1049
1130
|
* @readonly
|
|
1050
1131
|
* @type {?object.<string, *>}
|
|
1051
1132
|
*/
|
|
1052
|
-
public readonly returns: object<string, any
|
|
1133
|
+
public readonly returns: object<string, any> | null;
|
|
1053
1134
|
/**
|
|
1054
1135
|
* Specifies that the process or parameter is deprecated with the potential to be removed in any of the next versions.
|
|
1055
1136
|
* @public
|
|
@@ -1070,7 +1151,7 @@ declare module OpenEO {
|
|
|
1070
1151
|
* @readonly
|
|
1071
1152
|
* @type {?object.<string, *>}
|
|
1072
1153
|
*/
|
|
1073
|
-
public readonly exceptions: object<string, any
|
|
1154
|
+
public readonly exceptions: object<string, any> | null;
|
|
1074
1155
|
/**
|
|
1075
1156
|
* @public
|
|
1076
1157
|
* @readonly
|
|
@@ -1089,7 +1170,7 @@ declare module OpenEO {
|
|
|
1089
1170
|
* @readonly
|
|
1090
1171
|
* @type {?object.<string, *>}
|
|
1091
1172
|
*/
|
|
1092
|
-
public readonly processGraph: object<string, any
|
|
1173
|
+
public readonly processGraph: object<string, any> | null;
|
|
1093
1174
|
/**
|
|
1094
1175
|
* Updates the data stored in this object by requesting the process graph metadata from the back-end.
|
|
1095
1176
|
*
|
|
@@ -1160,7 +1241,7 @@ declare module OpenEO {
|
|
|
1160
1241
|
* @readonly
|
|
1161
1242
|
* @type {?Process}
|
|
1162
1243
|
*/
|
|
1163
|
-
public readonly process: Process;
|
|
1244
|
+
public readonly process: Process | null;
|
|
1164
1245
|
/**
|
|
1165
1246
|
* URL at which the secondary web service is accessible
|
|
1166
1247
|
* @public
|
|
@@ -1187,14 +1268,14 @@ declare module OpenEO {
|
|
|
1187
1268
|
* @readonly
|
|
1188
1269
|
* @type {?object.<string, *>}
|
|
1189
1270
|
*/
|
|
1190
|
-
public readonly configuration: object<string, any
|
|
1271
|
+
public readonly configuration: object<string, any> | null;
|
|
1191
1272
|
/**
|
|
1192
1273
|
* Additional attributes of the secondary web service, e.g. available layers for a WMS based on the bands in the underlying GeoTiff.
|
|
1193
1274
|
* @public
|
|
1194
1275
|
* @readonly
|
|
1195
1276
|
* @type {?object.<string, *>}
|
|
1196
1277
|
*/
|
|
1197
|
-
public readonly attributes: object<string, any
|
|
1278
|
+
public readonly attributes: object<string, any> | null;
|
|
1198
1279
|
/**
|
|
1199
1280
|
* Date and time of creation, formatted as a RFC 3339 date-time.
|
|
1200
1281
|
* @public
|
|
@@ -1265,9 +1346,10 @@ declare module OpenEO {
|
|
|
1265
1346
|
/**
|
|
1266
1347
|
* Get logs for the secondary web service from the back-end.
|
|
1267
1348
|
*
|
|
1349
|
+
* @param {?string} [level=null] - Minimum level of logs to return.
|
|
1268
1350
|
* @returns {Logs}
|
|
1269
1351
|
*/
|
|
1270
|
-
debugService(): Logs;
|
|
1352
|
+
debugService(level?: string | null): Logs;
|
|
1271
1353
|
/**
|
|
1272
1354
|
* Checks for new log entries every x seconds.
|
|
1273
1355
|
*
|
|
@@ -1451,7 +1533,7 @@ declare module OpenEO {
|
|
|
1451
1533
|
addOperatorProcess(operator: string, left: number | object<string, any>, right: number | object<string, any>): BuilderNode;
|
|
1452
1534
|
}
|
|
1453
1535
|
export namespace Formula {
|
|
1454
|
-
|
|
1536
|
+
let operatorMapping: object<string, string>;
|
|
1455
1537
|
}
|
|
1456
1538
|
/**
|
|
1457
1539
|
* A class that represents a process node and also a result from a process.
|
|
@@ -1505,11 +1587,11 @@ declare module OpenEO {
|
|
|
1505
1587
|
/**
|
|
1506
1588
|
* Converts a sorted array of arguments to an object with the respective parameter names.
|
|
1507
1589
|
*
|
|
1508
|
-
* @param {Array} processArgs
|
|
1590
|
+
* @param {Array.<object.<string, *>>} processArgs
|
|
1509
1591
|
* @returns {object.<string, *>}
|
|
1510
1592
|
* @throws {Error}
|
|
1511
1593
|
*/
|
|
1512
|
-
namedArguments(processArgs: any
|
|
1594
|
+
namedArguments(processArgs: Array<object<string, any>>): object<string, any>;
|
|
1513
1595
|
/**
|
|
1514
1596
|
* Checks the arguments given for parameters and add them to the process.
|
|
1515
1597
|
*
|
|
@@ -1739,10 +1821,10 @@ declare module OpenEO {
|
|
|
1739
1821
|
/**
|
|
1740
1822
|
* Gets the callback parameter specifics from the parent process.
|
|
1741
1823
|
*
|
|
1742
|
-
* @returns {Array}
|
|
1824
|
+
* @returns {Array.<object.<string,*>>}
|
|
1743
1825
|
* @todo Should this also pass callback parameters from parents until root is reached?
|
|
1744
1826
|
*/
|
|
1745
|
-
getParentCallbackParameters(): any
|
|
1827
|
+
getParentCallbackParameters(): Array<object<string, any>>;
|
|
1746
1828
|
/**
|
|
1747
1829
|
* Adds a parameter to the list of process parameters.
|
|
1748
1830
|
*
|
|
@@ -1881,11 +1963,12 @@ declare module OpenEO {
|
|
|
1881
1963
|
* @async
|
|
1882
1964
|
* @protected
|
|
1883
1965
|
* @returns {Promise<Capabilities>} Capabilities
|
|
1966
|
+
* @throws {Error}
|
|
1884
1967
|
*/
|
|
1885
1968
|
protected init(): Promise<Capabilities>;
|
|
1886
1969
|
/**
|
|
1887
1970
|
* Refresh the cache for processes.
|
|
1888
|
-
*
|
|
1971
|
+
*
|
|
1889
1972
|
* @async
|
|
1890
1973
|
* @protected
|
|
1891
1974
|
* @returns {Promise}
|
|
@@ -1937,12 +2020,25 @@ declare module OpenEO {
|
|
|
1937
2020
|
* List all collections available on the back-end.
|
|
1938
2021
|
*
|
|
1939
2022
|
* The collections returned always comply to the latest STAC version (currently 1.0.0).
|
|
2023
|
+
* This function adds a self link to the response if not present.
|
|
1940
2024
|
*
|
|
1941
2025
|
* @async
|
|
1942
2026
|
* @returns {Promise<Collections>} A response compatible to the API specification.
|
|
1943
2027
|
* @throws {Error}
|
|
1944
2028
|
*/
|
|
1945
2029
|
listCollections(): Promise<Collections>;
|
|
2030
|
+
/**
|
|
2031
|
+
* Paginate through the collections available on the back-end.
|
|
2032
|
+
*
|
|
2033
|
+
* The collections returned always complies to the latest STAC version (currently 1.0.0).
|
|
2034
|
+
* This function adds a self link to the response if not present.
|
|
2035
|
+
*
|
|
2036
|
+
* @async
|
|
2037
|
+
* @param {?number} [limit=50] - The number of collections per request/page as integer. If `null`, requests all collections.
|
|
2038
|
+
* @yields {Promise<Collections>} A response compatible to the API specification.
|
|
2039
|
+
* @throws {Error}
|
|
2040
|
+
*/
|
|
2041
|
+
paginateCollections(limit?: number | null): AsyncGenerator<any, void, unknown>;
|
|
1946
2042
|
/**
|
|
1947
2043
|
* Get further information about a single collection.
|
|
1948
2044
|
*
|
|
@@ -1956,12 +2052,11 @@ declare module OpenEO {
|
|
|
1956
2052
|
describeCollection(collectionId: string): Promise<Collection>;
|
|
1957
2053
|
/**
|
|
1958
2054
|
* Loads items for a specific image collection.
|
|
2055
|
+
*
|
|
1959
2056
|
* May not be available for all collections.
|
|
1960
2057
|
*
|
|
1961
2058
|
* The items returned always comply to the latest STAC version (currently 1.0.0).
|
|
1962
2059
|
*
|
|
1963
|
-
* This is an experimental API and is subject to change.
|
|
1964
|
-
*
|
|
1965
2060
|
* @async
|
|
1966
2061
|
* @param {string} collectionId - Collection ID to request items for.
|
|
1967
2062
|
* @param {?Array.<number>} [spatialExtent=null] - Limits the items to the given bounding box in WGS84:
|
|
@@ -1969,7 +2064,7 @@ declare module OpenEO {
|
|
|
1969
2064
|
* 2. Lower left corner, coordinate axis 2
|
|
1970
2065
|
* 3. Upper right corner, coordinate axis 1
|
|
1971
2066
|
* 4. Upper right corner, coordinate axis 2
|
|
1972
|
-
* @param {?Array
|
|
2067
|
+
* @param {?Array} [temporalExtent=null] - Limits the items to the specified temporal interval.
|
|
1973
2068
|
* The interval has to be specified as an array with exactly two elements (start, end) and
|
|
1974
2069
|
* each must be either an RFC 3339 compatible string or a Date object.
|
|
1975
2070
|
* Also supports open intervals by setting one of the boundaries to `null`, but never both.
|
|
@@ -1977,7 +2072,7 @@ declare module OpenEO {
|
|
|
1977
2072
|
* @yields {Promise<ItemCollection>} A response compatible to the API specification.
|
|
1978
2073
|
* @throws {Error}
|
|
1979
2074
|
*/
|
|
1980
|
-
listCollectionItems(collectionId: string, spatialExtent?: Array<number> | null, temporalExtent?:
|
|
2075
|
+
listCollectionItems(collectionId: string, spatialExtent?: Array<number> | null, temporalExtent?: any[] | null, limit?: number | null): AsyncGenerator<any, void, unknown>;
|
|
1981
2076
|
/**
|
|
1982
2077
|
* Normalisation of the namespace to a value that is compatible with the OpenEO specs - EXPERIMENTAL.
|
|
1983
2078
|
*
|
|
@@ -1993,7 +2088,7 @@ declare module OpenEO {
|
|
|
1993
2088
|
*/
|
|
1994
2089
|
protected normalizeNamespace(namespace: string | null): string | null;
|
|
1995
2090
|
/**
|
|
1996
|
-
* List processes available on the back-end.
|
|
2091
|
+
* List all processes available on the back-end.
|
|
1997
2092
|
*
|
|
1998
2093
|
* Requests pre-defined processes by default.
|
|
1999
2094
|
* Set the namespace parameter to request processes from a specific namespace.
|
|
@@ -2001,12 +2096,32 @@ declare module OpenEO {
|
|
|
2001
2096
|
* Note: The list of namespaces can be retrieved by calling `listProcesses` without a namespace given.
|
|
2002
2097
|
* The namespaces are then listed in the property `namespaces`.
|
|
2003
2098
|
*
|
|
2099
|
+
* This function adds a self link to the response if not present.
|
|
2100
|
+
*
|
|
2004
2101
|
* @async
|
|
2005
2102
|
* @param {?string} [namespace=null] - Namespace of the processes (default to `null`, i.e. pre-defined processes). EXPERIMENTAL!
|
|
2006
2103
|
* @returns {Promise<Processes>} - A response compatible to the API specification.
|
|
2007
2104
|
* @throws {Error}
|
|
2008
2105
|
*/
|
|
2009
2106
|
listProcesses(namespace?: string | null): Promise<Processes>;
|
|
2107
|
+
/**
|
|
2108
|
+
* Paginate through the processes available on the back-end.
|
|
2109
|
+
*
|
|
2110
|
+
* Requests pre-defined processes by default.
|
|
2111
|
+
* Set the namespace parameter to request processes from a specific namespace.
|
|
2112
|
+
*
|
|
2113
|
+
* Note: The list of namespaces can be retrieved by calling `listProcesses` without a namespace given.
|
|
2114
|
+
* The namespaces are then listed in the property `namespaces`.
|
|
2115
|
+
*
|
|
2116
|
+
* This function adds a self link to the response if not present.
|
|
2117
|
+
*
|
|
2118
|
+
* @async
|
|
2119
|
+
* @param {?string} [namespace=null] - Namespace of the processes (default to `null`, i.e. pre-defined processes). EXPERIMENTAL!
|
|
2120
|
+
* @param {?number} [limit=50] - The number of processes per request/page as integer. If `null`, requests all processes.
|
|
2121
|
+
* @yields {Promise<Processes>} - A response compatible to the API specification.
|
|
2122
|
+
* @throws {Error}
|
|
2123
|
+
*/
|
|
2124
|
+
paginateProcesses(namespace?: string | null, limit?: number | null): AsyncGenerator<any, void, unknown>;
|
|
2010
2125
|
/**
|
|
2011
2126
|
* Get information about a single process.
|
|
2012
2127
|
*
|
|
@@ -2156,13 +2271,22 @@ declare module OpenEO {
|
|
|
2156
2271
|
*/
|
|
2157
2272
|
describeAccount(): Promise<UserAccount>;
|
|
2158
2273
|
/**
|
|
2159
|
-
*
|
|
2274
|
+
* List all files from the user workspace.
|
|
2160
2275
|
*
|
|
2161
2276
|
* @async
|
|
2162
2277
|
* @returns {Promise<ResponseArray.<UserFile>>} A list of files.
|
|
2163
2278
|
* @throws {Error}
|
|
2164
2279
|
*/
|
|
2165
2280
|
listFiles(): Promise<ResponseArray<UserFile>>;
|
|
2281
|
+
/**
|
|
2282
|
+
* Paginate through the files from the user workspace.
|
|
2283
|
+
*
|
|
2284
|
+
* @async
|
|
2285
|
+
* @param {?number} [limit=50] - The number of files per request/page as integer. If `null`, requests all files.
|
|
2286
|
+
* @yields {Promise<ResponseArray.<UserFile>>} A list of files.
|
|
2287
|
+
* @throws {Error}
|
|
2288
|
+
*/
|
|
2289
|
+
paginateFiles(limit?: number | null): AsyncGenerator<any, void, unknown>;
|
|
2166
2290
|
/**
|
|
2167
2291
|
* A callback that is executed on upload progress updates.
|
|
2168
2292
|
*
|
|
@@ -2211,12 +2335,12 @@ declare module OpenEO {
|
|
|
2211
2335
|
*
|
|
2212
2336
|
* @async
|
|
2213
2337
|
* @param {Process} process - User-defined process to validate.
|
|
2214
|
-
* @returns {Promise<
|
|
2338
|
+
* @returns {Promise<ValidationResult>} errors - A list of API compatible error objects. A valid process returns an empty list.
|
|
2215
2339
|
* @throws {Error}
|
|
2216
2340
|
*/
|
|
2217
|
-
validateProcess(process: Process): Promise<
|
|
2341
|
+
validateProcess(process: Process): Promise<ValidationResult>;
|
|
2218
2342
|
/**
|
|
2219
|
-
*
|
|
2343
|
+
* List all user-defined processes of the authenticated user.
|
|
2220
2344
|
*
|
|
2221
2345
|
* @async
|
|
2222
2346
|
* @param {Array.<UserProcess>} [oldProcesses=[]] - A list of existing user-defined processes to update.
|
|
@@ -2224,6 +2348,16 @@ declare module OpenEO {
|
|
|
2224
2348
|
* @throws {Error}
|
|
2225
2349
|
*/
|
|
2226
2350
|
listUserProcesses(oldProcesses?: Array<UserProcess>): Promise<ResponseArray<UserProcess>>;
|
|
2351
|
+
/**
|
|
2352
|
+
* Paginates through the user-defined processes of the authenticated user.
|
|
2353
|
+
*
|
|
2354
|
+
* @async
|
|
2355
|
+
* @param {?number} [limit=50] - The number of processes per request/page as integer. If `null`, requests all processes.
|
|
2356
|
+
* @param {Array.<UserProcess>} [oldProcesses=[]] - A list of existing user-defined processes to update.
|
|
2357
|
+
* @yields {Promise<ResponseArray.<UserProcess>>} A list of user-defined processes.
|
|
2358
|
+
* @throws {Error}
|
|
2359
|
+
*/
|
|
2360
|
+
paginateUserProcesses(limit?: number | null, oldProcesses?: Array<UserProcess>): AsyncGenerator<any, void, unknown>;
|
|
2227
2361
|
/**
|
|
2228
2362
|
* Creates a new stored user-defined process at the back-end.
|
|
2229
2363
|
*
|
|
@@ -2253,9 +2387,10 @@ declare module OpenEO {
|
|
|
2253
2387
|
* @param {?string} [plan=null] - The billing plan to use for this computation.
|
|
2254
2388
|
* @param {?number} [budget=null] - The maximum budget allowed to spend for this computation.
|
|
2255
2389
|
* @param {?AbortController} [abortController=null] - An AbortController object that can be used to cancel the processing request.
|
|
2390
|
+
* @param {object.<string, *>} [additional={}] - Other parameters to pass for the batch job, e.g. `log_level`.
|
|
2256
2391
|
* @returns {Promise<SyncResult>} - An object with the data and some metadata.
|
|
2257
2392
|
*/
|
|
2258
|
-
computeResult(process: Process, plan?: string | null, budget?: number | null, abortController?: AbortController | null): Promise<SyncResult>;
|
|
2393
|
+
computeResult(process: Process, plan?: string | null, budget?: number | null, abortController?: AbortController | null, additional?: object<string, any>): Promise<SyncResult>;
|
|
2259
2394
|
/**
|
|
2260
2395
|
* Executes a process synchronously and downloads to result the given path.
|
|
2261
2396
|
*
|
|
@@ -2275,7 +2410,7 @@ declare module OpenEO {
|
|
|
2275
2410
|
*/
|
|
2276
2411
|
downloadResult(process: Process, targetPath: string, plan?: string | null, budget?: number | null, abortController?: AbortController | null): Promise<void>;
|
|
2277
2412
|
/**
|
|
2278
|
-
*
|
|
2413
|
+
* List all batch jobs of the authenticated user.
|
|
2279
2414
|
*
|
|
2280
2415
|
* @async
|
|
2281
2416
|
* @param {Array.<Job>} [oldJobs=[]] - A list of existing jobs to update.
|
|
@@ -2283,6 +2418,16 @@ declare module OpenEO {
|
|
|
2283
2418
|
* @throws {Error}
|
|
2284
2419
|
*/
|
|
2285
2420
|
listJobs(oldJobs?: Array<Job>): Promise<ResponseArray<Job>>;
|
|
2421
|
+
/**
|
|
2422
|
+
* Paginate through the batch jobs of the authenticated user.
|
|
2423
|
+
*
|
|
2424
|
+
* @async
|
|
2425
|
+
* @param {?number} [limit=50] - The number of jobs per request/page as integer. If `null`, requests all jobs.
|
|
2426
|
+
* @param {Array.<Job>} [oldJobs=[]] - A list of existing jobs to update.
|
|
2427
|
+
* @yields {Promise<ResponseArray.<Job>>} A list of jobs.
|
|
2428
|
+
* @throws {Error}
|
|
2429
|
+
*/
|
|
2430
|
+
paginateJobs(limit?: number | null, oldJobs?: Array<Job>): AsyncGenerator<any, void, unknown>;
|
|
2286
2431
|
/**
|
|
2287
2432
|
* Creates a new batch job at the back-end.
|
|
2288
2433
|
*
|
|
@@ -2292,7 +2437,7 @@ declare module OpenEO {
|
|
|
2292
2437
|
* @param {?string} [description=null] - A description for the batch job.
|
|
2293
2438
|
* @param {?string} [plan=null] - The billing plan to use for this batch job.
|
|
2294
2439
|
* @param {?number} [budget=null] - The maximum budget allowed to spend for this batch job.
|
|
2295
|
-
* @param {object.<string, *>} [additional={}] -
|
|
2440
|
+
* @param {object.<string, *>} [additional={}] - Other parameters to pass for the batch job, e.g. `log_level`.
|
|
2296
2441
|
* @returns {Promise<Job>} The stored batch job.
|
|
2297
2442
|
* @throws {Error}
|
|
2298
2443
|
*/
|
|
@@ -2307,7 +2452,7 @@ declare module OpenEO {
|
|
|
2307
2452
|
*/
|
|
2308
2453
|
getJob(id: string): Promise<Job>;
|
|
2309
2454
|
/**
|
|
2310
|
-
*
|
|
2455
|
+
* List all secondary web services of the authenticated user.
|
|
2311
2456
|
*
|
|
2312
2457
|
* @async
|
|
2313
2458
|
* @param {Array.<Service>} [oldServices=[]] - A list of existing services to update.
|
|
@@ -2315,6 +2460,16 @@ declare module OpenEO {
|
|
|
2315
2460
|
* @throws {Error}
|
|
2316
2461
|
*/
|
|
2317
2462
|
listServices(oldServices?: Array<Service>): Promise<ResponseArray<Job>>;
|
|
2463
|
+
/**
|
|
2464
|
+
* Paginate through the secondary web services of the authenticated user.
|
|
2465
|
+
*
|
|
2466
|
+
* @async
|
|
2467
|
+
* @param {?number} [limit=50] - The number of services per request/page as integer. If `null` (default), requests all services.
|
|
2468
|
+
* @param {Array.<Service>} [oldServices=[]] - A list of existing services to update.
|
|
2469
|
+
* @yields {Promise<ResponseArray.<Job>>} A list of services.
|
|
2470
|
+
* @throws {Error}
|
|
2471
|
+
*/
|
|
2472
|
+
paginateServices(limit?: number | null, oldServices?: Array<Service>): AsyncGenerator<any, void, unknown>;
|
|
2318
2473
|
/**
|
|
2319
2474
|
* Creates a new secondary web service at the back-end.
|
|
2320
2475
|
*
|
|
@@ -2327,11 +2482,11 @@ declare module OpenEO {
|
|
|
2327
2482
|
* @param {object.<string, *>} [configuration={}] - Configuration parameters to pass to the service.
|
|
2328
2483
|
* @param {?string} [plan=null] - The billing plan to use for this service.
|
|
2329
2484
|
* @param {?number} [budget=null] - The maximum budget allowed to spend for this service.
|
|
2330
|
-
* @param {object.<string, *>} [additional={}] -
|
|
2485
|
+
* @param {object.<string, *>} [additional={}] - Other parameters to pass for the service, e.g. `log_level`.
|
|
2331
2486
|
* @returns {Promise<Service>} The stored service.
|
|
2332
2487
|
* @throws {Error}
|
|
2333
2488
|
*/
|
|
2334
|
-
createService(process: Process, type: string, title?: string | null, description?: string | null, enabled?: boolean, configuration?:
|
|
2489
|
+
createService(process: Process, type: string, title?: string | null, description?: string | null, enabled?: boolean, configuration?: object<string, any>, plan?: string | null, budget?: number | null, additional?: object<string, any>): Promise<Service>;
|
|
2335
2490
|
/**
|
|
2336
2491
|
* Get all information about a secondary web service.
|
|
2337
2492
|
*
|
|
@@ -2347,21 +2502,46 @@ declare module OpenEO {
|
|
|
2347
2502
|
* Adds links and federation:missing.
|
|
2348
2503
|
*
|
|
2349
2504
|
* @protected
|
|
2350
|
-
* @param {Array} arr
|
|
2505
|
+
* @param {Array.<*>} arr
|
|
2351
2506
|
* @param {object.<string, *>} response
|
|
2507
|
+
* @param {string} selfUrl
|
|
2352
2508
|
* @returns {ResponseArray}
|
|
2353
2509
|
*/
|
|
2354
|
-
protected _toResponseArray(arr: any
|
|
2510
|
+
protected _toResponseArray(arr: Array<any>, response: object<string, any>, selfUrl: string): ResponseArray;
|
|
2355
2511
|
/**
|
|
2356
2512
|
* Get the a link with the given rel type.
|
|
2357
2513
|
*
|
|
2358
2514
|
* @protected
|
|
2359
2515
|
* @param {Array.<Link>} links - An array of links.
|
|
2360
|
-
* @param {string} rel - Relation type to find
|
|
2516
|
+
* @param {string|Array.<string>} rel - Relation type(s) to find.
|
|
2361
2517
|
* @returns {string | null}
|
|
2362
2518
|
* @throws {Error}
|
|
2363
2519
|
*/
|
|
2364
|
-
protected _getLinkHref(links: Array<Link>, rel
|
|
2520
|
+
protected _getLinkHref(links: Array<Link>, rel: string | Array<string>): string | null;
|
|
2521
|
+
/**
|
|
2522
|
+
* Get the URL of the next page from a response.
|
|
2523
|
+
*
|
|
2524
|
+
* @protected
|
|
2525
|
+
* @param {AxiosResponse} response
|
|
2526
|
+
* @returns {string | null}
|
|
2527
|
+
*/
|
|
2528
|
+
protected _getNextLink(response: AxiosResponse): string | null;
|
|
2529
|
+
/**
|
|
2530
|
+
* Add a self link to the response if not present.
|
|
2531
|
+
*
|
|
2532
|
+
* @param {object} data - The body of the response as an object.
|
|
2533
|
+
* @param {string} selfUrl - The URL of the current request.
|
|
2534
|
+
* @returns {object} The modified object.
|
|
2535
|
+
*/
|
|
2536
|
+
_addSelfLink(data: object, selfUrl: string): object;
|
|
2537
|
+
/**
|
|
2538
|
+
* Makes all links in the list absolute.
|
|
2539
|
+
*
|
|
2540
|
+
* @param {Array.<Link>} links - An array of links.
|
|
2541
|
+
* @param {?string|AxiosResponse} [base=null] - The base url to use for relative links, or an response to derive the url from.
|
|
2542
|
+
* @returns {Array.<Link>}
|
|
2543
|
+
*/
|
|
2544
|
+
makeLinksAbsolute(links: Array<Link>, base?: (string | AxiosResponse) | null): Array<Link>;
|
|
2365
2545
|
/**
|
|
2366
2546
|
* Sends a GET request.
|
|
2367
2547
|
*
|
|
@@ -2370,11 +2550,12 @@ declare module OpenEO {
|
|
|
2370
2550
|
* @param {string} path
|
|
2371
2551
|
* @param {object.<string, *>} query
|
|
2372
2552
|
* @param {string} responseType - Response type according to axios, defaults to `json`.
|
|
2553
|
+
* @param {?AbortController} [abortController=null] - An AbortController object that can be used to cancel the request.
|
|
2373
2554
|
* @returns {Promise<AxiosResponse>}
|
|
2374
2555
|
* @throws {Error}
|
|
2375
2556
|
* @see https://github.com/axios/axios#request-config
|
|
2376
2557
|
*/
|
|
2377
|
-
protected _get(path: string, query: object<string, any>, responseType: string): Promise<AxiosResponse>;
|
|
2558
|
+
protected _get(path: string, query: object<string, any>, responseType: string, abortController?: AbortController | null): Promise<AxiosResponse>;
|
|
2378
2559
|
/**
|
|
2379
2560
|
* Sends a POST request.
|
|
2380
2561
|
*
|
|
@@ -2432,6 +2613,13 @@ declare module OpenEO {
|
|
|
2432
2613
|
* @throws {Error}
|
|
2433
2614
|
*/
|
|
2434
2615
|
download(url: string, authorize: boolean): Promise<Readable | Blob>;
|
|
2616
|
+
/**
|
|
2617
|
+
* Get the authorization header for requests.
|
|
2618
|
+
*
|
|
2619
|
+
* @protected
|
|
2620
|
+
* @returns {object.<string, string>}
|
|
2621
|
+
*/
|
|
2622
|
+
protected _getAuthHeaders(): object<string, string>;
|
|
2435
2623
|
/**
|
|
2436
2624
|
* Sends a HTTP request.
|
|
2437
2625
|
*
|
|
@@ -2548,7 +2736,7 @@ declare module OpenEO {
|
|
|
2548
2736
|
status: number;
|
|
2549
2737
|
statusText: string;
|
|
2550
2738
|
headers: any;
|
|
2551
|
-
|
|
2739
|
+
config: object<string, any>;
|
|
2552
2740
|
request: any;
|
|
2553
2741
|
};
|
|
2554
2742
|
export type BillingPlan = {
|
|
@@ -2576,6 +2764,10 @@ declare module OpenEO {
|
|
|
2576
2764
|
export type Collections = {
|
|
2577
2765
|
collections: Array<Collection>;
|
|
2578
2766
|
links: Array<Link>;
|
|
2767
|
+
/**
|
|
2768
|
+
* "federation:missing"] A list of backends from the federation that are missing in the response data.
|
|
2769
|
+
*/
|
|
2770
|
+
"federation:missing": Array<string>;
|
|
2579
2771
|
};
|
|
2580
2772
|
export type Collection = object<string, any>;
|
|
2581
2773
|
export type FileTypesAPI = {
|
|
@@ -2687,7 +2879,7 @@ declare module OpenEO {
|
|
|
2687
2879
|
level: string;
|
|
2688
2880
|
message: string;
|
|
2689
2881
|
data: any;
|
|
2690
|
-
path: Array<object<string, string>>;
|
|
2882
|
+
path: Array<object<string, string | null>>;
|
|
2691
2883
|
links: Array<Link>;
|
|
2692
2884
|
};
|
|
2693
2885
|
/**
|
|
@@ -2756,17 +2948,58 @@ declare module OpenEO {
|
|
|
2756
2948
|
* EXPERIMENTAL!
|
|
2757
2949
|
*/
|
|
2758
2950
|
namespaces: Array<string> | null;
|
|
2951
|
+
/**
|
|
2952
|
+
* "federation:missing"] A list of backends from the federation that are missing in the response data.
|
|
2953
|
+
*/
|
|
2954
|
+
"federation:missing": Array<string>;
|
|
2759
2955
|
};
|
|
2760
2956
|
/**
|
|
2761
2957
|
* An openEO processing chain.
|
|
2762
2958
|
*/
|
|
2763
2959
|
export type Process = object<string, any>;
|
|
2960
|
+
/**
|
|
2961
|
+
* An array of backends in the federation.
|
|
2962
|
+
*/
|
|
2963
|
+
export type FederationBackend = {
|
|
2964
|
+
/**
|
|
2965
|
+
* URL to the versioned API endpoint of the back-end.
|
|
2966
|
+
*/
|
|
2967
|
+
url: string;
|
|
2968
|
+
/**
|
|
2969
|
+
* Name of the back-end.
|
|
2970
|
+
*/
|
|
2971
|
+
title: string;
|
|
2972
|
+
/**
|
|
2973
|
+
* A description of the back-end and its specifics.
|
|
2974
|
+
*/
|
|
2975
|
+
description: string;
|
|
2976
|
+
/**
|
|
2977
|
+
* Current status of the back-ends (online or offline).
|
|
2978
|
+
*/
|
|
2979
|
+
status: string;
|
|
2980
|
+
/**
|
|
2981
|
+
* The time at which the status of the back-end was checked last, formatted as a RFC 3339 date-time.
|
|
2982
|
+
*/
|
|
2983
|
+
last_status_check: string;
|
|
2984
|
+
/**
|
|
2985
|
+
* 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.
|
|
2986
|
+
*/
|
|
2987
|
+
last_successful_check: string;
|
|
2988
|
+
/**
|
|
2989
|
+
* Declares the back-end to be experimental.
|
|
2990
|
+
*/
|
|
2991
|
+
experimental: boolean;
|
|
2992
|
+
/**
|
|
2993
|
+
* Declares the back-end to be deprecated.
|
|
2994
|
+
*/
|
|
2995
|
+
deprecated: boolean;
|
|
2996
|
+
};
|
|
2764
2997
|
/**
|
|
2765
2998
|
* An array, but enriched with additional details from an openEO API response.
|
|
2766
2999
|
*
|
|
2767
|
-
* Adds
|
|
3000
|
+
* Adds three properties: `url`, `links` and `federation:missing`.
|
|
2768
3001
|
*/
|
|
2769
|
-
export type ResponseArray =
|
|
3002
|
+
export type ResponseArray = any;
|
|
2770
3003
|
export type ServiceType = object<string, any>;
|
|
2771
3004
|
export type SyncResult = {
|
|
2772
3005
|
/**
|
|
@@ -2805,7 +3038,12 @@ declare module OpenEO {
|
|
|
2805
3038
|
budget: number | null;
|
|
2806
3039
|
links: Array<Link> | null;
|
|
2807
3040
|
};
|
|
2808
|
-
|
|
3041
|
+
/**
|
|
3042
|
+
* An array, but enriched with additional details from an openEO API response.
|
|
3043
|
+
*
|
|
3044
|
+
* Adds the property `federation:backends`.
|
|
3045
|
+
*/
|
|
3046
|
+
export type ValidationResult = any;
|
|
2809
3047
|
}
|
|
2810
3048
|
|
|
2811
3049
|
export = OpenEO;
|