@asgardeo/javascript 0.4.0 → 0.5.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.
@@ -186,9 +186,21 @@ export interface AsgardeoClient<T> {
186
186
  * @returns A promise that resolves to the access token string.
187
187
  */
188
188
  getAccessToken(sessionId?: string): Promise<string>;
189
+ /**
190
+ * Sets the session data for the specified session ID.
191
+ * @param sessionData - The session data to be set.
192
+ * @param sessionId - Optional session ID to set the session data for.
193
+ */
194
+ setSession(sessionData: Record<string, unknown>, sessionId?: string): Promise<void>;
189
195
  /**
190
196
  * Clears the session for the specified session ID.
191
197
  * @param sessionId - Optional session ID to clear the session for.
192
198
  */
193
199
  clearSession(sessionId?: string): void;
200
+ /**
201
+ * Decodes a JWT token and returns its payload.
202
+ * @param token - The JWT token to be decoded.
203
+ * @returns A promise that resolves to the decoded token payload.
204
+ */
205
+ decodeJwtToken<T = Record<string, unknown>>(token: string): Promise<T>;
194
206
  }
@@ -42,6 +42,7 @@ export declare enum EmbeddedFlowResponseType {
42
42
  export interface EmbeddedSignUpFlowData {
43
43
  components?: EmbeddedFlowComponent[];
44
44
  redirectURL?: string;
45
+ additionalData?: Record<string, any>;
45
46
  }
46
47
  export interface EmbeddedFlowComponent {
47
48
  components: EmbeddedFlowComponent[];
@@ -308,6 +308,11 @@ export interface EmbeddedFlowResponseData {
308
308
  * Optional redirect URL for flow completion or external authentication.
309
309
  */
310
310
  redirectURL?: string;
311
+ /**
312
+ * Additional data dictionary for dynamic flow response properties.
313
+ * Can be used to pass custom data like passkey challenges, server alerts, etc.
314
+ */
315
+ additionalData?: Record<string, any>;
311
316
  }
312
317
  /**
313
318
  * Extended request configuration for Asgardeo V2 embedded flow operations.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asgardeo/javascript",
3
- "version": "0.4.0",
3
+ "version": "0.5.1",
4
4
  "description": "Framework agnostic JavaScript SDK for Asgardeo.",
5
5
  "keywords": [
6
6
  "asgardeo",
@@ -46,7 +46,7 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "tslib": "2.8.1",
49
- "@asgardeo/i18n": "0.3.9"
49
+ "@asgardeo/i18n": "0.4.0"
50
50
  },
51
51
  "publishConfig": {
52
52
  "access": "public"