@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 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
@@ -5664,7 +5664,7 @@ const templatesV2Service = (httpWithAuth) => {
5664
5664
  };
5665
5665
  };
5666
5666
 
5667
- const version = '8.12.1';
5667
+ const version = '8.13.0-dev-184-9d8c16c';
5668
5668
 
5669
5669
  /**
5670
5670
  * Create ExtraHorizon client.
package/build/index.mjs CHANGED
@@ -5634,7 +5634,7 @@ const templatesV2Service = (httpWithAuth) => {
5634
5634
  };
5635
5635
  };
5636
5636
 
5637
- const version = '8.12.1';
5637
+ const version = '8.13.0-dev-184-9d8c16c';
5638
5638
 
5639
5639
  /**
5640
5640
  * Create ExtraHorizon client.
@@ -20,7 +20,7 @@ export interface AuthOauth1Service {
20
20
  * @throws {ApplicationNotAuthenticatedError}
21
21
  * @throws {ResourceUnknownError}
22
22
  */
23
- consumeSsoToken(ssoToken: string): Promise<OAuth1Token>;
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 OAuth1Token {
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<OAuth2Authorization>;
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: string;
87
- scope: string;
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
- authorizationCode: string;
94
- state: string;
95
- /** The timestamp when the authorization was last updated */
96
- updateTimestamp?: Date;
97
- /** The timestamp when the authorization was created */
98
- creationTimestamp?: Date;
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
- accessToken: string;
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
- codes: string[];
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
- secret: string;
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<OAuth1Token>;
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 OAuth1Token {
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<OAuth2Authorization>;
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: string;
87
- scope: string;
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
- authorizationCode: string;
94
- state: string;
95
- /** The timestamp when the authorization was last updated */
96
- updateTimestamp?: Date;
97
- /** The timestamp when the authorization was created */
98
- creationTimestamp?: Date;
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
- accessToken: string;
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
- codes: string[];
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
- secret: string;
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
  }
@@ -1 +1 @@
1
- export declare const version = "8.12.1";
1
+ export declare const version = "8.13.0-dev-184-9d8c16c";
@@ -1 +1 @@
1
- export declare const version = "8.12.1";
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.12.1",
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",