@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/index.js CHANGED
@@ -3024,7 +3024,7 @@ var executeEmbeddedSignInFlowV2 = async ({
3024
3024
  const endpoint = url ?? `${baseUrl}/flow/execute`;
3025
3025
  const cleanPayload = typeof payload === "object" && payload !== null ? Object.fromEntries(Object.entries(payload).filter(([key]) => key !== "verbose")) : payload;
3026
3026
  const hasOnlyAppIdAndFlowType = typeof cleanPayload === "object" && cleanPayload !== null && "applicationId" in cleanPayload && "flowType" in cleanPayload && Object.keys(cleanPayload).length === 2;
3027
- const hasOnlyFlowId = typeof cleanPayload === "object" && cleanPayload !== null && "flowId" in cleanPayload && Object.keys(cleanPayload).length === 1;
3027
+ const hasOnlyFlowId = typeof cleanPayload === "object" && cleanPayload !== null && "executionId" in cleanPayload && Object.keys(cleanPayload).length === 1;
3028
3028
  const requestPayload = hasOnlyAppIdAndFlowType || hasOnlyFlowId ? { ...cleanPayload, verbose: true } : cleanPayload;
3029
3029
  const response = await fetch(endpoint, {
3030
3030
  ...requestConfig,
@@ -3124,7 +3124,7 @@ var executeEmbeddedSignUpFlowV2 = async ({
3124
3124
  const endpoint = url ?? `${baseUrl}/flow/execute`;
3125
3125
  const cleanPayload = typeof payload === "object" && payload !== null ? Object.fromEntries(Object.entries(payload).filter(([key]) => key !== "verbose")) : payload;
3126
3126
  const hasOnlyAppIdAndFlowType = typeof cleanPayload === "object" && cleanPayload !== null && "applicationId" in cleanPayload && "flowType" in cleanPayload && Object.keys(cleanPayload).length === 2;
3127
- const hasOnlyFlowId = typeof cleanPayload === "object" && cleanPayload !== null && "flowId" in cleanPayload && Object.keys(cleanPayload).length === 1;
3127
+ const hasOnlyFlowId = typeof cleanPayload === "object" && cleanPayload !== null && "executionId" in cleanPayload && Object.keys(cleanPayload).length === 1;
3128
3128
  const requestPayload = hasOnlyAppIdAndFlowType || hasOnlyFlowId ? { ...cleanPayload, verbose: true } : cleanPayload;
3129
3129
  const response = await fetch(endpoint, {
3130
3130
  ...requestConfig,
@@ -3210,8 +3210,8 @@ var executeEmbeddedUserOnboardingFlowV2 = async ({
3210
3210
  const endpoint = url ?? `${baseUrl}/flow/execute`;
3211
3211
  const cleanPayload = typeof payload === "object" && payload !== null ? Object.fromEntries(Object.entries(payload).filter(([key]) => key !== "verbose")) : payload;
3212
3212
  const hasOnlyFlowType = typeof cleanPayload === "object" && cleanPayload !== null && "flowType" in cleanPayload && Object.keys(cleanPayload).length === 1;
3213
- const hasOnlyFlowId = typeof cleanPayload === "object" && cleanPayload !== null && "flowId" in cleanPayload && Object.keys(cleanPayload).length === 1;
3214
- const hasFlowIdWithInputs = typeof cleanPayload === "object" && cleanPayload !== null && "flowId" in cleanPayload && "inputs" in cleanPayload;
3213
+ const hasOnlyFlowId = typeof cleanPayload === "object" && cleanPayload !== null && "executionId" in cleanPayload && Object.keys(cleanPayload).length === 1;
3214
+ const hasFlowIdWithInputs = typeof cleanPayload === "object" && cleanPayload !== null && "executionId" in cleanPayload && "inputs" in cleanPayload;
3215
3215
  const requestPayload = hasOnlyFlowType || hasOnlyFlowId || hasFlowIdWithInputs ? { ...cleanPayload, verbose: true } : cleanPayload;
3216
3216
  if ("flowType" in requestPayload && requestPayload["flowType"] !== "USER_ONBOARDING" /* UserOnboarding */) {
3217
3217
  requestPayload["flowType"] = "USER_ONBOARDING" /* UserOnboarding */;