@descope/web-js-sdk 1.53.0 → 1.53.2

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
@@ -173,6 +173,15 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
173
173
  next: (executionId: string, stepId: string, interactionId: string, version?: number, componentsVersion?: string, input?: {
174
174
  [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 | (string | number | boolean | any)[])[])[])[])[])[])[])[])[])[])[];
175
175
  }, isCustomScreen?: any, options?: _descope_core_js_sdk.FlowNextOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
176
+ event: (executionId: string, events: {
177
+ id: string;
178
+ field: string;
179
+ rule: string;
180
+ message: string;
181
+ screenId: string;
182
+ screenName: string;
183
+ ts: number;
184
+ }[], keepalive?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
176
185
  };
177
186
  webauthn: {
178
187
  signUp: ((identifier: string, name: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
@@ -211,8 +220,8 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
211
220
  }>>;
212
221
  };
213
222
  helpers: {
214
- create: (options: string) => Promise<string>;
215
- get: (options: string) => Promise<string>;
223
+ create: (options: string, abort?: AbortController) => Promise<string>;
224
+ get: (options: string, abort?: AbortController) => Promise<string>;
216
225
  isSupported: typeof isSupported;
217
226
  conditional: (options: string, abort: AbortController) => Promise<string>;
218
227
  };
@@ -675,6 +684,9 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
675
684
  signIn: (loginId: string, URI?: string, args_2?: _descope_core_js_sdk.LoginOptions & {
676
685
  providerId?: string;
677
686
  }, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
687
+ signInWithPhone: (loginId: string, URI?: string, args_2?: _descope_core_js_sdk.LoginOptions & {
688
+ providerId?: string;
689
+ }, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
678
690
  signUpOrIn: (loginId: string, URI?: string, args_2?: {
679
691
  customClaims?: Record<string, any>;
680
692
  templateId?: string;
@@ -685,6 +697,16 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
685
697
  } & {
686
698
  providerId?: string;
687
699
  }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
700
+ signUpOrInWithPhone: (loginId: string, URI?: string, args_2?: {
701
+ customClaims?: Record<string, any>;
702
+ templateId?: string;
703
+ templateOptions?: {
704
+ [x: string]: string;
705
+ };
706
+ tenantId?: string;
707
+ } & {
708
+ providerId?: string;
709
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
688
710
  signUp: (loginId: string, URI?: string, user?: {
689
711
  email?: string;
690
712
  name?: string;
@@ -702,6 +724,23 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
702
724
  } & {
703
725
  providerId?: string;
704
726
  }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
727
+ signUpWithPhone: (loginId: string, URI?: string, user?: {
728
+ email?: string;
729
+ name?: string;
730
+ givenName?: string;
731
+ middleName?: string;
732
+ familyName?: string;
733
+ phone?: string;
734
+ }, args_3?: {
735
+ customClaims?: Record<string, any>;
736
+ templateId?: string;
737
+ templateOptions?: {
738
+ [x: string]: string;
739
+ };
740
+ tenantId?: string;
741
+ } & {
742
+ providerId?: string;
743
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
705
744
  waitForSession: (pendingRef: string, config?: {
706
745
  pollingIntervalMs: number;
707
746
  timeoutMs: number;
@@ -717,6 +756,18 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
717
756
  providerId?: string;
718
757
  mfa?: boolean;
719
758
  }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
759
+ phone: {
760
+ sms: <T_5 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
761
+ addToLoginIDs?: T_5;
762
+ onMergeUseExisting?: T_5 extends true ? boolean : never;
763
+ templateOptions?: {
764
+ [x: string]: string;
765
+ };
766
+ templateId?: string;
767
+ providerId?: string;
768
+ mfa?: boolean;
769
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
770
+ };
720
771
  };
721
772
  };
722
773
  oauth: {
@@ -892,6 +943,15 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
892
943
  next: (executionId: string, stepId: string, interactionId: string, version?: number, componentsVersion?: string, input?: {
893
944
  [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 | (string | number | boolean | any)[])[])[])[])[])[])[])[])[])[])[];
894
945
  }, isCustomScreen?: any, options?: _descope_core_js_sdk.FlowNextOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
946
+ event: (executionId: string, events: {
947
+ id: string;
948
+ field: string;
949
+ rule: string;
950
+ message: string;
951
+ screenId: string;
952
+ screenName: string;
953
+ ts: number;
954
+ }[], keepalive?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
895
955
  };
896
956
  webauthn: {
897
957
  signUp: ((identifier: string, name: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
@@ -930,8 +990,8 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
930
990
  }>>;
931
991
  };
932
992
  helpers: {
933
- create: (options: string) => Promise<string>;
934
- get: (options: string) => Promise<string>;
993
+ create: (options: string, abort?: AbortController) => Promise<string>;
994
+ get: (options: string, abort?: AbortController) => Promise<string>;
935
995
  isSupported: typeof isSupported;
936
996
  conditional: (options: string, abort: AbortController) => Promise<string>;
937
997
  };
@@ -1394,6 +1454,9 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
1394
1454
  signIn: (loginId: string, URI?: string, args_2?: _descope_core_js_sdk.LoginOptions & {
1395
1455
  providerId?: string;
1396
1456
  }, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
1457
+ signInWithPhone: (loginId: string, URI?: string, args_2?: _descope_core_js_sdk.LoginOptions & {
1458
+ providerId?: string;
1459
+ }, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
1397
1460
  signUpOrIn: (loginId: string, URI?: string, args_2?: {
1398
1461
  customClaims?: Record<string, any>;
1399
1462
  templateId?: string;
@@ -1404,6 +1467,16 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
1404
1467
  } & {
1405
1468
  providerId?: string;
1406
1469
  }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
1470
+ signUpOrInWithPhone: (loginId: string, URI?: string, args_2?: {
1471
+ customClaims?: Record<string, any>;
1472
+ templateId?: string;
1473
+ templateOptions?: {
1474
+ [x: string]: string;
1475
+ };
1476
+ tenantId?: string;
1477
+ } & {
1478
+ providerId?: string;
1479
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
1407
1480
  signUp: (loginId: string, URI?: string, user?: {
1408
1481
  email?: string;
1409
1482
  name?: string;
@@ -1421,6 +1494,23 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
1421
1494
  } & {
1422
1495
  providerId?: string;
1423
1496
  }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
1497
+ signUpWithPhone: (loginId: string, URI?: string, user?: {
1498
+ email?: string;
1499
+ name?: string;
1500
+ givenName?: string;
1501
+ middleName?: string;
1502
+ familyName?: string;
1503
+ phone?: string;
1504
+ }, args_3?: {
1505
+ customClaims?: Record<string, any>;
1506
+ templateId?: string;
1507
+ templateOptions?: {
1508
+ [x: string]: string;
1509
+ };
1510
+ tenantId?: string;
1511
+ } & {
1512
+ providerId?: string;
1513
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
1424
1514
  waitForSession: (pendingRef: string, config?: {
1425
1515
  pollingIntervalMs: number;
1426
1516
  timeoutMs: number;
@@ -1436,6 +1526,18 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
1436
1526
  providerId?: string;
1437
1527
  mfa?: boolean;
1438
1528
  }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
1529
+ phone: {
1530
+ sms: <T_5 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
1531
+ addToLoginIDs?: T_5;
1532
+ onMergeUseExisting?: T_5 extends true ? boolean : never;
1533
+ templateOptions?: {
1534
+ [x: string]: string;
1535
+ };
1536
+ templateId?: string;
1537
+ providerId?: string;
1538
+ mfa?: boolean;
1539
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
1540
+ };
1439
1541
  };
1440
1542
  };
1441
1543
  oauth: {
@@ -1611,6 +1713,15 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
1611
1713
  next: (executionId: string, stepId: string, interactionId: string, version?: number, componentsVersion?: string, input?: {
1612
1714
  [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 | (string | number | boolean | any)[])[])[])[])[])[])[])[])[])[])[];
1613
1715
  }, isCustomScreen?: any, options?: _descope_core_js_sdk.FlowNextOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
1716
+ event: (executionId: string, events: {
1717
+ id: string;
1718
+ field: string;
1719
+ rule: string;
1720
+ message: string;
1721
+ screenId: string;
1722
+ screenName: string;
1723
+ ts: number;
1724
+ }[], keepalive?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
1614
1725
  };
1615
1726
  webauthn: {
1616
1727
  signUp: ((identifier: string, name: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
@@ -1649,8 +1760,8 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
1649
1760
  }>>;
1650
1761
  };
1651
1762
  helpers: {
1652
- create: (options: string) => Promise<string>;
1653
- get: (options: string) => Promise<string>;
1763
+ create: (options: string, abort?: AbortController) => Promise<string>;
1764
+ get: (options: string, abort?: AbortController) => Promise<string>;
1654
1765
  isSupported: typeof isSupported;
1655
1766
  conditional: (options: string, abort: AbortController) => Promise<string>;
1656
1767
  };
@@ -2113,6 +2224,9 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
2113
2224
  signIn: (loginId: string, URI?: string, args_2?: _descope_core_js_sdk.LoginOptions & {
2114
2225
  providerId?: string;
2115
2226
  }, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
2227
+ signInWithPhone: (loginId: string, URI?: string, args_2?: _descope_core_js_sdk.LoginOptions & {
2228
+ providerId?: string;
2229
+ }, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
2116
2230
  signUpOrIn: (loginId: string, URI?: string, args_2?: {
2117
2231
  customClaims?: Record<string, any>;
2118
2232
  templateId?: string;
@@ -2123,6 +2237,16 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
2123
2237
  } & {
2124
2238
  providerId?: string;
2125
2239
  }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
2240
+ signUpOrInWithPhone: (loginId: string, URI?: string, args_2?: {
2241
+ customClaims?: Record<string, any>;
2242
+ templateId?: string;
2243
+ templateOptions?: {
2244
+ [x: string]: string;
2245
+ };
2246
+ tenantId?: string;
2247
+ } & {
2248
+ providerId?: string;
2249
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
2126
2250
  signUp: (loginId: string, URI?: string, user?: {
2127
2251
  email?: string;
2128
2252
  name?: string;
@@ -2140,6 +2264,23 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
2140
2264
  } & {
2141
2265
  providerId?: string;
2142
2266
  }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
2267
+ signUpWithPhone: (loginId: string, URI?: string, user?: {
2268
+ email?: string;
2269
+ name?: string;
2270
+ givenName?: string;
2271
+ middleName?: string;
2272
+ familyName?: string;
2273
+ phone?: string;
2274
+ }, args_3?: {
2275
+ customClaims?: Record<string, any>;
2276
+ templateId?: string;
2277
+ templateOptions?: {
2278
+ [x: string]: string;
2279
+ };
2280
+ tenantId?: string;
2281
+ } & {
2282
+ providerId?: string;
2283
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
2143
2284
  waitForSession: (pendingRef: string, config?: {
2144
2285
  pollingIntervalMs: number;
2145
2286
  timeoutMs: number;
@@ -2155,6 +2296,18 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
2155
2296
  providerId?: string;
2156
2297
  mfa?: boolean;
2157
2298
  }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
2299
+ phone: {
2300
+ sms: <T_5 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
2301
+ addToLoginIDs?: T_5;
2302
+ onMergeUseExisting?: T_5 extends true ? boolean : never;
2303
+ templateOptions?: {
2304
+ [x: string]: string;
2305
+ };
2306
+ templateId?: string;
2307
+ providerId?: string;
2308
+ mfa?: boolean;
2309
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
2310
+ };
2158
2311
  };
2159
2312
  };
2160
2313
  oauth: {
@@ -2340,6 +2493,15 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
2340
2493
  next: (executionId: string, stepId: string, interactionId: string, version?: number, componentsVersion?: string, input?: {
2341
2494
  [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 | (string | number | boolean | any)[])[])[])[])[])[])[])[])[])[])[];
2342
2495
  }, isCustomScreen?: any, options?: _descope_core_js_sdk.FlowNextOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
2496
+ event: (executionId: string, events: {
2497
+ id: string;
2498
+ field: string;
2499
+ rule: string;
2500
+ message: string;
2501
+ screenId: string;
2502
+ screenName: string;
2503
+ ts: number;
2504
+ }[], keepalive?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
2343
2505
  };
2344
2506
  webauthn: {
2345
2507
  signUp: ((identifier: string, name: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
@@ -2378,8 +2540,8 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
2378
2540
  }>>;
2379
2541
  };
2380
2542
  helpers: {
2381
- create: (options: string) => Promise<string>;
2382
- get: (options: string) => Promise<string>;
2543
+ create: (options: string, abort?: AbortController) => Promise<string>;
2544
+ get: (options: string, abort?: AbortController) => Promise<string>;
2383
2545
  isSupported: typeof isSupported;
2384
2546
  conditional: (options: string, abort: AbortController) => Promise<string>;
2385
2547
  };
@@ -2842,6 +3004,9 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
2842
3004
  signIn: (loginId: string, URI?: string, args_2?: _descope_core_js_sdk.LoginOptions & {
2843
3005
  providerId?: string;
2844
3006
  }, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
3007
+ signInWithPhone: (loginId: string, URI?: string, args_2?: _descope_core_js_sdk.LoginOptions & {
3008
+ providerId?: string;
3009
+ }, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
2845
3010
  signUpOrIn: (loginId: string, URI?: string, args_2?: {
2846
3011
  customClaims?: Record<string, any>;
2847
3012
  templateId?: string;
@@ -2852,6 +3017,16 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
2852
3017
  } & {
2853
3018
  providerId?: string;
2854
3019
  }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
3020
+ signUpOrInWithPhone: (loginId: string, URI?: string, args_2?: {
3021
+ customClaims?: Record<string, any>;
3022
+ templateId?: string;
3023
+ templateOptions?: {
3024
+ [x: string]: string;
3025
+ };
3026
+ tenantId?: string;
3027
+ } & {
3028
+ providerId?: string;
3029
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
2855
3030
  signUp: (loginId: string, URI?: string, user?: {
2856
3031
  email?: string;
2857
3032
  name?: string;
@@ -2869,6 +3044,23 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
2869
3044
  } & {
2870
3045
  providerId?: string;
2871
3046
  }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
3047
+ signUpWithPhone: (loginId: string, URI?: string, user?: {
3048
+ email?: string;
3049
+ name?: string;
3050
+ givenName?: string;
3051
+ middleName?: string;
3052
+ familyName?: string;
3053
+ phone?: string;
3054
+ }, args_3?: {
3055
+ customClaims?: Record<string, any>;
3056
+ templateId?: string;
3057
+ templateOptions?: {
3058
+ [x: string]: string;
3059
+ };
3060
+ tenantId?: string;
3061
+ } & {
3062
+ providerId?: string;
3063
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
2872
3064
  waitForSession: (pendingRef: string, config?: {
2873
3065
  pollingIntervalMs: number;
2874
3066
  timeoutMs: number;
@@ -2884,6 +3076,18 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
2884
3076
  providerId?: string;
2885
3077
  mfa?: boolean;
2886
3078
  }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
3079
+ phone: {
3080
+ sms: <T_5 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
3081
+ addToLoginIDs?: T_5;
3082
+ onMergeUseExisting?: T_5 extends true ? boolean : never;
3083
+ templateOptions?: {
3084
+ [x: string]: string;
3085
+ };
3086
+ templateId?: string;
3087
+ providerId?: string;
3088
+ mfa?: boolean;
3089
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
3090
+ };
2887
3091
  };
2888
3092
  };
2889
3093
  oauth: {
@@ -3059,6 +3263,15 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
3059
3263
  next: (executionId: string, stepId: string, interactionId: string, version?: number, componentsVersion?: string, input?: {
3060
3264
  [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 | (string | number | boolean | any)[])[])[])[])[])[])[])[])[])[])[];
3061
3265
  }, isCustomScreen?: any, options?: _descope_core_js_sdk.FlowNextOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
3266
+ event: (executionId: string, events: {
3267
+ id: string;
3268
+ field: string;
3269
+ rule: string;
3270
+ message: string;
3271
+ screenId: string;
3272
+ screenName: string;
3273
+ ts: number;
3274
+ }[], keepalive?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
3062
3275
  };
3063
3276
  webauthn: {
3064
3277
  signUp: ((identifier: string, name: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
@@ -3097,8 +3310,8 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
3097
3310
  }>>;
3098
3311
  };
3099
3312
  helpers: {
3100
- create: (options: string) => Promise<string>;
3101
- get: (options: string) => Promise<string>;
3313
+ create: (options: string, abort?: AbortController) => Promise<string>;
3314
+ get: (options: string, abort?: AbortController) => Promise<string>;
3102
3315
  isSupported: typeof isSupported;
3103
3316
  conditional: (options: string, abort: AbortController) => Promise<string>;
3104
3317
  };
@@ -3561,6 +3774,9 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
3561
3774
  signIn: (loginId: string, URI?: string, args_2?: _descope_core_js_sdk.LoginOptions & {
3562
3775
  providerId?: string;
3563
3776
  }, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
3777
+ signInWithPhone: (loginId: string, URI?: string, args_2?: _descope_core_js_sdk.LoginOptions & {
3778
+ providerId?: string;
3779
+ }, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
3564
3780
  signUpOrIn: (loginId: string, URI?: string, args_2?: {
3565
3781
  customClaims?: Record<string, any>;
3566
3782
  templateId?: string;
@@ -3571,6 +3787,16 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
3571
3787
  } & {
3572
3788
  providerId?: string;
3573
3789
  }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
3790
+ signUpOrInWithPhone: (loginId: string, URI?: string, args_2?: {
3791
+ customClaims?: Record<string, any>;
3792
+ templateId?: string;
3793
+ templateOptions?: {
3794
+ [x: string]: string;
3795
+ };
3796
+ tenantId?: string;
3797
+ } & {
3798
+ providerId?: string;
3799
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
3574
3800
  signUp: (loginId: string, URI?: string, user?: {
3575
3801
  email?: string;
3576
3802
  name?: string;
@@ -3588,6 +3814,23 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
3588
3814
  } & {
3589
3815
  providerId?: string;
3590
3816
  }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
3817
+ signUpWithPhone: (loginId: string, URI?: string, user?: {
3818
+ email?: string;
3819
+ name?: string;
3820
+ givenName?: string;
3821
+ middleName?: string;
3822
+ familyName?: string;
3823
+ phone?: string;
3824
+ }, args_3?: {
3825
+ customClaims?: Record<string, any>;
3826
+ templateId?: string;
3827
+ templateOptions?: {
3828
+ [x: string]: string;
3829
+ };
3830
+ tenantId?: string;
3831
+ } & {
3832
+ providerId?: string;
3833
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
3591
3834
  waitForSession: (pendingRef: string, config?: {
3592
3835
  pollingIntervalMs: number;
3593
3836
  timeoutMs: number;
@@ -3603,6 +3846,18 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
3603
3846
  providerId?: string;
3604
3847
  mfa?: boolean;
3605
3848
  }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
3849
+ phone: {
3850
+ sms: <T_5 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
3851
+ addToLoginIDs?: T_5;
3852
+ onMergeUseExisting?: T_5 extends true ? boolean : never;
3853
+ templateOptions?: {
3854
+ [x: string]: string;
3855
+ };
3856
+ templateId?: string;
3857
+ providerId?: string;
3858
+ mfa?: boolean;
3859
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
3860
+ };
3606
3861
  };
3607
3862
  };
3608
3863
  oauth: {
@@ -3778,6 +4033,15 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
3778
4033
  next: (executionId: string, stepId: string, interactionId: string, version?: number, componentsVersion?: string, input?: {
3779
4034
  [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 | (string | number | boolean | any)[])[])[])[])[])[])[])[])[])[])[];
3780
4035
  }, isCustomScreen?: any, options?: _descope_core_js_sdk.FlowNextOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
4036
+ event: (executionId: string, events: {
4037
+ id: string;
4038
+ field: string;
4039
+ rule: string;
4040
+ message: string;
4041
+ screenId: string;
4042
+ screenName: string;
4043
+ ts: number;
4044
+ }[], keepalive?: boolean) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
3781
4045
  };
3782
4046
  webauthn: {
3783
4047
  signUp: ((identifier: string, name: string, passkeyOptions?: _descope_core_js_sdk.PasskeyOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
@@ -3816,8 +4080,8 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
3816
4080
  }>>;
3817
4081
  };
3818
4082
  helpers: {
3819
- create: (options: string) => Promise<string>;
3820
- get: (options: string) => Promise<string>;
4083
+ create: (options: string, abort?: AbortController) => Promise<string>;
4084
+ get: (options: string, abort?: AbortController) => Promise<string>;
3821
4085
  isSupported: typeof isSupported;
3822
4086
  conditional: (options: string, abort: AbortController) => Promise<string>;
3823
4087
  };
@@ -4280,6 +4544,9 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
4280
4544
  signIn: (loginId: string, URI?: string, args_2?: _descope_core_js_sdk.LoginOptions & {
4281
4545
  providerId?: string;
4282
4546
  }, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
4547
+ signInWithPhone: (loginId: string, URI?: string, args_2?: _descope_core_js_sdk.LoginOptions & {
4548
+ providerId?: string;
4549
+ }, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
4283
4550
  signUpOrIn: (loginId: string, URI?: string, args_2?: {
4284
4551
  customClaims?: Record<string, any>;
4285
4552
  templateId?: string;
@@ -4290,6 +4557,16 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
4290
4557
  } & {
4291
4558
  providerId?: string;
4292
4559
  }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
4560
+ signUpOrInWithPhone: (loginId: string, URI?: string, args_2?: {
4561
+ customClaims?: Record<string, any>;
4562
+ templateId?: string;
4563
+ templateOptions?: {
4564
+ [x: string]: string;
4565
+ };
4566
+ tenantId?: string;
4567
+ } & {
4568
+ providerId?: string;
4569
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
4293
4570
  signUp: (loginId: string, URI?: string, user?: {
4294
4571
  email?: string;
4295
4572
  name?: string;
@@ -4307,6 +4584,23 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
4307
4584
  } & {
4308
4585
  providerId?: string;
4309
4586
  }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
4587
+ signUpWithPhone: (loginId: string, URI?: string, user?: {
4588
+ email?: string;
4589
+ name?: string;
4590
+ givenName?: string;
4591
+ middleName?: string;
4592
+ familyName?: string;
4593
+ phone?: string;
4594
+ }, args_3?: {
4595
+ customClaims?: Record<string, any>;
4596
+ templateId?: string;
4597
+ templateOptions?: {
4598
+ [x: string]: string;
4599
+ };
4600
+ tenantId?: string;
4601
+ } & {
4602
+ providerId?: string;
4603
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
4310
4604
  waitForSession: (pendingRef: string, config?: {
4311
4605
  pollingIntervalMs: number;
4312
4606
  timeoutMs: number;
@@ -4322,6 +4616,18 @@ declare const decoratedCreateSdk: <A extends CookieConfig>({ persistTokens: isPe
4322
4616
  providerId?: string;
4323
4617
  mfa?: boolean;
4324
4618
  }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
4619
+ phone: {
4620
+ sms: <T_5 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
4621
+ addToLoginIDs?: T_5;
4622
+ onMergeUseExisting?: T_5 extends true ? boolean : never;
4623
+ templateOptions?: {
4624
+ [x: string]: string;
4625
+ };
4626
+ templateId?: string;
4627
+ providerId?: string;
4628
+ mfa?: boolean;
4629
+ }) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.PhoneEnchantedLinkResponse>>;
4630
+ };
4325
4631
  };
4326
4632
  };
4327
4633
  oauth: {