@asgardeo/javascript 0.1.12 → 0.1.13

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.
@@ -20,7 +20,7 @@ import { EmbeddedFlowExecuteRequestConfig, EmbeddedFlowExecuteRequestPayload, Em
20
20
  import { EmbeddedSignInFlowHandleRequestPayload } from './embedded-signin-flow';
21
21
  import { Organization } from './organization';
22
22
  import { User, UserProfile } from './user';
23
- import { TokenResponse } from './token';
23
+ import { TokenExchangeRequestConfig, TokenResponse } from './token';
24
24
  import { Storage } from './store';
25
25
  import { SignInOptions, SignOutOptions, SignUpOptions } from './config';
26
26
  /**
@@ -54,6 +54,12 @@ export interface AsgardeoClient<T> {
54
54
  */
55
55
  switchOrganization(organization: Organization, sessionId?: string): Promise<TokenResponse | Response>;
56
56
  getConfiguration(): T;
57
+ /**
58
+ * Swaps the current access token with a new one based on the provided configuration (with a grant type).
59
+ * @param config - Configuration for the token exchange request.
60
+ * @param sessionId - Optional session ID to be used for the token exchange.
61
+ */
62
+ exchangeToken(config: TokenExchangeRequestConfig, sessionId?: string): Promise<TokenResponse | Response>;
57
63
  updateUserProfile(payload: any, userId?: string): Promise<User>;
58
64
  /**
59
65
  * Gets user information from the session.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asgardeo/javascript",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "description": "Framework agnostic JavaScript SDK for Asgardeo.",
5
5
  "keywords": [
6
6
  "asgardeo",