@openeo/js-client 2.3.1 → 2.5.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/openeo.d.ts CHANGED
@@ -78,13 +78,6 @@ declare module OpenEO {
78
78
  * @param {?string} token
79
79
  */
80
80
  setToken(token: string | null): void;
81
- /**
82
- * Abstract method that extending classes implement the login process with.
83
- *
84
- * @param {...*} args
85
- * @throws {Error}
86
- */
87
- login(...args: any[]): Promise<void>;
88
81
  /**
89
82
  * Logout from the established session.
90
83
  *
@@ -117,12 +110,12 @@ declare module OpenEO {
117
110
  * @protected
118
111
  * @type {object.<string, string>}
119
112
  */
120
- protected apiToClientNames: any;
113
+ protected apiToClientNames: object<string, string>;
121
114
  /**
122
115
  * @protected
123
116
  * @type {object.<string, string>}
124
117
  */
125
- protected clientToApiNames: any;
118
+ protected clientToApiNames: object<string, string>;
126
119
  /**
127
120
  * @protected
128
121
  * @type {number}
@@ -134,20 +127,20 @@ declare module OpenEO {
134
127
  * @protected
135
128
  * @type {object.<string, *>}
136
129
  */
137
- protected extra: any;
130
+ protected extra: object<string, any>;
138
131
  /**
139
132
  * Returns a JSON serializable representation of the data that is API compliant.
140
133
  *
141
134
  * @returns {object.<string, *>}
142
135
  */
143
- toJSON(): any;
136
+ toJSON(): object<string, any>;
144
137
  /**
145
138
  * Converts the data from an API response into data suitable for our JS client models.
146
139
  *
147
140
  * @param {object.<string, *>} metadata - JSON object originating from an API response.
148
141
  * @returns {BaseEntity} Returns the object itself.
149
142
  */
150
- setAll(metadata: any): BaseEntity;
143
+ setAll(metadata: object<string, any>): BaseEntity;
151
144
  /**
152
145
  * Returns the age of the data in seconds.
153
146
  *
@@ -159,7 +152,7 @@ declare module OpenEO {
159
152
  *
160
153
  * @returns {object.<string, *>}
161
154
  */
162
- getAll(): any;
155
+ getAll(): object<string, any>;
163
156
  /**
164
157
  * Get a value from the additional data that is not part of the core model, i.e. from proprietary extensions.
165
158
  *
@@ -174,7 +167,7 @@ declare module OpenEO {
174
167
  * @returns {object.<string, *>}
175
168
  * @protected
176
169
  */
177
- protected _convertToRequest(parameters: any): any;
170
+ protected _convertToRequest(parameters: object<string, any>): object<string, any>;
178
171
  /**
179
172
  * Checks whether a features is supported by the API.
180
173
  *
@@ -265,7 +258,7 @@ declare module OpenEO {
265
258
  * @param {string} targetFolder
266
259
  * @throws {Error}
267
260
  */
268
- static downloadResults(con: any, assets: Array<any>, targetFolder: string): Promise<void>;
261
+ static downloadResults(con: Connection, assets: Array<object<string, any>>, targetFolder: string): Promise<void>;
269
262
  /**
270
263
  * Streams data into a file (node) or offers data to download (browser).
271
264
  *
@@ -314,7 +307,7 @@ declare module OpenEO {
314
307
  * @param {object.<string, *>} data - A capabilities response compatible to the API specification for `GET /`.
315
308
  * @throws {Error}
316
309
  */
317
- constructor(data: any);
310
+ constructor(data: object<string, any>);
318
311
  /**
319
312
  * @private
320
313
  * @type {object.<string, *>}
@@ -336,7 +329,7 @@ declare module OpenEO {
336
329
  *
337
330
  * @returns {object.<string, *>} - A reference to the capabilities response.
338
331
  */
339
- toJSON(): any;
332
+ toJSON(): object<string, any>;
340
333
  /**
341
334
  * Returns the openEO API version implemented by the back-end.
342
335
  *
@@ -436,7 +429,7 @@ declare module OpenEO {
436
429
  * @throws {Error}
437
430
  * @see https://github.com/IdentityModel/oidc-client-js/wiki#other-optional-settings
438
431
  */
439
- static signinCallback(provider?: OidcProvider, options?: any): Promise<User | null>;
432
+ static signinCallback(provider?: OidcProvider, options?: object<string, any>): Promise<User | null>;
440
433
  /**
441
434
  * Creates a new OidcProvider instance to authenticate using OpenID Connect.
442
435
  *
@@ -455,7 +448,7 @@ declare module OpenEO {
455
448
  /**
456
449
  * The client ID to use for authentication.
457
450
  *
458
- * @type {?string}
451
+ * @type {string | null}
459
452
  */
460
453
  clientId: string | null;
461
454
  /**
@@ -478,6 +471,12 @@ declare module OpenEO {
478
471
  * @type {Array.<string>}
479
472
  */
480
473
  scopes: Array<string>;
474
+ /**
475
+ * The scope that is used to request a refresh token.
476
+ *
477
+ * @type {string}
478
+ */
479
+ refreshTokenScope: string;
481
480
  /**
482
481
  * Any additional links.
483
482
  *
@@ -524,9 +523,11 @@ declare module OpenEO {
524
523
  *
525
524
  * @protected
526
525
  * @param {object.<string, *>} options
526
+ * @param {boolean} [requestRefreshToken=false] - If set to `true`, adds a scope to request a refresh token.
527
527
  * @returns {object.<string, *>}
528
+ * @see {OidcProvider#refreshTokenScope}
528
529
  */
529
- protected getOptions(options?: any): any;
530
+ protected getOptions(options?: object<string, any>, requestRefreshToken?: boolean): object<string, any>;
530
531
  /**
531
532
  * Get the response_type based on the grant type.
532
533
  *
@@ -567,6 +568,20 @@ declare module OpenEO {
567
568
  * @see OidcProvider#setClientId
568
569
  */
569
570
  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;
570
585
  }
571
586
  export namespace OidcProvider {
572
587
  const uiMethod: string;
@@ -584,9 +599,17 @@ declare module OpenEO {
584
599
  */
585
600
  constructor(data: FileTypesAPI);
586
601
  /**
602
+ * @protected
587
603
  * @type {FileTypesAPI}
588
604
  */
589
- data: FileTypesAPI;
605
+ protected data: FileTypesAPI;
606
+ /**
607
+ * A list of backends from the federation that are missing in the response data.
608
+ *
609
+ * @public
610
+ * @type {Array.<string>}
611
+ */
612
+ public 'federation:missing': Array<string>;
590
613
  /**
591
614
  * Returns the file types response as a JSON serializable representation of the data that is API compliant.
592
615
  *
@@ -598,13 +621,13 @@ declare module OpenEO {
598
621
  *
599
622
  * @returns {object.<string, FileType>}
600
623
  */
601
- getInputTypes(): any;
624
+ getInputTypes(): object<string, FileType>;
602
625
  /**
603
626
  * Returns the output file formats.
604
627
  *
605
628
  * @returns {object.<string, FileType>}
606
629
  */
607
- getOutputTypes(): any;
630
+ getOutputTypes(): object<string, FileType>;
608
631
  /**
609
632
  * Returns a single input file format for a given identifier.
610
633
  *
@@ -804,7 +827,7 @@ declare module OpenEO {
804
827
  * The process chain to be executed.
805
828
  * @public
806
829
  * @readonly
807
- * @type {Process}
830
+ * @type {?Process}
808
831
  */
809
832
  public readonly process: Process;
810
833
  /**
@@ -812,37 +835,37 @@ declare module OpenEO {
812
835
  * One of "created", "queued", "running", "canceled", "finished" or "error".
813
836
  * @public
814
837
  * @readonly
815
- * @type {string}
838
+ * @type {?string}
816
839
  */
817
- public readonly status: string;
840
+ public readonly status: string | null;
818
841
  /**
819
842
  * Indicates the process of a running batch job in percent.
820
843
  * @public
821
844
  * @readonly
822
- * @type {number}
845
+ * @type {?number}
823
846
  */
824
- public readonly progress: number;
847
+ public readonly progress: number | null;
825
848
  /**
826
849
  * Date and time of creation, formatted as a RFC 3339 date-time.
827
850
  * @public
828
851
  * @readonly
829
- * @type {string}
852
+ * @type {?string}
830
853
  */
831
- public readonly created: string;
854
+ public readonly created: string | null;
832
855
  /**
833
856
  * Date and time of the last status change, formatted as a RFC 3339 date-time.
834
857
  * @public
835
858
  * @readonly
836
- * @type {string}
859
+ * @type {?string}
837
860
  */
838
- public readonly updated: string;
861
+ public readonly updated: string | null;
839
862
  /**
840
863
  * The billing plan to process and charge the batch job with.
841
864
  * @public
842
865
  * @readonly
843
- * @type {string}
866
+ * @type {?string}
844
867
  */
845
- public readonly plan: string;
868
+ public readonly plan: string | null;
846
869
  /**
847
870
  * An amount of money or credits in the currency specified by the back-end.
848
871
  * @public
@@ -952,7 +975,7 @@ declare module OpenEO {
952
975
  * @returns {Promise<object.<string, *>>} The JSON-based response compatible to the API specification, but also including a `costs` property if present in the headers.
953
976
  * @throws {Error}
954
977
  */
955
- getResultsAsStac(): Promise<any>;
978
+ getResultsAsStac(): Promise<object<string, any>>;
956
979
  /**
957
980
  * Retrieves download links.
958
981
  *
@@ -1009,9 +1032,9 @@ declare module OpenEO {
1009
1032
  * A list of categories.
1010
1033
  * @public
1011
1034
  * @readonly
1012
- * @type {Array.<string>}
1035
+ * @type {?Array.<string>}
1013
1036
  */
1014
- public readonly categories: Array<string>;
1037
+ public readonly categories: Array<string> | null;
1015
1038
  /**
1016
1039
  * A list of parameters.
1017
1040
  *
@@ -1019,54 +1042,54 @@ declare module OpenEO {
1019
1042
  * @readonly
1020
1043
  * @type {?Array.<object.<string, *>>}
1021
1044
  */
1022
- public readonly parameters: Array<any> | null;
1045
+ public readonly parameters: Array<object<string, any>> | null;
1023
1046
  /**
1024
1047
  * Description of the data that is returned by this process.
1025
1048
  * @public
1026
1049
  * @readonly
1027
1050
  * @type {?object.<string, *>}
1028
1051
  */
1029
- public readonly returns: any;
1052
+ public readonly returns: object<string, any>;
1030
1053
  /**
1031
1054
  * Specifies that the process or parameter is deprecated with the potential to be removed in any of the next versions.
1032
1055
  * @public
1033
1056
  * @readonly
1034
- * @type {boolean}
1057
+ * @type {?boolean}
1035
1058
  */
1036
- public readonly deprecated: boolean;
1059
+ public readonly deprecated: boolean | null;
1037
1060
  /**
1038
1061
  * Declares the process or parameter to be experimental, which means that it is likely to change or may produce unpredictable behaviour.
1039
1062
  * @public
1040
1063
  * @readonly
1041
- * @type {boolean}
1064
+ * @type {?boolean}
1042
1065
  */
1043
- public readonly experimental: boolean;
1066
+ public readonly experimental: boolean | null;
1044
1067
  /**
1045
1068
  * Declares any exceptions (errors) that might occur during execution of this process.
1046
1069
  * @public
1047
1070
  * @readonly
1048
- * @type {object.<string, *>}
1071
+ * @type {?object.<string, *>}
1049
1072
  */
1050
- public readonly exceptions: any;
1073
+ public readonly exceptions: object<string, any>;
1051
1074
  /**
1052
1075
  * @public
1053
1076
  * @readonly
1054
- * @type {Array.<object.<string, *>>}
1077
+ * @type {?Array.<object.<string, *>>}
1055
1078
  */
1056
- public readonly examples: Array<any>;
1079
+ public readonly examples: Array<object<string, any>> | null;
1057
1080
  /**
1058
1081
  * Links related to this process.
1059
1082
  * @public
1060
1083
  * @readonly
1061
- * @type {Array.<Link>}
1084
+ * @type {?Array.<Link>}
1062
1085
  */
1063
- public readonly links: Array<Link>;
1086
+ public readonly links: Array<Link> | null;
1064
1087
  /**
1065
1088
  * @public
1066
1089
  * @readonly
1067
- * @type {object.<string, *>}
1090
+ * @type {?object.<string, *>}
1068
1091
  */
1069
- public readonly processGraph: any;
1092
+ public readonly processGraph: object<string, any>;
1070
1093
  /**
1071
1094
  * Updates the data stored in this object by requesting the process graph metadata from the back-end.
1072
1095
  *
@@ -1135,57 +1158,57 @@ declare module OpenEO {
1135
1158
  * The process chain to be executed.
1136
1159
  * @public
1137
1160
  * @readonly
1138
- * @type {Process}
1161
+ * @type {?Process}
1139
1162
  */
1140
1163
  public readonly process: Process;
1141
1164
  /**
1142
1165
  * URL at which the secondary web service is accessible
1143
1166
  * @public
1144
1167
  * @readonly
1145
- * @type {string}
1168
+ * @type {?string}
1146
1169
  */
1147
- public readonly url: string;
1170
+ public readonly url: string | null;
1148
1171
  /**
1149
1172
  * Web service type (protocol / standard) that is exposed.
1150
1173
  * @public
1151
1174
  * @readonly
1152
- * @type {string}
1175
+ * @type {?string}
1153
1176
  */
1154
- public readonly type: string;
1177
+ public readonly type: string | null;
1155
1178
  /**
1156
1179
  * @public
1157
1180
  * @readonly
1158
- * @type {boolean}
1181
+ * @type {?boolean}
1159
1182
  */
1160
- public readonly enabled: boolean;
1183
+ public readonly enabled: boolean | null;
1161
1184
  /**
1162
1185
  * Map of configuration settings, i.e. the setting names supported by the secondary web service combined with actual values.
1163
1186
  * @public
1164
1187
  * @readonly
1165
- * @type {object.<string, *>}
1188
+ * @type {?object.<string, *>}
1166
1189
  */
1167
- public readonly configuration: any;
1190
+ public readonly configuration: object<string, any>;
1168
1191
  /**
1169
1192
  * Additional attributes of the secondary web service, e.g. available layers for a WMS based on the bands in the underlying GeoTiff.
1170
1193
  * @public
1171
1194
  * @readonly
1172
- * @type {object.<string, *>}
1195
+ * @type {?object.<string, *>}
1173
1196
  */
1174
- public readonly attributes: any;
1197
+ public readonly attributes: object<string, any>;
1175
1198
  /**
1176
1199
  * Date and time of creation, formatted as a RFC 3339 date-time.
1177
1200
  * @public
1178
1201
  * @readonly
1179
- * @type {string}
1202
+ * @type {?string}
1180
1203
  */
1181
- public readonly created: string;
1204
+ public readonly created: string | null;
1182
1205
  /**
1183
1206
  * The billing plan to process and charge the service with.
1184
1207
  * @public
1185
1208
  * @readonly
1186
- * @type {string}
1209
+ * @type {?string}
1187
1210
  */
1188
- public readonly plan: string;
1211
+ public readonly plan: string | null;
1189
1212
  /**
1190
1213
  * An amount of money or credits in the currency specified by the back-end.
1191
1214
  * @public
@@ -1228,7 +1251,7 @@ declare module OpenEO {
1228
1251
  title: string;
1229
1252
  description: string;
1230
1253
  enabled: boolean;
1231
- configuration: any;
1254
+ configuration: object<string, any>;
1232
1255
  plan: string;
1233
1256
  budget: number;
1234
1257
  }): Promise<Service>;
@@ -1310,7 +1333,7 @@ declare module OpenEO {
1310
1333
  * @param {string} description - A description for the parameter
1311
1334
  * @param {*} defaultValue - An optional default Value for the parameter. If set, make the parameter optional. If not set, the parameter is required. Defaults to `undefined`.
1312
1335
  */
1313
- constructor(name: string, schema?: any | string, description?: string, defaultValue?: any);
1336
+ constructor(name: string, schema?: object<string, any> | string, description?: string, defaultValue?: any);
1314
1337
  name: string;
1315
1338
  spec: {
1316
1339
  name: string;
@@ -1322,7 +1345,7 @@ declare module OpenEO {
1322
1345
  *
1323
1346
  * @returns {object.<string, *>}
1324
1347
  */
1325
- toJSON(): any;
1348
+ toJSON(): object<string, any>;
1326
1349
  /**
1327
1350
  * Returns the reference object for this parameter.
1328
1351
  *
@@ -1378,9 +1401,9 @@ declare module OpenEO {
1378
1401
  /**
1379
1402
  * @type {object.<string, *>}
1380
1403
  */
1381
- tree: any;
1404
+ tree: object<string, any>;
1382
1405
  /**
1383
- * @type {?Builder}
1406
+ * @type {Builder | null}
1384
1407
  */
1385
1408
  builder: Builder | null;
1386
1409
  /**
@@ -1407,7 +1430,7 @@ declare module OpenEO {
1407
1430
  * @returns {object.<string, *>}
1408
1431
  * @throws {Error}
1409
1432
  */
1410
- protected parseTree(tree: any): any;
1433
+ protected parseTree(tree: object<string, any>): object<string, any>;
1411
1434
  /**
1412
1435
  * Gets the reference for a value, e.g. from_node or from_parameter.
1413
1436
  *
@@ -1425,10 +1448,10 @@ declare module OpenEO {
1425
1448
  * @returns {BuilderNode}
1426
1449
  * @throws {Error}
1427
1450
  */
1428
- addOperatorProcess(operator: string, left: number | any, right: number | any): BuilderNode;
1451
+ addOperatorProcess(operator: string, left: number | object<string, any>, right: number | object<string, any>): BuilderNode;
1429
1452
  }
1430
1453
  export namespace Formula {
1431
- const operatorMapping: any;
1454
+ const operatorMapping: object<string, string>;
1432
1455
  }
1433
1456
  /**
1434
1457
  * A class that represents a process node and also a result from a process.
@@ -1443,7 +1466,7 @@ declare module OpenEO {
1443
1466
  * @param {?string} [processDescription=null]
1444
1467
  * @param {?string} [processNamespace=null]
1445
1468
  */
1446
- constructor(parent: Builder, processId: string, processArgs?: any, processDescription?: string | null, processNamespace?: string | null);
1469
+ constructor(parent: Builder, processId: string, processArgs?: object<string, any>, processDescription?: string | null, processNamespace?: string | null);
1447
1470
  /**
1448
1471
  * The parent builder.
1449
1472
  * @type {Builder}
@@ -1469,7 +1492,7 @@ declare module OpenEO {
1469
1492
  * The arguments for the process.
1470
1493
  * @type {object.<string, *>}
1471
1494
  */
1472
- arguments: any;
1495
+ arguments: object<string, any>;
1473
1496
  /**
1474
1497
  * @ignore
1475
1498
  */
@@ -1486,13 +1509,13 @@ declare module OpenEO {
1486
1509
  * @returns {object.<string, *>}
1487
1510
  * @throws {Error}
1488
1511
  */
1489
- namedArguments(processArgs: any[]): any;
1512
+ namedArguments(processArgs: any[]): object<string, any>;
1490
1513
  /**
1491
1514
  * Checks the arguments given for parameters and add them to the process.
1492
1515
  *
1493
1516
  * @param {object.<string, *>|Array} processArgs
1494
1517
  */
1495
- addParametersToProcess(processArgs: any | any[]): void;
1518
+ addParametersToProcess(processArgs: object<string, any> | any[]): void;
1496
1519
  /**
1497
1520
  * Gets/Sets a description for the node.
1498
1521
  *
@@ -1538,13 +1561,13 @@ declare module OpenEO {
1538
1561
  * @returns {object.<string, *>}
1539
1562
  * @throws {Error}
1540
1563
  */
1541
- protected exportCallback(arg: Function, name: string): any;
1564
+ protected exportCallback(arg: Function, name: string): object<string, any>;
1542
1565
  /**
1543
1566
  * Returns a JSON serializable representation of the data that is API compliant.
1544
1567
  *
1545
1568
  * @returns {object.<string, *>}
1546
1569
  */
1547
- toJSON(): any;
1570
+ toJSON(): object<string, any>;
1548
1571
  /**
1549
1572
  * Returns the reference object for this node.
1550
1573
  *
@@ -1661,17 +1684,17 @@ declare module OpenEO {
1661
1684
  public id: string;
1662
1685
  /**
1663
1686
  * The parent builder.
1664
- * @type {?Builder}
1687
+ * @type {Builder | null}
1665
1688
  */
1666
1689
  parent: Builder | null;
1667
1690
  /**
1668
1691
  * The parent node.
1669
- * @type {?BuilderNode}
1692
+ * @type {BuilderNode | null}
1670
1693
  */
1671
1694
  parentNode: BuilderNode | null;
1672
1695
  /**
1673
1696
  * The parent parameter name.
1674
- * @type {?string}
1697
+ * @type {string | null}
1675
1698
  */
1676
1699
  parentParameter: string | null;
1677
1700
  nodes: {};
@@ -1689,7 +1712,7 @@ declare module OpenEO {
1689
1712
  * @param {Process} process
1690
1713
  * @throws {Error}
1691
1714
  */
1692
- createFunction(process: any): void;
1715
+ createFunction(process: Process): void;
1693
1716
  /**
1694
1717
  * Adds a process specification to the builder so that it can be used to create a process graph.
1695
1718
  *
@@ -1728,7 +1751,7 @@ declare module OpenEO {
1728
1751
  * @param {object.<string, *>} parameter - The parameter spec to add, must comply to the API.
1729
1752
  * @param {boolean} [root=true] - Adds the parameter to the root process if set to `true`, otherwise to the process constructed by this builder. Usually you want to add it to the root.
1730
1753
  */
1731
- addParameter(parameter: any, root?: boolean): void;
1754
+ addParameter(parameter: object<string, any>, root?: boolean): void;
1732
1755
  /**
1733
1756
  * Returns the process specification for the given process identifier and namespace (or `null`).
1734
1757
  *
@@ -1764,7 +1787,7 @@ declare module OpenEO {
1764
1787
  * @param {?string} [description=null] - An optional description for the process call.
1765
1788
  * @returns {BuilderNode}
1766
1789
  */
1767
- process(processId: string, args?: any | any[], description?: string | null): BuilderNode;
1790
+ process(processId: string, args?: object<string, any> | any[], description?: string | null): BuilderNode;
1768
1791
  /**
1769
1792
  * Returns a JSON serializable representation of the data that is API compliant.
1770
1793
  *
@@ -1814,37 +1837,30 @@ declare module OpenEO {
1814
1837
  * Auth Provider cache
1815
1838
  *
1816
1839
  * @protected
1817
- * @type {?Array.<AuthProvider>}
1840
+ * @type {Array.<AuthProvider> | null}
1818
1841
  */
1819
1842
  protected authProviderList: Array<AuthProvider> | null;
1820
1843
  /**
1821
1844
  * Current auth provider
1822
1845
  *
1823
1846
  * @protected
1824
- * @type {?AuthProvider}
1847
+ * @type {AuthProvider | null}
1825
1848
  */
1826
1849
  protected authProvider: AuthProvider | null;
1827
1850
  /**
1828
1851
  * Capability cache
1829
1852
  *
1830
1853
  * @protected
1831
- * @type {?Capabilities}
1854
+ * @type {Capabilities | null}
1832
1855
  */
1833
1856
  protected capabilitiesObject: Capabilities | null;
1834
- /**
1835
- * Process cache
1836
- *
1837
- * @protected
1838
- * @type {ProcessRegistry}
1839
- */
1840
- protected processes: any;
1841
1857
  /**
1842
1858
  * Listeners for events.
1843
1859
  *
1844
1860
  * @protected
1845
1861
  * @type {object.<string|Function>}
1846
1862
  */
1847
- protected listeners: any;
1863
+ protected listeners: object<string | Function>;
1848
1864
  /**
1849
1865
  * Additional options for the connection.
1850
1866
  *
@@ -1852,6 +1868,13 @@ declare module OpenEO {
1852
1868
  * @type {Options}
1853
1869
  */
1854
1870
  protected options: Options;
1871
+ /**
1872
+ * Process cache
1873
+ *
1874
+ * @protected
1875
+ * @type {ProcessRegistry}
1876
+ */
1877
+ protected processes: ProcessRegistry;
1855
1878
  /**
1856
1879
  * Initializes the connection by requesting the capabilities.
1857
1880
  *
@@ -1859,7 +1882,7 @@ declare module OpenEO {
1859
1882
  * @protected
1860
1883
  * @returns {Promise<Capabilities>} Capabilities
1861
1884
  */
1862
- init(): Promise<Capabilities>;
1885
+ protected init(): Promise<Capabilities>;
1863
1886
  /**
1864
1887
  * Refresh the cache for processes.
1865
1888
  *
@@ -1867,7 +1890,7 @@ declare module OpenEO {
1867
1890
  * @protected
1868
1891
  * @returns {Promise}
1869
1892
  */
1870
- refreshProcessCache(): Promise;
1893
+ protected refreshProcessCache(): Promise<any>;
1871
1894
  /**
1872
1895
  * Returns the URL of the versioned back-end instance currently connected to.
1873
1896
  *
@@ -1901,7 +1924,7 @@ declare module OpenEO {
1901
1924
  * @returns {Promise<object.<string, ServiceType>>} A response compatible to the API specification.
1902
1925
  * @throws {Error}
1903
1926
  */
1904
- listServiceTypes(): Promise<any>;
1927
+ listServiceTypes(): Promise<object<string, ServiceType>>;
1905
1928
  /**
1906
1929
  * List the supported UDF runtimes.
1907
1930
  *
@@ -1909,7 +1932,7 @@ declare module OpenEO {
1909
1932
  * @returns {Promise<object.<string, UdfRuntime>>} A response compatible to the API specification.
1910
1933
  * @throws {Error}
1911
1934
  */
1912
- listUdfRuntimes(): Promise<any>;
1935
+ listUdfRuntimes(): Promise<object<string, UdfRuntime>>;
1913
1936
  /**
1914
1937
  * List all collections available on the back-end.
1915
1938
  *
@@ -1955,6 +1978,20 @@ declare module OpenEO {
1955
1978
  * @throws {Error}
1956
1979
  */
1957
1980
  listCollectionItems(collectionId: string, spatialExtent?: Array<number> | null, temporalExtent?: Array<any> | null, limit?: number | null): AsyncGenerator<any, void, unknown>;
1981
+ /**
1982
+ * Normalisation of the namespace to a value that is compatible with the OpenEO specs - EXPERIMENTAL.
1983
+ *
1984
+ * This is required to support UDP that are shared as public. These can only be executed with providing the full URL
1985
+ * (e.g. https://<backend>/processes/<namespace>/<process_id>) as the namespace value in the processing graph. For other
1986
+ * parts of the API (such as the listing of the processes, only the name of the namespace is required.
1987
+ *
1988
+ * This function will extract the short name of the namespace from a shareable URL.
1989
+ *
1990
+ * @protected
1991
+ * @param {?string} namespace - Namespace of the process
1992
+ * @returns {?string}
1993
+ */
1994
+ protected normalizeNamespace(namespace: string | null): string | null;
1958
1995
  /**
1959
1996
  * List processes available on the back-end.
1960
1997
  *
@@ -2122,15 +2159,16 @@ declare module OpenEO {
2122
2159
  * Lists all files from the user workspace.
2123
2160
  *
2124
2161
  * @async
2125
- * @returns {Promise<Array.<UserFile>>} A list of files.
2162
+ * @returns {Promise<ResponseArray.<UserFile>>} A list of files.
2126
2163
  * @throws {Error}
2127
2164
  */
2128
- listFiles(): Promise<Array<UserFile>>;
2165
+ listFiles(): Promise<ResponseArray<UserFile>>;
2129
2166
  /**
2130
2167
  * A callback that is executed on upload progress updates.
2131
2168
  *
2132
2169
  * @callback uploadStatusCallback
2133
2170
  * @param {number} percentCompleted - The percent (0-100) completed.
2171
+ * @param {UserFile} file - The file object corresponding to the callback.
2134
2172
  */
2135
2173
  /**
2136
2174
  * Uploads a file to the user workspace.
@@ -2144,7 +2182,7 @@ declare module OpenEO {
2144
2182
  * @param {*} source - The source, see method description for details.
2145
2183
  * @param {?string} [targetPath=null] - The target path on the server, relative to the user workspace. Defaults to the file name of the source file.
2146
2184
  * @param {?uploadStatusCallback} [statusCallback=null] - Optionally, a callback that is executed on upload progress updates.
2147
- * @param {?AbortController} [abortController=null] - An AbortController object that can be used to cancel the processing request.
2185
+ * @param {?AbortController} [abortController=null] - An AbortController object that can be used to cancel the upload process.
2148
2186
  * @returns {Promise<UserFile>}
2149
2187
  * @throws {Error}
2150
2188
  */
@@ -2167,7 +2205,7 @@ declare module OpenEO {
2167
2205
  * @returns {object.<string, *>}
2168
2206
  * @protected
2169
2207
  */
2170
- protected _normalizeUserProcess(process: UserProcess | BuilderNode | any, additional?: any): any;
2208
+ protected _normalizeUserProcess(process: UserProcess | BuilderNode | object<string, any>, additional?: object<string, any>): object<string, any>;
2171
2209
  /**
2172
2210
  * Validates a user-defined process at the back-end.
2173
2211
  *
@@ -2181,10 +2219,11 @@ declare module OpenEO {
2181
2219
  * Lists all user-defined processes of the authenticated user.
2182
2220
  *
2183
2221
  * @async
2184
- * @returns {Promise<Array.<UserProcess>>} A list of user-defined processes.
2222
+ * @param {Array.<UserProcess>} [oldProcesses=[]] - A list of existing user-defined processes to update.
2223
+ * @returns {Promise<ResponseArray.<UserProcess>>} A list of user-defined processes.
2185
2224
  * @throws {Error}
2186
2225
  */
2187
- listUserProcesses(): Promise<Array<UserProcess>>;
2226
+ listUserProcesses(oldProcesses?: Array<UserProcess>): Promise<ResponseArray<UserProcess>>;
2188
2227
  /**
2189
2228
  * Creates a new stored user-defined process at the back-end.
2190
2229
  *
@@ -2239,10 +2278,11 @@ declare module OpenEO {
2239
2278
  * Lists all batch jobs of the authenticated user.
2240
2279
  *
2241
2280
  * @async
2242
- * @returns {Promise<Array.<Job>>} A list of jobs.
2281
+ * @param {Array.<Job>} [oldJobs=[]] - A list of existing jobs to update.
2282
+ * @returns {Promise<ResponseArray.<Job>>} A list of jobs.
2243
2283
  * @throws {Error}
2244
2284
  */
2245
- listJobs(): Promise<Array<Job>>;
2285
+ listJobs(oldJobs?: Array<Job>): Promise<ResponseArray<Job>>;
2246
2286
  /**
2247
2287
  * Creates a new batch job at the back-end.
2248
2288
  *
@@ -2256,7 +2296,7 @@ declare module OpenEO {
2256
2296
  * @returns {Promise<Job>} The stored batch job.
2257
2297
  * @throws {Error}
2258
2298
  */
2259
- createJob(process: Process, title?: string | null, description?: string | null, plan?: string | null, budget?: number | null, additional?: any): Promise<Job>;
2299
+ createJob(process: Process, title?: string | null, description?: string | null, plan?: string | null, budget?: number | null, additional?: object<string, any>): Promise<Job>;
2260
2300
  /**
2261
2301
  * Get all information about a batch job.
2262
2302
  *
@@ -2270,10 +2310,11 @@ declare module OpenEO {
2270
2310
  * Lists all secondary web services of the authenticated user.
2271
2311
  *
2272
2312
  * @async
2273
- * @returns {Promise<Array.<Job>>} A list of services.
2313
+ * @param {Array.<Service>} [oldServices=[]] - A list of existing services to update.
2314
+ * @returns {Promise<ResponseArray.<Job>>} A list of services.
2274
2315
  * @throws {Error}
2275
2316
  */
2276
- listServices(): Promise<Array<Job>>;
2317
+ listServices(oldServices?: Array<Service>): Promise<ResponseArray<Job>>;
2277
2318
  /**
2278
2319
  * Creates a new secondary web service at the back-end.
2279
2320
  *
@@ -2290,7 +2331,7 @@ declare module OpenEO {
2290
2331
  * @returns {Promise<Service>} The stored service.
2291
2332
  * @throws {Error}
2292
2333
  */
2293
- createService(process: Process, type: string, title?: string | null, description?: string | null, enabled?: boolean, configuration?: any, plan?: string | null, budget?: number | null, additional?: any): Promise<Service>;
2334
+ createService(process: Process, type: string, title?: string | null, description?: string | null, enabled?: boolean, configuration?: any, plan?: string | null, budget?: number | null, additional?: object<string, any>): Promise<Service>;
2294
2335
  /**
2295
2336
  * Get all information about a secondary web service.
2296
2337
  *
@@ -2300,18 +2341,31 @@ declare module OpenEO {
2300
2341
  * @throws {Error}
2301
2342
  */
2302
2343
  getService(id: string): Promise<Service>;
2344
+ /**
2345
+ * Adds additional response details to the array.
2346
+ *
2347
+ * Adds links and federation:missing.
2348
+ *
2349
+ * @protected
2350
+ * @param {Array} arr
2351
+ * @param {object.<string, *>} response
2352
+ * @returns {ResponseArray}
2353
+ */
2354
+ protected _toResponseArray(arr: any[], response: object<string, any>): any;
2303
2355
  /**
2304
2356
  * Get the a link with the given rel type.
2305
2357
  *
2358
+ * @protected
2306
2359
  * @param {Array.<Link>} links - An array of links.
2307
2360
  * @param {string} rel - Relation type to find, defaults to `next`.
2308
2361
  * @returns {string | null}
2309
2362
  * @throws {Error}
2310
2363
  */
2311
- _getLinkHref(links: Array<Link>, rel?: string): string | null;
2364
+ protected _getLinkHref(links: Array<Link>, rel?: string): string | null;
2312
2365
  /**
2313
2366
  * Sends a GET request.
2314
2367
  *
2368
+ * @protected
2315
2369
  * @async
2316
2370
  * @param {string} path
2317
2371
  * @param {object.<string, *>} query
@@ -2320,10 +2374,11 @@ declare module OpenEO {
2320
2374
  * @throws {Error}
2321
2375
  * @see https://github.com/axios/axios#request-config
2322
2376
  */
2323
- _get(path: string, query: any, responseType: string): Promise<AxiosResponse>;
2377
+ protected _get(path: string, query: object<string, any>, responseType: string): Promise<AxiosResponse>;
2324
2378
  /**
2325
2379
  * Sends a POST request.
2326
2380
  *
2381
+ * @protected
2327
2382
  * @async
2328
2383
  * @param {string} path
2329
2384
  * @param {*} body
@@ -2333,36 +2388,39 @@ declare module OpenEO {
2333
2388
  * @throws {Error}
2334
2389
  * @see https://github.com/axios/axios#request-config
2335
2390
  */
2336
- _post(path: string, body: any, responseType: string, abortController?: AbortController | null): Promise<AxiosResponse>;
2391
+ protected _post(path: string, body: any, responseType: string, abortController?: AbortController | null): Promise<AxiosResponse>;
2337
2392
  /**
2338
2393
  * Sends a PUT request.
2339
2394
  *
2395
+ * @protected
2340
2396
  * @async
2341
2397
  * @param {string} path
2342
2398
  * @param {*} body
2343
2399
  * @returns {Promise<AxiosResponse>}
2344
2400
  * @throws {Error}
2345
2401
  */
2346
- _put(path: string, body: any): Promise<AxiosResponse>;
2402
+ protected _put(path: string, body: any): Promise<AxiosResponse>;
2347
2403
  /**
2348
2404
  * Sends a PATCH request.
2349
2405
  *
2406
+ * @protected
2350
2407
  * @async
2351
2408
  * @param {string} path
2352
2409
  * @param {*} body
2353
2410
  * @returns {Promise<AxiosResponse>}
2354
2411
  * @throws {Error}
2355
2412
  */
2356
- _patch(path: string, body: any): Promise<AxiosResponse>;
2413
+ protected _patch(path: string, body: any): Promise<AxiosResponse>;
2357
2414
  /**
2358
2415
  * Sends a DELETE request.
2359
2416
  *
2417
+ * @protected
2360
2418
  * @async
2361
2419
  * @param {string} path
2362
2420
  * @returns {Promise<AxiosResponse>}
2363
2421
  * @throws {Error}
2364
2422
  */
2365
- _delete(path: string): Promise<AxiosResponse>;
2423
+ protected _delete(path: string): Promise<AxiosResponse>;
2366
2424
  /**
2367
2425
  * Downloads data from a URL.
2368
2426
  *
@@ -2386,6 +2444,7 @@ declare module OpenEO {
2386
2444
  * Tries to smoothly handle error responses by providing an object for all response types,
2387
2445
  * instead of Streams or Blobs for non-JSON response types.
2388
2446
  *
2447
+ * @protected
2389
2448
  * @async
2390
2449
  * @param {object.<string, *>} options
2391
2450
  * @param {?AbortController} [abortController=null] - An AbortController object that can be used to cancel the request.
@@ -2393,7 +2452,7 @@ declare module OpenEO {
2393
2452
  * @throws {Error}
2394
2453
  * @see https://github.com/axios/axios
2395
2454
  */
2396
- _send(options: any, abortController?: AbortController | null): Promise<AxiosResponse>;
2455
+ protected _send(options: object<string, any>, abortController?: AbortController | null): Promise<AxiosResponse>;
2397
2456
  }
2398
2457
  namespace Connection {
2399
2458
  export { oidcProviderFactoryFunction, uploadStatusCallback };
@@ -2489,7 +2548,7 @@ declare module OpenEO {
2489
2548
  status: number;
2490
2549
  statusText: string;
2491
2550
  headers: any;
2492
- config: any;
2551
+ config: object<string, any>;
2493
2552
  request: any;
2494
2553
  };
2495
2554
  export type BillingPlan = {
@@ -2518,22 +2577,22 @@ declare module OpenEO {
2518
2577
  collections: Array<Collection>;
2519
2578
  links: Array<Link>;
2520
2579
  };
2521
- export type Collection = any;
2580
+ export type Collection = object<string, any>;
2522
2581
  export type FileTypesAPI = {
2523
2582
  /**
2524
2583
  * - File types supported to import
2525
2584
  */
2526
- input: any;
2585
+ input: object<string, FileType>;
2527
2586
  /**
2528
2587
  * - File types supported to export
2529
2588
  */
2530
- output: any;
2589
+ output: object<string, FileType>;
2531
2590
  };
2532
2591
  export type FileType = {
2533
2592
  title: string;
2534
2593
  description: string;
2535
2594
  gis_data_types: Array<string>;
2536
- parameters: any;
2595
+ parameters: object<string, any>;
2537
2596
  links: Array<Link>;
2538
2597
  };
2539
2598
  /**
@@ -2554,7 +2613,7 @@ declare module OpenEO {
2554
2613
  */
2555
2614
  from_parameter: string;
2556
2615
  };
2557
- export type Item = any;
2616
+ export type Item = object<string, any>;
2558
2617
  export type ItemCollection = {
2559
2618
  /**
2560
2619
  * - The items in the collection.
@@ -2628,7 +2687,7 @@ declare module OpenEO {
2628
2687
  level: string;
2629
2688
  message: string;
2630
2689
  data: any;
2631
- path: Array<any>;
2690
+ path: Array<object<string, string>>;
2632
2691
  links: Array<Link>;
2633
2692
  };
2634
2693
  /**
@@ -2701,13 +2760,19 @@ declare module OpenEO {
2701
2760
  /**
2702
2761
  * An openEO processing chain.
2703
2762
  */
2704
- export type Process = any;
2705
- export type ServiceType = any;
2763
+ export type Process = object<string, any>;
2764
+ /**
2765
+ * An array, but enriched with additional details from an openEO API response.
2766
+ *
2767
+ * Adds two properties: `links` and `federation:missing`.
2768
+ */
2769
+ export type ResponseArray = Array;
2770
+ export type ServiceType = object<string, any>;
2706
2771
  export type SyncResult = {
2707
2772
  /**
2708
2773
  * The data as `Stream` in NodeJS environments or as `Blob` in browsers.
2709
2774
  */
2710
- data: any | Blob;
2775
+ data: Readable | Blob;
2711
2776
  /**
2712
2777
  * The costs for the request in the currency exposed by the back-end.
2713
2778
  */
@@ -2721,7 +2786,7 @@ declare module OpenEO {
2721
2786
  */
2722
2787
  logs: Array<Log>;
2723
2788
  };
2724
- export type UdfRuntime = any;
2789
+ export type UdfRuntime = object<string, any>;
2725
2790
  export type UserAccountStorage = {
2726
2791
  /**
2727
2792
  * in bytes as integer
@@ -2735,7 +2800,7 @@ declare module OpenEO {
2735
2800
  export type UserAccount = {
2736
2801
  user_id: string;
2737
2802
  name: string | null;
2738
- default_plan: string | null;
2803
+ default_plan: string | null;
2739
2804
  storage: UserAccountStorage | null;
2740
2805
  budget: number | null;
2741
2806
  links: Array<Link> | null;