@descope/react-sdk 3.3.5 → 3.3.7

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.
@@ -1,2 +1,2 @@
1
- "use strict";const e="undefined"!=typeof window;exports.IS_BROWSER=e,exports.baseHeaders={"x-descope-sdk-name":"react","x-descope-sdk-version":"3.3.5"};
1
+ "use strict";const e="undefined"!=typeof window;exports.IS_BROWSER=e,exports.baseHeaders={"x-descope-sdk-name":"react","x-descope-sdk-version":"3.3.7"};
2
2
  //# sourceMappingURL=constants.js.map
@@ -1,2 +1,2 @@
1
- const e={"x-descope-sdk-name":"react","x-descope-sdk-version":"3.3.5"},d="undefined"!=typeof window;export{d as IS_BROWSER,e as baseHeaders};
1
+ const e={"x-descope-sdk-name":"react","x-descope-sdk-version":"3.3.7"},d="undefined"!=typeof window;export{d as IS_BROWSER,e as baseHeaders};
2
2
  //# sourceMappingURL=constants.js.map
package/dist/index.d.ts CHANGED
@@ -129,8 +129,8 @@ declare const createSdkWrapper: <P extends {
129
129
  }>>;
130
130
  };
131
131
  helpers: {
132
- create: (options: string) => Promise<string>;
133
- get: (options: string) => Promise<string>;
132
+ create: (options: string, abort?: AbortController) => Promise<string>;
133
+ get: (options: string, abort?: AbortController) => Promise<string>;
134
134
  isSupported: (requirePlatformAuthenticator?: boolean) => Promise<boolean>;
135
135
  conditional: (options: string, abort: AbortController) => Promise<string>;
136
136
  };
@@ -593,6 +593,9 @@ declare const createSdkWrapper: <P extends {
593
593
  signIn: (loginId: string, URI?: string, args_2?: _1.LoginOptions & {
594
594
  providerId?: string;
595
595
  }, token?: string) => Promise<_1.SdkResponse<_1.EnchantedLinkResponse>>;
596
+ signInWithPhone: (loginId: string, URI?: string, args_2?: _1.LoginOptions & {
597
+ providerId?: string;
598
+ }, token?: string) => Promise<_1.SdkResponse<_1.PhoneEnchantedLinkResponse>>;
596
599
  signUpOrIn: (loginId: string, URI?: string, args_2?: {
597
600
  customClaims?: Record<string, any>;
598
601
  templateId?: string;
@@ -603,6 +606,16 @@ declare const createSdkWrapper: <P extends {
603
606
  } & {
604
607
  providerId?: string;
605
608
  }) => Promise<_1.SdkResponse<_1.EnchantedLinkResponse>>;
609
+ signUpOrInWithPhone: (loginId: string, URI?: string, args_2?: {
610
+ customClaims?: Record<string, any>;
611
+ templateId?: string;
612
+ templateOptions?: {
613
+ [x: string]: string;
614
+ };
615
+ tenantId?: string;
616
+ } & {
617
+ providerId?: string;
618
+ }) => Promise<_1.SdkResponse<_1.PhoneEnchantedLinkResponse>>;
606
619
  signUp: (loginId: string, URI?: string, user?: {
607
620
  email?: string;
608
621
  name?: string;
@@ -620,6 +633,23 @@ declare const createSdkWrapper: <P extends {
620
633
  } & {
621
634
  providerId?: string;
622
635
  }) => Promise<_1.SdkResponse<_1.EnchantedLinkResponse>>;
636
+ signUpWithPhone: (loginId: string, URI?: string, user?: {
637
+ email?: string;
638
+ name?: string;
639
+ givenName?: string;
640
+ middleName?: string;
641
+ familyName?: string;
642
+ phone?: string;
643
+ }, args_3?: {
644
+ customClaims?: Record<string, any>;
645
+ templateId?: string;
646
+ templateOptions?: {
647
+ [x: string]: string;
648
+ };
649
+ tenantId?: string;
650
+ } & {
651
+ providerId?: string;
652
+ }) => Promise<_1.SdkResponse<_1.PhoneEnchantedLinkResponse>>;
623
653
  waitForSession: (pendingRef: string, config?: {
624
654
  pollingIntervalMs: number;
625
655
  timeoutMs: number;
@@ -635,6 +665,18 @@ declare const createSdkWrapper: <P extends {
635
665
  providerId?: string;
636
666
  mfa?: boolean;
637
667
  }) => Promise<_1.SdkResponse<_1.EnchantedLinkResponse>>;
668
+ phone: {
669
+ sms: <T_5 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
670
+ addToLoginIDs?: T_5;
671
+ onMergeUseExisting?: T_5 extends true ? boolean : never;
672
+ templateOptions?: {
673
+ [x: string]: string;
674
+ };
675
+ templateId?: string;
676
+ providerId?: string;
677
+ mfa?: boolean;
678
+ }) => Promise<_1.SdkResponse<_1.PhoneEnchantedLinkResponse>>;
679
+ };
638
680
  };
639
681
  };
640
682
  oauth: {
@@ -857,8 +899,8 @@ declare const createSdkWrapper: <P extends {
857
899
  }>>;
858
900
  };
859
901
  helpers: {
860
- create: (options: string) => Promise<string>;
861
- get: (options: string) => Promise<string>;
902
+ create: (options: string, abort?: AbortController) => Promise<string>;
903
+ get: (options: string, abort?: AbortController) => Promise<string>;
862
904
  isSupported: (requirePlatformAuthenticator?: boolean) => Promise<boolean>;
863
905
  conditional: (options: string, abort: AbortController) => Promise<string>;
864
906
  };
@@ -1029,9 +1071,9 @@ declare const createSdkWrapper: <P extends {
1029
1071
  }>>;
1030
1072
  };
1031
1073
  update: {
1032
- email: <T_5 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
1033
- addToLoginIDs?: T_5;
1034
- onMergeUseExisting?: T_5 extends true ? boolean : never;
1074
+ email: <T_6 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
1075
+ addToLoginIDs?: T_6;
1076
+ onMergeUseExisting?: T_6 extends true ? boolean : never;
1035
1077
  templateOptions?: {
1036
1078
  [x: string]: string;
1037
1079
  };
@@ -1321,6 +1363,9 @@ declare const createSdkWrapper: <P extends {
1321
1363
  signIn: (loginId: string, URI?: string, args_2?: _1.LoginOptions & {
1322
1364
  providerId?: string;
1323
1365
  }, token?: string) => Promise<_1.SdkResponse<_1.EnchantedLinkResponse>>;
1366
+ signInWithPhone: (loginId: string, URI?: string, args_2?: _1.LoginOptions & {
1367
+ providerId?: string;
1368
+ }, token?: string) => Promise<_1.SdkResponse<_1.PhoneEnchantedLinkResponse>>;
1324
1369
  signUpOrIn: (loginId: string, URI?: string, args_2?: {
1325
1370
  customClaims?: Record<string, any>;
1326
1371
  templateId?: string;
@@ -1331,6 +1376,16 @@ declare const createSdkWrapper: <P extends {
1331
1376
  } & {
1332
1377
  providerId?: string;
1333
1378
  }) => Promise<_1.SdkResponse<_1.EnchantedLinkResponse>>;
1379
+ signUpOrInWithPhone: (loginId: string, URI?: string, args_2?: {
1380
+ customClaims?: Record<string, any>;
1381
+ templateId?: string;
1382
+ templateOptions?: {
1383
+ [x: string]: string;
1384
+ };
1385
+ tenantId?: string;
1386
+ } & {
1387
+ providerId?: string;
1388
+ }) => Promise<_1.SdkResponse<_1.PhoneEnchantedLinkResponse>>;
1334
1389
  signUp: (loginId: string, URI?: string, user?: {
1335
1390
  email?: string;
1336
1391
  name?: string;
@@ -1348,6 +1403,23 @@ declare const createSdkWrapper: <P extends {
1348
1403
  } & {
1349
1404
  providerId?: string;
1350
1405
  }) => Promise<_1.SdkResponse<_1.EnchantedLinkResponse>>;
1406
+ signUpWithPhone: (loginId: string, URI?: string, user?: {
1407
+ email?: string;
1408
+ name?: string;
1409
+ givenName?: string;
1410
+ middleName?: string;
1411
+ familyName?: string;
1412
+ phone?: string;
1413
+ }, args_3?: {
1414
+ customClaims?: Record<string, any>;
1415
+ templateId?: string;
1416
+ templateOptions?: {
1417
+ [x: string]: string;
1418
+ };
1419
+ tenantId?: string;
1420
+ } & {
1421
+ providerId?: string;
1422
+ }) => Promise<_1.SdkResponse<_1.PhoneEnchantedLinkResponse>>;
1351
1423
  waitForSession: (pendingRef: string, config?: {
1352
1424
  pollingIntervalMs: number;
1353
1425
  timeoutMs: number;
@@ -1363,6 +1435,18 @@ declare const createSdkWrapper: <P extends {
1363
1435
  providerId?: string;
1364
1436
  mfa?: boolean;
1365
1437
  }) => Promise<_1.SdkResponse<_1.EnchantedLinkResponse>>;
1438
+ phone: {
1439
+ sms: <T_5_1 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
1440
+ addToLoginIDs?: T_5_1;
1441
+ onMergeUseExisting?: T_5_1 extends true ? boolean : never;
1442
+ templateOptions?: {
1443
+ [x: string]: string;
1444
+ };
1445
+ templateId?: string;
1446
+ providerId?: string;
1447
+ mfa?: boolean;
1448
+ }) => Promise<_1.SdkResponse<_1.PhoneEnchantedLinkResponse>>;
1449
+ };
1366
1450
  };
1367
1451
  };
1368
1452
  oauth: {
@@ -1585,8 +1669,8 @@ declare const createSdkWrapper: <P extends {
1585
1669
  }>>;
1586
1670
  };
1587
1671
  helpers: {
1588
- create: (options: string) => Promise<string>;
1589
- get: (options: string) => Promise<string>;
1672
+ create: (options: string, abort?: AbortController) => Promise<string>;
1673
+ get: (options: string, abort?: AbortController) => Promise<string>;
1590
1674
  isSupported: (requirePlatformAuthenticator?: boolean) => Promise<boolean>;
1591
1675
  conditional: (options: string, abort: AbortController) => Promise<string>;
1592
1676
  };
@@ -1757,9 +1841,9 @@ declare const createSdkWrapper: <P extends {
1757
1841
  }>>;
1758
1842
  };
1759
1843
  update: {
1760
- email: <T_6 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
1761
- addToLoginIDs?: T_6;
1762
- onMergeUseExisting?: T_6 extends true ? boolean : never;
1844
+ email: <T_7 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
1845
+ addToLoginIDs?: T_7;
1846
+ onMergeUseExisting?: T_7 extends true ? boolean : never;
1763
1847
  templateOptions?: {
1764
1848
  [x: string]: string;
1765
1849
  };
@@ -2049,6 +2133,9 @@ declare const createSdkWrapper: <P extends {
2049
2133
  signIn: (loginId: string, URI?: string, args_2?: _1.LoginOptions & {
2050
2134
  providerId?: string;
2051
2135
  }, token?: string) => Promise<_1.SdkResponse<_1.EnchantedLinkResponse>>;
2136
+ signInWithPhone: (loginId: string, URI?: string, args_2?: _1.LoginOptions & {
2137
+ providerId?: string;
2138
+ }, token?: string) => Promise<_1.SdkResponse<_1.PhoneEnchantedLinkResponse>>;
2052
2139
  signUpOrIn: (loginId: string, URI?: string, args_2?: {
2053
2140
  customClaims?: Record<string, any>;
2054
2141
  templateId?: string;
@@ -2059,6 +2146,16 @@ declare const createSdkWrapper: <P extends {
2059
2146
  } & {
2060
2147
  providerId?: string;
2061
2148
  }) => Promise<_1.SdkResponse<_1.EnchantedLinkResponse>>;
2149
+ signUpOrInWithPhone: (loginId: string, URI?: string, args_2?: {
2150
+ customClaims?: Record<string, any>;
2151
+ templateId?: string;
2152
+ templateOptions?: {
2153
+ [x: string]: string;
2154
+ };
2155
+ tenantId?: string;
2156
+ } & {
2157
+ providerId?: string;
2158
+ }) => Promise<_1.SdkResponse<_1.PhoneEnchantedLinkResponse>>;
2062
2159
  signUp: (loginId: string, URI?: string, user?: {
2063
2160
  email?: string;
2064
2161
  name?: string;
@@ -2076,6 +2173,23 @@ declare const createSdkWrapper: <P extends {
2076
2173
  } & {
2077
2174
  providerId?: string;
2078
2175
  }) => Promise<_1.SdkResponse<_1.EnchantedLinkResponse>>;
2176
+ signUpWithPhone: (loginId: string, URI?: string, user?: {
2177
+ email?: string;
2178
+ name?: string;
2179
+ givenName?: string;
2180
+ middleName?: string;
2181
+ familyName?: string;
2182
+ phone?: string;
2183
+ }, args_3?: {
2184
+ customClaims?: Record<string, any>;
2185
+ templateId?: string;
2186
+ templateOptions?: {
2187
+ [x: string]: string;
2188
+ };
2189
+ tenantId?: string;
2190
+ } & {
2191
+ providerId?: string;
2192
+ }) => Promise<_1.SdkResponse<_1.PhoneEnchantedLinkResponse>>;
2079
2193
  waitForSession: (pendingRef: string, config?: {
2080
2194
  pollingIntervalMs: number;
2081
2195
  timeoutMs: number;
@@ -2091,6 +2205,18 @@ declare const createSdkWrapper: <P extends {
2091
2205
  providerId?: string;
2092
2206
  mfa?: boolean;
2093
2207
  }) => Promise<_1.SdkResponse<_1.EnchantedLinkResponse>>;
2208
+ phone: {
2209
+ sms: <T_5_2 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
2210
+ addToLoginIDs?: T_5_2;
2211
+ onMergeUseExisting?: T_5_2 extends true ? boolean : never;
2212
+ templateOptions?: {
2213
+ [x: string]: string;
2214
+ };
2215
+ templateId?: string;
2216
+ providerId?: string;
2217
+ mfa?: boolean;
2218
+ }) => Promise<_1.SdkResponse<_1.PhoneEnchantedLinkResponse>>;
2219
+ };
2094
2220
  };
2095
2221
  };
2096
2222
  oauth: {