@openeo/js-client 2.0.1 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -3
- package/openeo.d.ts +198 -72
- package/openeo.js +5111 -7402
- package/openeo.min.js +1 -1
- package/package.json +8 -7
- package/src/authprovider.js +1 -1
- package/src/baseentity.js +3 -1
- package/src/builder/builder.js +79 -51
- package/src/builder/formula.js +1 -0
- package/src/builder/node.js +13 -4
- package/src/builder/parameter.js +2 -3
- package/src/builder/tapdigit.js +11 -3
- package/src/capabilities.js +1 -1
- package/src/connection.js +171 -42
- package/src/filetypes.js +3 -3
- package/src/job.js +3 -0
- package/src/oidcprovider.js +5 -5
- package/src/openeo.js +14 -7
- package/src/typedefs.js +13 -3
- package/src/userfile.js +3 -2
- package/src/userprocess.js +9 -1
- package/CHANGELOG.md +0 -125
package/src/userprocess.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const BaseEntity = require('./baseentity');
|
|
2
|
+
const Utils = require('@openeo/js-commons/src/utils');
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* A Stored Process Graph.
|
|
@@ -120,6 +121,10 @@ class UserProcess extends BaseEntity {
|
|
|
120
121
|
*/
|
|
121
122
|
async describeUserProcess() {
|
|
122
123
|
let response = await this.connection._get('/process_graphs/' + this.id);
|
|
124
|
+
if (!Utils.isObject(response.data) || typeof response.data.id !== 'string') {
|
|
125
|
+
throw new Error('Invalid response received for user process');
|
|
126
|
+
}
|
|
127
|
+
this.connection.processes.add(response.data, 'user');
|
|
123
128
|
return this.setAll(response.data);
|
|
124
129
|
}
|
|
125
130
|
|
|
@@ -140,7 +145,9 @@ class UserProcess extends BaseEntity {
|
|
|
140
145
|
return this.describeUserProcess();
|
|
141
146
|
}
|
|
142
147
|
else {
|
|
143
|
-
|
|
148
|
+
let obj = this.setAll(parameters);
|
|
149
|
+
this.connection.processes.add(obj.toJSON(), 'user');
|
|
150
|
+
return obj;
|
|
144
151
|
}
|
|
145
152
|
}
|
|
146
153
|
|
|
@@ -152,6 +159,7 @@ class UserProcess extends BaseEntity {
|
|
|
152
159
|
*/
|
|
153
160
|
async deleteUserProcess() {
|
|
154
161
|
await this.connection._delete('/process_graphs/' + this.id);
|
|
162
|
+
this.connection.processes.remove(this.id, 'user');
|
|
155
163
|
}
|
|
156
164
|
}
|
|
157
165
|
|
package/CHANGELOG.md
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
All notable changes to this project will be documented in this file.
|
|
3
|
-
|
|
4
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
5
|
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
|
-
|
|
7
|
-
## [Unreleased]
|
|
8
|
-
|
|
9
|
-
## [2.0.1] - 2021-07-14
|
|
10
|
-
|
|
11
|
-
### Fixed
|
|
12
|
-
|
|
13
|
-
- `Formula`: Formulas can reference more then just the first parameter by adding additional `$` at the beginning, e.g. `$$0` to access the first element of an array in the second parameter.
|
|
14
|
-
|
|
15
|
-
## [2.0.0] - 2021-07-06
|
|
16
|
-
|
|
17
|
-
### Added
|
|
18
|
-
|
|
19
|
-
- Added events to `Connection` to populate changes for Auth Tokens (`tokenChanged`) and Auth Providers (`authProviderChanged`).
|
|
20
|
-
- Added new methods to `Connection` for working with events: `on`, `off` and `emit`.
|
|
21
|
-
|
|
22
|
-
### Changed
|
|
23
|
-
|
|
24
|
-
- OpenID Connect authentication has been rewritten.
|
|
25
|
-
- Default grant type for OpenID Connect is "AuthCode w/ PKCE" instead of "Implicit".
|
|
26
|
-
- Support for OpenID Connect session renewal via refresh tokens.
|
|
27
|
-
- Updated STAC support to STAC v1.0.0.
|
|
28
|
-
|
|
29
|
-
### Removed
|
|
30
|
-
|
|
31
|
-
- `OidcProvider`: Methods `getGrant`, `getScopes`, `getIssuer` and `getUser` removed. Use the properties `grant`, `scopes`, `issuer` and `user` instead.
|
|
32
|
-
- Removed deprecated method `getResultsAsItem` in favor of `getResultsAsStac`.
|
|
33
|
-
|
|
34
|
-
## [1.3.2] - 2021-05-27
|
|
35
|
-
|
|
36
|
-
### Fixed
|
|
37
|
-
|
|
38
|
-
- Fixed error handling for HTTP requests
|
|
39
|
-
|
|
40
|
-
## [1.3.1] - 2021-04-29
|
|
41
|
-
|
|
42
|
-
### Fixed
|
|
43
|
-
|
|
44
|
-
- Invalid dependency version for @openeo/js-commons
|
|
45
|
-
|
|
46
|
-
## [1.3.0] - 2021-04-29
|
|
47
|
-
|
|
48
|
-
### Added
|
|
49
|
-
|
|
50
|
-
- Custom process specifications can be added to the process builder after first initialization.
|
|
51
|
-
- The process builder supports implicitly wrapping:
|
|
52
|
-
- an array returned from a callback using the `array_create` process.
|
|
53
|
-
- non-objects (e.g. numbers) returned from a callback using the `constant` process.
|
|
54
|
-
- Support for "Default OpenID Connect Clients" (detecting default client IDs).
|
|
55
|
-
|
|
56
|
-
### Fixed
|
|
57
|
-
|
|
58
|
-
- Arrow functions can be used as callbacks in process graph building.
|
|
59
|
-
|
|
60
|
-
## [1.2.0] - 2021-03-11
|
|
61
|
-
|
|
62
|
-
### Added
|
|
63
|
-
|
|
64
|
-
- Added new method `listCollectionItems` for searching and retrieving Items from `GET /collections/{collectionId}/items`.
|
|
65
|
-
|
|
66
|
-
### Changed
|
|
67
|
-
|
|
68
|
-
- Methods returning STAC (e.g. `listCollections`, `describeCollection`, `getResultAsStac`, `listCollectionItems`) always return the data compliant to the latest STAC version (currently 1.0.0-rc.1).
|
|
69
|
-
|
|
70
|
-
## [1.1.0] - 2021-02-18
|
|
71
|
-
|
|
72
|
-
### Added
|
|
73
|
-
|
|
74
|
-
- Added new method `getResultsAsStac` for Jobs, which includes support for STAC Collections returned by the API for batch job results.
|
|
75
|
-
|
|
76
|
-
### Deprecated
|
|
77
|
-
|
|
78
|
-
- Deprecated method `getResultsAsItem` in favor of `getResultsAsStac`.
|
|
79
|
-
|
|
80
|
-
### Fixed
|
|
81
|
-
|
|
82
|
-
- TypeScript declaration for Links has been fixed
|
|
83
|
-
- Updated dependencies
|
|
84
|
-
|
|
85
|
-
## [1.0.3] - 2021-02-02
|
|
86
|
-
|
|
87
|
-
### Fixed
|
|
88
|
-
|
|
89
|
-
- Updated axios dependency to fix a vulnerability.
|
|
90
|
-
- Updated oidc-client dependency to support the OpenID Connect flow *AuthCode with PKCE*. Default is still the Implicit Flow.
|
|
91
|
-
|
|
92
|
-
## [1.0.2] - 2020-12-02
|
|
93
|
-
|
|
94
|
-
### Changed
|
|
95
|
-
- Make client more flexible to allow setting the client to use OIDC Authentication Code Flow with PKCE instead of Implicit Flow in the future
|
|
96
|
-
|
|
97
|
-
### Fixed
|
|
98
|
-
- Client doesn't throw errors on back-ends with version numbers >= 1.0.1
|
|
99
|
-
|
|
100
|
-
## [1.0.1] - 2020-11-19
|
|
101
|
-
|
|
102
|
-
### Fixed
|
|
103
|
-
- Don't set unnecessary `withCredentials` option on HTTP requests for better CORS support. [openeo-api#41](https://github.com/Open-EO/openeo-api/issues/41)
|
|
104
|
-
|
|
105
|
-
## [1.0.0] - 2020-11-17
|
|
106
|
-
|
|
107
|
-
### Fixed
|
|
108
|
-
- Throw better error message in case openeo-identifier can't be retrieved. [#37](https://github.com/Open-EO/openeo-js-client/issues/37)
|
|
109
|
-
|
|
110
|
-
## Prior releases
|
|
111
|
-
|
|
112
|
-
All prior releases have been documented in the [GitHub Releases](https://github.com/Open-EO/openeo-js-client/releases).
|
|
113
|
-
|
|
114
|
-
[Unreleased]: https://github.com/Open-EO/openeo-js-client/compare/v2.0.1...HEAD
|
|
115
|
-
[2.0.1]: https://github.com/Open-EO/openeo-js-client/compare/v2.0.0...v2.0.1
|
|
116
|
-
[2.0.0]: https://github.com/Open-EO/openeo-js-client/compare/v1.3.2...v2.0.0
|
|
117
|
-
[1.3.2]: https://github.com/Open-EO/openeo-js-client/compare/v1.3.1...v1.3.2
|
|
118
|
-
[1.3.1]: https://github.com/Open-EO/openeo-js-client/compare/v1.3.0...v1.3.1
|
|
119
|
-
[1.3.0]: https://github.com/Open-EO/openeo-js-client/compare/v1.2.0...v1.3.0
|
|
120
|
-
[1.2.0]: https://github.com/Open-EO/openeo-js-client/compare/v1.1.0...v1.2.0
|
|
121
|
-
[1.1.0]: https://github.com/Open-EO/openeo-js-client/compare/v1.0.3...v1.1.0
|
|
122
|
-
[1.0.3]: https://github.com/Open-EO/openeo-js-client/compare/v1.0.2...v1.0.3
|
|
123
|
-
[1.0.2]: https://github.com/Open-EO/openeo-js-client/compare/v1.0.1...v1.0.2
|
|
124
|
-
[1.0.1]: https://github.com/Open-EO/openeo-js-client/compare/v1.0.0...v1.0.1
|
|
125
|
-
[1.0.0]: https://github.com/Open-EO/openeo-js-client/compare/v1.0.0-rc.5...v1.0.0
|