@descope/react-sdk 2.3.0 → 2.3.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/README.md +3 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/dts/src/sdk.d.ts +138 -1965
- package/dist/dts/src/types.d.ts +1 -0
- package/dist/index.d.ts +1 -609
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +10 -10
package/dist/dts/src/types.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -619,7 +619,6 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
619
619
|
selectTenant: (tenantId: string, token?: string) => Promise<_1.SdkResponse<_1.JWTResponse>>;
|
|
620
620
|
logout: (token?: string) => Promise<_1.SdkResponse<never>>;
|
|
621
621
|
logoutAll: (token?: string) => Promise<_1.SdkResponse<never>>;
|
|
622
|
-
logoutPrevious: (token?: string) => Promise<_1.SdkResponse<never>>;
|
|
623
622
|
me: (token?: string) => Promise<_1.SdkResponse<_1.UserResponse>>;
|
|
624
623
|
myTenants: (tenants: true | string[], token?: string) => Promise<_1.SdkResponse<{
|
|
625
624
|
tenants: {
|
|
@@ -1226,614 +1225,6 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
1226
1225
|
selectTenant: (tenantId: string, token?: string) => Promise<_1.SdkResponse<_1.JWTResponse>>;
|
|
1227
1226
|
logout: (token?: string) => Promise<_1.SdkResponse<never>>;
|
|
1228
1227
|
logoutAll: (token?: string) => Promise<_1.SdkResponse<never>>;
|
|
1229
|
-
logoutPrevious: (token?: string) => Promise<_1.SdkResponse<never>>;
|
|
1230
|
-
me: (token?: string) => Promise<_1.SdkResponse<_1.UserResponse>>;
|
|
1231
|
-
myTenants: (tenants: true | string[], token?: string) => Promise<_1.SdkResponse<{
|
|
1232
|
-
tenants: {
|
|
1233
|
-
id: string;
|
|
1234
|
-
name: string;
|
|
1235
|
-
customAttributes?: Record<string, any>;
|
|
1236
|
-
}[];
|
|
1237
|
-
}>>;
|
|
1238
|
-
history: (token?: string) => Promise<_1.SdkResponse<_1.UserHistoryResponse>>;
|
|
1239
|
-
isJwtExpired: (token: string) => boolean;
|
|
1240
|
-
getTenants: (token: string) => string[];
|
|
1241
|
-
getJwtPermissions: (token: string, tenant?: string) => string[];
|
|
1242
|
-
getJwtRoles: (token: string, tenant?: string) => string[];
|
|
1243
|
-
httpClient: {
|
|
1244
|
-
get: (path: string, config?: {
|
|
1245
|
-
headers?: HeadersInit;
|
|
1246
|
-
queryParams?: {
|
|
1247
|
-
[key: string]: string;
|
|
1248
|
-
};
|
|
1249
|
-
token?: string;
|
|
1250
|
-
}) => Promise<Response>;
|
|
1251
|
-
post: (path: string, body?: any, config?: {
|
|
1252
|
-
headers?: HeadersInit;
|
|
1253
|
-
queryParams?: {
|
|
1254
|
-
[key: string]: string;
|
|
1255
|
-
};
|
|
1256
|
-
token?: string;
|
|
1257
|
-
}) => Promise<Response>;
|
|
1258
|
-
patch: (path: string, body?: any, config?: {
|
|
1259
|
-
headers?: HeadersInit;
|
|
1260
|
-
queryParams?: {
|
|
1261
|
-
[key: string]: string;
|
|
1262
|
-
};
|
|
1263
|
-
token?: string;
|
|
1264
|
-
}) => Promise<Response>;
|
|
1265
|
-
put: (path: string, body?: any, config?: {
|
|
1266
|
-
headers?: HeadersInit;
|
|
1267
|
-
queryParams?: {
|
|
1268
|
-
[key: string]: string;
|
|
1269
|
-
};
|
|
1270
|
-
token?: string;
|
|
1271
|
-
}) => Promise<Response>;
|
|
1272
|
-
delete: (path: string, config?: {
|
|
1273
|
-
headers?: HeadersInit;
|
|
1274
|
-
queryParams?: {
|
|
1275
|
-
[key: string]: string;
|
|
1276
|
-
};
|
|
1277
|
-
token?: string;
|
|
1278
|
-
}) => Promise<Response>;
|
|
1279
|
-
hooks?: {
|
|
1280
|
-
beforeRequest?: (config: _1.RequestConfig) => _1.RequestConfig;
|
|
1281
|
-
afterRequest?: (req: _1.RequestConfig, res: Response) => void | Promise<void>;
|
|
1282
|
-
transformResponse?: (mutableResponse: _1.ExtendedResponse) => Promise<_1.ExtendedResponse>;
|
|
1283
|
-
};
|
|
1284
|
-
buildUrl: (path: string, queryParams?: {
|
|
1285
|
-
[key: string]: string;
|
|
1286
|
-
}) => string;
|
|
1287
|
-
};
|
|
1288
|
-
} | {
|
|
1289
|
-
refresh: (token?: string) => Promise<_1.SdkResponse<_1.JWTResponse>>;
|
|
1290
|
-
flow: {
|
|
1291
|
-
start: (flowId: string, options?: Pick<{
|
|
1292
|
-
redirectUrl?: string;
|
|
1293
|
-
location?: string;
|
|
1294
|
-
tenant?: string;
|
|
1295
|
-
deviceInfo?: {
|
|
1296
|
-
webAuthnSupport?: boolean;
|
|
1297
|
-
};
|
|
1298
|
-
lastAuth?: {
|
|
1299
|
-
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
1300
|
-
oauthProvider?: string;
|
|
1301
|
-
name?: string;
|
|
1302
|
-
loginId?: string;
|
|
1303
|
-
};
|
|
1304
|
-
redirectAuth?: {
|
|
1305
|
-
callbackUrl: string;
|
|
1306
|
-
codeChallenge: string;
|
|
1307
|
-
};
|
|
1308
|
-
oidcIdpStateId?: string;
|
|
1309
|
-
preview?: boolean;
|
|
1310
|
-
samlIdpStateId?: string;
|
|
1311
|
-
samlIdpUsername?: string;
|
|
1312
|
-
ssoAppId?: string;
|
|
1313
|
-
oidcLoginHint?: string;
|
|
1314
|
-
abTestingKey?: number;
|
|
1315
|
-
startOptionsVersion?: number;
|
|
1316
|
-
client?: Record<string, any>;
|
|
1317
|
-
locale?: string;
|
|
1318
|
-
oidcPrompt?: string;
|
|
1319
|
-
oidcErrorRedirectUri?: string;
|
|
1320
|
-
nativeOptions?: {
|
|
1321
|
-
platform: "ios" | "android";
|
|
1322
|
-
oauthProvider?: string;
|
|
1323
|
-
oauthRedirect?: string;
|
|
1324
|
-
};
|
|
1325
|
-
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "nativeOptions"> & {
|
|
1326
|
-
lastAuth?: Omit<{
|
|
1327
|
-
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
1328
|
-
oauthProvider?: string;
|
|
1329
|
-
name?: string;
|
|
1330
|
-
loginId?: string;
|
|
1331
|
-
}, "loginId" | "name">;
|
|
1332
|
-
}, conditionInteractionId?: string, interactionId?: string, componentsVersion?: string, flowVersions?: Record<string, number>, input?: {
|
|
1333
|
-
[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[])[])[])[])[])[])[])[])[])[])[];
|
|
1334
|
-
}) => Promise<_1.SdkResponse<_1.FlowResponse>>;
|
|
1335
|
-
next: (executionId: string, stepId: string, interactionId: string, version?: number, componentsVersion?: string, input?: {
|
|
1336
|
-
[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[])[])[])[])[])[])[])[])[])[])[];
|
|
1337
|
-
}) => Promise<_1.SdkResponse<_1.FlowResponse>>;
|
|
1338
|
-
};
|
|
1339
|
-
webauthn: {
|
|
1340
|
-
signUp: ((identifier: string, name: string, passkeyOptions?: _1.PasskeyOptions) => Promise<_1.SdkResponse<_1.JWTResponse>>) & {
|
|
1341
|
-
start: (loginId: string, origin: string, name: string, passkeyOptions?: _1.PasskeyOptions) => Promise<_1.SdkResponse<{
|
|
1342
|
-
transactionId: string;
|
|
1343
|
-
options: string;
|
|
1344
|
-
create: boolean;
|
|
1345
|
-
}>>;
|
|
1346
|
-
finish: (transactionId: string, response: string) => Promise<_1.SdkResponse<_1.JWTResponse>>;
|
|
1347
|
-
};
|
|
1348
|
-
signIn: ((identifier: string, passkeyOptions?: _1.PasskeyOptions) => Promise<_1.SdkResponse<_1.JWTResponse>>) & {
|
|
1349
|
-
start: (loginId: string, origin: string, loginOptions?: _1.LoginOptions, token?: string, passkeyOptions?: _1.PasskeyOptions) => Promise<_1.SdkResponse<{
|
|
1350
|
-
transactionId: string;
|
|
1351
|
-
options: string;
|
|
1352
|
-
create: boolean;
|
|
1353
|
-
}>>;
|
|
1354
|
-
finish: (transactionId: string, response: string) => Promise<_1.SdkResponse<_1.JWTResponse>>;
|
|
1355
|
-
};
|
|
1356
|
-
signUpOrIn: ((identifier: string, passkeyOptions?: _1.PasskeyOptions) => Promise<_1.SdkResponse<_1.JWTResponse>>) & {
|
|
1357
|
-
start: (loginId: string, origin: string, passkeyOptions?: _1.PasskeyOptions) => Promise<_1.SdkResponse<{
|
|
1358
|
-
transactionId: string;
|
|
1359
|
-
options: string;
|
|
1360
|
-
create: boolean;
|
|
1361
|
-
}>>;
|
|
1362
|
-
};
|
|
1363
|
-
update: ((identifier: string, token: string, passkeyOptions?: _1.PasskeyOptions) => Promise<_1.SdkResponse<_1.ResponseData>>) & {
|
|
1364
|
-
start: (loginId: string, origin: string, token: string, passkeyOptions?: _1.PasskeyOptions) => Promise<_1.SdkResponse<{
|
|
1365
|
-
transactionId: string;
|
|
1366
|
-
options: string;
|
|
1367
|
-
create: boolean;
|
|
1368
|
-
}>>;
|
|
1369
|
-
finish: (transactionId: string, response: string) => Promise<_1.SdkResponse<_1.ResponseData>>;
|
|
1370
|
-
};
|
|
1371
|
-
helpers: {
|
|
1372
|
-
create: (options: string) => Promise<string>;
|
|
1373
|
-
get: (options: string) => Promise<string>;
|
|
1374
|
-
isSupported: (requirePlatformAuthenticator?: boolean) => Promise<boolean>;
|
|
1375
|
-
conditional: (options: string, abort: AbortController) => Promise<string>;
|
|
1376
|
-
};
|
|
1377
|
-
};
|
|
1378
|
-
fedcm: {
|
|
1379
|
-
oneTap(provider?: string, oneTapConfig?: _descope_web_js_sdk.OneTapConfig, loginOptions?: _1.LoginOptions, onSkip?: () => void): Promise<unknown>;
|
|
1380
|
-
launch(context?: "signin" | "signup" | "use" | "continue"): Promise<_1.SdkResponse<_1.JWTResponse>>;
|
|
1381
|
-
isSupported(): boolean;
|
|
1382
|
-
};
|
|
1383
|
-
accessKey: {
|
|
1384
|
-
exchange: (accessKey: string, loginOptions?: _1.AccessKeyLoginOptions) => Promise<_1.SdkResponse<_1.ExchangeAccessKeyResponse>>;
|
|
1385
|
-
};
|
|
1386
|
-
otp: {
|
|
1387
|
-
verify: {
|
|
1388
|
-
sms: (loginId: string, code: string) => Promise<_1.SdkResponse<_1.JWTResponse>>;
|
|
1389
|
-
voice: (loginId: string, code: string) => Promise<_1.SdkResponse<_1.JWTResponse>>;
|
|
1390
|
-
whatsapp: (loginId: string, code: string) => Promise<_1.SdkResponse<_1.JWTResponse>>;
|
|
1391
|
-
email: (loginId: string, code: string) => Promise<_1.SdkResponse<_1.JWTResponse>>;
|
|
1392
|
-
};
|
|
1393
|
-
signIn: {
|
|
1394
|
-
sms: (loginId: string, loginOptions?: _1.LoginOptions, token?: string) => Promise<_1.SdkResponse<{
|
|
1395
|
-
maskedPhone: string;
|
|
1396
|
-
}>>;
|
|
1397
|
-
voice: (loginId: string, loginOptions?: _1.LoginOptions, token?: string) => Promise<_1.SdkResponse<{
|
|
1398
|
-
maskedPhone: string;
|
|
1399
|
-
}>>;
|
|
1400
|
-
whatsapp: (loginId: string, loginOptions?: _1.LoginOptions, token?: string) => Promise<_1.SdkResponse<{
|
|
1401
|
-
maskedPhone: string;
|
|
1402
|
-
}>>;
|
|
1403
|
-
email: (loginId: string, loginOptions?: _1.LoginOptions, token?: string) => Promise<_1.SdkResponse<{
|
|
1404
|
-
maskedEmail: string;
|
|
1405
|
-
}>>;
|
|
1406
|
-
};
|
|
1407
|
-
signUp: {
|
|
1408
|
-
sms: (loginId: string, user?: {
|
|
1409
|
-
email?: string;
|
|
1410
|
-
name?: string;
|
|
1411
|
-
givenName?: string;
|
|
1412
|
-
middleName?: string;
|
|
1413
|
-
familyName?: string;
|
|
1414
|
-
phone?: string;
|
|
1415
|
-
}, signUpOptions?: {
|
|
1416
|
-
customClaims?: Record<string, any>;
|
|
1417
|
-
templateId?: string;
|
|
1418
|
-
templateOptions?: {
|
|
1419
|
-
[x: string]: string;
|
|
1420
|
-
};
|
|
1421
|
-
}) => Promise<_1.SdkResponse<{
|
|
1422
|
-
maskedPhone: string;
|
|
1423
|
-
}>>;
|
|
1424
|
-
voice: (loginId: string, user?: {
|
|
1425
|
-
email?: string;
|
|
1426
|
-
name?: string;
|
|
1427
|
-
givenName?: string;
|
|
1428
|
-
middleName?: string;
|
|
1429
|
-
familyName?: string;
|
|
1430
|
-
phone?: string;
|
|
1431
|
-
}, signUpOptions?: {
|
|
1432
|
-
customClaims?: Record<string, any>;
|
|
1433
|
-
templateId?: string;
|
|
1434
|
-
templateOptions?: {
|
|
1435
|
-
[x: string]: string;
|
|
1436
|
-
};
|
|
1437
|
-
}) => Promise<_1.SdkResponse<{
|
|
1438
|
-
maskedPhone: string;
|
|
1439
|
-
}>>;
|
|
1440
|
-
whatsapp: (loginId: string, user?: {
|
|
1441
|
-
email?: string;
|
|
1442
|
-
name?: string;
|
|
1443
|
-
givenName?: string;
|
|
1444
|
-
middleName?: string;
|
|
1445
|
-
familyName?: string;
|
|
1446
|
-
phone?: string;
|
|
1447
|
-
}, signUpOptions?: {
|
|
1448
|
-
customClaims?: Record<string, any>;
|
|
1449
|
-
templateId?: string;
|
|
1450
|
-
templateOptions?: {
|
|
1451
|
-
[x: string]: string;
|
|
1452
|
-
};
|
|
1453
|
-
}) => Promise<_1.SdkResponse<{
|
|
1454
|
-
maskedPhone: string;
|
|
1455
|
-
}>>;
|
|
1456
|
-
email: (loginId: string, user?: {
|
|
1457
|
-
email?: string;
|
|
1458
|
-
name?: string;
|
|
1459
|
-
givenName?: string;
|
|
1460
|
-
middleName?: string;
|
|
1461
|
-
familyName?: string;
|
|
1462
|
-
phone?: string;
|
|
1463
|
-
}, signUpOptions?: {
|
|
1464
|
-
customClaims?: Record<string, any>;
|
|
1465
|
-
templateId?: string;
|
|
1466
|
-
templateOptions?: {
|
|
1467
|
-
[x: string]: string;
|
|
1468
|
-
};
|
|
1469
|
-
}) => Promise<_1.SdkResponse<{
|
|
1470
|
-
maskedEmail: string;
|
|
1471
|
-
}>>;
|
|
1472
|
-
};
|
|
1473
|
-
signUpOrIn: {
|
|
1474
|
-
sms: (loginId: string, loginOptions?: _1.LoginOptions, token?: string) => Promise<_1.SdkResponse<{
|
|
1475
|
-
maskedPhone: string;
|
|
1476
|
-
}>>;
|
|
1477
|
-
voice: (loginId: string, loginOptions?: _1.LoginOptions, token?: string) => Promise<_1.SdkResponse<{
|
|
1478
|
-
maskedPhone: string;
|
|
1479
|
-
}>>;
|
|
1480
|
-
whatsapp: (loginId: string, loginOptions?: _1.LoginOptions, token?: string) => Promise<_1.SdkResponse<{
|
|
1481
|
-
maskedPhone: string;
|
|
1482
|
-
}>>;
|
|
1483
|
-
email: (loginId: string, loginOptions?: _1.LoginOptions, token?: string) => Promise<_1.SdkResponse<{
|
|
1484
|
-
maskedEmail: string;
|
|
1485
|
-
}>>;
|
|
1486
|
-
};
|
|
1487
|
-
update: {
|
|
1488
|
-
email: <T_6 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
|
|
1489
|
-
addToLoginIDs?: T_6;
|
|
1490
|
-
onMergeUseExisting?: T_6 extends true ? boolean : never;
|
|
1491
|
-
templateOptions?: {
|
|
1492
|
-
[x: string]: string;
|
|
1493
|
-
};
|
|
1494
|
-
}) => Promise<_1.SdkResponse<{
|
|
1495
|
-
maskedEmail: string;
|
|
1496
|
-
}>>;
|
|
1497
|
-
phone: {
|
|
1498
|
-
sms: <T_1_6 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
1499
|
-
addToLoginIDs?: T_1_6;
|
|
1500
|
-
onMergeUseExisting?: T_1_6 extends true ? boolean : never;
|
|
1501
|
-
templateOptions?: {
|
|
1502
|
-
[x: string]: string;
|
|
1503
|
-
};
|
|
1504
|
-
}) => Promise<_1.SdkResponse<{
|
|
1505
|
-
maskedPhone: string;
|
|
1506
|
-
}>>;
|
|
1507
|
-
voice: <T_1_7 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
1508
|
-
addToLoginIDs?: T_1_7;
|
|
1509
|
-
onMergeUseExisting?: T_1_7 extends true ? boolean : never;
|
|
1510
|
-
templateOptions?: {
|
|
1511
|
-
[x: string]: string;
|
|
1512
|
-
};
|
|
1513
|
-
}) => Promise<_1.SdkResponse<{
|
|
1514
|
-
maskedPhone: string;
|
|
1515
|
-
}>>;
|
|
1516
|
-
whatsapp: <T_1_8 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
1517
|
-
addToLoginIDs?: T_1_8;
|
|
1518
|
-
onMergeUseExisting?: T_1_8 extends true ? boolean : never;
|
|
1519
|
-
templateOptions?: {
|
|
1520
|
-
[x: string]: string;
|
|
1521
|
-
};
|
|
1522
|
-
}) => Promise<_1.SdkResponse<{
|
|
1523
|
-
maskedPhone: string;
|
|
1524
|
-
}>>;
|
|
1525
|
-
};
|
|
1526
|
-
};
|
|
1527
|
-
};
|
|
1528
|
-
magicLink: {
|
|
1529
|
-
verify: (token: string) => Promise<_1.SdkResponse<_1.JWTResponse>>;
|
|
1530
|
-
signIn: {
|
|
1531
|
-
sms: (loginId: string, URI: string, loginOptions?: _1.LoginOptions, token?: string) => Promise<_1.SdkResponse<{
|
|
1532
|
-
maskedPhone: string;
|
|
1533
|
-
}>>;
|
|
1534
|
-
voice: (loginId: string, URI: string, loginOptions?: _1.LoginOptions, token?: string) => Promise<_1.SdkResponse<{
|
|
1535
|
-
maskedPhone: string;
|
|
1536
|
-
}>>;
|
|
1537
|
-
whatsapp: (loginId: string, URI: string, loginOptions?: _1.LoginOptions, token?: string) => Promise<_1.SdkResponse<{
|
|
1538
|
-
maskedPhone: string;
|
|
1539
|
-
}>>;
|
|
1540
|
-
email: (loginId: string, URI: string, loginOptions?: _1.LoginOptions, token?: string) => Promise<_1.SdkResponse<{
|
|
1541
|
-
maskedEmail: string;
|
|
1542
|
-
}>>;
|
|
1543
|
-
};
|
|
1544
|
-
signUp: {
|
|
1545
|
-
sms: (loginId: string, URI: string, user?: {
|
|
1546
|
-
email?: string;
|
|
1547
|
-
name?: string;
|
|
1548
|
-
givenName?: string;
|
|
1549
|
-
middleName?: string;
|
|
1550
|
-
familyName?: string;
|
|
1551
|
-
phone?: string;
|
|
1552
|
-
}, signUpOptions?: {
|
|
1553
|
-
customClaims?: Record<string, any>;
|
|
1554
|
-
templateId?: string;
|
|
1555
|
-
templateOptions?: {
|
|
1556
|
-
[x: string]: string;
|
|
1557
|
-
};
|
|
1558
|
-
}) => Promise<_1.SdkResponse<{
|
|
1559
|
-
maskedPhone: string;
|
|
1560
|
-
}>>;
|
|
1561
|
-
voice: (loginId: string, URI: string, user?: {
|
|
1562
|
-
email?: string;
|
|
1563
|
-
name?: string;
|
|
1564
|
-
givenName?: string;
|
|
1565
|
-
middleName?: string;
|
|
1566
|
-
familyName?: string;
|
|
1567
|
-
phone?: string;
|
|
1568
|
-
}, signUpOptions?: {
|
|
1569
|
-
customClaims?: Record<string, any>;
|
|
1570
|
-
templateId?: string;
|
|
1571
|
-
templateOptions?: {
|
|
1572
|
-
[x: string]: string;
|
|
1573
|
-
};
|
|
1574
|
-
}) => Promise<_1.SdkResponse<{
|
|
1575
|
-
maskedPhone: string;
|
|
1576
|
-
}>>;
|
|
1577
|
-
whatsapp: (loginId: string, URI: string, user?: {
|
|
1578
|
-
email?: string;
|
|
1579
|
-
name?: string;
|
|
1580
|
-
givenName?: string;
|
|
1581
|
-
middleName?: string;
|
|
1582
|
-
familyName?: string;
|
|
1583
|
-
phone?: string;
|
|
1584
|
-
}, signUpOptions?: {
|
|
1585
|
-
customClaims?: Record<string, any>;
|
|
1586
|
-
templateId?: string;
|
|
1587
|
-
templateOptions?: {
|
|
1588
|
-
[x: string]: string;
|
|
1589
|
-
};
|
|
1590
|
-
}) => Promise<_1.SdkResponse<{
|
|
1591
|
-
maskedPhone: string;
|
|
1592
|
-
}>>;
|
|
1593
|
-
email: (loginId: string, URI: string, user?: {
|
|
1594
|
-
email?: string;
|
|
1595
|
-
name?: string;
|
|
1596
|
-
givenName?: string;
|
|
1597
|
-
middleName?: string;
|
|
1598
|
-
familyName?: string;
|
|
1599
|
-
phone?: string;
|
|
1600
|
-
}, signUpOptions?: {
|
|
1601
|
-
customClaims?: Record<string, any>;
|
|
1602
|
-
templateId?: string;
|
|
1603
|
-
templateOptions?: {
|
|
1604
|
-
[x: string]: string;
|
|
1605
|
-
};
|
|
1606
|
-
}) => Promise<_1.SdkResponse<{
|
|
1607
|
-
maskedEmail: string;
|
|
1608
|
-
}>>;
|
|
1609
|
-
};
|
|
1610
|
-
signUpOrIn: {
|
|
1611
|
-
sms: (loginId: string, URI?: string, signUpOptions?: {
|
|
1612
|
-
customClaims?: Record<string, any>;
|
|
1613
|
-
templateId?: string;
|
|
1614
|
-
templateOptions?: {
|
|
1615
|
-
[x: string]: string;
|
|
1616
|
-
};
|
|
1617
|
-
}) => Promise<_1.SdkResponse<{
|
|
1618
|
-
maskedPhone: string;
|
|
1619
|
-
}>>;
|
|
1620
|
-
voice: (loginId: string, URI?: string, signUpOptions?: {
|
|
1621
|
-
customClaims?: Record<string, any>;
|
|
1622
|
-
templateId?: string;
|
|
1623
|
-
templateOptions?: {
|
|
1624
|
-
[x: string]: string;
|
|
1625
|
-
};
|
|
1626
|
-
}) => Promise<_1.SdkResponse<{
|
|
1627
|
-
maskedPhone: string;
|
|
1628
|
-
}>>;
|
|
1629
|
-
whatsapp: (loginId: string, URI?: string, signUpOptions?: {
|
|
1630
|
-
customClaims?: Record<string, any>;
|
|
1631
|
-
templateId?: string;
|
|
1632
|
-
templateOptions?: {
|
|
1633
|
-
[x: string]: string;
|
|
1634
|
-
};
|
|
1635
|
-
}) => Promise<_1.SdkResponse<{
|
|
1636
|
-
maskedPhone: string;
|
|
1637
|
-
}>>;
|
|
1638
|
-
email: (loginId: string, URI?: string, signUpOptions?: {
|
|
1639
|
-
customClaims?: Record<string, any>;
|
|
1640
|
-
templateId?: string;
|
|
1641
|
-
templateOptions?: {
|
|
1642
|
-
[x: string]: string;
|
|
1643
|
-
};
|
|
1644
|
-
}) => Promise<_1.SdkResponse<{
|
|
1645
|
-
maskedEmail: string;
|
|
1646
|
-
}>>;
|
|
1647
|
-
};
|
|
1648
|
-
update: {
|
|
1649
|
-
email: <T_2_2 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
1650
|
-
addToLoginIDs?: T_2_2;
|
|
1651
|
-
onMergeUseExisting?: T_2_2 extends true ? boolean : never;
|
|
1652
|
-
templateOptions?: {
|
|
1653
|
-
[x: string]: string;
|
|
1654
|
-
};
|
|
1655
|
-
}) => Promise<_1.SdkResponse<{
|
|
1656
|
-
maskedEmail: string;
|
|
1657
|
-
}>>;
|
|
1658
|
-
phone: {
|
|
1659
|
-
sms: <T_3_6 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
1660
|
-
addToLoginIDs?: T_3_6;
|
|
1661
|
-
onMergeUseExisting?: T_3_6 extends true ? boolean : never;
|
|
1662
|
-
templateOptions?: {
|
|
1663
|
-
[x: string]: string;
|
|
1664
|
-
};
|
|
1665
|
-
}) => Promise<_1.SdkResponse<{
|
|
1666
|
-
maskedPhone: string;
|
|
1667
|
-
}>>;
|
|
1668
|
-
voice: <T_3_7 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
1669
|
-
addToLoginIDs?: T_3_7;
|
|
1670
|
-
onMergeUseExisting?: T_3_7 extends true ? boolean : never;
|
|
1671
|
-
templateOptions?: {
|
|
1672
|
-
[x: string]: string;
|
|
1673
|
-
};
|
|
1674
|
-
}) => Promise<_1.SdkResponse<{
|
|
1675
|
-
maskedPhone: string;
|
|
1676
|
-
}>>;
|
|
1677
|
-
whatsapp: <T_3_8 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
1678
|
-
addToLoginIDs?: T_3_8;
|
|
1679
|
-
onMergeUseExisting?: T_3_8 extends true ? boolean : never;
|
|
1680
|
-
templateOptions?: {
|
|
1681
|
-
[x: string]: string;
|
|
1682
|
-
};
|
|
1683
|
-
}) => Promise<_1.SdkResponse<{
|
|
1684
|
-
maskedPhone: string;
|
|
1685
|
-
}>>;
|
|
1686
|
-
};
|
|
1687
|
-
};
|
|
1688
|
-
};
|
|
1689
|
-
enchantedLink: {
|
|
1690
|
-
verify: (token: string) => Promise<_1.SdkResponse<never>>;
|
|
1691
|
-
signIn: (loginId: string, URI?: string, loginOptions?: _1.LoginOptions, token?: string) => Promise<_1.SdkResponse<_1.EnchantedLinkResponse>>;
|
|
1692
|
-
signUpOrIn: (loginId: string, URI?: string, signUpOptions?: {
|
|
1693
|
-
customClaims?: Record<string, any>;
|
|
1694
|
-
templateId?: string;
|
|
1695
|
-
templateOptions?: {
|
|
1696
|
-
[x: string]: string;
|
|
1697
|
-
};
|
|
1698
|
-
}) => Promise<_1.SdkResponse<_1.EnchantedLinkResponse>>;
|
|
1699
|
-
signUp: (loginId: string, URI?: string, user?: {
|
|
1700
|
-
email?: string;
|
|
1701
|
-
name?: string;
|
|
1702
|
-
givenName?: string;
|
|
1703
|
-
middleName?: string;
|
|
1704
|
-
familyName?: string;
|
|
1705
|
-
phone?: string;
|
|
1706
|
-
}, signUpOptions?: {
|
|
1707
|
-
customClaims?: Record<string, any>;
|
|
1708
|
-
templateId?: string;
|
|
1709
|
-
templateOptions?: {
|
|
1710
|
-
[x: string]: string;
|
|
1711
|
-
};
|
|
1712
|
-
}) => Promise<_1.SdkResponse<_1.EnchantedLinkResponse>>;
|
|
1713
|
-
waitForSession: (pendingRef: string, config?: {
|
|
1714
|
-
pollingIntervalMs: number;
|
|
1715
|
-
timeoutMs: number;
|
|
1716
|
-
}) => Promise<_1.SdkResponse<_1.JWTResponse>>;
|
|
1717
|
-
update: {
|
|
1718
|
-
email: <T_4_2 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
1719
|
-
addToLoginIDs?: T_4_2;
|
|
1720
|
-
onMergeUseExisting?: T_4_2 extends true ? boolean : never;
|
|
1721
|
-
templateOptions?: {
|
|
1722
|
-
[x: string]: string;
|
|
1723
|
-
};
|
|
1724
|
-
}) => Promise<_1.SdkResponse<_1.EnchantedLinkResponse>>;
|
|
1725
|
-
};
|
|
1726
|
-
};
|
|
1727
|
-
oauth: {
|
|
1728
|
-
start: ((provider: string, redirectUrl?: string, loginOptions?: _1.LoginOptions, token?: string) => Promise<_1.SdkResponse<_1.ResponseData>>) & {
|
|
1729
|
-
google: (redirectURL?: string, loginOptions?: _1.LoginOptions, token?: string) => Promise<_1.SdkResponse<_1.URLResponse>>;
|
|
1730
|
-
facebook: (redirectURL?: string, loginOptions?: _1.LoginOptions, token?: string) => Promise<_1.SdkResponse<_1.URLResponse>>;
|
|
1731
|
-
github: (redirectURL?: string, loginOptions?: _1.LoginOptions, token?: string) => Promise<_1.SdkResponse<_1.URLResponse>>;
|
|
1732
|
-
microsoft: (redirectURL?: string, loginOptions?: _1.LoginOptions, token?: string) => Promise<_1.SdkResponse<_1.URLResponse>>;
|
|
1733
|
-
gitlab: (redirectURL?: string, loginOptions?: _1.LoginOptions, token?: string) => Promise<_1.SdkResponse<_1.URLResponse>>;
|
|
1734
|
-
apple: (redirectURL?: string, loginOptions?: _1.LoginOptions, token?: string) => Promise<_1.SdkResponse<_1.URLResponse>>;
|
|
1735
|
-
discord: (redirectURL?: string, loginOptions?: _1.LoginOptions, token?: string) => Promise<_1.SdkResponse<_1.URLResponse>>;
|
|
1736
|
-
linkedin: (redirectURL?: string, loginOptions?: _1.LoginOptions, token?: string) => Promise<_1.SdkResponse<_1.URLResponse>>;
|
|
1737
|
-
slack: (redirectURL?: string, loginOptions?: _1.LoginOptions, token?: string) => Promise<_1.SdkResponse<_1.URLResponse>>;
|
|
1738
|
-
};
|
|
1739
|
-
exchange: (code: string) => Promise<_1.SdkResponse<_1.JWTResponse>>;
|
|
1740
|
-
startNative: (provider: string, loginOptions?: _1.LoginOptions, implicit?: boolean) => Promise<_1.SdkResponse<_1.ResponseData>>;
|
|
1741
|
-
finishNative: (provider: string, stateId: string, user?: string, code?: string, idToken?: string) => Promise<_1.SdkResponse<_1.ResponseData>>;
|
|
1742
|
-
};
|
|
1743
|
-
saml: {
|
|
1744
|
-
start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?: _1.LoginOptions, token?: string) => Promise<_1.SdkResponse<_1.URLResponse>>;
|
|
1745
|
-
exchange: (code: string) => Promise<_1.SdkResponse<_1.JWTResponse>>;
|
|
1746
|
-
};
|
|
1747
|
-
totp: {
|
|
1748
|
-
signUp: (loginId: string, user?: {
|
|
1749
|
-
email?: string;
|
|
1750
|
-
name?: string;
|
|
1751
|
-
givenName?: string;
|
|
1752
|
-
middleName?: string;
|
|
1753
|
-
familyName?: string;
|
|
1754
|
-
phone?: string;
|
|
1755
|
-
}) => Promise<_1.SdkResponse<_1.TOTPResponse>>;
|
|
1756
|
-
verify: (loginId: string, code: string, loginOptions?: _1.LoginOptions, token?: string) => Promise<_1.SdkResponse<_1.JWTResponse>>;
|
|
1757
|
-
update: (loginId: string, token?: string) => Promise<_1.SdkResponse<_1.TOTPResponse>>;
|
|
1758
|
-
};
|
|
1759
|
-
notp: {
|
|
1760
|
-
signUpOrIn: (loginId?: string, signUpOptions?: {
|
|
1761
|
-
customClaims?: Record<string, any>;
|
|
1762
|
-
templateId?: string;
|
|
1763
|
-
templateOptions?: {
|
|
1764
|
-
[x: string]: string;
|
|
1765
|
-
};
|
|
1766
|
-
}) => Promise<_1.SdkResponse<{
|
|
1767
|
-
pendingRef: string;
|
|
1768
|
-
redirectUrl: string;
|
|
1769
|
-
image: string;
|
|
1770
|
-
}>>;
|
|
1771
|
-
signUp: (loginId?: string, user?: {
|
|
1772
|
-
email?: string;
|
|
1773
|
-
name?: string;
|
|
1774
|
-
givenName?: string;
|
|
1775
|
-
middleName?: string;
|
|
1776
|
-
familyName?: string;
|
|
1777
|
-
phone?: string;
|
|
1778
|
-
}, signUpOptions?: {
|
|
1779
|
-
customClaims?: Record<string, any>;
|
|
1780
|
-
templateId?: string;
|
|
1781
|
-
templateOptions?: {
|
|
1782
|
-
[x: string]: string;
|
|
1783
|
-
};
|
|
1784
|
-
}) => Promise<_1.SdkResponse<{
|
|
1785
|
-
pendingRef: string;
|
|
1786
|
-
redirectUrl: string;
|
|
1787
|
-
image: string;
|
|
1788
|
-
}>>;
|
|
1789
|
-
signIn: (loginId?: string, loginOptions?: _1.LoginOptions, token?: string) => Promise<_1.SdkResponse<{
|
|
1790
|
-
pendingRef: string;
|
|
1791
|
-
redirectUrl: string;
|
|
1792
|
-
image: string;
|
|
1793
|
-
}>>;
|
|
1794
|
-
waitForSession: (pendingRef: string, config?: {
|
|
1795
|
-
pollingIntervalMs: number;
|
|
1796
|
-
timeoutMs: number;
|
|
1797
|
-
}) => Promise<_1.SdkResponse<_1.JWTResponse>>;
|
|
1798
|
-
};
|
|
1799
|
-
password: {
|
|
1800
|
-
signUp: (loginId: string, password: string, user?: {
|
|
1801
|
-
email?: string;
|
|
1802
|
-
name?: string;
|
|
1803
|
-
givenName?: string;
|
|
1804
|
-
middleName?: string;
|
|
1805
|
-
familyName?: string;
|
|
1806
|
-
phone?: string;
|
|
1807
|
-
}, signUpOptions?: {
|
|
1808
|
-
customClaims?: Record<string, any>;
|
|
1809
|
-
templateId?: string;
|
|
1810
|
-
templateOptions?: {
|
|
1811
|
-
[x: string]: string;
|
|
1812
|
-
};
|
|
1813
|
-
}) => Promise<_1.SdkResponse<_1.JWTResponse>>;
|
|
1814
|
-
signIn: (loginId: string, password: string, loginOptions?: _1.LoginOptions) => Promise<_1.SdkResponse<_1.JWTResponse>>;
|
|
1815
|
-
sendReset: (loginId: string, redirectUrl?: string, templateOptions?: {
|
|
1816
|
-
[x: string]: string;
|
|
1817
|
-
}) => Promise<_1.SdkResponse<{
|
|
1818
|
-
resetMethod: string;
|
|
1819
|
-
pendingRef?: string;
|
|
1820
|
-
linkId?: string;
|
|
1821
|
-
maskedEmail: string;
|
|
1822
|
-
}>>;
|
|
1823
|
-
update: (loginId: string, newPassword: string, token?: string) => Promise<_1.SdkResponse<never>>;
|
|
1824
|
-
replace: (loginId: string, oldPassword: string, newPassword: string) => Promise<_1.SdkResponse<_1.JWTResponse>>;
|
|
1825
|
-
policy: () => Promise<_1.SdkResponse<{
|
|
1826
|
-
minLength: number;
|
|
1827
|
-
lowercase: boolean;
|
|
1828
|
-
uppercase: boolean;
|
|
1829
|
-
number: boolean;
|
|
1830
|
-
nonAlphanumeric: boolean;
|
|
1831
|
-
}>>;
|
|
1832
|
-
};
|
|
1833
|
-
selectTenant: (tenantId: string, token?: string) => Promise<_1.SdkResponse<_1.JWTResponse>>;
|
|
1834
|
-
logout: (token?: string) => Promise<_1.SdkResponse<never>>;
|
|
1835
|
-
logoutAll: (token?: string) => Promise<_1.SdkResponse<never>>;
|
|
1836
|
-
logoutPrevious: (token?: string) => Promise<_1.SdkResponse<never>>;
|
|
1837
1228
|
me: (token?: string) => Promise<_1.SdkResponse<_1.UserResponse>>;
|
|
1838
1229
|
myTenants: (tenants: true | string[], token?: string) => Promise<_1.SdkResponse<{
|
|
1839
1230
|
tenants: {
|
|
@@ -1958,6 +1349,7 @@ type DescopeProps = {
|
|
|
1958
1349
|
locale?: string;
|
|
1959
1350
|
autoFocus?: AutoFocusOptions;
|
|
1960
1351
|
validateOnBlur?: boolean;
|
|
1352
|
+
restartOnError?: boolean;
|
|
1961
1353
|
debug?: boolean;
|
|
1962
1354
|
telemetryKey?: string;
|
|
1963
1355
|
redirectUrl?: string;
|