@asgardeo/javascript 0.2.8 → 0.2.10
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/executeEmbeddedSignInFlowV2.d.ts +2 -1
- package/dist/api/v2/executeEmbeddedSignUpFlowV2.d.ts +2 -1
- package/dist/cjs/index.js +109 -52
- package/dist/cjs/index.js.map +4 -4
- package/dist/index.d.ts +3 -2
- package/dist/index.js +105 -52
- package/dist/index.js.map +4 -4
- package/dist/models/embedded-flow.d.ts +1 -1
- package/dist/models/v2/embedded-flow-v2.d.ts +307 -0
- package/dist/models/v2/embedded-signin-flow-v2.d.ts +261 -31
- package/dist/models/v2/embedded-signup-flow-v2.d.ts +91 -57
- package/package.json +2 -2
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
-
import { EmbeddedFlowExecuteRequestConfigV2
|
|
18
|
+
import { EmbeddedFlowExecuteRequestConfig as EmbeddedFlowExecuteRequestConfigV2 } from '../../models/v2/embedded-flow-v2';
|
|
19
|
+
import { EmbeddedSignInFlowResponse as EmbeddedSignInFlowResponseV2 } from '../../models/v2/embedded-signin-flow-v2';
|
|
19
20
|
declare const executeEmbeddedSignInFlowV2: ({ url, baseUrl, payload, authId, ...requestConfig }: EmbeddedFlowExecuteRequestConfigV2) => Promise<EmbeddedSignInFlowResponseV2>;
|
|
20
21
|
export default executeEmbeddedSignInFlowV2;
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
-
import { EmbeddedFlowExecuteRequestConfigV2
|
|
18
|
+
import { EmbeddedFlowExecuteRequestConfig as EmbeddedFlowExecuteRequestConfigV2 } from '../../models/v2/embedded-flow-v2';
|
|
19
|
+
import { EmbeddedSignUpFlowResponse as EmbeddedSignUpFlowResponseV2 } from '../../models/v2/embedded-signup-flow-v2';
|
|
19
20
|
declare const executeEmbeddedSignUpFlowV2: ({ url, baseUrl, payload, authId, ...requestConfig }: EmbeddedFlowExecuteRequestConfigV2) => Promise<EmbeddedSignUpFlowResponseV2>;
|
|
20
21
|
export default executeEmbeddedSignUpFlowV2;
|
package/dist/cjs/index.js
CHANGED
|
@@ -29,20 +29,24 @@ __export(index_exports, {
|
|
|
29
29
|
AsgardeoJavaScriptClient: () => AsgardeoJavaScriptClient_default,
|
|
30
30
|
AsgardeoRuntimeError: () => AsgardeoRuntimeError,
|
|
31
31
|
DEFAULT_THEME: () => DEFAULT_THEME,
|
|
32
|
+
EmbeddedFlowActionVariantV2: () => EmbeddedFlowActionVariant,
|
|
32
33
|
EmbeddedFlowComponentType: () => EmbeddedFlowComponentType,
|
|
34
|
+
EmbeddedFlowComponentTypeV2: () => EmbeddedFlowComponentType2,
|
|
35
|
+
EmbeddedFlowEventTypeV2: () => EmbeddedFlowEventType,
|
|
33
36
|
EmbeddedFlowResponseType: () => EmbeddedFlowResponseType,
|
|
34
37
|
EmbeddedFlowStatus: () => EmbeddedFlowStatus,
|
|
38
|
+
EmbeddedFlowTextVariantV2: () => EmbeddedFlowTextVariant,
|
|
35
39
|
EmbeddedFlowType: () => EmbeddedFlowType,
|
|
36
40
|
EmbeddedSignInFlowAuthenticatorKnownIdPType: () => EmbeddedSignInFlowAuthenticatorKnownIdPType,
|
|
37
41
|
EmbeddedSignInFlowAuthenticatorParamType: () => EmbeddedSignInFlowAuthenticatorParamType,
|
|
38
42
|
EmbeddedSignInFlowAuthenticatorPromptType: () => EmbeddedSignInFlowAuthenticatorPromptType,
|
|
39
|
-
EmbeddedSignInFlowStatus: () =>
|
|
40
|
-
EmbeddedSignInFlowStatusV2: () =>
|
|
43
|
+
EmbeddedSignInFlowStatus: () => EmbeddedSignInFlowStatus2,
|
|
44
|
+
EmbeddedSignInFlowStatusV2: () => EmbeddedSignInFlowStatus,
|
|
41
45
|
EmbeddedSignInFlowStepType: () => EmbeddedSignInFlowStepType,
|
|
42
|
-
EmbeddedSignInFlowType: () =>
|
|
43
|
-
EmbeddedSignInFlowTypeV2: () =>
|
|
44
|
-
EmbeddedSignUpFlowStatusV2: () =>
|
|
45
|
-
EmbeddedSignUpFlowTypeV2: () =>
|
|
46
|
+
EmbeddedSignInFlowType: () => EmbeddedSignInFlowType2,
|
|
47
|
+
EmbeddedSignInFlowTypeV2: () => EmbeddedSignInFlowType,
|
|
48
|
+
EmbeddedSignUpFlowStatusV2: () => EmbeddedSignUpFlowStatus,
|
|
49
|
+
EmbeddedSignUpFlowTypeV2: () => EmbeddedSignUpFlowType,
|
|
46
50
|
FieldType: () => FieldType,
|
|
47
51
|
FlowMode: () => FlowMode,
|
|
48
52
|
IsomorphicCrypto: () => IsomorphicCrypto,
|
|
@@ -2179,17 +2183,17 @@ var EmbeddedFlowResponseType = /* @__PURE__ */ ((EmbeddedFlowResponseType2) => {
|
|
|
2179
2183
|
EmbeddedFlowResponseType2["View"] = "VIEW";
|
|
2180
2184
|
return EmbeddedFlowResponseType2;
|
|
2181
2185
|
})(EmbeddedFlowResponseType || {});
|
|
2182
|
-
var EmbeddedFlowComponentType = /* @__PURE__ */ ((
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
return
|
|
2186
|
+
var EmbeddedFlowComponentType = /* @__PURE__ */ ((EmbeddedFlowComponentType3) => {
|
|
2187
|
+
EmbeddedFlowComponentType3["Button"] = "BUTTON";
|
|
2188
|
+
EmbeddedFlowComponentType3["Checkbox"] = "CHECKBOX";
|
|
2189
|
+
EmbeddedFlowComponentType3["Divider"] = "DIVIDER";
|
|
2190
|
+
EmbeddedFlowComponentType3["Form"] = "FORM";
|
|
2191
|
+
EmbeddedFlowComponentType3["Image"] = "IMAGE";
|
|
2192
|
+
EmbeddedFlowComponentType3["Input"] = "INPUT";
|
|
2193
|
+
EmbeddedFlowComponentType3["Radio"] = "RADIO";
|
|
2194
|
+
EmbeddedFlowComponentType3["Select"] = "SELECT";
|
|
2195
|
+
EmbeddedFlowComponentType3["Typography"] = "TYPOGRAPHY";
|
|
2196
|
+
return EmbeddedFlowComponentType3;
|
|
2193
2197
|
})(EmbeddedFlowComponentType || {});
|
|
2194
2198
|
|
|
2195
2199
|
// src/api/executeEmbeddedSignUpFlow.ts
|
|
@@ -2973,17 +2977,17 @@ var getBrandingPreference = async ({
|
|
|
2973
2977
|
var getBrandingPreference_default = getBrandingPreference;
|
|
2974
2978
|
|
|
2975
2979
|
// src/models/v2/embedded-signin-flow-v2.ts
|
|
2976
|
-
var
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
return
|
|
2981
|
-
})(
|
|
2982
|
-
var
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
return
|
|
2986
|
-
})(
|
|
2980
|
+
var EmbeddedSignInFlowStatus = /* @__PURE__ */ ((EmbeddedSignInFlowStatus3) => {
|
|
2981
|
+
EmbeddedSignInFlowStatus3["Complete"] = "COMPLETE";
|
|
2982
|
+
EmbeddedSignInFlowStatus3["Incomplete"] = "INCOMPLETE";
|
|
2983
|
+
EmbeddedSignInFlowStatus3["Error"] = "ERROR";
|
|
2984
|
+
return EmbeddedSignInFlowStatus3;
|
|
2985
|
+
})(EmbeddedSignInFlowStatus || {});
|
|
2986
|
+
var EmbeddedSignInFlowType = /* @__PURE__ */ ((EmbeddedSignInFlowType3) => {
|
|
2987
|
+
EmbeddedSignInFlowType3["Redirection"] = "REDIRECTION";
|
|
2988
|
+
EmbeddedSignInFlowType3["View"] = "VIEW";
|
|
2989
|
+
return EmbeddedSignInFlowType3;
|
|
2990
|
+
})(EmbeddedSignInFlowType || {});
|
|
2987
2991
|
|
|
2988
2992
|
// src/api/v2/executeEmbeddedSignInFlowV2.ts
|
|
2989
2993
|
var executeEmbeddedSignInFlowV2 = async ({
|
|
@@ -3003,6 +3007,7 @@ var executeEmbeddedSignInFlowV2 = async ({
|
|
|
3003
3007
|
);
|
|
3004
3008
|
}
|
|
3005
3009
|
let endpoint = url ?? `${baseUrl}/flow/execute`;
|
|
3010
|
+
const requestPayload = typeof payload === "object" && payload !== null && "flowType" in payload ? { ...payload, verbose: true } : payload;
|
|
3006
3011
|
const response = await fetch(endpoint, {
|
|
3007
3012
|
...requestConfig,
|
|
3008
3013
|
method: requestConfig.method || "POST",
|
|
@@ -3011,7 +3016,7 @@ var executeEmbeddedSignInFlowV2 = async ({
|
|
|
3011
3016
|
Accept: "application/json",
|
|
3012
3017
|
...requestConfig.headers
|
|
3013
3018
|
},
|
|
3014
|
-
body: JSON.stringify(
|
|
3019
|
+
body: JSON.stringify(requestPayload)
|
|
3015
3020
|
});
|
|
3016
3021
|
if (!response.ok) {
|
|
3017
3022
|
const errorText = await response.text();
|
|
@@ -3069,17 +3074,17 @@ var executeEmbeddedSignInFlowV2 = async ({
|
|
|
3069
3074
|
var executeEmbeddedSignInFlowV2_default = executeEmbeddedSignInFlowV2;
|
|
3070
3075
|
|
|
3071
3076
|
// src/models/v2/embedded-signup-flow-v2.ts
|
|
3072
|
-
var
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
return
|
|
3077
|
-
})(
|
|
3078
|
-
var
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
return
|
|
3082
|
-
})(
|
|
3077
|
+
var EmbeddedSignUpFlowStatus = /* @__PURE__ */ ((EmbeddedSignUpFlowStatus2) => {
|
|
3078
|
+
EmbeddedSignUpFlowStatus2["Complete"] = "COMPLETE";
|
|
3079
|
+
EmbeddedSignUpFlowStatus2["Incomplete"] = "INCOMPLETE";
|
|
3080
|
+
EmbeddedSignUpFlowStatus2["Error"] = "ERROR";
|
|
3081
|
+
return EmbeddedSignUpFlowStatus2;
|
|
3082
|
+
})(EmbeddedSignUpFlowStatus || {});
|
|
3083
|
+
var EmbeddedSignUpFlowType = /* @__PURE__ */ ((EmbeddedSignUpFlowType2) => {
|
|
3084
|
+
EmbeddedSignUpFlowType2["Redirection"] = "REDIRECTION";
|
|
3085
|
+
EmbeddedSignUpFlowType2["View"] = "VIEW";
|
|
3086
|
+
return EmbeddedSignUpFlowType2;
|
|
3087
|
+
})(EmbeddedSignUpFlowType || {});
|
|
3083
3088
|
|
|
3084
3089
|
// src/api/v2/executeEmbeddedSignUpFlowV2.ts
|
|
3085
3090
|
var executeEmbeddedSignUpFlowV2 = async ({
|
|
@@ -3099,6 +3104,7 @@ var executeEmbeddedSignUpFlowV2 = async ({
|
|
|
3099
3104
|
);
|
|
3100
3105
|
}
|
|
3101
3106
|
let endpoint = url ?? `${baseUrl}/flow/execute`;
|
|
3107
|
+
const requestPayload = typeof payload === "object" && payload !== null && "flowType" in payload ? { ...payload, verbose: true } : payload;
|
|
3102
3108
|
const response = await fetch(endpoint, {
|
|
3103
3109
|
...requestConfig,
|
|
3104
3110
|
method: requestConfig.method || "POST",
|
|
@@ -3107,7 +3113,7 @@ var executeEmbeddedSignUpFlowV2 = async ({
|
|
|
3107
3113
|
Accept: "application/json",
|
|
3108
3114
|
...requestConfig.headers
|
|
3109
3115
|
},
|
|
3110
|
-
body: JSON.stringify(
|
|
3116
|
+
body: JSON.stringify(requestPayload)
|
|
3111
3117
|
});
|
|
3112
3118
|
if (!response.ok) {
|
|
3113
3119
|
const errorText = await response.text();
|
|
@@ -3204,17 +3210,17 @@ var Platform = /* @__PURE__ */ ((Platform2) => {
|
|
|
3204
3210
|
})(Platform || {});
|
|
3205
3211
|
|
|
3206
3212
|
// src/models/embedded-signin-flow.ts
|
|
3207
|
-
var
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
return
|
|
3213
|
-
})(
|
|
3214
|
-
var
|
|
3215
|
-
|
|
3216
|
-
return
|
|
3217
|
-
})(
|
|
3213
|
+
var EmbeddedSignInFlowStatus2 = /* @__PURE__ */ ((EmbeddedSignInFlowStatus3) => {
|
|
3214
|
+
EmbeddedSignInFlowStatus3["FailCompleted"] = "FAIL_COMPLETED";
|
|
3215
|
+
EmbeddedSignInFlowStatus3["FailIncomplete"] = "FAIL_INCOMPLETE";
|
|
3216
|
+
EmbeddedSignInFlowStatus3["Incomplete"] = "INCOMPLETE";
|
|
3217
|
+
EmbeddedSignInFlowStatus3["SuccessCompleted"] = "SUCCESS_COMPLETED";
|
|
3218
|
+
return EmbeddedSignInFlowStatus3;
|
|
3219
|
+
})(EmbeddedSignInFlowStatus2 || {});
|
|
3220
|
+
var EmbeddedSignInFlowType2 = /* @__PURE__ */ ((EmbeddedSignInFlowType3) => {
|
|
3221
|
+
EmbeddedSignInFlowType3["Authentication"] = "AUTHENTICATION";
|
|
3222
|
+
return EmbeddedSignInFlowType3;
|
|
3223
|
+
})(EmbeddedSignInFlowType2 || {});
|
|
3218
3224
|
var EmbeddedSignInFlowStepType = /* @__PURE__ */ ((EmbeddedSignInFlowStepType2) => {
|
|
3219
3225
|
EmbeddedSignInFlowStepType2["AuthenticatorPrompt"] = "AUTHENTICATOR_PROMPT";
|
|
3220
3226
|
EmbeddedSignInFlowStepType2["MultiOptionsPrompt"] = "MULTI_OPTIONS_PROMPT";
|
|
@@ -3237,6 +3243,53 @@ var EmbeddedSignInFlowAuthenticatorPromptType = /* @__PURE__ */ ((EmbeddedSignIn
|
|
|
3237
3243
|
return EmbeddedSignInFlowAuthenticatorPromptType2;
|
|
3238
3244
|
})(EmbeddedSignInFlowAuthenticatorPromptType || {});
|
|
3239
3245
|
|
|
3246
|
+
// src/models/v2/embedded-flow-v2.ts
|
|
3247
|
+
var EmbeddedFlowComponentType2 = /* @__PURE__ */ ((EmbeddedFlowComponentType3) => {
|
|
3248
|
+
EmbeddedFlowComponentType3["TextInput"] = "TEXT_INPUT";
|
|
3249
|
+
EmbeddedFlowComponentType3["PasswordInput"] = "PASSWORD_INPUT";
|
|
3250
|
+
EmbeddedFlowComponentType3["EmailInput"] = "EMAIL_INPUT";
|
|
3251
|
+
EmbeddedFlowComponentType3["Text"] = "TEXT";
|
|
3252
|
+
EmbeddedFlowComponentType3["Action"] = "ACTION";
|
|
3253
|
+
EmbeddedFlowComponentType3["Block"] = "BLOCK";
|
|
3254
|
+
return EmbeddedFlowComponentType3;
|
|
3255
|
+
})(EmbeddedFlowComponentType2 || {});
|
|
3256
|
+
var EmbeddedFlowActionVariant = /* @__PURE__ */ ((EmbeddedFlowActionVariant2) => {
|
|
3257
|
+
EmbeddedFlowActionVariant2["Primary"] = "PRIMARY";
|
|
3258
|
+
EmbeddedFlowActionVariant2["Secondary"] = "SECONDARY";
|
|
3259
|
+
EmbeddedFlowActionVariant2["Tertiary"] = "TERTIARY";
|
|
3260
|
+
EmbeddedFlowActionVariant2["Danger"] = "DANGER";
|
|
3261
|
+
EmbeddedFlowActionVariant2["Success"] = "SUCCESS";
|
|
3262
|
+
EmbeddedFlowActionVariant2["Info"] = "INFO";
|
|
3263
|
+
EmbeddedFlowActionVariant2["Warning"] = "WARNING";
|
|
3264
|
+
EmbeddedFlowActionVariant2["Link"] = "LINK";
|
|
3265
|
+
return EmbeddedFlowActionVariant2;
|
|
3266
|
+
})(EmbeddedFlowActionVariant || {});
|
|
3267
|
+
var EmbeddedFlowTextVariant = /* @__PURE__ */ ((EmbeddedFlowTextVariant2) => {
|
|
3268
|
+
EmbeddedFlowTextVariant2["Heading1"] = "HEADING_1";
|
|
3269
|
+
EmbeddedFlowTextVariant2["Heading2"] = "HEADING_2";
|
|
3270
|
+
EmbeddedFlowTextVariant2["Heading3"] = "HEADING_3";
|
|
3271
|
+
EmbeddedFlowTextVariant2["Heading4"] = "HEADING_4";
|
|
3272
|
+
EmbeddedFlowTextVariant2["Heading5"] = "HEADING_5";
|
|
3273
|
+
EmbeddedFlowTextVariant2["Heading6"] = "HEADING_6";
|
|
3274
|
+
EmbeddedFlowTextVariant2["Subtitle1"] = "SUBTITLE_1";
|
|
3275
|
+
EmbeddedFlowTextVariant2["Subtitle2"] = "SUBTITLE_2";
|
|
3276
|
+
EmbeddedFlowTextVariant2["Body1"] = "BODY_1";
|
|
3277
|
+
EmbeddedFlowTextVariant2["Body2"] = "BODY_2";
|
|
3278
|
+
EmbeddedFlowTextVariant2["Caption"] = "CAPTION";
|
|
3279
|
+
EmbeddedFlowTextVariant2["Overline"] = "OVERLINE";
|
|
3280
|
+
EmbeddedFlowTextVariant2["ButtonText"] = "BUTTON_TEXT";
|
|
3281
|
+
return EmbeddedFlowTextVariant2;
|
|
3282
|
+
})(EmbeddedFlowTextVariant || {});
|
|
3283
|
+
var EmbeddedFlowEventType = /* @__PURE__ */ ((EmbeddedFlowEventType2) => {
|
|
3284
|
+
EmbeddedFlowEventType2["Trigger"] = "TRIGGER";
|
|
3285
|
+
EmbeddedFlowEventType2["Submit"] = "SUBMIT";
|
|
3286
|
+
EmbeddedFlowEventType2["Navigate"] = "NAVIGATE";
|
|
3287
|
+
EmbeddedFlowEventType2["Cancel"] = "CANCEL";
|
|
3288
|
+
EmbeddedFlowEventType2["Reset"] = "RESET";
|
|
3289
|
+
EmbeddedFlowEventType2["Back"] = "BACK";
|
|
3290
|
+
return EmbeddedFlowEventType2;
|
|
3291
|
+
})(EmbeddedFlowEventType || {});
|
|
3292
|
+
|
|
3240
3293
|
// src/models/flow.ts
|
|
3241
3294
|
var FlowMode = /* @__PURE__ */ ((FlowMode2) => {
|
|
3242
3295
|
FlowMode2["Embedded"] = "DIRECT";
|
|
@@ -4723,9 +4776,13 @@ var transformBrandingPreferenceToTheme_default = transformBrandingPreferenceToTh
|
|
|
4723
4776
|
AsgardeoJavaScriptClient,
|
|
4724
4777
|
AsgardeoRuntimeError,
|
|
4725
4778
|
DEFAULT_THEME,
|
|
4779
|
+
EmbeddedFlowActionVariantV2,
|
|
4726
4780
|
EmbeddedFlowComponentType,
|
|
4781
|
+
EmbeddedFlowComponentTypeV2,
|
|
4782
|
+
EmbeddedFlowEventTypeV2,
|
|
4727
4783
|
EmbeddedFlowResponseType,
|
|
4728
4784
|
EmbeddedFlowStatus,
|
|
4785
|
+
EmbeddedFlowTextVariantV2,
|
|
4729
4786
|
EmbeddedFlowType,
|
|
4730
4787
|
EmbeddedSignInFlowAuthenticatorKnownIdPType,
|
|
4731
4788
|
EmbeddedSignInFlowAuthenticatorParamType,
|