@descope/vue-sdk 2.8.5 → 2.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -3,6 +3,7 @@ import { App } from 'vue';
3
3
  import * as _descope_web_js_sdk from '@descope/web-js-sdk';
4
4
  import { CookieConfig } from '@descope/web-js-sdk';
5
5
  import * as _descope_core_js_sdk from '@descope/core-js-sdk';
6
+ import * as _2 from '@descope/web-js-sdk/node_modules/oidc-client-ts/dist/types/oidc-client-ts';
6
7
 
7
8
  declare const _default$7: vue.DefineComponent<{
8
9
  flowId: {
@@ -355,6 +356,7 @@ type Options = {
355
356
 
356
357
  declare const useDescope: () => ((({
357
358
  refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
359
+ logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
358
360
  flow: {
359
361
  start: (flowId: string, options?: Pick<{
360
362
  redirectUrl?: string;
@@ -472,6 +474,13 @@ declare const useDescope: () => ((({
472
474
  isSupported(): boolean;
473
475
  isLoggedIn(context?: "signin" | "signup" | "use" | "continue"): Promise<boolean>;
474
476
  };
477
+ oidc: {
478
+ loginWithRedirect: (arg?: _2.CreateSigninRequestArgs, disableNavigation?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
479
+ finishLogin: (url?: string) => Promise<any>;
480
+ finishLoginIfNeed: (url?: string) => Promise<any>;
481
+ refreshToken: (refreshToken: string) => Promise<_2.SigninResponse>;
482
+ logout: (arg?: _2.CreateSignoutRequestArgs, disableNavigation?: boolean) => Promise<any>;
483
+ };
475
484
  accessKey: {
476
485
  exchange: (accessKey: string, loginOptions?: _descope_core_js_sdk.AccessKeyLoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
477
486
  };
@@ -930,7 +939,6 @@ declare const useDescope: () => ((({
930
939
  }>>;
931
940
  };
932
941
  selectTenant: (tenantId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
933
- logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
934
942
  logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
935
943
  me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
936
944
  myTenants: (tenants: true | string[], token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
@@ -993,6 +1001,7 @@ declare const useDescope: () => ((({
993
1001
  };
994
1002
  } | {
995
1003
  refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
1004
+ logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
996
1005
  flow: {
997
1006
  start: (flowId: string, options?: Pick<{
998
1007
  redirectUrl?: string;
@@ -1110,6 +1119,13 @@ declare const useDescope: () => ((({
1110
1119
  isSupported(): boolean;
1111
1120
  isLoggedIn(context?: "signin" | "signup" | "use" | "continue"): Promise<boolean>;
1112
1121
  };
1122
+ oidc: {
1123
+ loginWithRedirect: (arg?: _2.CreateSigninRequestArgs, disableNavigation?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
1124
+ finishLogin: (url?: string) => Promise<any>;
1125
+ finishLoginIfNeed: (url?: string) => Promise<any>;
1126
+ refreshToken: (refreshToken: string) => Promise<_2.SigninResponse>;
1127
+ logout: (arg?: _2.CreateSignoutRequestArgs, disableNavigation?: boolean) => Promise<any>;
1128
+ };
1113
1129
  accessKey: {
1114
1130
  exchange: (accessKey: string, loginOptions?: _descope_core_js_sdk.AccessKeyLoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
1115
1131
  };
@@ -1568,7 +1584,6 @@ declare const useDescope: () => ((({
1568
1584
  }>>;
1569
1585
  };
1570
1586
  selectTenant: (tenantId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
1571
- logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
1572
1587
  logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
1573
1588
  me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
1574
1589
  myTenants: (tenants: true | string[], token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
@@ -1629,15 +1644,9 @@ declare const useDescope: () => ((({
1629
1644
  [key: string]: string;
1630
1645
  }) => string;
1631
1646
  };
1632
- }) & {
1633
- onSessionTokenChange: (cb: (data: string) => void) => () => any[];
1634
- onUserChange: (cb: (data: _descope_core_js_sdk.UserResponse) => void) => () => any[];
1635
- onIsAuthenticatedChange: (cb: (isAuthenticated: boolean) => void) => () => any[];
1636
- }) & {
1637
- getLastUserLoginId: () => string;
1638
- getLastUserDisplayName: () => string;
1639
- }) | (((({
1647
+ } | {
1640
1648
  refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
1649
+ logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
1641
1650
  flow: {
1642
1651
  start: (flowId: string, options?: Pick<{
1643
1652
  redirectUrl?: string;
@@ -1755,6 +1764,13 @@ declare const useDescope: () => ((({
1755
1764
  isSupported(): boolean;
1756
1765
  isLoggedIn(context?: "signin" | "signup" | "use" | "continue"): Promise<boolean>;
1757
1766
  };
1767
+ oidc: {
1768
+ loginWithRedirect: (arg?: _2.CreateSigninRequestArgs, disableNavigation?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
1769
+ finishLogin: (url?: string) => Promise<any>;
1770
+ finishLoginIfNeed: (url?: string) => Promise<any>;
1771
+ refreshToken: (refreshToken: string) => Promise<_2.SigninResponse>;
1772
+ logout: (arg?: _2.CreateSignoutRequestArgs, disableNavigation?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
1773
+ };
1758
1774
  accessKey: {
1759
1775
  exchange: (accessKey: string, loginOptions?: _descope_core_js_sdk.AccessKeyLoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
1760
1776
  };
@@ -2213,7 +2229,6 @@ declare const useDescope: () => ((({
2213
2229
  }>>;
2214
2230
  };
2215
2231
  selectTenant: (tenantId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
2216
- logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
2217
2232
  logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
2218
2233
  me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
2219
2234
  myTenants: (tenants: true | string[], token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
@@ -2274,8 +2289,16 @@ declare const useDescope: () => ((({
2274
2289
  [key: string]: string;
2275
2290
  }) => string;
2276
2291
  };
2277
- } | {
2292
+ }) & {
2293
+ onSessionTokenChange: (cb: (data: string) => void) => () => any[];
2294
+ onUserChange: (cb: (data: _descope_core_js_sdk.UserResponse) => void) => () => any[];
2295
+ onIsAuthenticatedChange: (cb: (isAuthenticated: boolean) => void) => () => any[];
2296
+ }) & {
2297
+ getLastUserLoginId: () => string;
2298
+ getLastUserDisplayName: () => string;
2299
+ }) | (((({
2278
2300
  refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
2301
+ logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
2279
2302
  flow: {
2280
2303
  start: (flowId: string, options?: Pick<{
2281
2304
  redirectUrl?: string;
@@ -2393,6 +2416,13 @@ declare const useDescope: () => ((({
2393
2416
  isSupported(): boolean;
2394
2417
  isLoggedIn(context?: "signin" | "signup" | "use" | "continue"): Promise<boolean>;
2395
2418
  };
2419
+ oidc: {
2420
+ loginWithRedirect: (arg?: _2.CreateSigninRequestArgs, disableNavigation?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
2421
+ finishLogin: (url?: string) => Promise<any>;
2422
+ finishLoginIfNeed: (url?: string) => Promise<any>;
2423
+ refreshToken: (refreshToken: string) => Promise<_2.SigninResponse>;
2424
+ logout: (arg?: _2.CreateSignoutRequestArgs, disableNavigation?: boolean) => Promise<any>;
2425
+ };
2396
2426
  accessKey: {
2397
2427
  exchange: (accessKey: string, loginOptions?: _descope_core_js_sdk.AccessKeyLoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
2398
2428
  };
@@ -2851,7 +2881,6 @@ declare const useDescope: () => ((({
2851
2881
  }>>;
2852
2882
  };
2853
2883
  selectTenant: (tenantId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
2854
- logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
2855
2884
  logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
2856
2885
  me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
2857
2886
  myTenants: (tenants: true | string[], token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
@@ -2912,35 +2941,9 @@ declare const useDescope: () => ((({
2912
2941
  [key: string]: string;
2913
2942
  }) => string;
2914
2943
  };
2915
- }) & {
2916
- onSessionTokenChange: (cb: (data: string) => void) => () => any[];
2917
- onUserChange: (cb: (data: _descope_core_js_sdk.UserResponse) => void) => () => any[];
2918
- onIsAuthenticatedChange: (cb: (isAuthenticated: boolean) => void) => () => any[];
2919
- }) & {
2920
- getLastUserLoginId: () => string;
2921
- getLastUserDisplayName: () => string;
2922
- }) & {
2923
- getRefreshToken: () => string;
2924
- getSessionToken: () => string;
2925
- });
2926
- declare const useSession: () => {
2927
- isLoading: vue.ComputedRef<boolean>;
2928
- sessionToken: vue.Ref<string>;
2929
- isAuthenticated: vue.Ref<boolean>;
2930
- };
2931
- declare const useUser: () => {
2932
- isLoading: vue.ComputedRef<boolean>;
2933
- user: vue.Ref<_descope_core_js_sdk.UserResponse>;
2934
- };
2935
-
2936
- declare const routeGuard: () => Promise<boolean>;
2937
- /**
2938
- * This will return the Descope SDK instance
2939
- * In order to get the SDK instance, this should be called after using the plugin
2940
- * @returns Descope SDK
2941
- */
2942
- declare const getSdk: () => ((({
2944
+ } | {
2943
2945
  refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
2946
+ logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
2944
2947
  flow: {
2945
2948
  start: (flowId: string, options?: Pick<{
2946
2949
  redirectUrl?: string;
@@ -3058,6 +3061,13 @@ declare const getSdk: () => ((({
3058
3061
  isSupported(): boolean;
3059
3062
  isLoggedIn(context?: "signin" | "signup" | "use" | "continue"): Promise<boolean>;
3060
3063
  };
3064
+ oidc: {
3065
+ loginWithRedirect: (arg?: _2.CreateSigninRequestArgs, disableNavigation?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
3066
+ finishLogin: (url?: string) => Promise<any>;
3067
+ finishLoginIfNeed: (url?: string) => Promise<any>;
3068
+ refreshToken: (refreshToken: string) => Promise<_2.SigninResponse>;
3069
+ logout: (arg?: _2.CreateSignoutRequestArgs, disableNavigation?: boolean) => Promise<any>;
3070
+ };
3061
3071
  accessKey: {
3062
3072
  exchange: (accessKey: string, loginOptions?: _descope_core_js_sdk.AccessKeyLoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
3063
3073
  };
@@ -3163,9 +3173,9 @@ declare const getSdk: () => ((({
3163
3173
  }>>;
3164
3174
  };
3165
3175
  update: {
3166
- email: <T extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
3167
- addToLoginIDs?: T;
3168
- onMergeUseExisting?: T extends true ? boolean : never;
3176
+ email: <T_8 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
3177
+ addToLoginIDs?: T_8;
3178
+ onMergeUseExisting?: T_8 extends true ? boolean : never;
3169
3179
  templateOptions?: {
3170
3180
  [x: string]: string;
3171
3181
  };
@@ -3173,27 +3183,27 @@ declare const getSdk: () => ((({
3173
3183
  maskedEmail: string;
3174
3184
  }>>;
3175
3185
  phone: {
3176
- sms: <T_1 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
3177
- addToLoginIDs?: T_1;
3178
- onMergeUseExisting?: T_1 extends true ? boolean : never;
3186
+ sms: <T_1_12 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
3187
+ addToLoginIDs?: T_1_12;
3188
+ onMergeUseExisting?: T_1_12 extends true ? boolean : never;
3179
3189
  templateOptions?: {
3180
3190
  [x: string]: string;
3181
3191
  };
3182
3192
  }) => Promise<_descope_core_js_sdk.SdkResponse<{
3183
3193
  maskedPhone: string;
3184
3194
  }>>;
3185
- voice: <T_1_1 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
3186
- addToLoginIDs?: T_1_1;
3187
- onMergeUseExisting?: T_1_1 extends true ? boolean : never;
3195
+ voice: <T_1_13 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
3196
+ addToLoginIDs?: T_1_13;
3197
+ onMergeUseExisting?: T_1_13 extends true ? boolean : never;
3188
3198
  templateOptions?: {
3189
3199
  [x: string]: string;
3190
3200
  };
3191
3201
  }) => Promise<_descope_core_js_sdk.SdkResponse<{
3192
3202
  maskedPhone: string;
3193
3203
  }>>;
3194
- whatsapp: <T_1_2 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
3195
- addToLoginIDs?: T_1_2;
3196
- onMergeUseExisting?: T_1_2 extends true ? boolean : never;
3204
+ whatsapp: <T_1_14 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
3205
+ addToLoginIDs?: T_1_14;
3206
+ onMergeUseExisting?: T_1_14 extends true ? boolean : never;
3197
3207
  templateOptions?: {
3198
3208
  [x: string]: string;
3199
3209
  };
@@ -3324,9 +3334,9 @@ declare const getSdk: () => ((({
3324
3334
  }>>;
3325
3335
  };
3326
3336
  update: {
3327
- email: <T_2 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
3328
- addToLoginIDs?: T_2;
3329
- onMergeUseExisting?: T_2 extends true ? boolean : never;
3337
+ email: <T_2_4 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
3338
+ addToLoginIDs?: T_2_4;
3339
+ onMergeUseExisting?: T_2_4 extends true ? boolean : never;
3330
3340
  templateOptions?: {
3331
3341
  [x: string]: string;
3332
3342
  };
@@ -3334,27 +3344,27 @@ declare const getSdk: () => ((({
3334
3344
  maskedEmail: string;
3335
3345
  }>>;
3336
3346
  phone: {
3337
- sms: <T_3 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
3338
- addToLoginIDs?: T_3;
3339
- onMergeUseExisting?: T_3 extends true ? boolean : never;
3347
+ sms: <T_3_12 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
3348
+ addToLoginIDs?: T_3_12;
3349
+ onMergeUseExisting?: T_3_12 extends true ? boolean : never;
3340
3350
  templateOptions?: {
3341
3351
  [x: string]: string;
3342
3352
  };
3343
3353
  }) => Promise<_descope_core_js_sdk.SdkResponse<{
3344
3354
  maskedPhone: string;
3345
3355
  }>>;
3346
- voice: <T_3_1 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
3347
- addToLoginIDs?: T_3_1;
3348
- onMergeUseExisting?: T_3_1 extends true ? boolean : never;
3356
+ voice: <T_3_13 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
3357
+ addToLoginIDs?: T_3_13;
3358
+ onMergeUseExisting?: T_3_13 extends true ? boolean : never;
3349
3359
  templateOptions?: {
3350
3360
  [x: string]: string;
3351
3361
  };
3352
3362
  }) => Promise<_descope_core_js_sdk.SdkResponse<{
3353
3363
  maskedPhone: string;
3354
3364
  }>>;
3355
- whatsapp: <T_3_2 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
3356
- addToLoginIDs?: T_3_2;
3357
- onMergeUseExisting?: T_3_2 extends true ? boolean : never;
3365
+ whatsapp: <T_3_14 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
3366
+ addToLoginIDs?: T_3_14;
3367
+ onMergeUseExisting?: T_3_14 extends true ? boolean : never;
3358
3368
  templateOptions?: {
3359
3369
  [x: string]: string;
3360
3370
  };
@@ -3393,9 +3403,9 @@ declare const getSdk: () => ((({
3393
3403
  timeoutMs: number;
3394
3404
  }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
3395
3405
  update: {
3396
- email: <T_4 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
3397
- addToLoginIDs?: T_4;
3398
- onMergeUseExisting?: T_4 extends true ? boolean : never;
3406
+ email: <T_4_4 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
3407
+ addToLoginIDs?: T_4_4;
3408
+ onMergeUseExisting?: T_4_4 extends true ? boolean : never;
3399
3409
  templateOptions?: {
3400
3410
  [x: string]: string;
3401
3411
  };
@@ -3516,7 +3526,6 @@ declare const getSdk: () => ((({
3516
3526
  }>>;
3517
3527
  };
3518
3528
  selectTenant: (tenantId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
3519
- logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
3520
3529
  logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
3521
3530
  me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
3522
3531
  myTenants: (tenants: true | string[], token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
@@ -3579,6 +3588,7 @@ declare const getSdk: () => ((({
3579
3588
  };
3580
3589
  } | {
3581
3590
  refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
3591
+ logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
3582
3592
  flow: {
3583
3593
  start: (flowId: string, options?: Pick<{
3584
3594
  redirectUrl?: string;
@@ -3696,6 +3706,13 @@ declare const getSdk: () => ((({
3696
3706
  isSupported(): boolean;
3697
3707
  isLoggedIn(context?: "signin" | "signup" | "use" | "continue"): Promise<boolean>;
3698
3708
  };
3709
+ oidc: {
3710
+ loginWithRedirect: (arg?: _2.CreateSigninRequestArgs, disableNavigation?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
3711
+ finishLogin: (url?: string) => Promise<any>;
3712
+ finishLoginIfNeed: (url?: string) => Promise<any>;
3713
+ refreshToken: (refreshToken: string) => Promise<_2.SigninResponse>;
3714
+ logout: (arg?: _2.CreateSignoutRequestArgs, disableNavigation?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
3715
+ };
3699
3716
  accessKey: {
3700
3717
  exchange: (accessKey: string, loginOptions?: _descope_core_js_sdk.AccessKeyLoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
3701
3718
  };
@@ -3801,9 +3818,9 @@ declare const getSdk: () => ((({
3801
3818
  }>>;
3802
3819
  };
3803
3820
  update: {
3804
- email: <T_5 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
3805
- addToLoginIDs?: T_5;
3806
- onMergeUseExisting?: T_5 extends true ? boolean : never;
3821
+ email: <T_9 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
3822
+ addToLoginIDs?: T_9;
3823
+ onMergeUseExisting?: T_9 extends true ? boolean : never;
3807
3824
  templateOptions?: {
3808
3825
  [x: string]: string;
3809
3826
  };
@@ -3811,27 +3828,27 @@ declare const getSdk: () => ((({
3811
3828
  maskedEmail: string;
3812
3829
  }>>;
3813
3830
  phone: {
3814
- sms: <T_1_3 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
3815
- addToLoginIDs?: T_1_3;
3816
- onMergeUseExisting?: T_1_3 extends true ? boolean : never;
3831
+ sms: <T_1_15 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
3832
+ addToLoginIDs?: T_1_15;
3833
+ onMergeUseExisting?: T_1_15 extends true ? boolean : never;
3817
3834
  templateOptions?: {
3818
3835
  [x: string]: string;
3819
3836
  };
3820
3837
  }) => Promise<_descope_core_js_sdk.SdkResponse<{
3821
3838
  maskedPhone: string;
3822
3839
  }>>;
3823
- voice: <T_1_4 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
3824
- addToLoginIDs?: T_1_4;
3825
- onMergeUseExisting?: T_1_4 extends true ? boolean : never;
3840
+ voice: <T_1_16 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
3841
+ addToLoginIDs?: T_1_16;
3842
+ onMergeUseExisting?: T_1_16 extends true ? boolean : never;
3826
3843
  templateOptions?: {
3827
3844
  [x: string]: string;
3828
3845
  };
3829
3846
  }) => Promise<_descope_core_js_sdk.SdkResponse<{
3830
3847
  maskedPhone: string;
3831
3848
  }>>;
3832
- whatsapp: <T_1_5 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
3833
- addToLoginIDs?: T_1_5;
3834
- onMergeUseExisting?: T_1_5 extends true ? boolean : never;
3849
+ whatsapp: <T_1_17 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
3850
+ addToLoginIDs?: T_1_17;
3851
+ onMergeUseExisting?: T_1_17 extends true ? boolean : never;
3835
3852
  templateOptions?: {
3836
3853
  [x: string]: string;
3837
3854
  };
@@ -3962,9 +3979,9 @@ declare const getSdk: () => ((({
3962
3979
  }>>;
3963
3980
  };
3964
3981
  update: {
3965
- email: <T_2_1 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
3966
- addToLoginIDs?: T_2_1;
3967
- onMergeUseExisting?: T_2_1 extends true ? boolean : never;
3982
+ email: <T_2_5 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
3983
+ addToLoginIDs?: T_2_5;
3984
+ onMergeUseExisting?: T_2_5 extends true ? boolean : never;
3968
3985
  templateOptions?: {
3969
3986
  [x: string]: string;
3970
3987
  };
@@ -3972,27 +3989,27 @@ declare const getSdk: () => ((({
3972
3989
  maskedEmail: string;
3973
3990
  }>>;
3974
3991
  phone: {
3975
- sms: <T_3_3 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
3976
- addToLoginIDs?: T_3_3;
3977
- onMergeUseExisting?: T_3_3 extends true ? boolean : never;
3992
+ sms: <T_3_15 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
3993
+ addToLoginIDs?: T_3_15;
3994
+ onMergeUseExisting?: T_3_15 extends true ? boolean : never;
3978
3995
  templateOptions?: {
3979
3996
  [x: string]: string;
3980
3997
  };
3981
3998
  }) => Promise<_descope_core_js_sdk.SdkResponse<{
3982
3999
  maskedPhone: string;
3983
4000
  }>>;
3984
- voice: <T_3_4 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
3985
- addToLoginIDs?: T_3_4;
3986
- onMergeUseExisting?: T_3_4 extends true ? boolean : never;
4001
+ voice: <T_3_16 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
4002
+ addToLoginIDs?: T_3_16;
4003
+ onMergeUseExisting?: T_3_16 extends true ? boolean : never;
3987
4004
  templateOptions?: {
3988
4005
  [x: string]: string;
3989
4006
  };
3990
4007
  }) => Promise<_descope_core_js_sdk.SdkResponse<{
3991
4008
  maskedPhone: string;
3992
4009
  }>>;
3993
- whatsapp: <T_3_5 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
3994
- addToLoginIDs?: T_3_5;
3995
- onMergeUseExisting?: T_3_5 extends true ? boolean : never;
4010
+ whatsapp: <T_3_17 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
4011
+ addToLoginIDs?: T_3_17;
4012
+ onMergeUseExisting?: T_3_17 extends true ? boolean : never;
3996
4013
  templateOptions?: {
3997
4014
  [x: string]: string;
3998
4015
  };
@@ -4031,9 +4048,9 @@ declare const getSdk: () => ((({
4031
4048
  timeoutMs: number;
4032
4049
  }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
4033
4050
  update: {
4034
- email: <T_4_1 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
4035
- addToLoginIDs?: T_4_1;
4036
- onMergeUseExisting?: T_4_1 extends true ? boolean : never;
4051
+ email: <T_4_5 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
4052
+ addToLoginIDs?: T_4_5;
4053
+ onMergeUseExisting?: T_4_5 extends true ? boolean : never;
4037
4054
  templateOptions?: {
4038
4055
  [x: string]: string;
4039
4056
  };
@@ -4154,7 +4171,6 @@ declare const getSdk: () => ((({
4154
4171
  }>>;
4155
4172
  };
4156
4173
  selectTenant: (tenantId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
4157
- logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
4158
4174
  logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
4159
4175
  me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
4160
4176
  myTenants: (tenants: true | string[], token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
@@ -4222,8 +4238,30 @@ declare const getSdk: () => ((({
4222
4238
  }) & {
4223
4239
  getLastUserLoginId: () => string;
4224
4240
  getLastUserDisplayName: () => string;
4225
- }) | (((({
4241
+ }) & {
4242
+ getRefreshToken: () => string;
4243
+ getSessionToken: () => string;
4244
+ getIdToken: () => string;
4245
+ });
4246
+ declare const useSession: () => {
4247
+ isLoading: vue.ComputedRef<boolean>;
4248
+ sessionToken: vue.Ref<string>;
4249
+ isAuthenticated: vue.Ref<boolean>;
4250
+ };
4251
+ declare const useUser: () => {
4252
+ isLoading: vue.ComputedRef<boolean>;
4253
+ user: vue.Ref<_descope_core_js_sdk.UserResponse>;
4254
+ };
4255
+
4256
+ declare const routeGuard: () => Promise<boolean>;
4257
+ /**
4258
+ * This will return the Descope SDK instance
4259
+ * In order to get the SDK instance, this should be called after using the plugin
4260
+ * @returns Descope SDK
4261
+ */
4262
+ declare const getSdk: () => ((({
4226
4263
  refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
4264
+ logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
4227
4265
  flow: {
4228
4266
  start: (flowId: string, options?: Pick<{
4229
4267
  redirectUrl?: string;
@@ -4341,6 +4379,13 @@ declare const getSdk: () => ((({
4341
4379
  isSupported(): boolean;
4342
4380
  isLoggedIn(context?: "signin" | "signup" | "use" | "continue"): Promise<boolean>;
4343
4381
  };
4382
+ oidc: {
4383
+ loginWithRedirect: (arg?: _2.CreateSigninRequestArgs, disableNavigation?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
4384
+ finishLogin: (url?: string) => Promise<any>;
4385
+ finishLoginIfNeed: (url?: string) => Promise<any>;
4386
+ refreshToken: (refreshToken: string) => Promise<_2.SigninResponse>;
4387
+ logout: (arg?: _2.CreateSignoutRequestArgs, disableNavigation?: boolean) => Promise<any>;
4388
+ };
4344
4389
  accessKey: {
4345
4390
  exchange: (accessKey: string, loginOptions?: _descope_core_js_sdk.AccessKeyLoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
4346
4391
  };
@@ -4446,9 +4491,9 @@ declare const getSdk: () => ((({
4446
4491
  }>>;
4447
4492
  };
4448
4493
  update: {
4449
- email: <T_6 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
4450
- addToLoginIDs?: T_6;
4451
- onMergeUseExisting?: T_6 extends true ? boolean : never;
4494
+ email: <T extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
4495
+ addToLoginIDs?: T;
4496
+ onMergeUseExisting?: T extends true ? boolean : never;
4452
4497
  templateOptions?: {
4453
4498
  [x: string]: string;
4454
4499
  };
@@ -4456,27 +4501,27 @@ declare const getSdk: () => ((({
4456
4501
  maskedEmail: string;
4457
4502
  }>>;
4458
4503
  phone: {
4459
- sms: <T_1_6 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
4460
- addToLoginIDs?: T_1_6;
4461
- onMergeUseExisting?: T_1_6 extends true ? boolean : never;
4504
+ sms: <T_1 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
4505
+ addToLoginIDs?: T_1;
4506
+ onMergeUseExisting?: T_1 extends true ? boolean : never;
4462
4507
  templateOptions?: {
4463
4508
  [x: string]: string;
4464
4509
  };
4465
4510
  }) => Promise<_descope_core_js_sdk.SdkResponse<{
4466
4511
  maskedPhone: string;
4467
4512
  }>>;
4468
- voice: <T_1_7 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
4469
- addToLoginIDs?: T_1_7;
4470
- onMergeUseExisting?: T_1_7 extends true ? boolean : never;
4513
+ voice: <T_1_1 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
4514
+ addToLoginIDs?: T_1_1;
4515
+ onMergeUseExisting?: T_1_1 extends true ? boolean : never;
4471
4516
  templateOptions?: {
4472
4517
  [x: string]: string;
4473
4518
  };
4474
4519
  }) => Promise<_descope_core_js_sdk.SdkResponse<{
4475
4520
  maskedPhone: string;
4476
4521
  }>>;
4477
- whatsapp: <T_1_8 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
4478
- addToLoginIDs?: T_1_8;
4479
- onMergeUseExisting?: T_1_8 extends true ? boolean : never;
4522
+ whatsapp: <T_1_2 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
4523
+ addToLoginIDs?: T_1_2;
4524
+ onMergeUseExisting?: T_1_2 extends true ? boolean : never;
4480
4525
  templateOptions?: {
4481
4526
  [x: string]: string;
4482
4527
  };
@@ -4607,9 +4652,9 @@ declare const getSdk: () => ((({
4607
4652
  }>>;
4608
4653
  };
4609
4654
  update: {
4610
- email: <T_2_2 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
4611
- addToLoginIDs?: T_2_2;
4612
- onMergeUseExisting?: T_2_2 extends true ? boolean : never;
4655
+ email: <T_2 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
4656
+ addToLoginIDs?: T_2;
4657
+ onMergeUseExisting?: T_2 extends true ? boolean : never;
4613
4658
  templateOptions?: {
4614
4659
  [x: string]: string;
4615
4660
  };
@@ -4617,27 +4662,27 @@ declare const getSdk: () => ((({
4617
4662
  maskedEmail: string;
4618
4663
  }>>;
4619
4664
  phone: {
4620
- sms: <T_3_6 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
4621
- addToLoginIDs?: T_3_6;
4622
- onMergeUseExisting?: T_3_6 extends true ? boolean : never;
4665
+ sms: <T_3 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
4666
+ addToLoginIDs?: T_3;
4667
+ onMergeUseExisting?: T_3 extends true ? boolean : never;
4623
4668
  templateOptions?: {
4624
4669
  [x: string]: string;
4625
4670
  };
4626
4671
  }) => Promise<_descope_core_js_sdk.SdkResponse<{
4627
4672
  maskedPhone: string;
4628
4673
  }>>;
4629
- voice: <T_3_7 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
4630
- addToLoginIDs?: T_3_7;
4631
- onMergeUseExisting?: T_3_7 extends true ? boolean : never;
4674
+ voice: <T_3_1 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
4675
+ addToLoginIDs?: T_3_1;
4676
+ onMergeUseExisting?: T_3_1 extends true ? boolean : never;
4632
4677
  templateOptions?: {
4633
4678
  [x: string]: string;
4634
4679
  };
4635
4680
  }) => Promise<_descope_core_js_sdk.SdkResponse<{
4636
4681
  maskedPhone: string;
4637
4682
  }>>;
4638
- whatsapp: <T_3_8 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
4639
- addToLoginIDs?: T_3_8;
4640
- onMergeUseExisting?: T_3_8 extends true ? boolean : never;
4683
+ whatsapp: <T_3_2 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
4684
+ addToLoginIDs?: T_3_2;
4685
+ onMergeUseExisting?: T_3_2 extends true ? boolean : never;
4641
4686
  templateOptions?: {
4642
4687
  [x: string]: string;
4643
4688
  };
@@ -4676,9 +4721,9 @@ declare const getSdk: () => ((({
4676
4721
  timeoutMs: number;
4677
4722
  }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
4678
4723
  update: {
4679
- email: <T_4_2 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
4680
- addToLoginIDs?: T_4_2;
4681
- onMergeUseExisting?: T_4_2 extends true ? boolean : never;
4724
+ email: <T_4 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
4725
+ addToLoginIDs?: T_4;
4726
+ onMergeUseExisting?: T_4 extends true ? boolean : never;
4682
4727
  templateOptions?: {
4683
4728
  [x: string]: string;
4684
4729
  };
@@ -4799,7 +4844,6 @@ declare const getSdk: () => ((({
4799
4844
  }>>;
4800
4845
  };
4801
4846
  selectTenant: (tenantId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
4802
- logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
4803
4847
  logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
4804
4848
  me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
4805
4849
  myTenants: (tenants: true | string[], token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
@@ -4862,6 +4906,7 @@ declare const getSdk: () => ((({
4862
4906
  };
4863
4907
  } | {
4864
4908
  refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
4909
+ logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
4865
4910
  flow: {
4866
4911
  start: (flowId: string, options?: Pick<{
4867
4912
  redirectUrl?: string;
@@ -4979,6 +5024,13 @@ declare const getSdk: () => ((({
4979
5024
  isSupported(): boolean;
4980
5025
  isLoggedIn(context?: "signin" | "signup" | "use" | "continue"): Promise<boolean>;
4981
5026
  };
5027
+ oidc: {
5028
+ loginWithRedirect: (arg?: _2.CreateSigninRequestArgs, disableNavigation?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
5029
+ finishLogin: (url?: string) => Promise<any>;
5030
+ finishLoginIfNeed: (url?: string) => Promise<any>;
5031
+ refreshToken: (refreshToken: string) => Promise<_2.SigninResponse>;
5032
+ logout: (arg?: _2.CreateSignoutRequestArgs, disableNavigation?: boolean) => Promise<any>;
5033
+ };
4982
5034
  accessKey: {
4983
5035
  exchange: (accessKey: string, loginOptions?: _descope_core_js_sdk.AccessKeyLoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
4984
5036
  };
@@ -5084,9 +5136,9 @@ declare const getSdk: () => ((({
5084
5136
  }>>;
5085
5137
  };
5086
5138
  update: {
5087
- email: <T_7 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
5088
- addToLoginIDs?: T_7;
5089
- onMergeUseExisting?: T_7 extends true ? boolean : never;
5139
+ email: <T_5 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
5140
+ addToLoginIDs?: T_5;
5141
+ onMergeUseExisting?: T_5 extends true ? boolean : never;
5090
5142
  templateOptions?: {
5091
5143
  [x: string]: string;
5092
5144
  };
@@ -5094,27 +5146,27 @@ declare const getSdk: () => ((({
5094
5146
  maskedEmail: string;
5095
5147
  }>>;
5096
5148
  phone: {
5097
- sms: <T_1_9 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
5098
- addToLoginIDs?: T_1_9;
5099
- onMergeUseExisting?: T_1_9 extends true ? boolean : never;
5149
+ sms: <T_1_3 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
5150
+ addToLoginIDs?: T_1_3;
5151
+ onMergeUseExisting?: T_1_3 extends true ? boolean : never;
5100
5152
  templateOptions?: {
5101
5153
  [x: string]: string;
5102
5154
  };
5103
5155
  }) => Promise<_descope_core_js_sdk.SdkResponse<{
5104
5156
  maskedPhone: string;
5105
5157
  }>>;
5106
- voice: <T_1_10 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
5107
- addToLoginIDs?: T_1_10;
5108
- onMergeUseExisting?: T_1_10 extends true ? boolean : never;
5158
+ voice: <T_1_4 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
5159
+ addToLoginIDs?: T_1_4;
5160
+ onMergeUseExisting?: T_1_4 extends true ? boolean : never;
5109
5161
  templateOptions?: {
5110
5162
  [x: string]: string;
5111
5163
  };
5112
5164
  }) => Promise<_descope_core_js_sdk.SdkResponse<{
5113
5165
  maskedPhone: string;
5114
5166
  }>>;
5115
- whatsapp: <T_1_11 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
5116
- addToLoginIDs?: T_1_11;
5117
- onMergeUseExisting?: T_1_11 extends true ? boolean : never;
5167
+ whatsapp: <T_1_5 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
5168
+ addToLoginIDs?: T_1_5;
5169
+ onMergeUseExisting?: T_1_5 extends true ? boolean : never;
5118
5170
  templateOptions?: {
5119
5171
  [x: string]: string;
5120
5172
  };
@@ -5245,9 +5297,9 @@ declare const getSdk: () => ((({
5245
5297
  }>>;
5246
5298
  };
5247
5299
  update: {
5248
- email: <T_2_3 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
5249
- addToLoginIDs?: T_2_3;
5250
- onMergeUseExisting?: T_2_3 extends true ? boolean : never;
5300
+ email: <T_2_1 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
5301
+ addToLoginIDs?: T_2_1;
5302
+ onMergeUseExisting?: T_2_1 extends true ? boolean : never;
5251
5303
  templateOptions?: {
5252
5304
  [x: string]: string;
5253
5305
  };
@@ -5255,27 +5307,27 @@ declare const getSdk: () => ((({
5255
5307
  maskedEmail: string;
5256
5308
  }>>;
5257
5309
  phone: {
5258
- sms: <T_3_9 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
5259
- addToLoginIDs?: T_3_9;
5260
- onMergeUseExisting?: T_3_9 extends true ? boolean : never;
5310
+ sms: <T_3_3 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
5311
+ addToLoginIDs?: T_3_3;
5312
+ onMergeUseExisting?: T_3_3 extends true ? boolean : never;
5261
5313
  templateOptions?: {
5262
5314
  [x: string]: string;
5263
5315
  };
5264
5316
  }) => Promise<_descope_core_js_sdk.SdkResponse<{
5265
5317
  maskedPhone: string;
5266
5318
  }>>;
5267
- voice: <T_3_10 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
5268
- addToLoginIDs?: T_3_10;
5269
- onMergeUseExisting?: T_3_10 extends true ? boolean : never;
5319
+ voice: <T_3_4 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
5320
+ addToLoginIDs?: T_3_4;
5321
+ onMergeUseExisting?: T_3_4 extends true ? boolean : never;
5270
5322
  templateOptions?: {
5271
5323
  [x: string]: string;
5272
5324
  };
5273
5325
  }) => Promise<_descope_core_js_sdk.SdkResponse<{
5274
5326
  maskedPhone: string;
5275
5327
  }>>;
5276
- whatsapp: <T_3_11 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
5277
- addToLoginIDs?: T_3_11;
5278
- onMergeUseExisting?: T_3_11 extends true ? boolean : never;
5328
+ whatsapp: <T_3_5 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
5329
+ addToLoginIDs?: T_3_5;
5330
+ onMergeUseExisting?: T_3_5 extends true ? boolean : never;
5279
5331
  templateOptions?: {
5280
5332
  [x: string]: string;
5281
5333
  };
@@ -5314,9 +5366,2596 @@ declare const getSdk: () => ((({
5314
5366
  timeoutMs: number;
5315
5367
  }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
5316
5368
  update: {
5317
- email: <T_4_3 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
5318
- addToLoginIDs?: T_4_3;
5319
- onMergeUseExisting?: T_4_3 extends true ? boolean : never;
5369
+ email: <T_4_1 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
5370
+ addToLoginIDs?: T_4_1;
5371
+ onMergeUseExisting?: T_4_1 extends true ? boolean : never;
5372
+ templateOptions?: {
5373
+ [x: string]: string;
5374
+ };
5375
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
5376
+ };
5377
+ };
5378
+ oauth: {
5379
+ start: ((provider: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>) & {
5380
+ google: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
5381
+ facebook: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
5382
+ github: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
5383
+ microsoft: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
5384
+ gitlab: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
5385
+ apple: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
5386
+ discord: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
5387
+ linkedin: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
5388
+ slack: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
5389
+ };
5390
+ exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
5391
+ startNative: (provider: string, loginOptions?: _descope_core_js_sdk.LoginOptions, implicit?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
5392
+ finishNative: (provider: string, stateId: string, user?: string, code?: string, idToken?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
5393
+ getOneTapClientId: (provider: string) => Promise<_descope_core_js_sdk.SdkResponse<{
5394
+ clientId: string;
5395
+ }>>;
5396
+ verifyOneTapIDToken: (provider: string, idToken: string, nonce: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
5397
+ code: string;
5398
+ }>>;
5399
+ exchangeOneTapIDToken: (provider: string, idToken: string, nonce: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
5400
+ };
5401
+ saml: {
5402
+ start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string, ssoId?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
5403
+ exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
5404
+ };
5405
+ totp: {
5406
+ signUp: (loginId: string, user?: {
5407
+ email?: string;
5408
+ name?: string;
5409
+ givenName?: string;
5410
+ middleName?: string;
5411
+ familyName?: string;
5412
+ phone?: string;
5413
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.TOTPResponse>>;
5414
+ verify: (loginId: string, code: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
5415
+ update: (loginId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.TOTPResponse>>;
5416
+ };
5417
+ notp: {
5418
+ signUpOrIn: (loginId?: string, signUpOptions?: {
5419
+ customClaims?: Record<string, any>;
5420
+ templateId?: string;
5421
+ templateOptions?: {
5422
+ [x: string]: string;
5423
+ };
5424
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
5425
+ pendingRef: string;
5426
+ redirectUrl: string;
5427
+ image: string;
5428
+ }>>;
5429
+ signUp: (loginId?: string, user?: {
5430
+ email?: string;
5431
+ name?: string;
5432
+ givenName?: string;
5433
+ middleName?: string;
5434
+ familyName?: string;
5435
+ phone?: string;
5436
+ }, signUpOptions?: {
5437
+ customClaims?: Record<string, any>;
5438
+ templateId?: string;
5439
+ templateOptions?: {
5440
+ [x: string]: string;
5441
+ };
5442
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
5443
+ pendingRef: string;
5444
+ redirectUrl: string;
5445
+ image: string;
5446
+ }>>;
5447
+ signIn: (loginId?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
5448
+ pendingRef: string;
5449
+ redirectUrl: string;
5450
+ image: string;
5451
+ }>>;
5452
+ waitForSession: (pendingRef: string, config?: {
5453
+ pollingIntervalMs: number;
5454
+ timeoutMs: number;
5455
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
5456
+ };
5457
+ password: {
5458
+ signUp: (loginId: string, password: string, user?: {
5459
+ email?: string;
5460
+ name?: string;
5461
+ givenName?: string;
5462
+ middleName?: string;
5463
+ familyName?: string;
5464
+ phone?: string;
5465
+ }, signUpOptions?: {
5466
+ customClaims?: Record<string, any>;
5467
+ templateId?: string;
5468
+ templateOptions?: {
5469
+ [x: string]: string;
5470
+ };
5471
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
5472
+ signIn: (loginId: string, password: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
5473
+ sendReset: (loginId: string, redirectUrl?: string, templateOptions?: {
5474
+ [x: string]: string;
5475
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
5476
+ resetMethod: string;
5477
+ pendingRef?: string;
5478
+ linkId?: string;
5479
+ maskedEmail: string;
5480
+ }>>;
5481
+ update: (loginId: string, newPassword: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
5482
+ replace: (loginId: string, oldPassword: string, newPassword: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
5483
+ policy: () => Promise<_descope_core_js_sdk.SdkResponse<{
5484
+ minLength: number;
5485
+ lowercase: boolean;
5486
+ uppercase: boolean;
5487
+ number: boolean;
5488
+ nonAlphanumeric: boolean;
5489
+ }>>;
5490
+ };
5491
+ selectTenant: (tenantId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
5492
+ logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
5493
+ me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
5494
+ myTenants: (tenants: true | string[], token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
5495
+ tenants: {
5496
+ id: string;
5497
+ name: string;
5498
+ customAttributes?: Record<string, any>;
5499
+ }[];
5500
+ }>>;
5501
+ history: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserHistoryResponse>>;
5502
+ isJwtExpired: (token: string) => boolean;
5503
+ getTenants: (token: string) => string[];
5504
+ getJwtPermissions: (token: string, tenant?: string) => string[];
5505
+ getJwtRoles: (token: string, tenant?: string) => string[];
5506
+ getCurrentTenant: (token: string) => string;
5507
+ httpClient: {
5508
+ get: (path: string, config?: {
5509
+ headers?: HeadersInit;
5510
+ queryParams?: {
5511
+ [key: string]: string;
5512
+ };
5513
+ token?: string;
5514
+ }) => Promise<Response>;
5515
+ post: (path: string, body?: any, config?: {
5516
+ headers?: HeadersInit;
5517
+ queryParams?: {
5518
+ [key: string]: string;
5519
+ };
5520
+ token?: string;
5521
+ }) => Promise<Response>;
5522
+ patch: (path: string, body?: any, config?: {
5523
+ headers?: HeadersInit;
5524
+ queryParams?: {
5525
+ [key: string]: string;
5526
+ };
5527
+ token?: string;
5528
+ }) => Promise<Response>;
5529
+ put: (path: string, body?: any, config?: {
5530
+ headers?: HeadersInit;
5531
+ queryParams?: {
5532
+ [key: string]: string;
5533
+ };
5534
+ token?: string;
5535
+ }) => Promise<Response>;
5536
+ delete: (path: string, config?: {
5537
+ headers?: HeadersInit;
5538
+ queryParams?: {
5539
+ [key: string]: string;
5540
+ };
5541
+ token?: string;
5542
+ }) => Promise<Response>;
5543
+ hooks?: {
5544
+ beforeRequest?: (config: _descope_core_js_sdk.RequestConfig) => _descope_core_js_sdk.RequestConfig;
5545
+ afterRequest?: (req: _descope_core_js_sdk.RequestConfig, res: Response) => void | Promise<void>;
5546
+ transformResponse?: (mutableResponse: _descope_core_js_sdk.ExtendedResponse) => Promise<_descope_core_js_sdk.ExtendedResponse>;
5547
+ };
5548
+ buildUrl: (path: string, queryParams?: {
5549
+ [key: string]: string;
5550
+ }) => string;
5551
+ };
5552
+ } | {
5553
+ refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
5554
+ logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
5555
+ flow: {
5556
+ start: (flowId: string, options?: Pick<{
5557
+ redirectUrl?: string;
5558
+ location?: string;
5559
+ tenant?: string;
5560
+ deviceInfo?: {
5561
+ webAuthnSupport?: boolean;
5562
+ };
5563
+ lastAuth?: {
5564
+ authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
5565
+ oauthProvider?: string;
5566
+ name?: string;
5567
+ loginId?: string;
5568
+ };
5569
+ redirectAuth?: {
5570
+ callbackUrl: string;
5571
+ codeChallenge: string;
5572
+ };
5573
+ oidcIdpStateId?: string;
5574
+ preview?: boolean;
5575
+ samlIdpStateId?: string;
5576
+ samlIdpUsername?: string;
5577
+ ssoAppId?: string;
5578
+ thirdPartyAppId?: string;
5579
+ oidcLoginHint?: string;
5580
+ abTestingKey?: number;
5581
+ startOptionsVersion?: number;
5582
+ client?: Record<string, any>;
5583
+ locale?: string;
5584
+ oidcPrompt?: string;
5585
+ oidcErrorRedirectUri?: string;
5586
+ nativeOptions?: {
5587
+ platform: "ios" | "android";
5588
+ oauthProvider?: string;
5589
+ oauthRedirect?: string;
5590
+ };
5591
+ thirdPartyAppStateId?: string;
5592
+ applicationScopes?: string;
5593
+ }, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes"> & {
5594
+ lastAuth?: Omit<{
5595
+ authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
5596
+ oauthProvider?: string;
5597
+ name?: string;
5598
+ loginId?: string;
5599
+ }, "loginId" | "name">;
5600
+ }, conditionInteractionId?: string, interactionId?: string, componentsVersion?: string, flowVersions?: Record<string, number>, input?: {
5601
+ [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[])[])[])[])[])[])[])[])[])[])[];
5602
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
5603
+ next: (executionId: string, stepId: string, interactionId: string, version?: number, componentsVersion?: string, input?: {
5604
+ [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[])[])[])[])[])[])[])[])[])[])[];
5605
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
5606
+ };
5607
+ webauthn: {
5608
+ signUp: ((identifier: string, name: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
5609
+ start: (loginId: string, origin: string, name: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
5610
+ transactionId: string;
5611
+ options: string;
5612
+ create: boolean;
5613
+ }>>;
5614
+ finish: (transactionId: string, response: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
5615
+ };
5616
+ signIn: ((identifier: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
5617
+ 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<{
5618
+ transactionId: string;
5619
+ options: string;
5620
+ create: boolean;
5621
+ }>>;
5622
+ finish: (transactionId: string, response: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
5623
+ };
5624
+ signUpOrIn: ((identifier: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
5625
+ start: (loginId: string, origin: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
5626
+ transactionId: string;
5627
+ options: string;
5628
+ create: boolean;
5629
+ }>>;
5630
+ };
5631
+ update: ((identifier: string, token?: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>) & {
5632
+ start: (loginId: string, origin: string, token?: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
5633
+ transactionId: string;
5634
+ options: string;
5635
+ create: boolean;
5636
+ }>>;
5637
+ finish: (transactionId: string, response: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
5638
+ };
5639
+ helpers: {
5640
+ create: (options: string) => Promise<string>;
5641
+ get: (options: string) => Promise<string>;
5642
+ isSupported: (requirePlatformAuthenticator?: boolean) => Promise<boolean>;
5643
+ conditional: (options: string, abort: AbortController) => Promise<string>;
5644
+ };
5645
+ };
5646
+ fedcm: {
5647
+ onetap: {
5648
+ requestExchangeCode(options: {
5649
+ provider?: string;
5650
+ oneTapConfig?: _descope_web_js_sdk.OneTapConfig;
5651
+ loginOptions?: _descope_core_js_sdk.LoginOptions;
5652
+ onSkipped?: (reason?: string) => void;
5653
+ onDismissed?: (reason?: string) => void;
5654
+ onFailed?: (error: Error) => void;
5655
+ onCodeReceived: (code: string) => void;
5656
+ }): void;
5657
+ requestAuthentication(options?: {
5658
+ provider?: string;
5659
+ oneTapConfig?: _descope_web_js_sdk.OneTapConfig;
5660
+ loginOptions?: _descope_core_js_sdk.LoginOptions;
5661
+ onSkipped?: (reason?: string) => void;
5662
+ onDismissed?: (reason?: string) => void;
5663
+ onFailed?: (error: Error) => void;
5664
+ onAuthenticated?: (response: _descope_core_js_sdk.JWTResponse) => void;
5665
+ }): void;
5666
+ };
5667
+ oneTap(provider?: string, oneTapConfig?: _descope_web_js_sdk.OneTapConfig, loginOptions?: _descope_core_js_sdk.LoginOptions, onSkipped?: (reason?: string) => void, onDismissed?: (reason?: string) => void): void;
5668
+ launch(context?: "signin" | "signup" | "use" | "continue"): Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
5669
+ isSupported(): boolean;
5670
+ isLoggedIn(context?: "signin" | "signup" | "use" | "continue"): Promise<boolean>;
5671
+ };
5672
+ oidc: {
5673
+ loginWithRedirect: (arg?: _2.CreateSigninRequestArgs, disableNavigation?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
5674
+ finishLogin: (url?: string) => Promise<any>;
5675
+ finishLoginIfNeed: (url?: string) => Promise<any>;
5676
+ refreshToken: (refreshToken: string) => Promise<_2.SigninResponse>;
5677
+ logout: (arg?: _2.CreateSignoutRequestArgs, disableNavigation?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
5678
+ };
5679
+ accessKey: {
5680
+ exchange: (accessKey: string, loginOptions?: _descope_core_js_sdk.AccessKeyLoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
5681
+ };
5682
+ otp: {
5683
+ verify: {
5684
+ sms: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
5685
+ voice: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
5686
+ whatsapp: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
5687
+ email: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
5688
+ };
5689
+ signIn: {
5690
+ sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
5691
+ maskedPhone: string;
5692
+ }>>;
5693
+ voice: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
5694
+ maskedPhone: string;
5695
+ }>>;
5696
+ whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
5697
+ maskedPhone: string;
5698
+ }>>;
5699
+ email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
5700
+ maskedEmail: string;
5701
+ }>>;
5702
+ };
5703
+ signUp: {
5704
+ sms: (loginId: string, user?: {
5705
+ email?: string;
5706
+ name?: string;
5707
+ givenName?: string;
5708
+ middleName?: string;
5709
+ familyName?: string;
5710
+ phone?: string;
5711
+ }, signUpOptions?: {
5712
+ customClaims?: Record<string, any>;
5713
+ templateId?: string;
5714
+ templateOptions?: {
5715
+ [x: string]: string;
5716
+ };
5717
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
5718
+ maskedPhone: string;
5719
+ }>>;
5720
+ voice: (loginId: string, user?: {
5721
+ email?: string;
5722
+ name?: string;
5723
+ givenName?: string;
5724
+ middleName?: string;
5725
+ familyName?: string;
5726
+ phone?: string;
5727
+ }, signUpOptions?: {
5728
+ customClaims?: Record<string, any>;
5729
+ templateId?: string;
5730
+ templateOptions?: {
5731
+ [x: string]: string;
5732
+ };
5733
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
5734
+ maskedPhone: string;
5735
+ }>>;
5736
+ whatsapp: (loginId: string, user?: {
5737
+ email?: string;
5738
+ name?: string;
5739
+ givenName?: string;
5740
+ middleName?: string;
5741
+ familyName?: string;
5742
+ phone?: string;
5743
+ }, signUpOptions?: {
5744
+ customClaims?: Record<string, any>;
5745
+ templateId?: string;
5746
+ templateOptions?: {
5747
+ [x: string]: string;
5748
+ };
5749
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
5750
+ maskedPhone: string;
5751
+ }>>;
5752
+ email: (loginId: string, user?: {
5753
+ email?: string;
5754
+ name?: string;
5755
+ givenName?: string;
5756
+ middleName?: string;
5757
+ familyName?: string;
5758
+ phone?: string;
5759
+ }, signUpOptions?: {
5760
+ customClaims?: Record<string, any>;
5761
+ templateId?: string;
5762
+ templateOptions?: {
5763
+ [x: string]: string;
5764
+ };
5765
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
5766
+ maskedEmail: string;
5767
+ }>>;
5768
+ };
5769
+ signUpOrIn: {
5770
+ sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
5771
+ maskedPhone: string;
5772
+ }>>;
5773
+ voice: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
5774
+ maskedPhone: string;
5775
+ }>>;
5776
+ whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
5777
+ maskedPhone: string;
5778
+ }>>;
5779
+ email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
5780
+ maskedEmail: string;
5781
+ }>>;
5782
+ };
5783
+ update: {
5784
+ email: <T_6 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
5785
+ addToLoginIDs?: T_6;
5786
+ onMergeUseExisting?: T_6 extends true ? boolean : never;
5787
+ templateOptions?: {
5788
+ [x: string]: string;
5789
+ };
5790
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
5791
+ maskedEmail: string;
5792
+ }>>;
5793
+ phone: {
5794
+ sms: <T_1_6 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
5795
+ addToLoginIDs?: T_1_6;
5796
+ onMergeUseExisting?: T_1_6 extends true ? boolean : never;
5797
+ templateOptions?: {
5798
+ [x: string]: string;
5799
+ };
5800
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
5801
+ maskedPhone: string;
5802
+ }>>;
5803
+ voice: <T_1_7 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
5804
+ addToLoginIDs?: T_1_7;
5805
+ onMergeUseExisting?: T_1_7 extends true ? boolean : never;
5806
+ templateOptions?: {
5807
+ [x: string]: string;
5808
+ };
5809
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
5810
+ maskedPhone: string;
5811
+ }>>;
5812
+ whatsapp: <T_1_8 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
5813
+ addToLoginIDs?: T_1_8;
5814
+ onMergeUseExisting?: T_1_8 extends true ? boolean : never;
5815
+ templateOptions?: {
5816
+ [x: string]: string;
5817
+ };
5818
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
5819
+ maskedPhone: string;
5820
+ }>>;
5821
+ };
5822
+ };
5823
+ };
5824
+ magicLink: {
5825
+ verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
5826
+ signIn: {
5827
+ sms: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
5828
+ maskedPhone: string;
5829
+ }>>;
5830
+ voice: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
5831
+ maskedPhone: string;
5832
+ }>>;
5833
+ whatsapp: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
5834
+ maskedPhone: string;
5835
+ }>>;
5836
+ email: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
5837
+ maskedEmail: string;
5838
+ }>>;
5839
+ };
5840
+ signUp: {
5841
+ sms: (loginId: string, URI: string, user?: {
5842
+ email?: string;
5843
+ name?: string;
5844
+ givenName?: string;
5845
+ middleName?: string;
5846
+ familyName?: string;
5847
+ phone?: string;
5848
+ }, signUpOptions?: {
5849
+ customClaims?: Record<string, any>;
5850
+ templateId?: string;
5851
+ templateOptions?: {
5852
+ [x: string]: string;
5853
+ };
5854
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
5855
+ maskedPhone: string;
5856
+ }>>;
5857
+ voice: (loginId: string, URI: string, user?: {
5858
+ email?: string;
5859
+ name?: string;
5860
+ givenName?: string;
5861
+ middleName?: string;
5862
+ familyName?: string;
5863
+ phone?: string;
5864
+ }, signUpOptions?: {
5865
+ customClaims?: Record<string, any>;
5866
+ templateId?: string;
5867
+ templateOptions?: {
5868
+ [x: string]: string;
5869
+ };
5870
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
5871
+ maskedPhone: string;
5872
+ }>>;
5873
+ whatsapp: (loginId: string, URI: string, user?: {
5874
+ email?: string;
5875
+ name?: string;
5876
+ givenName?: string;
5877
+ middleName?: string;
5878
+ familyName?: string;
5879
+ phone?: string;
5880
+ }, signUpOptions?: {
5881
+ customClaims?: Record<string, any>;
5882
+ templateId?: string;
5883
+ templateOptions?: {
5884
+ [x: string]: string;
5885
+ };
5886
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
5887
+ maskedPhone: string;
5888
+ }>>;
5889
+ email: (loginId: string, URI: string, user?: {
5890
+ email?: string;
5891
+ name?: string;
5892
+ givenName?: string;
5893
+ middleName?: string;
5894
+ familyName?: string;
5895
+ phone?: string;
5896
+ }, signUpOptions?: {
5897
+ customClaims?: Record<string, any>;
5898
+ templateId?: string;
5899
+ templateOptions?: {
5900
+ [x: string]: string;
5901
+ };
5902
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
5903
+ maskedEmail: string;
5904
+ }>>;
5905
+ };
5906
+ signUpOrIn: {
5907
+ sms: (loginId: string, URI?: string, signUpOptions?: {
5908
+ customClaims?: Record<string, any>;
5909
+ templateId?: string;
5910
+ templateOptions?: {
5911
+ [x: string]: string;
5912
+ };
5913
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
5914
+ maskedPhone: string;
5915
+ }>>;
5916
+ voice: (loginId: string, URI?: string, signUpOptions?: {
5917
+ customClaims?: Record<string, any>;
5918
+ templateId?: string;
5919
+ templateOptions?: {
5920
+ [x: string]: string;
5921
+ };
5922
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
5923
+ maskedPhone: string;
5924
+ }>>;
5925
+ whatsapp: (loginId: string, URI?: string, signUpOptions?: {
5926
+ customClaims?: Record<string, any>;
5927
+ templateId?: string;
5928
+ templateOptions?: {
5929
+ [x: string]: string;
5930
+ };
5931
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
5932
+ maskedPhone: string;
5933
+ }>>;
5934
+ email: (loginId: string, URI?: string, signUpOptions?: {
5935
+ customClaims?: Record<string, any>;
5936
+ templateId?: string;
5937
+ templateOptions?: {
5938
+ [x: string]: string;
5939
+ };
5940
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
5941
+ maskedEmail: string;
5942
+ }>>;
5943
+ };
5944
+ update: {
5945
+ email: <T_2_2 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
5946
+ addToLoginIDs?: T_2_2;
5947
+ onMergeUseExisting?: T_2_2 extends true ? boolean : never;
5948
+ templateOptions?: {
5949
+ [x: string]: string;
5950
+ };
5951
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
5952
+ maskedEmail: string;
5953
+ }>>;
5954
+ phone: {
5955
+ sms: <T_3_6 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
5956
+ addToLoginIDs?: T_3_6;
5957
+ onMergeUseExisting?: T_3_6 extends true ? boolean : never;
5958
+ templateOptions?: {
5959
+ [x: string]: string;
5960
+ };
5961
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
5962
+ maskedPhone: string;
5963
+ }>>;
5964
+ voice: <T_3_7 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
5965
+ addToLoginIDs?: T_3_7;
5966
+ onMergeUseExisting?: T_3_7 extends true ? boolean : never;
5967
+ templateOptions?: {
5968
+ [x: string]: string;
5969
+ };
5970
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
5971
+ maskedPhone: string;
5972
+ }>>;
5973
+ whatsapp: <T_3_8 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
5974
+ addToLoginIDs?: T_3_8;
5975
+ onMergeUseExisting?: T_3_8 extends true ? boolean : never;
5976
+ templateOptions?: {
5977
+ [x: string]: string;
5978
+ };
5979
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
5980
+ maskedPhone: string;
5981
+ }>>;
5982
+ };
5983
+ };
5984
+ };
5985
+ enchantedLink: {
5986
+ verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
5987
+ signIn: (loginId: string, URI?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
5988
+ signUpOrIn: (loginId: string, URI?: string, signUpOptions?: {
5989
+ customClaims?: Record<string, any>;
5990
+ templateId?: string;
5991
+ templateOptions?: {
5992
+ [x: string]: string;
5993
+ };
5994
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
5995
+ signUp: (loginId: string, URI?: string, user?: {
5996
+ email?: string;
5997
+ name?: string;
5998
+ givenName?: string;
5999
+ middleName?: string;
6000
+ familyName?: string;
6001
+ phone?: string;
6002
+ }, signUpOptions?: {
6003
+ customClaims?: Record<string, any>;
6004
+ templateId?: string;
6005
+ templateOptions?: {
6006
+ [x: string]: string;
6007
+ };
6008
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
6009
+ waitForSession: (pendingRef: string, config?: {
6010
+ pollingIntervalMs: number;
6011
+ timeoutMs: number;
6012
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
6013
+ update: {
6014
+ email: <T_4_2 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
6015
+ addToLoginIDs?: T_4_2;
6016
+ onMergeUseExisting?: T_4_2 extends true ? boolean : never;
6017
+ templateOptions?: {
6018
+ [x: string]: string;
6019
+ };
6020
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
6021
+ };
6022
+ };
6023
+ oauth: {
6024
+ start: ((provider: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>) & {
6025
+ google: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
6026
+ facebook: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
6027
+ github: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
6028
+ microsoft: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
6029
+ gitlab: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
6030
+ apple: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
6031
+ discord: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
6032
+ linkedin: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
6033
+ slack: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
6034
+ };
6035
+ exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
6036
+ startNative: (provider: string, loginOptions?: _descope_core_js_sdk.LoginOptions, implicit?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
6037
+ finishNative: (provider: string, stateId: string, user?: string, code?: string, idToken?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
6038
+ getOneTapClientId: (provider: string) => Promise<_descope_core_js_sdk.SdkResponse<{
6039
+ clientId: string;
6040
+ }>>;
6041
+ verifyOneTapIDToken: (provider: string, idToken: string, nonce: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
6042
+ code: string;
6043
+ }>>;
6044
+ exchangeOneTapIDToken: (provider: string, idToken: string, nonce: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
6045
+ };
6046
+ saml: {
6047
+ start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string, ssoId?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
6048
+ exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
6049
+ };
6050
+ totp: {
6051
+ signUp: (loginId: string, user?: {
6052
+ email?: string;
6053
+ name?: string;
6054
+ givenName?: string;
6055
+ middleName?: string;
6056
+ familyName?: string;
6057
+ phone?: string;
6058
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.TOTPResponse>>;
6059
+ verify: (loginId: string, code: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
6060
+ update: (loginId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.TOTPResponse>>;
6061
+ };
6062
+ notp: {
6063
+ signUpOrIn: (loginId?: string, signUpOptions?: {
6064
+ customClaims?: Record<string, any>;
6065
+ templateId?: string;
6066
+ templateOptions?: {
6067
+ [x: string]: string;
6068
+ };
6069
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
6070
+ pendingRef: string;
6071
+ redirectUrl: string;
6072
+ image: string;
6073
+ }>>;
6074
+ signUp: (loginId?: string, user?: {
6075
+ email?: string;
6076
+ name?: string;
6077
+ givenName?: string;
6078
+ middleName?: string;
6079
+ familyName?: string;
6080
+ phone?: string;
6081
+ }, signUpOptions?: {
6082
+ customClaims?: Record<string, any>;
6083
+ templateId?: string;
6084
+ templateOptions?: {
6085
+ [x: string]: string;
6086
+ };
6087
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
6088
+ pendingRef: string;
6089
+ redirectUrl: string;
6090
+ image: string;
6091
+ }>>;
6092
+ signIn: (loginId?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
6093
+ pendingRef: string;
6094
+ redirectUrl: string;
6095
+ image: string;
6096
+ }>>;
6097
+ waitForSession: (pendingRef: string, config?: {
6098
+ pollingIntervalMs: number;
6099
+ timeoutMs: number;
6100
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
6101
+ };
6102
+ password: {
6103
+ signUp: (loginId: string, password: string, user?: {
6104
+ email?: string;
6105
+ name?: string;
6106
+ givenName?: string;
6107
+ middleName?: string;
6108
+ familyName?: string;
6109
+ phone?: string;
6110
+ }, signUpOptions?: {
6111
+ customClaims?: Record<string, any>;
6112
+ templateId?: string;
6113
+ templateOptions?: {
6114
+ [x: string]: string;
6115
+ };
6116
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
6117
+ signIn: (loginId: string, password: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
6118
+ sendReset: (loginId: string, redirectUrl?: string, templateOptions?: {
6119
+ [x: string]: string;
6120
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
6121
+ resetMethod: string;
6122
+ pendingRef?: string;
6123
+ linkId?: string;
6124
+ maskedEmail: string;
6125
+ }>>;
6126
+ update: (loginId: string, newPassword: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
6127
+ replace: (loginId: string, oldPassword: string, newPassword: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
6128
+ policy: () => Promise<_descope_core_js_sdk.SdkResponse<{
6129
+ minLength: number;
6130
+ lowercase: boolean;
6131
+ uppercase: boolean;
6132
+ number: boolean;
6133
+ nonAlphanumeric: boolean;
6134
+ }>>;
6135
+ };
6136
+ selectTenant: (tenantId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
6137
+ logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
6138
+ me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
6139
+ myTenants: (tenants: true | string[], token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
6140
+ tenants: {
6141
+ id: string;
6142
+ name: string;
6143
+ customAttributes?: Record<string, any>;
6144
+ }[];
6145
+ }>>;
6146
+ history: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserHistoryResponse>>;
6147
+ isJwtExpired: (token: string) => boolean;
6148
+ getTenants: (token: string) => string[];
6149
+ getJwtPermissions: (token: string, tenant?: string) => string[];
6150
+ getJwtRoles: (token: string, tenant?: string) => string[];
6151
+ getCurrentTenant: (token: string) => string;
6152
+ httpClient: {
6153
+ get: (path: string, config?: {
6154
+ headers?: HeadersInit;
6155
+ queryParams?: {
6156
+ [key: string]: string;
6157
+ };
6158
+ token?: string;
6159
+ }) => Promise<Response>;
6160
+ post: (path: string, body?: any, config?: {
6161
+ headers?: HeadersInit;
6162
+ queryParams?: {
6163
+ [key: string]: string;
6164
+ };
6165
+ token?: string;
6166
+ }) => Promise<Response>;
6167
+ patch: (path: string, body?: any, config?: {
6168
+ headers?: HeadersInit;
6169
+ queryParams?: {
6170
+ [key: string]: string;
6171
+ };
6172
+ token?: string;
6173
+ }) => Promise<Response>;
6174
+ put: (path: string, body?: any, config?: {
6175
+ headers?: HeadersInit;
6176
+ queryParams?: {
6177
+ [key: string]: string;
6178
+ };
6179
+ token?: string;
6180
+ }) => Promise<Response>;
6181
+ delete: (path: string, config?: {
6182
+ headers?: HeadersInit;
6183
+ queryParams?: {
6184
+ [key: string]: string;
6185
+ };
6186
+ token?: string;
6187
+ }) => Promise<Response>;
6188
+ hooks?: {
6189
+ beforeRequest?: (config: _descope_core_js_sdk.RequestConfig) => _descope_core_js_sdk.RequestConfig;
6190
+ afterRequest?: (req: _descope_core_js_sdk.RequestConfig, res: Response) => void | Promise<void>;
6191
+ transformResponse?: (mutableResponse: _descope_core_js_sdk.ExtendedResponse) => Promise<_descope_core_js_sdk.ExtendedResponse>;
6192
+ };
6193
+ buildUrl: (path: string, queryParams?: {
6194
+ [key: string]: string;
6195
+ }) => string;
6196
+ };
6197
+ }) & {
6198
+ onSessionTokenChange: (cb: (data: string) => void) => () => any[];
6199
+ onUserChange: (cb: (data: _descope_core_js_sdk.UserResponse) => void) => () => any[];
6200
+ onIsAuthenticatedChange: (cb: (isAuthenticated: boolean) => void) => () => any[];
6201
+ }) & {
6202
+ getLastUserLoginId: () => string;
6203
+ getLastUserDisplayName: () => string;
6204
+ }) | (((({
6205
+ refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
6206
+ logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
6207
+ flow: {
6208
+ start: (flowId: string, options?: Pick<{
6209
+ redirectUrl?: string;
6210
+ location?: string;
6211
+ tenant?: string;
6212
+ deviceInfo?: {
6213
+ webAuthnSupport?: boolean;
6214
+ };
6215
+ lastAuth?: {
6216
+ authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
6217
+ oauthProvider?: string;
6218
+ name?: string;
6219
+ loginId?: string;
6220
+ };
6221
+ redirectAuth?: {
6222
+ callbackUrl: string;
6223
+ codeChallenge: string;
6224
+ };
6225
+ oidcIdpStateId?: string;
6226
+ preview?: boolean;
6227
+ samlIdpStateId?: string;
6228
+ samlIdpUsername?: string;
6229
+ ssoAppId?: string;
6230
+ thirdPartyAppId?: string;
6231
+ oidcLoginHint?: string;
6232
+ abTestingKey?: number;
6233
+ startOptionsVersion?: number;
6234
+ client?: Record<string, any>;
6235
+ locale?: string;
6236
+ oidcPrompt?: string;
6237
+ oidcErrorRedirectUri?: string;
6238
+ nativeOptions?: {
6239
+ platform: "ios" | "android";
6240
+ oauthProvider?: string;
6241
+ oauthRedirect?: string;
6242
+ };
6243
+ thirdPartyAppStateId?: string;
6244
+ applicationScopes?: string;
6245
+ }, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes"> & {
6246
+ lastAuth?: Omit<{
6247
+ authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
6248
+ oauthProvider?: string;
6249
+ name?: string;
6250
+ loginId?: string;
6251
+ }, "loginId" | "name">;
6252
+ }, conditionInteractionId?: string, interactionId?: string, componentsVersion?: string, flowVersions?: Record<string, number>, input?: {
6253
+ [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[])[])[])[])[])[])[])[])[])[])[];
6254
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
6255
+ next: (executionId: string, stepId: string, interactionId: string, version?: number, componentsVersion?: string, input?: {
6256
+ [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[])[])[])[])[])[])[])[])[])[])[];
6257
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
6258
+ };
6259
+ webauthn: {
6260
+ signUp: ((identifier: string, name: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
6261
+ start: (loginId: string, origin: string, name: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
6262
+ transactionId: string;
6263
+ options: string;
6264
+ create: boolean;
6265
+ }>>;
6266
+ finish: (transactionId: string, response: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
6267
+ };
6268
+ signIn: ((identifier: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
6269
+ 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<{
6270
+ transactionId: string;
6271
+ options: string;
6272
+ create: boolean;
6273
+ }>>;
6274
+ finish: (transactionId: string, response: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
6275
+ };
6276
+ signUpOrIn: ((identifier: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
6277
+ start: (loginId: string, origin: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
6278
+ transactionId: string;
6279
+ options: string;
6280
+ create: boolean;
6281
+ }>>;
6282
+ };
6283
+ update: ((identifier: string, token?: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>) & {
6284
+ start: (loginId: string, origin: string, token?: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
6285
+ transactionId: string;
6286
+ options: string;
6287
+ create: boolean;
6288
+ }>>;
6289
+ finish: (transactionId: string, response: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
6290
+ };
6291
+ helpers: {
6292
+ create: (options: string) => Promise<string>;
6293
+ get: (options: string) => Promise<string>;
6294
+ isSupported: (requirePlatformAuthenticator?: boolean) => Promise<boolean>;
6295
+ conditional: (options: string, abort: AbortController) => Promise<string>;
6296
+ };
6297
+ };
6298
+ fedcm: {
6299
+ onetap: {
6300
+ requestExchangeCode(options: {
6301
+ provider?: string;
6302
+ oneTapConfig?: _descope_web_js_sdk.OneTapConfig;
6303
+ loginOptions?: _descope_core_js_sdk.LoginOptions;
6304
+ onSkipped?: (reason?: string) => void;
6305
+ onDismissed?: (reason?: string) => void;
6306
+ onFailed?: (error: Error) => void;
6307
+ onCodeReceived: (code: string) => void;
6308
+ }): void;
6309
+ requestAuthentication(options?: {
6310
+ provider?: string;
6311
+ oneTapConfig?: _descope_web_js_sdk.OneTapConfig;
6312
+ loginOptions?: _descope_core_js_sdk.LoginOptions;
6313
+ onSkipped?: (reason?: string) => void;
6314
+ onDismissed?: (reason?: string) => void;
6315
+ onFailed?: (error: Error) => void;
6316
+ onAuthenticated?: (response: _descope_core_js_sdk.JWTResponse) => void;
6317
+ }): void;
6318
+ };
6319
+ oneTap(provider?: string, oneTapConfig?: _descope_web_js_sdk.OneTapConfig, loginOptions?: _descope_core_js_sdk.LoginOptions, onSkipped?: (reason?: string) => void, onDismissed?: (reason?: string) => void): void;
6320
+ launch(context?: "signin" | "signup" | "use" | "continue"): Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
6321
+ isSupported(): boolean;
6322
+ isLoggedIn(context?: "signin" | "signup" | "use" | "continue"): Promise<boolean>;
6323
+ };
6324
+ oidc: {
6325
+ loginWithRedirect: (arg?: _2.CreateSigninRequestArgs, disableNavigation?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
6326
+ finishLogin: (url?: string) => Promise<any>;
6327
+ finishLoginIfNeed: (url?: string) => Promise<any>;
6328
+ refreshToken: (refreshToken: string) => Promise<_2.SigninResponse>;
6329
+ logout: (arg?: _2.CreateSignoutRequestArgs, disableNavigation?: boolean) => Promise<any>;
6330
+ };
6331
+ accessKey: {
6332
+ exchange: (accessKey: string, loginOptions?: _descope_core_js_sdk.AccessKeyLoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
6333
+ };
6334
+ otp: {
6335
+ verify: {
6336
+ sms: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
6337
+ voice: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
6338
+ whatsapp: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
6339
+ email: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
6340
+ };
6341
+ signIn: {
6342
+ sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
6343
+ maskedPhone: string;
6344
+ }>>;
6345
+ voice: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
6346
+ maskedPhone: string;
6347
+ }>>;
6348
+ whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
6349
+ maskedPhone: string;
6350
+ }>>;
6351
+ email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
6352
+ maskedEmail: string;
6353
+ }>>;
6354
+ };
6355
+ signUp: {
6356
+ sms: (loginId: string, user?: {
6357
+ email?: string;
6358
+ name?: string;
6359
+ givenName?: string;
6360
+ middleName?: string;
6361
+ familyName?: string;
6362
+ phone?: string;
6363
+ }, signUpOptions?: {
6364
+ customClaims?: Record<string, any>;
6365
+ templateId?: string;
6366
+ templateOptions?: {
6367
+ [x: string]: string;
6368
+ };
6369
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
6370
+ maskedPhone: string;
6371
+ }>>;
6372
+ voice: (loginId: string, user?: {
6373
+ email?: string;
6374
+ name?: string;
6375
+ givenName?: string;
6376
+ middleName?: string;
6377
+ familyName?: string;
6378
+ phone?: string;
6379
+ }, signUpOptions?: {
6380
+ customClaims?: Record<string, any>;
6381
+ templateId?: string;
6382
+ templateOptions?: {
6383
+ [x: string]: string;
6384
+ };
6385
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
6386
+ maskedPhone: string;
6387
+ }>>;
6388
+ whatsapp: (loginId: string, user?: {
6389
+ email?: string;
6390
+ name?: string;
6391
+ givenName?: string;
6392
+ middleName?: string;
6393
+ familyName?: string;
6394
+ phone?: string;
6395
+ }, signUpOptions?: {
6396
+ customClaims?: Record<string, any>;
6397
+ templateId?: string;
6398
+ templateOptions?: {
6399
+ [x: string]: string;
6400
+ };
6401
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
6402
+ maskedPhone: string;
6403
+ }>>;
6404
+ email: (loginId: string, user?: {
6405
+ email?: string;
6406
+ name?: string;
6407
+ givenName?: string;
6408
+ middleName?: string;
6409
+ familyName?: string;
6410
+ phone?: string;
6411
+ }, signUpOptions?: {
6412
+ customClaims?: Record<string, any>;
6413
+ templateId?: string;
6414
+ templateOptions?: {
6415
+ [x: string]: string;
6416
+ };
6417
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
6418
+ maskedEmail: string;
6419
+ }>>;
6420
+ };
6421
+ signUpOrIn: {
6422
+ sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
6423
+ maskedPhone: string;
6424
+ }>>;
6425
+ voice: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
6426
+ maskedPhone: string;
6427
+ }>>;
6428
+ whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
6429
+ maskedPhone: string;
6430
+ }>>;
6431
+ email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
6432
+ maskedEmail: string;
6433
+ }>>;
6434
+ };
6435
+ update: {
6436
+ email: <T_7 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
6437
+ addToLoginIDs?: T_7;
6438
+ onMergeUseExisting?: T_7 extends true ? boolean : never;
6439
+ templateOptions?: {
6440
+ [x: string]: string;
6441
+ };
6442
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
6443
+ maskedEmail: string;
6444
+ }>>;
6445
+ phone: {
6446
+ sms: <T_1_9 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
6447
+ addToLoginIDs?: T_1_9;
6448
+ onMergeUseExisting?: T_1_9 extends true ? boolean : never;
6449
+ templateOptions?: {
6450
+ [x: string]: string;
6451
+ };
6452
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
6453
+ maskedPhone: string;
6454
+ }>>;
6455
+ voice: <T_1_10 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
6456
+ addToLoginIDs?: T_1_10;
6457
+ onMergeUseExisting?: T_1_10 extends true ? boolean : never;
6458
+ templateOptions?: {
6459
+ [x: string]: string;
6460
+ };
6461
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
6462
+ maskedPhone: string;
6463
+ }>>;
6464
+ whatsapp: <T_1_11 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
6465
+ addToLoginIDs?: T_1_11;
6466
+ onMergeUseExisting?: T_1_11 extends true ? boolean : never;
6467
+ templateOptions?: {
6468
+ [x: string]: string;
6469
+ };
6470
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
6471
+ maskedPhone: string;
6472
+ }>>;
6473
+ };
6474
+ };
6475
+ };
6476
+ magicLink: {
6477
+ verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
6478
+ signIn: {
6479
+ sms: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
6480
+ maskedPhone: string;
6481
+ }>>;
6482
+ voice: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
6483
+ maskedPhone: string;
6484
+ }>>;
6485
+ whatsapp: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
6486
+ maskedPhone: string;
6487
+ }>>;
6488
+ email: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
6489
+ maskedEmail: string;
6490
+ }>>;
6491
+ };
6492
+ signUp: {
6493
+ sms: (loginId: string, URI: string, user?: {
6494
+ email?: string;
6495
+ name?: string;
6496
+ givenName?: string;
6497
+ middleName?: string;
6498
+ familyName?: string;
6499
+ phone?: string;
6500
+ }, signUpOptions?: {
6501
+ customClaims?: Record<string, any>;
6502
+ templateId?: string;
6503
+ templateOptions?: {
6504
+ [x: string]: string;
6505
+ };
6506
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
6507
+ maskedPhone: string;
6508
+ }>>;
6509
+ voice: (loginId: string, URI: string, user?: {
6510
+ email?: string;
6511
+ name?: string;
6512
+ givenName?: string;
6513
+ middleName?: string;
6514
+ familyName?: string;
6515
+ phone?: string;
6516
+ }, signUpOptions?: {
6517
+ customClaims?: Record<string, any>;
6518
+ templateId?: string;
6519
+ templateOptions?: {
6520
+ [x: string]: string;
6521
+ };
6522
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
6523
+ maskedPhone: string;
6524
+ }>>;
6525
+ whatsapp: (loginId: string, URI: string, user?: {
6526
+ email?: string;
6527
+ name?: string;
6528
+ givenName?: string;
6529
+ middleName?: string;
6530
+ familyName?: string;
6531
+ phone?: string;
6532
+ }, signUpOptions?: {
6533
+ customClaims?: Record<string, any>;
6534
+ templateId?: string;
6535
+ templateOptions?: {
6536
+ [x: string]: string;
6537
+ };
6538
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
6539
+ maskedPhone: string;
6540
+ }>>;
6541
+ email: (loginId: string, URI: string, user?: {
6542
+ email?: string;
6543
+ name?: string;
6544
+ givenName?: string;
6545
+ middleName?: string;
6546
+ familyName?: string;
6547
+ phone?: string;
6548
+ }, signUpOptions?: {
6549
+ customClaims?: Record<string, any>;
6550
+ templateId?: string;
6551
+ templateOptions?: {
6552
+ [x: string]: string;
6553
+ };
6554
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
6555
+ maskedEmail: string;
6556
+ }>>;
6557
+ };
6558
+ signUpOrIn: {
6559
+ sms: (loginId: string, URI?: string, signUpOptions?: {
6560
+ customClaims?: Record<string, any>;
6561
+ templateId?: string;
6562
+ templateOptions?: {
6563
+ [x: string]: string;
6564
+ };
6565
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
6566
+ maskedPhone: string;
6567
+ }>>;
6568
+ voice: (loginId: string, URI?: string, signUpOptions?: {
6569
+ customClaims?: Record<string, any>;
6570
+ templateId?: string;
6571
+ templateOptions?: {
6572
+ [x: string]: string;
6573
+ };
6574
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
6575
+ maskedPhone: string;
6576
+ }>>;
6577
+ whatsapp: (loginId: string, URI?: string, signUpOptions?: {
6578
+ customClaims?: Record<string, any>;
6579
+ templateId?: string;
6580
+ templateOptions?: {
6581
+ [x: string]: string;
6582
+ };
6583
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
6584
+ maskedPhone: string;
6585
+ }>>;
6586
+ email: (loginId: string, URI?: string, signUpOptions?: {
6587
+ customClaims?: Record<string, any>;
6588
+ templateId?: string;
6589
+ templateOptions?: {
6590
+ [x: string]: string;
6591
+ };
6592
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
6593
+ maskedEmail: string;
6594
+ }>>;
6595
+ };
6596
+ update: {
6597
+ email: <T_2_3 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
6598
+ addToLoginIDs?: T_2_3;
6599
+ onMergeUseExisting?: T_2_3 extends true ? boolean : never;
6600
+ templateOptions?: {
6601
+ [x: string]: string;
6602
+ };
6603
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
6604
+ maskedEmail: string;
6605
+ }>>;
6606
+ phone: {
6607
+ sms: <T_3_9 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
6608
+ addToLoginIDs?: T_3_9;
6609
+ onMergeUseExisting?: T_3_9 extends true ? boolean : never;
6610
+ templateOptions?: {
6611
+ [x: string]: string;
6612
+ };
6613
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
6614
+ maskedPhone: string;
6615
+ }>>;
6616
+ voice: <T_3_10 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
6617
+ addToLoginIDs?: T_3_10;
6618
+ onMergeUseExisting?: T_3_10 extends true ? boolean : never;
6619
+ templateOptions?: {
6620
+ [x: string]: string;
6621
+ };
6622
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
6623
+ maskedPhone: string;
6624
+ }>>;
6625
+ whatsapp: <T_3_11 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
6626
+ addToLoginIDs?: T_3_11;
6627
+ onMergeUseExisting?: T_3_11 extends true ? boolean : never;
6628
+ templateOptions?: {
6629
+ [x: string]: string;
6630
+ };
6631
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
6632
+ maskedPhone: string;
6633
+ }>>;
6634
+ };
6635
+ };
6636
+ };
6637
+ enchantedLink: {
6638
+ verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
6639
+ signIn: (loginId: string, URI?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
6640
+ signUpOrIn: (loginId: string, URI?: string, signUpOptions?: {
6641
+ customClaims?: Record<string, any>;
6642
+ templateId?: string;
6643
+ templateOptions?: {
6644
+ [x: string]: string;
6645
+ };
6646
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
6647
+ signUp: (loginId: string, URI?: string, user?: {
6648
+ email?: string;
6649
+ name?: string;
6650
+ givenName?: string;
6651
+ middleName?: string;
6652
+ familyName?: string;
6653
+ phone?: string;
6654
+ }, signUpOptions?: {
6655
+ customClaims?: Record<string, any>;
6656
+ templateId?: string;
6657
+ templateOptions?: {
6658
+ [x: string]: string;
6659
+ };
6660
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
6661
+ waitForSession: (pendingRef: string, config?: {
6662
+ pollingIntervalMs: number;
6663
+ timeoutMs: number;
6664
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
6665
+ update: {
6666
+ email: <T_4_3 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
6667
+ addToLoginIDs?: T_4_3;
6668
+ onMergeUseExisting?: T_4_3 extends true ? boolean : never;
6669
+ templateOptions?: {
6670
+ [x: string]: string;
6671
+ };
6672
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
6673
+ };
6674
+ };
6675
+ oauth: {
6676
+ start: ((provider: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>) & {
6677
+ google: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
6678
+ facebook: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
6679
+ github: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
6680
+ microsoft: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
6681
+ gitlab: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
6682
+ apple: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
6683
+ discord: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
6684
+ linkedin: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
6685
+ slack: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
6686
+ };
6687
+ exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
6688
+ startNative: (provider: string, loginOptions?: _descope_core_js_sdk.LoginOptions, implicit?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
6689
+ finishNative: (provider: string, stateId: string, user?: string, code?: string, idToken?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
6690
+ getOneTapClientId: (provider: string) => Promise<_descope_core_js_sdk.SdkResponse<{
6691
+ clientId: string;
6692
+ }>>;
6693
+ verifyOneTapIDToken: (provider: string, idToken: string, nonce: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
6694
+ code: string;
6695
+ }>>;
6696
+ exchangeOneTapIDToken: (provider: string, idToken: string, nonce: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
6697
+ };
6698
+ saml: {
6699
+ start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string, ssoId?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
6700
+ exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
6701
+ };
6702
+ totp: {
6703
+ signUp: (loginId: string, user?: {
6704
+ email?: string;
6705
+ name?: string;
6706
+ givenName?: string;
6707
+ middleName?: string;
6708
+ familyName?: string;
6709
+ phone?: string;
6710
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.TOTPResponse>>;
6711
+ verify: (loginId: string, code: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
6712
+ update: (loginId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.TOTPResponse>>;
6713
+ };
6714
+ notp: {
6715
+ signUpOrIn: (loginId?: string, signUpOptions?: {
6716
+ customClaims?: Record<string, any>;
6717
+ templateId?: string;
6718
+ templateOptions?: {
6719
+ [x: string]: string;
6720
+ };
6721
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
6722
+ pendingRef: string;
6723
+ redirectUrl: string;
6724
+ image: string;
6725
+ }>>;
6726
+ signUp: (loginId?: string, user?: {
6727
+ email?: string;
6728
+ name?: string;
6729
+ givenName?: string;
6730
+ middleName?: string;
6731
+ familyName?: string;
6732
+ phone?: string;
6733
+ }, signUpOptions?: {
6734
+ customClaims?: Record<string, any>;
6735
+ templateId?: string;
6736
+ templateOptions?: {
6737
+ [x: string]: string;
6738
+ };
6739
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
6740
+ pendingRef: string;
6741
+ redirectUrl: string;
6742
+ image: string;
6743
+ }>>;
6744
+ signIn: (loginId?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
6745
+ pendingRef: string;
6746
+ redirectUrl: string;
6747
+ image: string;
6748
+ }>>;
6749
+ waitForSession: (pendingRef: string, config?: {
6750
+ pollingIntervalMs: number;
6751
+ timeoutMs: number;
6752
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
6753
+ };
6754
+ password: {
6755
+ signUp: (loginId: string, password: string, user?: {
6756
+ email?: string;
6757
+ name?: string;
6758
+ givenName?: string;
6759
+ middleName?: string;
6760
+ familyName?: string;
6761
+ phone?: string;
6762
+ }, signUpOptions?: {
6763
+ customClaims?: Record<string, any>;
6764
+ templateId?: string;
6765
+ templateOptions?: {
6766
+ [x: string]: string;
6767
+ };
6768
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
6769
+ signIn: (loginId: string, password: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
6770
+ sendReset: (loginId: string, redirectUrl?: string, templateOptions?: {
6771
+ [x: string]: string;
6772
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
6773
+ resetMethod: string;
6774
+ pendingRef?: string;
6775
+ linkId?: string;
6776
+ maskedEmail: string;
6777
+ }>>;
6778
+ update: (loginId: string, newPassword: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
6779
+ replace: (loginId: string, oldPassword: string, newPassword: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
6780
+ policy: () => Promise<_descope_core_js_sdk.SdkResponse<{
6781
+ minLength: number;
6782
+ lowercase: boolean;
6783
+ uppercase: boolean;
6784
+ number: boolean;
6785
+ nonAlphanumeric: boolean;
6786
+ }>>;
6787
+ };
6788
+ selectTenant: (tenantId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
6789
+ logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
6790
+ me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
6791
+ myTenants: (tenants: true | string[], token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
6792
+ tenants: {
6793
+ id: string;
6794
+ name: string;
6795
+ customAttributes?: Record<string, any>;
6796
+ }[];
6797
+ }>>;
6798
+ history: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserHistoryResponse>>;
6799
+ isJwtExpired: (token: string) => boolean;
6800
+ getTenants: (token: string) => string[];
6801
+ getJwtPermissions: (token: string, tenant?: string) => string[];
6802
+ getJwtRoles: (token: string, tenant?: string) => string[];
6803
+ getCurrentTenant: (token: string) => string;
6804
+ httpClient: {
6805
+ get: (path: string, config?: {
6806
+ headers?: HeadersInit;
6807
+ queryParams?: {
6808
+ [key: string]: string;
6809
+ };
6810
+ token?: string;
6811
+ }) => Promise<Response>;
6812
+ post: (path: string, body?: any, config?: {
6813
+ headers?: HeadersInit;
6814
+ queryParams?: {
6815
+ [key: string]: string;
6816
+ };
6817
+ token?: string;
6818
+ }) => Promise<Response>;
6819
+ patch: (path: string, body?: any, config?: {
6820
+ headers?: HeadersInit;
6821
+ queryParams?: {
6822
+ [key: string]: string;
6823
+ };
6824
+ token?: string;
6825
+ }) => Promise<Response>;
6826
+ put: (path: string, body?: any, config?: {
6827
+ headers?: HeadersInit;
6828
+ queryParams?: {
6829
+ [key: string]: string;
6830
+ };
6831
+ token?: string;
6832
+ }) => Promise<Response>;
6833
+ delete: (path: string, config?: {
6834
+ headers?: HeadersInit;
6835
+ queryParams?: {
6836
+ [key: string]: string;
6837
+ };
6838
+ token?: string;
6839
+ }) => Promise<Response>;
6840
+ hooks?: {
6841
+ beforeRequest?: (config: _descope_core_js_sdk.RequestConfig) => _descope_core_js_sdk.RequestConfig;
6842
+ afterRequest?: (req: _descope_core_js_sdk.RequestConfig, res: Response) => void | Promise<void>;
6843
+ transformResponse?: (mutableResponse: _descope_core_js_sdk.ExtendedResponse) => Promise<_descope_core_js_sdk.ExtendedResponse>;
6844
+ };
6845
+ buildUrl: (path: string, queryParams?: {
6846
+ [key: string]: string;
6847
+ }) => string;
6848
+ };
6849
+ } | {
6850
+ refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
6851
+ logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
6852
+ flow: {
6853
+ start: (flowId: string, options?: Pick<{
6854
+ redirectUrl?: string;
6855
+ location?: string;
6856
+ tenant?: string;
6857
+ deviceInfo?: {
6858
+ webAuthnSupport?: boolean;
6859
+ };
6860
+ lastAuth?: {
6861
+ authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
6862
+ oauthProvider?: string;
6863
+ name?: string;
6864
+ loginId?: string;
6865
+ };
6866
+ redirectAuth?: {
6867
+ callbackUrl: string;
6868
+ codeChallenge: string;
6869
+ };
6870
+ oidcIdpStateId?: string;
6871
+ preview?: boolean;
6872
+ samlIdpStateId?: string;
6873
+ samlIdpUsername?: string;
6874
+ ssoAppId?: string;
6875
+ thirdPartyAppId?: string;
6876
+ oidcLoginHint?: string;
6877
+ abTestingKey?: number;
6878
+ startOptionsVersion?: number;
6879
+ client?: Record<string, any>;
6880
+ locale?: string;
6881
+ oidcPrompt?: string;
6882
+ oidcErrorRedirectUri?: string;
6883
+ nativeOptions?: {
6884
+ platform: "ios" | "android";
6885
+ oauthProvider?: string;
6886
+ oauthRedirect?: string;
6887
+ };
6888
+ thirdPartyAppStateId?: string;
6889
+ applicationScopes?: string;
6890
+ }, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes"> & {
6891
+ lastAuth?: Omit<{
6892
+ authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
6893
+ oauthProvider?: string;
6894
+ name?: string;
6895
+ loginId?: string;
6896
+ }, "loginId" | "name">;
6897
+ }, conditionInteractionId?: string, interactionId?: string, componentsVersion?: string, flowVersions?: Record<string, number>, input?: {
6898
+ [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[])[])[])[])[])[])[])[])[])[])[];
6899
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
6900
+ next: (executionId: string, stepId: string, interactionId: string, version?: number, componentsVersion?: string, input?: {
6901
+ [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[])[])[])[])[])[])[])[])[])[])[];
6902
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
6903
+ };
6904
+ webauthn: {
6905
+ signUp: ((identifier: string, name: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
6906
+ start: (loginId: string, origin: string, name: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
6907
+ transactionId: string;
6908
+ options: string;
6909
+ create: boolean;
6910
+ }>>;
6911
+ finish: (transactionId: string, response: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
6912
+ };
6913
+ signIn: ((identifier: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
6914
+ 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<{
6915
+ transactionId: string;
6916
+ options: string;
6917
+ create: boolean;
6918
+ }>>;
6919
+ finish: (transactionId: string, response: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
6920
+ };
6921
+ signUpOrIn: ((identifier: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
6922
+ start: (loginId: string, origin: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
6923
+ transactionId: string;
6924
+ options: string;
6925
+ create: boolean;
6926
+ }>>;
6927
+ };
6928
+ update: ((identifier: string, token?: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>) & {
6929
+ start: (loginId: string, origin: string, token?: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
6930
+ transactionId: string;
6931
+ options: string;
6932
+ create: boolean;
6933
+ }>>;
6934
+ finish: (transactionId: string, response: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
6935
+ };
6936
+ helpers: {
6937
+ create: (options: string) => Promise<string>;
6938
+ get: (options: string) => Promise<string>;
6939
+ isSupported: (requirePlatformAuthenticator?: boolean) => Promise<boolean>;
6940
+ conditional: (options: string, abort: AbortController) => Promise<string>;
6941
+ };
6942
+ };
6943
+ fedcm: {
6944
+ onetap: {
6945
+ requestExchangeCode(options: {
6946
+ provider?: string;
6947
+ oneTapConfig?: _descope_web_js_sdk.OneTapConfig;
6948
+ loginOptions?: _descope_core_js_sdk.LoginOptions;
6949
+ onSkipped?: (reason?: string) => void;
6950
+ onDismissed?: (reason?: string) => void;
6951
+ onFailed?: (error: Error) => void;
6952
+ onCodeReceived: (code: string) => void;
6953
+ }): void;
6954
+ requestAuthentication(options?: {
6955
+ provider?: string;
6956
+ oneTapConfig?: _descope_web_js_sdk.OneTapConfig;
6957
+ loginOptions?: _descope_core_js_sdk.LoginOptions;
6958
+ onSkipped?: (reason?: string) => void;
6959
+ onDismissed?: (reason?: string) => void;
6960
+ onFailed?: (error: Error) => void;
6961
+ onAuthenticated?: (response: _descope_core_js_sdk.JWTResponse) => void;
6962
+ }): void;
6963
+ };
6964
+ oneTap(provider?: string, oneTapConfig?: _descope_web_js_sdk.OneTapConfig, loginOptions?: _descope_core_js_sdk.LoginOptions, onSkipped?: (reason?: string) => void, onDismissed?: (reason?: string) => void): void;
6965
+ launch(context?: "signin" | "signup" | "use" | "continue"): Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
6966
+ isSupported(): boolean;
6967
+ isLoggedIn(context?: "signin" | "signup" | "use" | "continue"): Promise<boolean>;
6968
+ };
6969
+ oidc: {
6970
+ loginWithRedirect: (arg?: _2.CreateSigninRequestArgs, disableNavigation?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
6971
+ finishLogin: (url?: string) => Promise<any>;
6972
+ finishLoginIfNeed: (url?: string) => Promise<any>;
6973
+ refreshToken: (refreshToken: string) => Promise<_2.SigninResponse>;
6974
+ logout: (arg?: _2.CreateSignoutRequestArgs, disableNavigation?: boolean) => Promise<any>;
6975
+ };
6976
+ accessKey: {
6977
+ exchange: (accessKey: string, loginOptions?: _descope_core_js_sdk.AccessKeyLoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
6978
+ };
6979
+ otp: {
6980
+ verify: {
6981
+ sms: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
6982
+ voice: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
6983
+ whatsapp: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
6984
+ email: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
6985
+ };
6986
+ signIn: {
6987
+ sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
6988
+ maskedPhone: string;
6989
+ }>>;
6990
+ voice: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
6991
+ maskedPhone: string;
6992
+ }>>;
6993
+ whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
6994
+ maskedPhone: string;
6995
+ }>>;
6996
+ email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
6997
+ maskedEmail: string;
6998
+ }>>;
6999
+ };
7000
+ signUp: {
7001
+ sms: (loginId: string, user?: {
7002
+ email?: string;
7003
+ name?: string;
7004
+ givenName?: string;
7005
+ middleName?: string;
7006
+ familyName?: string;
7007
+ phone?: string;
7008
+ }, signUpOptions?: {
7009
+ customClaims?: Record<string, any>;
7010
+ templateId?: string;
7011
+ templateOptions?: {
7012
+ [x: string]: string;
7013
+ };
7014
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7015
+ maskedPhone: string;
7016
+ }>>;
7017
+ voice: (loginId: string, user?: {
7018
+ email?: string;
7019
+ name?: string;
7020
+ givenName?: string;
7021
+ middleName?: string;
7022
+ familyName?: string;
7023
+ phone?: string;
7024
+ }, signUpOptions?: {
7025
+ customClaims?: Record<string, any>;
7026
+ templateId?: string;
7027
+ templateOptions?: {
7028
+ [x: string]: string;
7029
+ };
7030
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7031
+ maskedPhone: string;
7032
+ }>>;
7033
+ whatsapp: (loginId: string, user?: {
7034
+ email?: string;
7035
+ name?: string;
7036
+ givenName?: string;
7037
+ middleName?: string;
7038
+ familyName?: string;
7039
+ phone?: string;
7040
+ }, signUpOptions?: {
7041
+ customClaims?: Record<string, any>;
7042
+ templateId?: string;
7043
+ templateOptions?: {
7044
+ [x: string]: string;
7045
+ };
7046
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7047
+ maskedPhone: string;
7048
+ }>>;
7049
+ email: (loginId: string, user?: {
7050
+ email?: string;
7051
+ name?: string;
7052
+ givenName?: string;
7053
+ middleName?: string;
7054
+ familyName?: string;
7055
+ phone?: string;
7056
+ }, signUpOptions?: {
7057
+ customClaims?: Record<string, any>;
7058
+ templateId?: string;
7059
+ templateOptions?: {
7060
+ [x: string]: string;
7061
+ };
7062
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7063
+ maskedEmail: string;
7064
+ }>>;
7065
+ };
7066
+ signUpOrIn: {
7067
+ sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
7068
+ maskedPhone: string;
7069
+ }>>;
7070
+ voice: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
7071
+ maskedPhone: string;
7072
+ }>>;
7073
+ whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
7074
+ maskedPhone: string;
7075
+ }>>;
7076
+ email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
7077
+ maskedEmail: string;
7078
+ }>>;
7079
+ };
7080
+ update: {
7081
+ email: <T_8 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
7082
+ addToLoginIDs?: T_8;
7083
+ onMergeUseExisting?: T_8 extends true ? boolean : never;
7084
+ templateOptions?: {
7085
+ [x: string]: string;
7086
+ };
7087
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7088
+ maskedEmail: string;
7089
+ }>>;
7090
+ phone: {
7091
+ sms: <T_1_12 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
7092
+ addToLoginIDs?: T_1_12;
7093
+ onMergeUseExisting?: T_1_12 extends true ? boolean : never;
7094
+ templateOptions?: {
7095
+ [x: string]: string;
7096
+ };
7097
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7098
+ maskedPhone: string;
7099
+ }>>;
7100
+ voice: <T_1_13 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
7101
+ addToLoginIDs?: T_1_13;
7102
+ onMergeUseExisting?: T_1_13 extends true ? boolean : never;
7103
+ templateOptions?: {
7104
+ [x: string]: string;
7105
+ };
7106
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7107
+ maskedPhone: string;
7108
+ }>>;
7109
+ whatsapp: <T_1_14 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
7110
+ addToLoginIDs?: T_1_14;
7111
+ onMergeUseExisting?: T_1_14 extends true ? boolean : never;
7112
+ templateOptions?: {
7113
+ [x: string]: string;
7114
+ };
7115
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7116
+ maskedPhone: string;
7117
+ }>>;
7118
+ };
7119
+ };
7120
+ };
7121
+ magicLink: {
7122
+ verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
7123
+ signIn: {
7124
+ sms: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
7125
+ maskedPhone: string;
7126
+ }>>;
7127
+ voice: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
7128
+ maskedPhone: string;
7129
+ }>>;
7130
+ whatsapp: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
7131
+ maskedPhone: string;
7132
+ }>>;
7133
+ email: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
7134
+ maskedEmail: string;
7135
+ }>>;
7136
+ };
7137
+ signUp: {
7138
+ sms: (loginId: string, URI: string, user?: {
7139
+ email?: string;
7140
+ name?: string;
7141
+ givenName?: string;
7142
+ middleName?: string;
7143
+ familyName?: string;
7144
+ phone?: string;
7145
+ }, signUpOptions?: {
7146
+ customClaims?: Record<string, any>;
7147
+ templateId?: string;
7148
+ templateOptions?: {
7149
+ [x: string]: string;
7150
+ };
7151
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7152
+ maskedPhone: string;
7153
+ }>>;
7154
+ voice: (loginId: string, URI: string, user?: {
7155
+ email?: string;
7156
+ name?: string;
7157
+ givenName?: string;
7158
+ middleName?: string;
7159
+ familyName?: string;
7160
+ phone?: string;
7161
+ }, signUpOptions?: {
7162
+ customClaims?: Record<string, any>;
7163
+ templateId?: string;
7164
+ templateOptions?: {
7165
+ [x: string]: string;
7166
+ };
7167
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7168
+ maskedPhone: string;
7169
+ }>>;
7170
+ whatsapp: (loginId: string, URI: string, user?: {
7171
+ email?: string;
7172
+ name?: string;
7173
+ givenName?: string;
7174
+ middleName?: string;
7175
+ familyName?: string;
7176
+ phone?: string;
7177
+ }, signUpOptions?: {
7178
+ customClaims?: Record<string, any>;
7179
+ templateId?: string;
7180
+ templateOptions?: {
7181
+ [x: string]: string;
7182
+ };
7183
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7184
+ maskedPhone: string;
7185
+ }>>;
7186
+ email: (loginId: string, URI: string, user?: {
7187
+ email?: string;
7188
+ name?: string;
7189
+ givenName?: string;
7190
+ middleName?: string;
7191
+ familyName?: string;
7192
+ phone?: string;
7193
+ }, signUpOptions?: {
7194
+ customClaims?: Record<string, any>;
7195
+ templateId?: string;
7196
+ templateOptions?: {
7197
+ [x: string]: string;
7198
+ };
7199
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7200
+ maskedEmail: string;
7201
+ }>>;
7202
+ };
7203
+ signUpOrIn: {
7204
+ sms: (loginId: string, URI?: string, signUpOptions?: {
7205
+ customClaims?: Record<string, any>;
7206
+ templateId?: string;
7207
+ templateOptions?: {
7208
+ [x: string]: string;
7209
+ };
7210
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7211
+ maskedPhone: string;
7212
+ }>>;
7213
+ voice: (loginId: string, URI?: string, signUpOptions?: {
7214
+ customClaims?: Record<string, any>;
7215
+ templateId?: string;
7216
+ templateOptions?: {
7217
+ [x: string]: string;
7218
+ };
7219
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7220
+ maskedPhone: string;
7221
+ }>>;
7222
+ whatsapp: (loginId: string, URI?: string, signUpOptions?: {
7223
+ customClaims?: Record<string, any>;
7224
+ templateId?: string;
7225
+ templateOptions?: {
7226
+ [x: string]: string;
7227
+ };
7228
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7229
+ maskedPhone: string;
7230
+ }>>;
7231
+ email: (loginId: string, URI?: string, signUpOptions?: {
7232
+ customClaims?: Record<string, any>;
7233
+ templateId?: string;
7234
+ templateOptions?: {
7235
+ [x: string]: string;
7236
+ };
7237
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7238
+ maskedEmail: string;
7239
+ }>>;
7240
+ };
7241
+ update: {
7242
+ email: <T_2_4 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
7243
+ addToLoginIDs?: T_2_4;
7244
+ onMergeUseExisting?: T_2_4 extends true ? boolean : never;
7245
+ templateOptions?: {
7246
+ [x: string]: string;
7247
+ };
7248
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7249
+ maskedEmail: string;
7250
+ }>>;
7251
+ phone: {
7252
+ sms: <T_3_12 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
7253
+ addToLoginIDs?: T_3_12;
7254
+ onMergeUseExisting?: T_3_12 extends true ? boolean : never;
7255
+ templateOptions?: {
7256
+ [x: string]: string;
7257
+ };
7258
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7259
+ maskedPhone: string;
7260
+ }>>;
7261
+ voice: <T_3_13 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
7262
+ addToLoginIDs?: T_3_13;
7263
+ onMergeUseExisting?: T_3_13 extends true ? boolean : never;
7264
+ templateOptions?: {
7265
+ [x: string]: string;
7266
+ };
7267
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7268
+ maskedPhone: string;
7269
+ }>>;
7270
+ whatsapp: <T_3_14 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
7271
+ addToLoginIDs?: T_3_14;
7272
+ onMergeUseExisting?: T_3_14 extends true ? boolean : never;
7273
+ templateOptions?: {
7274
+ [x: string]: string;
7275
+ };
7276
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7277
+ maskedPhone: string;
7278
+ }>>;
7279
+ };
7280
+ };
7281
+ };
7282
+ enchantedLink: {
7283
+ verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
7284
+ signIn: (loginId: string, URI?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
7285
+ signUpOrIn: (loginId: string, URI?: string, signUpOptions?: {
7286
+ customClaims?: Record<string, any>;
7287
+ templateId?: string;
7288
+ templateOptions?: {
7289
+ [x: string]: string;
7290
+ };
7291
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
7292
+ signUp: (loginId: string, URI?: string, user?: {
7293
+ email?: string;
7294
+ name?: string;
7295
+ givenName?: string;
7296
+ middleName?: string;
7297
+ familyName?: string;
7298
+ phone?: string;
7299
+ }, signUpOptions?: {
7300
+ customClaims?: Record<string, any>;
7301
+ templateId?: string;
7302
+ templateOptions?: {
7303
+ [x: string]: string;
7304
+ };
7305
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
7306
+ waitForSession: (pendingRef: string, config?: {
7307
+ pollingIntervalMs: number;
7308
+ timeoutMs: number;
7309
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
7310
+ update: {
7311
+ email: <T_4_4 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
7312
+ addToLoginIDs?: T_4_4;
7313
+ onMergeUseExisting?: T_4_4 extends true ? boolean : never;
7314
+ templateOptions?: {
7315
+ [x: string]: string;
7316
+ };
7317
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
7318
+ };
7319
+ };
7320
+ oauth: {
7321
+ start: ((provider: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>) & {
7322
+ google: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
7323
+ facebook: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
7324
+ github: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
7325
+ microsoft: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
7326
+ gitlab: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
7327
+ apple: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
7328
+ discord: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
7329
+ linkedin: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
7330
+ slack: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
7331
+ };
7332
+ exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
7333
+ startNative: (provider: string, loginOptions?: _descope_core_js_sdk.LoginOptions, implicit?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
7334
+ finishNative: (provider: string, stateId: string, user?: string, code?: string, idToken?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
7335
+ getOneTapClientId: (provider: string) => Promise<_descope_core_js_sdk.SdkResponse<{
7336
+ clientId: string;
7337
+ }>>;
7338
+ verifyOneTapIDToken: (provider: string, idToken: string, nonce: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
7339
+ code: string;
7340
+ }>>;
7341
+ exchangeOneTapIDToken: (provider: string, idToken: string, nonce: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
7342
+ };
7343
+ saml: {
7344
+ start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string, ssoId?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
7345
+ exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
7346
+ };
7347
+ totp: {
7348
+ signUp: (loginId: string, user?: {
7349
+ email?: string;
7350
+ name?: string;
7351
+ givenName?: string;
7352
+ middleName?: string;
7353
+ familyName?: string;
7354
+ phone?: string;
7355
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.TOTPResponse>>;
7356
+ verify: (loginId: string, code: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
7357
+ update: (loginId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.TOTPResponse>>;
7358
+ };
7359
+ notp: {
7360
+ signUpOrIn: (loginId?: string, signUpOptions?: {
7361
+ customClaims?: Record<string, any>;
7362
+ templateId?: string;
7363
+ templateOptions?: {
7364
+ [x: string]: string;
7365
+ };
7366
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7367
+ pendingRef: string;
7368
+ redirectUrl: string;
7369
+ image: string;
7370
+ }>>;
7371
+ signUp: (loginId?: string, user?: {
7372
+ email?: string;
7373
+ name?: string;
7374
+ givenName?: string;
7375
+ middleName?: string;
7376
+ familyName?: string;
7377
+ phone?: string;
7378
+ }, signUpOptions?: {
7379
+ customClaims?: Record<string, any>;
7380
+ templateId?: string;
7381
+ templateOptions?: {
7382
+ [x: string]: string;
7383
+ };
7384
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7385
+ pendingRef: string;
7386
+ redirectUrl: string;
7387
+ image: string;
7388
+ }>>;
7389
+ signIn: (loginId?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
7390
+ pendingRef: string;
7391
+ redirectUrl: string;
7392
+ image: string;
7393
+ }>>;
7394
+ waitForSession: (pendingRef: string, config?: {
7395
+ pollingIntervalMs: number;
7396
+ timeoutMs: number;
7397
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
7398
+ };
7399
+ password: {
7400
+ signUp: (loginId: string, password: string, user?: {
7401
+ email?: string;
7402
+ name?: string;
7403
+ givenName?: string;
7404
+ middleName?: string;
7405
+ familyName?: string;
7406
+ phone?: string;
7407
+ }, signUpOptions?: {
7408
+ customClaims?: Record<string, any>;
7409
+ templateId?: string;
7410
+ templateOptions?: {
7411
+ [x: string]: string;
7412
+ };
7413
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
7414
+ signIn: (loginId: string, password: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
7415
+ sendReset: (loginId: string, redirectUrl?: string, templateOptions?: {
7416
+ [x: string]: string;
7417
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7418
+ resetMethod: string;
7419
+ pendingRef?: string;
7420
+ linkId?: string;
7421
+ maskedEmail: string;
7422
+ }>>;
7423
+ update: (loginId: string, newPassword: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
7424
+ replace: (loginId: string, oldPassword: string, newPassword: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
7425
+ policy: () => Promise<_descope_core_js_sdk.SdkResponse<{
7426
+ minLength: number;
7427
+ lowercase: boolean;
7428
+ uppercase: boolean;
7429
+ number: boolean;
7430
+ nonAlphanumeric: boolean;
7431
+ }>>;
7432
+ };
7433
+ selectTenant: (tenantId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
7434
+ logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
7435
+ me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
7436
+ myTenants: (tenants: true | string[], token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
7437
+ tenants: {
7438
+ id: string;
7439
+ name: string;
7440
+ customAttributes?: Record<string, any>;
7441
+ }[];
7442
+ }>>;
7443
+ history: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserHistoryResponse>>;
7444
+ isJwtExpired: (token: string) => boolean;
7445
+ getTenants: (token: string) => string[];
7446
+ getJwtPermissions: (token: string, tenant?: string) => string[];
7447
+ getJwtRoles: (token: string, tenant?: string) => string[];
7448
+ getCurrentTenant: (token: string) => string;
7449
+ httpClient: {
7450
+ get: (path: string, config?: {
7451
+ headers?: HeadersInit;
7452
+ queryParams?: {
7453
+ [key: string]: string;
7454
+ };
7455
+ token?: string;
7456
+ }) => Promise<Response>;
7457
+ post: (path: string, body?: any, config?: {
7458
+ headers?: HeadersInit;
7459
+ queryParams?: {
7460
+ [key: string]: string;
7461
+ };
7462
+ token?: string;
7463
+ }) => Promise<Response>;
7464
+ patch: (path: string, body?: any, config?: {
7465
+ headers?: HeadersInit;
7466
+ queryParams?: {
7467
+ [key: string]: string;
7468
+ };
7469
+ token?: string;
7470
+ }) => Promise<Response>;
7471
+ put: (path: string, body?: any, config?: {
7472
+ headers?: HeadersInit;
7473
+ queryParams?: {
7474
+ [key: string]: string;
7475
+ };
7476
+ token?: string;
7477
+ }) => Promise<Response>;
7478
+ delete: (path: string, config?: {
7479
+ headers?: HeadersInit;
7480
+ queryParams?: {
7481
+ [key: string]: string;
7482
+ };
7483
+ token?: string;
7484
+ }) => Promise<Response>;
7485
+ hooks?: {
7486
+ beforeRequest?: (config: _descope_core_js_sdk.RequestConfig) => _descope_core_js_sdk.RequestConfig;
7487
+ afterRequest?: (req: _descope_core_js_sdk.RequestConfig, res: Response) => void | Promise<void>;
7488
+ transformResponse?: (mutableResponse: _descope_core_js_sdk.ExtendedResponse) => Promise<_descope_core_js_sdk.ExtendedResponse>;
7489
+ };
7490
+ buildUrl: (path: string, queryParams?: {
7491
+ [key: string]: string;
7492
+ }) => string;
7493
+ };
7494
+ } | {
7495
+ refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
7496
+ logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
7497
+ flow: {
7498
+ start: (flowId: string, options?: Pick<{
7499
+ redirectUrl?: string;
7500
+ location?: string;
7501
+ tenant?: string;
7502
+ deviceInfo?: {
7503
+ webAuthnSupport?: boolean;
7504
+ };
7505
+ lastAuth?: {
7506
+ authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
7507
+ oauthProvider?: string;
7508
+ name?: string;
7509
+ loginId?: string;
7510
+ };
7511
+ redirectAuth?: {
7512
+ callbackUrl: string;
7513
+ codeChallenge: string;
7514
+ };
7515
+ oidcIdpStateId?: string;
7516
+ preview?: boolean;
7517
+ samlIdpStateId?: string;
7518
+ samlIdpUsername?: string;
7519
+ ssoAppId?: string;
7520
+ thirdPartyAppId?: string;
7521
+ oidcLoginHint?: string;
7522
+ abTestingKey?: number;
7523
+ startOptionsVersion?: number;
7524
+ client?: Record<string, any>;
7525
+ locale?: string;
7526
+ oidcPrompt?: string;
7527
+ oidcErrorRedirectUri?: string;
7528
+ nativeOptions?: {
7529
+ platform: "ios" | "android";
7530
+ oauthProvider?: string;
7531
+ oauthRedirect?: string;
7532
+ };
7533
+ thirdPartyAppStateId?: string;
7534
+ applicationScopes?: string;
7535
+ }, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes"> & {
7536
+ lastAuth?: Omit<{
7537
+ authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
7538
+ oauthProvider?: string;
7539
+ name?: string;
7540
+ loginId?: string;
7541
+ }, "loginId" | "name">;
7542
+ }, conditionInteractionId?: string, interactionId?: string, componentsVersion?: string, flowVersions?: Record<string, number>, input?: {
7543
+ [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[])[])[])[])[])[])[])[])[])[])[];
7544
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
7545
+ next: (executionId: string, stepId: string, interactionId: string, version?: number, componentsVersion?: string, input?: {
7546
+ [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[])[])[])[])[])[])[])[])[])[])[];
7547
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
7548
+ };
7549
+ webauthn: {
7550
+ signUp: ((identifier: string, name: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
7551
+ start: (loginId: string, origin: string, name: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
7552
+ transactionId: string;
7553
+ options: string;
7554
+ create: boolean;
7555
+ }>>;
7556
+ finish: (transactionId: string, response: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
7557
+ };
7558
+ signIn: ((identifier: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
7559
+ 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<{
7560
+ transactionId: string;
7561
+ options: string;
7562
+ create: boolean;
7563
+ }>>;
7564
+ finish: (transactionId: string, response: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
7565
+ };
7566
+ signUpOrIn: ((identifier: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
7567
+ start: (loginId: string, origin: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
7568
+ transactionId: string;
7569
+ options: string;
7570
+ create: boolean;
7571
+ }>>;
7572
+ };
7573
+ update: ((identifier: string, token?: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>) & {
7574
+ start: (loginId: string, origin: string, token?: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<{
7575
+ transactionId: string;
7576
+ options: string;
7577
+ create: boolean;
7578
+ }>>;
7579
+ finish: (transactionId: string, response: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
7580
+ };
7581
+ helpers: {
7582
+ create: (options: string) => Promise<string>;
7583
+ get: (options: string) => Promise<string>;
7584
+ isSupported: (requirePlatformAuthenticator?: boolean) => Promise<boolean>;
7585
+ conditional: (options: string, abort: AbortController) => Promise<string>;
7586
+ };
7587
+ };
7588
+ fedcm: {
7589
+ onetap: {
7590
+ requestExchangeCode(options: {
7591
+ provider?: string;
7592
+ oneTapConfig?: _descope_web_js_sdk.OneTapConfig;
7593
+ loginOptions?: _descope_core_js_sdk.LoginOptions;
7594
+ onSkipped?: (reason?: string) => void;
7595
+ onDismissed?: (reason?: string) => void;
7596
+ onFailed?: (error: Error) => void;
7597
+ onCodeReceived: (code: string) => void;
7598
+ }): void;
7599
+ requestAuthentication(options?: {
7600
+ provider?: string;
7601
+ oneTapConfig?: _descope_web_js_sdk.OneTapConfig;
7602
+ loginOptions?: _descope_core_js_sdk.LoginOptions;
7603
+ onSkipped?: (reason?: string) => void;
7604
+ onDismissed?: (reason?: string) => void;
7605
+ onFailed?: (error: Error) => void;
7606
+ onAuthenticated?: (response: _descope_core_js_sdk.JWTResponse) => void;
7607
+ }): void;
7608
+ };
7609
+ oneTap(provider?: string, oneTapConfig?: _descope_web_js_sdk.OneTapConfig, loginOptions?: _descope_core_js_sdk.LoginOptions, onSkipped?: (reason?: string) => void, onDismissed?: (reason?: string) => void): void;
7610
+ launch(context?: "signin" | "signup" | "use" | "continue"): Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
7611
+ isSupported(): boolean;
7612
+ isLoggedIn(context?: "signin" | "signup" | "use" | "continue"): Promise<boolean>;
7613
+ };
7614
+ oidc: {
7615
+ loginWithRedirect: (arg?: _2.CreateSigninRequestArgs, disableNavigation?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
7616
+ finishLogin: (url?: string) => Promise<any>;
7617
+ finishLoginIfNeed: (url?: string) => Promise<any>;
7618
+ refreshToken: (refreshToken: string) => Promise<_2.SigninResponse>;
7619
+ logout: (arg?: _2.CreateSignoutRequestArgs, disableNavigation?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
7620
+ };
7621
+ accessKey: {
7622
+ exchange: (accessKey: string, loginOptions?: _descope_core_js_sdk.AccessKeyLoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
7623
+ };
7624
+ otp: {
7625
+ verify: {
7626
+ sms: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
7627
+ voice: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
7628
+ whatsapp: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
7629
+ email: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
7630
+ };
7631
+ signIn: {
7632
+ sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
7633
+ maskedPhone: string;
7634
+ }>>;
7635
+ voice: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
7636
+ maskedPhone: string;
7637
+ }>>;
7638
+ whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
7639
+ maskedPhone: string;
7640
+ }>>;
7641
+ email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
7642
+ maskedEmail: string;
7643
+ }>>;
7644
+ };
7645
+ signUp: {
7646
+ sms: (loginId: string, user?: {
7647
+ email?: string;
7648
+ name?: string;
7649
+ givenName?: string;
7650
+ middleName?: string;
7651
+ familyName?: string;
7652
+ phone?: string;
7653
+ }, signUpOptions?: {
7654
+ customClaims?: Record<string, any>;
7655
+ templateId?: string;
7656
+ templateOptions?: {
7657
+ [x: string]: string;
7658
+ };
7659
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7660
+ maskedPhone: string;
7661
+ }>>;
7662
+ voice: (loginId: string, user?: {
7663
+ email?: string;
7664
+ name?: string;
7665
+ givenName?: string;
7666
+ middleName?: string;
7667
+ familyName?: string;
7668
+ phone?: string;
7669
+ }, signUpOptions?: {
7670
+ customClaims?: Record<string, any>;
7671
+ templateId?: string;
7672
+ templateOptions?: {
7673
+ [x: string]: string;
7674
+ };
7675
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7676
+ maskedPhone: string;
7677
+ }>>;
7678
+ whatsapp: (loginId: string, user?: {
7679
+ email?: string;
7680
+ name?: string;
7681
+ givenName?: string;
7682
+ middleName?: string;
7683
+ familyName?: string;
7684
+ phone?: string;
7685
+ }, signUpOptions?: {
7686
+ customClaims?: Record<string, any>;
7687
+ templateId?: string;
7688
+ templateOptions?: {
7689
+ [x: string]: string;
7690
+ };
7691
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7692
+ maskedPhone: string;
7693
+ }>>;
7694
+ email: (loginId: string, user?: {
7695
+ email?: string;
7696
+ name?: string;
7697
+ givenName?: string;
7698
+ middleName?: string;
7699
+ familyName?: string;
7700
+ phone?: string;
7701
+ }, signUpOptions?: {
7702
+ customClaims?: Record<string, any>;
7703
+ templateId?: string;
7704
+ templateOptions?: {
7705
+ [x: string]: string;
7706
+ };
7707
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7708
+ maskedEmail: string;
7709
+ }>>;
7710
+ };
7711
+ signUpOrIn: {
7712
+ sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
7713
+ maskedPhone: string;
7714
+ }>>;
7715
+ voice: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
7716
+ maskedPhone: string;
7717
+ }>>;
7718
+ whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
7719
+ maskedPhone: string;
7720
+ }>>;
7721
+ email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
7722
+ maskedEmail: string;
7723
+ }>>;
7724
+ };
7725
+ update: {
7726
+ email: <T_9 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
7727
+ addToLoginIDs?: T_9;
7728
+ onMergeUseExisting?: T_9 extends true ? boolean : never;
7729
+ templateOptions?: {
7730
+ [x: string]: string;
7731
+ };
7732
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7733
+ maskedEmail: string;
7734
+ }>>;
7735
+ phone: {
7736
+ sms: <T_1_15 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
7737
+ addToLoginIDs?: T_1_15;
7738
+ onMergeUseExisting?: T_1_15 extends true ? boolean : never;
7739
+ templateOptions?: {
7740
+ [x: string]: string;
7741
+ };
7742
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7743
+ maskedPhone: string;
7744
+ }>>;
7745
+ voice: <T_1_16 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
7746
+ addToLoginIDs?: T_1_16;
7747
+ onMergeUseExisting?: T_1_16 extends true ? boolean : never;
7748
+ templateOptions?: {
7749
+ [x: string]: string;
7750
+ };
7751
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7752
+ maskedPhone: string;
7753
+ }>>;
7754
+ whatsapp: <T_1_17 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
7755
+ addToLoginIDs?: T_1_17;
7756
+ onMergeUseExisting?: T_1_17 extends true ? boolean : never;
7757
+ templateOptions?: {
7758
+ [x: string]: string;
7759
+ };
7760
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7761
+ maskedPhone: string;
7762
+ }>>;
7763
+ };
7764
+ };
7765
+ };
7766
+ magicLink: {
7767
+ verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
7768
+ signIn: {
7769
+ sms: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
7770
+ maskedPhone: string;
7771
+ }>>;
7772
+ voice: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
7773
+ maskedPhone: string;
7774
+ }>>;
7775
+ whatsapp: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
7776
+ maskedPhone: string;
7777
+ }>>;
7778
+ email: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
7779
+ maskedEmail: string;
7780
+ }>>;
7781
+ };
7782
+ signUp: {
7783
+ sms: (loginId: string, URI: string, user?: {
7784
+ email?: string;
7785
+ name?: string;
7786
+ givenName?: string;
7787
+ middleName?: string;
7788
+ familyName?: string;
7789
+ phone?: string;
7790
+ }, signUpOptions?: {
7791
+ customClaims?: Record<string, any>;
7792
+ templateId?: string;
7793
+ templateOptions?: {
7794
+ [x: string]: string;
7795
+ };
7796
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7797
+ maskedPhone: string;
7798
+ }>>;
7799
+ voice: (loginId: string, URI: string, user?: {
7800
+ email?: string;
7801
+ name?: string;
7802
+ givenName?: string;
7803
+ middleName?: string;
7804
+ familyName?: string;
7805
+ phone?: string;
7806
+ }, signUpOptions?: {
7807
+ customClaims?: Record<string, any>;
7808
+ templateId?: string;
7809
+ templateOptions?: {
7810
+ [x: string]: string;
7811
+ };
7812
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7813
+ maskedPhone: string;
7814
+ }>>;
7815
+ whatsapp: (loginId: string, URI: string, user?: {
7816
+ email?: string;
7817
+ name?: string;
7818
+ givenName?: string;
7819
+ middleName?: string;
7820
+ familyName?: string;
7821
+ phone?: string;
7822
+ }, signUpOptions?: {
7823
+ customClaims?: Record<string, any>;
7824
+ templateId?: string;
7825
+ templateOptions?: {
7826
+ [x: string]: string;
7827
+ };
7828
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7829
+ maskedPhone: string;
7830
+ }>>;
7831
+ email: (loginId: string, URI: string, user?: {
7832
+ email?: string;
7833
+ name?: string;
7834
+ givenName?: string;
7835
+ middleName?: string;
7836
+ familyName?: string;
7837
+ phone?: string;
7838
+ }, signUpOptions?: {
7839
+ customClaims?: Record<string, any>;
7840
+ templateId?: string;
7841
+ templateOptions?: {
7842
+ [x: string]: string;
7843
+ };
7844
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7845
+ maskedEmail: string;
7846
+ }>>;
7847
+ };
7848
+ signUpOrIn: {
7849
+ sms: (loginId: string, URI?: string, signUpOptions?: {
7850
+ customClaims?: Record<string, any>;
7851
+ templateId?: string;
7852
+ templateOptions?: {
7853
+ [x: string]: string;
7854
+ };
7855
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7856
+ maskedPhone: string;
7857
+ }>>;
7858
+ voice: (loginId: string, URI?: string, signUpOptions?: {
7859
+ customClaims?: Record<string, any>;
7860
+ templateId?: string;
7861
+ templateOptions?: {
7862
+ [x: string]: string;
7863
+ };
7864
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7865
+ maskedPhone: string;
7866
+ }>>;
7867
+ whatsapp: (loginId: string, URI?: string, signUpOptions?: {
7868
+ customClaims?: Record<string, any>;
7869
+ templateId?: string;
7870
+ templateOptions?: {
7871
+ [x: string]: string;
7872
+ };
7873
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7874
+ maskedPhone: string;
7875
+ }>>;
7876
+ email: (loginId: string, URI?: string, signUpOptions?: {
7877
+ customClaims?: Record<string, any>;
7878
+ templateId?: string;
7879
+ templateOptions?: {
7880
+ [x: string]: string;
7881
+ };
7882
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7883
+ maskedEmail: string;
7884
+ }>>;
7885
+ };
7886
+ update: {
7887
+ email: <T_2_5 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
7888
+ addToLoginIDs?: T_2_5;
7889
+ onMergeUseExisting?: T_2_5 extends true ? boolean : never;
7890
+ templateOptions?: {
7891
+ [x: string]: string;
7892
+ };
7893
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7894
+ maskedEmail: string;
7895
+ }>>;
7896
+ phone: {
7897
+ sms: <T_3_15 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
7898
+ addToLoginIDs?: T_3_15;
7899
+ onMergeUseExisting?: T_3_15 extends true ? boolean : never;
7900
+ templateOptions?: {
7901
+ [x: string]: string;
7902
+ };
7903
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7904
+ maskedPhone: string;
7905
+ }>>;
7906
+ voice: <T_3_16 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
7907
+ addToLoginIDs?: T_3_16;
7908
+ onMergeUseExisting?: T_3_16 extends true ? boolean : never;
7909
+ templateOptions?: {
7910
+ [x: string]: string;
7911
+ };
7912
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7913
+ maskedPhone: string;
7914
+ }>>;
7915
+ whatsapp: <T_3_17 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
7916
+ addToLoginIDs?: T_3_17;
7917
+ onMergeUseExisting?: T_3_17 extends true ? boolean : never;
7918
+ templateOptions?: {
7919
+ [x: string]: string;
7920
+ };
7921
+ }) => Promise<_descope_core_js_sdk.SdkResponse<{
7922
+ maskedPhone: string;
7923
+ }>>;
7924
+ };
7925
+ };
7926
+ };
7927
+ enchantedLink: {
7928
+ verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
7929
+ signIn: (loginId: string, URI?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
7930
+ signUpOrIn: (loginId: string, URI?: string, signUpOptions?: {
7931
+ customClaims?: Record<string, any>;
7932
+ templateId?: string;
7933
+ templateOptions?: {
7934
+ [x: string]: string;
7935
+ };
7936
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
7937
+ signUp: (loginId: string, URI?: string, user?: {
7938
+ email?: string;
7939
+ name?: string;
7940
+ givenName?: string;
7941
+ middleName?: string;
7942
+ familyName?: string;
7943
+ phone?: string;
7944
+ }, signUpOptions?: {
7945
+ customClaims?: Record<string, any>;
7946
+ templateId?: string;
7947
+ templateOptions?: {
7948
+ [x: string]: string;
7949
+ };
7950
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
7951
+ waitForSession: (pendingRef: string, config?: {
7952
+ pollingIntervalMs: number;
7953
+ timeoutMs: number;
7954
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
7955
+ update: {
7956
+ email: <T_4_5 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
7957
+ addToLoginIDs?: T_4_5;
7958
+ onMergeUseExisting?: T_4_5 extends true ? boolean : never;
5320
7959
  templateOptions?: {
5321
7960
  [x: string]: string;
5322
7961
  };
@@ -5437,7 +8076,6 @@ declare const getSdk: () => ((({
5437
8076
  }>>;
5438
8077
  };
5439
8078
  selectTenant: (tenantId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
5440
- logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
5441
8079
  logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
5442
8080
  me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
5443
8081
  myTenants: (tenants: true | string[], token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
@@ -5508,6 +8146,7 @@ declare const getSdk: () => ((({
5508
8146
  }) & {
5509
8147
  getRefreshToken: () => string;
5510
8148
  getSessionToken: () => string;
8149
+ getIdToken: () => string;
5511
8150
  });
5512
8151
  declare const _default: {
5513
8152
  install: (app: App, options: Options) => void;