@extrahorizon/javascript-sdk 8.12.1 → 8.13.0-dev-184-9d8c16c
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/CHANGELOG.md +15 -0
- package/build/index.cjs.js +1 -1
- package/build/index.mjs +1 -1
- package/build/services/auth/oauth1/types.d.ts +17 -3
- package/build/services/auth/oauth2/types.d.ts +36 -11
- package/build/services/auth/users/types.d.ts +8 -2
- package/build/types/services/auth/oauth1/types.d.ts +17 -3
- package/build/types/services/auth/oauth2/types.d.ts +36 -11
- package/build/types/services/auth/users/types.d.ts +8 -2
- package/build/types/version.d.ts +1 -1
- package/build/version.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [8.13.0]
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- The following methods are now correctly typed
|
|
12
|
+
- `exh.auth.oauth1.consumeSsoToken`
|
|
13
|
+
- `exh.auth.oauth2.createAuthorization`
|
|
14
|
+
- `exh.auth.oauth2.getAuthorizations`
|
|
15
|
+
|
|
16
|
+
### Deprecated
|
|
17
|
+
- The following fields will be removed from responses returned by listing endpoints in a future version:
|
|
18
|
+
- The `exh.auth.oauth1.find*` methods deprecate the `tokenSecret` field
|
|
19
|
+
- The `exh.auth.oauth2.find*` methods deprecate the `accessToken` field
|
|
20
|
+
- The `exh.auth.oauth2.getAuthorizations` method deprecates the `codeChallenge` and `authorizationCode` fields
|
|
21
|
+
- The `exh.auth.users.getMfaSetting` method deprecates the TOTP `secret` and recovery codes `codes` fields
|
|
22
|
+
|
|
8
23
|
## [8.12.1]
|
|
9
24
|
|
|
10
25
|
### Fixed
|
package/build/index.cjs.js
CHANGED
package/build/index.mjs
CHANGED
|
@@ -20,7 +20,7 @@ export interface AuthOauth1Service {
|
|
|
20
20
|
* @throws {ApplicationNotAuthenticatedError}
|
|
21
21
|
* @throws {ResourceUnknownError}
|
|
22
22
|
*/
|
|
23
|
-
consumeSsoToken(ssoToken: string): Promise<
|
|
23
|
+
consumeSsoToken(ssoToken: string): Promise<ConsumeSSOTokenResponse>;
|
|
24
24
|
/**
|
|
25
25
|
* @deprecated Use `exh.auth.oauth1.tokens.find` instead
|
|
26
26
|
*
|
|
@@ -100,12 +100,26 @@ export interface SsoToken {
|
|
|
100
100
|
creationTimestamp: Date;
|
|
101
101
|
updateTimestamp: Date;
|
|
102
102
|
}
|
|
103
|
-
export interface
|
|
103
|
+
export interface ConsumeSSOTokenResponse {
|
|
104
104
|
id: string;
|
|
105
|
-
userId: string;
|
|
106
105
|
applicationId: string;
|
|
106
|
+
userId: string;
|
|
107
107
|
token: string;
|
|
108
108
|
tokenSecret: string;
|
|
109
|
+
updateTimestamp: Date;
|
|
110
|
+
lastUsedTimestamp: Date;
|
|
111
|
+
creationTimestamp: Date;
|
|
112
|
+
}
|
|
113
|
+
export interface OAuth1Token {
|
|
114
|
+
id: string;
|
|
115
|
+
applicationId: string;
|
|
116
|
+
userId: string;
|
|
117
|
+
token: string;
|
|
118
|
+
/**
|
|
119
|
+
* @deprecated `tokenSecret` will be removed from responses returned by listing endpoints in a future version.
|
|
120
|
+
*/
|
|
121
|
+
tokenSecret?: string;
|
|
122
|
+
updateTimestamp: Date;
|
|
109
123
|
lastUsedTimestamp: Date;
|
|
110
124
|
creationTimestamp: Date;
|
|
111
125
|
}
|
|
@@ -12,7 +12,7 @@ export interface AuthOauth2Service {
|
|
|
12
12
|
* @throws {CallbackNotValidError}
|
|
13
13
|
* @throws {UnsupportedResponseTypeError}
|
|
14
14
|
*/
|
|
15
|
-
createAuthorization(data: OAuth2AuthorizationCreation, options?: OptionsBase): Promise<
|
|
15
|
+
createAuthorization(data: OAuth2AuthorizationCreation, options?: OptionsBase): Promise<OAuth2AuthorizationCreationResponse>;
|
|
16
16
|
/**
|
|
17
17
|
* Get a list of OAuth2 Authorizations
|
|
18
18
|
*
|
|
@@ -82,27 +82,52 @@ export interface AuthOauth2TokenService {
|
|
|
82
82
|
export interface OAuth2AuthorizationCreation {
|
|
83
83
|
responseType: string;
|
|
84
84
|
clientId: string;
|
|
85
|
+
redirectUri?: string;
|
|
86
|
+
state?: string;
|
|
87
|
+
codeChallengeMethod?: string;
|
|
88
|
+
codeChallenge?: string;
|
|
89
|
+
}
|
|
90
|
+
export interface OAuth2AuthorizationCreationResponse {
|
|
91
|
+
id: string;
|
|
92
|
+
clientId: string;
|
|
93
|
+
userId: string;
|
|
85
94
|
redirectUri: string;
|
|
86
|
-
state
|
|
87
|
-
|
|
95
|
+
state?: string;
|
|
96
|
+
codeChallengeMethod?: string;
|
|
97
|
+
codeChallenge?: string;
|
|
98
|
+
authorizationCode: string;
|
|
99
|
+
expiryTimestamp: Date;
|
|
100
|
+
updateTimestamp: Date;
|
|
101
|
+
creationTimestamp: Date;
|
|
88
102
|
}
|
|
89
103
|
export interface OAuth2Authorization {
|
|
90
104
|
id: string;
|
|
91
|
-
userId: string;
|
|
92
105
|
clientId: string;
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
|
|
106
|
+
userId: string;
|
|
107
|
+
redirectUri: string;
|
|
108
|
+
state?: string;
|
|
109
|
+
codeChallengeMethod?: string;
|
|
110
|
+
/**
|
|
111
|
+
@deprecated `codeChallenge` will be removed from responses returned by listing endpoints in a future version.
|
|
112
|
+
*/
|
|
113
|
+
codeChallenge?: string;
|
|
114
|
+
/**
|
|
115
|
+
* @deprecated `authorizationCode` will be removed from responses returned by listing endpoints in a future version.
|
|
116
|
+
*/
|
|
117
|
+
authorizationCode?: string;
|
|
118
|
+
expiryTimestamp: Date;
|
|
119
|
+
updateTimestamp: Date;
|
|
120
|
+
creationTimestamp: Date;
|
|
99
121
|
}
|
|
100
122
|
export interface OAuth2Token {
|
|
101
123
|
id: string;
|
|
102
124
|
applicationId: string;
|
|
103
125
|
userId: string;
|
|
104
126
|
refreshTokenId: string;
|
|
105
|
-
|
|
127
|
+
/**
|
|
128
|
+
* @deprecated `accessToken` will be removed from responses returned by listing endpoints in a future version.
|
|
129
|
+
*/
|
|
130
|
+
accessToken?: string;
|
|
106
131
|
expiryTimestamp: Date;
|
|
107
132
|
updateTimestamp: Date;
|
|
108
133
|
creationTimestamp: Date;
|
|
@@ -79,7 +79,10 @@ export interface RecoveryCodesMethod {
|
|
|
79
79
|
tags: string[];
|
|
80
80
|
verified: boolean;
|
|
81
81
|
type: 'recoveryCodes';
|
|
82
|
-
|
|
82
|
+
/**
|
|
83
|
+
* @deprecated `codes` will be removed from responses returned by listing endpoints in a future version.
|
|
84
|
+
*/
|
|
85
|
+
codes?: string[];
|
|
83
86
|
updateTimestamp: Date;
|
|
84
87
|
creationTimestamp: Date;
|
|
85
88
|
}
|
|
@@ -89,7 +92,10 @@ export interface TotpMethod {
|
|
|
89
92
|
tags: string[];
|
|
90
93
|
verified: boolean;
|
|
91
94
|
type: 'totp';
|
|
92
|
-
|
|
95
|
+
/**
|
|
96
|
+
* @deprecated `secret` will be removed from responses returned by listing endpoints in a future version.
|
|
97
|
+
*/
|
|
98
|
+
secret?: string;
|
|
93
99
|
updateTimestamp: Date;
|
|
94
100
|
creationTimestamp: Date;
|
|
95
101
|
}
|
|
@@ -20,7 +20,7 @@ export interface AuthOauth1Service {
|
|
|
20
20
|
* @throws {ApplicationNotAuthenticatedError}
|
|
21
21
|
* @throws {ResourceUnknownError}
|
|
22
22
|
*/
|
|
23
|
-
consumeSsoToken(ssoToken: string): Promise<
|
|
23
|
+
consumeSsoToken(ssoToken: string): Promise<ConsumeSSOTokenResponse>;
|
|
24
24
|
/**
|
|
25
25
|
* @deprecated Use `exh.auth.oauth1.tokens.find` instead
|
|
26
26
|
*
|
|
@@ -100,12 +100,26 @@ export interface SsoToken {
|
|
|
100
100
|
creationTimestamp: Date;
|
|
101
101
|
updateTimestamp: Date;
|
|
102
102
|
}
|
|
103
|
-
export interface
|
|
103
|
+
export interface ConsumeSSOTokenResponse {
|
|
104
104
|
id: string;
|
|
105
|
-
userId: string;
|
|
106
105
|
applicationId: string;
|
|
106
|
+
userId: string;
|
|
107
107
|
token: string;
|
|
108
108
|
tokenSecret: string;
|
|
109
|
+
updateTimestamp: Date;
|
|
110
|
+
lastUsedTimestamp: Date;
|
|
111
|
+
creationTimestamp: Date;
|
|
112
|
+
}
|
|
113
|
+
export interface OAuth1Token {
|
|
114
|
+
id: string;
|
|
115
|
+
applicationId: string;
|
|
116
|
+
userId: string;
|
|
117
|
+
token: string;
|
|
118
|
+
/**
|
|
119
|
+
* @deprecated `tokenSecret` will be removed from responses returned by listing endpoints in a future version.
|
|
120
|
+
*/
|
|
121
|
+
tokenSecret?: string;
|
|
122
|
+
updateTimestamp: Date;
|
|
109
123
|
lastUsedTimestamp: Date;
|
|
110
124
|
creationTimestamp: Date;
|
|
111
125
|
}
|
|
@@ -12,7 +12,7 @@ export interface AuthOauth2Service {
|
|
|
12
12
|
* @throws {CallbackNotValidError}
|
|
13
13
|
* @throws {UnsupportedResponseTypeError}
|
|
14
14
|
*/
|
|
15
|
-
createAuthorization(data: OAuth2AuthorizationCreation, options?: OptionsBase): Promise<
|
|
15
|
+
createAuthorization(data: OAuth2AuthorizationCreation, options?: OptionsBase): Promise<OAuth2AuthorizationCreationResponse>;
|
|
16
16
|
/**
|
|
17
17
|
* Get a list of OAuth2 Authorizations
|
|
18
18
|
*
|
|
@@ -82,27 +82,52 @@ export interface AuthOauth2TokenService {
|
|
|
82
82
|
export interface OAuth2AuthorizationCreation {
|
|
83
83
|
responseType: string;
|
|
84
84
|
clientId: string;
|
|
85
|
+
redirectUri?: string;
|
|
86
|
+
state?: string;
|
|
87
|
+
codeChallengeMethod?: string;
|
|
88
|
+
codeChallenge?: string;
|
|
89
|
+
}
|
|
90
|
+
export interface OAuth2AuthorizationCreationResponse {
|
|
91
|
+
id: string;
|
|
92
|
+
clientId: string;
|
|
93
|
+
userId: string;
|
|
85
94
|
redirectUri: string;
|
|
86
|
-
state
|
|
87
|
-
|
|
95
|
+
state?: string;
|
|
96
|
+
codeChallengeMethod?: string;
|
|
97
|
+
codeChallenge?: string;
|
|
98
|
+
authorizationCode: string;
|
|
99
|
+
expiryTimestamp: Date;
|
|
100
|
+
updateTimestamp: Date;
|
|
101
|
+
creationTimestamp: Date;
|
|
88
102
|
}
|
|
89
103
|
export interface OAuth2Authorization {
|
|
90
104
|
id: string;
|
|
91
|
-
userId: string;
|
|
92
105
|
clientId: string;
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
|
|
106
|
+
userId: string;
|
|
107
|
+
redirectUri: string;
|
|
108
|
+
state?: string;
|
|
109
|
+
codeChallengeMethod?: string;
|
|
110
|
+
/**
|
|
111
|
+
@deprecated `codeChallenge` will be removed from responses returned by listing endpoints in a future version.
|
|
112
|
+
*/
|
|
113
|
+
codeChallenge?: string;
|
|
114
|
+
/**
|
|
115
|
+
* @deprecated `authorizationCode` will be removed from responses returned by listing endpoints in a future version.
|
|
116
|
+
*/
|
|
117
|
+
authorizationCode?: string;
|
|
118
|
+
expiryTimestamp: Date;
|
|
119
|
+
updateTimestamp: Date;
|
|
120
|
+
creationTimestamp: Date;
|
|
99
121
|
}
|
|
100
122
|
export interface OAuth2Token {
|
|
101
123
|
id: string;
|
|
102
124
|
applicationId: string;
|
|
103
125
|
userId: string;
|
|
104
126
|
refreshTokenId: string;
|
|
105
|
-
|
|
127
|
+
/**
|
|
128
|
+
* @deprecated `accessToken` will be removed from responses returned by listing endpoints in a future version.
|
|
129
|
+
*/
|
|
130
|
+
accessToken?: string;
|
|
106
131
|
expiryTimestamp: Date;
|
|
107
132
|
updateTimestamp: Date;
|
|
108
133
|
creationTimestamp: Date;
|
|
@@ -79,7 +79,10 @@ export interface RecoveryCodesMethod {
|
|
|
79
79
|
tags: string[];
|
|
80
80
|
verified: boolean;
|
|
81
81
|
type: 'recoveryCodes';
|
|
82
|
-
|
|
82
|
+
/**
|
|
83
|
+
* @deprecated `codes` will be removed from responses returned by listing endpoints in a future version.
|
|
84
|
+
*/
|
|
85
|
+
codes?: string[];
|
|
83
86
|
updateTimestamp: Date;
|
|
84
87
|
creationTimestamp: Date;
|
|
85
88
|
}
|
|
@@ -89,7 +92,10 @@ export interface TotpMethod {
|
|
|
89
92
|
tags: string[];
|
|
90
93
|
verified: boolean;
|
|
91
94
|
type: 'totp';
|
|
92
|
-
|
|
95
|
+
/**
|
|
96
|
+
* @deprecated `secret` will be removed from responses returned by listing endpoints in a future version.
|
|
97
|
+
*/
|
|
98
|
+
secret?: string;
|
|
93
99
|
updateTimestamp: Date;
|
|
94
100
|
creationTimestamp: Date;
|
|
95
101
|
}
|
package/build/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "8.
|
|
1
|
+
export declare const version = "8.13.0-dev-184-9d8c16c";
|
package/build/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "8.
|
|
1
|
+
export declare const version = "8.13.0-dev-184-9d8c16c";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@extrahorizon/javascript-sdk",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.13.0-dev-184-9d8c16c",
|
|
4
4
|
"description": "This package serves as a JavaScript wrapper around all Extra Horizon cloud services.",
|
|
5
5
|
"main": "build/index.cjs.js",
|
|
6
6
|
"types": "build/types/index.d.ts",
|