@@ -2020,12 +2020,25 @@ declare module OpenEO {
2020
2020
* List all collections available on the back-end.
2021
2021
*
2022
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.
2023
2024
*
2024
2025
* @async
2025
2026
* @returns {Promise<Collections> } A response compatible to the API specification.
2026
2027
* @throws {Error }
2027
2028
*/
2028
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 > ;
2029
2042
/**
2030
2043
* Get further information about a single collection.
2031
2044
*
@@ -2039,12 +2052,11 @@ declare module OpenEO {
2039
2052
describeCollection ( collectionId : string ) : Promise < Collection > ;
2040
2053
/**
2041
2054
* Loads items for a specific image collection.
2055
+ *
2042
2056
* May not be available for all collections.
2043
2057
*
2044
2058
* The items returned always comply to the latest STAC version (currently 1.0.0).
2045
2059
*
2046
- * This is an experimental API and is subject to change.
2047
- *
2048
2060
* @async
2049
2061
* @param {string } collectionId - Collection ID to request items for.
2050
2062
* @param {?Array.<number> } [spatialExtent=null] - Limits the items to the given bounding box in WGS84:
@@ -2076,20 +2088,40 @@ declare module OpenEO {
2076
2088
*/
2077
2089
protected normalizeNamespace ( namespace : string | null ) : string | null ;
2078
2090
/**
2079
- * List processes available on the back-end.
2091
+ * List all processes available on the back-end.
2080
2092
*
2081
2093
* Requests pre-defined processes by default.
2082
2094
* Set the namespace parameter to request processes from a specific namespace.
2083
2095
*
2084
2096
* Note: The list of namespaces can be retrieved by calling `listProcesses` without a namespace given.
2085
2097
* The namespaces are then listed in the property `namespaces`.
2086
2098
*
2099
+ * This function adds a self link to the response if not present.
2100
+ *
2087
2101
* @async
2088
2102
* @param {?string } [namespace=null] - Namespace of the processes (default to `null`, i.e. pre-defined processes). EXPERIMENTAL!
2089
2103
* @returns {Promise<Processes> } - A response compatible to the API specification.
2090
2104
* @throws {Error }
2091
2105
*/
2092
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 > ;
2093
2125
/**
2094
2126
* Get information about a single process.
2095
2127
*
@@ -2239,13 +2271,22 @@ declare module OpenEO {
2239
2271
*/
2240
2272
describeAccount ( ) : Promise < UserAccount > ;
2241
2273
/**
2242
- * Lists all files from the user workspace.
2274
+ * List all files from the user workspace.
2243
2275
*
2244
2276
* @async
2245
2277
* @returns {Promise<ResponseArray.<UserFile>> } A list of files.
2246
2278
* @throws {Error }
2247
2279
*/
2248
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 > ;
2249
2290
/**
2250
2291
* A callback that is executed on upload progress updates.
2251
2292
*
@@ -2299,14 +2340,24 @@ declare module OpenEO {
2299
2340
*/
2300
2341
validateProcess ( process : Process ) : Promise < ValidationResult > ;
2301
2342
/**
2302
- * Lists all user-defined processes of the authenticated user.
2343
+ * List all user-defined processes of the authenticated user.
2303
2344
*
2304
2345
* @async
2305
2346
* @param {Array.<UserProcess> } [oldProcesses=[]] - A list of existing user-defined processes to update.
2306
2347
* @returns {Promise<ResponseArray.<UserProcess>> } A list of user-defined processes.
2307
2348
* @throws {Error }
2308
2349
*/
2309
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 > ;
2310
2361
/**
2311
2362
* Creates a new stored user-defined process at the back-end.
2312
2363
*
@@ -2359,14 +2410,24 @@ declare module OpenEO {
2359
2410
*/
2360
2411
downloadResult ( process : Process , targetPath : string , plan ?: string | null , budget ?: number | null , abortController ?: AbortController | null ) : Promise < void > ;
2361
2412
/**
2362
- * Lists all batch jobs of the authenticated user.
2413
+ * List all batch jobs of the authenticated user.
2363
2414
*
2364
2415
* @async
2365
2416
* @param {Array.<Job> } [oldJobs=[]] - A list of existing jobs to update.
2366
2417
* @returns {Promise<ResponseArray.<Job>> } A list of jobs.
2367
2418
* @throws {Error }
2368
2419
*/
2369
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 > ;
2370
2431
/**
2371
2432
* Creates a new batch job at the back-end.
2372
2433
*
@@ -2391,14 +2452,24 @@ declare module OpenEO {
2391
2452
*/
2392
2453
getJob ( id : string ) : Promise < Job > ;
2393
2454
/**
2394
- * Lists all secondary web services of the authenticated user.
2455
+ * List all secondary web services of the authenticated user.
2395
2456
*
2396
2457
* @async
2397
2458
* @param {Array.<Service> } [oldServices=[]] - A list of existing services to update.
2398
2459
* @returns {Promise<ResponseArray.<Job>> } A list of services.
2399
2460
* @throws {Error }
2400
2461
*/
2401
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 > ;
2402
2473
/**
2403
2474
* Creates a new secondary web service at the back-end.
2404
2475
*
@@ -2433,9 +2504,10 @@ declare module OpenEO {
2433
2504
* @protected
2434
2505
* @param {Array.<*> } arr
2435
2506
* @param {object.<string, *> } response
2507
+ * @param {string } selfUrl
2436
2508
* @returns {ResponseArray }
2437
2509
*/
2438
- protected _toResponseArray ( arr : Array < any > , response : object < string , any > ) : ResponseArray ;
2510
+ protected _toResponseArray ( arr : Array < any > , response : object < string , any > , selfUrl : string ) : ResponseArray ;
2439
2511
/**
2440
2512
* Get the a link with the given rel type.
2441
2513
*
@@ -2446,6 +2518,22 @@ declare module OpenEO {
2446
2518
* @throws {Error }
2447
2519
*/
2448
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 ;
2449
2537
/**
2450
2538
* Makes all links in the list absolute.
2451
2539
*
@@ -2909,7 +2997,7 @@ declare module OpenEO {
2909
2997
/**
2910
2998
* An array, but enriched with additional details from an openEO API response.
2911
2999
*
2912
- * Adds two properties: `links` and `federation:missing`.
3000
+ * Adds three properties: `url`, `links` and `federation:missing`.
2913
3001
*/
2914
3002
export type ResponseArray = any ;
2915
3003
export type ServiceType = object < string , any > ;
0 commit comments