@asgardeo/javascript 0.16.2 → 0.17.0
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/dist/api/v2/executeEmbeddedUserOnboardingFlowV2.d.ts +5 -5
- package/dist/cjs/index.js +4 -4
- package/dist/cjs/index.js.map +2 -2
- package/dist/index.js +4 -4
- package/dist/index.js.map +2 -2
- package/dist/models/v2/embedded-signin-flow-v2.d.ts +9 -9
- package/dist/models/v2/embedded-signup-flow-v2.d.ts +9 -9
- package/package.json +1 -1
|
@@ -34,13 +34,13 @@ export interface EmbeddedUserOnboardingFlowResponse {
|
|
|
34
34
|
components?: any[];
|
|
35
35
|
};
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* Unique identifier for the flow execution.
|
|
38
38
|
*/
|
|
39
|
-
|
|
39
|
+
executionId: string;
|
|
40
40
|
/**
|
|
41
|
-
*
|
|
41
|
+
* Reason for failure if flowStatus is ERROR.
|
|
42
42
|
*/
|
|
43
|
-
|
|
43
|
+
failureReason?: string;
|
|
44
44
|
/**
|
|
45
45
|
* Current status of the flow.
|
|
46
46
|
*/
|
|
@@ -78,7 +78,7 @@ export interface EmbeddedUserOnboardingFlowResponse {
|
|
|
78
78
|
* const response = await executeEmbeddedUserOnboardingFlowV2({
|
|
79
79
|
* baseUrl: "https://api.thunder.io",
|
|
80
80
|
* payload: {
|
|
81
|
-
*
|
|
81
|
+
* executionId: "flow-id-from-url",
|
|
82
82
|
* inputs: { inviteToken: "token-from-url" }
|
|
83
83
|
* }
|
|
84
84
|
* });
|
package/dist/cjs/index.js
CHANGED
|
@@ -3157,7 +3157,7 @@ var executeEmbeddedSignInFlowV2 = async ({
|
|
|
3157
3157
|
const endpoint = url ?? `${baseUrl}/flow/execute`;
|
|
3158
3158
|
const cleanPayload = typeof payload === "object" && payload !== null ? Object.fromEntries(Object.entries(payload).filter(([key]) => key !== "verbose")) : payload;
|
|
3159
3159
|
const hasOnlyAppIdAndFlowType = typeof cleanPayload === "object" && cleanPayload !== null && "applicationId" in cleanPayload && "flowType" in cleanPayload && Object.keys(cleanPayload).length === 2;
|
|
3160
|
-
const hasOnlyFlowId = typeof cleanPayload === "object" && cleanPayload !== null && "
|
|
3160
|
+
const hasOnlyFlowId = typeof cleanPayload === "object" && cleanPayload !== null && "executionId" in cleanPayload && Object.keys(cleanPayload).length === 1;
|
|
3161
3161
|
const requestPayload = hasOnlyAppIdAndFlowType || hasOnlyFlowId ? { ...cleanPayload, verbose: true } : cleanPayload;
|
|
3162
3162
|
const response = await fetch(endpoint, {
|
|
3163
3163
|
...requestConfig,
|
|
@@ -3257,7 +3257,7 @@ var executeEmbeddedSignUpFlowV2 = async ({
|
|
|
3257
3257
|
const endpoint = url ?? `${baseUrl}/flow/execute`;
|
|
3258
3258
|
const cleanPayload = typeof payload === "object" && payload !== null ? Object.fromEntries(Object.entries(payload).filter(([key]) => key !== "verbose")) : payload;
|
|
3259
3259
|
const hasOnlyAppIdAndFlowType = typeof cleanPayload === "object" && cleanPayload !== null && "applicationId" in cleanPayload && "flowType" in cleanPayload && Object.keys(cleanPayload).length === 2;
|
|
3260
|
-
const hasOnlyFlowId = typeof cleanPayload === "object" && cleanPayload !== null && "
|
|
3260
|
+
const hasOnlyFlowId = typeof cleanPayload === "object" && cleanPayload !== null && "executionId" in cleanPayload && Object.keys(cleanPayload).length === 1;
|
|
3261
3261
|
const requestPayload = hasOnlyAppIdAndFlowType || hasOnlyFlowId ? { ...cleanPayload, verbose: true } : cleanPayload;
|
|
3262
3262
|
const response = await fetch(endpoint, {
|
|
3263
3263
|
...requestConfig,
|
|
@@ -3343,8 +3343,8 @@ var executeEmbeddedUserOnboardingFlowV2 = async ({
|
|
|
3343
3343
|
const endpoint = url ?? `${baseUrl}/flow/execute`;
|
|
3344
3344
|
const cleanPayload = typeof payload === "object" && payload !== null ? Object.fromEntries(Object.entries(payload).filter(([key]) => key !== "verbose")) : payload;
|
|
3345
3345
|
const hasOnlyFlowType = typeof cleanPayload === "object" && cleanPayload !== null && "flowType" in cleanPayload && Object.keys(cleanPayload).length === 1;
|
|
3346
|
-
const hasOnlyFlowId = typeof cleanPayload === "object" && cleanPayload !== null && "
|
|
3347
|
-
const hasFlowIdWithInputs = typeof cleanPayload === "object" && cleanPayload !== null && "
|
|
3346
|
+
const hasOnlyFlowId = typeof cleanPayload === "object" && cleanPayload !== null && "executionId" in cleanPayload && Object.keys(cleanPayload).length === 1;
|
|
3347
|
+
const hasFlowIdWithInputs = typeof cleanPayload === "object" && cleanPayload !== null && "executionId" in cleanPayload && "inputs" in cleanPayload;
|
|
3348
3348
|
const requestPayload = hasOnlyFlowType || hasOnlyFlowId || hasFlowIdWithInputs ? { ...cleanPayload, verbose: true } : cleanPayload;
|
|
3349
3349
|
if ("flowType" in requestPayload && requestPayload["flowType"] !== "USER_ONBOARDING" /* UserOnboarding */) {
|
|
3350
3350
|
requestPayload["flowType"] = "USER_ONBOARDING" /* UserOnboarding */;
|