@descope/vue-sdk 2.0.9 → 2.0.12
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 +21 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2113 -706
- package/dist/index.mjs +1 -1
- package/package.json +7 -6
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as vue from 'vue';
|
|
2
2
|
import { App } from 'vue';
|
|
3
|
+
import * as _descope_web_js_sdk from '@descope/web-js-sdk';
|
|
3
4
|
import * as _descope_core_js_sdk from '@descope/core-js-sdk';
|
|
4
5
|
|
|
5
|
-
declare const _default$
|
|
6
|
+
declare const _default$5: vue.DefineComponent<{
|
|
6
7
|
flowId: {
|
|
7
8
|
type: StringConstructor;
|
|
8
9
|
required: true;
|
|
@@ -83,6 +84,42 @@ declare const _default$4: vue.DefineComponent<{
|
|
|
83
84
|
autoFocus: boolean;
|
|
84
85
|
}>;
|
|
85
86
|
|
|
87
|
+
declare const _default$4: vue.DefineComponent<{
|
|
88
|
+
tenant: {
|
|
89
|
+
type: StringConstructor;
|
|
90
|
+
required: true;
|
|
91
|
+
};
|
|
92
|
+
widgetId: {
|
|
93
|
+
type: StringConstructor;
|
|
94
|
+
required: true;
|
|
95
|
+
};
|
|
96
|
+
theme: {
|
|
97
|
+
type: StringConstructor;
|
|
98
|
+
};
|
|
99
|
+
debug: {
|
|
100
|
+
type: BooleanConstructor;
|
|
101
|
+
};
|
|
102
|
+
}, (_ctx: any, _cache: any) => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
103
|
+
[key: string]: any;
|
|
104
|
+
}>, unknown, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.VNodeProps & vue.AllowedComponentProps & vue.ComponentCustomProps, Readonly<vue.ExtractPropTypes<{
|
|
105
|
+
tenant: {
|
|
106
|
+
type: StringConstructor;
|
|
107
|
+
required: true;
|
|
108
|
+
};
|
|
109
|
+
widgetId: {
|
|
110
|
+
type: StringConstructor;
|
|
111
|
+
required: true;
|
|
112
|
+
};
|
|
113
|
+
theme: {
|
|
114
|
+
type: StringConstructor;
|
|
115
|
+
};
|
|
116
|
+
debug: {
|
|
117
|
+
type: BooleanConstructor;
|
|
118
|
+
};
|
|
119
|
+
}>>, {
|
|
120
|
+
debug: boolean;
|
|
121
|
+
}>;
|
|
122
|
+
|
|
86
123
|
declare const _default$3: vue.DefineComponent<{
|
|
87
124
|
tenant: {
|
|
88
125
|
type: StringConstructor;
|
|
@@ -201,6 +238,7 @@ declare const useDescope: () => ((({
|
|
|
201
238
|
flow: {
|
|
202
239
|
start: (flowId: string, options?: Pick<{
|
|
203
240
|
redirectUrl?: string;
|
|
241
|
+
location?: string;
|
|
204
242
|
tenant?: string;
|
|
205
243
|
deviceInfo?: {
|
|
206
244
|
webAuthnSupport?: boolean;
|
|
@@ -211,17 +249,30 @@ declare const useDescope: () => ((({
|
|
|
211
249
|
name?: string;
|
|
212
250
|
loginId?: string;
|
|
213
251
|
};
|
|
214
|
-
|
|
252
|
+
redirectAuth?: {
|
|
253
|
+
callbackUrl: string;
|
|
254
|
+
codeChallenge: string;
|
|
255
|
+
};
|
|
256
|
+
oidcIdpStateId?: string;
|
|
257
|
+
preview?: boolean;
|
|
258
|
+
samlIdpStateId?: string;
|
|
259
|
+
samlIdpUsername?: string;
|
|
260
|
+
ssoAppId?: string;
|
|
261
|
+
oidcLoginHint?: string;
|
|
262
|
+
abTestingKey?: number;
|
|
263
|
+
startOptionsVersion?: number;
|
|
264
|
+
client?: Record<string, any>;
|
|
265
|
+
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client"> & {
|
|
215
266
|
lastAuth?: Omit<{
|
|
216
267
|
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
217
268
|
oauthProvider?: string;
|
|
218
269
|
name?: string;
|
|
219
270
|
loginId?: string;
|
|
220
271
|
}, "loginId" | "name">;
|
|
221
|
-
}, conditionInteractionId?: string, interactionId?: string, input?: {
|
|
272
|
+
}, conditionInteractionId?: string, interactionId?: string, version?: number, componentsVersion?: string, input?: {
|
|
222
273
|
[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[])[])[])[])[])[])[])[])[])[])[];
|
|
223
274
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
224
|
-
next: (executionId: string, stepId: string, interactionId: string, input?: {
|
|
275
|
+
next: (executionId: string, stepId: string, interactionId: string, version?: number, componentsVersion?: string, input?: {
|
|
225
276
|
[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[])[])[])[])[])[])[])[])[])[])[];
|
|
226
277
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
227
278
|
};
|
|
@@ -235,11 +286,7 @@ declare const useDescope: () => ((({
|
|
|
235
286
|
finish: (transactionId: string, response: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
236
287
|
};
|
|
237
288
|
signIn: ((identifier: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
|
|
238
|
-
start: (loginId: string, origin: string, loginOptions?: {
|
|
239
|
-
stepup?: boolean;
|
|
240
|
-
mfa?: boolean;
|
|
241
|
-
customClaims?: Record<string, any>;
|
|
242
|
-
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
289
|
+
start: (loginId: string, origin: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
243
290
|
transactionId: string;
|
|
244
291
|
options: string;
|
|
245
292
|
create: boolean;
|
|
@@ -268,23 +315,30 @@ declare const useDescope: () => ((({
|
|
|
268
315
|
conditional: (options: string, abort: AbortController) => Promise<string>;
|
|
269
316
|
};
|
|
270
317
|
};
|
|
318
|
+
fedcm: {
|
|
319
|
+
oneTap(provider?: string, oneTapConfig?: _descope_web_js_sdk.OneTapConfig, loginOptions?: _descope_core_js_sdk.LoginOptions, onSkip?: () => void): Promise<unknown>;
|
|
320
|
+
};
|
|
271
321
|
accessKey: {
|
|
272
|
-
exchange: (accessKey: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
|
|
322
|
+
exchange: (accessKey: string, loginOptions?: _descope_core_js_sdk.AccessKeyLoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
|
|
273
323
|
};
|
|
274
324
|
otp: {
|
|
275
325
|
verify: {
|
|
276
326
|
sms: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
327
|
+
voice: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
277
328
|
whatsapp: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
278
329
|
email: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
279
330
|
};
|
|
280
331
|
signIn: {
|
|
281
|
-
sms: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
332
|
+
sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
333
|
+
maskedPhone: string;
|
|
334
|
+
}>>;
|
|
335
|
+
voice: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
282
336
|
maskedPhone: string;
|
|
283
337
|
}>>;
|
|
284
|
-
whatsapp: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
338
|
+
whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
285
339
|
maskedPhone: string;
|
|
286
340
|
}>>;
|
|
287
|
-
email: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
341
|
+
email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
288
342
|
maskedEmail: string;
|
|
289
343
|
}>>;
|
|
290
344
|
};
|
|
@@ -292,45 +346,114 @@ declare const useDescope: () => ((({
|
|
|
292
346
|
sms: (loginId: string, user?: {
|
|
293
347
|
email?: string;
|
|
294
348
|
name?: string;
|
|
349
|
+
givenName?: string;
|
|
350
|
+
middleName?: string;
|
|
351
|
+
familyName?: string;
|
|
295
352
|
phone?: string;
|
|
353
|
+
}, signUpOptions?: {
|
|
354
|
+
customClaims?: Record<string, any>;
|
|
355
|
+
templateOptions?: {
|
|
356
|
+
[x: string]: string;
|
|
357
|
+
};
|
|
358
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
359
|
+
maskedPhone: string;
|
|
360
|
+
}>>;
|
|
361
|
+
voice: (loginId: string, user?: {
|
|
362
|
+
email?: string;
|
|
363
|
+
name?: string;
|
|
364
|
+
givenName?: string;
|
|
365
|
+
middleName?: string;
|
|
366
|
+
familyName?: string;
|
|
367
|
+
phone?: string;
|
|
368
|
+
}, signUpOptions?: {
|
|
369
|
+
customClaims?: Record<string, any>;
|
|
370
|
+
templateOptions?: {
|
|
371
|
+
[x: string]: string;
|
|
372
|
+
};
|
|
296
373
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
297
374
|
maskedPhone: string;
|
|
298
375
|
}>>;
|
|
299
376
|
whatsapp: (loginId: string, user?: {
|
|
300
377
|
email?: string;
|
|
301
378
|
name?: string;
|
|
379
|
+
givenName?: string;
|
|
380
|
+
middleName?: string;
|
|
381
|
+
familyName?: string;
|
|
302
382
|
phone?: string;
|
|
383
|
+
}, signUpOptions?: {
|
|
384
|
+
customClaims?: Record<string, any>;
|
|
385
|
+
templateOptions?: {
|
|
386
|
+
[x: string]: string;
|
|
387
|
+
};
|
|
303
388
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
304
389
|
maskedPhone: string;
|
|
305
390
|
}>>;
|
|
306
391
|
email: (loginId: string, user?: {
|
|
307
392
|
email?: string;
|
|
308
393
|
name?: string;
|
|
394
|
+
givenName?: string;
|
|
395
|
+
middleName?: string;
|
|
396
|
+
familyName?: string;
|
|
309
397
|
phone?: string;
|
|
398
|
+
}, signUpOptions?: {
|
|
399
|
+
customClaims?: Record<string, any>;
|
|
400
|
+
templateOptions?: {
|
|
401
|
+
[x: string]: string;
|
|
402
|
+
};
|
|
310
403
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
311
404
|
maskedEmail: string;
|
|
312
405
|
}>>;
|
|
313
406
|
};
|
|
314
407
|
signUpOrIn: {
|
|
315
|
-
sms: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
408
|
+
sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
316
409
|
maskedPhone: string;
|
|
317
410
|
}>>;
|
|
318
|
-
|
|
411
|
+
voice: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
319
412
|
maskedPhone: string;
|
|
320
413
|
}>>;
|
|
321
|
-
|
|
414
|
+
whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
415
|
+
maskedPhone: string;
|
|
416
|
+
}>>;
|
|
417
|
+
email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
322
418
|
maskedEmail: string;
|
|
323
419
|
}>>;
|
|
324
420
|
};
|
|
325
421
|
update: {
|
|
326
|
-
email: (loginId: string, email: string, token?: string
|
|
422
|
+
email: <T extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
|
|
423
|
+
addToLoginIDs?: T;
|
|
424
|
+
onMergeUseExisting?: T extends true ? boolean : never;
|
|
425
|
+
templateOptions?: {
|
|
426
|
+
[x: string]: string;
|
|
427
|
+
};
|
|
428
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
327
429
|
maskedEmail: string;
|
|
328
430
|
}>>;
|
|
329
431
|
phone: {
|
|
330
|
-
sms: (loginId: string, phone: string, token?: string
|
|
432
|
+
sms: <T_1 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
433
|
+
addToLoginIDs?: T_1;
|
|
434
|
+
onMergeUseExisting?: T_1 extends true ? boolean : never;
|
|
435
|
+
templateOptions?: {
|
|
436
|
+
[x: string]: string;
|
|
437
|
+
};
|
|
438
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
439
|
+
maskedPhone: string;
|
|
440
|
+
}>>;
|
|
441
|
+
voice: <T_1_1 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
442
|
+
addToLoginIDs?: T_1_1;
|
|
443
|
+
onMergeUseExisting?: T_1_1 extends true ? boolean : never;
|
|
444
|
+
templateOptions?: {
|
|
445
|
+
[x: string]: string;
|
|
446
|
+
};
|
|
447
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
331
448
|
maskedPhone: string;
|
|
332
449
|
}>>;
|
|
333
|
-
whatsapp: (loginId: string, phone: string, token?: string
|
|
450
|
+
whatsapp: <T_1_2 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
451
|
+
addToLoginIDs?: T_1_2;
|
|
452
|
+
onMergeUseExisting?: T_1_2 extends true ? boolean : never;
|
|
453
|
+
templateOptions?: {
|
|
454
|
+
[x: string]: string;
|
|
455
|
+
};
|
|
456
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
334
457
|
maskedPhone: string;
|
|
335
458
|
}>>;
|
|
336
459
|
};
|
|
@@ -339,59 +462,151 @@ declare const useDescope: () => ((({
|
|
|
339
462
|
magicLink: {
|
|
340
463
|
verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
341
464
|
signIn: {
|
|
342
|
-
sms: (loginId: string,
|
|
465
|
+
sms: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
466
|
+
maskedPhone: string;
|
|
467
|
+
}>>;
|
|
468
|
+
voice: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
343
469
|
maskedPhone: string;
|
|
344
470
|
}>>;
|
|
345
|
-
whatsapp: (loginId: string,
|
|
471
|
+
whatsapp: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
346
472
|
maskedPhone: string;
|
|
347
473
|
}>>;
|
|
348
|
-
email: (loginId: string,
|
|
474
|
+
email: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
349
475
|
maskedEmail: string;
|
|
350
476
|
}>>;
|
|
351
477
|
};
|
|
352
478
|
signUp: {
|
|
353
|
-
sms: (loginId: string,
|
|
479
|
+
sms: (loginId: string, URI: string, user?: {
|
|
480
|
+
email?: string;
|
|
481
|
+
name?: string;
|
|
482
|
+
givenName?: string;
|
|
483
|
+
middleName?: string;
|
|
484
|
+
familyName?: string;
|
|
485
|
+
phone?: string;
|
|
486
|
+
}, signUpOptions?: {
|
|
487
|
+
customClaims?: Record<string, any>;
|
|
488
|
+
templateOptions?: {
|
|
489
|
+
[x: string]: string;
|
|
490
|
+
};
|
|
491
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
492
|
+
maskedPhone: string;
|
|
493
|
+
}>>;
|
|
494
|
+
voice: (loginId: string, URI: string, user?: {
|
|
354
495
|
email?: string;
|
|
355
496
|
name?: string;
|
|
497
|
+
givenName?: string;
|
|
498
|
+
middleName?: string;
|
|
499
|
+
familyName?: string;
|
|
356
500
|
phone?: string;
|
|
501
|
+
}, signUpOptions?: {
|
|
502
|
+
customClaims?: Record<string, any>;
|
|
503
|
+
templateOptions?: {
|
|
504
|
+
[x: string]: string;
|
|
505
|
+
};
|
|
357
506
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
358
507
|
maskedPhone: string;
|
|
359
508
|
}>>;
|
|
360
|
-
whatsapp: (loginId: string,
|
|
509
|
+
whatsapp: (loginId: string, URI: string, user?: {
|
|
361
510
|
email?: string;
|
|
362
511
|
name?: string;
|
|
512
|
+
givenName?: string;
|
|
513
|
+
middleName?: string;
|
|
514
|
+
familyName?: string;
|
|
363
515
|
phone?: string;
|
|
516
|
+
}, signUpOptions?: {
|
|
517
|
+
customClaims?: Record<string, any>;
|
|
518
|
+
templateOptions?: {
|
|
519
|
+
[x: string]: string;
|
|
520
|
+
};
|
|
364
521
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
365
522
|
maskedPhone: string;
|
|
366
523
|
}>>;
|
|
367
|
-
email: (loginId: string,
|
|
524
|
+
email: (loginId: string, URI: string, user?: {
|
|
368
525
|
email?: string;
|
|
369
526
|
name?: string;
|
|
527
|
+
givenName?: string;
|
|
528
|
+
middleName?: string;
|
|
529
|
+
familyName?: string;
|
|
370
530
|
phone?: string;
|
|
531
|
+
}, signUpOptions?: {
|
|
532
|
+
customClaims?: Record<string, any>;
|
|
533
|
+
templateOptions?: {
|
|
534
|
+
[x: string]: string;
|
|
535
|
+
};
|
|
371
536
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
372
537
|
maskedEmail: string;
|
|
373
538
|
}>>;
|
|
374
539
|
};
|
|
375
540
|
signUpOrIn: {
|
|
376
|
-
sms: (loginId: string,
|
|
541
|
+
sms: (loginId: string, URI?: string, signUpOptions?: {
|
|
542
|
+
customClaims?: Record<string, any>;
|
|
543
|
+
templateOptions?: {
|
|
544
|
+
[x: string]: string;
|
|
545
|
+
};
|
|
546
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
377
547
|
maskedPhone: string;
|
|
378
548
|
}>>;
|
|
379
|
-
|
|
549
|
+
voice: (loginId: string, URI?: string, signUpOptions?: {
|
|
550
|
+
customClaims?: Record<string, any>;
|
|
551
|
+
templateOptions?: {
|
|
552
|
+
[x: string]: string;
|
|
553
|
+
};
|
|
554
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
555
|
+
maskedPhone: string;
|
|
556
|
+
}>>;
|
|
557
|
+
whatsapp: (loginId: string, URI?: string, signUpOptions?: {
|
|
558
|
+
customClaims?: Record<string, any>;
|
|
559
|
+
templateOptions?: {
|
|
560
|
+
[x: string]: string;
|
|
561
|
+
};
|
|
562
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
380
563
|
maskedPhone: string;
|
|
381
564
|
}>>;
|
|
382
|
-
email: (loginId: string,
|
|
565
|
+
email: (loginId: string, URI?: string, signUpOptions?: {
|
|
566
|
+
customClaims?: Record<string, any>;
|
|
567
|
+
templateOptions?: {
|
|
568
|
+
[x: string]: string;
|
|
569
|
+
};
|
|
570
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
383
571
|
maskedEmail: string;
|
|
384
572
|
}>>;
|
|
385
573
|
};
|
|
386
574
|
update: {
|
|
387
|
-
email: (loginId: string, email: string, URI?: string, token?: string
|
|
575
|
+
email: <T_2 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
576
|
+
addToLoginIDs?: T_2;
|
|
577
|
+
onMergeUseExisting?: T_2 extends true ? boolean : never;
|
|
578
|
+
templateOptions?: {
|
|
579
|
+
[x: string]: string;
|
|
580
|
+
};
|
|
581
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
388
582
|
maskedEmail: string;
|
|
389
583
|
}>>;
|
|
390
584
|
phone: {
|
|
391
|
-
sms: (loginId: string, phone: string, URI?: string, token?: string
|
|
585
|
+
sms: <T_3 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
586
|
+
addToLoginIDs?: T_3;
|
|
587
|
+
onMergeUseExisting?: T_3 extends true ? boolean : never;
|
|
588
|
+
templateOptions?: {
|
|
589
|
+
[x: string]: string;
|
|
590
|
+
};
|
|
591
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
392
592
|
maskedPhone: string;
|
|
393
593
|
}>>;
|
|
394
|
-
|
|
594
|
+
voice: <T_3_1 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
595
|
+
addToLoginIDs?: T_3_1;
|
|
596
|
+
onMergeUseExisting?: T_3_1 extends true ? boolean : never;
|
|
597
|
+
templateOptions?: {
|
|
598
|
+
[x: string]: string;
|
|
599
|
+
};
|
|
600
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
601
|
+
maskedPhone: string;
|
|
602
|
+
}>>;
|
|
603
|
+
whatsapp: <T_3_2 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
604
|
+
addToLoginIDs?: T_3_2;
|
|
605
|
+
onMergeUseExisting?: T_3_2 extends true ? boolean : never;
|
|
606
|
+
templateOptions?: {
|
|
607
|
+
[x: string]: string;
|
|
608
|
+
};
|
|
609
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
395
610
|
maskedPhone: string;
|
|
396
611
|
}>>;
|
|
397
612
|
};
|
|
@@ -399,102 +614,92 @@ declare const useDescope: () => ((({
|
|
|
399
614
|
};
|
|
400
615
|
enchantedLink: {
|
|
401
616
|
verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
402
|
-
signIn: (loginId: string,
|
|
403
|
-
signUpOrIn: (loginId: string,
|
|
404
|
-
|
|
617
|
+
signIn: (loginId: string, URI?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
618
|
+
signUpOrIn: (loginId: string, URI?: string, signUpOptions?: {
|
|
619
|
+
customClaims?: Record<string, any>;
|
|
620
|
+
templateOptions?: {
|
|
621
|
+
[x: string]: string;
|
|
622
|
+
};
|
|
623
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
624
|
+
signUp: (loginId: string, URI?: string, user?: {
|
|
405
625
|
email?: string;
|
|
406
626
|
name?: string;
|
|
627
|
+
givenName?: string;
|
|
628
|
+
middleName?: string;
|
|
629
|
+
familyName?: string;
|
|
407
630
|
phone?: string;
|
|
631
|
+
}, signUpOptions?: {
|
|
632
|
+
customClaims?: Record<string, any>;
|
|
633
|
+
templateOptions?: {
|
|
634
|
+
[x: string]: string;
|
|
635
|
+
};
|
|
408
636
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
409
637
|
waitForSession: (pendingRef: string, config?: {
|
|
410
638
|
pollingIntervalMs: number;
|
|
411
639
|
timeoutMs: number;
|
|
412
640
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
413
641
|
update: {
|
|
414
|
-
email: (loginId: string, email: string, URI?: string, token?: string
|
|
642
|
+
email: <T_4 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
643
|
+
addToLoginIDs?: T_4;
|
|
644
|
+
onMergeUseExisting?: T_4 extends true ? boolean : never;
|
|
645
|
+
templateOptions?: {
|
|
646
|
+
[x: string]: string;
|
|
647
|
+
};
|
|
648
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
415
649
|
};
|
|
416
650
|
};
|
|
417
651
|
oauth: {
|
|
418
|
-
start: {
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
429
|
-
google: <B_2 extends {
|
|
430
|
-
redirect: boolean;
|
|
431
|
-
}>(redirectURL?: string, config?: B_2) => Promise<B_2 extends {
|
|
432
|
-
redirect: true;
|
|
433
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
434
|
-
microsoft: <B_3 extends {
|
|
435
|
-
redirect: boolean;
|
|
436
|
-
}>(redirectURL?: string, config?: B_3) => Promise<B_3 extends {
|
|
437
|
-
redirect: true;
|
|
438
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
439
|
-
gitlab: <B_4 extends {
|
|
440
|
-
redirect: boolean;
|
|
441
|
-
}>(redirectURL?: string, config?: B_4) => Promise<B_4 extends {
|
|
442
|
-
redirect: true;
|
|
443
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
444
|
-
apple: <B_5 extends {
|
|
445
|
-
redirect: boolean;
|
|
446
|
-
}>(redirectURL?: string, config?: B_5) => Promise<B_5 extends {
|
|
447
|
-
redirect: true;
|
|
448
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
449
|
-
discord: <B_6 extends {
|
|
450
|
-
redirect: boolean;
|
|
451
|
-
}>(redirectURL?: string, config?: B_6) => Promise<B_6 extends {
|
|
452
|
-
redirect: true;
|
|
453
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
454
|
-
linkedin: <B_7 extends {
|
|
455
|
-
redirect: boolean;
|
|
456
|
-
}>(redirectURL?: string, config?: B_7) => Promise<B_7 extends {
|
|
457
|
-
redirect: true;
|
|
458
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
652
|
+
start: ((provider: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>) & {
|
|
653
|
+
google: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
654
|
+
facebook: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
655
|
+
github: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
656
|
+
microsoft: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
657
|
+
gitlab: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
658
|
+
apple: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
659
|
+
discord: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
660
|
+
linkedin: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
661
|
+
slack: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
459
662
|
};
|
|
460
663
|
exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
664
|
+
startNative: (provider: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
665
|
+
finishNative: (provider: string, stateId: string, user?: string, code?: string, idToken?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
461
666
|
};
|
|
462
667
|
saml: {
|
|
463
|
-
start:
|
|
464
|
-
redirect: boolean;
|
|
465
|
-
}>(tenantNameOrEmail: string, config?: B_1_1) => Promise<B_1_1 extends {
|
|
466
|
-
redirect: true;
|
|
467
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
668
|
+
start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
468
669
|
exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
469
670
|
};
|
|
470
671
|
totp: {
|
|
471
672
|
signUp: (loginId: string, user?: {
|
|
472
673
|
email?: string;
|
|
473
674
|
name?: string;
|
|
675
|
+
givenName?: string;
|
|
676
|
+
middleName?: string;
|
|
677
|
+
familyName?: string;
|
|
474
678
|
phone?: string;
|
|
475
679
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.TOTPResponse>>;
|
|
476
|
-
verify: (loginId: string, code: string, loginOptions?:
|
|
477
|
-
stepup?: boolean;
|
|
478
|
-
mfa?: boolean;
|
|
479
|
-
customClaims?: Record<string, any>;
|
|
480
|
-
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
680
|
+
verify: (loginId: string, code: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
481
681
|
update: (loginId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.TOTPResponse>>;
|
|
482
682
|
};
|
|
483
683
|
password: {
|
|
484
684
|
signUp: (loginId: string, password: string, user?: {
|
|
485
685
|
email?: string;
|
|
486
686
|
name?: string;
|
|
687
|
+
givenName?: string;
|
|
688
|
+
middleName?: string;
|
|
689
|
+
familyName?: string;
|
|
487
690
|
phone?: string;
|
|
488
691
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
489
692
|
signIn: (loginId: string, password: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
490
|
-
sendReset: (loginId: string, redirectUrl?: string
|
|
693
|
+
sendReset: (loginId: string, redirectUrl?: string, templateOptions?: {
|
|
694
|
+
[x: string]: string;
|
|
695
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
491
696
|
resetMethod: string;
|
|
492
697
|
pendingRef?: string;
|
|
493
698
|
linkId?: string;
|
|
494
699
|
maskedEmail: string;
|
|
495
700
|
}>>;
|
|
496
701
|
update: (loginId: string, newPassword: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
497
|
-
replace: (loginId: string, oldPassword: string, newPassword: string) => Promise<_descope_core_js_sdk.SdkResponse<
|
|
702
|
+
replace: (loginId: string, oldPassword: string, newPassword: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
498
703
|
policy: () => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
499
704
|
minLength: number;
|
|
500
705
|
lowercase: boolean;
|
|
@@ -504,10 +709,13 @@ declare const useDescope: () => ((({
|
|
|
504
709
|
}>>;
|
|
505
710
|
};
|
|
506
711
|
refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
712
|
+
selectTenant: (tenantId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
507
713
|
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
508
714
|
logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
509
715
|
me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
|
|
716
|
+
history: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserHistoryResponse>>;
|
|
510
717
|
isJwtExpired: (token: string) => boolean;
|
|
718
|
+
getTenants: (token: string) => string[];
|
|
511
719
|
getJwtPermissions: (token: string, tenant?: string) => string[];
|
|
512
720
|
getJwtRoles: (token: string, tenant?: string) => string[];
|
|
513
721
|
httpClient: {
|
|
@@ -532,7 +740,7 @@ declare const useDescope: () => ((({
|
|
|
532
740
|
};
|
|
533
741
|
token?: string;
|
|
534
742
|
}) => Promise<Response>;
|
|
535
|
-
delete: (path: string,
|
|
743
|
+
delete: (path: string, config?: {
|
|
536
744
|
headers?: HeadersInit;
|
|
537
745
|
queryParams?: {
|
|
538
746
|
[key: string]: string;
|
|
@@ -548,6 +756,7 @@ declare const useDescope: () => ((({
|
|
|
548
756
|
flow: {
|
|
549
757
|
start: (flowId: string, options?: Pick<{
|
|
550
758
|
redirectUrl?: string;
|
|
759
|
+
location?: string;
|
|
551
760
|
tenant?: string;
|
|
552
761
|
deviceInfo?: {
|
|
553
762
|
webAuthnSupport?: boolean;
|
|
@@ -558,17 +767,30 @@ declare const useDescope: () => ((({
|
|
|
558
767
|
name?: string;
|
|
559
768
|
loginId?: string;
|
|
560
769
|
};
|
|
561
|
-
|
|
770
|
+
redirectAuth?: {
|
|
771
|
+
callbackUrl: string;
|
|
772
|
+
codeChallenge: string;
|
|
773
|
+
};
|
|
774
|
+
oidcIdpStateId?: string;
|
|
775
|
+
preview?: boolean;
|
|
776
|
+
samlIdpStateId?: string;
|
|
777
|
+
samlIdpUsername?: string;
|
|
778
|
+
ssoAppId?: string;
|
|
779
|
+
oidcLoginHint?: string;
|
|
780
|
+
abTestingKey?: number;
|
|
781
|
+
startOptionsVersion?: number;
|
|
782
|
+
client?: Record<string, any>;
|
|
783
|
+
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client"> & {
|
|
562
784
|
lastAuth?: Omit<{
|
|
563
785
|
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
564
786
|
oauthProvider?: string;
|
|
565
787
|
name?: string;
|
|
566
788
|
loginId?: string;
|
|
567
789
|
}, "loginId" | "name">;
|
|
568
|
-
}, conditionInteractionId?: string, interactionId?: string, input?: {
|
|
790
|
+
}, conditionInteractionId?: string, interactionId?: string, version?: number, componentsVersion?: string, input?: {
|
|
569
791
|
[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[])[])[])[])[])[])[])[])[])[])[];
|
|
570
792
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
571
|
-
next: (executionId: string, stepId: string, interactionId: string, input?: {
|
|
793
|
+
next: (executionId: string, stepId: string, interactionId: string, version?: number, componentsVersion?: string, input?: {
|
|
572
794
|
[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[])[])[])[])[])[])[])[])[])[])[];
|
|
573
795
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
574
796
|
};
|
|
@@ -582,11 +804,7 @@ declare const useDescope: () => ((({
|
|
|
582
804
|
finish: (transactionId: string, response: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
583
805
|
};
|
|
584
806
|
signIn: ((identifier: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
|
|
585
|
-
start: (loginId: string, origin: string, loginOptions?: {
|
|
586
|
-
stepup?: boolean;
|
|
587
|
-
mfa?: boolean;
|
|
588
|
-
customClaims?: Record<string, any>;
|
|
589
|
-
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
807
|
+
start: (loginId: string, origin: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
590
808
|
transactionId: string;
|
|
591
809
|
options: string;
|
|
592
810
|
create: boolean;
|
|
@@ -615,23 +833,30 @@ declare const useDescope: () => ((({
|
|
|
615
833
|
conditional: (options: string, abort: AbortController) => Promise<string>;
|
|
616
834
|
};
|
|
617
835
|
};
|
|
836
|
+
fedcm: {
|
|
837
|
+
oneTap(provider?: string, oneTapConfig?: _descope_web_js_sdk.OneTapConfig, loginOptions?: _descope_core_js_sdk.LoginOptions, onSkip?: () => void): Promise<unknown>;
|
|
838
|
+
};
|
|
618
839
|
accessKey: {
|
|
619
|
-
exchange: (accessKey: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
|
|
840
|
+
exchange: (accessKey: string, loginOptions?: _descope_core_js_sdk.AccessKeyLoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
|
|
620
841
|
};
|
|
621
842
|
otp: {
|
|
622
843
|
verify: {
|
|
623
844
|
sms: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
845
|
+
voice: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
624
846
|
whatsapp: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
625
847
|
email: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
626
848
|
};
|
|
627
849
|
signIn: {
|
|
628
|
-
sms: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
850
|
+
sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
629
851
|
maskedPhone: string;
|
|
630
852
|
}>>;
|
|
631
|
-
|
|
853
|
+
voice: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
632
854
|
maskedPhone: string;
|
|
633
855
|
}>>;
|
|
634
|
-
|
|
856
|
+
whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
857
|
+
maskedPhone: string;
|
|
858
|
+
}>>;
|
|
859
|
+
email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
635
860
|
maskedEmail: string;
|
|
636
861
|
}>>;
|
|
637
862
|
};
|
|
@@ -639,45 +864,114 @@ declare const useDescope: () => ((({
|
|
|
639
864
|
sms: (loginId: string, user?: {
|
|
640
865
|
email?: string;
|
|
641
866
|
name?: string;
|
|
867
|
+
givenName?: string;
|
|
868
|
+
middleName?: string;
|
|
869
|
+
familyName?: string;
|
|
870
|
+
phone?: string;
|
|
871
|
+
}, signUpOptions?: {
|
|
872
|
+
customClaims?: Record<string, any>;
|
|
873
|
+
templateOptions?: {
|
|
874
|
+
[x: string]: string;
|
|
875
|
+
};
|
|
876
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
877
|
+
maskedPhone: string;
|
|
878
|
+
}>>;
|
|
879
|
+
voice: (loginId: string, user?: {
|
|
880
|
+
email?: string;
|
|
881
|
+
name?: string;
|
|
882
|
+
givenName?: string;
|
|
883
|
+
middleName?: string;
|
|
884
|
+
familyName?: string;
|
|
642
885
|
phone?: string;
|
|
886
|
+
}, signUpOptions?: {
|
|
887
|
+
customClaims?: Record<string, any>;
|
|
888
|
+
templateOptions?: {
|
|
889
|
+
[x: string]: string;
|
|
890
|
+
};
|
|
643
891
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
644
892
|
maskedPhone: string;
|
|
645
893
|
}>>;
|
|
646
894
|
whatsapp: (loginId: string, user?: {
|
|
647
895
|
email?: string;
|
|
648
896
|
name?: string;
|
|
897
|
+
givenName?: string;
|
|
898
|
+
middleName?: string;
|
|
899
|
+
familyName?: string;
|
|
649
900
|
phone?: string;
|
|
901
|
+
}, signUpOptions?: {
|
|
902
|
+
customClaims?: Record<string, any>;
|
|
903
|
+
templateOptions?: {
|
|
904
|
+
[x: string]: string;
|
|
905
|
+
};
|
|
650
906
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
651
907
|
maskedPhone: string;
|
|
652
908
|
}>>;
|
|
653
909
|
email: (loginId: string, user?: {
|
|
654
910
|
email?: string;
|
|
655
911
|
name?: string;
|
|
912
|
+
givenName?: string;
|
|
913
|
+
middleName?: string;
|
|
914
|
+
familyName?: string;
|
|
656
915
|
phone?: string;
|
|
916
|
+
}, signUpOptions?: {
|
|
917
|
+
customClaims?: Record<string, any>;
|
|
918
|
+
templateOptions?: {
|
|
919
|
+
[x: string]: string;
|
|
920
|
+
};
|
|
657
921
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
658
922
|
maskedEmail: string;
|
|
659
923
|
}>>;
|
|
660
924
|
};
|
|
661
925
|
signUpOrIn: {
|
|
662
|
-
sms: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
926
|
+
sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
927
|
+
maskedPhone: string;
|
|
928
|
+
}>>;
|
|
929
|
+
voice: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
663
930
|
maskedPhone: string;
|
|
664
931
|
}>>;
|
|
665
|
-
whatsapp: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
932
|
+
whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
666
933
|
maskedPhone: string;
|
|
667
934
|
}>>;
|
|
668
|
-
email: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
935
|
+
email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
669
936
|
maskedEmail: string;
|
|
670
937
|
}>>;
|
|
671
938
|
};
|
|
672
939
|
update: {
|
|
673
|
-
email: (loginId: string, email: string, token?: string
|
|
940
|
+
email: <T_5 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
|
|
941
|
+
addToLoginIDs?: T_5;
|
|
942
|
+
onMergeUseExisting?: T_5 extends true ? boolean : never;
|
|
943
|
+
templateOptions?: {
|
|
944
|
+
[x: string]: string;
|
|
945
|
+
};
|
|
946
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
674
947
|
maskedEmail: string;
|
|
675
948
|
}>>;
|
|
676
949
|
phone: {
|
|
677
|
-
sms: (loginId: string, phone: string, token?: string
|
|
950
|
+
sms: <T_1_3 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
951
|
+
addToLoginIDs?: T_1_3;
|
|
952
|
+
onMergeUseExisting?: T_1_3 extends true ? boolean : never;
|
|
953
|
+
templateOptions?: {
|
|
954
|
+
[x: string]: string;
|
|
955
|
+
};
|
|
956
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
957
|
+
maskedPhone: string;
|
|
958
|
+
}>>;
|
|
959
|
+
voice: <T_1_4 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
960
|
+
addToLoginIDs?: T_1_4;
|
|
961
|
+
onMergeUseExisting?: T_1_4 extends true ? boolean : never;
|
|
962
|
+
templateOptions?: {
|
|
963
|
+
[x: string]: string;
|
|
964
|
+
};
|
|
965
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
678
966
|
maskedPhone: string;
|
|
679
967
|
}>>;
|
|
680
|
-
whatsapp: (loginId: string, phone: string, token?: string
|
|
968
|
+
whatsapp: <T_1_5 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
969
|
+
addToLoginIDs?: T_1_5;
|
|
970
|
+
onMergeUseExisting?: T_1_5 extends true ? boolean : never;
|
|
971
|
+
templateOptions?: {
|
|
972
|
+
[x: string]: string;
|
|
973
|
+
};
|
|
974
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
681
975
|
maskedPhone: string;
|
|
682
976
|
}>>;
|
|
683
977
|
};
|
|
@@ -686,59 +980,151 @@ declare const useDescope: () => ((({
|
|
|
686
980
|
magicLink: {
|
|
687
981
|
verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
688
982
|
signIn: {
|
|
689
|
-
sms: (loginId: string,
|
|
983
|
+
sms: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
690
984
|
maskedPhone: string;
|
|
691
985
|
}>>;
|
|
692
|
-
|
|
986
|
+
voice: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
693
987
|
maskedPhone: string;
|
|
694
988
|
}>>;
|
|
695
|
-
|
|
989
|
+
whatsapp: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
990
|
+
maskedPhone: string;
|
|
991
|
+
}>>;
|
|
992
|
+
email: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
696
993
|
maskedEmail: string;
|
|
697
994
|
}>>;
|
|
698
995
|
};
|
|
699
996
|
signUp: {
|
|
700
|
-
sms: (loginId: string,
|
|
997
|
+
sms: (loginId: string, URI: string, user?: {
|
|
701
998
|
email?: string;
|
|
702
999
|
name?: string;
|
|
1000
|
+
givenName?: string;
|
|
1001
|
+
middleName?: string;
|
|
1002
|
+
familyName?: string;
|
|
703
1003
|
phone?: string;
|
|
1004
|
+
}, signUpOptions?: {
|
|
1005
|
+
customClaims?: Record<string, any>;
|
|
1006
|
+
templateOptions?: {
|
|
1007
|
+
[x: string]: string;
|
|
1008
|
+
};
|
|
704
1009
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
705
1010
|
maskedPhone: string;
|
|
706
1011
|
}>>;
|
|
707
|
-
|
|
1012
|
+
voice: (loginId: string, URI: string, user?: {
|
|
708
1013
|
email?: string;
|
|
709
1014
|
name?: string;
|
|
1015
|
+
givenName?: string;
|
|
1016
|
+
middleName?: string;
|
|
1017
|
+
familyName?: string;
|
|
710
1018
|
phone?: string;
|
|
1019
|
+
}, signUpOptions?: {
|
|
1020
|
+
customClaims?: Record<string, any>;
|
|
1021
|
+
templateOptions?: {
|
|
1022
|
+
[x: string]: string;
|
|
1023
|
+
};
|
|
711
1024
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
712
1025
|
maskedPhone: string;
|
|
713
1026
|
}>>;
|
|
714
|
-
|
|
1027
|
+
whatsapp: (loginId: string, URI: string, user?: {
|
|
715
1028
|
email?: string;
|
|
716
1029
|
name?: string;
|
|
1030
|
+
givenName?: string;
|
|
1031
|
+
middleName?: string;
|
|
1032
|
+
familyName?: string;
|
|
717
1033
|
phone?: string;
|
|
1034
|
+
}, signUpOptions?: {
|
|
1035
|
+
customClaims?: Record<string, any>;
|
|
1036
|
+
templateOptions?: {
|
|
1037
|
+
[x: string]: string;
|
|
1038
|
+
};
|
|
1039
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1040
|
+
maskedPhone: string;
|
|
1041
|
+
}>>;
|
|
1042
|
+
email: (loginId: string, URI: string, user?: {
|
|
1043
|
+
email?: string;
|
|
1044
|
+
name?: string;
|
|
1045
|
+
givenName?: string;
|
|
1046
|
+
middleName?: string;
|
|
1047
|
+
familyName?: string;
|
|
1048
|
+
phone?: string;
|
|
1049
|
+
}, signUpOptions?: {
|
|
1050
|
+
customClaims?: Record<string, any>;
|
|
1051
|
+
templateOptions?: {
|
|
1052
|
+
[x: string]: string;
|
|
1053
|
+
};
|
|
718
1054
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
719
1055
|
maskedEmail: string;
|
|
720
1056
|
}>>;
|
|
721
1057
|
};
|
|
722
1058
|
signUpOrIn: {
|
|
723
|
-
sms: (loginId: string,
|
|
1059
|
+
sms: (loginId: string, URI?: string, signUpOptions?: {
|
|
1060
|
+
customClaims?: Record<string, any>;
|
|
1061
|
+
templateOptions?: {
|
|
1062
|
+
[x: string]: string;
|
|
1063
|
+
};
|
|
1064
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1065
|
+
maskedPhone: string;
|
|
1066
|
+
}>>;
|
|
1067
|
+
voice: (loginId: string, URI?: string, signUpOptions?: {
|
|
1068
|
+
customClaims?: Record<string, any>;
|
|
1069
|
+
templateOptions?: {
|
|
1070
|
+
[x: string]: string;
|
|
1071
|
+
};
|
|
1072
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
724
1073
|
maskedPhone: string;
|
|
725
1074
|
}>>;
|
|
726
|
-
whatsapp: (loginId: string,
|
|
1075
|
+
whatsapp: (loginId: string, URI?: string, signUpOptions?: {
|
|
1076
|
+
customClaims?: Record<string, any>;
|
|
1077
|
+
templateOptions?: {
|
|
1078
|
+
[x: string]: string;
|
|
1079
|
+
};
|
|
1080
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
727
1081
|
maskedPhone: string;
|
|
728
1082
|
}>>;
|
|
729
|
-
email: (loginId: string,
|
|
1083
|
+
email: (loginId: string, URI?: string, signUpOptions?: {
|
|
1084
|
+
customClaims?: Record<string, any>;
|
|
1085
|
+
templateOptions?: {
|
|
1086
|
+
[x: string]: string;
|
|
1087
|
+
};
|
|
1088
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
730
1089
|
maskedEmail: string;
|
|
731
1090
|
}>>;
|
|
732
1091
|
};
|
|
733
1092
|
update: {
|
|
734
|
-
email: (loginId: string, email: string, URI?: string, token?: string
|
|
1093
|
+
email: <T_2_1 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
1094
|
+
addToLoginIDs?: T_2_1;
|
|
1095
|
+
onMergeUseExisting?: T_2_1 extends true ? boolean : never;
|
|
1096
|
+
templateOptions?: {
|
|
1097
|
+
[x: string]: string;
|
|
1098
|
+
};
|
|
1099
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
735
1100
|
maskedEmail: string;
|
|
736
1101
|
}>>;
|
|
737
1102
|
phone: {
|
|
738
|
-
sms: (loginId: string, phone: string, URI?: string, token?: string
|
|
1103
|
+
sms: <T_3_3 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
1104
|
+
addToLoginIDs?: T_3_3;
|
|
1105
|
+
onMergeUseExisting?: T_3_3 extends true ? boolean : never;
|
|
1106
|
+
templateOptions?: {
|
|
1107
|
+
[x: string]: string;
|
|
1108
|
+
};
|
|
1109
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1110
|
+
maskedPhone: string;
|
|
1111
|
+
}>>;
|
|
1112
|
+
voice: <T_3_4 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
1113
|
+
addToLoginIDs?: T_3_4;
|
|
1114
|
+
onMergeUseExisting?: T_3_4 extends true ? boolean : never;
|
|
1115
|
+
templateOptions?: {
|
|
1116
|
+
[x: string]: string;
|
|
1117
|
+
};
|
|
1118
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
739
1119
|
maskedPhone: string;
|
|
740
1120
|
}>>;
|
|
741
|
-
whatsapp: (loginId: string, phone: string, URI?: string, token?: string
|
|
1121
|
+
whatsapp: <T_3_5 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
1122
|
+
addToLoginIDs?: T_3_5;
|
|
1123
|
+
onMergeUseExisting?: T_3_5 extends true ? boolean : never;
|
|
1124
|
+
templateOptions?: {
|
|
1125
|
+
[x: string]: string;
|
|
1126
|
+
};
|
|
1127
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
742
1128
|
maskedPhone: string;
|
|
743
1129
|
}>>;
|
|
744
1130
|
};
|
|
@@ -746,102 +1132,92 @@ declare const useDescope: () => ((({
|
|
|
746
1132
|
};
|
|
747
1133
|
enchantedLink: {
|
|
748
1134
|
verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
749
|
-
signIn: (loginId: string,
|
|
750
|
-
signUpOrIn: (loginId: string,
|
|
751
|
-
|
|
1135
|
+
signIn: (loginId: string, URI?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
1136
|
+
signUpOrIn: (loginId: string, URI?: string, signUpOptions?: {
|
|
1137
|
+
customClaims?: Record<string, any>;
|
|
1138
|
+
templateOptions?: {
|
|
1139
|
+
[x: string]: string;
|
|
1140
|
+
};
|
|
1141
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
1142
|
+
signUp: (loginId: string, URI?: string, user?: {
|
|
752
1143
|
email?: string;
|
|
753
1144
|
name?: string;
|
|
1145
|
+
givenName?: string;
|
|
1146
|
+
middleName?: string;
|
|
1147
|
+
familyName?: string;
|
|
754
1148
|
phone?: string;
|
|
1149
|
+
}, signUpOptions?: {
|
|
1150
|
+
customClaims?: Record<string, any>;
|
|
1151
|
+
templateOptions?: {
|
|
1152
|
+
[x: string]: string;
|
|
1153
|
+
};
|
|
755
1154
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
756
1155
|
waitForSession: (pendingRef: string, config?: {
|
|
757
1156
|
pollingIntervalMs: number;
|
|
758
1157
|
timeoutMs: number;
|
|
759
1158
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
760
1159
|
update: {
|
|
761
|
-
email: (loginId: string, email: string, URI?: string, token?: string
|
|
1160
|
+
email: <T_4_1 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
1161
|
+
addToLoginIDs?: T_4_1;
|
|
1162
|
+
onMergeUseExisting?: T_4_1 extends true ? boolean : never;
|
|
1163
|
+
templateOptions?: {
|
|
1164
|
+
[x: string]: string;
|
|
1165
|
+
};
|
|
1166
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
762
1167
|
};
|
|
763
1168
|
};
|
|
764
1169
|
oauth: {
|
|
765
|
-
start: {
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
776
|
-
google: <B_2_1 extends {
|
|
777
|
-
redirect: boolean;
|
|
778
|
-
}>(redirectURL?: string, config?: B_2_1) => Promise<B_2_1 extends {
|
|
779
|
-
redirect: true;
|
|
780
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
781
|
-
microsoft: <B_3_1 extends {
|
|
782
|
-
redirect: boolean;
|
|
783
|
-
}>(redirectURL?: string, config?: B_3_1) => Promise<B_3_1 extends {
|
|
784
|
-
redirect: true;
|
|
785
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
786
|
-
gitlab: <B_4_1 extends {
|
|
787
|
-
redirect: boolean;
|
|
788
|
-
}>(redirectURL?: string, config?: B_4_1) => Promise<B_4_1 extends {
|
|
789
|
-
redirect: true;
|
|
790
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
791
|
-
apple: <B_5_1 extends {
|
|
792
|
-
redirect: boolean;
|
|
793
|
-
}>(redirectURL?: string, config?: B_5_1) => Promise<B_5_1 extends {
|
|
794
|
-
redirect: true;
|
|
795
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
796
|
-
discord: <B_6_1 extends {
|
|
797
|
-
redirect: boolean;
|
|
798
|
-
}>(redirectURL?: string, config?: B_6_1) => Promise<B_6_1 extends {
|
|
799
|
-
redirect: true;
|
|
800
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
801
|
-
linkedin: <B_7_1 extends {
|
|
802
|
-
redirect: boolean;
|
|
803
|
-
}>(redirectURL?: string, config?: B_7_1) => Promise<B_7_1 extends {
|
|
804
|
-
redirect: true;
|
|
805
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1170
|
+
start: ((provider: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>) & {
|
|
1171
|
+
google: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1172
|
+
facebook: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1173
|
+
github: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1174
|
+
microsoft: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1175
|
+
gitlab: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1176
|
+
apple: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1177
|
+
discord: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1178
|
+
linkedin: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1179
|
+
slack: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
806
1180
|
};
|
|
807
1181
|
exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1182
|
+
startNative: (provider: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
1183
|
+
finishNative: (provider: string, stateId: string, user?: string, code?: string, idToken?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
808
1184
|
};
|
|
809
1185
|
saml: {
|
|
810
|
-
start:
|
|
811
|
-
redirect: boolean;
|
|
812
|
-
}>(tenantNameOrEmail: string, config?: B_1_3) => Promise<B_1_3 extends {
|
|
813
|
-
redirect: true;
|
|
814
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1186
|
+
start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
815
1187
|
exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
816
1188
|
};
|
|
817
1189
|
totp: {
|
|
818
1190
|
signUp: (loginId: string, user?: {
|
|
819
1191
|
email?: string;
|
|
820
1192
|
name?: string;
|
|
1193
|
+
givenName?: string;
|
|
1194
|
+
middleName?: string;
|
|
1195
|
+
familyName?: string;
|
|
821
1196
|
phone?: string;
|
|
822
1197
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.TOTPResponse>>;
|
|
823
|
-
verify: (loginId: string, code: string, loginOptions?:
|
|
824
|
-
stepup?: boolean;
|
|
825
|
-
mfa?: boolean;
|
|
826
|
-
customClaims?: Record<string, any>;
|
|
827
|
-
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1198
|
+
verify: (loginId: string, code: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
828
1199
|
update: (loginId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.TOTPResponse>>;
|
|
829
1200
|
};
|
|
830
1201
|
password: {
|
|
831
1202
|
signUp: (loginId: string, password: string, user?: {
|
|
832
1203
|
email?: string;
|
|
833
1204
|
name?: string;
|
|
1205
|
+
givenName?: string;
|
|
1206
|
+
middleName?: string;
|
|
1207
|
+
familyName?: string;
|
|
834
1208
|
phone?: string;
|
|
835
1209
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
836
1210
|
signIn: (loginId: string, password: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
837
|
-
sendReset: (loginId: string, redirectUrl?: string
|
|
1211
|
+
sendReset: (loginId: string, redirectUrl?: string, templateOptions?: {
|
|
1212
|
+
[x: string]: string;
|
|
1213
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
838
1214
|
resetMethod: string;
|
|
839
1215
|
pendingRef?: string;
|
|
840
1216
|
linkId?: string;
|
|
841
1217
|
maskedEmail: string;
|
|
842
1218
|
}>>;
|
|
843
1219
|
update: (loginId: string, newPassword: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
844
|
-
replace: (loginId: string, oldPassword: string, newPassword: string) => Promise<_descope_core_js_sdk.SdkResponse<
|
|
1220
|
+
replace: (loginId: string, oldPassword: string, newPassword: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
845
1221
|
policy: () => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
846
1222
|
minLength: number;
|
|
847
1223
|
lowercase: boolean;
|
|
@@ -851,10 +1227,13 @@ declare const useDescope: () => ((({
|
|
|
851
1227
|
}>>;
|
|
852
1228
|
};
|
|
853
1229
|
refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1230
|
+
selectTenant: (tenantId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
854
1231
|
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
855
1232
|
logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
856
1233
|
me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
|
|
1234
|
+
history: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserHistoryResponse>>;
|
|
857
1235
|
isJwtExpired: (token: string) => boolean;
|
|
1236
|
+
getTenants: (token: string) => string[];
|
|
858
1237
|
getJwtPermissions: (token: string, tenant?: string) => string[];
|
|
859
1238
|
getJwtRoles: (token: string, tenant?: string) => string[];
|
|
860
1239
|
httpClient: {
|
|
@@ -879,7 +1258,7 @@ declare const useDescope: () => ((({
|
|
|
879
1258
|
};
|
|
880
1259
|
token?: string;
|
|
881
1260
|
}) => Promise<Response>;
|
|
882
|
-
delete: (path: string,
|
|
1261
|
+
delete: (path: string, config?: {
|
|
883
1262
|
headers?: HeadersInit;
|
|
884
1263
|
queryParams?: {
|
|
885
1264
|
[key: string]: string;
|
|
@@ -901,6 +1280,7 @@ declare const useDescope: () => ((({
|
|
|
901
1280
|
flow: {
|
|
902
1281
|
start: (flowId: string, options?: Pick<{
|
|
903
1282
|
redirectUrl?: string;
|
|
1283
|
+
location?: string;
|
|
904
1284
|
tenant?: string;
|
|
905
1285
|
deviceInfo?: {
|
|
906
1286
|
webAuthnSupport?: boolean;
|
|
@@ -911,17 +1291,30 @@ declare const useDescope: () => ((({
|
|
|
911
1291
|
name?: string;
|
|
912
1292
|
loginId?: string;
|
|
913
1293
|
};
|
|
914
|
-
|
|
1294
|
+
redirectAuth?: {
|
|
1295
|
+
callbackUrl: string;
|
|
1296
|
+
codeChallenge: string;
|
|
1297
|
+
};
|
|
1298
|
+
oidcIdpStateId?: string;
|
|
1299
|
+
preview?: boolean;
|
|
1300
|
+
samlIdpStateId?: string;
|
|
1301
|
+
samlIdpUsername?: string;
|
|
1302
|
+
ssoAppId?: string;
|
|
1303
|
+
oidcLoginHint?: string;
|
|
1304
|
+
abTestingKey?: number;
|
|
1305
|
+
startOptionsVersion?: number;
|
|
1306
|
+
client?: Record<string, any>;
|
|
1307
|
+
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client"> & {
|
|
915
1308
|
lastAuth?: Omit<{
|
|
916
1309
|
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
917
1310
|
oauthProvider?: string;
|
|
918
1311
|
name?: string;
|
|
919
1312
|
loginId?: string;
|
|
920
1313
|
}, "loginId" | "name">;
|
|
921
|
-
}, conditionInteractionId?: string, interactionId?: string, input?: {
|
|
1314
|
+
}, conditionInteractionId?: string, interactionId?: string, version?: number, componentsVersion?: string, input?: {
|
|
922
1315
|
[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[])[])[])[])[])[])[])[])[])[])[];
|
|
923
1316
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
924
|
-
next: (executionId: string, stepId: string, interactionId: string, input?: {
|
|
1317
|
+
next: (executionId: string, stepId: string, interactionId: string, version?: number, componentsVersion?: string, input?: {
|
|
925
1318
|
[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[])[])[])[])[])[])[])[])[])[])[];
|
|
926
1319
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
927
1320
|
};
|
|
@@ -935,11 +1328,7 @@ declare const useDescope: () => ((({
|
|
|
935
1328
|
finish: (transactionId: string, response: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
936
1329
|
};
|
|
937
1330
|
signIn: ((identifier: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
|
|
938
|
-
start: (loginId: string, origin: string, loginOptions?: {
|
|
939
|
-
stepup?: boolean;
|
|
940
|
-
mfa?: boolean;
|
|
941
|
-
customClaims?: Record<string, any>;
|
|
942
|
-
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1331
|
+
start: (loginId: string, origin: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
943
1332
|
transactionId: string;
|
|
944
1333
|
options: string;
|
|
945
1334
|
create: boolean;
|
|
@@ -968,23 +1357,30 @@ declare const useDescope: () => ((({
|
|
|
968
1357
|
conditional: (options: string, abort: AbortController) => Promise<string>;
|
|
969
1358
|
};
|
|
970
1359
|
};
|
|
1360
|
+
fedcm: {
|
|
1361
|
+
oneTap(provider?: string, oneTapConfig?: _descope_web_js_sdk.OneTapConfig, loginOptions?: _descope_core_js_sdk.LoginOptions, onSkip?: () => void): Promise<unknown>;
|
|
1362
|
+
};
|
|
971
1363
|
accessKey: {
|
|
972
|
-
exchange: (accessKey: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
|
|
1364
|
+
exchange: (accessKey: string, loginOptions?: _descope_core_js_sdk.AccessKeyLoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
|
|
973
1365
|
};
|
|
974
1366
|
otp: {
|
|
975
1367
|
verify: {
|
|
976
1368
|
sms: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1369
|
+
voice: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
977
1370
|
whatsapp: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
978
1371
|
email: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
979
1372
|
};
|
|
980
1373
|
signIn: {
|
|
981
|
-
sms: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1374
|
+
sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1375
|
+
maskedPhone: string;
|
|
1376
|
+
}>>;
|
|
1377
|
+
voice: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
982
1378
|
maskedPhone: string;
|
|
983
1379
|
}>>;
|
|
984
|
-
whatsapp: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1380
|
+
whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
985
1381
|
maskedPhone: string;
|
|
986
1382
|
}>>;
|
|
987
|
-
email: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1383
|
+
email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
988
1384
|
maskedEmail: string;
|
|
989
1385
|
}>>;
|
|
990
1386
|
};
|
|
@@ -992,45 +1388,114 @@ declare const useDescope: () => ((({
|
|
|
992
1388
|
sms: (loginId: string, user?: {
|
|
993
1389
|
email?: string;
|
|
994
1390
|
name?: string;
|
|
1391
|
+
givenName?: string;
|
|
1392
|
+
middleName?: string;
|
|
1393
|
+
familyName?: string;
|
|
1394
|
+
phone?: string;
|
|
1395
|
+
}, signUpOptions?: {
|
|
1396
|
+
customClaims?: Record<string, any>;
|
|
1397
|
+
templateOptions?: {
|
|
1398
|
+
[x: string]: string;
|
|
1399
|
+
};
|
|
1400
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1401
|
+
maskedPhone: string;
|
|
1402
|
+
}>>;
|
|
1403
|
+
voice: (loginId: string, user?: {
|
|
1404
|
+
email?: string;
|
|
1405
|
+
name?: string;
|
|
1406
|
+
givenName?: string;
|
|
1407
|
+
middleName?: string;
|
|
1408
|
+
familyName?: string;
|
|
995
1409
|
phone?: string;
|
|
1410
|
+
}, signUpOptions?: {
|
|
1411
|
+
customClaims?: Record<string, any>;
|
|
1412
|
+
templateOptions?: {
|
|
1413
|
+
[x: string]: string;
|
|
1414
|
+
};
|
|
996
1415
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
997
1416
|
maskedPhone: string;
|
|
998
1417
|
}>>;
|
|
999
1418
|
whatsapp: (loginId: string, user?: {
|
|
1000
1419
|
email?: string;
|
|
1001
1420
|
name?: string;
|
|
1421
|
+
givenName?: string;
|
|
1422
|
+
middleName?: string;
|
|
1423
|
+
familyName?: string;
|
|
1002
1424
|
phone?: string;
|
|
1425
|
+
}, signUpOptions?: {
|
|
1426
|
+
customClaims?: Record<string, any>;
|
|
1427
|
+
templateOptions?: {
|
|
1428
|
+
[x: string]: string;
|
|
1429
|
+
};
|
|
1003
1430
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1004
1431
|
maskedPhone: string;
|
|
1005
1432
|
}>>;
|
|
1006
1433
|
email: (loginId: string, user?: {
|
|
1007
1434
|
email?: string;
|
|
1008
1435
|
name?: string;
|
|
1436
|
+
givenName?: string;
|
|
1437
|
+
middleName?: string;
|
|
1438
|
+
familyName?: string;
|
|
1009
1439
|
phone?: string;
|
|
1440
|
+
}, signUpOptions?: {
|
|
1441
|
+
customClaims?: Record<string, any>;
|
|
1442
|
+
templateOptions?: {
|
|
1443
|
+
[x: string]: string;
|
|
1444
|
+
};
|
|
1010
1445
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1011
1446
|
maskedEmail: string;
|
|
1012
1447
|
}>>;
|
|
1013
1448
|
};
|
|
1014
1449
|
signUpOrIn: {
|
|
1015
|
-
sms: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1450
|
+
sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1016
1451
|
maskedPhone: string;
|
|
1017
1452
|
}>>;
|
|
1018
|
-
|
|
1453
|
+
voice: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1019
1454
|
maskedPhone: string;
|
|
1020
1455
|
}>>;
|
|
1021
|
-
|
|
1456
|
+
whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1457
|
+
maskedPhone: string;
|
|
1458
|
+
}>>;
|
|
1459
|
+
email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1022
1460
|
maskedEmail: string;
|
|
1023
1461
|
}>>;
|
|
1024
1462
|
};
|
|
1025
1463
|
update: {
|
|
1026
|
-
email: (loginId: string, email: string, token?: string
|
|
1464
|
+
email: <T_6 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
|
|
1465
|
+
addToLoginIDs?: T_6;
|
|
1466
|
+
onMergeUseExisting?: T_6 extends true ? boolean : never;
|
|
1467
|
+
templateOptions?: {
|
|
1468
|
+
[x: string]: string;
|
|
1469
|
+
};
|
|
1470
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1027
1471
|
maskedEmail: string;
|
|
1028
1472
|
}>>;
|
|
1029
1473
|
phone: {
|
|
1030
|
-
sms: (loginId: string, phone: string, token?: string
|
|
1474
|
+
sms: <T_1_6 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
1475
|
+
addToLoginIDs?: T_1_6;
|
|
1476
|
+
onMergeUseExisting?: T_1_6 extends true ? boolean : never;
|
|
1477
|
+
templateOptions?: {
|
|
1478
|
+
[x: string]: string;
|
|
1479
|
+
};
|
|
1480
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1031
1481
|
maskedPhone: string;
|
|
1032
1482
|
}>>;
|
|
1033
|
-
|
|
1483
|
+
voice: <T_1_7 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
1484
|
+
addToLoginIDs?: T_1_7;
|
|
1485
|
+
onMergeUseExisting?: T_1_7 extends true ? boolean : never;
|
|
1486
|
+
templateOptions?: {
|
|
1487
|
+
[x: string]: string;
|
|
1488
|
+
};
|
|
1489
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1490
|
+
maskedPhone: string;
|
|
1491
|
+
}>>;
|
|
1492
|
+
whatsapp: <T_1_8 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
1493
|
+
addToLoginIDs?: T_1_8;
|
|
1494
|
+
onMergeUseExisting?: T_1_8 extends true ? boolean : never;
|
|
1495
|
+
templateOptions?: {
|
|
1496
|
+
[x: string]: string;
|
|
1497
|
+
};
|
|
1498
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1034
1499
|
maskedPhone: string;
|
|
1035
1500
|
}>>;
|
|
1036
1501
|
};
|
|
@@ -1039,59 +1504,151 @@ declare const useDescope: () => ((({
|
|
|
1039
1504
|
magicLink: {
|
|
1040
1505
|
verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1041
1506
|
signIn: {
|
|
1042
|
-
sms: (loginId: string,
|
|
1507
|
+
sms: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1508
|
+
maskedPhone: string;
|
|
1509
|
+
}>>;
|
|
1510
|
+
voice: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1043
1511
|
maskedPhone: string;
|
|
1044
1512
|
}>>;
|
|
1045
|
-
whatsapp: (loginId: string,
|
|
1513
|
+
whatsapp: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1046
1514
|
maskedPhone: string;
|
|
1047
1515
|
}>>;
|
|
1048
|
-
email: (loginId: string,
|
|
1516
|
+
email: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1049
1517
|
maskedEmail: string;
|
|
1050
1518
|
}>>;
|
|
1051
1519
|
};
|
|
1052
1520
|
signUp: {
|
|
1053
|
-
sms: (loginId: string,
|
|
1521
|
+
sms: (loginId: string, URI: string, user?: {
|
|
1054
1522
|
email?: string;
|
|
1055
1523
|
name?: string;
|
|
1524
|
+
givenName?: string;
|
|
1525
|
+
middleName?: string;
|
|
1526
|
+
familyName?: string;
|
|
1056
1527
|
phone?: string;
|
|
1528
|
+
}, signUpOptions?: {
|
|
1529
|
+
customClaims?: Record<string, any>;
|
|
1530
|
+
templateOptions?: {
|
|
1531
|
+
[x: string]: string;
|
|
1532
|
+
};
|
|
1057
1533
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1058
1534
|
maskedPhone: string;
|
|
1059
1535
|
}>>;
|
|
1060
|
-
|
|
1536
|
+
voice: (loginId: string, URI: string, user?: {
|
|
1061
1537
|
email?: string;
|
|
1062
1538
|
name?: string;
|
|
1539
|
+
givenName?: string;
|
|
1540
|
+
middleName?: string;
|
|
1541
|
+
familyName?: string;
|
|
1063
1542
|
phone?: string;
|
|
1543
|
+
}, signUpOptions?: {
|
|
1544
|
+
customClaims?: Record<string, any>;
|
|
1545
|
+
templateOptions?: {
|
|
1546
|
+
[x: string]: string;
|
|
1547
|
+
};
|
|
1064
1548
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1065
1549
|
maskedPhone: string;
|
|
1066
1550
|
}>>;
|
|
1067
|
-
|
|
1551
|
+
whatsapp: (loginId: string, URI: string, user?: {
|
|
1068
1552
|
email?: string;
|
|
1069
1553
|
name?: string;
|
|
1554
|
+
givenName?: string;
|
|
1555
|
+
middleName?: string;
|
|
1556
|
+
familyName?: string;
|
|
1070
1557
|
phone?: string;
|
|
1558
|
+
}, signUpOptions?: {
|
|
1559
|
+
customClaims?: Record<string, any>;
|
|
1560
|
+
templateOptions?: {
|
|
1561
|
+
[x: string]: string;
|
|
1562
|
+
};
|
|
1563
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1564
|
+
maskedPhone: string;
|
|
1565
|
+
}>>;
|
|
1566
|
+
email: (loginId: string, URI: string, user?: {
|
|
1567
|
+
email?: string;
|
|
1568
|
+
name?: string;
|
|
1569
|
+
givenName?: string;
|
|
1570
|
+
middleName?: string;
|
|
1571
|
+
familyName?: string;
|
|
1572
|
+
phone?: string;
|
|
1573
|
+
}, signUpOptions?: {
|
|
1574
|
+
customClaims?: Record<string, any>;
|
|
1575
|
+
templateOptions?: {
|
|
1576
|
+
[x: string]: string;
|
|
1577
|
+
};
|
|
1071
1578
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1072
1579
|
maskedEmail: string;
|
|
1073
1580
|
}>>;
|
|
1074
1581
|
};
|
|
1075
1582
|
signUpOrIn: {
|
|
1076
|
-
sms: (loginId: string,
|
|
1583
|
+
sms: (loginId: string, URI?: string, signUpOptions?: {
|
|
1584
|
+
customClaims?: Record<string, any>;
|
|
1585
|
+
templateOptions?: {
|
|
1586
|
+
[x: string]: string;
|
|
1587
|
+
};
|
|
1588
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1589
|
+
maskedPhone: string;
|
|
1590
|
+
}>>;
|
|
1591
|
+
voice: (loginId: string, URI?: string, signUpOptions?: {
|
|
1592
|
+
customClaims?: Record<string, any>;
|
|
1593
|
+
templateOptions?: {
|
|
1594
|
+
[x: string]: string;
|
|
1595
|
+
};
|
|
1596
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1077
1597
|
maskedPhone: string;
|
|
1078
1598
|
}>>;
|
|
1079
|
-
whatsapp: (loginId: string,
|
|
1599
|
+
whatsapp: (loginId: string, URI?: string, signUpOptions?: {
|
|
1600
|
+
customClaims?: Record<string, any>;
|
|
1601
|
+
templateOptions?: {
|
|
1602
|
+
[x: string]: string;
|
|
1603
|
+
};
|
|
1604
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1080
1605
|
maskedPhone: string;
|
|
1081
1606
|
}>>;
|
|
1082
|
-
email: (loginId: string,
|
|
1607
|
+
email: (loginId: string, URI?: string, signUpOptions?: {
|
|
1608
|
+
customClaims?: Record<string, any>;
|
|
1609
|
+
templateOptions?: {
|
|
1610
|
+
[x: string]: string;
|
|
1611
|
+
};
|
|
1612
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1083
1613
|
maskedEmail: string;
|
|
1084
1614
|
}>>;
|
|
1085
1615
|
};
|
|
1086
1616
|
update: {
|
|
1087
|
-
email: (loginId: string, email: string, URI?: string, token?: string
|
|
1617
|
+
email: <T_2_2 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
1618
|
+
addToLoginIDs?: T_2_2;
|
|
1619
|
+
onMergeUseExisting?: T_2_2 extends true ? boolean : never;
|
|
1620
|
+
templateOptions?: {
|
|
1621
|
+
[x: string]: string;
|
|
1622
|
+
};
|
|
1623
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1088
1624
|
maskedEmail: string;
|
|
1089
1625
|
}>>;
|
|
1090
1626
|
phone: {
|
|
1091
|
-
sms: (loginId: string, phone: string, URI?: string, token?: string
|
|
1627
|
+
sms: <T_3_6 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
1628
|
+
addToLoginIDs?: T_3_6;
|
|
1629
|
+
onMergeUseExisting?: T_3_6 extends true ? boolean : never;
|
|
1630
|
+
templateOptions?: {
|
|
1631
|
+
[x: string]: string;
|
|
1632
|
+
};
|
|
1633
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1092
1634
|
maskedPhone: string;
|
|
1093
1635
|
}>>;
|
|
1094
|
-
|
|
1636
|
+
voice: <T_3_7 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
1637
|
+
addToLoginIDs?: T_3_7;
|
|
1638
|
+
onMergeUseExisting?: T_3_7 extends true ? boolean : never;
|
|
1639
|
+
templateOptions?: {
|
|
1640
|
+
[x: string]: string;
|
|
1641
|
+
};
|
|
1642
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1643
|
+
maskedPhone: string;
|
|
1644
|
+
}>>;
|
|
1645
|
+
whatsapp: <T_3_8 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
1646
|
+
addToLoginIDs?: T_3_8;
|
|
1647
|
+
onMergeUseExisting?: T_3_8 extends true ? boolean : never;
|
|
1648
|
+
templateOptions?: {
|
|
1649
|
+
[x: string]: string;
|
|
1650
|
+
};
|
|
1651
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1095
1652
|
maskedPhone: string;
|
|
1096
1653
|
}>>;
|
|
1097
1654
|
};
|
|
@@ -1099,102 +1656,92 @@ declare const useDescope: () => ((({
|
|
|
1099
1656
|
};
|
|
1100
1657
|
enchantedLink: {
|
|
1101
1658
|
verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
1102
|
-
signIn: (loginId: string,
|
|
1103
|
-
signUpOrIn: (loginId: string,
|
|
1104
|
-
|
|
1659
|
+
signIn: (loginId: string, URI?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
1660
|
+
signUpOrIn: (loginId: string, URI?: string, signUpOptions?: {
|
|
1661
|
+
customClaims?: Record<string, any>;
|
|
1662
|
+
templateOptions?: {
|
|
1663
|
+
[x: string]: string;
|
|
1664
|
+
};
|
|
1665
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
1666
|
+
signUp: (loginId: string, URI?: string, user?: {
|
|
1105
1667
|
email?: string;
|
|
1106
1668
|
name?: string;
|
|
1669
|
+
givenName?: string;
|
|
1670
|
+
middleName?: string;
|
|
1671
|
+
familyName?: string;
|
|
1107
1672
|
phone?: string;
|
|
1673
|
+
}, signUpOptions?: {
|
|
1674
|
+
customClaims?: Record<string, any>;
|
|
1675
|
+
templateOptions?: {
|
|
1676
|
+
[x: string]: string;
|
|
1677
|
+
};
|
|
1108
1678
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
1109
1679
|
waitForSession: (pendingRef: string, config?: {
|
|
1110
1680
|
pollingIntervalMs: number;
|
|
1111
1681
|
timeoutMs: number;
|
|
1112
1682
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1113
1683
|
update: {
|
|
1114
|
-
email: (loginId: string, email: string, URI?: string, token?: string
|
|
1684
|
+
email: <T_4_2 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
1685
|
+
addToLoginIDs?: T_4_2;
|
|
1686
|
+
onMergeUseExisting?: T_4_2 extends true ? boolean : never;
|
|
1687
|
+
templateOptions?: {
|
|
1688
|
+
[x: string]: string;
|
|
1689
|
+
};
|
|
1690
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
1115
1691
|
};
|
|
1116
1692
|
};
|
|
1117
1693
|
oauth: {
|
|
1118
|
-
start: {
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1129
|
-
google: <B_2_2 extends {
|
|
1130
|
-
redirect: boolean;
|
|
1131
|
-
}>(redirectURL?: string, config?: B_2_2) => Promise<B_2_2 extends {
|
|
1132
|
-
redirect: true;
|
|
1133
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1134
|
-
microsoft: <B_3_2 extends {
|
|
1135
|
-
redirect: boolean;
|
|
1136
|
-
}>(redirectURL?: string, config?: B_3_2) => Promise<B_3_2 extends {
|
|
1137
|
-
redirect: true;
|
|
1138
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1139
|
-
gitlab: <B_4_2 extends {
|
|
1140
|
-
redirect: boolean;
|
|
1141
|
-
}>(redirectURL?: string, config?: B_4_2) => Promise<B_4_2 extends {
|
|
1142
|
-
redirect: true;
|
|
1143
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1144
|
-
apple: <B_5_2 extends {
|
|
1145
|
-
redirect: boolean;
|
|
1146
|
-
}>(redirectURL?: string, config?: B_5_2) => Promise<B_5_2 extends {
|
|
1147
|
-
redirect: true;
|
|
1148
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1149
|
-
discord: <B_6_2 extends {
|
|
1150
|
-
redirect: boolean;
|
|
1151
|
-
}>(redirectURL?: string, config?: B_6_2) => Promise<B_6_2 extends {
|
|
1152
|
-
redirect: true;
|
|
1153
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1154
|
-
linkedin: <B_7_2 extends {
|
|
1155
|
-
redirect: boolean;
|
|
1156
|
-
}>(redirectURL?: string, config?: B_7_2) => Promise<B_7_2 extends {
|
|
1157
|
-
redirect: true;
|
|
1158
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1694
|
+
start: ((provider: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>) & {
|
|
1695
|
+
google: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1696
|
+
facebook: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1697
|
+
github: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1698
|
+
microsoft: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1699
|
+
gitlab: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1700
|
+
apple: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1701
|
+
discord: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1702
|
+
linkedin: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1703
|
+
slack: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1159
1704
|
};
|
|
1160
1705
|
exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1706
|
+
startNative: (provider: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
1707
|
+
finishNative: (provider: string, stateId: string, user?: string, code?: string, idToken?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
1161
1708
|
};
|
|
1162
1709
|
saml: {
|
|
1163
|
-
start:
|
|
1164
|
-
redirect: boolean;
|
|
1165
|
-
}>(tenantNameOrEmail: string, config?: B_1_5) => Promise<B_1_5 extends {
|
|
1166
|
-
redirect: true;
|
|
1167
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1710
|
+
start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1168
1711
|
exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1169
1712
|
};
|
|
1170
1713
|
totp: {
|
|
1171
1714
|
signUp: (loginId: string, user?: {
|
|
1172
1715
|
email?: string;
|
|
1173
1716
|
name?: string;
|
|
1717
|
+
givenName?: string;
|
|
1718
|
+
middleName?: string;
|
|
1719
|
+
familyName?: string;
|
|
1174
1720
|
phone?: string;
|
|
1175
1721
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.TOTPResponse>>;
|
|
1176
|
-
verify: (loginId: string, code: string, loginOptions?:
|
|
1177
|
-
stepup?: boolean;
|
|
1178
|
-
mfa?: boolean;
|
|
1179
|
-
customClaims?: Record<string, any>;
|
|
1180
|
-
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1722
|
+
verify: (loginId: string, code: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1181
1723
|
update: (loginId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.TOTPResponse>>;
|
|
1182
1724
|
};
|
|
1183
1725
|
password: {
|
|
1184
1726
|
signUp: (loginId: string, password: string, user?: {
|
|
1185
1727
|
email?: string;
|
|
1186
1728
|
name?: string;
|
|
1729
|
+
givenName?: string;
|
|
1730
|
+
middleName?: string;
|
|
1731
|
+
familyName?: string;
|
|
1187
1732
|
phone?: string;
|
|
1188
1733
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1189
1734
|
signIn: (loginId: string, password: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1190
|
-
sendReset: (loginId: string, redirectUrl?: string
|
|
1735
|
+
sendReset: (loginId: string, redirectUrl?: string, templateOptions?: {
|
|
1736
|
+
[x: string]: string;
|
|
1737
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1191
1738
|
resetMethod: string;
|
|
1192
1739
|
pendingRef?: string;
|
|
1193
1740
|
linkId?: string;
|
|
1194
1741
|
maskedEmail: string;
|
|
1195
1742
|
}>>;
|
|
1196
1743
|
update: (loginId: string, newPassword: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
1197
|
-
replace: (loginId: string, oldPassword: string, newPassword: string) => Promise<_descope_core_js_sdk.SdkResponse<
|
|
1744
|
+
replace: (loginId: string, oldPassword: string, newPassword: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1198
1745
|
policy: () => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1199
1746
|
minLength: number;
|
|
1200
1747
|
lowercase: boolean;
|
|
@@ -1204,10 +1751,13 @@ declare const useDescope: () => ((({
|
|
|
1204
1751
|
}>>;
|
|
1205
1752
|
};
|
|
1206
1753
|
refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1754
|
+
selectTenant: (tenantId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1207
1755
|
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
1208
1756
|
logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
1209
1757
|
me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
|
|
1758
|
+
history: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserHistoryResponse>>;
|
|
1210
1759
|
isJwtExpired: (token: string) => boolean;
|
|
1760
|
+
getTenants: (token: string) => string[];
|
|
1211
1761
|
getJwtPermissions: (token: string, tenant?: string) => string[];
|
|
1212
1762
|
getJwtRoles: (token: string, tenant?: string) => string[];
|
|
1213
1763
|
httpClient: {
|
|
@@ -1232,7 +1782,7 @@ declare const useDescope: () => ((({
|
|
|
1232
1782
|
};
|
|
1233
1783
|
token?: string;
|
|
1234
1784
|
}) => Promise<Response>;
|
|
1235
|
-
delete: (path: string,
|
|
1785
|
+
delete: (path: string, config?: {
|
|
1236
1786
|
headers?: HeadersInit;
|
|
1237
1787
|
queryParams?: {
|
|
1238
1788
|
[key: string]: string;
|
|
@@ -1248,6 +1798,7 @@ declare const useDescope: () => ((({
|
|
|
1248
1798
|
flow: {
|
|
1249
1799
|
start: (flowId: string, options?: Pick<{
|
|
1250
1800
|
redirectUrl?: string;
|
|
1801
|
+
location?: string;
|
|
1251
1802
|
tenant?: string;
|
|
1252
1803
|
deviceInfo?: {
|
|
1253
1804
|
webAuthnSupport?: boolean;
|
|
@@ -1258,17 +1809,30 @@ declare const useDescope: () => ((({
|
|
|
1258
1809
|
name?: string;
|
|
1259
1810
|
loginId?: string;
|
|
1260
1811
|
};
|
|
1261
|
-
|
|
1812
|
+
redirectAuth?: {
|
|
1813
|
+
callbackUrl: string;
|
|
1814
|
+
codeChallenge: string;
|
|
1815
|
+
};
|
|
1816
|
+
oidcIdpStateId?: string;
|
|
1817
|
+
preview?: boolean;
|
|
1818
|
+
samlIdpStateId?: string;
|
|
1819
|
+
samlIdpUsername?: string;
|
|
1820
|
+
ssoAppId?: string;
|
|
1821
|
+
oidcLoginHint?: string;
|
|
1822
|
+
abTestingKey?: number;
|
|
1823
|
+
startOptionsVersion?: number;
|
|
1824
|
+
client?: Record<string, any>;
|
|
1825
|
+
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client"> & {
|
|
1262
1826
|
lastAuth?: Omit<{
|
|
1263
1827
|
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
1264
1828
|
oauthProvider?: string;
|
|
1265
1829
|
name?: string;
|
|
1266
1830
|
loginId?: string;
|
|
1267
1831
|
}, "loginId" | "name">;
|
|
1268
|
-
}, conditionInteractionId?: string, interactionId?: string, input?: {
|
|
1832
|
+
}, conditionInteractionId?: string, interactionId?: string, version?: number, componentsVersion?: string, input?: {
|
|
1269
1833
|
[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[])[])[])[])[])[])[])[])[])[])[];
|
|
1270
1834
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
1271
|
-
next: (executionId: string, stepId: string, interactionId: string, input?: {
|
|
1835
|
+
next: (executionId: string, stepId: string, interactionId: string, version?: number, componentsVersion?: string, input?: {
|
|
1272
1836
|
[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[])[])[])[])[])[])[])[])[])[])[];
|
|
1273
1837
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
1274
1838
|
};
|
|
@@ -1282,11 +1846,7 @@ declare const useDescope: () => ((({
|
|
|
1282
1846
|
finish: (transactionId: string, response: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1283
1847
|
};
|
|
1284
1848
|
signIn: ((identifier: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
|
|
1285
|
-
start: (loginId: string, origin: string, loginOptions?: {
|
|
1286
|
-
stepup?: boolean;
|
|
1287
|
-
mfa?: boolean;
|
|
1288
|
-
customClaims?: Record<string, any>;
|
|
1289
|
-
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1849
|
+
start: (loginId: string, origin: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1290
1850
|
transactionId: string;
|
|
1291
1851
|
options: string;
|
|
1292
1852
|
create: boolean;
|
|
@@ -1315,23 +1875,30 @@ declare const useDescope: () => ((({
|
|
|
1315
1875
|
conditional: (options: string, abort: AbortController) => Promise<string>;
|
|
1316
1876
|
};
|
|
1317
1877
|
};
|
|
1878
|
+
fedcm: {
|
|
1879
|
+
oneTap(provider?: string, oneTapConfig?: _descope_web_js_sdk.OneTapConfig, loginOptions?: _descope_core_js_sdk.LoginOptions, onSkip?: () => void): Promise<unknown>;
|
|
1880
|
+
};
|
|
1318
1881
|
accessKey: {
|
|
1319
|
-
exchange: (accessKey: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
|
|
1882
|
+
exchange: (accessKey: string, loginOptions?: _descope_core_js_sdk.AccessKeyLoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
|
|
1320
1883
|
};
|
|
1321
1884
|
otp: {
|
|
1322
1885
|
verify: {
|
|
1323
1886
|
sms: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1887
|
+
voice: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1324
1888
|
whatsapp: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1325
1889
|
email: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1326
1890
|
};
|
|
1327
1891
|
signIn: {
|
|
1328
|
-
sms: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1892
|
+
sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1329
1893
|
maskedPhone: string;
|
|
1330
1894
|
}>>;
|
|
1331
|
-
|
|
1895
|
+
voice: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1332
1896
|
maskedPhone: string;
|
|
1333
1897
|
}>>;
|
|
1334
|
-
|
|
1898
|
+
whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1899
|
+
maskedPhone: string;
|
|
1900
|
+
}>>;
|
|
1901
|
+
email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1335
1902
|
maskedEmail: string;
|
|
1336
1903
|
}>>;
|
|
1337
1904
|
};
|
|
@@ -1339,45 +1906,114 @@ declare const useDescope: () => ((({
|
|
|
1339
1906
|
sms: (loginId: string, user?: {
|
|
1340
1907
|
email?: string;
|
|
1341
1908
|
name?: string;
|
|
1909
|
+
givenName?: string;
|
|
1910
|
+
middleName?: string;
|
|
1911
|
+
familyName?: string;
|
|
1342
1912
|
phone?: string;
|
|
1913
|
+
}, signUpOptions?: {
|
|
1914
|
+
customClaims?: Record<string, any>;
|
|
1915
|
+
templateOptions?: {
|
|
1916
|
+
[x: string]: string;
|
|
1917
|
+
};
|
|
1918
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1919
|
+
maskedPhone: string;
|
|
1920
|
+
}>>;
|
|
1921
|
+
voice: (loginId: string, user?: {
|
|
1922
|
+
email?: string;
|
|
1923
|
+
name?: string;
|
|
1924
|
+
givenName?: string;
|
|
1925
|
+
middleName?: string;
|
|
1926
|
+
familyName?: string;
|
|
1927
|
+
phone?: string;
|
|
1928
|
+
}, signUpOptions?: {
|
|
1929
|
+
customClaims?: Record<string, any>;
|
|
1930
|
+
templateOptions?: {
|
|
1931
|
+
[x: string]: string;
|
|
1932
|
+
};
|
|
1343
1933
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1344
1934
|
maskedPhone: string;
|
|
1345
1935
|
}>>;
|
|
1346
1936
|
whatsapp: (loginId: string, user?: {
|
|
1347
1937
|
email?: string;
|
|
1348
1938
|
name?: string;
|
|
1939
|
+
givenName?: string;
|
|
1940
|
+
middleName?: string;
|
|
1941
|
+
familyName?: string;
|
|
1349
1942
|
phone?: string;
|
|
1943
|
+
}, signUpOptions?: {
|
|
1944
|
+
customClaims?: Record<string, any>;
|
|
1945
|
+
templateOptions?: {
|
|
1946
|
+
[x: string]: string;
|
|
1947
|
+
};
|
|
1350
1948
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1351
1949
|
maskedPhone: string;
|
|
1352
1950
|
}>>;
|
|
1353
1951
|
email: (loginId: string, user?: {
|
|
1354
1952
|
email?: string;
|
|
1355
1953
|
name?: string;
|
|
1954
|
+
givenName?: string;
|
|
1955
|
+
middleName?: string;
|
|
1956
|
+
familyName?: string;
|
|
1356
1957
|
phone?: string;
|
|
1958
|
+
}, signUpOptions?: {
|
|
1959
|
+
customClaims?: Record<string, any>;
|
|
1960
|
+
templateOptions?: {
|
|
1961
|
+
[x: string]: string;
|
|
1962
|
+
};
|
|
1357
1963
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1358
1964
|
maskedEmail: string;
|
|
1359
1965
|
}>>;
|
|
1360
1966
|
};
|
|
1361
1967
|
signUpOrIn: {
|
|
1362
|
-
sms: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1968
|
+
sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1969
|
+
maskedPhone: string;
|
|
1970
|
+
}>>;
|
|
1971
|
+
voice: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1363
1972
|
maskedPhone: string;
|
|
1364
1973
|
}>>;
|
|
1365
|
-
whatsapp: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1974
|
+
whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1366
1975
|
maskedPhone: string;
|
|
1367
1976
|
}>>;
|
|
1368
|
-
email: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1977
|
+
email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1369
1978
|
maskedEmail: string;
|
|
1370
1979
|
}>>;
|
|
1371
1980
|
};
|
|
1372
1981
|
update: {
|
|
1373
|
-
email: (loginId: string, email: string, token?: string
|
|
1982
|
+
email: <T_7 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
|
|
1983
|
+
addToLoginIDs?: T_7;
|
|
1984
|
+
onMergeUseExisting?: T_7 extends true ? boolean : never;
|
|
1985
|
+
templateOptions?: {
|
|
1986
|
+
[x: string]: string;
|
|
1987
|
+
};
|
|
1988
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1374
1989
|
maskedEmail: string;
|
|
1375
1990
|
}>>;
|
|
1376
1991
|
phone: {
|
|
1377
|
-
sms: (loginId: string, phone: string, token?: string
|
|
1992
|
+
sms: <T_1_9 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
1993
|
+
addToLoginIDs?: T_1_9;
|
|
1994
|
+
onMergeUseExisting?: T_1_9 extends true ? boolean : never;
|
|
1995
|
+
templateOptions?: {
|
|
1996
|
+
[x: string]: string;
|
|
1997
|
+
};
|
|
1998
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1999
|
+
maskedPhone: string;
|
|
2000
|
+
}>>;
|
|
2001
|
+
voice: <T_1_10 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
2002
|
+
addToLoginIDs?: T_1_10;
|
|
2003
|
+
onMergeUseExisting?: T_1_10 extends true ? boolean : never;
|
|
2004
|
+
templateOptions?: {
|
|
2005
|
+
[x: string]: string;
|
|
2006
|
+
};
|
|
2007
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1378
2008
|
maskedPhone: string;
|
|
1379
2009
|
}>>;
|
|
1380
|
-
whatsapp: (loginId: string, phone: string, token?: string
|
|
2010
|
+
whatsapp: <T_1_11 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
2011
|
+
addToLoginIDs?: T_1_11;
|
|
2012
|
+
onMergeUseExisting?: T_1_11 extends true ? boolean : never;
|
|
2013
|
+
templateOptions?: {
|
|
2014
|
+
[x: string]: string;
|
|
2015
|
+
};
|
|
2016
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1381
2017
|
maskedPhone: string;
|
|
1382
2018
|
}>>;
|
|
1383
2019
|
};
|
|
@@ -1386,59 +2022,151 @@ declare const useDescope: () => ((({
|
|
|
1386
2022
|
magicLink: {
|
|
1387
2023
|
verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1388
2024
|
signIn: {
|
|
1389
|
-
sms: (loginId: string,
|
|
2025
|
+
sms: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1390
2026
|
maskedPhone: string;
|
|
1391
2027
|
}>>;
|
|
1392
|
-
|
|
2028
|
+
voice: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1393
2029
|
maskedPhone: string;
|
|
1394
2030
|
}>>;
|
|
1395
|
-
|
|
2031
|
+
whatsapp: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2032
|
+
maskedPhone: string;
|
|
2033
|
+
}>>;
|
|
2034
|
+
email: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1396
2035
|
maskedEmail: string;
|
|
1397
2036
|
}>>;
|
|
1398
2037
|
};
|
|
1399
2038
|
signUp: {
|
|
1400
|
-
sms: (loginId: string,
|
|
2039
|
+
sms: (loginId: string, URI: string, user?: {
|
|
1401
2040
|
email?: string;
|
|
1402
2041
|
name?: string;
|
|
2042
|
+
givenName?: string;
|
|
2043
|
+
middleName?: string;
|
|
2044
|
+
familyName?: string;
|
|
1403
2045
|
phone?: string;
|
|
2046
|
+
}, signUpOptions?: {
|
|
2047
|
+
customClaims?: Record<string, any>;
|
|
2048
|
+
templateOptions?: {
|
|
2049
|
+
[x: string]: string;
|
|
2050
|
+
};
|
|
1404
2051
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1405
2052
|
maskedPhone: string;
|
|
1406
2053
|
}>>;
|
|
1407
|
-
|
|
2054
|
+
voice: (loginId: string, URI: string, user?: {
|
|
1408
2055
|
email?: string;
|
|
1409
2056
|
name?: string;
|
|
2057
|
+
givenName?: string;
|
|
2058
|
+
middleName?: string;
|
|
2059
|
+
familyName?: string;
|
|
1410
2060
|
phone?: string;
|
|
2061
|
+
}, signUpOptions?: {
|
|
2062
|
+
customClaims?: Record<string, any>;
|
|
2063
|
+
templateOptions?: {
|
|
2064
|
+
[x: string]: string;
|
|
2065
|
+
};
|
|
1411
2066
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1412
2067
|
maskedPhone: string;
|
|
1413
2068
|
}>>;
|
|
1414
|
-
|
|
2069
|
+
whatsapp: (loginId: string, URI: string, user?: {
|
|
1415
2070
|
email?: string;
|
|
1416
2071
|
name?: string;
|
|
2072
|
+
givenName?: string;
|
|
2073
|
+
middleName?: string;
|
|
2074
|
+
familyName?: string;
|
|
1417
2075
|
phone?: string;
|
|
2076
|
+
}, signUpOptions?: {
|
|
2077
|
+
customClaims?: Record<string, any>;
|
|
2078
|
+
templateOptions?: {
|
|
2079
|
+
[x: string]: string;
|
|
2080
|
+
};
|
|
2081
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2082
|
+
maskedPhone: string;
|
|
2083
|
+
}>>;
|
|
2084
|
+
email: (loginId: string, URI: string, user?: {
|
|
2085
|
+
email?: string;
|
|
2086
|
+
name?: string;
|
|
2087
|
+
givenName?: string;
|
|
2088
|
+
middleName?: string;
|
|
2089
|
+
familyName?: string;
|
|
2090
|
+
phone?: string;
|
|
2091
|
+
}, signUpOptions?: {
|
|
2092
|
+
customClaims?: Record<string, any>;
|
|
2093
|
+
templateOptions?: {
|
|
2094
|
+
[x: string]: string;
|
|
2095
|
+
};
|
|
1418
2096
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1419
2097
|
maskedEmail: string;
|
|
1420
2098
|
}>>;
|
|
1421
2099
|
};
|
|
1422
2100
|
signUpOrIn: {
|
|
1423
|
-
sms: (loginId: string,
|
|
2101
|
+
sms: (loginId: string, URI?: string, signUpOptions?: {
|
|
2102
|
+
customClaims?: Record<string, any>;
|
|
2103
|
+
templateOptions?: {
|
|
2104
|
+
[x: string]: string;
|
|
2105
|
+
};
|
|
2106
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1424
2107
|
maskedPhone: string;
|
|
1425
2108
|
}>>;
|
|
1426
|
-
|
|
2109
|
+
voice: (loginId: string, URI?: string, signUpOptions?: {
|
|
2110
|
+
customClaims?: Record<string, any>;
|
|
2111
|
+
templateOptions?: {
|
|
2112
|
+
[x: string]: string;
|
|
2113
|
+
};
|
|
2114
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2115
|
+
maskedPhone: string;
|
|
2116
|
+
}>>;
|
|
2117
|
+
whatsapp: (loginId: string, URI?: string, signUpOptions?: {
|
|
2118
|
+
customClaims?: Record<string, any>;
|
|
2119
|
+
templateOptions?: {
|
|
2120
|
+
[x: string]: string;
|
|
2121
|
+
};
|
|
2122
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1427
2123
|
maskedPhone: string;
|
|
1428
2124
|
}>>;
|
|
1429
|
-
email: (loginId: string,
|
|
2125
|
+
email: (loginId: string, URI?: string, signUpOptions?: {
|
|
2126
|
+
customClaims?: Record<string, any>;
|
|
2127
|
+
templateOptions?: {
|
|
2128
|
+
[x: string]: string;
|
|
2129
|
+
};
|
|
2130
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1430
2131
|
maskedEmail: string;
|
|
1431
2132
|
}>>;
|
|
1432
2133
|
};
|
|
1433
2134
|
update: {
|
|
1434
|
-
email: (loginId: string, email: string, URI?: string, token?: string
|
|
2135
|
+
email: <T_2_3 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
2136
|
+
addToLoginIDs?: T_2_3;
|
|
2137
|
+
onMergeUseExisting?: T_2_3 extends true ? boolean : never;
|
|
2138
|
+
templateOptions?: {
|
|
2139
|
+
[x: string]: string;
|
|
2140
|
+
};
|
|
2141
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1435
2142
|
maskedEmail: string;
|
|
1436
2143
|
}>>;
|
|
1437
2144
|
phone: {
|
|
1438
|
-
sms: (loginId: string, phone: string, URI?: string, token?: string
|
|
2145
|
+
sms: <T_3_9 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
2146
|
+
addToLoginIDs?: T_3_9;
|
|
2147
|
+
onMergeUseExisting?: T_3_9 extends true ? boolean : never;
|
|
2148
|
+
templateOptions?: {
|
|
2149
|
+
[x: string]: string;
|
|
2150
|
+
};
|
|
2151
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1439
2152
|
maskedPhone: string;
|
|
1440
2153
|
}>>;
|
|
1441
|
-
|
|
2154
|
+
voice: <T_3_10 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
2155
|
+
addToLoginIDs?: T_3_10;
|
|
2156
|
+
onMergeUseExisting?: T_3_10 extends true ? boolean : never;
|
|
2157
|
+
templateOptions?: {
|
|
2158
|
+
[x: string]: string;
|
|
2159
|
+
};
|
|
2160
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2161
|
+
maskedPhone: string;
|
|
2162
|
+
}>>;
|
|
2163
|
+
whatsapp: <T_3_11 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
2164
|
+
addToLoginIDs?: T_3_11;
|
|
2165
|
+
onMergeUseExisting?: T_3_11 extends true ? boolean : never;
|
|
2166
|
+
templateOptions?: {
|
|
2167
|
+
[x: string]: string;
|
|
2168
|
+
};
|
|
2169
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1442
2170
|
maskedPhone: string;
|
|
1443
2171
|
}>>;
|
|
1444
2172
|
};
|
|
@@ -1446,102 +2174,92 @@ declare const useDescope: () => ((({
|
|
|
1446
2174
|
};
|
|
1447
2175
|
enchantedLink: {
|
|
1448
2176
|
verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
1449
|
-
signIn: (loginId: string,
|
|
1450
|
-
signUpOrIn: (loginId: string,
|
|
1451
|
-
|
|
2177
|
+
signIn: (loginId: string, URI?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
2178
|
+
signUpOrIn: (loginId: string, URI?: string, signUpOptions?: {
|
|
2179
|
+
customClaims?: Record<string, any>;
|
|
2180
|
+
templateOptions?: {
|
|
2181
|
+
[x: string]: string;
|
|
2182
|
+
};
|
|
2183
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
2184
|
+
signUp: (loginId: string, URI?: string, user?: {
|
|
1452
2185
|
email?: string;
|
|
1453
2186
|
name?: string;
|
|
2187
|
+
givenName?: string;
|
|
2188
|
+
middleName?: string;
|
|
2189
|
+
familyName?: string;
|
|
1454
2190
|
phone?: string;
|
|
2191
|
+
}, signUpOptions?: {
|
|
2192
|
+
customClaims?: Record<string, any>;
|
|
2193
|
+
templateOptions?: {
|
|
2194
|
+
[x: string]: string;
|
|
2195
|
+
};
|
|
1455
2196
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
1456
2197
|
waitForSession: (pendingRef: string, config?: {
|
|
1457
2198
|
pollingIntervalMs: number;
|
|
1458
2199
|
timeoutMs: number;
|
|
1459
2200
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1460
2201
|
update: {
|
|
1461
|
-
email: (loginId: string, email: string, URI?: string, token?: string
|
|
2202
|
+
email: <T_4_3 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
2203
|
+
addToLoginIDs?: T_4_3;
|
|
2204
|
+
onMergeUseExisting?: T_4_3 extends true ? boolean : never;
|
|
2205
|
+
templateOptions?: {
|
|
2206
|
+
[x: string]: string;
|
|
2207
|
+
};
|
|
2208
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
1462
2209
|
};
|
|
1463
2210
|
};
|
|
1464
2211
|
oauth: {
|
|
1465
|
-
start: {
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1476
|
-
google: <B_2_3 extends {
|
|
1477
|
-
redirect: boolean;
|
|
1478
|
-
}>(redirectURL?: string, config?: B_2_3) => Promise<B_2_3 extends {
|
|
1479
|
-
redirect: true;
|
|
1480
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1481
|
-
microsoft: <B_3_3 extends {
|
|
1482
|
-
redirect: boolean;
|
|
1483
|
-
}>(redirectURL?: string, config?: B_3_3) => Promise<B_3_3 extends {
|
|
1484
|
-
redirect: true;
|
|
1485
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1486
|
-
gitlab: <B_4_3 extends {
|
|
1487
|
-
redirect: boolean;
|
|
1488
|
-
}>(redirectURL?: string, config?: B_4_3) => Promise<B_4_3 extends {
|
|
1489
|
-
redirect: true;
|
|
1490
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1491
|
-
apple: <B_5_3 extends {
|
|
1492
|
-
redirect: boolean;
|
|
1493
|
-
}>(redirectURL?: string, config?: B_5_3) => Promise<B_5_3 extends {
|
|
1494
|
-
redirect: true;
|
|
1495
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1496
|
-
discord: <B_6_3 extends {
|
|
1497
|
-
redirect: boolean;
|
|
1498
|
-
}>(redirectURL?: string, config?: B_6_3) => Promise<B_6_3 extends {
|
|
1499
|
-
redirect: true;
|
|
1500
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1501
|
-
linkedin: <B_7_3 extends {
|
|
1502
|
-
redirect: boolean;
|
|
1503
|
-
}>(redirectURL?: string, config?: B_7_3) => Promise<B_7_3 extends {
|
|
1504
|
-
redirect: true;
|
|
1505
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2212
|
+
start: ((provider: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>) & {
|
|
2213
|
+
google: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2214
|
+
facebook: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2215
|
+
github: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2216
|
+
microsoft: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2217
|
+
gitlab: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2218
|
+
apple: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2219
|
+
discord: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2220
|
+
linkedin: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2221
|
+
slack: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1506
2222
|
};
|
|
1507
2223
|
exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2224
|
+
startNative: (provider: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
2225
|
+
finishNative: (provider: string, stateId: string, user?: string, code?: string, idToken?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
1508
2226
|
};
|
|
1509
2227
|
saml: {
|
|
1510
|
-
start:
|
|
1511
|
-
redirect: boolean;
|
|
1512
|
-
}>(tenantNameOrEmail: string, config?: B_1_7) => Promise<B_1_7 extends {
|
|
1513
|
-
redirect: true;
|
|
1514
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2228
|
+
start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1515
2229
|
exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1516
2230
|
};
|
|
1517
2231
|
totp: {
|
|
1518
2232
|
signUp: (loginId: string, user?: {
|
|
1519
2233
|
email?: string;
|
|
1520
2234
|
name?: string;
|
|
2235
|
+
givenName?: string;
|
|
2236
|
+
middleName?: string;
|
|
2237
|
+
familyName?: string;
|
|
1521
2238
|
phone?: string;
|
|
1522
2239
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.TOTPResponse>>;
|
|
1523
|
-
verify: (loginId: string, code: string, loginOptions?:
|
|
1524
|
-
stepup?: boolean;
|
|
1525
|
-
mfa?: boolean;
|
|
1526
|
-
customClaims?: Record<string, any>;
|
|
1527
|
-
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2240
|
+
verify: (loginId: string, code: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1528
2241
|
update: (loginId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.TOTPResponse>>;
|
|
1529
2242
|
};
|
|
1530
2243
|
password: {
|
|
1531
2244
|
signUp: (loginId: string, password: string, user?: {
|
|
1532
2245
|
email?: string;
|
|
1533
2246
|
name?: string;
|
|
2247
|
+
givenName?: string;
|
|
2248
|
+
middleName?: string;
|
|
2249
|
+
familyName?: string;
|
|
1534
2250
|
phone?: string;
|
|
1535
2251
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1536
2252
|
signIn: (loginId: string, password: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1537
|
-
sendReset: (loginId: string, redirectUrl?: string
|
|
2253
|
+
sendReset: (loginId: string, redirectUrl?: string, templateOptions?: {
|
|
2254
|
+
[x: string]: string;
|
|
2255
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1538
2256
|
resetMethod: string;
|
|
1539
2257
|
pendingRef?: string;
|
|
1540
2258
|
linkId?: string;
|
|
1541
2259
|
maskedEmail: string;
|
|
1542
2260
|
}>>;
|
|
1543
2261
|
update: (loginId: string, newPassword: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
1544
|
-
replace: (loginId: string, oldPassword: string, newPassword: string) => Promise<_descope_core_js_sdk.SdkResponse<
|
|
2262
|
+
replace: (loginId: string, oldPassword: string, newPassword: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1545
2263
|
policy: () => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1546
2264
|
minLength: number;
|
|
1547
2265
|
lowercase: boolean;
|
|
@@ -1551,10 +2269,13 @@ declare const useDescope: () => ((({
|
|
|
1551
2269
|
}>>;
|
|
1552
2270
|
};
|
|
1553
2271
|
refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2272
|
+
selectTenant: (tenantId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1554
2273
|
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
1555
2274
|
logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
1556
2275
|
me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
|
|
2276
|
+
history: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserHistoryResponse>>;
|
|
1557
2277
|
isJwtExpired: (token: string) => boolean;
|
|
2278
|
+
getTenants: (token: string) => string[];
|
|
1558
2279
|
getJwtPermissions: (token: string, tenant?: string) => string[];
|
|
1559
2280
|
getJwtRoles: (token: string, tenant?: string) => string[];
|
|
1560
2281
|
httpClient: {
|
|
@@ -1579,7 +2300,7 @@ declare const useDescope: () => ((({
|
|
|
1579
2300
|
};
|
|
1580
2301
|
token?: string;
|
|
1581
2302
|
}) => Promise<Response>;
|
|
1582
|
-
delete: (path: string,
|
|
2303
|
+
delete: (path: string, config?: {
|
|
1583
2304
|
headers?: HeadersInit;
|
|
1584
2305
|
queryParams?: {
|
|
1585
2306
|
[key: string]: string;
|
|
@@ -1621,6 +2342,7 @@ declare const getSdk: () => ((({
|
|
|
1621
2342
|
flow: {
|
|
1622
2343
|
start: (flowId: string, options?: Pick<{
|
|
1623
2344
|
redirectUrl?: string;
|
|
2345
|
+
location?: string;
|
|
1624
2346
|
tenant?: string;
|
|
1625
2347
|
deviceInfo?: {
|
|
1626
2348
|
webAuthnSupport?: boolean;
|
|
@@ -1631,17 +2353,30 @@ declare const getSdk: () => ((({
|
|
|
1631
2353
|
name?: string;
|
|
1632
2354
|
loginId?: string;
|
|
1633
2355
|
};
|
|
1634
|
-
|
|
2356
|
+
redirectAuth?: {
|
|
2357
|
+
callbackUrl: string;
|
|
2358
|
+
codeChallenge: string;
|
|
2359
|
+
};
|
|
2360
|
+
oidcIdpStateId?: string;
|
|
2361
|
+
preview?: boolean;
|
|
2362
|
+
samlIdpStateId?: string;
|
|
2363
|
+
samlIdpUsername?: string;
|
|
2364
|
+
ssoAppId?: string;
|
|
2365
|
+
oidcLoginHint?: string;
|
|
2366
|
+
abTestingKey?: number;
|
|
2367
|
+
startOptionsVersion?: number;
|
|
2368
|
+
client?: Record<string, any>;
|
|
2369
|
+
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client"> & {
|
|
1635
2370
|
lastAuth?: Omit<{
|
|
1636
2371
|
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
1637
2372
|
oauthProvider?: string;
|
|
1638
2373
|
name?: string;
|
|
1639
2374
|
loginId?: string;
|
|
1640
2375
|
}, "loginId" | "name">;
|
|
1641
|
-
}, conditionInteractionId?: string, interactionId?: string, input?: {
|
|
2376
|
+
}, conditionInteractionId?: string, interactionId?: string, version?: number, componentsVersion?: string, input?: {
|
|
1642
2377
|
[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[])[])[])[])[])[])[])[])[])[])[];
|
|
1643
2378
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
1644
|
-
next: (executionId: string, stepId: string, interactionId: string, input?: {
|
|
2379
|
+
next: (executionId: string, stepId: string, interactionId: string, version?: number, componentsVersion?: string, input?: {
|
|
1645
2380
|
[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[])[])[])[])[])[])[])[])[])[])[];
|
|
1646
2381
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
1647
2382
|
};
|
|
@@ -1655,11 +2390,7 @@ declare const getSdk: () => ((({
|
|
|
1655
2390
|
finish: (transactionId: string, response: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1656
2391
|
};
|
|
1657
2392
|
signIn: ((identifier: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
|
|
1658
|
-
start: (loginId: string, origin: string, loginOptions?: {
|
|
1659
|
-
stepup?: boolean;
|
|
1660
|
-
mfa?: boolean;
|
|
1661
|
-
customClaims?: Record<string, any>;
|
|
1662
|
-
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2393
|
+
start: (loginId: string, origin: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1663
2394
|
transactionId: string;
|
|
1664
2395
|
options: string;
|
|
1665
2396
|
create: boolean;
|
|
@@ -1688,23 +2419,30 @@ declare const getSdk: () => ((({
|
|
|
1688
2419
|
conditional: (options: string, abort: AbortController) => Promise<string>;
|
|
1689
2420
|
};
|
|
1690
2421
|
};
|
|
2422
|
+
fedcm: {
|
|
2423
|
+
oneTap(provider?: string, oneTapConfig?: _descope_web_js_sdk.OneTapConfig, loginOptions?: _descope_core_js_sdk.LoginOptions, onSkip?: () => void): Promise<unknown>;
|
|
2424
|
+
};
|
|
1691
2425
|
accessKey: {
|
|
1692
|
-
exchange: (accessKey: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
|
|
2426
|
+
exchange: (accessKey: string, loginOptions?: _descope_core_js_sdk.AccessKeyLoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
|
|
1693
2427
|
};
|
|
1694
2428
|
otp: {
|
|
1695
2429
|
verify: {
|
|
1696
2430
|
sms: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2431
|
+
voice: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1697
2432
|
whatsapp: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1698
2433
|
email: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1699
2434
|
};
|
|
1700
2435
|
signIn: {
|
|
1701
|
-
sms: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2436
|
+
sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1702
2437
|
maskedPhone: string;
|
|
1703
2438
|
}>>;
|
|
1704
|
-
|
|
2439
|
+
voice: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1705
2440
|
maskedPhone: string;
|
|
1706
2441
|
}>>;
|
|
1707
|
-
|
|
2442
|
+
whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2443
|
+
maskedPhone: string;
|
|
2444
|
+
}>>;
|
|
2445
|
+
email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1708
2446
|
maskedEmail: string;
|
|
1709
2447
|
}>>;
|
|
1710
2448
|
};
|
|
@@ -1712,45 +2450,114 @@ declare const getSdk: () => ((({
|
|
|
1712
2450
|
sms: (loginId: string, user?: {
|
|
1713
2451
|
email?: string;
|
|
1714
2452
|
name?: string;
|
|
2453
|
+
givenName?: string;
|
|
2454
|
+
middleName?: string;
|
|
2455
|
+
familyName?: string;
|
|
2456
|
+
phone?: string;
|
|
2457
|
+
}, signUpOptions?: {
|
|
2458
|
+
customClaims?: Record<string, any>;
|
|
2459
|
+
templateOptions?: {
|
|
2460
|
+
[x: string]: string;
|
|
2461
|
+
};
|
|
2462
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2463
|
+
maskedPhone: string;
|
|
2464
|
+
}>>;
|
|
2465
|
+
voice: (loginId: string, user?: {
|
|
2466
|
+
email?: string;
|
|
2467
|
+
name?: string;
|
|
2468
|
+
givenName?: string;
|
|
2469
|
+
middleName?: string;
|
|
2470
|
+
familyName?: string;
|
|
1715
2471
|
phone?: string;
|
|
2472
|
+
}, signUpOptions?: {
|
|
2473
|
+
customClaims?: Record<string, any>;
|
|
2474
|
+
templateOptions?: {
|
|
2475
|
+
[x: string]: string;
|
|
2476
|
+
};
|
|
1716
2477
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1717
2478
|
maskedPhone: string;
|
|
1718
2479
|
}>>;
|
|
1719
2480
|
whatsapp: (loginId: string, user?: {
|
|
1720
2481
|
email?: string;
|
|
1721
2482
|
name?: string;
|
|
2483
|
+
givenName?: string;
|
|
2484
|
+
middleName?: string;
|
|
2485
|
+
familyName?: string;
|
|
1722
2486
|
phone?: string;
|
|
2487
|
+
}, signUpOptions?: {
|
|
2488
|
+
customClaims?: Record<string, any>;
|
|
2489
|
+
templateOptions?: {
|
|
2490
|
+
[x: string]: string;
|
|
2491
|
+
};
|
|
1723
2492
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1724
2493
|
maskedPhone: string;
|
|
1725
2494
|
}>>;
|
|
1726
2495
|
email: (loginId: string, user?: {
|
|
1727
2496
|
email?: string;
|
|
1728
2497
|
name?: string;
|
|
2498
|
+
givenName?: string;
|
|
2499
|
+
middleName?: string;
|
|
2500
|
+
familyName?: string;
|
|
1729
2501
|
phone?: string;
|
|
2502
|
+
}, signUpOptions?: {
|
|
2503
|
+
customClaims?: Record<string, any>;
|
|
2504
|
+
templateOptions?: {
|
|
2505
|
+
[x: string]: string;
|
|
2506
|
+
};
|
|
1730
2507
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1731
2508
|
maskedEmail: string;
|
|
1732
2509
|
}>>;
|
|
1733
2510
|
};
|
|
1734
2511
|
signUpOrIn: {
|
|
1735
|
-
sms: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2512
|
+
sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2513
|
+
maskedPhone: string;
|
|
2514
|
+
}>>;
|
|
2515
|
+
voice: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1736
2516
|
maskedPhone: string;
|
|
1737
2517
|
}>>;
|
|
1738
|
-
whatsapp: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2518
|
+
whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1739
2519
|
maskedPhone: string;
|
|
1740
2520
|
}>>;
|
|
1741
|
-
email: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2521
|
+
email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1742
2522
|
maskedEmail: string;
|
|
1743
2523
|
}>>;
|
|
1744
2524
|
};
|
|
1745
2525
|
update: {
|
|
1746
|
-
email: (loginId: string, email: string, token?: string
|
|
2526
|
+
email: <T extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
|
|
2527
|
+
addToLoginIDs?: T;
|
|
2528
|
+
onMergeUseExisting?: T extends true ? boolean : never;
|
|
2529
|
+
templateOptions?: {
|
|
2530
|
+
[x: string]: string;
|
|
2531
|
+
};
|
|
2532
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1747
2533
|
maskedEmail: string;
|
|
1748
2534
|
}>>;
|
|
1749
2535
|
phone: {
|
|
1750
|
-
sms: (loginId: string, phone: string, token?: string
|
|
2536
|
+
sms: <T_1 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
2537
|
+
addToLoginIDs?: T_1;
|
|
2538
|
+
onMergeUseExisting?: T_1 extends true ? boolean : never;
|
|
2539
|
+
templateOptions?: {
|
|
2540
|
+
[x: string]: string;
|
|
2541
|
+
};
|
|
2542
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2543
|
+
maskedPhone: string;
|
|
2544
|
+
}>>;
|
|
2545
|
+
voice: <T_1_1 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
2546
|
+
addToLoginIDs?: T_1_1;
|
|
2547
|
+
onMergeUseExisting?: T_1_1 extends true ? boolean : never;
|
|
2548
|
+
templateOptions?: {
|
|
2549
|
+
[x: string]: string;
|
|
2550
|
+
};
|
|
2551
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1751
2552
|
maskedPhone: string;
|
|
1752
2553
|
}>>;
|
|
1753
|
-
whatsapp: (loginId: string, phone: string, token?: string
|
|
2554
|
+
whatsapp: <T_1_2 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
2555
|
+
addToLoginIDs?: T_1_2;
|
|
2556
|
+
onMergeUseExisting?: T_1_2 extends true ? boolean : never;
|
|
2557
|
+
templateOptions?: {
|
|
2558
|
+
[x: string]: string;
|
|
2559
|
+
};
|
|
2560
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1754
2561
|
maskedPhone: string;
|
|
1755
2562
|
}>>;
|
|
1756
2563
|
};
|
|
@@ -1759,59 +2566,151 @@ declare const getSdk: () => ((({
|
|
|
1759
2566
|
magicLink: {
|
|
1760
2567
|
verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1761
2568
|
signIn: {
|
|
1762
|
-
sms: (loginId: string,
|
|
2569
|
+
sms: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1763
2570
|
maskedPhone: string;
|
|
1764
2571
|
}>>;
|
|
1765
|
-
|
|
2572
|
+
voice: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1766
2573
|
maskedPhone: string;
|
|
1767
2574
|
}>>;
|
|
1768
|
-
|
|
2575
|
+
whatsapp: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2576
|
+
maskedPhone: string;
|
|
2577
|
+
}>>;
|
|
2578
|
+
email: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1769
2579
|
maskedEmail: string;
|
|
1770
2580
|
}>>;
|
|
1771
2581
|
};
|
|
1772
2582
|
signUp: {
|
|
1773
|
-
sms: (loginId: string,
|
|
2583
|
+
sms: (loginId: string, URI: string, user?: {
|
|
2584
|
+
email?: string;
|
|
2585
|
+
name?: string;
|
|
2586
|
+
givenName?: string;
|
|
2587
|
+
middleName?: string;
|
|
2588
|
+
familyName?: string;
|
|
2589
|
+
phone?: string;
|
|
2590
|
+
}, signUpOptions?: {
|
|
2591
|
+
customClaims?: Record<string, any>;
|
|
2592
|
+
templateOptions?: {
|
|
2593
|
+
[x: string]: string;
|
|
2594
|
+
};
|
|
2595
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2596
|
+
maskedPhone: string;
|
|
2597
|
+
}>>;
|
|
2598
|
+
voice: (loginId: string, URI: string, user?: {
|
|
1774
2599
|
email?: string;
|
|
1775
2600
|
name?: string;
|
|
2601
|
+
givenName?: string;
|
|
2602
|
+
middleName?: string;
|
|
2603
|
+
familyName?: string;
|
|
1776
2604
|
phone?: string;
|
|
2605
|
+
}, signUpOptions?: {
|
|
2606
|
+
customClaims?: Record<string, any>;
|
|
2607
|
+
templateOptions?: {
|
|
2608
|
+
[x: string]: string;
|
|
2609
|
+
};
|
|
1777
2610
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1778
2611
|
maskedPhone: string;
|
|
1779
2612
|
}>>;
|
|
1780
|
-
whatsapp: (loginId: string,
|
|
2613
|
+
whatsapp: (loginId: string, URI: string, user?: {
|
|
1781
2614
|
email?: string;
|
|
1782
2615
|
name?: string;
|
|
2616
|
+
givenName?: string;
|
|
2617
|
+
middleName?: string;
|
|
2618
|
+
familyName?: string;
|
|
1783
2619
|
phone?: string;
|
|
2620
|
+
}, signUpOptions?: {
|
|
2621
|
+
customClaims?: Record<string, any>;
|
|
2622
|
+
templateOptions?: {
|
|
2623
|
+
[x: string]: string;
|
|
2624
|
+
};
|
|
1784
2625
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1785
2626
|
maskedPhone: string;
|
|
1786
2627
|
}>>;
|
|
1787
|
-
email: (loginId: string,
|
|
2628
|
+
email: (loginId: string, URI: string, user?: {
|
|
1788
2629
|
email?: string;
|
|
1789
2630
|
name?: string;
|
|
2631
|
+
givenName?: string;
|
|
2632
|
+
middleName?: string;
|
|
2633
|
+
familyName?: string;
|
|
1790
2634
|
phone?: string;
|
|
2635
|
+
}, signUpOptions?: {
|
|
2636
|
+
customClaims?: Record<string, any>;
|
|
2637
|
+
templateOptions?: {
|
|
2638
|
+
[x: string]: string;
|
|
2639
|
+
};
|
|
1791
2640
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1792
2641
|
maskedEmail: string;
|
|
1793
2642
|
}>>;
|
|
1794
2643
|
};
|
|
1795
2644
|
signUpOrIn: {
|
|
1796
|
-
sms: (loginId: string,
|
|
2645
|
+
sms: (loginId: string, URI?: string, signUpOptions?: {
|
|
2646
|
+
customClaims?: Record<string, any>;
|
|
2647
|
+
templateOptions?: {
|
|
2648
|
+
[x: string]: string;
|
|
2649
|
+
};
|
|
2650
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1797
2651
|
maskedPhone: string;
|
|
1798
2652
|
}>>;
|
|
1799
|
-
|
|
2653
|
+
voice: (loginId: string, URI?: string, signUpOptions?: {
|
|
2654
|
+
customClaims?: Record<string, any>;
|
|
2655
|
+
templateOptions?: {
|
|
2656
|
+
[x: string]: string;
|
|
2657
|
+
};
|
|
2658
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1800
2659
|
maskedPhone: string;
|
|
1801
2660
|
}>>;
|
|
1802
|
-
|
|
2661
|
+
whatsapp: (loginId: string, URI?: string, signUpOptions?: {
|
|
2662
|
+
customClaims?: Record<string, any>;
|
|
2663
|
+
templateOptions?: {
|
|
2664
|
+
[x: string]: string;
|
|
2665
|
+
};
|
|
2666
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2667
|
+
maskedPhone: string;
|
|
2668
|
+
}>>;
|
|
2669
|
+
email: (loginId: string, URI?: string, signUpOptions?: {
|
|
2670
|
+
customClaims?: Record<string, any>;
|
|
2671
|
+
templateOptions?: {
|
|
2672
|
+
[x: string]: string;
|
|
2673
|
+
};
|
|
2674
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1803
2675
|
maskedEmail: string;
|
|
1804
2676
|
}>>;
|
|
1805
2677
|
};
|
|
1806
2678
|
update: {
|
|
1807
|
-
email: (loginId: string, email: string, URI?: string, token?: string
|
|
2679
|
+
email: <T_2 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
2680
|
+
addToLoginIDs?: T_2;
|
|
2681
|
+
onMergeUseExisting?: T_2 extends true ? boolean : never;
|
|
2682
|
+
templateOptions?: {
|
|
2683
|
+
[x: string]: string;
|
|
2684
|
+
};
|
|
2685
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1808
2686
|
maskedEmail: string;
|
|
1809
2687
|
}>>;
|
|
1810
2688
|
phone: {
|
|
1811
|
-
sms: (loginId: string, phone: string, URI?: string, token?: string
|
|
2689
|
+
sms: <T_3 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
2690
|
+
addToLoginIDs?: T_3;
|
|
2691
|
+
onMergeUseExisting?: T_3 extends true ? boolean : never;
|
|
2692
|
+
templateOptions?: {
|
|
2693
|
+
[x: string]: string;
|
|
2694
|
+
};
|
|
2695
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2696
|
+
maskedPhone: string;
|
|
2697
|
+
}>>;
|
|
2698
|
+
voice: <T_3_1 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
2699
|
+
addToLoginIDs?: T_3_1;
|
|
2700
|
+
onMergeUseExisting?: T_3_1 extends true ? boolean : never;
|
|
2701
|
+
templateOptions?: {
|
|
2702
|
+
[x: string]: string;
|
|
2703
|
+
};
|
|
2704
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1812
2705
|
maskedPhone: string;
|
|
1813
2706
|
}>>;
|
|
1814
|
-
whatsapp: (loginId: string, phone: string, URI?: string, token?: string
|
|
2707
|
+
whatsapp: <T_3_2 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
2708
|
+
addToLoginIDs?: T_3_2;
|
|
2709
|
+
onMergeUseExisting?: T_3_2 extends true ? boolean : never;
|
|
2710
|
+
templateOptions?: {
|
|
2711
|
+
[x: string]: string;
|
|
2712
|
+
};
|
|
2713
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1815
2714
|
maskedPhone: string;
|
|
1816
2715
|
}>>;
|
|
1817
2716
|
};
|
|
@@ -1819,102 +2718,92 @@ declare const getSdk: () => ((({
|
|
|
1819
2718
|
};
|
|
1820
2719
|
enchantedLink: {
|
|
1821
2720
|
verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
1822
|
-
signIn: (loginId: string,
|
|
1823
|
-
signUpOrIn: (loginId: string,
|
|
1824
|
-
|
|
2721
|
+
signIn: (loginId: string, URI?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
2722
|
+
signUpOrIn: (loginId: string, URI?: string, signUpOptions?: {
|
|
2723
|
+
customClaims?: Record<string, any>;
|
|
2724
|
+
templateOptions?: {
|
|
2725
|
+
[x: string]: string;
|
|
2726
|
+
};
|
|
2727
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
2728
|
+
signUp: (loginId: string, URI?: string, user?: {
|
|
1825
2729
|
email?: string;
|
|
1826
2730
|
name?: string;
|
|
2731
|
+
givenName?: string;
|
|
2732
|
+
middleName?: string;
|
|
2733
|
+
familyName?: string;
|
|
1827
2734
|
phone?: string;
|
|
2735
|
+
}, signUpOptions?: {
|
|
2736
|
+
customClaims?: Record<string, any>;
|
|
2737
|
+
templateOptions?: {
|
|
2738
|
+
[x: string]: string;
|
|
2739
|
+
};
|
|
1828
2740
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
1829
2741
|
waitForSession: (pendingRef: string, config?: {
|
|
1830
2742
|
pollingIntervalMs: number;
|
|
1831
2743
|
timeoutMs: number;
|
|
1832
2744
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1833
2745
|
update: {
|
|
1834
|
-
email: (loginId: string, email: string, URI?: string, token?: string
|
|
2746
|
+
email: <T_4 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
2747
|
+
addToLoginIDs?: T_4;
|
|
2748
|
+
onMergeUseExisting?: T_4 extends true ? boolean : never;
|
|
2749
|
+
templateOptions?: {
|
|
2750
|
+
[x: string]: string;
|
|
2751
|
+
};
|
|
2752
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
1835
2753
|
};
|
|
1836
2754
|
};
|
|
1837
2755
|
oauth: {
|
|
1838
|
-
start: {
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1849
|
-
google: <B_2 extends {
|
|
1850
|
-
redirect: boolean;
|
|
1851
|
-
}>(redirectURL?: string, config?: B_2) => Promise<B_2 extends {
|
|
1852
|
-
redirect: true;
|
|
1853
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1854
|
-
microsoft: <B_3 extends {
|
|
1855
|
-
redirect: boolean;
|
|
1856
|
-
}>(redirectURL?: string, config?: B_3) => Promise<B_3 extends {
|
|
1857
|
-
redirect: true;
|
|
1858
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1859
|
-
gitlab: <B_4 extends {
|
|
1860
|
-
redirect: boolean;
|
|
1861
|
-
}>(redirectURL?: string, config?: B_4) => Promise<B_4 extends {
|
|
1862
|
-
redirect: true;
|
|
1863
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1864
|
-
apple: <B_5 extends {
|
|
1865
|
-
redirect: boolean;
|
|
1866
|
-
}>(redirectURL?: string, config?: B_5) => Promise<B_5 extends {
|
|
1867
|
-
redirect: true;
|
|
1868
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1869
|
-
discord: <B_6 extends {
|
|
1870
|
-
redirect: boolean;
|
|
1871
|
-
}>(redirectURL?: string, config?: B_6) => Promise<B_6 extends {
|
|
1872
|
-
redirect: true;
|
|
1873
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1874
|
-
linkedin: <B_7 extends {
|
|
1875
|
-
redirect: boolean;
|
|
1876
|
-
}>(redirectURL?: string, config?: B_7) => Promise<B_7 extends {
|
|
1877
|
-
redirect: true;
|
|
1878
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2756
|
+
start: ((provider: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>) & {
|
|
2757
|
+
google: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2758
|
+
facebook: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2759
|
+
github: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2760
|
+
microsoft: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2761
|
+
gitlab: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2762
|
+
apple: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2763
|
+
discord: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2764
|
+
linkedin: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2765
|
+
slack: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1879
2766
|
};
|
|
1880
2767
|
exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2768
|
+
startNative: (provider: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
2769
|
+
finishNative: (provider: string, stateId: string, user?: string, code?: string, idToken?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
1881
2770
|
};
|
|
1882
2771
|
saml: {
|
|
1883
|
-
start:
|
|
1884
|
-
redirect: boolean;
|
|
1885
|
-
}>(tenantNameOrEmail: string, config?: B_1_1) => Promise<B_1_1 extends {
|
|
1886
|
-
redirect: true;
|
|
1887
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2772
|
+
start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
1888
2773
|
exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1889
2774
|
};
|
|
1890
2775
|
totp: {
|
|
1891
2776
|
signUp: (loginId: string, user?: {
|
|
1892
2777
|
email?: string;
|
|
1893
2778
|
name?: string;
|
|
2779
|
+
givenName?: string;
|
|
2780
|
+
middleName?: string;
|
|
2781
|
+
familyName?: string;
|
|
1894
2782
|
phone?: string;
|
|
1895
2783
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.TOTPResponse>>;
|
|
1896
|
-
verify: (loginId: string, code: string, loginOptions?:
|
|
1897
|
-
stepup?: boolean;
|
|
1898
|
-
mfa?: boolean;
|
|
1899
|
-
customClaims?: Record<string, any>;
|
|
1900
|
-
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2784
|
+
verify: (loginId: string, code: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1901
2785
|
update: (loginId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.TOTPResponse>>;
|
|
1902
2786
|
};
|
|
1903
2787
|
password: {
|
|
1904
2788
|
signUp: (loginId: string, password: string, user?: {
|
|
1905
2789
|
email?: string;
|
|
1906
2790
|
name?: string;
|
|
2791
|
+
givenName?: string;
|
|
2792
|
+
middleName?: string;
|
|
2793
|
+
familyName?: string;
|
|
1907
2794
|
phone?: string;
|
|
1908
2795
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1909
2796
|
signIn: (loginId: string, password: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1910
|
-
sendReset: (loginId: string, redirectUrl?: string
|
|
2797
|
+
sendReset: (loginId: string, redirectUrl?: string, templateOptions?: {
|
|
2798
|
+
[x: string]: string;
|
|
2799
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1911
2800
|
resetMethod: string;
|
|
1912
2801
|
pendingRef?: string;
|
|
1913
2802
|
linkId?: string;
|
|
1914
2803
|
maskedEmail: string;
|
|
1915
2804
|
}>>;
|
|
1916
2805
|
update: (loginId: string, newPassword: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
1917
|
-
replace: (loginId: string, oldPassword: string, newPassword: string) => Promise<_descope_core_js_sdk.SdkResponse<
|
|
2806
|
+
replace: (loginId: string, oldPassword: string, newPassword: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1918
2807
|
policy: () => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
1919
2808
|
minLength: number;
|
|
1920
2809
|
lowercase: boolean;
|
|
@@ -1924,10 +2813,13 @@ declare const getSdk: () => ((({
|
|
|
1924
2813
|
}>>;
|
|
1925
2814
|
};
|
|
1926
2815
|
refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2816
|
+
selectTenant: (tenantId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
1927
2817
|
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
1928
2818
|
logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
1929
2819
|
me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
|
|
2820
|
+
history: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserHistoryResponse>>;
|
|
1930
2821
|
isJwtExpired: (token: string) => boolean;
|
|
2822
|
+
getTenants: (token: string) => string[];
|
|
1931
2823
|
getJwtPermissions: (token: string, tenant?: string) => string[];
|
|
1932
2824
|
getJwtRoles: (token: string, tenant?: string) => string[];
|
|
1933
2825
|
httpClient: {
|
|
@@ -1952,7 +2844,7 @@ declare const getSdk: () => ((({
|
|
|
1952
2844
|
};
|
|
1953
2845
|
token?: string;
|
|
1954
2846
|
}) => Promise<Response>;
|
|
1955
|
-
delete: (path: string,
|
|
2847
|
+
delete: (path: string, config?: {
|
|
1956
2848
|
headers?: HeadersInit;
|
|
1957
2849
|
queryParams?: {
|
|
1958
2850
|
[key: string]: string;
|
|
@@ -1968,6 +2860,7 @@ declare const getSdk: () => ((({
|
|
|
1968
2860
|
flow: {
|
|
1969
2861
|
start: (flowId: string, options?: Pick<{
|
|
1970
2862
|
redirectUrl?: string;
|
|
2863
|
+
location?: string;
|
|
1971
2864
|
tenant?: string;
|
|
1972
2865
|
deviceInfo?: {
|
|
1973
2866
|
webAuthnSupport?: boolean;
|
|
@@ -1978,17 +2871,30 @@ declare const getSdk: () => ((({
|
|
|
1978
2871
|
name?: string;
|
|
1979
2872
|
loginId?: string;
|
|
1980
2873
|
};
|
|
1981
|
-
|
|
2874
|
+
redirectAuth?: {
|
|
2875
|
+
callbackUrl: string;
|
|
2876
|
+
codeChallenge: string;
|
|
2877
|
+
};
|
|
2878
|
+
oidcIdpStateId?: string;
|
|
2879
|
+
preview?: boolean;
|
|
2880
|
+
samlIdpStateId?: string;
|
|
2881
|
+
samlIdpUsername?: string;
|
|
2882
|
+
ssoAppId?: string;
|
|
2883
|
+
oidcLoginHint?: string;
|
|
2884
|
+
abTestingKey?: number;
|
|
2885
|
+
startOptionsVersion?: number;
|
|
2886
|
+
client?: Record<string, any>;
|
|
2887
|
+
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client"> & {
|
|
1982
2888
|
lastAuth?: Omit<{
|
|
1983
2889
|
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
1984
2890
|
oauthProvider?: string;
|
|
1985
2891
|
name?: string;
|
|
1986
2892
|
loginId?: string;
|
|
1987
2893
|
}, "loginId" | "name">;
|
|
1988
|
-
}, conditionInteractionId?: string, interactionId?: string, input?: {
|
|
2894
|
+
}, conditionInteractionId?: string, interactionId?: string, version?: number, componentsVersion?: string, input?: {
|
|
1989
2895
|
[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[])[])[])[])[])[])[])[])[])[])[];
|
|
1990
2896
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
1991
|
-
next: (executionId: string, stepId: string, interactionId: string, input?: {
|
|
2897
|
+
next: (executionId: string, stepId: string, interactionId: string, version?: number, componentsVersion?: string, input?: {
|
|
1992
2898
|
[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[])[])[])[])[])[])[])[])[])[])[];
|
|
1993
2899
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
1994
2900
|
};
|
|
@@ -2002,11 +2908,7 @@ declare const getSdk: () => ((({
|
|
|
2002
2908
|
finish: (transactionId: string, response: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2003
2909
|
};
|
|
2004
2910
|
signIn: ((identifier: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
|
|
2005
|
-
start: (loginId: string, origin: string, loginOptions?: {
|
|
2006
|
-
stepup?: boolean;
|
|
2007
|
-
mfa?: boolean;
|
|
2008
|
-
customClaims?: Record<string, any>;
|
|
2009
|
-
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2911
|
+
start: (loginId: string, origin: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2010
2912
|
transactionId: string;
|
|
2011
2913
|
options: string;
|
|
2012
2914
|
create: boolean;
|
|
@@ -2035,23 +2937,30 @@ declare const getSdk: () => ((({
|
|
|
2035
2937
|
conditional: (options: string, abort: AbortController) => Promise<string>;
|
|
2036
2938
|
};
|
|
2037
2939
|
};
|
|
2940
|
+
fedcm: {
|
|
2941
|
+
oneTap(provider?: string, oneTapConfig?: _descope_web_js_sdk.OneTapConfig, loginOptions?: _descope_core_js_sdk.LoginOptions, onSkip?: () => void): Promise<unknown>;
|
|
2942
|
+
};
|
|
2038
2943
|
accessKey: {
|
|
2039
|
-
exchange: (accessKey: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
|
|
2944
|
+
exchange: (accessKey: string, loginOptions?: _descope_core_js_sdk.AccessKeyLoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
|
|
2040
2945
|
};
|
|
2041
2946
|
otp: {
|
|
2042
2947
|
verify: {
|
|
2043
2948
|
sms: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2949
|
+
voice: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2044
2950
|
whatsapp: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2045
2951
|
email: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2046
2952
|
};
|
|
2047
2953
|
signIn: {
|
|
2048
|
-
sms: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2954
|
+
sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2955
|
+
maskedPhone: string;
|
|
2956
|
+
}>>;
|
|
2957
|
+
voice: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2049
2958
|
maskedPhone: string;
|
|
2050
2959
|
}>>;
|
|
2051
|
-
whatsapp: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2960
|
+
whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2052
2961
|
maskedPhone: string;
|
|
2053
2962
|
}>>;
|
|
2054
|
-
email: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2963
|
+
email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2055
2964
|
maskedEmail: string;
|
|
2056
2965
|
}>>;
|
|
2057
2966
|
};
|
|
@@ -2059,45 +2968,114 @@ declare const getSdk: () => ((({
|
|
|
2059
2968
|
sms: (loginId: string, user?: {
|
|
2060
2969
|
email?: string;
|
|
2061
2970
|
name?: string;
|
|
2971
|
+
givenName?: string;
|
|
2972
|
+
middleName?: string;
|
|
2973
|
+
familyName?: string;
|
|
2974
|
+
phone?: string;
|
|
2975
|
+
}, signUpOptions?: {
|
|
2976
|
+
customClaims?: Record<string, any>;
|
|
2977
|
+
templateOptions?: {
|
|
2978
|
+
[x: string]: string;
|
|
2979
|
+
};
|
|
2980
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2981
|
+
maskedPhone: string;
|
|
2982
|
+
}>>;
|
|
2983
|
+
voice: (loginId: string, user?: {
|
|
2984
|
+
email?: string;
|
|
2985
|
+
name?: string;
|
|
2986
|
+
givenName?: string;
|
|
2987
|
+
middleName?: string;
|
|
2988
|
+
familyName?: string;
|
|
2062
2989
|
phone?: string;
|
|
2990
|
+
}, signUpOptions?: {
|
|
2991
|
+
customClaims?: Record<string, any>;
|
|
2992
|
+
templateOptions?: {
|
|
2993
|
+
[x: string]: string;
|
|
2994
|
+
};
|
|
2063
2995
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2064
2996
|
maskedPhone: string;
|
|
2065
2997
|
}>>;
|
|
2066
2998
|
whatsapp: (loginId: string, user?: {
|
|
2067
2999
|
email?: string;
|
|
2068
3000
|
name?: string;
|
|
3001
|
+
givenName?: string;
|
|
3002
|
+
middleName?: string;
|
|
3003
|
+
familyName?: string;
|
|
2069
3004
|
phone?: string;
|
|
3005
|
+
}, signUpOptions?: {
|
|
3006
|
+
customClaims?: Record<string, any>;
|
|
3007
|
+
templateOptions?: {
|
|
3008
|
+
[x: string]: string;
|
|
3009
|
+
};
|
|
2070
3010
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2071
3011
|
maskedPhone: string;
|
|
2072
3012
|
}>>;
|
|
2073
3013
|
email: (loginId: string, user?: {
|
|
2074
3014
|
email?: string;
|
|
2075
3015
|
name?: string;
|
|
3016
|
+
givenName?: string;
|
|
3017
|
+
middleName?: string;
|
|
3018
|
+
familyName?: string;
|
|
2076
3019
|
phone?: string;
|
|
3020
|
+
}, signUpOptions?: {
|
|
3021
|
+
customClaims?: Record<string, any>;
|
|
3022
|
+
templateOptions?: {
|
|
3023
|
+
[x: string]: string;
|
|
3024
|
+
};
|
|
2077
3025
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2078
3026
|
maskedEmail: string;
|
|
2079
3027
|
}>>;
|
|
2080
3028
|
};
|
|
2081
3029
|
signUpOrIn: {
|
|
2082
|
-
sms: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3030
|
+
sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2083
3031
|
maskedPhone: string;
|
|
2084
3032
|
}>>;
|
|
2085
|
-
|
|
3033
|
+
voice: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2086
3034
|
maskedPhone: string;
|
|
2087
3035
|
}>>;
|
|
2088
|
-
|
|
3036
|
+
whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3037
|
+
maskedPhone: string;
|
|
3038
|
+
}>>;
|
|
3039
|
+
email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2089
3040
|
maskedEmail: string;
|
|
2090
3041
|
}>>;
|
|
2091
3042
|
};
|
|
2092
3043
|
update: {
|
|
2093
|
-
email: (loginId: string, email: string, token?: string
|
|
3044
|
+
email: <T_5 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
|
|
3045
|
+
addToLoginIDs?: T_5;
|
|
3046
|
+
onMergeUseExisting?: T_5 extends true ? boolean : never;
|
|
3047
|
+
templateOptions?: {
|
|
3048
|
+
[x: string]: string;
|
|
3049
|
+
};
|
|
3050
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2094
3051
|
maskedEmail: string;
|
|
2095
3052
|
}>>;
|
|
2096
3053
|
phone: {
|
|
2097
|
-
sms: (loginId: string, phone: string, token?: string
|
|
3054
|
+
sms: <T_1_3 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
3055
|
+
addToLoginIDs?: T_1_3;
|
|
3056
|
+
onMergeUseExisting?: T_1_3 extends true ? boolean : never;
|
|
3057
|
+
templateOptions?: {
|
|
3058
|
+
[x: string]: string;
|
|
3059
|
+
};
|
|
3060
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2098
3061
|
maskedPhone: string;
|
|
2099
3062
|
}>>;
|
|
2100
|
-
|
|
3063
|
+
voice: <T_1_4 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
3064
|
+
addToLoginIDs?: T_1_4;
|
|
3065
|
+
onMergeUseExisting?: T_1_4 extends true ? boolean : never;
|
|
3066
|
+
templateOptions?: {
|
|
3067
|
+
[x: string]: string;
|
|
3068
|
+
};
|
|
3069
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3070
|
+
maskedPhone: string;
|
|
3071
|
+
}>>;
|
|
3072
|
+
whatsapp: <T_1_5 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
3073
|
+
addToLoginIDs?: T_1_5;
|
|
3074
|
+
onMergeUseExisting?: T_1_5 extends true ? boolean : never;
|
|
3075
|
+
templateOptions?: {
|
|
3076
|
+
[x: string]: string;
|
|
3077
|
+
};
|
|
3078
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2101
3079
|
maskedPhone: string;
|
|
2102
3080
|
}>>;
|
|
2103
3081
|
};
|
|
@@ -2106,59 +3084,151 @@ declare const getSdk: () => ((({
|
|
|
2106
3084
|
magicLink: {
|
|
2107
3085
|
verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2108
3086
|
signIn: {
|
|
2109
|
-
sms: (loginId: string,
|
|
3087
|
+
sms: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3088
|
+
maskedPhone: string;
|
|
3089
|
+
}>>;
|
|
3090
|
+
voice: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2110
3091
|
maskedPhone: string;
|
|
2111
3092
|
}>>;
|
|
2112
|
-
whatsapp: (loginId: string,
|
|
3093
|
+
whatsapp: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2113
3094
|
maskedPhone: string;
|
|
2114
3095
|
}>>;
|
|
2115
|
-
email: (loginId: string,
|
|
3096
|
+
email: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2116
3097
|
maskedEmail: string;
|
|
2117
3098
|
}>>;
|
|
2118
3099
|
};
|
|
2119
3100
|
signUp: {
|
|
2120
|
-
sms: (loginId: string,
|
|
3101
|
+
sms: (loginId: string, URI: string, user?: {
|
|
2121
3102
|
email?: string;
|
|
2122
3103
|
name?: string;
|
|
3104
|
+
givenName?: string;
|
|
3105
|
+
middleName?: string;
|
|
3106
|
+
familyName?: string;
|
|
2123
3107
|
phone?: string;
|
|
3108
|
+
}, signUpOptions?: {
|
|
3109
|
+
customClaims?: Record<string, any>;
|
|
3110
|
+
templateOptions?: {
|
|
3111
|
+
[x: string]: string;
|
|
3112
|
+
};
|
|
2124
3113
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2125
3114
|
maskedPhone: string;
|
|
2126
3115
|
}>>;
|
|
2127
|
-
|
|
3116
|
+
voice: (loginId: string, URI: string, user?: {
|
|
2128
3117
|
email?: string;
|
|
2129
3118
|
name?: string;
|
|
3119
|
+
givenName?: string;
|
|
3120
|
+
middleName?: string;
|
|
3121
|
+
familyName?: string;
|
|
2130
3122
|
phone?: string;
|
|
3123
|
+
}, signUpOptions?: {
|
|
3124
|
+
customClaims?: Record<string, any>;
|
|
3125
|
+
templateOptions?: {
|
|
3126
|
+
[x: string]: string;
|
|
3127
|
+
};
|
|
2131
3128
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2132
3129
|
maskedPhone: string;
|
|
2133
3130
|
}>>;
|
|
2134
|
-
|
|
3131
|
+
whatsapp: (loginId: string, URI: string, user?: {
|
|
2135
3132
|
email?: string;
|
|
2136
3133
|
name?: string;
|
|
3134
|
+
givenName?: string;
|
|
3135
|
+
middleName?: string;
|
|
3136
|
+
familyName?: string;
|
|
2137
3137
|
phone?: string;
|
|
3138
|
+
}, signUpOptions?: {
|
|
3139
|
+
customClaims?: Record<string, any>;
|
|
3140
|
+
templateOptions?: {
|
|
3141
|
+
[x: string]: string;
|
|
3142
|
+
};
|
|
3143
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3144
|
+
maskedPhone: string;
|
|
3145
|
+
}>>;
|
|
3146
|
+
email: (loginId: string, URI: string, user?: {
|
|
3147
|
+
email?: string;
|
|
3148
|
+
name?: string;
|
|
3149
|
+
givenName?: string;
|
|
3150
|
+
middleName?: string;
|
|
3151
|
+
familyName?: string;
|
|
3152
|
+
phone?: string;
|
|
3153
|
+
}, signUpOptions?: {
|
|
3154
|
+
customClaims?: Record<string, any>;
|
|
3155
|
+
templateOptions?: {
|
|
3156
|
+
[x: string]: string;
|
|
3157
|
+
};
|
|
2138
3158
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2139
3159
|
maskedEmail: string;
|
|
2140
3160
|
}>>;
|
|
2141
3161
|
};
|
|
2142
3162
|
signUpOrIn: {
|
|
2143
|
-
sms: (loginId: string,
|
|
3163
|
+
sms: (loginId: string, URI?: string, signUpOptions?: {
|
|
3164
|
+
customClaims?: Record<string, any>;
|
|
3165
|
+
templateOptions?: {
|
|
3166
|
+
[x: string]: string;
|
|
3167
|
+
};
|
|
3168
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2144
3169
|
maskedPhone: string;
|
|
2145
3170
|
}>>;
|
|
2146
|
-
|
|
3171
|
+
voice: (loginId: string, URI?: string, signUpOptions?: {
|
|
3172
|
+
customClaims?: Record<string, any>;
|
|
3173
|
+
templateOptions?: {
|
|
3174
|
+
[x: string]: string;
|
|
3175
|
+
};
|
|
3176
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2147
3177
|
maskedPhone: string;
|
|
2148
3178
|
}>>;
|
|
2149
|
-
|
|
3179
|
+
whatsapp: (loginId: string, URI?: string, signUpOptions?: {
|
|
3180
|
+
customClaims?: Record<string, any>;
|
|
3181
|
+
templateOptions?: {
|
|
3182
|
+
[x: string]: string;
|
|
3183
|
+
};
|
|
3184
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3185
|
+
maskedPhone: string;
|
|
3186
|
+
}>>;
|
|
3187
|
+
email: (loginId: string, URI?: string, signUpOptions?: {
|
|
3188
|
+
customClaims?: Record<string, any>;
|
|
3189
|
+
templateOptions?: {
|
|
3190
|
+
[x: string]: string;
|
|
3191
|
+
};
|
|
3192
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2150
3193
|
maskedEmail: string;
|
|
2151
3194
|
}>>;
|
|
2152
3195
|
};
|
|
2153
3196
|
update: {
|
|
2154
|
-
email: (loginId: string, email: string, URI?: string, token?: string
|
|
3197
|
+
email: <T_2_1 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
3198
|
+
addToLoginIDs?: T_2_1;
|
|
3199
|
+
onMergeUseExisting?: T_2_1 extends true ? boolean : never;
|
|
3200
|
+
templateOptions?: {
|
|
3201
|
+
[x: string]: string;
|
|
3202
|
+
};
|
|
3203
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2155
3204
|
maskedEmail: string;
|
|
2156
3205
|
}>>;
|
|
2157
3206
|
phone: {
|
|
2158
|
-
sms: (loginId: string, phone: string, URI?: string, token?: string
|
|
3207
|
+
sms: <T_3_3 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
3208
|
+
addToLoginIDs?: T_3_3;
|
|
3209
|
+
onMergeUseExisting?: T_3_3 extends true ? boolean : never;
|
|
3210
|
+
templateOptions?: {
|
|
3211
|
+
[x: string]: string;
|
|
3212
|
+
};
|
|
3213
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3214
|
+
maskedPhone: string;
|
|
3215
|
+
}>>;
|
|
3216
|
+
voice: <T_3_4 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
3217
|
+
addToLoginIDs?: T_3_4;
|
|
3218
|
+
onMergeUseExisting?: T_3_4 extends true ? boolean : never;
|
|
3219
|
+
templateOptions?: {
|
|
3220
|
+
[x: string]: string;
|
|
3221
|
+
};
|
|
3222
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2159
3223
|
maskedPhone: string;
|
|
2160
3224
|
}>>;
|
|
2161
|
-
whatsapp: (loginId: string, phone: string, URI?: string, token?: string
|
|
3225
|
+
whatsapp: <T_3_5 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
3226
|
+
addToLoginIDs?: T_3_5;
|
|
3227
|
+
onMergeUseExisting?: T_3_5 extends true ? boolean : never;
|
|
3228
|
+
templateOptions?: {
|
|
3229
|
+
[x: string]: string;
|
|
3230
|
+
};
|
|
3231
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2162
3232
|
maskedPhone: string;
|
|
2163
3233
|
}>>;
|
|
2164
3234
|
};
|
|
@@ -2166,102 +3236,92 @@ declare const getSdk: () => ((({
|
|
|
2166
3236
|
};
|
|
2167
3237
|
enchantedLink: {
|
|
2168
3238
|
verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
2169
|
-
signIn: (loginId: string,
|
|
2170
|
-
signUpOrIn: (loginId: string,
|
|
2171
|
-
|
|
3239
|
+
signIn: (loginId: string, URI?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
3240
|
+
signUpOrIn: (loginId: string, URI?: string, signUpOptions?: {
|
|
3241
|
+
customClaims?: Record<string, any>;
|
|
3242
|
+
templateOptions?: {
|
|
3243
|
+
[x: string]: string;
|
|
3244
|
+
};
|
|
3245
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
3246
|
+
signUp: (loginId: string, URI?: string, user?: {
|
|
2172
3247
|
email?: string;
|
|
2173
3248
|
name?: string;
|
|
3249
|
+
givenName?: string;
|
|
3250
|
+
middleName?: string;
|
|
3251
|
+
familyName?: string;
|
|
2174
3252
|
phone?: string;
|
|
3253
|
+
}, signUpOptions?: {
|
|
3254
|
+
customClaims?: Record<string, any>;
|
|
3255
|
+
templateOptions?: {
|
|
3256
|
+
[x: string]: string;
|
|
3257
|
+
};
|
|
2175
3258
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
2176
3259
|
waitForSession: (pendingRef: string, config?: {
|
|
2177
3260
|
pollingIntervalMs: number;
|
|
2178
3261
|
timeoutMs: number;
|
|
2179
3262
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2180
3263
|
update: {
|
|
2181
|
-
email: (loginId: string, email: string, URI?: string, token?: string
|
|
3264
|
+
email: <T_4_1 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
3265
|
+
addToLoginIDs?: T_4_1;
|
|
3266
|
+
onMergeUseExisting?: T_4_1 extends true ? boolean : never;
|
|
3267
|
+
templateOptions?: {
|
|
3268
|
+
[x: string]: string;
|
|
3269
|
+
};
|
|
3270
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
2182
3271
|
};
|
|
2183
3272
|
};
|
|
2184
3273
|
oauth: {
|
|
2185
|
-
start: {
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2196
|
-
google: <B_2_1 extends {
|
|
2197
|
-
redirect: boolean;
|
|
2198
|
-
}>(redirectURL?: string, config?: B_2_1) => Promise<B_2_1 extends {
|
|
2199
|
-
redirect: true;
|
|
2200
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2201
|
-
microsoft: <B_3_1 extends {
|
|
2202
|
-
redirect: boolean;
|
|
2203
|
-
}>(redirectURL?: string, config?: B_3_1) => Promise<B_3_1 extends {
|
|
2204
|
-
redirect: true;
|
|
2205
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2206
|
-
gitlab: <B_4_1 extends {
|
|
2207
|
-
redirect: boolean;
|
|
2208
|
-
}>(redirectURL?: string, config?: B_4_1) => Promise<B_4_1 extends {
|
|
2209
|
-
redirect: true;
|
|
2210
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2211
|
-
apple: <B_5_1 extends {
|
|
2212
|
-
redirect: boolean;
|
|
2213
|
-
}>(redirectURL?: string, config?: B_5_1) => Promise<B_5_1 extends {
|
|
2214
|
-
redirect: true;
|
|
2215
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2216
|
-
discord: <B_6_1 extends {
|
|
2217
|
-
redirect: boolean;
|
|
2218
|
-
}>(redirectURL?: string, config?: B_6_1) => Promise<B_6_1 extends {
|
|
2219
|
-
redirect: true;
|
|
2220
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2221
|
-
linkedin: <B_7_1 extends {
|
|
2222
|
-
redirect: boolean;
|
|
2223
|
-
}>(redirectURL?: string, config?: B_7_1) => Promise<B_7_1 extends {
|
|
2224
|
-
redirect: true;
|
|
2225
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3274
|
+
start: ((provider: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>) & {
|
|
3275
|
+
google: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3276
|
+
facebook: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3277
|
+
github: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3278
|
+
microsoft: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3279
|
+
gitlab: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3280
|
+
apple: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3281
|
+
discord: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3282
|
+
linkedin: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3283
|
+
slack: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2226
3284
|
};
|
|
2227
3285
|
exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3286
|
+
startNative: (provider: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
3287
|
+
finishNative: (provider: string, stateId: string, user?: string, code?: string, idToken?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
2228
3288
|
};
|
|
2229
3289
|
saml: {
|
|
2230
|
-
start:
|
|
2231
|
-
redirect: boolean;
|
|
2232
|
-
}>(tenantNameOrEmail: string, config?: B_1_3) => Promise<B_1_3 extends {
|
|
2233
|
-
redirect: true;
|
|
2234
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3290
|
+
start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2235
3291
|
exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2236
3292
|
};
|
|
2237
3293
|
totp: {
|
|
2238
3294
|
signUp: (loginId: string, user?: {
|
|
2239
3295
|
email?: string;
|
|
2240
3296
|
name?: string;
|
|
3297
|
+
givenName?: string;
|
|
3298
|
+
middleName?: string;
|
|
3299
|
+
familyName?: string;
|
|
2241
3300
|
phone?: string;
|
|
2242
3301
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.TOTPResponse>>;
|
|
2243
|
-
verify: (loginId: string, code: string, loginOptions?:
|
|
2244
|
-
stepup?: boolean;
|
|
2245
|
-
mfa?: boolean;
|
|
2246
|
-
customClaims?: Record<string, any>;
|
|
2247
|
-
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3302
|
+
verify: (loginId: string, code: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2248
3303
|
update: (loginId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.TOTPResponse>>;
|
|
2249
3304
|
};
|
|
2250
3305
|
password: {
|
|
2251
3306
|
signUp: (loginId: string, password: string, user?: {
|
|
2252
3307
|
email?: string;
|
|
2253
3308
|
name?: string;
|
|
3309
|
+
givenName?: string;
|
|
3310
|
+
middleName?: string;
|
|
3311
|
+
familyName?: string;
|
|
2254
3312
|
phone?: string;
|
|
2255
3313
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2256
3314
|
signIn: (loginId: string, password: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2257
|
-
sendReset: (loginId: string, redirectUrl?: string
|
|
3315
|
+
sendReset: (loginId: string, redirectUrl?: string, templateOptions?: {
|
|
3316
|
+
[x: string]: string;
|
|
3317
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2258
3318
|
resetMethod: string;
|
|
2259
3319
|
pendingRef?: string;
|
|
2260
3320
|
linkId?: string;
|
|
2261
3321
|
maskedEmail: string;
|
|
2262
3322
|
}>>;
|
|
2263
3323
|
update: (loginId: string, newPassword: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
2264
|
-
replace: (loginId: string, oldPassword: string, newPassword: string) => Promise<_descope_core_js_sdk.SdkResponse<
|
|
3324
|
+
replace: (loginId: string, oldPassword: string, newPassword: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2265
3325
|
policy: () => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2266
3326
|
minLength: number;
|
|
2267
3327
|
lowercase: boolean;
|
|
@@ -2271,10 +3331,13 @@ declare const getSdk: () => ((({
|
|
|
2271
3331
|
}>>;
|
|
2272
3332
|
};
|
|
2273
3333
|
refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3334
|
+
selectTenant: (tenantId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2274
3335
|
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
2275
3336
|
logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
2276
3337
|
me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
|
|
3338
|
+
history: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserHistoryResponse>>;
|
|
2277
3339
|
isJwtExpired: (token: string) => boolean;
|
|
3340
|
+
getTenants: (token: string) => string[];
|
|
2278
3341
|
getJwtPermissions: (token: string, tenant?: string) => string[];
|
|
2279
3342
|
getJwtRoles: (token: string, tenant?: string) => string[];
|
|
2280
3343
|
httpClient: {
|
|
@@ -2299,7 +3362,7 @@ declare const getSdk: () => ((({
|
|
|
2299
3362
|
};
|
|
2300
3363
|
token?: string;
|
|
2301
3364
|
}) => Promise<Response>;
|
|
2302
|
-
delete: (path: string,
|
|
3365
|
+
delete: (path: string, config?: {
|
|
2303
3366
|
headers?: HeadersInit;
|
|
2304
3367
|
queryParams?: {
|
|
2305
3368
|
[key: string]: string;
|
|
@@ -2321,6 +3384,7 @@ declare const getSdk: () => ((({
|
|
|
2321
3384
|
flow: {
|
|
2322
3385
|
start: (flowId: string, options?: Pick<{
|
|
2323
3386
|
redirectUrl?: string;
|
|
3387
|
+
location?: string;
|
|
2324
3388
|
tenant?: string;
|
|
2325
3389
|
deviceInfo?: {
|
|
2326
3390
|
webAuthnSupport?: boolean;
|
|
@@ -2331,17 +3395,30 @@ declare const getSdk: () => ((({
|
|
|
2331
3395
|
name?: string;
|
|
2332
3396
|
loginId?: string;
|
|
2333
3397
|
};
|
|
2334
|
-
|
|
3398
|
+
redirectAuth?: {
|
|
3399
|
+
callbackUrl: string;
|
|
3400
|
+
codeChallenge: string;
|
|
3401
|
+
};
|
|
3402
|
+
oidcIdpStateId?: string;
|
|
3403
|
+
preview?: boolean;
|
|
3404
|
+
samlIdpStateId?: string;
|
|
3405
|
+
samlIdpUsername?: string;
|
|
3406
|
+
ssoAppId?: string;
|
|
3407
|
+
oidcLoginHint?: string;
|
|
3408
|
+
abTestingKey?: number;
|
|
3409
|
+
startOptionsVersion?: number;
|
|
3410
|
+
client?: Record<string, any>;
|
|
3411
|
+
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client"> & {
|
|
2335
3412
|
lastAuth?: Omit<{
|
|
2336
3413
|
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
2337
3414
|
oauthProvider?: string;
|
|
2338
3415
|
name?: string;
|
|
2339
3416
|
loginId?: string;
|
|
2340
3417
|
}, "loginId" | "name">;
|
|
2341
|
-
}, conditionInteractionId?: string, interactionId?: string, input?: {
|
|
3418
|
+
}, conditionInteractionId?: string, interactionId?: string, version?: number, componentsVersion?: string, input?: {
|
|
2342
3419
|
[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[])[])[])[])[])[])[])[])[])[])[];
|
|
2343
3420
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
2344
|
-
next: (executionId: string, stepId: string, interactionId: string, input?: {
|
|
3421
|
+
next: (executionId: string, stepId: string, interactionId: string, version?: number, componentsVersion?: string, input?: {
|
|
2345
3422
|
[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[])[])[])[])[])[])[])[])[])[])[];
|
|
2346
3423
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
2347
3424
|
};
|
|
@@ -2355,11 +3432,7 @@ declare const getSdk: () => ((({
|
|
|
2355
3432
|
finish: (transactionId: string, response: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2356
3433
|
};
|
|
2357
3434
|
signIn: ((identifier: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
|
|
2358
|
-
start: (loginId: string, origin: string, loginOptions?: {
|
|
2359
|
-
stepup?: boolean;
|
|
2360
|
-
mfa?: boolean;
|
|
2361
|
-
customClaims?: Record<string, any>;
|
|
2362
|
-
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3435
|
+
start: (loginId: string, origin: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2363
3436
|
transactionId: string;
|
|
2364
3437
|
options: string;
|
|
2365
3438
|
create: boolean;
|
|
@@ -2388,23 +3461,30 @@ declare const getSdk: () => ((({
|
|
|
2388
3461
|
conditional: (options: string, abort: AbortController) => Promise<string>;
|
|
2389
3462
|
};
|
|
2390
3463
|
};
|
|
3464
|
+
fedcm: {
|
|
3465
|
+
oneTap(provider?: string, oneTapConfig?: _descope_web_js_sdk.OneTapConfig, loginOptions?: _descope_core_js_sdk.LoginOptions, onSkip?: () => void): Promise<unknown>;
|
|
3466
|
+
};
|
|
2391
3467
|
accessKey: {
|
|
2392
|
-
exchange: (accessKey: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
|
|
3468
|
+
exchange: (accessKey: string, loginOptions?: _descope_core_js_sdk.AccessKeyLoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
|
|
2393
3469
|
};
|
|
2394
3470
|
otp: {
|
|
2395
3471
|
verify: {
|
|
2396
3472
|
sms: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3473
|
+
voice: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2397
3474
|
whatsapp: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2398
3475
|
email: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2399
3476
|
};
|
|
2400
3477
|
signIn: {
|
|
2401
|
-
sms: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3478
|
+
sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3479
|
+
maskedPhone: string;
|
|
3480
|
+
}>>;
|
|
3481
|
+
voice: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2402
3482
|
maskedPhone: string;
|
|
2403
3483
|
}>>;
|
|
2404
|
-
whatsapp: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3484
|
+
whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2405
3485
|
maskedPhone: string;
|
|
2406
3486
|
}>>;
|
|
2407
|
-
email: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3487
|
+
email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2408
3488
|
maskedEmail: string;
|
|
2409
3489
|
}>>;
|
|
2410
3490
|
};
|
|
@@ -2412,45 +3492,114 @@ declare const getSdk: () => ((({
|
|
|
2412
3492
|
sms: (loginId: string, user?: {
|
|
2413
3493
|
email?: string;
|
|
2414
3494
|
name?: string;
|
|
3495
|
+
givenName?: string;
|
|
3496
|
+
middleName?: string;
|
|
3497
|
+
familyName?: string;
|
|
2415
3498
|
phone?: string;
|
|
3499
|
+
}, signUpOptions?: {
|
|
3500
|
+
customClaims?: Record<string, any>;
|
|
3501
|
+
templateOptions?: {
|
|
3502
|
+
[x: string]: string;
|
|
3503
|
+
};
|
|
3504
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3505
|
+
maskedPhone: string;
|
|
3506
|
+
}>>;
|
|
3507
|
+
voice: (loginId: string, user?: {
|
|
3508
|
+
email?: string;
|
|
3509
|
+
name?: string;
|
|
3510
|
+
givenName?: string;
|
|
3511
|
+
middleName?: string;
|
|
3512
|
+
familyName?: string;
|
|
3513
|
+
phone?: string;
|
|
3514
|
+
}, signUpOptions?: {
|
|
3515
|
+
customClaims?: Record<string, any>;
|
|
3516
|
+
templateOptions?: {
|
|
3517
|
+
[x: string]: string;
|
|
3518
|
+
};
|
|
2416
3519
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2417
3520
|
maskedPhone: string;
|
|
2418
3521
|
}>>;
|
|
2419
3522
|
whatsapp: (loginId: string, user?: {
|
|
2420
3523
|
email?: string;
|
|
2421
3524
|
name?: string;
|
|
3525
|
+
givenName?: string;
|
|
3526
|
+
middleName?: string;
|
|
3527
|
+
familyName?: string;
|
|
2422
3528
|
phone?: string;
|
|
3529
|
+
}, signUpOptions?: {
|
|
3530
|
+
customClaims?: Record<string, any>;
|
|
3531
|
+
templateOptions?: {
|
|
3532
|
+
[x: string]: string;
|
|
3533
|
+
};
|
|
2423
3534
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2424
3535
|
maskedPhone: string;
|
|
2425
3536
|
}>>;
|
|
2426
3537
|
email: (loginId: string, user?: {
|
|
2427
3538
|
email?: string;
|
|
2428
3539
|
name?: string;
|
|
3540
|
+
givenName?: string;
|
|
3541
|
+
middleName?: string;
|
|
3542
|
+
familyName?: string;
|
|
2429
3543
|
phone?: string;
|
|
3544
|
+
}, signUpOptions?: {
|
|
3545
|
+
customClaims?: Record<string, any>;
|
|
3546
|
+
templateOptions?: {
|
|
3547
|
+
[x: string]: string;
|
|
3548
|
+
};
|
|
2430
3549
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2431
3550
|
maskedEmail: string;
|
|
2432
3551
|
}>>;
|
|
2433
3552
|
};
|
|
2434
3553
|
signUpOrIn: {
|
|
2435
|
-
sms: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3554
|
+
sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2436
3555
|
maskedPhone: string;
|
|
2437
3556
|
}>>;
|
|
2438
|
-
|
|
3557
|
+
voice: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2439
3558
|
maskedPhone: string;
|
|
2440
3559
|
}>>;
|
|
2441
|
-
|
|
3560
|
+
whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3561
|
+
maskedPhone: string;
|
|
3562
|
+
}>>;
|
|
3563
|
+
email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2442
3564
|
maskedEmail: string;
|
|
2443
3565
|
}>>;
|
|
2444
3566
|
};
|
|
2445
3567
|
update: {
|
|
2446
|
-
email: (loginId: string, email: string, token?: string
|
|
3568
|
+
email: <T_6 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
|
|
3569
|
+
addToLoginIDs?: T_6;
|
|
3570
|
+
onMergeUseExisting?: T_6 extends true ? boolean : never;
|
|
3571
|
+
templateOptions?: {
|
|
3572
|
+
[x: string]: string;
|
|
3573
|
+
};
|
|
3574
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2447
3575
|
maskedEmail: string;
|
|
2448
3576
|
}>>;
|
|
2449
3577
|
phone: {
|
|
2450
|
-
sms: (loginId: string, phone: string, token?: string
|
|
3578
|
+
sms: <T_1_6 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
3579
|
+
addToLoginIDs?: T_1_6;
|
|
3580
|
+
onMergeUseExisting?: T_1_6 extends true ? boolean : never;
|
|
3581
|
+
templateOptions?: {
|
|
3582
|
+
[x: string]: string;
|
|
3583
|
+
};
|
|
3584
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3585
|
+
maskedPhone: string;
|
|
3586
|
+
}>>;
|
|
3587
|
+
voice: <T_1_7 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
3588
|
+
addToLoginIDs?: T_1_7;
|
|
3589
|
+
onMergeUseExisting?: T_1_7 extends true ? boolean : never;
|
|
3590
|
+
templateOptions?: {
|
|
3591
|
+
[x: string]: string;
|
|
3592
|
+
};
|
|
3593
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2451
3594
|
maskedPhone: string;
|
|
2452
3595
|
}>>;
|
|
2453
|
-
whatsapp: (loginId: string, phone: string, token?: string
|
|
3596
|
+
whatsapp: <T_1_8 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
3597
|
+
addToLoginIDs?: T_1_8;
|
|
3598
|
+
onMergeUseExisting?: T_1_8 extends true ? boolean : never;
|
|
3599
|
+
templateOptions?: {
|
|
3600
|
+
[x: string]: string;
|
|
3601
|
+
};
|
|
3602
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2454
3603
|
maskedPhone: string;
|
|
2455
3604
|
}>>;
|
|
2456
3605
|
};
|
|
@@ -2459,59 +3608,151 @@ declare const getSdk: () => ((({
|
|
|
2459
3608
|
magicLink: {
|
|
2460
3609
|
verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2461
3610
|
signIn: {
|
|
2462
|
-
sms: (loginId: string,
|
|
3611
|
+
sms: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3612
|
+
maskedPhone: string;
|
|
3613
|
+
}>>;
|
|
3614
|
+
voice: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2463
3615
|
maskedPhone: string;
|
|
2464
3616
|
}>>;
|
|
2465
|
-
whatsapp: (loginId: string,
|
|
3617
|
+
whatsapp: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2466
3618
|
maskedPhone: string;
|
|
2467
3619
|
}>>;
|
|
2468
|
-
email: (loginId: string,
|
|
3620
|
+
email: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2469
3621
|
maskedEmail: string;
|
|
2470
3622
|
}>>;
|
|
2471
3623
|
};
|
|
2472
3624
|
signUp: {
|
|
2473
|
-
sms: (loginId: string,
|
|
3625
|
+
sms: (loginId: string, URI: string, user?: {
|
|
3626
|
+
email?: string;
|
|
3627
|
+
name?: string;
|
|
3628
|
+
givenName?: string;
|
|
3629
|
+
middleName?: string;
|
|
3630
|
+
familyName?: string;
|
|
3631
|
+
phone?: string;
|
|
3632
|
+
}, signUpOptions?: {
|
|
3633
|
+
customClaims?: Record<string, any>;
|
|
3634
|
+
templateOptions?: {
|
|
3635
|
+
[x: string]: string;
|
|
3636
|
+
};
|
|
3637
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3638
|
+
maskedPhone: string;
|
|
3639
|
+
}>>;
|
|
3640
|
+
voice: (loginId: string, URI: string, user?: {
|
|
2474
3641
|
email?: string;
|
|
2475
3642
|
name?: string;
|
|
3643
|
+
givenName?: string;
|
|
3644
|
+
middleName?: string;
|
|
3645
|
+
familyName?: string;
|
|
2476
3646
|
phone?: string;
|
|
3647
|
+
}, signUpOptions?: {
|
|
3648
|
+
customClaims?: Record<string, any>;
|
|
3649
|
+
templateOptions?: {
|
|
3650
|
+
[x: string]: string;
|
|
3651
|
+
};
|
|
2477
3652
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2478
3653
|
maskedPhone: string;
|
|
2479
3654
|
}>>;
|
|
2480
|
-
whatsapp: (loginId: string,
|
|
3655
|
+
whatsapp: (loginId: string, URI: string, user?: {
|
|
2481
3656
|
email?: string;
|
|
2482
3657
|
name?: string;
|
|
3658
|
+
givenName?: string;
|
|
3659
|
+
middleName?: string;
|
|
3660
|
+
familyName?: string;
|
|
2483
3661
|
phone?: string;
|
|
3662
|
+
}, signUpOptions?: {
|
|
3663
|
+
customClaims?: Record<string, any>;
|
|
3664
|
+
templateOptions?: {
|
|
3665
|
+
[x: string]: string;
|
|
3666
|
+
};
|
|
2484
3667
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2485
3668
|
maskedPhone: string;
|
|
2486
3669
|
}>>;
|
|
2487
|
-
email: (loginId: string,
|
|
3670
|
+
email: (loginId: string, URI: string, user?: {
|
|
2488
3671
|
email?: string;
|
|
2489
3672
|
name?: string;
|
|
3673
|
+
givenName?: string;
|
|
3674
|
+
middleName?: string;
|
|
3675
|
+
familyName?: string;
|
|
2490
3676
|
phone?: string;
|
|
3677
|
+
}, signUpOptions?: {
|
|
3678
|
+
customClaims?: Record<string, any>;
|
|
3679
|
+
templateOptions?: {
|
|
3680
|
+
[x: string]: string;
|
|
3681
|
+
};
|
|
2491
3682
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2492
3683
|
maskedEmail: string;
|
|
2493
3684
|
}>>;
|
|
2494
3685
|
};
|
|
2495
3686
|
signUpOrIn: {
|
|
2496
|
-
sms: (loginId: string,
|
|
3687
|
+
sms: (loginId: string, URI?: string, signUpOptions?: {
|
|
3688
|
+
customClaims?: Record<string, any>;
|
|
3689
|
+
templateOptions?: {
|
|
3690
|
+
[x: string]: string;
|
|
3691
|
+
};
|
|
3692
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2497
3693
|
maskedPhone: string;
|
|
2498
3694
|
}>>;
|
|
2499
|
-
|
|
3695
|
+
voice: (loginId: string, URI?: string, signUpOptions?: {
|
|
3696
|
+
customClaims?: Record<string, any>;
|
|
3697
|
+
templateOptions?: {
|
|
3698
|
+
[x: string]: string;
|
|
3699
|
+
};
|
|
3700
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3701
|
+
maskedPhone: string;
|
|
3702
|
+
}>>;
|
|
3703
|
+
whatsapp: (loginId: string, URI?: string, signUpOptions?: {
|
|
3704
|
+
customClaims?: Record<string, any>;
|
|
3705
|
+
templateOptions?: {
|
|
3706
|
+
[x: string]: string;
|
|
3707
|
+
};
|
|
3708
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2500
3709
|
maskedPhone: string;
|
|
2501
3710
|
}>>;
|
|
2502
|
-
email: (loginId: string,
|
|
3711
|
+
email: (loginId: string, URI?: string, signUpOptions?: {
|
|
3712
|
+
customClaims?: Record<string, any>;
|
|
3713
|
+
templateOptions?: {
|
|
3714
|
+
[x: string]: string;
|
|
3715
|
+
};
|
|
3716
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2503
3717
|
maskedEmail: string;
|
|
2504
3718
|
}>>;
|
|
2505
3719
|
};
|
|
2506
3720
|
update: {
|
|
2507
|
-
email: (loginId: string, email: string, URI?: string, token?: string
|
|
3721
|
+
email: <T_2_2 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
3722
|
+
addToLoginIDs?: T_2_2;
|
|
3723
|
+
onMergeUseExisting?: T_2_2 extends true ? boolean : never;
|
|
3724
|
+
templateOptions?: {
|
|
3725
|
+
[x: string]: string;
|
|
3726
|
+
};
|
|
3727
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2508
3728
|
maskedEmail: string;
|
|
2509
3729
|
}>>;
|
|
2510
3730
|
phone: {
|
|
2511
|
-
sms: (loginId: string, phone: string, URI?: string, token?: string
|
|
3731
|
+
sms: <T_3_6 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
3732
|
+
addToLoginIDs?: T_3_6;
|
|
3733
|
+
onMergeUseExisting?: T_3_6 extends true ? boolean : never;
|
|
3734
|
+
templateOptions?: {
|
|
3735
|
+
[x: string]: string;
|
|
3736
|
+
};
|
|
3737
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2512
3738
|
maskedPhone: string;
|
|
2513
3739
|
}>>;
|
|
2514
|
-
|
|
3740
|
+
voice: <T_3_7 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
3741
|
+
addToLoginIDs?: T_3_7;
|
|
3742
|
+
onMergeUseExisting?: T_3_7 extends true ? boolean : never;
|
|
3743
|
+
templateOptions?: {
|
|
3744
|
+
[x: string]: string;
|
|
3745
|
+
};
|
|
3746
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3747
|
+
maskedPhone: string;
|
|
3748
|
+
}>>;
|
|
3749
|
+
whatsapp: <T_3_8 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
3750
|
+
addToLoginIDs?: T_3_8;
|
|
3751
|
+
onMergeUseExisting?: T_3_8 extends true ? boolean : never;
|
|
3752
|
+
templateOptions?: {
|
|
3753
|
+
[x: string]: string;
|
|
3754
|
+
};
|
|
3755
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2515
3756
|
maskedPhone: string;
|
|
2516
3757
|
}>>;
|
|
2517
3758
|
};
|
|
@@ -2519,102 +3760,92 @@ declare const getSdk: () => ((({
|
|
|
2519
3760
|
};
|
|
2520
3761
|
enchantedLink: {
|
|
2521
3762
|
verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
2522
|
-
signIn: (loginId: string,
|
|
2523
|
-
signUpOrIn: (loginId: string,
|
|
2524
|
-
|
|
3763
|
+
signIn: (loginId: string, URI?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
3764
|
+
signUpOrIn: (loginId: string, URI?: string, signUpOptions?: {
|
|
3765
|
+
customClaims?: Record<string, any>;
|
|
3766
|
+
templateOptions?: {
|
|
3767
|
+
[x: string]: string;
|
|
3768
|
+
};
|
|
3769
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
3770
|
+
signUp: (loginId: string, URI?: string, user?: {
|
|
2525
3771
|
email?: string;
|
|
2526
3772
|
name?: string;
|
|
3773
|
+
givenName?: string;
|
|
3774
|
+
middleName?: string;
|
|
3775
|
+
familyName?: string;
|
|
2527
3776
|
phone?: string;
|
|
3777
|
+
}, signUpOptions?: {
|
|
3778
|
+
customClaims?: Record<string, any>;
|
|
3779
|
+
templateOptions?: {
|
|
3780
|
+
[x: string]: string;
|
|
3781
|
+
};
|
|
2528
3782
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
2529
3783
|
waitForSession: (pendingRef: string, config?: {
|
|
2530
3784
|
pollingIntervalMs: number;
|
|
2531
3785
|
timeoutMs: number;
|
|
2532
3786
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2533
3787
|
update: {
|
|
2534
|
-
email: (loginId: string, email: string, URI?: string, token?: string
|
|
3788
|
+
email: <T_4_2 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
3789
|
+
addToLoginIDs?: T_4_2;
|
|
3790
|
+
onMergeUseExisting?: T_4_2 extends true ? boolean : never;
|
|
3791
|
+
templateOptions?: {
|
|
3792
|
+
[x: string]: string;
|
|
3793
|
+
};
|
|
3794
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
2535
3795
|
};
|
|
2536
3796
|
};
|
|
2537
3797
|
oauth: {
|
|
2538
|
-
start: {
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2549
|
-
google: <B_2_2 extends {
|
|
2550
|
-
redirect: boolean;
|
|
2551
|
-
}>(redirectURL?: string, config?: B_2_2) => Promise<B_2_2 extends {
|
|
2552
|
-
redirect: true;
|
|
2553
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2554
|
-
microsoft: <B_3_2 extends {
|
|
2555
|
-
redirect: boolean;
|
|
2556
|
-
}>(redirectURL?: string, config?: B_3_2) => Promise<B_3_2 extends {
|
|
2557
|
-
redirect: true;
|
|
2558
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2559
|
-
gitlab: <B_4_2 extends {
|
|
2560
|
-
redirect: boolean;
|
|
2561
|
-
}>(redirectURL?: string, config?: B_4_2) => Promise<B_4_2 extends {
|
|
2562
|
-
redirect: true;
|
|
2563
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2564
|
-
apple: <B_5_2 extends {
|
|
2565
|
-
redirect: boolean;
|
|
2566
|
-
}>(redirectURL?: string, config?: B_5_2) => Promise<B_5_2 extends {
|
|
2567
|
-
redirect: true;
|
|
2568
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2569
|
-
discord: <B_6_2 extends {
|
|
2570
|
-
redirect: boolean;
|
|
2571
|
-
}>(redirectURL?: string, config?: B_6_2) => Promise<B_6_2 extends {
|
|
2572
|
-
redirect: true;
|
|
2573
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2574
|
-
linkedin: <B_7_2 extends {
|
|
2575
|
-
redirect: boolean;
|
|
2576
|
-
}>(redirectURL?: string, config?: B_7_2) => Promise<B_7_2 extends {
|
|
2577
|
-
redirect: true;
|
|
2578
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3798
|
+
start: ((provider: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>) & {
|
|
3799
|
+
google: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3800
|
+
facebook: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3801
|
+
github: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3802
|
+
microsoft: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3803
|
+
gitlab: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3804
|
+
apple: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3805
|
+
discord: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3806
|
+
linkedin: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3807
|
+
slack: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2579
3808
|
};
|
|
2580
3809
|
exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3810
|
+
startNative: (provider: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
3811
|
+
finishNative: (provider: string, stateId: string, user?: string, code?: string, idToken?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
2581
3812
|
};
|
|
2582
3813
|
saml: {
|
|
2583
|
-
start:
|
|
2584
|
-
redirect: boolean;
|
|
2585
|
-
}>(tenantNameOrEmail: string, config?: B_1_5) => Promise<B_1_5 extends {
|
|
2586
|
-
redirect: true;
|
|
2587
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
3814
|
+
start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2588
3815
|
exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2589
3816
|
};
|
|
2590
3817
|
totp: {
|
|
2591
3818
|
signUp: (loginId: string, user?: {
|
|
2592
3819
|
email?: string;
|
|
2593
3820
|
name?: string;
|
|
3821
|
+
givenName?: string;
|
|
3822
|
+
middleName?: string;
|
|
3823
|
+
familyName?: string;
|
|
2594
3824
|
phone?: string;
|
|
2595
3825
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.TOTPResponse>>;
|
|
2596
|
-
verify: (loginId: string, code: string, loginOptions?:
|
|
2597
|
-
stepup?: boolean;
|
|
2598
|
-
mfa?: boolean;
|
|
2599
|
-
customClaims?: Record<string, any>;
|
|
2600
|
-
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3826
|
+
verify: (loginId: string, code: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2601
3827
|
update: (loginId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.TOTPResponse>>;
|
|
2602
3828
|
};
|
|
2603
3829
|
password: {
|
|
2604
3830
|
signUp: (loginId: string, password: string, user?: {
|
|
2605
3831
|
email?: string;
|
|
2606
3832
|
name?: string;
|
|
3833
|
+
givenName?: string;
|
|
3834
|
+
middleName?: string;
|
|
3835
|
+
familyName?: string;
|
|
2607
3836
|
phone?: string;
|
|
2608
3837
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2609
3838
|
signIn: (loginId: string, password: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2610
|
-
sendReset: (loginId: string, redirectUrl?: string
|
|
3839
|
+
sendReset: (loginId: string, redirectUrl?: string, templateOptions?: {
|
|
3840
|
+
[x: string]: string;
|
|
3841
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2611
3842
|
resetMethod: string;
|
|
2612
3843
|
pendingRef?: string;
|
|
2613
3844
|
linkId?: string;
|
|
2614
3845
|
maskedEmail: string;
|
|
2615
3846
|
}>>;
|
|
2616
3847
|
update: (loginId: string, newPassword: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
2617
|
-
replace: (loginId: string, oldPassword: string, newPassword: string) => Promise<_descope_core_js_sdk.SdkResponse<
|
|
3848
|
+
replace: (loginId: string, oldPassword: string, newPassword: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2618
3849
|
policy: () => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2619
3850
|
minLength: number;
|
|
2620
3851
|
lowercase: boolean;
|
|
@@ -2624,10 +3855,13 @@ declare const getSdk: () => ((({
|
|
|
2624
3855
|
}>>;
|
|
2625
3856
|
};
|
|
2626
3857
|
refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3858
|
+
selectTenant: (tenantId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2627
3859
|
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
2628
3860
|
logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
2629
3861
|
me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
|
|
3862
|
+
history: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserHistoryResponse>>;
|
|
2630
3863
|
isJwtExpired: (token: string) => boolean;
|
|
3864
|
+
getTenants: (token: string) => string[];
|
|
2631
3865
|
getJwtPermissions: (token: string, tenant?: string) => string[];
|
|
2632
3866
|
getJwtRoles: (token: string, tenant?: string) => string[];
|
|
2633
3867
|
httpClient: {
|
|
@@ -2652,7 +3886,7 @@ declare const getSdk: () => ((({
|
|
|
2652
3886
|
};
|
|
2653
3887
|
token?: string;
|
|
2654
3888
|
}) => Promise<Response>;
|
|
2655
|
-
delete: (path: string,
|
|
3889
|
+
delete: (path: string, config?: {
|
|
2656
3890
|
headers?: HeadersInit;
|
|
2657
3891
|
queryParams?: {
|
|
2658
3892
|
[key: string]: string;
|
|
@@ -2668,6 +3902,7 @@ declare const getSdk: () => ((({
|
|
|
2668
3902
|
flow: {
|
|
2669
3903
|
start: (flowId: string, options?: Pick<{
|
|
2670
3904
|
redirectUrl?: string;
|
|
3905
|
+
location?: string;
|
|
2671
3906
|
tenant?: string;
|
|
2672
3907
|
deviceInfo?: {
|
|
2673
3908
|
webAuthnSupport?: boolean;
|
|
@@ -2678,17 +3913,30 @@ declare const getSdk: () => ((({
|
|
|
2678
3913
|
name?: string;
|
|
2679
3914
|
loginId?: string;
|
|
2680
3915
|
};
|
|
2681
|
-
|
|
3916
|
+
redirectAuth?: {
|
|
3917
|
+
callbackUrl: string;
|
|
3918
|
+
codeChallenge: string;
|
|
3919
|
+
};
|
|
3920
|
+
oidcIdpStateId?: string;
|
|
3921
|
+
preview?: boolean;
|
|
3922
|
+
samlIdpStateId?: string;
|
|
3923
|
+
samlIdpUsername?: string;
|
|
3924
|
+
ssoAppId?: string;
|
|
3925
|
+
oidcLoginHint?: string;
|
|
3926
|
+
abTestingKey?: number;
|
|
3927
|
+
startOptionsVersion?: number;
|
|
3928
|
+
client?: Record<string, any>;
|
|
3929
|
+
}, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client"> & {
|
|
2682
3930
|
lastAuth?: Omit<{
|
|
2683
3931
|
authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
|
|
2684
3932
|
oauthProvider?: string;
|
|
2685
3933
|
name?: string;
|
|
2686
3934
|
loginId?: string;
|
|
2687
3935
|
}, "loginId" | "name">;
|
|
2688
|
-
}, conditionInteractionId?: string, interactionId?: string, input?: {
|
|
3936
|
+
}, conditionInteractionId?: string, interactionId?: string, version?: number, componentsVersion?: string, input?: {
|
|
2689
3937
|
[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[])[])[])[])[])[])[])[])[])[])[];
|
|
2690
3938
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
2691
|
-
next: (executionId: string, stepId: string, interactionId: string, input?: {
|
|
3939
|
+
next: (executionId: string, stepId: string, interactionId: string, version?: number, componentsVersion?: string, input?: {
|
|
2692
3940
|
[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[])[])[])[])[])[])[])[])[])[])[];
|
|
2693
3941
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.FlowResponse>>;
|
|
2694
3942
|
};
|
|
@@ -2702,11 +3950,7 @@ declare const getSdk: () => ((({
|
|
|
2702
3950
|
finish: (transactionId: string, response: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2703
3951
|
};
|
|
2704
3952
|
signIn: ((identifier: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>) & {
|
|
2705
|
-
start: (loginId: string, origin: string, loginOptions?: {
|
|
2706
|
-
stepup?: boolean;
|
|
2707
|
-
mfa?: boolean;
|
|
2708
|
-
customClaims?: Record<string, any>;
|
|
2709
|
-
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3953
|
+
start: (loginId: string, origin: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2710
3954
|
transactionId: string;
|
|
2711
3955
|
options: string;
|
|
2712
3956
|
create: boolean;
|
|
@@ -2735,23 +3979,30 @@ declare const getSdk: () => ((({
|
|
|
2735
3979
|
conditional: (options: string, abort: AbortController) => Promise<string>;
|
|
2736
3980
|
};
|
|
2737
3981
|
};
|
|
3982
|
+
fedcm: {
|
|
3983
|
+
oneTap(provider?: string, oneTapConfig?: _descope_web_js_sdk.OneTapConfig, loginOptions?: _descope_core_js_sdk.LoginOptions, onSkip?: () => void): Promise<unknown>;
|
|
3984
|
+
};
|
|
2738
3985
|
accessKey: {
|
|
2739
|
-
exchange: (accessKey: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
|
|
3986
|
+
exchange: (accessKey: string, loginOptions?: _descope_core_js_sdk.AccessKeyLoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
|
|
2740
3987
|
};
|
|
2741
3988
|
otp: {
|
|
2742
3989
|
verify: {
|
|
2743
3990
|
sms: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
3991
|
+
voice: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2744
3992
|
whatsapp: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2745
3993
|
email: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2746
3994
|
};
|
|
2747
3995
|
signIn: {
|
|
2748
|
-
sms: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
3996
|
+
sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2749
3997
|
maskedPhone: string;
|
|
2750
3998
|
}>>;
|
|
2751
|
-
|
|
3999
|
+
voice: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2752
4000
|
maskedPhone: string;
|
|
2753
4001
|
}>>;
|
|
2754
|
-
|
|
4002
|
+
whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
4003
|
+
maskedPhone: string;
|
|
4004
|
+
}>>;
|
|
4005
|
+
email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2755
4006
|
maskedEmail: string;
|
|
2756
4007
|
}>>;
|
|
2757
4008
|
};
|
|
@@ -2759,45 +4010,114 @@ declare const getSdk: () => ((({
|
|
|
2759
4010
|
sms: (loginId: string, user?: {
|
|
2760
4011
|
email?: string;
|
|
2761
4012
|
name?: string;
|
|
4013
|
+
givenName?: string;
|
|
4014
|
+
middleName?: string;
|
|
4015
|
+
familyName?: string;
|
|
4016
|
+
phone?: string;
|
|
4017
|
+
}, signUpOptions?: {
|
|
4018
|
+
customClaims?: Record<string, any>;
|
|
4019
|
+
templateOptions?: {
|
|
4020
|
+
[x: string]: string;
|
|
4021
|
+
};
|
|
4022
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
4023
|
+
maskedPhone: string;
|
|
4024
|
+
}>>;
|
|
4025
|
+
voice: (loginId: string, user?: {
|
|
4026
|
+
email?: string;
|
|
4027
|
+
name?: string;
|
|
4028
|
+
givenName?: string;
|
|
4029
|
+
middleName?: string;
|
|
4030
|
+
familyName?: string;
|
|
2762
4031
|
phone?: string;
|
|
4032
|
+
}, signUpOptions?: {
|
|
4033
|
+
customClaims?: Record<string, any>;
|
|
4034
|
+
templateOptions?: {
|
|
4035
|
+
[x: string]: string;
|
|
4036
|
+
};
|
|
2763
4037
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2764
4038
|
maskedPhone: string;
|
|
2765
4039
|
}>>;
|
|
2766
4040
|
whatsapp: (loginId: string, user?: {
|
|
2767
4041
|
email?: string;
|
|
2768
4042
|
name?: string;
|
|
4043
|
+
givenName?: string;
|
|
4044
|
+
middleName?: string;
|
|
4045
|
+
familyName?: string;
|
|
2769
4046
|
phone?: string;
|
|
4047
|
+
}, signUpOptions?: {
|
|
4048
|
+
customClaims?: Record<string, any>;
|
|
4049
|
+
templateOptions?: {
|
|
4050
|
+
[x: string]: string;
|
|
4051
|
+
};
|
|
2770
4052
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2771
4053
|
maskedPhone: string;
|
|
2772
4054
|
}>>;
|
|
2773
4055
|
email: (loginId: string, user?: {
|
|
2774
4056
|
email?: string;
|
|
2775
4057
|
name?: string;
|
|
4058
|
+
givenName?: string;
|
|
4059
|
+
middleName?: string;
|
|
4060
|
+
familyName?: string;
|
|
2776
4061
|
phone?: string;
|
|
4062
|
+
}, signUpOptions?: {
|
|
4063
|
+
customClaims?: Record<string, any>;
|
|
4064
|
+
templateOptions?: {
|
|
4065
|
+
[x: string]: string;
|
|
4066
|
+
};
|
|
2777
4067
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2778
4068
|
maskedEmail: string;
|
|
2779
4069
|
}>>;
|
|
2780
4070
|
};
|
|
2781
4071
|
signUpOrIn: {
|
|
2782
|
-
sms: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
4072
|
+
sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
4073
|
+
maskedPhone: string;
|
|
4074
|
+
}>>;
|
|
4075
|
+
voice: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2783
4076
|
maskedPhone: string;
|
|
2784
4077
|
}>>;
|
|
2785
|
-
whatsapp: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
4078
|
+
whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2786
4079
|
maskedPhone: string;
|
|
2787
4080
|
}>>;
|
|
2788
|
-
email: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
4081
|
+
email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2789
4082
|
maskedEmail: string;
|
|
2790
4083
|
}>>;
|
|
2791
4084
|
};
|
|
2792
4085
|
update: {
|
|
2793
|
-
email: (loginId: string, email: string, token?: string
|
|
4086
|
+
email: <T_7 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
|
|
4087
|
+
addToLoginIDs?: T_7;
|
|
4088
|
+
onMergeUseExisting?: T_7 extends true ? boolean : never;
|
|
4089
|
+
templateOptions?: {
|
|
4090
|
+
[x: string]: string;
|
|
4091
|
+
};
|
|
4092
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2794
4093
|
maskedEmail: string;
|
|
2795
4094
|
}>>;
|
|
2796
4095
|
phone: {
|
|
2797
|
-
sms: (loginId: string, phone: string, token?: string
|
|
4096
|
+
sms: <T_1_9 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
4097
|
+
addToLoginIDs?: T_1_9;
|
|
4098
|
+
onMergeUseExisting?: T_1_9 extends true ? boolean : never;
|
|
4099
|
+
templateOptions?: {
|
|
4100
|
+
[x: string]: string;
|
|
4101
|
+
};
|
|
4102
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
4103
|
+
maskedPhone: string;
|
|
4104
|
+
}>>;
|
|
4105
|
+
voice: <T_1_10 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
4106
|
+
addToLoginIDs?: T_1_10;
|
|
4107
|
+
onMergeUseExisting?: T_1_10 extends true ? boolean : never;
|
|
4108
|
+
templateOptions?: {
|
|
4109
|
+
[x: string]: string;
|
|
4110
|
+
};
|
|
4111
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2798
4112
|
maskedPhone: string;
|
|
2799
4113
|
}>>;
|
|
2800
|
-
whatsapp: (loginId: string, phone: string, token?: string
|
|
4114
|
+
whatsapp: <T_1_11 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
4115
|
+
addToLoginIDs?: T_1_11;
|
|
4116
|
+
onMergeUseExisting?: T_1_11 extends true ? boolean : never;
|
|
4117
|
+
templateOptions?: {
|
|
4118
|
+
[x: string]: string;
|
|
4119
|
+
};
|
|
4120
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2801
4121
|
maskedPhone: string;
|
|
2802
4122
|
}>>;
|
|
2803
4123
|
};
|
|
@@ -2806,59 +4126,151 @@ declare const getSdk: () => ((({
|
|
|
2806
4126
|
magicLink: {
|
|
2807
4127
|
verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2808
4128
|
signIn: {
|
|
2809
|
-
sms: (loginId: string,
|
|
4129
|
+
sms: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2810
4130
|
maskedPhone: string;
|
|
2811
4131
|
}>>;
|
|
2812
|
-
|
|
4132
|
+
voice: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2813
4133
|
maskedPhone: string;
|
|
2814
4134
|
}>>;
|
|
2815
|
-
|
|
4135
|
+
whatsapp: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
4136
|
+
maskedPhone: string;
|
|
4137
|
+
}>>;
|
|
4138
|
+
email: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2816
4139
|
maskedEmail: string;
|
|
2817
4140
|
}>>;
|
|
2818
4141
|
};
|
|
2819
4142
|
signUp: {
|
|
2820
|
-
sms: (loginId: string,
|
|
4143
|
+
sms: (loginId: string, URI: string, user?: {
|
|
2821
4144
|
email?: string;
|
|
2822
4145
|
name?: string;
|
|
4146
|
+
givenName?: string;
|
|
4147
|
+
middleName?: string;
|
|
4148
|
+
familyName?: string;
|
|
2823
4149
|
phone?: string;
|
|
4150
|
+
}, signUpOptions?: {
|
|
4151
|
+
customClaims?: Record<string, any>;
|
|
4152
|
+
templateOptions?: {
|
|
4153
|
+
[x: string]: string;
|
|
4154
|
+
};
|
|
2824
4155
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2825
4156
|
maskedPhone: string;
|
|
2826
4157
|
}>>;
|
|
2827
|
-
|
|
4158
|
+
voice: (loginId: string, URI: string, user?: {
|
|
2828
4159
|
email?: string;
|
|
2829
4160
|
name?: string;
|
|
4161
|
+
givenName?: string;
|
|
4162
|
+
middleName?: string;
|
|
4163
|
+
familyName?: string;
|
|
2830
4164
|
phone?: string;
|
|
4165
|
+
}, signUpOptions?: {
|
|
4166
|
+
customClaims?: Record<string, any>;
|
|
4167
|
+
templateOptions?: {
|
|
4168
|
+
[x: string]: string;
|
|
4169
|
+
};
|
|
2831
4170
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2832
4171
|
maskedPhone: string;
|
|
2833
4172
|
}>>;
|
|
2834
|
-
|
|
4173
|
+
whatsapp: (loginId: string, URI: string, user?: {
|
|
2835
4174
|
email?: string;
|
|
2836
4175
|
name?: string;
|
|
4176
|
+
givenName?: string;
|
|
4177
|
+
middleName?: string;
|
|
4178
|
+
familyName?: string;
|
|
2837
4179
|
phone?: string;
|
|
4180
|
+
}, signUpOptions?: {
|
|
4181
|
+
customClaims?: Record<string, any>;
|
|
4182
|
+
templateOptions?: {
|
|
4183
|
+
[x: string]: string;
|
|
4184
|
+
};
|
|
4185
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
4186
|
+
maskedPhone: string;
|
|
4187
|
+
}>>;
|
|
4188
|
+
email: (loginId: string, URI: string, user?: {
|
|
4189
|
+
email?: string;
|
|
4190
|
+
name?: string;
|
|
4191
|
+
givenName?: string;
|
|
4192
|
+
middleName?: string;
|
|
4193
|
+
familyName?: string;
|
|
4194
|
+
phone?: string;
|
|
4195
|
+
}, signUpOptions?: {
|
|
4196
|
+
customClaims?: Record<string, any>;
|
|
4197
|
+
templateOptions?: {
|
|
4198
|
+
[x: string]: string;
|
|
4199
|
+
};
|
|
2838
4200
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2839
4201
|
maskedEmail: string;
|
|
2840
4202
|
}>>;
|
|
2841
4203
|
};
|
|
2842
4204
|
signUpOrIn: {
|
|
2843
|
-
sms: (loginId: string,
|
|
4205
|
+
sms: (loginId: string, URI?: string, signUpOptions?: {
|
|
4206
|
+
customClaims?: Record<string, any>;
|
|
4207
|
+
templateOptions?: {
|
|
4208
|
+
[x: string]: string;
|
|
4209
|
+
};
|
|
4210
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2844
4211
|
maskedPhone: string;
|
|
2845
4212
|
}>>;
|
|
2846
|
-
|
|
4213
|
+
voice: (loginId: string, URI?: string, signUpOptions?: {
|
|
4214
|
+
customClaims?: Record<string, any>;
|
|
4215
|
+
templateOptions?: {
|
|
4216
|
+
[x: string]: string;
|
|
4217
|
+
};
|
|
4218
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2847
4219
|
maskedPhone: string;
|
|
2848
4220
|
}>>;
|
|
2849
|
-
|
|
4221
|
+
whatsapp: (loginId: string, URI?: string, signUpOptions?: {
|
|
4222
|
+
customClaims?: Record<string, any>;
|
|
4223
|
+
templateOptions?: {
|
|
4224
|
+
[x: string]: string;
|
|
4225
|
+
};
|
|
4226
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
4227
|
+
maskedPhone: string;
|
|
4228
|
+
}>>;
|
|
4229
|
+
email: (loginId: string, URI?: string, signUpOptions?: {
|
|
4230
|
+
customClaims?: Record<string, any>;
|
|
4231
|
+
templateOptions?: {
|
|
4232
|
+
[x: string]: string;
|
|
4233
|
+
};
|
|
4234
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2850
4235
|
maskedEmail: string;
|
|
2851
4236
|
}>>;
|
|
2852
4237
|
};
|
|
2853
4238
|
update: {
|
|
2854
|
-
email: (loginId: string, email: string, URI?: string, token?: string
|
|
4239
|
+
email: <T_2_3 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
4240
|
+
addToLoginIDs?: T_2_3;
|
|
4241
|
+
onMergeUseExisting?: T_2_3 extends true ? boolean : never;
|
|
4242
|
+
templateOptions?: {
|
|
4243
|
+
[x: string]: string;
|
|
4244
|
+
};
|
|
4245
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2855
4246
|
maskedEmail: string;
|
|
2856
4247
|
}>>;
|
|
2857
4248
|
phone: {
|
|
2858
|
-
sms: (loginId: string, phone: string, URI?: string, token?: string
|
|
4249
|
+
sms: <T_3_9 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
4250
|
+
addToLoginIDs?: T_3_9;
|
|
4251
|
+
onMergeUseExisting?: T_3_9 extends true ? boolean : never;
|
|
4252
|
+
templateOptions?: {
|
|
4253
|
+
[x: string]: string;
|
|
4254
|
+
};
|
|
4255
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
4256
|
+
maskedPhone: string;
|
|
4257
|
+
}>>;
|
|
4258
|
+
voice: <T_3_10 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
4259
|
+
addToLoginIDs?: T_3_10;
|
|
4260
|
+
onMergeUseExisting?: T_3_10 extends true ? boolean : never;
|
|
4261
|
+
templateOptions?: {
|
|
4262
|
+
[x: string]: string;
|
|
4263
|
+
};
|
|
4264
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2859
4265
|
maskedPhone: string;
|
|
2860
4266
|
}>>;
|
|
2861
|
-
whatsapp: (loginId: string, phone: string, URI?: string, token?: string
|
|
4267
|
+
whatsapp: <T_3_11 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
4268
|
+
addToLoginIDs?: T_3_11;
|
|
4269
|
+
onMergeUseExisting?: T_3_11 extends true ? boolean : never;
|
|
4270
|
+
templateOptions?: {
|
|
4271
|
+
[x: string]: string;
|
|
4272
|
+
};
|
|
4273
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2862
4274
|
maskedPhone: string;
|
|
2863
4275
|
}>>;
|
|
2864
4276
|
};
|
|
@@ -2866,102 +4278,92 @@ declare const getSdk: () => ((({
|
|
|
2866
4278
|
};
|
|
2867
4279
|
enchantedLink: {
|
|
2868
4280
|
verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
2869
|
-
signIn: (loginId: string,
|
|
2870
|
-
signUpOrIn: (loginId: string,
|
|
2871
|
-
|
|
4281
|
+
signIn: (loginId: string, URI?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
4282
|
+
signUpOrIn: (loginId: string, URI?: string, signUpOptions?: {
|
|
4283
|
+
customClaims?: Record<string, any>;
|
|
4284
|
+
templateOptions?: {
|
|
4285
|
+
[x: string]: string;
|
|
4286
|
+
};
|
|
4287
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
4288
|
+
signUp: (loginId: string, URI?: string, user?: {
|
|
2872
4289
|
email?: string;
|
|
2873
4290
|
name?: string;
|
|
4291
|
+
givenName?: string;
|
|
4292
|
+
middleName?: string;
|
|
4293
|
+
familyName?: string;
|
|
2874
4294
|
phone?: string;
|
|
4295
|
+
}, signUpOptions?: {
|
|
4296
|
+
customClaims?: Record<string, any>;
|
|
4297
|
+
templateOptions?: {
|
|
4298
|
+
[x: string]: string;
|
|
4299
|
+
};
|
|
2875
4300
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
2876
4301
|
waitForSession: (pendingRef: string, config?: {
|
|
2877
4302
|
pollingIntervalMs: number;
|
|
2878
4303
|
timeoutMs: number;
|
|
2879
4304
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2880
4305
|
update: {
|
|
2881
|
-
email: (loginId: string, email: string, URI?: string, token?: string
|
|
4306
|
+
email: <T_4_3 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
4307
|
+
addToLoginIDs?: T_4_3;
|
|
4308
|
+
onMergeUseExisting?: T_4_3 extends true ? boolean : never;
|
|
4309
|
+
templateOptions?: {
|
|
4310
|
+
[x: string]: string;
|
|
4311
|
+
};
|
|
4312
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
2882
4313
|
};
|
|
2883
4314
|
};
|
|
2884
4315
|
oauth: {
|
|
2885
|
-
start: {
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2896
|
-
google: <B_2_3 extends {
|
|
2897
|
-
redirect: boolean;
|
|
2898
|
-
}>(redirectURL?: string, config?: B_2_3) => Promise<B_2_3 extends {
|
|
2899
|
-
redirect: true;
|
|
2900
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2901
|
-
microsoft: <B_3_3 extends {
|
|
2902
|
-
redirect: boolean;
|
|
2903
|
-
}>(redirectURL?: string, config?: B_3_3) => Promise<B_3_3 extends {
|
|
2904
|
-
redirect: true;
|
|
2905
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2906
|
-
gitlab: <B_4_3 extends {
|
|
2907
|
-
redirect: boolean;
|
|
2908
|
-
}>(redirectURL?: string, config?: B_4_3) => Promise<B_4_3 extends {
|
|
2909
|
-
redirect: true;
|
|
2910
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2911
|
-
apple: <B_5_3 extends {
|
|
2912
|
-
redirect: boolean;
|
|
2913
|
-
}>(redirectURL?: string, config?: B_5_3) => Promise<B_5_3 extends {
|
|
2914
|
-
redirect: true;
|
|
2915
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2916
|
-
discord: <B_6_3 extends {
|
|
2917
|
-
redirect: boolean;
|
|
2918
|
-
}>(redirectURL?: string, config?: B_6_3) => Promise<B_6_3 extends {
|
|
2919
|
-
redirect: true;
|
|
2920
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2921
|
-
linkedin: <B_7_3 extends {
|
|
2922
|
-
redirect: boolean;
|
|
2923
|
-
}>(redirectURL?: string, config?: B_7_3) => Promise<B_7_3 extends {
|
|
2924
|
-
redirect: true;
|
|
2925
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
4316
|
+
start: ((provider: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>) & {
|
|
4317
|
+
google: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
4318
|
+
facebook: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
4319
|
+
github: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
4320
|
+
microsoft: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
4321
|
+
gitlab: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
4322
|
+
apple: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
4323
|
+
discord: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
4324
|
+
linkedin: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
4325
|
+
slack: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2926
4326
|
};
|
|
2927
4327
|
exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
4328
|
+
startNative: (provider: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
4329
|
+
finishNative: (provider: string, stateId: string, user?: string, code?: string, idToken?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
2928
4330
|
};
|
|
2929
4331
|
saml: {
|
|
2930
|
-
start:
|
|
2931
|
-
redirect: boolean;
|
|
2932
|
-
}>(tenantNameOrEmail: string, config?: B_1_7) => Promise<B_1_7 extends {
|
|
2933
|
-
redirect: true;
|
|
2934
|
-
} ? undefined : _descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
4332
|
+
start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
2935
4333
|
exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2936
4334
|
};
|
|
2937
4335
|
totp: {
|
|
2938
4336
|
signUp: (loginId: string, user?: {
|
|
2939
4337
|
email?: string;
|
|
2940
4338
|
name?: string;
|
|
4339
|
+
givenName?: string;
|
|
4340
|
+
middleName?: string;
|
|
4341
|
+
familyName?: string;
|
|
2941
4342
|
phone?: string;
|
|
2942
4343
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.TOTPResponse>>;
|
|
2943
|
-
verify: (loginId: string, code: string, loginOptions?:
|
|
2944
|
-
stepup?: boolean;
|
|
2945
|
-
mfa?: boolean;
|
|
2946
|
-
customClaims?: Record<string, any>;
|
|
2947
|
-
}, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
4344
|
+
verify: (loginId: string, code: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2948
4345
|
update: (loginId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.TOTPResponse>>;
|
|
2949
4346
|
};
|
|
2950
4347
|
password: {
|
|
2951
4348
|
signUp: (loginId: string, password: string, user?: {
|
|
2952
4349
|
email?: string;
|
|
2953
4350
|
name?: string;
|
|
4351
|
+
givenName?: string;
|
|
4352
|
+
middleName?: string;
|
|
4353
|
+
familyName?: string;
|
|
2954
4354
|
phone?: string;
|
|
2955
4355
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2956
4356
|
signIn: (loginId: string, password: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2957
|
-
sendReset: (loginId: string, redirectUrl?: string
|
|
4357
|
+
sendReset: (loginId: string, redirectUrl?: string, templateOptions?: {
|
|
4358
|
+
[x: string]: string;
|
|
4359
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2958
4360
|
resetMethod: string;
|
|
2959
4361
|
pendingRef?: string;
|
|
2960
4362
|
linkId?: string;
|
|
2961
4363
|
maskedEmail: string;
|
|
2962
4364
|
}>>;
|
|
2963
4365
|
update: (loginId: string, newPassword: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
2964
|
-
replace: (loginId: string, oldPassword: string, newPassword: string) => Promise<_descope_core_js_sdk.SdkResponse<
|
|
4366
|
+
replace: (loginId: string, oldPassword: string, newPassword: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2965
4367
|
policy: () => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
2966
4368
|
minLength: number;
|
|
2967
4369
|
lowercase: boolean;
|
|
@@ -2971,10 +4373,13 @@ declare const getSdk: () => ((({
|
|
|
2971
4373
|
}>>;
|
|
2972
4374
|
};
|
|
2973
4375
|
refresh: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
4376
|
+
selectTenant: (tenantId: string, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
2974
4377
|
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
2975
4378
|
logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
2976
4379
|
me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
|
|
4380
|
+
history: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserHistoryResponse>>;
|
|
2977
4381
|
isJwtExpired: (token: string) => boolean;
|
|
4382
|
+
getTenants: (token: string) => string[];
|
|
2978
4383
|
getJwtPermissions: (token: string, tenant?: string) => string[];
|
|
2979
4384
|
getJwtRoles: (token: string, tenant?: string) => string[];
|
|
2980
4385
|
httpClient: {
|
|
@@ -2999,7 +4404,7 @@ declare const getSdk: () => ((({
|
|
|
2999
4404
|
};
|
|
3000
4405
|
token?: string;
|
|
3001
4406
|
}) => Promise<Response>;
|
|
3002
|
-
delete: (path: string,
|
|
4407
|
+
delete: (path: string, config?: {
|
|
3003
4408
|
headers?: HeadersInit;
|
|
3004
4409
|
queryParams?: {
|
|
3005
4410
|
[key: string]: string;
|
|
@@ -3027,8 +4432,10 @@ declare const _default: {
|
|
|
3027
4432
|
|
|
3028
4433
|
declare const getSessionToken: () => string;
|
|
3029
4434
|
declare const getRefreshToken: () => string;
|
|
4435
|
+
declare const isSessionTokenExpired: (token?: string) => boolean;
|
|
4436
|
+
declare const isRefreshTokenExpired: (token?: string) => boolean;
|
|
3030
4437
|
declare const getJwtPermissions: (token?: any, tenant?: string) => string[];
|
|
3031
4438
|
declare const getJwtRoles: (token?: any, tenant?: string) => string[];
|
|
3032
4439
|
|
|
3033
|
-
export { _default$
|
|
4440
|
+
export { _default$2 as AccessKeyManagement, _default$1 as AuditManagement, _default$5 as Descope, _default$3 as RoleManagement, _default$4 as UserManagement, _default as default, getJwtPermissions, getJwtRoles, getRefreshToken, getSdk, getSessionToken, isRefreshTokenExpired, isSessionTokenExpired, routeGuard, useDescope, useSession, useUser };
|
|
3034
4441
|
//# sourceMappingURL=index.d.ts.map
|