@openeo/js-client 2.5.0 → 2.6.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 +93 -83
- package/openeo.d.ts +112 -53
- package/openeo.js +3670 -4114
- 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 +265 -220
- package/src/connection.js +1310 -1212
- package/src/env.js +5 -5
- package/src/filetypes.js +111 -111
- package/src/job.js +323 -322
- package/src/logs.js +73 -68
- package/src/node.js +168 -168
- package/src/oidcprovider.js +387 -375
- package/src/openeo.js +137 -138
- package/src/service.js +222 -221
- package/src/typedefs.js +242 -242
- 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}
|
|
@@ -286,6 +299,7 @@ declare module OpenEO {
|
|
|
286
299
|
* @param {Connection} connection - A Connection object representing an established connection to an openEO back-end.
|
|
287
300
|
*/
|
|
288
301
|
constructor(connection: Connection);
|
|
302
|
+
username: string;
|
|
289
303
|
/**
|
|
290
304
|
* Authenticate with HTTP Basic.
|
|
291
305
|
*
|
|
@@ -313,17 +327,32 @@ declare module OpenEO {
|
|
|
313
327
|
* @type {object.<string, *>}
|
|
314
328
|
*/
|
|
315
329
|
private data;
|
|
330
|
+
/**
|
|
331
|
+
* @private
|
|
332
|
+
* @ignore
|
|
333
|
+
* @type {object.<string, string>}
|
|
334
|
+
*/
|
|
335
|
+
private featureMap;
|
|
316
336
|
/**
|
|
317
337
|
* @private
|
|
318
338
|
* @type {Array.<string>}
|
|
319
339
|
*/
|
|
320
340
|
private features;
|
|
321
341
|
/**
|
|
322
|
-
*
|
|
323
|
-
*
|
|
324
|
-
*
|
|
342
|
+
* Validates the capabilities.
|
|
343
|
+
*
|
|
344
|
+
* Throws an error in case of an issue, otherwise just passes.
|
|
345
|
+
*
|
|
346
|
+
* @protected
|
|
347
|
+
* @throws {Error}
|
|
325
348
|
*/
|
|
326
|
-
|
|
349
|
+
protected validate(): void;
|
|
350
|
+
/**
|
|
351
|
+
* Initializes the class.
|
|
352
|
+
*
|
|
353
|
+
* @protected
|
|
354
|
+
*/
|
|
355
|
+
protected init(): void;
|
|
327
356
|
/**
|
|
328
357
|
* Returns the capabilities response as a JSON serializable representation of the data that is API compliant.
|
|
329
358
|
*
|
|
@@ -391,6 +420,14 @@ declare module OpenEO {
|
|
|
391
420
|
* @returns {Array.<BillingPlan>} Billing plans
|
|
392
421
|
*/
|
|
393
422
|
listPlans(): Array<BillingPlan>;
|
|
423
|
+
/**
|
|
424
|
+
* Migrates a response, if required.
|
|
425
|
+
*
|
|
426
|
+
* @param {AxiosResponse} response
|
|
427
|
+
* @protected
|
|
428
|
+
* @returns {AxiosResponse}
|
|
429
|
+
*/
|
|
430
|
+
protected migrate(response: AxiosResponse): AxiosResponse;
|
|
394
431
|
}
|
|
395
432
|
/**
|
|
396
433
|
* The Authentication Provider for OpenID Connect.
|
|
@@ -516,6 +553,20 @@ declare module OpenEO {
|
|
|
516
553
|
* @see OidcProvider#addListener
|
|
517
554
|
*/
|
|
518
555
|
removeListener(event: string, scope?: string): void;
|
|
556
|
+
/**
|
|
557
|
+
* Authenticate with OpenID Connect (OIDC).
|
|
558
|
+
*
|
|
559
|
+
* Supported only in Browser environments.
|
|
560
|
+
*
|
|
561
|
+
* @async
|
|
562
|
+
* @param {object.<string, *>} [options={}] - Object with authentication options.
|
|
563
|
+
* @param {boolean} [requestRefreshToken=false] - If set to `true`, adds a scope to request a refresh token.
|
|
564
|
+
* @returns {Promise<void>}
|
|
565
|
+
* @throws {Error}
|
|
566
|
+
* @see https://github.com/IdentityModel/oidc-client-js/wiki#other-optional-settings
|
|
567
|
+
* @see {OidcProvider#refreshTokenScope}
|
|
568
|
+
*/
|
|
569
|
+
login(options?: object<string, any>, requestRefreshToken?: boolean): Promise<void>;
|
|
519
570
|
/**
|
|
520
571
|
* Returns the options for the OIDC client library.
|
|
521
572
|
*
|
|
@@ -568,25 +619,11 @@ declare module OpenEO {
|
|
|
568
619
|
* @see OidcProvider#setClientId
|
|
569
620
|
*/
|
|
570
621
|
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
622
|
}
|
|
586
623
|
export namespace OidcProvider {
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
624
|
+
let uiMethod: string;
|
|
625
|
+
let redirectUrl: string;
|
|
626
|
+
let grants: Array<string>;
|
|
590
627
|
}
|
|
591
628
|
/**
|
|
592
629
|
* Manages the files types supported by the back-end.
|
|
@@ -761,8 +798,9 @@ declare module OpenEO {
|
|
|
761
798
|
*
|
|
762
799
|
* @param {Connection} connection - A Connection object representing an established connection to an openEO back-end.
|
|
763
800
|
* @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.
|
|
801
|
+
* @param {?string} [level=null] - Minimum level of logs to return.
|
|
764
802
|
*/
|
|
765
|
-
constructor(connection: Connection, endpoint: string);
|
|
803
|
+
constructor(connection: Connection, endpoint: string, level?: string | null);
|
|
766
804
|
/**
|
|
767
805
|
* @protected
|
|
768
806
|
* @type {Connection}
|
|
@@ -770,6 +808,7 @@ declare module OpenEO {
|
|
|
770
808
|
protected connection: Connection;
|
|
771
809
|
endpoint: string;
|
|
772
810
|
lastId: string;
|
|
811
|
+
level: string;
|
|
773
812
|
/**
|
|
774
813
|
* Retrieves the next log entries since the last request.
|
|
775
814
|
*
|
|
@@ -829,7 +868,7 @@ declare module OpenEO {
|
|
|
829
868
|
* @readonly
|
|
830
869
|
* @type {?Process}
|
|
831
870
|
*/
|
|
832
|
-
public readonly process: Process;
|
|
871
|
+
public readonly process: Process | null;
|
|
833
872
|
/**
|
|
834
873
|
* The current status of a batch job.
|
|
835
874
|
* One of "created", "queued", "running", "canceled", "finished" or "error".
|
|
@@ -926,9 +965,10 @@ declare module OpenEO {
|
|
|
926
965
|
/**
|
|
927
966
|
* Get logs for the batch job from the back-end.
|
|
928
967
|
*
|
|
968
|
+
* @param {?string} [level=null] - Minimum level of logs to return.
|
|
929
969
|
* @returns {Logs}
|
|
930
970
|
*/
|
|
931
|
-
debugJob(): Logs;
|
|
971
|
+
debugJob(level?: string | null): Logs;
|
|
932
972
|
/**
|
|
933
973
|
* Checks for status changes and new log entries every x seconds.
|
|
934
974
|
*
|
|
@@ -1049,7 +1089,7 @@ declare module OpenEO {
|
|
|
1049
1089
|
* @readonly
|
|
1050
1090
|
* @type {?object.<string, *>}
|
|
1051
1091
|
*/
|
|
1052
|
-
public readonly returns: object<string, any
|
|
1092
|
+
public readonly returns: object<string, any> | null;
|
|
1053
1093
|
/**
|
|
1054
1094
|
* Specifies that the process or parameter is deprecated with the potential to be removed in any of the next versions.
|
|
1055
1095
|
* @public
|
|
@@ -1070,7 +1110,7 @@ declare module OpenEO {
|
|
|
1070
1110
|
* @readonly
|
|
1071
1111
|
* @type {?object.<string, *>}
|
|
1072
1112
|
*/
|
|
1073
|
-
public readonly exceptions: object<string, any
|
|
1113
|
+
public readonly exceptions: object<string, any> | null;
|
|
1074
1114
|
/**
|
|
1075
1115
|
* @public
|
|
1076
1116
|
* @readonly
|
|
@@ -1089,7 +1129,7 @@ declare module OpenEO {
|
|
|
1089
1129
|
* @readonly
|
|
1090
1130
|
* @type {?object.<string, *>}
|
|
1091
1131
|
*/
|
|
1092
|
-
public readonly processGraph: object<string, any
|
|
1132
|
+
public readonly processGraph: object<string, any> | null;
|
|
1093
1133
|
/**
|
|
1094
1134
|
* Updates the data stored in this object by requesting the process graph metadata from the back-end.
|
|
1095
1135
|
*
|
|
@@ -1160,7 +1200,7 @@ declare module OpenEO {
|
|
|
1160
1200
|
* @readonly
|
|
1161
1201
|
* @type {?Process}
|
|
1162
1202
|
*/
|
|
1163
|
-
public readonly process: Process;
|
|
1203
|
+
public readonly process: Process | null;
|
|
1164
1204
|
/**
|
|
1165
1205
|
* URL at which the secondary web service is accessible
|
|
1166
1206
|
* @public
|
|
@@ -1187,14 +1227,14 @@ declare module OpenEO {
|
|
|
1187
1227
|
* @readonly
|
|
1188
1228
|
* @type {?object.<string, *>}
|
|
1189
1229
|
*/
|
|
1190
|
-
public readonly configuration: object<string, any
|
|
1230
|
+
public readonly configuration: object<string, any> | null;
|
|
1191
1231
|
/**
|
|
1192
1232
|
* Additional attributes of the secondary web service, e.g. available layers for a WMS based on the bands in the underlying GeoTiff.
|
|
1193
1233
|
* @public
|
|
1194
1234
|
* @readonly
|
|
1195
1235
|
* @type {?object.<string, *>}
|
|
1196
1236
|
*/
|
|
1197
|
-
public readonly attributes: object<string, any
|
|
1237
|
+
public readonly attributes: object<string, any> | null;
|
|
1198
1238
|
/**
|
|
1199
1239
|
* Date and time of creation, formatted as a RFC 3339 date-time.
|
|
1200
1240
|
* @public
|
|
@@ -1265,9 +1305,10 @@ declare module OpenEO {
|
|
|
1265
1305
|
/**
|
|
1266
1306
|
* Get logs for the secondary web service from the back-end.
|
|
1267
1307
|
*
|
|
1308
|
+
* @param {?string} [level=null] - Minimum level of logs to return.
|
|
1268
1309
|
* @returns {Logs}
|
|
1269
1310
|
*/
|
|
1270
|
-
debugService(): Logs;
|
|
1311
|
+
debugService(level?: string | null): Logs;
|
|
1271
1312
|
/**
|
|
1272
1313
|
* Checks for new log entries every x seconds.
|
|
1273
1314
|
*
|
|
@@ -1451,7 +1492,7 @@ declare module OpenEO {
|
|
|
1451
1492
|
addOperatorProcess(operator: string, left: number | object<string, any>, right: number | object<string, any>): BuilderNode;
|
|
1452
1493
|
}
|
|
1453
1494
|
export namespace Formula {
|
|
1454
|
-
|
|
1495
|
+
let operatorMapping: object<string, string>;
|
|
1455
1496
|
}
|
|
1456
1497
|
/**
|
|
1457
1498
|
* A class that represents a process node and also a result from a process.
|
|
@@ -1505,11 +1546,11 @@ declare module OpenEO {
|
|
|
1505
1546
|
/**
|
|
1506
1547
|
* Converts a sorted array of arguments to an object with the respective parameter names.
|
|
1507
1548
|
*
|
|
1508
|
-
* @param {Array} processArgs
|
|
1549
|
+
* @param {Array.<object.<string, *>>} processArgs
|
|
1509
1550
|
* @returns {object.<string, *>}
|
|
1510
1551
|
* @throws {Error}
|
|
1511
1552
|
*/
|
|
1512
|
-
namedArguments(processArgs: any
|
|
1553
|
+
namedArguments(processArgs: Array<object<string, any>>): object<string, any>;
|
|
1513
1554
|
/**
|
|
1514
1555
|
* Checks the arguments given for parameters and add them to the process.
|
|
1515
1556
|
*
|
|
@@ -1739,10 +1780,10 @@ declare module OpenEO {
|
|
|
1739
1780
|
/**
|
|
1740
1781
|
* Gets the callback parameter specifics from the parent process.
|
|
1741
1782
|
*
|
|
1742
|
-
* @returns {Array}
|
|
1783
|
+
* @returns {Array.<object.<string,*>>}
|
|
1743
1784
|
* @todo Should this also pass callback parameters from parents until root is reached?
|
|
1744
1785
|
*/
|
|
1745
|
-
getParentCallbackParameters(): any
|
|
1786
|
+
getParentCallbackParameters(): Array<object<string, any>>;
|
|
1746
1787
|
/**
|
|
1747
1788
|
* Adds a parameter to the list of process parameters.
|
|
1748
1789
|
*
|
|
@@ -1881,11 +1922,12 @@ declare module OpenEO {
|
|
|
1881
1922
|
* @async
|
|
1882
1923
|
* @protected
|
|
1883
1924
|
* @returns {Promise<Capabilities>} Capabilities
|
|
1925
|
+
* @throws {Error}
|
|
1884
1926
|
*/
|
|
1885
1927
|
protected init(): Promise<Capabilities>;
|
|
1886
1928
|
/**
|
|
1887
1929
|
* Refresh the cache for processes.
|
|
1888
|
-
*
|
|
1930
|
+
*
|
|
1889
1931
|
* @async
|
|
1890
1932
|
* @protected
|
|
1891
1933
|
* @returns {Promise}
|
|
@@ -1969,7 +2011,7 @@ declare module OpenEO {
|
|
|
1969
2011
|
* 2. Lower left corner, coordinate axis 2
|
|
1970
2012
|
* 3. Upper right corner, coordinate axis 1
|
|
1971
2013
|
* 4. Upper right corner, coordinate axis 2
|
|
1972
|
-
* @param {?Array
|
|
2014
|
+
* @param {?Array} [temporalExtent=null] - Limits the items to the specified temporal interval.
|
|
1973
2015
|
* The interval has to be specified as an array with exactly two elements (start, end) and
|
|
1974
2016
|
* each must be either an RFC 3339 compatible string or a Date object.
|
|
1975
2017
|
* Also supports open intervals by setting one of the boundaries to `null`, but never both.
|
|
@@ -1977,7 +2019,7 @@ declare module OpenEO {
|
|
|
1977
2019
|
* @yields {Promise<ItemCollection>} A response compatible to the API specification.
|
|
1978
2020
|
* @throws {Error}
|
|
1979
2021
|
*/
|
|
1980
|
-
listCollectionItems(collectionId: string, spatialExtent?: Array<number> | null, temporalExtent?:
|
|
2022
|
+
listCollectionItems(collectionId: string, spatialExtent?: Array<number> | null, temporalExtent?: any[] | null, limit?: number | null): AsyncGenerator<any, void, unknown>;
|
|
1981
2023
|
/**
|
|
1982
2024
|
* Normalisation of the namespace to a value that is compatible with the OpenEO specs - EXPERIMENTAL.
|
|
1983
2025
|
*
|
|
@@ -2253,9 +2295,10 @@ declare module OpenEO {
|
|
|
2253
2295
|
* @param {?string} [plan=null] - The billing plan to use for this computation.
|
|
2254
2296
|
* @param {?number} [budget=null] - The maximum budget allowed to spend for this computation.
|
|
2255
2297
|
* @param {?AbortController} [abortController=null] - An AbortController object that can be used to cancel the processing request.
|
|
2298
|
+
* @param {object.<string, *>} [additional={}] - Other parameters to pass for the batch job, e.g. `log_level`.
|
|
2256
2299
|
* @returns {Promise<SyncResult>} - An object with the data and some metadata.
|
|
2257
2300
|
*/
|
|
2258
|
-
computeResult(process: Process, plan?: string | null, budget?: number | null, abortController?: AbortController | null): Promise<SyncResult>;
|
|
2301
|
+
computeResult(process: Process, plan?: string | null, budget?: number | null, abortController?: AbortController | null, additional?: object<string, any>): Promise<SyncResult>;
|
|
2259
2302
|
/**
|
|
2260
2303
|
* Executes a process synchronously and downloads to result the given path.
|
|
2261
2304
|
*
|
|
@@ -2292,7 +2335,7 @@ declare module OpenEO {
|
|
|
2292
2335
|
* @param {?string} [description=null] - A description for the batch job.
|
|
2293
2336
|
* @param {?string} [plan=null] - The billing plan to use for this batch job.
|
|
2294
2337
|
* @param {?number} [budget=null] - The maximum budget allowed to spend for this batch job.
|
|
2295
|
-
* @param {object.<string, *>} [additional={}] -
|
|
2338
|
+
* @param {object.<string, *>} [additional={}] - Other parameters to pass for the batch job, e.g. `log_level`.
|
|
2296
2339
|
* @returns {Promise<Job>} The stored batch job.
|
|
2297
2340
|
* @throws {Error}
|
|
2298
2341
|
*/
|
|
@@ -2327,11 +2370,11 @@ declare module OpenEO {
|
|
|
2327
2370
|
* @param {object.<string, *>} [configuration={}] - Configuration parameters to pass to the service.
|
|
2328
2371
|
* @param {?string} [plan=null] - The billing plan to use for this service.
|
|
2329
2372
|
* @param {?number} [budget=null] - The maximum budget allowed to spend for this service.
|
|
2330
|
-
* @param {object.<string, *>} [additional={}] -
|
|
2373
|
+
* @param {object.<string, *>} [additional={}] - Other parameters to pass for the service, e.g. `log_level`.
|
|
2331
2374
|
* @returns {Promise<Service>} The stored service.
|
|
2332
2375
|
* @throws {Error}
|
|
2333
2376
|
*/
|
|
2334
|
-
createService(process: Process, type: string, title?: string | null, description?: string | null, enabled?: boolean, configuration?:
|
|
2377
|
+
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
2378
|
/**
|
|
2336
2379
|
* Get all information about a secondary web service.
|
|
2337
2380
|
*
|
|
@@ -2347,21 +2390,29 @@ declare module OpenEO {
|
|
|
2347
2390
|
* Adds links and federation:missing.
|
|
2348
2391
|
*
|
|
2349
2392
|
* @protected
|
|
2350
|
-
* @param {Array} arr
|
|
2393
|
+
* @param {Array.<*>} arr
|
|
2351
2394
|
* @param {object.<string, *>} response
|
|
2352
2395
|
* @returns {ResponseArray}
|
|
2353
2396
|
*/
|
|
2354
|
-
protected _toResponseArray(arr: any
|
|
2397
|
+
protected _toResponseArray(arr: Array<any>, response: object<string, any>): ResponseArray;
|
|
2355
2398
|
/**
|
|
2356
2399
|
* Get the a link with the given rel type.
|
|
2357
2400
|
*
|
|
2358
2401
|
* @protected
|
|
2359
2402
|
* @param {Array.<Link>} links - An array of links.
|
|
2360
|
-
* @param {string} rel - Relation type to find
|
|
2403
|
+
* @param {string|Array.<string>} rel - Relation type(s) to find.
|
|
2361
2404
|
* @returns {string | null}
|
|
2362
2405
|
* @throws {Error}
|
|
2363
2406
|
*/
|
|
2364
|
-
protected _getLinkHref(links: Array<Link>, rel
|
|
2407
|
+
protected _getLinkHref(links: Array<Link>, rel: string | Array<string>): string | null;
|
|
2408
|
+
/**
|
|
2409
|
+
* Makes all links in the list absolute.
|
|
2410
|
+
*
|
|
2411
|
+
* @param {Array.<Link>} links - An array of links.
|
|
2412
|
+
* @param {?string|AxiosResponse} [base=null] - The base url to use for relative links, or an response to derive the url from.
|
|
2413
|
+
* @returns {Array.<Link>}
|
|
2414
|
+
*/
|
|
2415
|
+
makeLinksAbsolute(links: Array<Link>, base?: (string | AxiosResponse) | null): Array<Link>;
|
|
2365
2416
|
/**
|
|
2366
2417
|
* Sends a GET request.
|
|
2367
2418
|
*
|
|
@@ -2370,11 +2421,12 @@ declare module OpenEO {
|
|
|
2370
2421
|
* @param {string} path
|
|
2371
2422
|
* @param {object.<string, *>} query
|
|
2372
2423
|
* @param {string} responseType - Response type according to axios, defaults to `json`.
|
|
2424
|
+
* @param {?AbortController} [abortController=null] - An AbortController object that can be used to cancel the request.
|
|
2373
2425
|
* @returns {Promise<AxiosResponse>}
|
|
2374
2426
|
* @throws {Error}
|
|
2375
2427
|
* @see https://github.com/axios/axios#request-config
|
|
2376
2428
|
*/
|
|
2377
|
-
protected _get(path: string, query: object<string, any>, responseType: string): Promise<AxiosResponse>;
|
|
2429
|
+
protected _get(path: string, query: object<string, any>, responseType: string, abortController?: AbortController | null): Promise<AxiosResponse>;
|
|
2378
2430
|
/**
|
|
2379
2431
|
* Sends a POST request.
|
|
2380
2432
|
*
|
|
@@ -2432,6 +2484,13 @@ declare module OpenEO {
|
|
|
2432
2484
|
* @throws {Error}
|
|
2433
2485
|
*/
|
|
2434
2486
|
download(url: string, authorize: boolean): Promise<Readable | Blob>;
|
|
2487
|
+
/**
|
|
2488
|
+
* Get the authorization header for requests.
|
|
2489
|
+
*
|
|
2490
|
+
* @protected
|
|
2491
|
+
* @returns {object.<string, string>}
|
|
2492
|
+
*/
|
|
2493
|
+
protected _getAuthHeaders() : object<string, string>;
|
|
2435
2494
|
/**
|
|
2436
2495
|
* Sends a HTTP request.
|
|
2437
2496
|
*
|
|
@@ -2548,7 +2607,7 @@ declare module OpenEO {
|
|
|
2548
2607
|
status: number;
|
|
2549
2608
|
statusText: string;
|
|
2550
2609
|
headers: any;
|
|
2551
|
-
|
|
2610
|
+
config: object<string, any>;
|
|
2552
2611
|
request: any;
|
|
2553
2612
|
};
|
|
2554
2613
|
export type BillingPlan = {
|
|
@@ -2687,7 +2746,7 @@ declare module OpenEO {
|
|
|
2687
2746
|
level: string;
|
|
2688
2747
|
message: string;
|
|
2689
2748
|
data: any;
|
|
2690
|
-
path: Array<object<string, string>>;
|
|
2749
|
+
path: Array<object<string, string | null>>;
|
|
2691
2750
|
links: Array<Link>;
|
|
2692
2751
|
};
|
|
2693
2752
|
/**
|