@descope/vue-sdk 2.1.6 → 2.2.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.
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2646 -160
- package/dist/index.mjs +1 -1
- package/package.json +10 -10
package/dist/index.d.ts
CHANGED
|
@@ -180,6 +180,9 @@ declare const _default$4: vue.DefineComponent<{
|
|
|
180
180
|
theme: {
|
|
181
181
|
type: StringConstructor;
|
|
182
182
|
};
|
|
183
|
+
styleId: {
|
|
184
|
+
type: StringConstructor;
|
|
185
|
+
};
|
|
183
186
|
debug: {
|
|
184
187
|
type: BooleanConstructor;
|
|
185
188
|
};
|
|
@@ -197,6 +200,9 @@ declare const _default$4: vue.DefineComponent<{
|
|
|
197
200
|
theme: {
|
|
198
201
|
type: StringConstructor;
|
|
199
202
|
};
|
|
203
|
+
styleId: {
|
|
204
|
+
type: StringConstructor;
|
|
205
|
+
};
|
|
200
206
|
debug: {
|
|
201
207
|
type: BooleanConstructor;
|
|
202
208
|
};
|
|
@@ -216,6 +222,9 @@ declare const _default$3: vue.DefineComponent<{
|
|
|
216
222
|
theme: {
|
|
217
223
|
type: StringConstructor;
|
|
218
224
|
};
|
|
225
|
+
styleId: {
|
|
226
|
+
type: StringConstructor;
|
|
227
|
+
};
|
|
219
228
|
debug: {
|
|
220
229
|
type: BooleanConstructor;
|
|
221
230
|
};
|
|
@@ -233,6 +242,9 @@ declare const _default$3: vue.DefineComponent<{
|
|
|
233
242
|
theme: {
|
|
234
243
|
type: StringConstructor;
|
|
235
244
|
};
|
|
245
|
+
styleId: {
|
|
246
|
+
type: StringConstructor;
|
|
247
|
+
};
|
|
236
248
|
debug: {
|
|
237
249
|
type: BooleanConstructor;
|
|
238
250
|
};
|
|
@@ -278,6 +290,9 @@ declare const _default$1: vue.DefineComponent<{
|
|
|
278
290
|
theme: {
|
|
279
291
|
type: StringConstructor;
|
|
280
292
|
};
|
|
293
|
+
styleId: {
|
|
294
|
+
type: StringConstructor;
|
|
295
|
+
};
|
|
281
296
|
debug: {
|
|
282
297
|
type: BooleanConstructor;
|
|
283
298
|
};
|
|
@@ -291,6 +306,9 @@ declare const _default$1: vue.DefineComponent<{
|
|
|
291
306
|
theme: {
|
|
292
307
|
type: StringConstructor;
|
|
293
308
|
};
|
|
309
|
+
styleId: {
|
|
310
|
+
type: StringConstructor;
|
|
311
|
+
};
|
|
294
312
|
debug: {
|
|
295
313
|
type: BooleanConstructor;
|
|
296
314
|
};
|
|
@@ -351,8 +369,12 @@ declare const useDescope: () => ((({
|
|
|
351
369
|
name?: string;
|
|
352
370
|
loginId?: string;
|
|
353
371
|
}, "loginId" | "name">;
|
|
354
|
-
}, conditionInteractionId?: string, interactionId?: string, componentsVersion?: string, flowVersions?: Record<string, number>, input?:
|
|
355
|
-
|
|
372
|
+
}, conditionInteractionId?: string, interactionId?: string, componentsVersion?: string, flowVersions?: Record<string, number>, input?: {
|
|
373
|
+
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any[])[])[])[])[])[])[])[])[])[])[];
|
|
374
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
375
|
+
next: (executionId: string, stepId: string, interactionId: string, version?: number, componentsVersion?: string, input?: {
|
|
376
|
+
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any[])[])[])[])[])[])[])[])[])[])[];
|
|
377
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
356
378
|
};
|
|
357
379
|
webauthn: {
|
|
358
380
|
signUp: ((identifier: string, name: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
|
|
@@ -851,6 +873,7 @@ declare const useDescope: () => ((({
|
|
|
851
873
|
selectTenant: (tenantId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
852
874
|
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
853
875
|
logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
876
|
+
logoutPrevious: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
854
877
|
me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
|
|
855
878
|
myTenants: (tenants: true | string[], token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
856
879
|
tenants: {
|
|
@@ -953,8 +976,12 @@ declare const useDescope: () => ((({
|
|
|
953
976
|
name?: string;
|
|
954
977
|
loginId?: string;
|
|
955
978
|
}, "loginId" | "name">;
|
|
956
|
-
}, conditionInteractionId?: string, interactionId?: string, componentsVersion?: string, flowVersions?: Record<string, number>, input?:
|
|
957
|
-
|
|
979
|
+
}, conditionInteractionId?: string, interactionId?: string, componentsVersion?: string, flowVersions?: Record<string, number>, input?: {
|
|
980
|
+
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any[])[])[])[])[])[])[])[])[])[])[];
|
|
981
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
982
|
+
next: (executionId: string, stepId: string, interactionId: string, version?: number, componentsVersion?: string, input?: {
|
|
983
|
+
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any[])[])[])[])[])[])[])[])[])[])[];
|
|
984
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
958
985
|
};
|
|
959
986
|
webauthn: {
|
|
960
987
|
signUp: ((identifier: string, name: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
|
|
@@ -1453,6 +1480,7 @@ declare const useDescope: () => ((({
|
|
|
1453
1480
|
selectTenant: (tenantId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1454
1481
|
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
1455
1482
|
logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
1483
|
+
logoutPrevious: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
1456
1484
|
me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
|
|
1457
1485
|
myTenants: (tenants: true | string[], token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1458
1486
|
tenants: {
|
|
@@ -1511,13 +1539,7 @@ declare const useDescope: () => ((({
|
|
|
1511
1539
|
[key: string]: string;
|
|
1512
1540
|
}) => string;
|
|
1513
1541
|
};
|
|
1514
|
-
}
|
|
1515
|
-
onSessionTokenChange: (cb: (data: string) => void) => () => any[];
|
|
1516
|
-
onUserChange: (cb: (data: _descope_core_js_sdk.UserResponse) => void) => () => any[];
|
|
1517
|
-
}) & {
|
|
1518
|
-
getLastUserLoginId: () => string;
|
|
1519
|
-
getLastUserDisplayName: () => string;
|
|
1520
|
-
}) | (((({
|
|
1542
|
+
} | {
|
|
1521
1543
|
refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1522
1544
|
flow: {
|
|
1523
1545
|
start: (flowId: string, options?: Pick<{
|
|
@@ -1561,8 +1583,12 @@ declare const useDescope: () => ((({
|
|
|
1561
1583
|
name?: string;
|
|
1562
1584
|
loginId?: string;
|
|
1563
1585
|
}, "loginId" | "name">;
|
|
1564
|
-
}, conditionInteractionId?: string, interactionId?: string, componentsVersion?: string, flowVersions?: Record<string, number>, input?:
|
|
1565
|
-
|
|
1586
|
+
}, conditionInteractionId?: string, interactionId?: string, componentsVersion?: string, flowVersions?: Record<string, number>, input?: {
|
|
1587
|
+
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any[])[])[])[])[])[])[])[])[])[])[];
|
|
1588
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
1589
|
+
next: (executionId: string, stepId: string, interactionId: string, version?: number, componentsVersion?: string, input?: {
|
|
1590
|
+
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any[])[])[])[])[])[])[])[])[])[])[];
|
|
1591
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
1566
1592
|
};
|
|
1567
1593
|
webauthn: {
|
|
1568
1594
|
signUp: ((identifier: string, name: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
|
|
@@ -2061,6 +2087,7 @@ declare const useDescope: () => ((({
|
|
|
2061
2087
|
selectTenant: (tenantId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2062
2088
|
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
2063
2089
|
logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
2090
|
+
logoutPrevious: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
2064
2091
|
me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
|
|
2065
2092
|
myTenants: (tenants: true | string[], token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2066
2093
|
tenants: {
|
|
@@ -2119,7 +2146,13 @@ declare const useDescope: () => ((({
|
|
|
2119
2146
|
[key: string]: string;
|
|
2120
2147
|
}) => string;
|
|
2121
2148
|
};
|
|
2122
|
-
}
|
|
2149
|
+
}) & {
|
|
2150
|
+
onSessionTokenChange: (cb: (data: string) => void) => () => any[];
|
|
2151
|
+
onUserChange: (cb: (data: _descope_core_js_sdk.UserResponse) => void) => () => any[];
|
|
2152
|
+
}) & {
|
|
2153
|
+
getLastUserLoginId: () => string;
|
|
2154
|
+
getLastUserDisplayName: () => string;
|
|
2155
|
+
}) | (((({
|
|
2123
2156
|
refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2124
2157
|
flow: {
|
|
2125
2158
|
start: (flowId: string, options?: Pick<{
|
|
@@ -2163,8 +2196,12 @@ declare const useDescope: () => ((({
|
|
|
2163
2196
|
name?: string;
|
|
2164
2197
|
loginId?: string;
|
|
2165
2198
|
}, "loginId" | "name">;
|
|
2166
|
-
}, conditionInteractionId?: string, interactionId?: string, componentsVersion?: string, flowVersions?: Record<string, number>, input?:
|
|
2167
|
-
|
|
2199
|
+
}, conditionInteractionId?: string, interactionId?: string, componentsVersion?: string, flowVersions?: Record<string, number>, input?: {
|
|
2200
|
+
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any[])[])[])[])[])[])[])[])[])[])[];
|
|
2201
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
2202
|
+
next: (executionId: string, stepId: string, interactionId: string, version?: number, componentsVersion?: string, input?: {
|
|
2203
|
+
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any[])[])[])[])[])[])[])[])[])[])[];
|
|
2204
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
2168
2205
|
};
|
|
2169
2206
|
webauthn: {
|
|
2170
2207
|
signUp: ((identifier: string, name: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
|
|
@@ -2663,6 +2700,7 @@ declare const useDescope: () => ((({
|
|
|
2663
2700
|
selectTenant: (tenantId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2664
2701
|
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
2665
2702
|
logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
2703
|
+
logoutPrevious: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
2666
2704
|
me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
|
|
2667
2705
|
myTenants: (tenants: true | string[], token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2668
2706
|
tenants: {
|
|
@@ -2721,33 +2759,7 @@ declare const useDescope: () => ((({
|
|
|
2721
2759
|
[key: string]: string;
|
|
2722
2760
|
}) => string;
|
|
2723
2761
|
};
|
|
2724
|
-
}
|
|
2725
|
-
onSessionTokenChange: (cb: (data: string) => void) => () => any[];
|
|
2726
|
-
onUserChange: (cb: (data: _descope_core_js_sdk.UserResponse) => void) => () => any[];
|
|
2727
|
-
}) & {
|
|
2728
|
-
getLastUserLoginId: () => string;
|
|
2729
|
-
getLastUserDisplayName: () => string;
|
|
2730
|
-
}) & {
|
|
2731
|
-
getRefreshToken: () => string;
|
|
2732
|
-
getSessionToken: () => string;
|
|
2733
|
-
});
|
|
2734
|
-
declare const useSession: () => {
|
|
2735
|
-
isLoading: vue.ComputedRef<boolean>;
|
|
2736
|
-
sessionToken: vue.Ref<string>;
|
|
2737
|
-
isAuthenticated: vue.ComputedRef<boolean>;
|
|
2738
|
-
};
|
|
2739
|
-
declare const useUser: () => {
|
|
2740
|
-
isLoading: vue.ComputedRef<boolean>;
|
|
2741
|
-
user: vue.Ref<_descope_core_js_sdk.UserResponse>;
|
|
2742
|
-
};
|
|
2743
|
-
|
|
2744
|
-
declare const routeGuard: () => Promise<boolean>;
|
|
2745
|
-
/**
|
|
2746
|
-
* This will return the Descope SDK instance
|
|
2747
|
-
* In order to get the SDK instance, this should be called after using the plugin
|
|
2748
|
-
* @returns Descope SDK
|
|
2749
|
-
*/
|
|
2750
|
-
declare const getSdk: () => ((({
|
|
2762
|
+
} | {
|
|
2751
2763
|
refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2752
2764
|
flow: {
|
|
2753
2765
|
start: (flowId: string, options?: Pick<{
|
|
@@ -2791,8 +2803,12 @@ declare const getSdk: () => ((({
|
|
|
2791
2803
|
name?: string;
|
|
2792
2804
|
loginId?: string;
|
|
2793
2805
|
}, "loginId" | "name">;
|
|
2794
|
-
}, conditionInteractionId?: string, interactionId?: string, componentsVersion?: string, flowVersions?: Record<string, number>, input?:
|
|
2795
|
-
|
|
2806
|
+
}, conditionInteractionId?: string, interactionId?: string, componentsVersion?: string, flowVersions?: Record<string, number>, input?: {
|
|
2807
|
+
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any[])[])[])[])[])[])[])[])[])[])[];
|
|
2808
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
2809
|
+
next: (executionId: string, stepId: string, interactionId: string, version?: number, componentsVersion?: string, input?: {
|
|
2810
|
+
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any[])[])[])[])[])[])[])[])[])[])[];
|
|
2811
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
2796
2812
|
};
|
|
2797
2813
|
webauthn: {
|
|
2798
2814
|
signUp: ((identifier: string, name: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
|
|
@@ -2943,9 +2959,9 @@ declare const getSdk: () => ((({
|
|
|
2943
2959
|
}>>;
|
|
2944
2960
|
};
|
|
2945
2961
|
update: {
|
|
2946
|
-
email: <
|
|
2947
|
-
addToLoginIDs?:
|
|
2948
|
-
onMergeUseExisting?:
|
|
2962
|
+
email: <T_8 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
|
|
2963
|
+
addToLoginIDs?: T_8;
|
|
2964
|
+
onMergeUseExisting?: T_8 extends true ? boolean : never;
|
|
2949
2965
|
templateOptions?: {
|
|
2950
2966
|
[x: string]: string;
|
|
2951
2967
|
};
|
|
@@ -2953,27 +2969,27 @@ declare const getSdk: () => ((({
|
|
|
2953
2969
|
maskedEmail: string;
|
|
2954
2970
|
}>>;
|
|
2955
2971
|
phone: {
|
|
2956
|
-
sms: <
|
|
2957
|
-
addToLoginIDs?:
|
|
2958
|
-
onMergeUseExisting?:
|
|
2972
|
+
sms: <T_1_12 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
2973
|
+
addToLoginIDs?: T_1_12;
|
|
2974
|
+
onMergeUseExisting?: T_1_12 extends true ? boolean : never;
|
|
2959
2975
|
templateOptions?: {
|
|
2960
2976
|
[x: string]: string;
|
|
2961
2977
|
};
|
|
2962
2978
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2963
2979
|
maskedPhone: string;
|
|
2964
2980
|
}>>;
|
|
2965
|
-
voice: <
|
|
2966
|
-
addToLoginIDs?:
|
|
2967
|
-
onMergeUseExisting?:
|
|
2981
|
+
voice: <T_1_13 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
2982
|
+
addToLoginIDs?: T_1_13;
|
|
2983
|
+
onMergeUseExisting?: T_1_13 extends true ? boolean : never;
|
|
2968
2984
|
templateOptions?: {
|
|
2969
2985
|
[x: string]: string;
|
|
2970
2986
|
};
|
|
2971
2987
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2972
2988
|
maskedPhone: string;
|
|
2973
2989
|
}>>;
|
|
2974
|
-
whatsapp: <
|
|
2975
|
-
addToLoginIDs?:
|
|
2976
|
-
onMergeUseExisting?:
|
|
2990
|
+
whatsapp: <T_1_14 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
2991
|
+
addToLoginIDs?: T_1_14;
|
|
2992
|
+
onMergeUseExisting?: T_1_14 extends true ? boolean : never;
|
|
2977
2993
|
templateOptions?: {
|
|
2978
2994
|
[x: string]: string;
|
|
2979
2995
|
};
|
|
@@ -3104,9 +3120,9 @@ declare const getSdk: () => ((({
|
|
|
3104
3120
|
}>>;
|
|
3105
3121
|
};
|
|
3106
3122
|
update: {
|
|
3107
|
-
email: <
|
|
3108
|
-
addToLoginIDs?:
|
|
3109
|
-
onMergeUseExisting?:
|
|
3123
|
+
email: <T_2_4 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
3124
|
+
addToLoginIDs?: T_2_4;
|
|
3125
|
+
onMergeUseExisting?: T_2_4 extends true ? boolean : never;
|
|
3110
3126
|
templateOptions?: {
|
|
3111
3127
|
[x: string]: string;
|
|
3112
3128
|
};
|
|
@@ -3114,27 +3130,27 @@ declare const getSdk: () => ((({
|
|
|
3114
3130
|
maskedEmail: string;
|
|
3115
3131
|
}>>;
|
|
3116
3132
|
phone: {
|
|
3117
|
-
sms: <
|
|
3118
|
-
addToLoginIDs?:
|
|
3119
|
-
onMergeUseExisting?:
|
|
3133
|
+
sms: <T_3_12 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
3134
|
+
addToLoginIDs?: T_3_12;
|
|
3135
|
+
onMergeUseExisting?: T_3_12 extends true ? boolean : never;
|
|
3120
3136
|
templateOptions?: {
|
|
3121
3137
|
[x: string]: string;
|
|
3122
3138
|
};
|
|
3123
3139
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3124
3140
|
maskedPhone: string;
|
|
3125
3141
|
}>>;
|
|
3126
|
-
voice: <
|
|
3127
|
-
addToLoginIDs?:
|
|
3128
|
-
onMergeUseExisting?:
|
|
3142
|
+
voice: <T_3_13 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
3143
|
+
addToLoginIDs?: T_3_13;
|
|
3144
|
+
onMergeUseExisting?: T_3_13 extends true ? boolean : never;
|
|
3129
3145
|
templateOptions?: {
|
|
3130
3146
|
[x: string]: string;
|
|
3131
3147
|
};
|
|
3132
3148
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3133
3149
|
maskedPhone: string;
|
|
3134
3150
|
}>>;
|
|
3135
|
-
whatsapp: <
|
|
3136
|
-
addToLoginIDs?:
|
|
3137
|
-
onMergeUseExisting?:
|
|
3151
|
+
whatsapp: <T_3_14 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
3152
|
+
addToLoginIDs?: T_3_14;
|
|
3153
|
+
onMergeUseExisting?: T_3_14 extends true ? boolean : never;
|
|
3138
3154
|
templateOptions?: {
|
|
3139
3155
|
[x: string]: string;
|
|
3140
3156
|
};
|
|
@@ -3173,9 +3189,9 @@ declare const getSdk: () => ((({
|
|
|
3173
3189
|
timeoutMs: number;
|
|
3174
3190
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3175
3191
|
update: {
|
|
3176
|
-
email: <
|
|
3177
|
-
addToLoginIDs?:
|
|
3178
|
-
onMergeUseExisting?:
|
|
3192
|
+
email: <T_4_4 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
3193
|
+
addToLoginIDs?: T_4_4;
|
|
3194
|
+
onMergeUseExisting?: T_4_4 extends true ? boolean : never;
|
|
3179
3195
|
templateOptions?: {
|
|
3180
3196
|
[x: string]: string;
|
|
3181
3197
|
};
|
|
@@ -3291,6 +3307,7 @@ declare const getSdk: () => ((({
|
|
|
3291
3307
|
selectTenant: (tenantId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3292
3308
|
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
3293
3309
|
logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
3310
|
+
logoutPrevious: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
3294
3311
|
me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
|
|
3295
3312
|
myTenants: (tenants: true | string[], token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3296
3313
|
tenants: {
|
|
@@ -3393,8 +3410,12 @@ declare const getSdk: () => ((({
|
|
|
3393
3410
|
name?: string;
|
|
3394
3411
|
loginId?: string;
|
|
3395
3412
|
}, "loginId" | "name">;
|
|
3396
|
-
}, conditionInteractionId?: string, interactionId?: string, componentsVersion?: string, flowVersions?: Record<string, number>, input?:
|
|
3397
|
-
|
|
3413
|
+
}, conditionInteractionId?: string, interactionId?: string, componentsVersion?: string, flowVersions?: Record<string, number>, input?: {
|
|
3414
|
+
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any[])[])[])[])[])[])[])[])[])[])[];
|
|
3415
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
3416
|
+
next: (executionId: string, stepId: string, interactionId: string, version?: number, componentsVersion?: string, input?: {
|
|
3417
|
+
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any[])[])[])[])[])[])[])[])[])[])[];
|
|
3418
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
3398
3419
|
};
|
|
3399
3420
|
webauthn: {
|
|
3400
3421
|
signUp: ((identifier: string, name: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
|
|
@@ -3545,9 +3566,9 @@ declare const getSdk: () => ((({
|
|
|
3545
3566
|
}>>;
|
|
3546
3567
|
};
|
|
3547
3568
|
update: {
|
|
3548
|
-
email: <
|
|
3549
|
-
addToLoginIDs?:
|
|
3550
|
-
onMergeUseExisting?:
|
|
3569
|
+
email: <T_9 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
|
|
3570
|
+
addToLoginIDs?: T_9;
|
|
3571
|
+
onMergeUseExisting?: T_9 extends true ? boolean : never;
|
|
3551
3572
|
templateOptions?: {
|
|
3552
3573
|
[x: string]: string;
|
|
3553
3574
|
};
|
|
@@ -3555,27 +3576,27 @@ declare const getSdk: () => ((({
|
|
|
3555
3576
|
maskedEmail: string;
|
|
3556
3577
|
}>>;
|
|
3557
3578
|
phone: {
|
|
3558
|
-
sms: <
|
|
3559
|
-
addToLoginIDs?:
|
|
3560
|
-
onMergeUseExisting?:
|
|
3579
|
+
sms: <T_1_15 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
3580
|
+
addToLoginIDs?: T_1_15;
|
|
3581
|
+
onMergeUseExisting?: T_1_15 extends true ? boolean : never;
|
|
3561
3582
|
templateOptions?: {
|
|
3562
3583
|
[x: string]: string;
|
|
3563
3584
|
};
|
|
3564
3585
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3565
3586
|
maskedPhone: string;
|
|
3566
3587
|
}>>;
|
|
3567
|
-
voice: <
|
|
3568
|
-
addToLoginIDs?:
|
|
3569
|
-
onMergeUseExisting?:
|
|
3588
|
+
voice: <T_1_16 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
3589
|
+
addToLoginIDs?: T_1_16;
|
|
3590
|
+
onMergeUseExisting?: T_1_16 extends true ? boolean : never;
|
|
3570
3591
|
templateOptions?: {
|
|
3571
3592
|
[x: string]: string;
|
|
3572
3593
|
};
|
|
3573
3594
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3574
3595
|
maskedPhone: string;
|
|
3575
3596
|
}>>;
|
|
3576
|
-
whatsapp: <
|
|
3577
|
-
addToLoginIDs?:
|
|
3578
|
-
onMergeUseExisting?:
|
|
3597
|
+
whatsapp: <T_1_17 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
3598
|
+
addToLoginIDs?: T_1_17;
|
|
3599
|
+
onMergeUseExisting?: T_1_17 extends true ? boolean : never;
|
|
3579
3600
|
templateOptions?: {
|
|
3580
3601
|
[x: string]: string;
|
|
3581
3602
|
};
|
|
@@ -3706,9 +3727,9 @@ declare const getSdk: () => ((({
|
|
|
3706
3727
|
}>>;
|
|
3707
3728
|
};
|
|
3708
3729
|
update: {
|
|
3709
|
-
email: <
|
|
3710
|
-
addToLoginIDs?:
|
|
3711
|
-
onMergeUseExisting?:
|
|
3730
|
+
email: <T_2_5 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
3731
|
+
addToLoginIDs?: T_2_5;
|
|
3732
|
+
onMergeUseExisting?: T_2_5 extends true ? boolean : never;
|
|
3712
3733
|
templateOptions?: {
|
|
3713
3734
|
[x: string]: string;
|
|
3714
3735
|
};
|
|
@@ -3716,27 +3737,27 @@ declare const getSdk: () => ((({
|
|
|
3716
3737
|
maskedEmail: string;
|
|
3717
3738
|
}>>;
|
|
3718
3739
|
phone: {
|
|
3719
|
-
sms: <
|
|
3720
|
-
addToLoginIDs?:
|
|
3721
|
-
onMergeUseExisting?:
|
|
3740
|
+
sms: <T_3_15 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
3741
|
+
addToLoginIDs?: T_3_15;
|
|
3742
|
+
onMergeUseExisting?: T_3_15 extends true ? boolean : never;
|
|
3722
3743
|
templateOptions?: {
|
|
3723
3744
|
[x: string]: string;
|
|
3724
3745
|
};
|
|
3725
3746
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3726
3747
|
maskedPhone: string;
|
|
3727
3748
|
}>>;
|
|
3728
|
-
voice: <
|
|
3729
|
-
addToLoginIDs?:
|
|
3730
|
-
onMergeUseExisting?:
|
|
3749
|
+
voice: <T_3_16 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
3750
|
+
addToLoginIDs?: T_3_16;
|
|
3751
|
+
onMergeUseExisting?: T_3_16 extends true ? boolean : never;
|
|
3731
3752
|
templateOptions?: {
|
|
3732
3753
|
[x: string]: string;
|
|
3733
3754
|
};
|
|
3734
3755
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3735
3756
|
maskedPhone: string;
|
|
3736
3757
|
}>>;
|
|
3737
|
-
whatsapp: <
|
|
3738
|
-
addToLoginIDs?:
|
|
3739
|
-
onMergeUseExisting?:
|
|
3758
|
+
whatsapp: <T_3_17 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
3759
|
+
addToLoginIDs?: T_3_17;
|
|
3760
|
+
onMergeUseExisting?: T_3_17 extends true ? boolean : never;
|
|
3740
3761
|
templateOptions?: {
|
|
3741
3762
|
[x: string]: string;
|
|
3742
3763
|
};
|
|
@@ -3775,9 +3796,9 @@ declare const getSdk: () => ((({
|
|
|
3775
3796
|
timeoutMs: number;
|
|
3776
3797
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3777
3798
|
update: {
|
|
3778
|
-
email: <
|
|
3779
|
-
addToLoginIDs?:
|
|
3780
|
-
onMergeUseExisting?:
|
|
3799
|
+
email: <T_4_5 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
3800
|
+
addToLoginIDs?: T_4_5;
|
|
3801
|
+
onMergeUseExisting?: T_4_5 extends true ? boolean : never;
|
|
3781
3802
|
templateOptions?: {
|
|
3782
3803
|
[x: string]: string;
|
|
3783
3804
|
};
|
|
@@ -3893,6 +3914,7 @@ declare const getSdk: () => ((({
|
|
|
3893
3914
|
selectTenant: (tenantId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3894
3915
|
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
3895
3916
|
logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
3917
|
+
logoutPrevious: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
3896
3918
|
me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
|
|
3897
3919
|
myTenants: (tenants: true | string[], token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3898
3920
|
tenants: {
|
|
@@ -3957,7 +3979,27 @@ declare const getSdk: () => ((({
|
|
|
3957
3979
|
}) & {
|
|
3958
3980
|
getLastUserLoginId: () => string;
|
|
3959
3981
|
getLastUserDisplayName: () => string;
|
|
3960
|
-
})
|
|
3982
|
+
}) & {
|
|
3983
|
+
getRefreshToken: () => string;
|
|
3984
|
+
getSessionToken: () => string;
|
|
3985
|
+
});
|
|
3986
|
+
declare const useSession: () => {
|
|
3987
|
+
isLoading: vue.ComputedRef<boolean>;
|
|
3988
|
+
sessionToken: vue.Ref<string>;
|
|
3989
|
+
isAuthenticated: vue.ComputedRef<boolean>;
|
|
3990
|
+
};
|
|
3991
|
+
declare const useUser: () => {
|
|
3992
|
+
isLoading: vue.ComputedRef<boolean>;
|
|
3993
|
+
user: vue.Ref<_descope_core_js_sdk.UserResponse>;
|
|
3994
|
+
};
|
|
3995
|
+
|
|
3996
|
+
declare const routeGuard: () => Promise<boolean>;
|
|
3997
|
+
/**
|
|
3998
|
+
* This will return the Descope SDK instance
|
|
3999
|
+
* In order to get the SDK instance, this should be called after using the plugin
|
|
4000
|
+
* @returns Descope SDK
|
|
4001
|
+
*/
|
|
4002
|
+
declare const getSdk: () => ((({
|
|
3961
4003
|
refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3962
4004
|
flow: {
|
|
3963
4005
|
start: (flowId: string, options?: Pick<{
|
|
@@ -4001,8 +4043,12 @@ declare const getSdk: () => ((({
|
|
|
4001
4043
|
name?: string;
|
|
4002
4044
|
loginId?: string;
|
|
4003
4045
|
}, "loginId" | "name">;
|
|
4004
|
-
}, conditionInteractionId?: string, interactionId?: string, componentsVersion?: string, flowVersions?: Record<string, number>, input?:
|
|
4005
|
-
|
|
4046
|
+
}, conditionInteractionId?: string, interactionId?: string, componentsVersion?: string, flowVersions?: Record<string, number>, input?: {
|
|
4047
|
+
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any[])[])[])[])[])[])[])[])[])[])[];
|
|
4048
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
4049
|
+
next: (executionId: string, stepId: string, interactionId: string, version?: number, componentsVersion?: string, input?: {
|
|
4050
|
+
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any[])[])[])[])[])[])[])[])[])[])[];
|
|
4051
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
4006
4052
|
};
|
|
4007
4053
|
webauthn: {
|
|
4008
4054
|
signUp: ((identifier: string, name: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
|
|
@@ -4153,9 +4199,9 @@ declare const getSdk: () => ((({
|
|
|
4153
4199
|
}>>;
|
|
4154
4200
|
};
|
|
4155
4201
|
update: {
|
|
4156
|
-
email: <
|
|
4157
|
-
addToLoginIDs?:
|
|
4158
|
-
onMergeUseExisting?:
|
|
4202
|
+
email: <T extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
|
|
4203
|
+
addToLoginIDs?: T;
|
|
4204
|
+
onMergeUseExisting?: T extends true ? boolean : never;
|
|
4159
4205
|
templateOptions?: {
|
|
4160
4206
|
[x: string]: string;
|
|
4161
4207
|
};
|
|
@@ -4163,27 +4209,27 @@ declare const getSdk: () => ((({
|
|
|
4163
4209
|
maskedEmail: string;
|
|
4164
4210
|
}>>;
|
|
4165
4211
|
phone: {
|
|
4166
|
-
sms: <
|
|
4167
|
-
addToLoginIDs?:
|
|
4168
|
-
onMergeUseExisting?:
|
|
4212
|
+
sms: <T_1 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
4213
|
+
addToLoginIDs?: T_1;
|
|
4214
|
+
onMergeUseExisting?: T_1 extends true ? boolean : never;
|
|
4169
4215
|
templateOptions?: {
|
|
4170
4216
|
[x: string]: string;
|
|
4171
4217
|
};
|
|
4172
4218
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
4173
4219
|
maskedPhone: string;
|
|
4174
4220
|
}>>;
|
|
4175
|
-
voice: <
|
|
4176
|
-
addToLoginIDs?:
|
|
4177
|
-
onMergeUseExisting?:
|
|
4221
|
+
voice: <T_1_1 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
4222
|
+
addToLoginIDs?: T_1_1;
|
|
4223
|
+
onMergeUseExisting?: T_1_1 extends true ? boolean : never;
|
|
4178
4224
|
templateOptions?: {
|
|
4179
4225
|
[x: string]: string;
|
|
4180
4226
|
};
|
|
4181
4227
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
4182
4228
|
maskedPhone: string;
|
|
4183
4229
|
}>>;
|
|
4184
|
-
whatsapp: <
|
|
4185
|
-
addToLoginIDs?:
|
|
4186
|
-
onMergeUseExisting?:
|
|
4230
|
+
whatsapp: <T_1_2 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
4231
|
+
addToLoginIDs?: T_1_2;
|
|
4232
|
+
onMergeUseExisting?: T_1_2 extends true ? boolean : never;
|
|
4187
4233
|
templateOptions?: {
|
|
4188
4234
|
[x: string]: string;
|
|
4189
4235
|
};
|
|
@@ -4314,9 +4360,9 @@ declare const getSdk: () => ((({
|
|
|
4314
4360
|
}>>;
|
|
4315
4361
|
};
|
|
4316
4362
|
update: {
|
|
4317
|
-
email: <
|
|
4318
|
-
addToLoginIDs?:
|
|
4319
|
-
onMergeUseExisting?:
|
|
4363
|
+
email: <T_2 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
4364
|
+
addToLoginIDs?: T_2;
|
|
4365
|
+
onMergeUseExisting?: T_2 extends true ? boolean : never;
|
|
4320
4366
|
templateOptions?: {
|
|
4321
4367
|
[x: string]: string;
|
|
4322
4368
|
};
|
|
@@ -4324,27 +4370,27 @@ declare const getSdk: () => ((({
|
|
|
4324
4370
|
maskedEmail: string;
|
|
4325
4371
|
}>>;
|
|
4326
4372
|
phone: {
|
|
4327
|
-
sms: <
|
|
4328
|
-
addToLoginIDs?:
|
|
4329
|
-
onMergeUseExisting?:
|
|
4373
|
+
sms: <T_3 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
4374
|
+
addToLoginIDs?: T_3;
|
|
4375
|
+
onMergeUseExisting?: T_3 extends true ? boolean : never;
|
|
4330
4376
|
templateOptions?: {
|
|
4331
4377
|
[x: string]: string;
|
|
4332
4378
|
};
|
|
4333
4379
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
4334
4380
|
maskedPhone: string;
|
|
4335
4381
|
}>>;
|
|
4336
|
-
voice: <
|
|
4337
|
-
addToLoginIDs?:
|
|
4338
|
-
onMergeUseExisting?:
|
|
4382
|
+
voice: <T_3_1 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
4383
|
+
addToLoginIDs?: T_3_1;
|
|
4384
|
+
onMergeUseExisting?: T_3_1 extends true ? boolean : never;
|
|
4339
4385
|
templateOptions?: {
|
|
4340
4386
|
[x: string]: string;
|
|
4341
4387
|
};
|
|
4342
4388
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
4343
4389
|
maskedPhone: string;
|
|
4344
4390
|
}>>;
|
|
4345
|
-
whatsapp: <
|
|
4346
|
-
addToLoginIDs?:
|
|
4347
|
-
onMergeUseExisting?:
|
|
4391
|
+
whatsapp: <T_3_2 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
4392
|
+
addToLoginIDs?: T_3_2;
|
|
4393
|
+
onMergeUseExisting?: T_3_2 extends true ? boolean : never;
|
|
4348
4394
|
templateOptions?: {
|
|
4349
4395
|
[x: string]: string;
|
|
4350
4396
|
};
|
|
@@ -4383,9 +4429,9 @@ declare const getSdk: () => ((({
|
|
|
4383
4429
|
timeoutMs: number;
|
|
4384
4430
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
4385
4431
|
update: {
|
|
4386
|
-
email: <
|
|
4387
|
-
addToLoginIDs?:
|
|
4388
|
-
onMergeUseExisting?:
|
|
4432
|
+
email: <T_4 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
4433
|
+
addToLoginIDs?: T_4;
|
|
4434
|
+
onMergeUseExisting?: T_4 extends true ? boolean : never;
|
|
4389
4435
|
templateOptions?: {
|
|
4390
4436
|
[x: string]: string;
|
|
4391
4437
|
};
|
|
@@ -4501,6 +4547,7 @@ declare const getSdk: () => ((({
|
|
|
4501
4547
|
selectTenant: (tenantId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
4502
4548
|
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
4503
4549
|
logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
4550
|
+
logoutPrevious: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
4504
4551
|
me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
|
|
4505
4552
|
myTenants: (tenants: true | string[], token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
4506
4553
|
tenants: {
|
|
@@ -4603,8 +4650,12 @@ declare const getSdk: () => ((({
|
|
|
4603
4650
|
name?: string;
|
|
4604
4651
|
loginId?: string;
|
|
4605
4652
|
}, "loginId" | "name">;
|
|
4606
|
-
}, conditionInteractionId?: string, interactionId?: string, componentsVersion?: string, flowVersions?: Record<string, number>, input?:
|
|
4607
|
-
|
|
4653
|
+
}, conditionInteractionId?: string, interactionId?: string, componentsVersion?: string, flowVersions?: Record<string, number>, input?: {
|
|
4654
|
+
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any[])[])[])[])[])[])[])[])[])[])[];
|
|
4655
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
4656
|
+
next: (executionId: string, stepId: string, interactionId: string, version?: number, componentsVersion?: string, input?: {
|
|
4657
|
+
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any[])[])[])[])[])[])[])[])[])[])[];
|
|
4658
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
4608
4659
|
};
|
|
4609
4660
|
webauthn: {
|
|
4610
4661
|
signUp: ((identifier: string, name: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
|
|
@@ -4755,9 +4806,9 @@ declare const getSdk: () => ((({
|
|
|
4755
4806
|
}>>;
|
|
4756
4807
|
};
|
|
4757
4808
|
update: {
|
|
4758
|
-
email: <
|
|
4759
|
-
addToLoginIDs?:
|
|
4760
|
-
onMergeUseExisting?:
|
|
4809
|
+
email: <T_5 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
|
|
4810
|
+
addToLoginIDs?: T_5;
|
|
4811
|
+
onMergeUseExisting?: T_5 extends true ? boolean : never;
|
|
4761
4812
|
templateOptions?: {
|
|
4762
4813
|
[x: string]: string;
|
|
4763
4814
|
};
|
|
@@ -4765,27 +4816,27 @@ declare const getSdk: () => ((({
|
|
|
4765
4816
|
maskedEmail: string;
|
|
4766
4817
|
}>>;
|
|
4767
4818
|
phone: {
|
|
4768
|
-
sms: <
|
|
4769
|
-
addToLoginIDs?:
|
|
4770
|
-
onMergeUseExisting?:
|
|
4819
|
+
sms: <T_1_3 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
4820
|
+
addToLoginIDs?: T_1_3;
|
|
4821
|
+
onMergeUseExisting?: T_1_3 extends true ? boolean : never;
|
|
4771
4822
|
templateOptions?: {
|
|
4772
4823
|
[x: string]: string;
|
|
4773
4824
|
};
|
|
4774
4825
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
4775
4826
|
maskedPhone: string;
|
|
4776
4827
|
}>>;
|
|
4777
|
-
voice: <
|
|
4778
|
-
addToLoginIDs?:
|
|
4779
|
-
onMergeUseExisting?:
|
|
4828
|
+
voice: <T_1_4 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
4829
|
+
addToLoginIDs?: T_1_4;
|
|
4830
|
+
onMergeUseExisting?: T_1_4 extends true ? boolean : never;
|
|
4780
4831
|
templateOptions?: {
|
|
4781
4832
|
[x: string]: string;
|
|
4782
4833
|
};
|
|
4783
4834
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
4784
4835
|
maskedPhone: string;
|
|
4785
4836
|
}>>;
|
|
4786
|
-
whatsapp: <
|
|
4787
|
-
addToLoginIDs?:
|
|
4788
|
-
onMergeUseExisting?:
|
|
4837
|
+
whatsapp: <T_1_5 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
4838
|
+
addToLoginIDs?: T_1_5;
|
|
4839
|
+
onMergeUseExisting?: T_1_5 extends true ? boolean : never;
|
|
4789
4840
|
templateOptions?: {
|
|
4790
4841
|
[x: string]: string;
|
|
4791
4842
|
};
|
|
@@ -4916,9 +4967,9 @@ declare const getSdk: () => ((({
|
|
|
4916
4967
|
}>>;
|
|
4917
4968
|
};
|
|
4918
4969
|
update: {
|
|
4919
|
-
email: <
|
|
4920
|
-
addToLoginIDs?:
|
|
4921
|
-
onMergeUseExisting?:
|
|
4970
|
+
email: <T_2_1 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
4971
|
+
addToLoginIDs?: T_2_1;
|
|
4972
|
+
onMergeUseExisting?: T_2_1 extends true ? boolean : never;
|
|
4922
4973
|
templateOptions?: {
|
|
4923
4974
|
[x: string]: string;
|
|
4924
4975
|
};
|
|
@@ -4926,27 +4977,27 @@ declare const getSdk: () => ((({
|
|
|
4926
4977
|
maskedEmail: string;
|
|
4927
4978
|
}>>;
|
|
4928
4979
|
phone: {
|
|
4929
|
-
sms: <
|
|
4930
|
-
addToLoginIDs?:
|
|
4931
|
-
onMergeUseExisting?:
|
|
4980
|
+
sms: <T_3_3 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
4981
|
+
addToLoginIDs?: T_3_3;
|
|
4982
|
+
onMergeUseExisting?: T_3_3 extends true ? boolean : never;
|
|
4932
4983
|
templateOptions?: {
|
|
4933
4984
|
[x: string]: string;
|
|
4934
4985
|
};
|
|
4935
4986
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
4936
4987
|
maskedPhone: string;
|
|
4937
4988
|
}>>;
|
|
4938
|
-
voice: <
|
|
4939
|
-
addToLoginIDs?:
|
|
4940
|
-
onMergeUseExisting?:
|
|
4989
|
+
voice: <T_3_4 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
4990
|
+
addToLoginIDs?: T_3_4;
|
|
4991
|
+
onMergeUseExisting?: T_3_4 extends true ? boolean : never;
|
|
4941
4992
|
templateOptions?: {
|
|
4942
4993
|
[x: string]: string;
|
|
4943
4994
|
};
|
|
4944
4995
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
4945
4996
|
maskedPhone: string;
|
|
4946
4997
|
}>>;
|
|
4947
|
-
whatsapp: <
|
|
4948
|
-
addToLoginIDs?:
|
|
4949
|
-
onMergeUseExisting?:
|
|
4998
|
+
whatsapp: <T_3_5 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
4999
|
+
addToLoginIDs?: T_3_5;
|
|
5000
|
+
onMergeUseExisting?: T_3_5 extends true ? boolean : never;
|
|
4950
5001
|
templateOptions?: {
|
|
4951
5002
|
[x: string]: string;
|
|
4952
5003
|
};
|
|
@@ -4985,9 +5036,2443 @@ declare const getSdk: () => ((({
|
|
|
4985
5036
|
timeoutMs: number;
|
|
4986
5037
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
4987
5038
|
update: {
|
|
4988
|
-
email: <
|
|
4989
|
-
addToLoginIDs?:
|
|
4990
|
-
onMergeUseExisting?:
|
|
5039
|
+
email: <T_4_1 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
5040
|
+
addToLoginIDs?: T_4_1;
|
|
5041
|
+
onMergeUseExisting?: T_4_1 extends true ? boolean : never;
|
|
5042
|
+
templateOptions?: {
|
|
5043
|
+
[x: string]: string;
|
|
5044
|
+
};
|
|
5045
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
5046
|
+
};
|
|
5047
|
+
};
|
|
5048
|
+
oauth: {
|
|
5049
|
+
start: ((provider: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>) & {
|
|
5050
|
+
google: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
5051
|
+
facebook: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
5052
|
+
github: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
5053
|
+
microsoft: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
5054
|
+
gitlab: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
5055
|
+
apple: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
5056
|
+
discord: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
5057
|
+
linkedin: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
5058
|
+
slack: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
5059
|
+
};
|
|
5060
|
+
exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
5061
|
+
startNative: (provider: string, loginOptions?: _descope_core_js_sdk.LoginOptions, implicit?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
5062
|
+
finishNative: (provider: string, stateId: string, user?: string, code?: string, idToken?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
5063
|
+
};
|
|
5064
|
+
saml: {
|
|
5065
|
+
start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
5066
|
+
exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
5067
|
+
};
|
|
5068
|
+
totp: {
|
|
5069
|
+
signUp: (loginId: string, user?: {
|
|
5070
|
+
email?: string;
|
|
5071
|
+
name?: string;
|
|
5072
|
+
givenName?: string;
|
|
5073
|
+
middleName?: string;
|
|
5074
|
+
familyName?: string;
|
|
5075
|
+
phone?: string;
|
|
5076
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.TOTPResponse>>;
|
|
5077
|
+
verify: (loginId: string, code: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
5078
|
+
update: (loginId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.TOTPResponse>>;
|
|
5079
|
+
};
|
|
5080
|
+
notp: {
|
|
5081
|
+
signUpOrIn: (loginId?: string, signUpOptions?: {
|
|
5082
|
+
customClaims?: Record<string, any>;
|
|
5083
|
+
templateId?: string;
|
|
5084
|
+
templateOptions?: {
|
|
5085
|
+
[x: string]: string;
|
|
5086
|
+
};
|
|
5087
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5088
|
+
pendingRef: string;
|
|
5089
|
+
redirectUrl: string;
|
|
5090
|
+
image: string;
|
|
5091
|
+
}>>;
|
|
5092
|
+
signUp: (loginId?: string, user?: {
|
|
5093
|
+
email?: string;
|
|
5094
|
+
name?: string;
|
|
5095
|
+
givenName?: string;
|
|
5096
|
+
middleName?: string;
|
|
5097
|
+
familyName?: string;
|
|
5098
|
+
phone?: string;
|
|
5099
|
+
}, signUpOptions?: {
|
|
5100
|
+
customClaims?: Record<string, any>;
|
|
5101
|
+
templateId?: string;
|
|
5102
|
+
templateOptions?: {
|
|
5103
|
+
[x: string]: string;
|
|
5104
|
+
};
|
|
5105
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5106
|
+
pendingRef: string;
|
|
5107
|
+
redirectUrl: string;
|
|
5108
|
+
image: string;
|
|
5109
|
+
}>>;
|
|
5110
|
+
signIn: (loginId?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5111
|
+
pendingRef: string;
|
|
5112
|
+
redirectUrl: string;
|
|
5113
|
+
image: string;
|
|
5114
|
+
}>>;
|
|
5115
|
+
waitForSession: (pendingRef: string, config?: {
|
|
5116
|
+
pollingIntervalMs: number;
|
|
5117
|
+
timeoutMs: number;
|
|
5118
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
5119
|
+
};
|
|
5120
|
+
password: {
|
|
5121
|
+
signUp: (loginId: string, password: string, user?: {
|
|
5122
|
+
email?: string;
|
|
5123
|
+
name?: string;
|
|
5124
|
+
givenName?: string;
|
|
5125
|
+
middleName?: string;
|
|
5126
|
+
familyName?: string;
|
|
5127
|
+
phone?: string;
|
|
5128
|
+
}, signUpOptions?: {
|
|
5129
|
+
customClaims?: Record<string, any>;
|
|
5130
|
+
templateId?: string;
|
|
5131
|
+
templateOptions?: {
|
|
5132
|
+
[x: string]: string;
|
|
5133
|
+
};
|
|
5134
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
5135
|
+
signIn: (loginId: string, password: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
5136
|
+
sendReset: (loginId: string, redirectUrl?: string, templateOptions?: {
|
|
5137
|
+
[x: string]: string;
|
|
5138
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5139
|
+
resetMethod: string;
|
|
5140
|
+
pendingRef?: string;
|
|
5141
|
+
linkId?: string;
|
|
5142
|
+
maskedEmail: string;
|
|
5143
|
+
}>>;
|
|
5144
|
+
update: (loginId: string, newPassword: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
5145
|
+
replace: (loginId: string, oldPassword: string, newPassword: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
5146
|
+
policy: () => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5147
|
+
minLength: number;
|
|
5148
|
+
lowercase: boolean;
|
|
5149
|
+
uppercase: boolean;
|
|
5150
|
+
number: boolean;
|
|
5151
|
+
nonAlphanumeric: boolean;
|
|
5152
|
+
}>>;
|
|
5153
|
+
};
|
|
5154
|
+
selectTenant: (tenantId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
5155
|
+
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
5156
|
+
logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
5157
|
+
logoutPrevious: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
5158
|
+
me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
|
|
5159
|
+
myTenants: (tenants: true | string[], token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5160
|
+
tenants: {
|
|
5161
|
+
id: string;
|
|
5162
|
+
name: string;
|
|
5163
|
+
customAttributes?: Record<string, any>;
|
|
5164
|
+
}[];
|
|
5165
|
+
}>>;
|
|
5166
|
+
history: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserHistoryResponse>>;
|
|
5167
|
+
isJwtExpired: (token: string) => boolean;
|
|
5168
|
+
getTenants: (token: string) => string[];
|
|
5169
|
+
getJwtPermissions: (token: string, tenant?: string) => string[];
|
|
5170
|
+
getJwtRoles: (token: string, tenant?: string) => string[];
|
|
5171
|
+
httpClient: {
|
|
5172
|
+
get: (path: string, config?: {
|
|
5173
|
+
headers?: HeadersInit;
|
|
5174
|
+
queryParams?: {
|
|
5175
|
+
[key: string]: string;
|
|
5176
|
+
};
|
|
5177
|
+
token?: string;
|
|
5178
|
+
}) => Promise<Response>;
|
|
5179
|
+
post: (path: string, body?: any, config?: {
|
|
5180
|
+
headers?: HeadersInit;
|
|
5181
|
+
queryParams?: {
|
|
5182
|
+
[key: string]: string;
|
|
5183
|
+
};
|
|
5184
|
+
token?: string;
|
|
5185
|
+
}) => Promise<Response>;
|
|
5186
|
+
patch: (path: string, body?: any, config?: {
|
|
5187
|
+
headers?: HeadersInit;
|
|
5188
|
+
queryParams?: {
|
|
5189
|
+
[key: string]: string;
|
|
5190
|
+
};
|
|
5191
|
+
token?: string;
|
|
5192
|
+
}) => Promise<Response>;
|
|
5193
|
+
put: (path: string, body?: any, config?: {
|
|
5194
|
+
headers?: HeadersInit;
|
|
5195
|
+
queryParams?: {
|
|
5196
|
+
[key: string]: string;
|
|
5197
|
+
};
|
|
5198
|
+
token?: string;
|
|
5199
|
+
}) => Promise<Response>;
|
|
5200
|
+
delete: (path: string, config?: {
|
|
5201
|
+
headers?: HeadersInit;
|
|
5202
|
+
queryParams?: {
|
|
5203
|
+
[key: string]: string;
|
|
5204
|
+
};
|
|
5205
|
+
token?: string;
|
|
5206
|
+
}) => Promise<Response>;
|
|
5207
|
+
hooks?: {
|
|
5208
|
+
beforeRequest?: (config: _descope_core_js_sdk.RequestConfig) => _descope_core_js_sdk.RequestConfig;
|
|
5209
|
+
afterRequest?: (req: _descope_core_js_sdk.RequestConfig, res: Response) => void | Promise<void>;
|
|
5210
|
+
transformResponse?: (mutableResponse: _descope_core_js_sdk.ExtendedResponse) => Promise<_descope_core_js_sdk.ExtendedResponse>;
|
|
5211
|
+
};
|
|
5212
|
+
buildUrl: (path: string, queryParams?: {
|
|
5213
|
+
[key: string]: string;
|
|
5214
|
+
}) => string;
|
|
5215
|
+
};
|
|
5216
|
+
} | {
|
|
5217
|
+
refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
5218
|
+
flow: {
|
|
5219
|
+
start: (flowId: string, options?: Pick<{
|
|
5220
|
+
redirectUrl?: string;
|
|
5221
|
+
location?: string;
|
|
5222
|
+
tenant?: string;
|
|
5223
|
+
deviceInfo?: {
|
|
5224
|
+
webAuthnSupport?: boolean;
|
|
5225
|
+
};
|
|
5226
|
+
lastAuth?: {
|
|
5227
|
+
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
5228
|
+
oauthProvider?: string;
|
|
5229
|
+
name?: string;
|
|
5230
|
+
loginId?: string;
|
|
5231
|
+
};
|
|
5232
|
+
redirectAuth?: {
|
|
5233
|
+
callbackUrl: string;
|
|
5234
|
+
codeChallenge: string;
|
|
5235
|
+
};
|
|
5236
|
+
oidcIdpStateId?: string;
|
|
5237
|
+
preview?: boolean;
|
|
5238
|
+
samlIdpStateId?: string;
|
|
5239
|
+
samlIdpUsername?: string;
|
|
5240
|
+
ssoAppId?: string;
|
|
5241
|
+
oidcLoginHint?: string;
|
|
5242
|
+
abTestingKey?: number;
|
|
5243
|
+
startOptionsVersion?: number;
|
|
5244
|
+
client?: Record<string, any>;
|
|
5245
|
+
locale?: string;
|
|
5246
|
+
oidcPrompt?: string;
|
|
5247
|
+
oidcErrorRedirectUri?: string;
|
|
5248
|
+
nativeOptions?: {
|
|
5249
|
+
platform: "ios" | "android";
|
|
5250
|
+
oauthProvider?: string;
|
|
5251
|
+
oauthRedirect?: string;
|
|
5252
|
+
};
|
|
5253
|
+
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "nativeOptions"> & {
|
|
5254
|
+
lastAuth?: Omit<{
|
|
5255
|
+
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
5256
|
+
oauthProvider?: string;
|
|
5257
|
+
name?: string;
|
|
5258
|
+
loginId?: string;
|
|
5259
|
+
}, "loginId" | "name">;
|
|
5260
|
+
}, conditionInteractionId?: string, interactionId?: string, componentsVersion?: string, flowVersions?: Record<string, number>, input?: {
|
|
5261
|
+
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any[])[])[])[])[])[])[])[])[])[])[];
|
|
5262
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
5263
|
+
next: (executionId: string, stepId: string, interactionId: string, version?: number, componentsVersion?: string, input?: {
|
|
5264
|
+
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any[])[])[])[])[])[])[])[])[])[])[];
|
|
5265
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
5266
|
+
};
|
|
5267
|
+
webauthn: {
|
|
5268
|
+
signUp: ((identifier: string, name: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
|
|
5269
|
+
start: (loginId: string, origin: string, name: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5270
|
+
transactionId: string;
|
|
5271
|
+
options: string;
|
|
5272
|
+
create: boolean;
|
|
5273
|
+
}>>;
|
|
5274
|
+
finish: (transactionId: string, response: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
5275
|
+
};
|
|
5276
|
+
signIn: ((identifier: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
|
|
5277
|
+
start: (loginId: string, origin: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5278
|
+
transactionId: string;
|
|
5279
|
+
options: string;
|
|
5280
|
+
create: boolean;
|
|
5281
|
+
}>>;
|
|
5282
|
+
finish: (transactionId: string, response: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
5283
|
+
};
|
|
5284
|
+
signUpOrIn: ((identifier: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
|
|
5285
|
+
start: (loginId: string, origin: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5286
|
+
transactionId: string;
|
|
5287
|
+
options: string;
|
|
5288
|
+
create: boolean;
|
|
5289
|
+
}>>;
|
|
5290
|
+
};
|
|
5291
|
+
update: ((identifier: string, token: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>) & {
|
|
5292
|
+
start: (loginId: string, origin: string, token: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5293
|
+
transactionId: string;
|
|
5294
|
+
options: string;
|
|
5295
|
+
create: boolean;
|
|
5296
|
+
}>>;
|
|
5297
|
+
finish: (transactionId: string, response: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
5298
|
+
};
|
|
5299
|
+
helpers: {
|
|
5300
|
+
create: (options: string) => Promise<string>;
|
|
5301
|
+
get: (options: string) => Promise<string>;
|
|
5302
|
+
isSupported: (requirePlatformAuthenticator?: boolean) => Promise<boolean>;
|
|
5303
|
+
conditional: (options: string, abort: AbortController) => Promise<string>;
|
|
5304
|
+
};
|
|
5305
|
+
};
|
|
5306
|
+
fedcm: {
|
|
5307
|
+
oneTap(provider?: string, oneTapConfig?: _descope_web_js_sdk.OneTapConfig, loginOptions?: _descope_core_js_sdk.LoginOptions, onSkip?: () => void): Promise<unknown>;
|
|
5308
|
+
launch(context?: "signin" | "signup" | "use" | "continue"): Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
5309
|
+
isSupported(): boolean;
|
|
5310
|
+
};
|
|
5311
|
+
accessKey: {
|
|
5312
|
+
exchange: (accessKey: string, loginOptions?: _descope_core_js_sdk.AccessKeyLoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
|
|
5313
|
+
};
|
|
5314
|
+
otp: {
|
|
5315
|
+
verify: {
|
|
5316
|
+
sms: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
5317
|
+
voice: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
5318
|
+
whatsapp: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
5319
|
+
email: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
5320
|
+
};
|
|
5321
|
+
signIn: {
|
|
5322
|
+
sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5323
|
+
maskedPhone: string;
|
|
5324
|
+
}>>;
|
|
5325
|
+
voice: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5326
|
+
maskedPhone: string;
|
|
5327
|
+
}>>;
|
|
5328
|
+
whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5329
|
+
maskedPhone: string;
|
|
5330
|
+
}>>;
|
|
5331
|
+
email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5332
|
+
maskedEmail: string;
|
|
5333
|
+
}>>;
|
|
5334
|
+
};
|
|
5335
|
+
signUp: {
|
|
5336
|
+
sms: (loginId: string, user?: {
|
|
5337
|
+
email?: string;
|
|
5338
|
+
name?: string;
|
|
5339
|
+
givenName?: string;
|
|
5340
|
+
middleName?: string;
|
|
5341
|
+
familyName?: string;
|
|
5342
|
+
phone?: string;
|
|
5343
|
+
}, signUpOptions?: {
|
|
5344
|
+
customClaims?: Record<string, any>;
|
|
5345
|
+
templateId?: string;
|
|
5346
|
+
templateOptions?: {
|
|
5347
|
+
[x: string]: string;
|
|
5348
|
+
};
|
|
5349
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5350
|
+
maskedPhone: string;
|
|
5351
|
+
}>>;
|
|
5352
|
+
voice: (loginId: string, user?: {
|
|
5353
|
+
email?: string;
|
|
5354
|
+
name?: string;
|
|
5355
|
+
givenName?: string;
|
|
5356
|
+
middleName?: string;
|
|
5357
|
+
familyName?: string;
|
|
5358
|
+
phone?: string;
|
|
5359
|
+
}, signUpOptions?: {
|
|
5360
|
+
customClaims?: Record<string, any>;
|
|
5361
|
+
templateId?: string;
|
|
5362
|
+
templateOptions?: {
|
|
5363
|
+
[x: string]: string;
|
|
5364
|
+
};
|
|
5365
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5366
|
+
maskedPhone: string;
|
|
5367
|
+
}>>;
|
|
5368
|
+
whatsapp: (loginId: string, user?: {
|
|
5369
|
+
email?: string;
|
|
5370
|
+
name?: string;
|
|
5371
|
+
givenName?: string;
|
|
5372
|
+
middleName?: string;
|
|
5373
|
+
familyName?: string;
|
|
5374
|
+
phone?: string;
|
|
5375
|
+
}, signUpOptions?: {
|
|
5376
|
+
customClaims?: Record<string, any>;
|
|
5377
|
+
templateId?: string;
|
|
5378
|
+
templateOptions?: {
|
|
5379
|
+
[x: string]: string;
|
|
5380
|
+
};
|
|
5381
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5382
|
+
maskedPhone: string;
|
|
5383
|
+
}>>;
|
|
5384
|
+
email: (loginId: string, user?: {
|
|
5385
|
+
email?: string;
|
|
5386
|
+
name?: string;
|
|
5387
|
+
givenName?: string;
|
|
5388
|
+
middleName?: string;
|
|
5389
|
+
familyName?: string;
|
|
5390
|
+
phone?: string;
|
|
5391
|
+
}, signUpOptions?: {
|
|
5392
|
+
customClaims?: Record<string, any>;
|
|
5393
|
+
templateId?: string;
|
|
5394
|
+
templateOptions?: {
|
|
5395
|
+
[x: string]: string;
|
|
5396
|
+
};
|
|
5397
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5398
|
+
maskedEmail: string;
|
|
5399
|
+
}>>;
|
|
5400
|
+
};
|
|
5401
|
+
signUpOrIn: {
|
|
5402
|
+
sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5403
|
+
maskedPhone: string;
|
|
5404
|
+
}>>;
|
|
5405
|
+
voice: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5406
|
+
maskedPhone: string;
|
|
5407
|
+
}>>;
|
|
5408
|
+
whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5409
|
+
maskedPhone: string;
|
|
5410
|
+
}>>;
|
|
5411
|
+
email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5412
|
+
maskedEmail: string;
|
|
5413
|
+
}>>;
|
|
5414
|
+
};
|
|
5415
|
+
update: {
|
|
5416
|
+
email: <T_6 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
|
|
5417
|
+
addToLoginIDs?: T_6;
|
|
5418
|
+
onMergeUseExisting?: T_6 extends true ? boolean : never;
|
|
5419
|
+
templateOptions?: {
|
|
5420
|
+
[x: string]: string;
|
|
5421
|
+
};
|
|
5422
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5423
|
+
maskedEmail: string;
|
|
5424
|
+
}>>;
|
|
5425
|
+
phone: {
|
|
5426
|
+
sms: <T_1_6 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
5427
|
+
addToLoginIDs?: T_1_6;
|
|
5428
|
+
onMergeUseExisting?: T_1_6 extends true ? boolean : never;
|
|
5429
|
+
templateOptions?: {
|
|
5430
|
+
[x: string]: string;
|
|
5431
|
+
};
|
|
5432
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5433
|
+
maskedPhone: string;
|
|
5434
|
+
}>>;
|
|
5435
|
+
voice: <T_1_7 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
5436
|
+
addToLoginIDs?: T_1_7;
|
|
5437
|
+
onMergeUseExisting?: T_1_7 extends true ? boolean : never;
|
|
5438
|
+
templateOptions?: {
|
|
5439
|
+
[x: string]: string;
|
|
5440
|
+
};
|
|
5441
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5442
|
+
maskedPhone: string;
|
|
5443
|
+
}>>;
|
|
5444
|
+
whatsapp: <T_1_8 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
5445
|
+
addToLoginIDs?: T_1_8;
|
|
5446
|
+
onMergeUseExisting?: T_1_8 extends true ? boolean : never;
|
|
5447
|
+
templateOptions?: {
|
|
5448
|
+
[x: string]: string;
|
|
5449
|
+
};
|
|
5450
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5451
|
+
maskedPhone: string;
|
|
5452
|
+
}>>;
|
|
5453
|
+
};
|
|
5454
|
+
};
|
|
5455
|
+
};
|
|
5456
|
+
magicLink: {
|
|
5457
|
+
verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
5458
|
+
signIn: {
|
|
5459
|
+
sms: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5460
|
+
maskedPhone: string;
|
|
5461
|
+
}>>;
|
|
5462
|
+
voice: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5463
|
+
maskedPhone: string;
|
|
5464
|
+
}>>;
|
|
5465
|
+
whatsapp: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5466
|
+
maskedPhone: string;
|
|
5467
|
+
}>>;
|
|
5468
|
+
email: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5469
|
+
maskedEmail: string;
|
|
5470
|
+
}>>;
|
|
5471
|
+
};
|
|
5472
|
+
signUp: {
|
|
5473
|
+
sms: (loginId: string, URI: string, user?: {
|
|
5474
|
+
email?: string;
|
|
5475
|
+
name?: string;
|
|
5476
|
+
givenName?: string;
|
|
5477
|
+
middleName?: string;
|
|
5478
|
+
familyName?: string;
|
|
5479
|
+
phone?: string;
|
|
5480
|
+
}, signUpOptions?: {
|
|
5481
|
+
customClaims?: Record<string, any>;
|
|
5482
|
+
templateId?: string;
|
|
5483
|
+
templateOptions?: {
|
|
5484
|
+
[x: string]: string;
|
|
5485
|
+
};
|
|
5486
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5487
|
+
maskedPhone: string;
|
|
5488
|
+
}>>;
|
|
5489
|
+
voice: (loginId: string, URI: string, user?: {
|
|
5490
|
+
email?: string;
|
|
5491
|
+
name?: string;
|
|
5492
|
+
givenName?: string;
|
|
5493
|
+
middleName?: string;
|
|
5494
|
+
familyName?: string;
|
|
5495
|
+
phone?: string;
|
|
5496
|
+
}, signUpOptions?: {
|
|
5497
|
+
customClaims?: Record<string, any>;
|
|
5498
|
+
templateId?: string;
|
|
5499
|
+
templateOptions?: {
|
|
5500
|
+
[x: string]: string;
|
|
5501
|
+
};
|
|
5502
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5503
|
+
maskedPhone: string;
|
|
5504
|
+
}>>;
|
|
5505
|
+
whatsapp: (loginId: string, URI: string, user?: {
|
|
5506
|
+
email?: string;
|
|
5507
|
+
name?: string;
|
|
5508
|
+
givenName?: string;
|
|
5509
|
+
middleName?: string;
|
|
5510
|
+
familyName?: string;
|
|
5511
|
+
phone?: string;
|
|
5512
|
+
}, signUpOptions?: {
|
|
5513
|
+
customClaims?: Record<string, any>;
|
|
5514
|
+
templateId?: string;
|
|
5515
|
+
templateOptions?: {
|
|
5516
|
+
[x: string]: string;
|
|
5517
|
+
};
|
|
5518
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5519
|
+
maskedPhone: string;
|
|
5520
|
+
}>>;
|
|
5521
|
+
email: (loginId: string, URI: string, user?: {
|
|
5522
|
+
email?: string;
|
|
5523
|
+
name?: string;
|
|
5524
|
+
givenName?: string;
|
|
5525
|
+
middleName?: string;
|
|
5526
|
+
familyName?: string;
|
|
5527
|
+
phone?: string;
|
|
5528
|
+
}, signUpOptions?: {
|
|
5529
|
+
customClaims?: Record<string, any>;
|
|
5530
|
+
templateId?: string;
|
|
5531
|
+
templateOptions?: {
|
|
5532
|
+
[x: string]: string;
|
|
5533
|
+
};
|
|
5534
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5535
|
+
maskedEmail: string;
|
|
5536
|
+
}>>;
|
|
5537
|
+
};
|
|
5538
|
+
signUpOrIn: {
|
|
5539
|
+
sms: (loginId: string, URI?: string, signUpOptions?: {
|
|
5540
|
+
customClaims?: Record<string, any>;
|
|
5541
|
+
templateId?: string;
|
|
5542
|
+
templateOptions?: {
|
|
5543
|
+
[x: string]: string;
|
|
5544
|
+
};
|
|
5545
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5546
|
+
maskedPhone: string;
|
|
5547
|
+
}>>;
|
|
5548
|
+
voice: (loginId: string, URI?: string, signUpOptions?: {
|
|
5549
|
+
customClaims?: Record<string, any>;
|
|
5550
|
+
templateId?: string;
|
|
5551
|
+
templateOptions?: {
|
|
5552
|
+
[x: string]: string;
|
|
5553
|
+
};
|
|
5554
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5555
|
+
maskedPhone: string;
|
|
5556
|
+
}>>;
|
|
5557
|
+
whatsapp: (loginId: string, URI?: string, signUpOptions?: {
|
|
5558
|
+
customClaims?: Record<string, any>;
|
|
5559
|
+
templateId?: string;
|
|
5560
|
+
templateOptions?: {
|
|
5561
|
+
[x: string]: string;
|
|
5562
|
+
};
|
|
5563
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5564
|
+
maskedPhone: string;
|
|
5565
|
+
}>>;
|
|
5566
|
+
email: (loginId: string, URI?: string, signUpOptions?: {
|
|
5567
|
+
customClaims?: Record<string, any>;
|
|
5568
|
+
templateId?: string;
|
|
5569
|
+
templateOptions?: {
|
|
5570
|
+
[x: string]: string;
|
|
5571
|
+
};
|
|
5572
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5573
|
+
maskedEmail: string;
|
|
5574
|
+
}>>;
|
|
5575
|
+
};
|
|
5576
|
+
update: {
|
|
5577
|
+
email: <T_2_2 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
5578
|
+
addToLoginIDs?: T_2_2;
|
|
5579
|
+
onMergeUseExisting?: T_2_2 extends true ? boolean : never;
|
|
5580
|
+
templateOptions?: {
|
|
5581
|
+
[x: string]: string;
|
|
5582
|
+
};
|
|
5583
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5584
|
+
maskedEmail: string;
|
|
5585
|
+
}>>;
|
|
5586
|
+
phone: {
|
|
5587
|
+
sms: <T_3_6 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
5588
|
+
addToLoginIDs?: T_3_6;
|
|
5589
|
+
onMergeUseExisting?: T_3_6 extends true ? boolean : never;
|
|
5590
|
+
templateOptions?: {
|
|
5591
|
+
[x: string]: string;
|
|
5592
|
+
};
|
|
5593
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5594
|
+
maskedPhone: string;
|
|
5595
|
+
}>>;
|
|
5596
|
+
voice: <T_3_7 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
5597
|
+
addToLoginIDs?: T_3_7;
|
|
5598
|
+
onMergeUseExisting?: T_3_7 extends true ? boolean : never;
|
|
5599
|
+
templateOptions?: {
|
|
5600
|
+
[x: string]: string;
|
|
5601
|
+
};
|
|
5602
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5603
|
+
maskedPhone: string;
|
|
5604
|
+
}>>;
|
|
5605
|
+
whatsapp: <T_3_8 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
5606
|
+
addToLoginIDs?: T_3_8;
|
|
5607
|
+
onMergeUseExisting?: T_3_8 extends true ? boolean : never;
|
|
5608
|
+
templateOptions?: {
|
|
5609
|
+
[x: string]: string;
|
|
5610
|
+
};
|
|
5611
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5612
|
+
maskedPhone: string;
|
|
5613
|
+
}>>;
|
|
5614
|
+
};
|
|
5615
|
+
};
|
|
5616
|
+
};
|
|
5617
|
+
enchantedLink: {
|
|
5618
|
+
verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
5619
|
+
signIn: (loginId: string, URI?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
5620
|
+
signUpOrIn: (loginId: string, URI?: string, signUpOptions?: {
|
|
5621
|
+
customClaims?: Record<string, any>;
|
|
5622
|
+
templateId?: string;
|
|
5623
|
+
templateOptions?: {
|
|
5624
|
+
[x: string]: string;
|
|
5625
|
+
};
|
|
5626
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
5627
|
+
signUp: (loginId: string, URI?: string, user?: {
|
|
5628
|
+
email?: string;
|
|
5629
|
+
name?: string;
|
|
5630
|
+
givenName?: string;
|
|
5631
|
+
middleName?: string;
|
|
5632
|
+
familyName?: string;
|
|
5633
|
+
phone?: string;
|
|
5634
|
+
}, signUpOptions?: {
|
|
5635
|
+
customClaims?: Record<string, any>;
|
|
5636
|
+
templateId?: string;
|
|
5637
|
+
templateOptions?: {
|
|
5638
|
+
[x: string]: string;
|
|
5639
|
+
};
|
|
5640
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
5641
|
+
waitForSession: (pendingRef: string, config?: {
|
|
5642
|
+
pollingIntervalMs: number;
|
|
5643
|
+
timeoutMs: number;
|
|
5644
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
5645
|
+
update: {
|
|
5646
|
+
email: <T_4_2 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
5647
|
+
addToLoginIDs?: T_4_2;
|
|
5648
|
+
onMergeUseExisting?: T_4_2 extends true ? boolean : never;
|
|
5649
|
+
templateOptions?: {
|
|
5650
|
+
[x: string]: string;
|
|
5651
|
+
};
|
|
5652
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
5653
|
+
};
|
|
5654
|
+
};
|
|
5655
|
+
oauth: {
|
|
5656
|
+
start: ((provider: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>) & {
|
|
5657
|
+
google: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
5658
|
+
facebook: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
5659
|
+
github: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
5660
|
+
microsoft: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
5661
|
+
gitlab: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
5662
|
+
apple: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
5663
|
+
discord: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
5664
|
+
linkedin: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
5665
|
+
slack: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
5666
|
+
};
|
|
5667
|
+
exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
5668
|
+
startNative: (provider: string, loginOptions?: _descope_core_js_sdk.LoginOptions, implicit?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
5669
|
+
finishNative: (provider: string, stateId: string, user?: string, code?: string, idToken?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
5670
|
+
};
|
|
5671
|
+
saml: {
|
|
5672
|
+
start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
5673
|
+
exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
5674
|
+
};
|
|
5675
|
+
totp: {
|
|
5676
|
+
signUp: (loginId: string, user?: {
|
|
5677
|
+
email?: string;
|
|
5678
|
+
name?: string;
|
|
5679
|
+
givenName?: string;
|
|
5680
|
+
middleName?: string;
|
|
5681
|
+
familyName?: string;
|
|
5682
|
+
phone?: string;
|
|
5683
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.TOTPResponse>>;
|
|
5684
|
+
verify: (loginId: string, code: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
5685
|
+
update: (loginId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.TOTPResponse>>;
|
|
5686
|
+
};
|
|
5687
|
+
notp: {
|
|
5688
|
+
signUpOrIn: (loginId?: string, signUpOptions?: {
|
|
5689
|
+
customClaims?: Record<string, any>;
|
|
5690
|
+
templateId?: string;
|
|
5691
|
+
templateOptions?: {
|
|
5692
|
+
[x: string]: string;
|
|
5693
|
+
};
|
|
5694
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5695
|
+
pendingRef: string;
|
|
5696
|
+
redirectUrl: string;
|
|
5697
|
+
image: string;
|
|
5698
|
+
}>>;
|
|
5699
|
+
signUp: (loginId?: string, user?: {
|
|
5700
|
+
email?: string;
|
|
5701
|
+
name?: string;
|
|
5702
|
+
givenName?: string;
|
|
5703
|
+
middleName?: string;
|
|
5704
|
+
familyName?: string;
|
|
5705
|
+
phone?: string;
|
|
5706
|
+
}, signUpOptions?: {
|
|
5707
|
+
customClaims?: Record<string, any>;
|
|
5708
|
+
templateId?: string;
|
|
5709
|
+
templateOptions?: {
|
|
5710
|
+
[x: string]: string;
|
|
5711
|
+
};
|
|
5712
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5713
|
+
pendingRef: string;
|
|
5714
|
+
redirectUrl: string;
|
|
5715
|
+
image: string;
|
|
5716
|
+
}>>;
|
|
5717
|
+
signIn: (loginId?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5718
|
+
pendingRef: string;
|
|
5719
|
+
redirectUrl: string;
|
|
5720
|
+
image: string;
|
|
5721
|
+
}>>;
|
|
5722
|
+
waitForSession: (pendingRef: string, config?: {
|
|
5723
|
+
pollingIntervalMs: number;
|
|
5724
|
+
timeoutMs: number;
|
|
5725
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
5726
|
+
};
|
|
5727
|
+
password: {
|
|
5728
|
+
signUp: (loginId: string, password: string, user?: {
|
|
5729
|
+
email?: string;
|
|
5730
|
+
name?: string;
|
|
5731
|
+
givenName?: string;
|
|
5732
|
+
middleName?: string;
|
|
5733
|
+
familyName?: string;
|
|
5734
|
+
phone?: string;
|
|
5735
|
+
}, signUpOptions?: {
|
|
5736
|
+
customClaims?: Record<string, any>;
|
|
5737
|
+
templateId?: string;
|
|
5738
|
+
templateOptions?: {
|
|
5739
|
+
[x: string]: string;
|
|
5740
|
+
};
|
|
5741
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
5742
|
+
signIn: (loginId: string, password: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
5743
|
+
sendReset: (loginId: string, redirectUrl?: string, templateOptions?: {
|
|
5744
|
+
[x: string]: string;
|
|
5745
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5746
|
+
resetMethod: string;
|
|
5747
|
+
pendingRef?: string;
|
|
5748
|
+
linkId?: string;
|
|
5749
|
+
maskedEmail: string;
|
|
5750
|
+
}>>;
|
|
5751
|
+
update: (loginId: string, newPassword: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
5752
|
+
replace: (loginId: string, oldPassword: string, newPassword: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
5753
|
+
policy: () => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5754
|
+
minLength: number;
|
|
5755
|
+
lowercase: boolean;
|
|
5756
|
+
uppercase: boolean;
|
|
5757
|
+
number: boolean;
|
|
5758
|
+
nonAlphanumeric: boolean;
|
|
5759
|
+
}>>;
|
|
5760
|
+
};
|
|
5761
|
+
selectTenant: (tenantId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
5762
|
+
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
5763
|
+
logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
5764
|
+
logoutPrevious: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
5765
|
+
me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
|
|
5766
|
+
myTenants: (tenants: true | string[], token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5767
|
+
tenants: {
|
|
5768
|
+
id: string;
|
|
5769
|
+
name: string;
|
|
5770
|
+
customAttributes?: Record<string, any>;
|
|
5771
|
+
}[];
|
|
5772
|
+
}>>;
|
|
5773
|
+
history: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserHistoryResponse>>;
|
|
5774
|
+
isJwtExpired: (token: string) => boolean;
|
|
5775
|
+
getTenants: (token: string) => string[];
|
|
5776
|
+
getJwtPermissions: (token: string, tenant?: string) => string[];
|
|
5777
|
+
getJwtRoles: (token: string, tenant?: string) => string[];
|
|
5778
|
+
httpClient: {
|
|
5779
|
+
get: (path: string, config?: {
|
|
5780
|
+
headers?: HeadersInit;
|
|
5781
|
+
queryParams?: {
|
|
5782
|
+
[key: string]: string;
|
|
5783
|
+
};
|
|
5784
|
+
token?: string;
|
|
5785
|
+
}) => Promise<Response>;
|
|
5786
|
+
post: (path: string, body?: any, config?: {
|
|
5787
|
+
headers?: HeadersInit;
|
|
5788
|
+
queryParams?: {
|
|
5789
|
+
[key: string]: string;
|
|
5790
|
+
};
|
|
5791
|
+
token?: string;
|
|
5792
|
+
}) => Promise<Response>;
|
|
5793
|
+
patch: (path: string, body?: any, config?: {
|
|
5794
|
+
headers?: HeadersInit;
|
|
5795
|
+
queryParams?: {
|
|
5796
|
+
[key: string]: string;
|
|
5797
|
+
};
|
|
5798
|
+
token?: string;
|
|
5799
|
+
}) => Promise<Response>;
|
|
5800
|
+
put: (path: string, body?: any, config?: {
|
|
5801
|
+
headers?: HeadersInit;
|
|
5802
|
+
queryParams?: {
|
|
5803
|
+
[key: string]: string;
|
|
5804
|
+
};
|
|
5805
|
+
token?: string;
|
|
5806
|
+
}) => Promise<Response>;
|
|
5807
|
+
delete: (path: string, config?: {
|
|
5808
|
+
headers?: HeadersInit;
|
|
5809
|
+
queryParams?: {
|
|
5810
|
+
[key: string]: string;
|
|
5811
|
+
};
|
|
5812
|
+
token?: string;
|
|
5813
|
+
}) => Promise<Response>;
|
|
5814
|
+
hooks?: {
|
|
5815
|
+
beforeRequest?: (config: _descope_core_js_sdk.RequestConfig) => _descope_core_js_sdk.RequestConfig;
|
|
5816
|
+
afterRequest?: (req: _descope_core_js_sdk.RequestConfig, res: Response) => void | Promise<void>;
|
|
5817
|
+
transformResponse?: (mutableResponse: _descope_core_js_sdk.ExtendedResponse) => Promise<_descope_core_js_sdk.ExtendedResponse>;
|
|
5818
|
+
};
|
|
5819
|
+
buildUrl: (path: string, queryParams?: {
|
|
5820
|
+
[key: string]: string;
|
|
5821
|
+
}) => string;
|
|
5822
|
+
};
|
|
5823
|
+
}) & {
|
|
5824
|
+
onSessionTokenChange: (cb: (data: string) => void) => () => any[];
|
|
5825
|
+
onUserChange: (cb: (data: _descope_core_js_sdk.UserResponse) => void) => () => any[];
|
|
5826
|
+
}) & {
|
|
5827
|
+
getLastUserLoginId: () => string;
|
|
5828
|
+
getLastUserDisplayName: () => string;
|
|
5829
|
+
}) | (((({
|
|
5830
|
+
refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
5831
|
+
flow: {
|
|
5832
|
+
start: (flowId: string, options?: Pick<{
|
|
5833
|
+
redirectUrl?: string;
|
|
5834
|
+
location?: string;
|
|
5835
|
+
tenant?: string;
|
|
5836
|
+
deviceInfo?: {
|
|
5837
|
+
webAuthnSupport?: boolean;
|
|
5838
|
+
};
|
|
5839
|
+
lastAuth?: {
|
|
5840
|
+
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
5841
|
+
oauthProvider?: string;
|
|
5842
|
+
name?: string;
|
|
5843
|
+
loginId?: string;
|
|
5844
|
+
};
|
|
5845
|
+
redirectAuth?: {
|
|
5846
|
+
callbackUrl: string;
|
|
5847
|
+
codeChallenge: string;
|
|
5848
|
+
};
|
|
5849
|
+
oidcIdpStateId?: string;
|
|
5850
|
+
preview?: boolean;
|
|
5851
|
+
samlIdpStateId?: string;
|
|
5852
|
+
samlIdpUsername?: string;
|
|
5853
|
+
ssoAppId?: string;
|
|
5854
|
+
oidcLoginHint?: string;
|
|
5855
|
+
abTestingKey?: number;
|
|
5856
|
+
startOptionsVersion?: number;
|
|
5857
|
+
client?: Record<string, any>;
|
|
5858
|
+
locale?: string;
|
|
5859
|
+
oidcPrompt?: string;
|
|
5860
|
+
oidcErrorRedirectUri?: string;
|
|
5861
|
+
nativeOptions?: {
|
|
5862
|
+
platform: "ios" | "android";
|
|
5863
|
+
oauthProvider?: string;
|
|
5864
|
+
oauthRedirect?: string;
|
|
5865
|
+
};
|
|
5866
|
+
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "nativeOptions"> & {
|
|
5867
|
+
lastAuth?: Omit<{
|
|
5868
|
+
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
5869
|
+
oauthProvider?: string;
|
|
5870
|
+
name?: string;
|
|
5871
|
+
loginId?: string;
|
|
5872
|
+
}, "loginId" | "name">;
|
|
5873
|
+
}, conditionInteractionId?: string, interactionId?: string, componentsVersion?: string, flowVersions?: Record<string, number>, input?: {
|
|
5874
|
+
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any[])[])[])[])[])[])[])[])[])[])[];
|
|
5875
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
5876
|
+
next: (executionId: string, stepId: string, interactionId: string, version?: number, componentsVersion?: string, input?: {
|
|
5877
|
+
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any[])[])[])[])[])[])[])[])[])[])[];
|
|
5878
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
5879
|
+
};
|
|
5880
|
+
webauthn: {
|
|
5881
|
+
signUp: ((identifier: string, name: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
|
|
5882
|
+
start: (loginId: string, origin: string, name: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5883
|
+
transactionId: string;
|
|
5884
|
+
options: string;
|
|
5885
|
+
create: boolean;
|
|
5886
|
+
}>>;
|
|
5887
|
+
finish: (transactionId: string, response: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
5888
|
+
};
|
|
5889
|
+
signIn: ((identifier: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
|
|
5890
|
+
start: (loginId: string, origin: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5891
|
+
transactionId: string;
|
|
5892
|
+
options: string;
|
|
5893
|
+
create: boolean;
|
|
5894
|
+
}>>;
|
|
5895
|
+
finish: (transactionId: string, response: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
5896
|
+
};
|
|
5897
|
+
signUpOrIn: ((identifier: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
|
|
5898
|
+
start: (loginId: string, origin: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5899
|
+
transactionId: string;
|
|
5900
|
+
options: string;
|
|
5901
|
+
create: boolean;
|
|
5902
|
+
}>>;
|
|
5903
|
+
};
|
|
5904
|
+
update: ((identifier: string, token: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>) & {
|
|
5905
|
+
start: (loginId: string, origin: string, token: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5906
|
+
transactionId: string;
|
|
5907
|
+
options: string;
|
|
5908
|
+
create: boolean;
|
|
5909
|
+
}>>;
|
|
5910
|
+
finish: (transactionId: string, response: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
5911
|
+
};
|
|
5912
|
+
helpers: {
|
|
5913
|
+
create: (options: string) => Promise<string>;
|
|
5914
|
+
get: (options: string) => Promise<string>;
|
|
5915
|
+
isSupported: (requirePlatformAuthenticator?: boolean) => Promise<boolean>;
|
|
5916
|
+
conditional: (options: string, abort: AbortController) => Promise<string>;
|
|
5917
|
+
};
|
|
5918
|
+
};
|
|
5919
|
+
fedcm: {
|
|
5920
|
+
oneTap(provider?: string, oneTapConfig?: _descope_web_js_sdk.OneTapConfig, loginOptions?: _descope_core_js_sdk.LoginOptions, onSkip?: () => void): Promise<unknown>;
|
|
5921
|
+
launch(context?: "signin" | "signup" | "use" | "continue"): Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
5922
|
+
isSupported(): boolean;
|
|
5923
|
+
};
|
|
5924
|
+
accessKey: {
|
|
5925
|
+
exchange: (accessKey: string, loginOptions?: _descope_core_js_sdk.AccessKeyLoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
|
|
5926
|
+
};
|
|
5927
|
+
otp: {
|
|
5928
|
+
verify: {
|
|
5929
|
+
sms: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
5930
|
+
voice: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
5931
|
+
whatsapp: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
5932
|
+
email: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
5933
|
+
};
|
|
5934
|
+
signIn: {
|
|
5935
|
+
sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5936
|
+
maskedPhone: string;
|
|
5937
|
+
}>>;
|
|
5938
|
+
voice: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5939
|
+
maskedPhone: string;
|
|
5940
|
+
}>>;
|
|
5941
|
+
whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5942
|
+
maskedPhone: string;
|
|
5943
|
+
}>>;
|
|
5944
|
+
email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5945
|
+
maskedEmail: string;
|
|
5946
|
+
}>>;
|
|
5947
|
+
};
|
|
5948
|
+
signUp: {
|
|
5949
|
+
sms: (loginId: string, user?: {
|
|
5950
|
+
email?: string;
|
|
5951
|
+
name?: string;
|
|
5952
|
+
givenName?: string;
|
|
5953
|
+
middleName?: string;
|
|
5954
|
+
familyName?: string;
|
|
5955
|
+
phone?: string;
|
|
5956
|
+
}, signUpOptions?: {
|
|
5957
|
+
customClaims?: Record<string, any>;
|
|
5958
|
+
templateId?: string;
|
|
5959
|
+
templateOptions?: {
|
|
5960
|
+
[x: string]: string;
|
|
5961
|
+
};
|
|
5962
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5963
|
+
maskedPhone: string;
|
|
5964
|
+
}>>;
|
|
5965
|
+
voice: (loginId: string, user?: {
|
|
5966
|
+
email?: string;
|
|
5967
|
+
name?: string;
|
|
5968
|
+
givenName?: string;
|
|
5969
|
+
middleName?: string;
|
|
5970
|
+
familyName?: string;
|
|
5971
|
+
phone?: string;
|
|
5972
|
+
}, signUpOptions?: {
|
|
5973
|
+
customClaims?: Record<string, any>;
|
|
5974
|
+
templateId?: string;
|
|
5975
|
+
templateOptions?: {
|
|
5976
|
+
[x: string]: string;
|
|
5977
|
+
};
|
|
5978
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5979
|
+
maskedPhone: string;
|
|
5980
|
+
}>>;
|
|
5981
|
+
whatsapp: (loginId: string, user?: {
|
|
5982
|
+
email?: string;
|
|
5983
|
+
name?: string;
|
|
5984
|
+
givenName?: string;
|
|
5985
|
+
middleName?: string;
|
|
5986
|
+
familyName?: string;
|
|
5987
|
+
phone?: string;
|
|
5988
|
+
}, signUpOptions?: {
|
|
5989
|
+
customClaims?: Record<string, any>;
|
|
5990
|
+
templateId?: string;
|
|
5991
|
+
templateOptions?: {
|
|
5992
|
+
[x: string]: string;
|
|
5993
|
+
};
|
|
5994
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5995
|
+
maskedPhone: string;
|
|
5996
|
+
}>>;
|
|
5997
|
+
email: (loginId: string, user?: {
|
|
5998
|
+
email?: string;
|
|
5999
|
+
name?: string;
|
|
6000
|
+
givenName?: string;
|
|
6001
|
+
middleName?: string;
|
|
6002
|
+
familyName?: string;
|
|
6003
|
+
phone?: string;
|
|
6004
|
+
}, signUpOptions?: {
|
|
6005
|
+
customClaims?: Record<string, any>;
|
|
6006
|
+
templateId?: string;
|
|
6007
|
+
templateOptions?: {
|
|
6008
|
+
[x: string]: string;
|
|
6009
|
+
};
|
|
6010
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6011
|
+
maskedEmail: string;
|
|
6012
|
+
}>>;
|
|
6013
|
+
};
|
|
6014
|
+
signUpOrIn: {
|
|
6015
|
+
sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6016
|
+
maskedPhone: string;
|
|
6017
|
+
}>>;
|
|
6018
|
+
voice: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6019
|
+
maskedPhone: string;
|
|
6020
|
+
}>>;
|
|
6021
|
+
whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6022
|
+
maskedPhone: string;
|
|
6023
|
+
}>>;
|
|
6024
|
+
email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6025
|
+
maskedEmail: string;
|
|
6026
|
+
}>>;
|
|
6027
|
+
};
|
|
6028
|
+
update: {
|
|
6029
|
+
email: <T_7 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
|
|
6030
|
+
addToLoginIDs?: T_7;
|
|
6031
|
+
onMergeUseExisting?: T_7 extends true ? boolean : never;
|
|
6032
|
+
templateOptions?: {
|
|
6033
|
+
[x: string]: string;
|
|
6034
|
+
};
|
|
6035
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6036
|
+
maskedEmail: string;
|
|
6037
|
+
}>>;
|
|
6038
|
+
phone: {
|
|
6039
|
+
sms: <T_1_9 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
6040
|
+
addToLoginIDs?: T_1_9;
|
|
6041
|
+
onMergeUseExisting?: T_1_9 extends true ? boolean : never;
|
|
6042
|
+
templateOptions?: {
|
|
6043
|
+
[x: string]: string;
|
|
6044
|
+
};
|
|
6045
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6046
|
+
maskedPhone: string;
|
|
6047
|
+
}>>;
|
|
6048
|
+
voice: <T_1_10 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
6049
|
+
addToLoginIDs?: T_1_10;
|
|
6050
|
+
onMergeUseExisting?: T_1_10 extends true ? boolean : never;
|
|
6051
|
+
templateOptions?: {
|
|
6052
|
+
[x: string]: string;
|
|
6053
|
+
};
|
|
6054
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6055
|
+
maskedPhone: string;
|
|
6056
|
+
}>>;
|
|
6057
|
+
whatsapp: <T_1_11 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
6058
|
+
addToLoginIDs?: T_1_11;
|
|
6059
|
+
onMergeUseExisting?: T_1_11 extends true ? boolean : never;
|
|
6060
|
+
templateOptions?: {
|
|
6061
|
+
[x: string]: string;
|
|
6062
|
+
};
|
|
6063
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6064
|
+
maskedPhone: string;
|
|
6065
|
+
}>>;
|
|
6066
|
+
};
|
|
6067
|
+
};
|
|
6068
|
+
};
|
|
6069
|
+
magicLink: {
|
|
6070
|
+
verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
6071
|
+
signIn: {
|
|
6072
|
+
sms: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6073
|
+
maskedPhone: string;
|
|
6074
|
+
}>>;
|
|
6075
|
+
voice: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6076
|
+
maskedPhone: string;
|
|
6077
|
+
}>>;
|
|
6078
|
+
whatsapp: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6079
|
+
maskedPhone: string;
|
|
6080
|
+
}>>;
|
|
6081
|
+
email: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6082
|
+
maskedEmail: string;
|
|
6083
|
+
}>>;
|
|
6084
|
+
};
|
|
6085
|
+
signUp: {
|
|
6086
|
+
sms: (loginId: string, URI: string, user?: {
|
|
6087
|
+
email?: string;
|
|
6088
|
+
name?: string;
|
|
6089
|
+
givenName?: string;
|
|
6090
|
+
middleName?: string;
|
|
6091
|
+
familyName?: string;
|
|
6092
|
+
phone?: string;
|
|
6093
|
+
}, signUpOptions?: {
|
|
6094
|
+
customClaims?: Record<string, any>;
|
|
6095
|
+
templateId?: string;
|
|
6096
|
+
templateOptions?: {
|
|
6097
|
+
[x: string]: string;
|
|
6098
|
+
};
|
|
6099
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6100
|
+
maskedPhone: string;
|
|
6101
|
+
}>>;
|
|
6102
|
+
voice: (loginId: string, URI: string, user?: {
|
|
6103
|
+
email?: string;
|
|
6104
|
+
name?: string;
|
|
6105
|
+
givenName?: string;
|
|
6106
|
+
middleName?: string;
|
|
6107
|
+
familyName?: string;
|
|
6108
|
+
phone?: string;
|
|
6109
|
+
}, signUpOptions?: {
|
|
6110
|
+
customClaims?: Record<string, any>;
|
|
6111
|
+
templateId?: string;
|
|
6112
|
+
templateOptions?: {
|
|
6113
|
+
[x: string]: string;
|
|
6114
|
+
};
|
|
6115
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6116
|
+
maskedPhone: string;
|
|
6117
|
+
}>>;
|
|
6118
|
+
whatsapp: (loginId: string, URI: string, user?: {
|
|
6119
|
+
email?: string;
|
|
6120
|
+
name?: string;
|
|
6121
|
+
givenName?: string;
|
|
6122
|
+
middleName?: string;
|
|
6123
|
+
familyName?: string;
|
|
6124
|
+
phone?: string;
|
|
6125
|
+
}, signUpOptions?: {
|
|
6126
|
+
customClaims?: Record<string, any>;
|
|
6127
|
+
templateId?: string;
|
|
6128
|
+
templateOptions?: {
|
|
6129
|
+
[x: string]: string;
|
|
6130
|
+
};
|
|
6131
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6132
|
+
maskedPhone: string;
|
|
6133
|
+
}>>;
|
|
6134
|
+
email: (loginId: string, URI: string, user?: {
|
|
6135
|
+
email?: string;
|
|
6136
|
+
name?: string;
|
|
6137
|
+
givenName?: string;
|
|
6138
|
+
middleName?: string;
|
|
6139
|
+
familyName?: string;
|
|
6140
|
+
phone?: string;
|
|
6141
|
+
}, signUpOptions?: {
|
|
6142
|
+
customClaims?: Record<string, any>;
|
|
6143
|
+
templateId?: string;
|
|
6144
|
+
templateOptions?: {
|
|
6145
|
+
[x: string]: string;
|
|
6146
|
+
};
|
|
6147
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6148
|
+
maskedEmail: string;
|
|
6149
|
+
}>>;
|
|
6150
|
+
};
|
|
6151
|
+
signUpOrIn: {
|
|
6152
|
+
sms: (loginId: string, URI?: string, signUpOptions?: {
|
|
6153
|
+
customClaims?: Record<string, any>;
|
|
6154
|
+
templateId?: string;
|
|
6155
|
+
templateOptions?: {
|
|
6156
|
+
[x: string]: string;
|
|
6157
|
+
};
|
|
6158
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6159
|
+
maskedPhone: string;
|
|
6160
|
+
}>>;
|
|
6161
|
+
voice: (loginId: string, URI?: string, signUpOptions?: {
|
|
6162
|
+
customClaims?: Record<string, any>;
|
|
6163
|
+
templateId?: string;
|
|
6164
|
+
templateOptions?: {
|
|
6165
|
+
[x: string]: string;
|
|
6166
|
+
};
|
|
6167
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6168
|
+
maskedPhone: string;
|
|
6169
|
+
}>>;
|
|
6170
|
+
whatsapp: (loginId: string, URI?: string, signUpOptions?: {
|
|
6171
|
+
customClaims?: Record<string, any>;
|
|
6172
|
+
templateId?: string;
|
|
6173
|
+
templateOptions?: {
|
|
6174
|
+
[x: string]: string;
|
|
6175
|
+
};
|
|
6176
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6177
|
+
maskedPhone: string;
|
|
6178
|
+
}>>;
|
|
6179
|
+
email: (loginId: string, URI?: string, signUpOptions?: {
|
|
6180
|
+
customClaims?: Record<string, any>;
|
|
6181
|
+
templateId?: string;
|
|
6182
|
+
templateOptions?: {
|
|
6183
|
+
[x: string]: string;
|
|
6184
|
+
};
|
|
6185
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6186
|
+
maskedEmail: string;
|
|
6187
|
+
}>>;
|
|
6188
|
+
};
|
|
6189
|
+
update: {
|
|
6190
|
+
email: <T_2_3 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
6191
|
+
addToLoginIDs?: T_2_3;
|
|
6192
|
+
onMergeUseExisting?: T_2_3 extends true ? boolean : never;
|
|
6193
|
+
templateOptions?: {
|
|
6194
|
+
[x: string]: string;
|
|
6195
|
+
};
|
|
6196
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6197
|
+
maskedEmail: string;
|
|
6198
|
+
}>>;
|
|
6199
|
+
phone: {
|
|
6200
|
+
sms: <T_3_9 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
6201
|
+
addToLoginIDs?: T_3_9;
|
|
6202
|
+
onMergeUseExisting?: T_3_9 extends true ? boolean : never;
|
|
6203
|
+
templateOptions?: {
|
|
6204
|
+
[x: string]: string;
|
|
6205
|
+
};
|
|
6206
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6207
|
+
maskedPhone: string;
|
|
6208
|
+
}>>;
|
|
6209
|
+
voice: <T_3_10 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
6210
|
+
addToLoginIDs?: T_3_10;
|
|
6211
|
+
onMergeUseExisting?: T_3_10 extends true ? boolean : never;
|
|
6212
|
+
templateOptions?: {
|
|
6213
|
+
[x: string]: string;
|
|
6214
|
+
};
|
|
6215
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6216
|
+
maskedPhone: string;
|
|
6217
|
+
}>>;
|
|
6218
|
+
whatsapp: <T_3_11 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
6219
|
+
addToLoginIDs?: T_3_11;
|
|
6220
|
+
onMergeUseExisting?: T_3_11 extends true ? boolean : never;
|
|
6221
|
+
templateOptions?: {
|
|
6222
|
+
[x: string]: string;
|
|
6223
|
+
};
|
|
6224
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6225
|
+
maskedPhone: string;
|
|
6226
|
+
}>>;
|
|
6227
|
+
};
|
|
6228
|
+
};
|
|
6229
|
+
};
|
|
6230
|
+
enchantedLink: {
|
|
6231
|
+
verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
6232
|
+
signIn: (loginId: string, URI?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
6233
|
+
signUpOrIn: (loginId: string, URI?: string, signUpOptions?: {
|
|
6234
|
+
customClaims?: Record<string, any>;
|
|
6235
|
+
templateId?: string;
|
|
6236
|
+
templateOptions?: {
|
|
6237
|
+
[x: string]: string;
|
|
6238
|
+
};
|
|
6239
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
6240
|
+
signUp: (loginId: string, URI?: string, user?: {
|
|
6241
|
+
email?: string;
|
|
6242
|
+
name?: string;
|
|
6243
|
+
givenName?: string;
|
|
6244
|
+
middleName?: string;
|
|
6245
|
+
familyName?: string;
|
|
6246
|
+
phone?: string;
|
|
6247
|
+
}, signUpOptions?: {
|
|
6248
|
+
customClaims?: Record<string, any>;
|
|
6249
|
+
templateId?: string;
|
|
6250
|
+
templateOptions?: {
|
|
6251
|
+
[x: string]: string;
|
|
6252
|
+
};
|
|
6253
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
6254
|
+
waitForSession: (pendingRef: string, config?: {
|
|
6255
|
+
pollingIntervalMs: number;
|
|
6256
|
+
timeoutMs: number;
|
|
6257
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
6258
|
+
update: {
|
|
6259
|
+
email: <T_4_3 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
6260
|
+
addToLoginIDs?: T_4_3;
|
|
6261
|
+
onMergeUseExisting?: T_4_3 extends true ? boolean : never;
|
|
6262
|
+
templateOptions?: {
|
|
6263
|
+
[x: string]: string;
|
|
6264
|
+
};
|
|
6265
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
6266
|
+
};
|
|
6267
|
+
};
|
|
6268
|
+
oauth: {
|
|
6269
|
+
start: ((provider: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>) & {
|
|
6270
|
+
google: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
6271
|
+
facebook: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
6272
|
+
github: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
6273
|
+
microsoft: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
6274
|
+
gitlab: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
6275
|
+
apple: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
6276
|
+
discord: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
6277
|
+
linkedin: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
6278
|
+
slack: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
6279
|
+
};
|
|
6280
|
+
exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
6281
|
+
startNative: (provider: string, loginOptions?: _descope_core_js_sdk.LoginOptions, implicit?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
6282
|
+
finishNative: (provider: string, stateId: string, user?: string, code?: string, idToken?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
6283
|
+
};
|
|
6284
|
+
saml: {
|
|
6285
|
+
start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
6286
|
+
exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
6287
|
+
};
|
|
6288
|
+
totp: {
|
|
6289
|
+
signUp: (loginId: string, user?: {
|
|
6290
|
+
email?: string;
|
|
6291
|
+
name?: string;
|
|
6292
|
+
givenName?: string;
|
|
6293
|
+
middleName?: string;
|
|
6294
|
+
familyName?: string;
|
|
6295
|
+
phone?: string;
|
|
6296
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.TOTPResponse>>;
|
|
6297
|
+
verify: (loginId: string, code: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
6298
|
+
update: (loginId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.TOTPResponse>>;
|
|
6299
|
+
};
|
|
6300
|
+
notp: {
|
|
6301
|
+
signUpOrIn: (loginId?: string, signUpOptions?: {
|
|
6302
|
+
customClaims?: Record<string, any>;
|
|
6303
|
+
templateId?: string;
|
|
6304
|
+
templateOptions?: {
|
|
6305
|
+
[x: string]: string;
|
|
6306
|
+
};
|
|
6307
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6308
|
+
pendingRef: string;
|
|
6309
|
+
redirectUrl: string;
|
|
6310
|
+
image: string;
|
|
6311
|
+
}>>;
|
|
6312
|
+
signUp: (loginId?: string, user?: {
|
|
6313
|
+
email?: string;
|
|
6314
|
+
name?: string;
|
|
6315
|
+
givenName?: string;
|
|
6316
|
+
middleName?: string;
|
|
6317
|
+
familyName?: string;
|
|
6318
|
+
phone?: string;
|
|
6319
|
+
}, signUpOptions?: {
|
|
6320
|
+
customClaims?: Record<string, any>;
|
|
6321
|
+
templateId?: string;
|
|
6322
|
+
templateOptions?: {
|
|
6323
|
+
[x: string]: string;
|
|
6324
|
+
};
|
|
6325
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6326
|
+
pendingRef: string;
|
|
6327
|
+
redirectUrl: string;
|
|
6328
|
+
image: string;
|
|
6329
|
+
}>>;
|
|
6330
|
+
signIn: (loginId?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6331
|
+
pendingRef: string;
|
|
6332
|
+
redirectUrl: string;
|
|
6333
|
+
image: string;
|
|
6334
|
+
}>>;
|
|
6335
|
+
waitForSession: (pendingRef: string, config?: {
|
|
6336
|
+
pollingIntervalMs: number;
|
|
6337
|
+
timeoutMs: number;
|
|
6338
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
6339
|
+
};
|
|
6340
|
+
password: {
|
|
6341
|
+
signUp: (loginId: string, password: string, user?: {
|
|
6342
|
+
email?: string;
|
|
6343
|
+
name?: string;
|
|
6344
|
+
givenName?: string;
|
|
6345
|
+
middleName?: string;
|
|
6346
|
+
familyName?: string;
|
|
6347
|
+
phone?: string;
|
|
6348
|
+
}, signUpOptions?: {
|
|
6349
|
+
customClaims?: Record<string, any>;
|
|
6350
|
+
templateId?: string;
|
|
6351
|
+
templateOptions?: {
|
|
6352
|
+
[x: string]: string;
|
|
6353
|
+
};
|
|
6354
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
6355
|
+
signIn: (loginId: string, password: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
6356
|
+
sendReset: (loginId: string, redirectUrl?: string, templateOptions?: {
|
|
6357
|
+
[x: string]: string;
|
|
6358
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6359
|
+
resetMethod: string;
|
|
6360
|
+
pendingRef?: string;
|
|
6361
|
+
linkId?: string;
|
|
6362
|
+
maskedEmail: string;
|
|
6363
|
+
}>>;
|
|
6364
|
+
update: (loginId: string, newPassword: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
6365
|
+
replace: (loginId: string, oldPassword: string, newPassword: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
6366
|
+
policy: () => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6367
|
+
minLength: number;
|
|
6368
|
+
lowercase: boolean;
|
|
6369
|
+
uppercase: boolean;
|
|
6370
|
+
number: boolean;
|
|
6371
|
+
nonAlphanumeric: boolean;
|
|
6372
|
+
}>>;
|
|
6373
|
+
};
|
|
6374
|
+
selectTenant: (tenantId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
6375
|
+
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
6376
|
+
logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
6377
|
+
logoutPrevious: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
6378
|
+
me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
|
|
6379
|
+
myTenants: (tenants: true | string[], token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6380
|
+
tenants: {
|
|
6381
|
+
id: string;
|
|
6382
|
+
name: string;
|
|
6383
|
+
customAttributes?: Record<string, any>;
|
|
6384
|
+
}[];
|
|
6385
|
+
}>>;
|
|
6386
|
+
history: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserHistoryResponse>>;
|
|
6387
|
+
isJwtExpired: (token: string) => boolean;
|
|
6388
|
+
getTenants: (token: string) => string[];
|
|
6389
|
+
getJwtPermissions: (token: string, tenant?: string) => string[];
|
|
6390
|
+
getJwtRoles: (token: string, tenant?: string) => string[];
|
|
6391
|
+
httpClient: {
|
|
6392
|
+
get: (path: string, config?: {
|
|
6393
|
+
headers?: HeadersInit;
|
|
6394
|
+
queryParams?: {
|
|
6395
|
+
[key: string]: string;
|
|
6396
|
+
};
|
|
6397
|
+
token?: string;
|
|
6398
|
+
}) => Promise<Response>;
|
|
6399
|
+
post: (path: string, body?: any, config?: {
|
|
6400
|
+
headers?: HeadersInit;
|
|
6401
|
+
queryParams?: {
|
|
6402
|
+
[key: string]: string;
|
|
6403
|
+
};
|
|
6404
|
+
token?: string;
|
|
6405
|
+
}) => Promise<Response>;
|
|
6406
|
+
patch: (path: string, body?: any, config?: {
|
|
6407
|
+
headers?: HeadersInit;
|
|
6408
|
+
queryParams?: {
|
|
6409
|
+
[key: string]: string;
|
|
6410
|
+
};
|
|
6411
|
+
token?: string;
|
|
6412
|
+
}) => Promise<Response>;
|
|
6413
|
+
put: (path: string, body?: any, config?: {
|
|
6414
|
+
headers?: HeadersInit;
|
|
6415
|
+
queryParams?: {
|
|
6416
|
+
[key: string]: string;
|
|
6417
|
+
};
|
|
6418
|
+
token?: string;
|
|
6419
|
+
}) => Promise<Response>;
|
|
6420
|
+
delete: (path: string, config?: {
|
|
6421
|
+
headers?: HeadersInit;
|
|
6422
|
+
queryParams?: {
|
|
6423
|
+
[key: string]: string;
|
|
6424
|
+
};
|
|
6425
|
+
token?: string;
|
|
6426
|
+
}) => Promise<Response>;
|
|
6427
|
+
hooks?: {
|
|
6428
|
+
beforeRequest?: (config: _descope_core_js_sdk.RequestConfig) => _descope_core_js_sdk.RequestConfig;
|
|
6429
|
+
afterRequest?: (req: _descope_core_js_sdk.RequestConfig, res: Response) => void | Promise<void>;
|
|
6430
|
+
transformResponse?: (mutableResponse: _descope_core_js_sdk.ExtendedResponse) => Promise<_descope_core_js_sdk.ExtendedResponse>;
|
|
6431
|
+
};
|
|
6432
|
+
buildUrl: (path: string, queryParams?: {
|
|
6433
|
+
[key: string]: string;
|
|
6434
|
+
}) => string;
|
|
6435
|
+
};
|
|
6436
|
+
} | {
|
|
6437
|
+
refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
6438
|
+
flow: {
|
|
6439
|
+
start: (flowId: string, options?: Pick<{
|
|
6440
|
+
redirectUrl?: string;
|
|
6441
|
+
location?: string;
|
|
6442
|
+
tenant?: string;
|
|
6443
|
+
deviceInfo?: {
|
|
6444
|
+
webAuthnSupport?: boolean;
|
|
6445
|
+
};
|
|
6446
|
+
lastAuth?: {
|
|
6447
|
+
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
6448
|
+
oauthProvider?: string;
|
|
6449
|
+
name?: string;
|
|
6450
|
+
loginId?: string;
|
|
6451
|
+
};
|
|
6452
|
+
redirectAuth?: {
|
|
6453
|
+
callbackUrl: string;
|
|
6454
|
+
codeChallenge: string;
|
|
6455
|
+
};
|
|
6456
|
+
oidcIdpStateId?: string;
|
|
6457
|
+
preview?: boolean;
|
|
6458
|
+
samlIdpStateId?: string;
|
|
6459
|
+
samlIdpUsername?: string;
|
|
6460
|
+
ssoAppId?: string;
|
|
6461
|
+
oidcLoginHint?: string;
|
|
6462
|
+
abTestingKey?: number;
|
|
6463
|
+
startOptionsVersion?: number;
|
|
6464
|
+
client?: Record<string, any>;
|
|
6465
|
+
locale?: string;
|
|
6466
|
+
oidcPrompt?: string;
|
|
6467
|
+
oidcErrorRedirectUri?: string;
|
|
6468
|
+
nativeOptions?: {
|
|
6469
|
+
platform: "ios" | "android";
|
|
6470
|
+
oauthProvider?: string;
|
|
6471
|
+
oauthRedirect?: string;
|
|
6472
|
+
};
|
|
6473
|
+
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "nativeOptions"> & {
|
|
6474
|
+
lastAuth?: Omit<{
|
|
6475
|
+
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
6476
|
+
oauthProvider?: string;
|
|
6477
|
+
name?: string;
|
|
6478
|
+
loginId?: string;
|
|
6479
|
+
}, "loginId" | "name">;
|
|
6480
|
+
}, conditionInteractionId?: string, interactionId?: string, componentsVersion?: string, flowVersions?: Record<string, number>, input?: {
|
|
6481
|
+
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any[])[])[])[])[])[])[])[])[])[])[];
|
|
6482
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
6483
|
+
next: (executionId: string, stepId: string, interactionId: string, version?: number, componentsVersion?: string, input?: {
|
|
6484
|
+
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any[])[])[])[])[])[])[])[])[])[])[];
|
|
6485
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
6486
|
+
};
|
|
6487
|
+
webauthn: {
|
|
6488
|
+
signUp: ((identifier: string, name: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
|
|
6489
|
+
start: (loginId: string, origin: string, name: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6490
|
+
transactionId: string;
|
|
6491
|
+
options: string;
|
|
6492
|
+
create: boolean;
|
|
6493
|
+
}>>;
|
|
6494
|
+
finish: (transactionId: string, response: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
6495
|
+
};
|
|
6496
|
+
signIn: ((identifier: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
|
|
6497
|
+
start: (loginId: string, origin: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6498
|
+
transactionId: string;
|
|
6499
|
+
options: string;
|
|
6500
|
+
create: boolean;
|
|
6501
|
+
}>>;
|
|
6502
|
+
finish: (transactionId: string, response: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
6503
|
+
};
|
|
6504
|
+
signUpOrIn: ((identifier: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
|
|
6505
|
+
start: (loginId: string, origin: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6506
|
+
transactionId: string;
|
|
6507
|
+
options: string;
|
|
6508
|
+
create: boolean;
|
|
6509
|
+
}>>;
|
|
6510
|
+
};
|
|
6511
|
+
update: ((identifier: string, token: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>) & {
|
|
6512
|
+
start: (loginId: string, origin: string, token: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6513
|
+
transactionId: string;
|
|
6514
|
+
options: string;
|
|
6515
|
+
create: boolean;
|
|
6516
|
+
}>>;
|
|
6517
|
+
finish: (transactionId: string, response: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
6518
|
+
};
|
|
6519
|
+
helpers: {
|
|
6520
|
+
create: (options: string) => Promise<string>;
|
|
6521
|
+
get: (options: string) => Promise<string>;
|
|
6522
|
+
isSupported: (requirePlatformAuthenticator?: boolean) => Promise<boolean>;
|
|
6523
|
+
conditional: (options: string, abort: AbortController) => Promise<string>;
|
|
6524
|
+
};
|
|
6525
|
+
};
|
|
6526
|
+
fedcm: {
|
|
6527
|
+
oneTap(provider?: string, oneTapConfig?: _descope_web_js_sdk.OneTapConfig, loginOptions?: _descope_core_js_sdk.LoginOptions, onSkip?: () => void): Promise<unknown>;
|
|
6528
|
+
launch(context?: "signin" | "signup" | "use" | "continue"): Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
6529
|
+
isSupported(): boolean;
|
|
6530
|
+
};
|
|
6531
|
+
accessKey: {
|
|
6532
|
+
exchange: (accessKey: string, loginOptions?: _descope_core_js_sdk.AccessKeyLoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
|
|
6533
|
+
};
|
|
6534
|
+
otp: {
|
|
6535
|
+
verify: {
|
|
6536
|
+
sms: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
6537
|
+
voice: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
6538
|
+
whatsapp: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
6539
|
+
email: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
6540
|
+
};
|
|
6541
|
+
signIn: {
|
|
6542
|
+
sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6543
|
+
maskedPhone: string;
|
|
6544
|
+
}>>;
|
|
6545
|
+
voice: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6546
|
+
maskedPhone: string;
|
|
6547
|
+
}>>;
|
|
6548
|
+
whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6549
|
+
maskedPhone: string;
|
|
6550
|
+
}>>;
|
|
6551
|
+
email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6552
|
+
maskedEmail: string;
|
|
6553
|
+
}>>;
|
|
6554
|
+
};
|
|
6555
|
+
signUp: {
|
|
6556
|
+
sms: (loginId: string, user?: {
|
|
6557
|
+
email?: string;
|
|
6558
|
+
name?: string;
|
|
6559
|
+
givenName?: string;
|
|
6560
|
+
middleName?: string;
|
|
6561
|
+
familyName?: string;
|
|
6562
|
+
phone?: string;
|
|
6563
|
+
}, signUpOptions?: {
|
|
6564
|
+
customClaims?: Record<string, any>;
|
|
6565
|
+
templateId?: string;
|
|
6566
|
+
templateOptions?: {
|
|
6567
|
+
[x: string]: string;
|
|
6568
|
+
};
|
|
6569
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6570
|
+
maskedPhone: string;
|
|
6571
|
+
}>>;
|
|
6572
|
+
voice: (loginId: string, user?: {
|
|
6573
|
+
email?: string;
|
|
6574
|
+
name?: string;
|
|
6575
|
+
givenName?: string;
|
|
6576
|
+
middleName?: string;
|
|
6577
|
+
familyName?: string;
|
|
6578
|
+
phone?: string;
|
|
6579
|
+
}, signUpOptions?: {
|
|
6580
|
+
customClaims?: Record<string, any>;
|
|
6581
|
+
templateId?: string;
|
|
6582
|
+
templateOptions?: {
|
|
6583
|
+
[x: string]: string;
|
|
6584
|
+
};
|
|
6585
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6586
|
+
maskedPhone: string;
|
|
6587
|
+
}>>;
|
|
6588
|
+
whatsapp: (loginId: string, user?: {
|
|
6589
|
+
email?: string;
|
|
6590
|
+
name?: string;
|
|
6591
|
+
givenName?: string;
|
|
6592
|
+
middleName?: string;
|
|
6593
|
+
familyName?: string;
|
|
6594
|
+
phone?: string;
|
|
6595
|
+
}, signUpOptions?: {
|
|
6596
|
+
customClaims?: Record<string, any>;
|
|
6597
|
+
templateId?: string;
|
|
6598
|
+
templateOptions?: {
|
|
6599
|
+
[x: string]: string;
|
|
6600
|
+
};
|
|
6601
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6602
|
+
maskedPhone: string;
|
|
6603
|
+
}>>;
|
|
6604
|
+
email: (loginId: string, user?: {
|
|
6605
|
+
email?: string;
|
|
6606
|
+
name?: string;
|
|
6607
|
+
givenName?: string;
|
|
6608
|
+
middleName?: string;
|
|
6609
|
+
familyName?: string;
|
|
6610
|
+
phone?: string;
|
|
6611
|
+
}, signUpOptions?: {
|
|
6612
|
+
customClaims?: Record<string, any>;
|
|
6613
|
+
templateId?: string;
|
|
6614
|
+
templateOptions?: {
|
|
6615
|
+
[x: string]: string;
|
|
6616
|
+
};
|
|
6617
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6618
|
+
maskedEmail: string;
|
|
6619
|
+
}>>;
|
|
6620
|
+
};
|
|
6621
|
+
signUpOrIn: {
|
|
6622
|
+
sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6623
|
+
maskedPhone: string;
|
|
6624
|
+
}>>;
|
|
6625
|
+
voice: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6626
|
+
maskedPhone: string;
|
|
6627
|
+
}>>;
|
|
6628
|
+
whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6629
|
+
maskedPhone: string;
|
|
6630
|
+
}>>;
|
|
6631
|
+
email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6632
|
+
maskedEmail: string;
|
|
6633
|
+
}>>;
|
|
6634
|
+
};
|
|
6635
|
+
update: {
|
|
6636
|
+
email: <T_8 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
|
|
6637
|
+
addToLoginIDs?: T_8;
|
|
6638
|
+
onMergeUseExisting?: T_8 extends true ? boolean : never;
|
|
6639
|
+
templateOptions?: {
|
|
6640
|
+
[x: string]: string;
|
|
6641
|
+
};
|
|
6642
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6643
|
+
maskedEmail: string;
|
|
6644
|
+
}>>;
|
|
6645
|
+
phone: {
|
|
6646
|
+
sms: <T_1_12 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
6647
|
+
addToLoginIDs?: T_1_12;
|
|
6648
|
+
onMergeUseExisting?: T_1_12 extends true ? boolean : never;
|
|
6649
|
+
templateOptions?: {
|
|
6650
|
+
[x: string]: string;
|
|
6651
|
+
};
|
|
6652
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6653
|
+
maskedPhone: string;
|
|
6654
|
+
}>>;
|
|
6655
|
+
voice: <T_1_13 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
6656
|
+
addToLoginIDs?: T_1_13;
|
|
6657
|
+
onMergeUseExisting?: T_1_13 extends true ? boolean : never;
|
|
6658
|
+
templateOptions?: {
|
|
6659
|
+
[x: string]: string;
|
|
6660
|
+
};
|
|
6661
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6662
|
+
maskedPhone: string;
|
|
6663
|
+
}>>;
|
|
6664
|
+
whatsapp: <T_1_14 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
6665
|
+
addToLoginIDs?: T_1_14;
|
|
6666
|
+
onMergeUseExisting?: T_1_14 extends true ? boolean : never;
|
|
6667
|
+
templateOptions?: {
|
|
6668
|
+
[x: string]: string;
|
|
6669
|
+
};
|
|
6670
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6671
|
+
maskedPhone: string;
|
|
6672
|
+
}>>;
|
|
6673
|
+
};
|
|
6674
|
+
};
|
|
6675
|
+
};
|
|
6676
|
+
magicLink: {
|
|
6677
|
+
verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
6678
|
+
signIn: {
|
|
6679
|
+
sms: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6680
|
+
maskedPhone: string;
|
|
6681
|
+
}>>;
|
|
6682
|
+
voice: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6683
|
+
maskedPhone: string;
|
|
6684
|
+
}>>;
|
|
6685
|
+
whatsapp: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6686
|
+
maskedPhone: string;
|
|
6687
|
+
}>>;
|
|
6688
|
+
email: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6689
|
+
maskedEmail: string;
|
|
6690
|
+
}>>;
|
|
6691
|
+
};
|
|
6692
|
+
signUp: {
|
|
6693
|
+
sms: (loginId: string, URI: string, user?: {
|
|
6694
|
+
email?: string;
|
|
6695
|
+
name?: string;
|
|
6696
|
+
givenName?: string;
|
|
6697
|
+
middleName?: string;
|
|
6698
|
+
familyName?: string;
|
|
6699
|
+
phone?: string;
|
|
6700
|
+
}, signUpOptions?: {
|
|
6701
|
+
customClaims?: Record<string, any>;
|
|
6702
|
+
templateId?: string;
|
|
6703
|
+
templateOptions?: {
|
|
6704
|
+
[x: string]: string;
|
|
6705
|
+
};
|
|
6706
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6707
|
+
maskedPhone: string;
|
|
6708
|
+
}>>;
|
|
6709
|
+
voice: (loginId: string, URI: string, user?: {
|
|
6710
|
+
email?: string;
|
|
6711
|
+
name?: string;
|
|
6712
|
+
givenName?: string;
|
|
6713
|
+
middleName?: string;
|
|
6714
|
+
familyName?: string;
|
|
6715
|
+
phone?: string;
|
|
6716
|
+
}, signUpOptions?: {
|
|
6717
|
+
customClaims?: Record<string, any>;
|
|
6718
|
+
templateId?: string;
|
|
6719
|
+
templateOptions?: {
|
|
6720
|
+
[x: string]: string;
|
|
6721
|
+
};
|
|
6722
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6723
|
+
maskedPhone: string;
|
|
6724
|
+
}>>;
|
|
6725
|
+
whatsapp: (loginId: string, URI: string, user?: {
|
|
6726
|
+
email?: string;
|
|
6727
|
+
name?: string;
|
|
6728
|
+
givenName?: string;
|
|
6729
|
+
middleName?: string;
|
|
6730
|
+
familyName?: string;
|
|
6731
|
+
phone?: string;
|
|
6732
|
+
}, signUpOptions?: {
|
|
6733
|
+
customClaims?: Record<string, any>;
|
|
6734
|
+
templateId?: string;
|
|
6735
|
+
templateOptions?: {
|
|
6736
|
+
[x: string]: string;
|
|
6737
|
+
};
|
|
6738
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6739
|
+
maskedPhone: string;
|
|
6740
|
+
}>>;
|
|
6741
|
+
email: (loginId: string, URI: string, user?: {
|
|
6742
|
+
email?: string;
|
|
6743
|
+
name?: string;
|
|
6744
|
+
givenName?: string;
|
|
6745
|
+
middleName?: string;
|
|
6746
|
+
familyName?: string;
|
|
6747
|
+
phone?: string;
|
|
6748
|
+
}, signUpOptions?: {
|
|
6749
|
+
customClaims?: Record<string, any>;
|
|
6750
|
+
templateId?: string;
|
|
6751
|
+
templateOptions?: {
|
|
6752
|
+
[x: string]: string;
|
|
6753
|
+
};
|
|
6754
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6755
|
+
maskedEmail: string;
|
|
6756
|
+
}>>;
|
|
6757
|
+
};
|
|
6758
|
+
signUpOrIn: {
|
|
6759
|
+
sms: (loginId: string, URI?: string, signUpOptions?: {
|
|
6760
|
+
customClaims?: Record<string, any>;
|
|
6761
|
+
templateId?: string;
|
|
6762
|
+
templateOptions?: {
|
|
6763
|
+
[x: string]: string;
|
|
6764
|
+
};
|
|
6765
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6766
|
+
maskedPhone: string;
|
|
6767
|
+
}>>;
|
|
6768
|
+
voice: (loginId: string, URI?: string, signUpOptions?: {
|
|
6769
|
+
customClaims?: Record<string, any>;
|
|
6770
|
+
templateId?: string;
|
|
6771
|
+
templateOptions?: {
|
|
6772
|
+
[x: string]: string;
|
|
6773
|
+
};
|
|
6774
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6775
|
+
maskedPhone: string;
|
|
6776
|
+
}>>;
|
|
6777
|
+
whatsapp: (loginId: string, URI?: string, signUpOptions?: {
|
|
6778
|
+
customClaims?: Record<string, any>;
|
|
6779
|
+
templateId?: string;
|
|
6780
|
+
templateOptions?: {
|
|
6781
|
+
[x: string]: string;
|
|
6782
|
+
};
|
|
6783
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6784
|
+
maskedPhone: string;
|
|
6785
|
+
}>>;
|
|
6786
|
+
email: (loginId: string, URI?: string, signUpOptions?: {
|
|
6787
|
+
customClaims?: Record<string, any>;
|
|
6788
|
+
templateId?: string;
|
|
6789
|
+
templateOptions?: {
|
|
6790
|
+
[x: string]: string;
|
|
6791
|
+
};
|
|
6792
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6793
|
+
maskedEmail: string;
|
|
6794
|
+
}>>;
|
|
6795
|
+
};
|
|
6796
|
+
update: {
|
|
6797
|
+
email: <T_2_4 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
6798
|
+
addToLoginIDs?: T_2_4;
|
|
6799
|
+
onMergeUseExisting?: T_2_4 extends true ? boolean : never;
|
|
6800
|
+
templateOptions?: {
|
|
6801
|
+
[x: string]: string;
|
|
6802
|
+
};
|
|
6803
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6804
|
+
maskedEmail: string;
|
|
6805
|
+
}>>;
|
|
6806
|
+
phone: {
|
|
6807
|
+
sms: <T_3_12 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
6808
|
+
addToLoginIDs?: T_3_12;
|
|
6809
|
+
onMergeUseExisting?: T_3_12 extends true ? boolean : never;
|
|
6810
|
+
templateOptions?: {
|
|
6811
|
+
[x: string]: string;
|
|
6812
|
+
};
|
|
6813
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6814
|
+
maskedPhone: string;
|
|
6815
|
+
}>>;
|
|
6816
|
+
voice: <T_3_13 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
6817
|
+
addToLoginIDs?: T_3_13;
|
|
6818
|
+
onMergeUseExisting?: T_3_13 extends true ? boolean : never;
|
|
6819
|
+
templateOptions?: {
|
|
6820
|
+
[x: string]: string;
|
|
6821
|
+
};
|
|
6822
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6823
|
+
maskedPhone: string;
|
|
6824
|
+
}>>;
|
|
6825
|
+
whatsapp: <T_3_14 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
6826
|
+
addToLoginIDs?: T_3_14;
|
|
6827
|
+
onMergeUseExisting?: T_3_14 extends true ? boolean : never;
|
|
6828
|
+
templateOptions?: {
|
|
6829
|
+
[x: string]: string;
|
|
6830
|
+
};
|
|
6831
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6832
|
+
maskedPhone: string;
|
|
6833
|
+
}>>;
|
|
6834
|
+
};
|
|
6835
|
+
};
|
|
6836
|
+
};
|
|
6837
|
+
enchantedLink: {
|
|
6838
|
+
verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
6839
|
+
signIn: (loginId: string, URI?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
6840
|
+
signUpOrIn: (loginId: string, URI?: string, signUpOptions?: {
|
|
6841
|
+
customClaims?: Record<string, any>;
|
|
6842
|
+
templateId?: string;
|
|
6843
|
+
templateOptions?: {
|
|
6844
|
+
[x: string]: string;
|
|
6845
|
+
};
|
|
6846
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
6847
|
+
signUp: (loginId: string, URI?: string, user?: {
|
|
6848
|
+
email?: string;
|
|
6849
|
+
name?: string;
|
|
6850
|
+
givenName?: string;
|
|
6851
|
+
middleName?: string;
|
|
6852
|
+
familyName?: string;
|
|
6853
|
+
phone?: string;
|
|
6854
|
+
}, signUpOptions?: {
|
|
6855
|
+
customClaims?: Record<string, any>;
|
|
6856
|
+
templateId?: string;
|
|
6857
|
+
templateOptions?: {
|
|
6858
|
+
[x: string]: string;
|
|
6859
|
+
};
|
|
6860
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
6861
|
+
waitForSession: (pendingRef: string, config?: {
|
|
6862
|
+
pollingIntervalMs: number;
|
|
6863
|
+
timeoutMs: number;
|
|
6864
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
6865
|
+
update: {
|
|
6866
|
+
email: <T_4_4 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
6867
|
+
addToLoginIDs?: T_4_4;
|
|
6868
|
+
onMergeUseExisting?: T_4_4 extends true ? boolean : never;
|
|
6869
|
+
templateOptions?: {
|
|
6870
|
+
[x: string]: string;
|
|
6871
|
+
};
|
|
6872
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
6873
|
+
};
|
|
6874
|
+
};
|
|
6875
|
+
oauth: {
|
|
6876
|
+
start: ((provider: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>) & {
|
|
6877
|
+
google: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
6878
|
+
facebook: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
6879
|
+
github: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
6880
|
+
microsoft: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
6881
|
+
gitlab: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
6882
|
+
apple: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
6883
|
+
discord: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
6884
|
+
linkedin: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
6885
|
+
slack: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
6886
|
+
};
|
|
6887
|
+
exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
6888
|
+
startNative: (provider: string, loginOptions?: _descope_core_js_sdk.LoginOptions, implicit?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
6889
|
+
finishNative: (provider: string, stateId: string, user?: string, code?: string, idToken?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
6890
|
+
};
|
|
6891
|
+
saml: {
|
|
6892
|
+
start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
6893
|
+
exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
6894
|
+
};
|
|
6895
|
+
totp: {
|
|
6896
|
+
signUp: (loginId: string, user?: {
|
|
6897
|
+
email?: string;
|
|
6898
|
+
name?: string;
|
|
6899
|
+
givenName?: string;
|
|
6900
|
+
middleName?: string;
|
|
6901
|
+
familyName?: string;
|
|
6902
|
+
phone?: string;
|
|
6903
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.TOTPResponse>>;
|
|
6904
|
+
verify: (loginId: string, code: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
6905
|
+
update: (loginId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.TOTPResponse>>;
|
|
6906
|
+
};
|
|
6907
|
+
notp: {
|
|
6908
|
+
signUpOrIn: (loginId?: string, signUpOptions?: {
|
|
6909
|
+
customClaims?: Record<string, any>;
|
|
6910
|
+
templateId?: string;
|
|
6911
|
+
templateOptions?: {
|
|
6912
|
+
[x: string]: string;
|
|
6913
|
+
};
|
|
6914
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6915
|
+
pendingRef: string;
|
|
6916
|
+
redirectUrl: string;
|
|
6917
|
+
image: string;
|
|
6918
|
+
}>>;
|
|
6919
|
+
signUp: (loginId?: string, user?: {
|
|
6920
|
+
email?: string;
|
|
6921
|
+
name?: string;
|
|
6922
|
+
givenName?: string;
|
|
6923
|
+
middleName?: string;
|
|
6924
|
+
familyName?: string;
|
|
6925
|
+
phone?: string;
|
|
6926
|
+
}, signUpOptions?: {
|
|
6927
|
+
customClaims?: Record<string, any>;
|
|
6928
|
+
templateId?: string;
|
|
6929
|
+
templateOptions?: {
|
|
6930
|
+
[x: string]: string;
|
|
6931
|
+
};
|
|
6932
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6933
|
+
pendingRef: string;
|
|
6934
|
+
redirectUrl: string;
|
|
6935
|
+
image: string;
|
|
6936
|
+
}>>;
|
|
6937
|
+
signIn: (loginId?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6938
|
+
pendingRef: string;
|
|
6939
|
+
redirectUrl: string;
|
|
6940
|
+
image: string;
|
|
6941
|
+
}>>;
|
|
6942
|
+
waitForSession: (pendingRef: string, config?: {
|
|
6943
|
+
pollingIntervalMs: number;
|
|
6944
|
+
timeoutMs: number;
|
|
6945
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
6946
|
+
};
|
|
6947
|
+
password: {
|
|
6948
|
+
signUp: (loginId: string, password: string, user?: {
|
|
6949
|
+
email?: string;
|
|
6950
|
+
name?: string;
|
|
6951
|
+
givenName?: string;
|
|
6952
|
+
middleName?: string;
|
|
6953
|
+
familyName?: string;
|
|
6954
|
+
phone?: string;
|
|
6955
|
+
}, signUpOptions?: {
|
|
6956
|
+
customClaims?: Record<string, any>;
|
|
6957
|
+
templateId?: string;
|
|
6958
|
+
templateOptions?: {
|
|
6959
|
+
[x: string]: string;
|
|
6960
|
+
};
|
|
6961
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
6962
|
+
signIn: (loginId: string, password: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
6963
|
+
sendReset: (loginId: string, redirectUrl?: string, templateOptions?: {
|
|
6964
|
+
[x: string]: string;
|
|
6965
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6966
|
+
resetMethod: string;
|
|
6967
|
+
pendingRef?: string;
|
|
6968
|
+
linkId?: string;
|
|
6969
|
+
maskedEmail: string;
|
|
6970
|
+
}>>;
|
|
6971
|
+
update: (loginId: string, newPassword: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
6972
|
+
replace: (loginId: string, oldPassword: string, newPassword: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
6973
|
+
policy: () => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6974
|
+
minLength: number;
|
|
6975
|
+
lowercase: boolean;
|
|
6976
|
+
uppercase: boolean;
|
|
6977
|
+
number: boolean;
|
|
6978
|
+
nonAlphanumeric: boolean;
|
|
6979
|
+
}>>;
|
|
6980
|
+
};
|
|
6981
|
+
selectTenant: (tenantId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
6982
|
+
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
6983
|
+
logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
6984
|
+
logoutPrevious: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
6985
|
+
me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
|
|
6986
|
+
myTenants: (tenants: true | string[], token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
6987
|
+
tenants: {
|
|
6988
|
+
id: string;
|
|
6989
|
+
name: string;
|
|
6990
|
+
customAttributes?: Record<string, any>;
|
|
6991
|
+
}[];
|
|
6992
|
+
}>>;
|
|
6993
|
+
history: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserHistoryResponse>>;
|
|
6994
|
+
isJwtExpired: (token: string) => boolean;
|
|
6995
|
+
getTenants: (token: string) => string[];
|
|
6996
|
+
getJwtPermissions: (token: string, tenant?: string) => string[];
|
|
6997
|
+
getJwtRoles: (token: string, tenant?: string) => string[];
|
|
6998
|
+
httpClient: {
|
|
6999
|
+
get: (path: string, config?: {
|
|
7000
|
+
headers?: HeadersInit;
|
|
7001
|
+
queryParams?: {
|
|
7002
|
+
[key: string]: string;
|
|
7003
|
+
};
|
|
7004
|
+
token?: string;
|
|
7005
|
+
}) => Promise<Response>;
|
|
7006
|
+
post: (path: string, body?: any, config?: {
|
|
7007
|
+
headers?: HeadersInit;
|
|
7008
|
+
queryParams?: {
|
|
7009
|
+
[key: string]: string;
|
|
7010
|
+
};
|
|
7011
|
+
token?: string;
|
|
7012
|
+
}) => Promise<Response>;
|
|
7013
|
+
patch: (path: string, body?: any, config?: {
|
|
7014
|
+
headers?: HeadersInit;
|
|
7015
|
+
queryParams?: {
|
|
7016
|
+
[key: string]: string;
|
|
7017
|
+
};
|
|
7018
|
+
token?: string;
|
|
7019
|
+
}) => Promise<Response>;
|
|
7020
|
+
put: (path: string, body?: any, config?: {
|
|
7021
|
+
headers?: HeadersInit;
|
|
7022
|
+
queryParams?: {
|
|
7023
|
+
[key: string]: string;
|
|
7024
|
+
};
|
|
7025
|
+
token?: string;
|
|
7026
|
+
}) => Promise<Response>;
|
|
7027
|
+
delete: (path: string, config?: {
|
|
7028
|
+
headers?: HeadersInit;
|
|
7029
|
+
queryParams?: {
|
|
7030
|
+
[key: string]: string;
|
|
7031
|
+
};
|
|
7032
|
+
token?: string;
|
|
7033
|
+
}) => Promise<Response>;
|
|
7034
|
+
hooks?: {
|
|
7035
|
+
beforeRequest?: (config: _descope_core_js_sdk.RequestConfig) => _descope_core_js_sdk.RequestConfig;
|
|
7036
|
+
afterRequest?: (req: _descope_core_js_sdk.RequestConfig, res: Response) => void | Promise<void>;
|
|
7037
|
+
transformResponse?: (mutableResponse: _descope_core_js_sdk.ExtendedResponse) => Promise<_descope_core_js_sdk.ExtendedResponse>;
|
|
7038
|
+
};
|
|
7039
|
+
buildUrl: (path: string, queryParams?: {
|
|
7040
|
+
[key: string]: string;
|
|
7041
|
+
}) => string;
|
|
7042
|
+
};
|
|
7043
|
+
} | {
|
|
7044
|
+
refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
7045
|
+
flow: {
|
|
7046
|
+
start: (flowId: string, options?: Pick<{
|
|
7047
|
+
redirectUrl?: string;
|
|
7048
|
+
location?: string;
|
|
7049
|
+
tenant?: string;
|
|
7050
|
+
deviceInfo?: {
|
|
7051
|
+
webAuthnSupport?: boolean;
|
|
7052
|
+
};
|
|
7053
|
+
lastAuth?: {
|
|
7054
|
+
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
7055
|
+
oauthProvider?: string;
|
|
7056
|
+
name?: string;
|
|
7057
|
+
loginId?: string;
|
|
7058
|
+
};
|
|
7059
|
+
redirectAuth?: {
|
|
7060
|
+
callbackUrl: string;
|
|
7061
|
+
codeChallenge: string;
|
|
7062
|
+
};
|
|
7063
|
+
oidcIdpStateId?: string;
|
|
7064
|
+
preview?: boolean;
|
|
7065
|
+
samlIdpStateId?: string;
|
|
7066
|
+
samlIdpUsername?: string;
|
|
7067
|
+
ssoAppId?: string;
|
|
7068
|
+
oidcLoginHint?: string;
|
|
7069
|
+
abTestingKey?: number;
|
|
7070
|
+
startOptionsVersion?: number;
|
|
7071
|
+
client?: Record<string, any>;
|
|
7072
|
+
locale?: string;
|
|
7073
|
+
oidcPrompt?: string;
|
|
7074
|
+
oidcErrorRedirectUri?: string;
|
|
7075
|
+
nativeOptions?: {
|
|
7076
|
+
platform: "ios" | "android";
|
|
7077
|
+
oauthProvider?: string;
|
|
7078
|
+
oauthRedirect?: string;
|
|
7079
|
+
};
|
|
7080
|
+
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "nativeOptions"> & {
|
|
7081
|
+
lastAuth?: Omit<{
|
|
7082
|
+
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
7083
|
+
oauthProvider?: string;
|
|
7084
|
+
name?: string;
|
|
7085
|
+
loginId?: string;
|
|
7086
|
+
}, "loginId" | "name">;
|
|
7087
|
+
}, conditionInteractionId?: string, interactionId?: string, componentsVersion?: string, flowVersions?: Record<string, number>, input?: {
|
|
7088
|
+
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any[])[])[])[])[])[])[])[])[])[])[];
|
|
7089
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
7090
|
+
next: (executionId: string, stepId: string, interactionId: string, version?: number, componentsVersion?: string, input?: {
|
|
7091
|
+
[x: string]: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | any[])[])[])[])[])[])[])[])[])[])[];
|
|
7092
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
7093
|
+
};
|
|
7094
|
+
webauthn: {
|
|
7095
|
+
signUp: ((identifier: string, name: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
|
|
7096
|
+
start: (loginId: string, origin: string, name: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
7097
|
+
transactionId: string;
|
|
7098
|
+
options: string;
|
|
7099
|
+
create: boolean;
|
|
7100
|
+
}>>;
|
|
7101
|
+
finish: (transactionId: string, response: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
7102
|
+
};
|
|
7103
|
+
signIn: ((identifier: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
|
|
7104
|
+
start: (loginId: string, origin: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
7105
|
+
transactionId: string;
|
|
7106
|
+
options: string;
|
|
7107
|
+
create: boolean;
|
|
7108
|
+
}>>;
|
|
7109
|
+
finish: (transactionId: string, response: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
7110
|
+
};
|
|
7111
|
+
signUpOrIn: ((identifier: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
|
|
7112
|
+
start: (loginId: string, origin: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
7113
|
+
transactionId: string;
|
|
7114
|
+
options: string;
|
|
7115
|
+
create: boolean;
|
|
7116
|
+
}>>;
|
|
7117
|
+
};
|
|
7118
|
+
update: ((identifier: string, token: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>) & {
|
|
7119
|
+
start: (loginId: string, origin: string, token: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
7120
|
+
transactionId: string;
|
|
7121
|
+
options: string;
|
|
7122
|
+
create: boolean;
|
|
7123
|
+
}>>;
|
|
7124
|
+
finish: (transactionId: string, response: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
7125
|
+
};
|
|
7126
|
+
helpers: {
|
|
7127
|
+
create: (options: string) => Promise<string>;
|
|
7128
|
+
get: (options: string) => Promise<string>;
|
|
7129
|
+
isSupported: (requirePlatformAuthenticator?: boolean) => Promise<boolean>;
|
|
7130
|
+
conditional: (options: string, abort: AbortController) => Promise<string>;
|
|
7131
|
+
};
|
|
7132
|
+
};
|
|
7133
|
+
fedcm: {
|
|
7134
|
+
oneTap(provider?: string, oneTapConfig?: _descope_web_js_sdk.OneTapConfig, loginOptions?: _descope_core_js_sdk.LoginOptions, onSkip?: () => void): Promise<unknown>;
|
|
7135
|
+
launch(context?: "signin" | "signup" | "use" | "continue"): Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
7136
|
+
isSupported(): boolean;
|
|
7137
|
+
};
|
|
7138
|
+
accessKey: {
|
|
7139
|
+
exchange: (accessKey: string, loginOptions?: _descope_core_js_sdk.AccessKeyLoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
|
|
7140
|
+
};
|
|
7141
|
+
otp: {
|
|
7142
|
+
verify: {
|
|
7143
|
+
sms: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
7144
|
+
voice: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
7145
|
+
whatsapp: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
7146
|
+
email: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
7147
|
+
};
|
|
7148
|
+
signIn: {
|
|
7149
|
+
sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
7150
|
+
maskedPhone: string;
|
|
7151
|
+
}>>;
|
|
7152
|
+
voice: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
7153
|
+
maskedPhone: string;
|
|
7154
|
+
}>>;
|
|
7155
|
+
whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
7156
|
+
maskedPhone: string;
|
|
7157
|
+
}>>;
|
|
7158
|
+
email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
7159
|
+
maskedEmail: string;
|
|
7160
|
+
}>>;
|
|
7161
|
+
};
|
|
7162
|
+
signUp: {
|
|
7163
|
+
sms: (loginId: string, user?: {
|
|
7164
|
+
email?: string;
|
|
7165
|
+
name?: string;
|
|
7166
|
+
givenName?: string;
|
|
7167
|
+
middleName?: string;
|
|
7168
|
+
familyName?: string;
|
|
7169
|
+
phone?: string;
|
|
7170
|
+
}, signUpOptions?: {
|
|
7171
|
+
customClaims?: Record<string, any>;
|
|
7172
|
+
templateId?: string;
|
|
7173
|
+
templateOptions?: {
|
|
7174
|
+
[x: string]: string;
|
|
7175
|
+
};
|
|
7176
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
7177
|
+
maskedPhone: string;
|
|
7178
|
+
}>>;
|
|
7179
|
+
voice: (loginId: string, user?: {
|
|
7180
|
+
email?: string;
|
|
7181
|
+
name?: string;
|
|
7182
|
+
givenName?: string;
|
|
7183
|
+
middleName?: string;
|
|
7184
|
+
familyName?: string;
|
|
7185
|
+
phone?: string;
|
|
7186
|
+
}, signUpOptions?: {
|
|
7187
|
+
customClaims?: Record<string, any>;
|
|
7188
|
+
templateId?: string;
|
|
7189
|
+
templateOptions?: {
|
|
7190
|
+
[x: string]: string;
|
|
7191
|
+
};
|
|
7192
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
7193
|
+
maskedPhone: string;
|
|
7194
|
+
}>>;
|
|
7195
|
+
whatsapp: (loginId: string, user?: {
|
|
7196
|
+
email?: string;
|
|
7197
|
+
name?: string;
|
|
7198
|
+
givenName?: string;
|
|
7199
|
+
middleName?: string;
|
|
7200
|
+
familyName?: string;
|
|
7201
|
+
phone?: string;
|
|
7202
|
+
}, signUpOptions?: {
|
|
7203
|
+
customClaims?: Record<string, any>;
|
|
7204
|
+
templateId?: string;
|
|
7205
|
+
templateOptions?: {
|
|
7206
|
+
[x: string]: string;
|
|
7207
|
+
};
|
|
7208
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
7209
|
+
maskedPhone: string;
|
|
7210
|
+
}>>;
|
|
7211
|
+
email: (loginId: string, user?: {
|
|
7212
|
+
email?: string;
|
|
7213
|
+
name?: string;
|
|
7214
|
+
givenName?: string;
|
|
7215
|
+
middleName?: string;
|
|
7216
|
+
familyName?: string;
|
|
7217
|
+
phone?: string;
|
|
7218
|
+
}, signUpOptions?: {
|
|
7219
|
+
customClaims?: Record<string, any>;
|
|
7220
|
+
templateId?: string;
|
|
7221
|
+
templateOptions?: {
|
|
7222
|
+
[x: string]: string;
|
|
7223
|
+
};
|
|
7224
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
7225
|
+
maskedEmail: string;
|
|
7226
|
+
}>>;
|
|
7227
|
+
};
|
|
7228
|
+
signUpOrIn: {
|
|
7229
|
+
sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
7230
|
+
maskedPhone: string;
|
|
7231
|
+
}>>;
|
|
7232
|
+
voice: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
7233
|
+
maskedPhone: string;
|
|
7234
|
+
}>>;
|
|
7235
|
+
whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
7236
|
+
maskedPhone: string;
|
|
7237
|
+
}>>;
|
|
7238
|
+
email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
7239
|
+
maskedEmail: string;
|
|
7240
|
+
}>>;
|
|
7241
|
+
};
|
|
7242
|
+
update: {
|
|
7243
|
+
email: <T_9 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
|
|
7244
|
+
addToLoginIDs?: T_9;
|
|
7245
|
+
onMergeUseExisting?: T_9 extends true ? boolean : never;
|
|
7246
|
+
templateOptions?: {
|
|
7247
|
+
[x: string]: string;
|
|
7248
|
+
};
|
|
7249
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
7250
|
+
maskedEmail: string;
|
|
7251
|
+
}>>;
|
|
7252
|
+
phone: {
|
|
7253
|
+
sms: <T_1_15 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
7254
|
+
addToLoginIDs?: T_1_15;
|
|
7255
|
+
onMergeUseExisting?: T_1_15 extends true ? boolean : never;
|
|
7256
|
+
templateOptions?: {
|
|
7257
|
+
[x: string]: string;
|
|
7258
|
+
};
|
|
7259
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
7260
|
+
maskedPhone: string;
|
|
7261
|
+
}>>;
|
|
7262
|
+
voice: <T_1_16 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
7263
|
+
addToLoginIDs?: T_1_16;
|
|
7264
|
+
onMergeUseExisting?: T_1_16 extends true ? boolean : never;
|
|
7265
|
+
templateOptions?: {
|
|
7266
|
+
[x: string]: string;
|
|
7267
|
+
};
|
|
7268
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
7269
|
+
maskedPhone: string;
|
|
7270
|
+
}>>;
|
|
7271
|
+
whatsapp: <T_1_17 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
7272
|
+
addToLoginIDs?: T_1_17;
|
|
7273
|
+
onMergeUseExisting?: T_1_17 extends true ? boolean : never;
|
|
7274
|
+
templateOptions?: {
|
|
7275
|
+
[x: string]: string;
|
|
7276
|
+
};
|
|
7277
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
7278
|
+
maskedPhone: string;
|
|
7279
|
+
}>>;
|
|
7280
|
+
};
|
|
7281
|
+
};
|
|
7282
|
+
};
|
|
7283
|
+
magicLink: {
|
|
7284
|
+
verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
7285
|
+
signIn: {
|
|
7286
|
+
sms: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
7287
|
+
maskedPhone: string;
|
|
7288
|
+
}>>;
|
|
7289
|
+
voice: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
7290
|
+
maskedPhone: string;
|
|
7291
|
+
}>>;
|
|
7292
|
+
whatsapp: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
7293
|
+
maskedPhone: string;
|
|
7294
|
+
}>>;
|
|
7295
|
+
email: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
7296
|
+
maskedEmail: string;
|
|
7297
|
+
}>>;
|
|
7298
|
+
};
|
|
7299
|
+
signUp: {
|
|
7300
|
+
sms: (loginId: string, URI: string, user?: {
|
|
7301
|
+
email?: string;
|
|
7302
|
+
name?: string;
|
|
7303
|
+
givenName?: string;
|
|
7304
|
+
middleName?: string;
|
|
7305
|
+
familyName?: string;
|
|
7306
|
+
phone?: string;
|
|
7307
|
+
}, signUpOptions?: {
|
|
7308
|
+
customClaims?: Record<string, any>;
|
|
7309
|
+
templateId?: string;
|
|
7310
|
+
templateOptions?: {
|
|
7311
|
+
[x: string]: string;
|
|
7312
|
+
};
|
|
7313
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
7314
|
+
maskedPhone: string;
|
|
7315
|
+
}>>;
|
|
7316
|
+
voice: (loginId: string, URI: string, user?: {
|
|
7317
|
+
email?: string;
|
|
7318
|
+
name?: string;
|
|
7319
|
+
givenName?: string;
|
|
7320
|
+
middleName?: string;
|
|
7321
|
+
familyName?: string;
|
|
7322
|
+
phone?: string;
|
|
7323
|
+
}, signUpOptions?: {
|
|
7324
|
+
customClaims?: Record<string, any>;
|
|
7325
|
+
templateId?: string;
|
|
7326
|
+
templateOptions?: {
|
|
7327
|
+
[x: string]: string;
|
|
7328
|
+
};
|
|
7329
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
7330
|
+
maskedPhone: string;
|
|
7331
|
+
}>>;
|
|
7332
|
+
whatsapp: (loginId: string, URI: string, user?: {
|
|
7333
|
+
email?: string;
|
|
7334
|
+
name?: string;
|
|
7335
|
+
givenName?: string;
|
|
7336
|
+
middleName?: string;
|
|
7337
|
+
familyName?: string;
|
|
7338
|
+
phone?: string;
|
|
7339
|
+
}, signUpOptions?: {
|
|
7340
|
+
customClaims?: Record<string, any>;
|
|
7341
|
+
templateId?: string;
|
|
7342
|
+
templateOptions?: {
|
|
7343
|
+
[x: string]: string;
|
|
7344
|
+
};
|
|
7345
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
7346
|
+
maskedPhone: string;
|
|
7347
|
+
}>>;
|
|
7348
|
+
email: (loginId: string, URI: string, user?: {
|
|
7349
|
+
email?: string;
|
|
7350
|
+
name?: string;
|
|
7351
|
+
givenName?: string;
|
|
7352
|
+
middleName?: string;
|
|
7353
|
+
familyName?: string;
|
|
7354
|
+
phone?: string;
|
|
7355
|
+
}, signUpOptions?: {
|
|
7356
|
+
customClaims?: Record<string, any>;
|
|
7357
|
+
templateId?: string;
|
|
7358
|
+
templateOptions?: {
|
|
7359
|
+
[x: string]: string;
|
|
7360
|
+
};
|
|
7361
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
7362
|
+
maskedEmail: string;
|
|
7363
|
+
}>>;
|
|
7364
|
+
};
|
|
7365
|
+
signUpOrIn: {
|
|
7366
|
+
sms: (loginId: string, URI?: string, signUpOptions?: {
|
|
7367
|
+
customClaims?: Record<string, any>;
|
|
7368
|
+
templateId?: string;
|
|
7369
|
+
templateOptions?: {
|
|
7370
|
+
[x: string]: string;
|
|
7371
|
+
};
|
|
7372
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
7373
|
+
maskedPhone: string;
|
|
7374
|
+
}>>;
|
|
7375
|
+
voice: (loginId: string, URI?: string, signUpOptions?: {
|
|
7376
|
+
customClaims?: Record<string, any>;
|
|
7377
|
+
templateId?: string;
|
|
7378
|
+
templateOptions?: {
|
|
7379
|
+
[x: string]: string;
|
|
7380
|
+
};
|
|
7381
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
7382
|
+
maskedPhone: string;
|
|
7383
|
+
}>>;
|
|
7384
|
+
whatsapp: (loginId: string, URI?: string, signUpOptions?: {
|
|
7385
|
+
customClaims?: Record<string, any>;
|
|
7386
|
+
templateId?: string;
|
|
7387
|
+
templateOptions?: {
|
|
7388
|
+
[x: string]: string;
|
|
7389
|
+
};
|
|
7390
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
7391
|
+
maskedPhone: string;
|
|
7392
|
+
}>>;
|
|
7393
|
+
email: (loginId: string, URI?: string, signUpOptions?: {
|
|
7394
|
+
customClaims?: Record<string, any>;
|
|
7395
|
+
templateId?: string;
|
|
7396
|
+
templateOptions?: {
|
|
7397
|
+
[x: string]: string;
|
|
7398
|
+
};
|
|
7399
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
7400
|
+
maskedEmail: string;
|
|
7401
|
+
}>>;
|
|
7402
|
+
};
|
|
7403
|
+
update: {
|
|
7404
|
+
email: <T_2_5 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
7405
|
+
addToLoginIDs?: T_2_5;
|
|
7406
|
+
onMergeUseExisting?: T_2_5 extends true ? boolean : never;
|
|
7407
|
+
templateOptions?: {
|
|
7408
|
+
[x: string]: string;
|
|
7409
|
+
};
|
|
7410
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
7411
|
+
maskedEmail: string;
|
|
7412
|
+
}>>;
|
|
7413
|
+
phone: {
|
|
7414
|
+
sms: <T_3_15 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
7415
|
+
addToLoginIDs?: T_3_15;
|
|
7416
|
+
onMergeUseExisting?: T_3_15 extends true ? boolean : never;
|
|
7417
|
+
templateOptions?: {
|
|
7418
|
+
[x: string]: string;
|
|
7419
|
+
};
|
|
7420
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
7421
|
+
maskedPhone: string;
|
|
7422
|
+
}>>;
|
|
7423
|
+
voice: <T_3_16 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
7424
|
+
addToLoginIDs?: T_3_16;
|
|
7425
|
+
onMergeUseExisting?: T_3_16 extends true ? boolean : never;
|
|
7426
|
+
templateOptions?: {
|
|
7427
|
+
[x: string]: string;
|
|
7428
|
+
};
|
|
7429
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
7430
|
+
maskedPhone: string;
|
|
7431
|
+
}>>;
|
|
7432
|
+
whatsapp: <T_3_17 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
7433
|
+
addToLoginIDs?: T_3_17;
|
|
7434
|
+
onMergeUseExisting?: T_3_17 extends true ? boolean : never;
|
|
7435
|
+
templateOptions?: {
|
|
7436
|
+
[x: string]: string;
|
|
7437
|
+
};
|
|
7438
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
7439
|
+
maskedPhone: string;
|
|
7440
|
+
}>>;
|
|
7441
|
+
};
|
|
7442
|
+
};
|
|
7443
|
+
};
|
|
7444
|
+
enchantedLink: {
|
|
7445
|
+
verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
7446
|
+
signIn: (loginId: string, URI?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
7447
|
+
signUpOrIn: (loginId: string, URI?: string, signUpOptions?: {
|
|
7448
|
+
customClaims?: Record<string, any>;
|
|
7449
|
+
templateId?: string;
|
|
7450
|
+
templateOptions?: {
|
|
7451
|
+
[x: string]: string;
|
|
7452
|
+
};
|
|
7453
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
7454
|
+
signUp: (loginId: string, URI?: string, user?: {
|
|
7455
|
+
email?: string;
|
|
7456
|
+
name?: string;
|
|
7457
|
+
givenName?: string;
|
|
7458
|
+
middleName?: string;
|
|
7459
|
+
familyName?: string;
|
|
7460
|
+
phone?: string;
|
|
7461
|
+
}, signUpOptions?: {
|
|
7462
|
+
customClaims?: Record<string, any>;
|
|
7463
|
+
templateId?: string;
|
|
7464
|
+
templateOptions?: {
|
|
7465
|
+
[x: string]: string;
|
|
7466
|
+
};
|
|
7467
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
7468
|
+
waitForSession: (pendingRef: string, config?: {
|
|
7469
|
+
pollingIntervalMs: number;
|
|
7470
|
+
timeoutMs: number;
|
|
7471
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
7472
|
+
update: {
|
|
7473
|
+
email: <T_4_5 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
7474
|
+
addToLoginIDs?: T_4_5;
|
|
7475
|
+
onMergeUseExisting?: T_4_5 extends true ? boolean : never;
|
|
4991
7476
|
templateOptions?: {
|
|
4992
7477
|
[x: string]: string;
|
|
4993
7478
|
};
|
|
@@ -5103,6 +7588,7 @@ declare const getSdk: () => ((({
|
|
|
5103
7588
|
selectTenant: (tenantId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
5104
7589
|
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
5105
7590
|
logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
7591
|
+
logoutPrevious: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
5106
7592
|
me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
|
|
5107
7593
|
myTenants: (tenants: true | string[], token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
5108
7594
|
tenants: {
|