@descope/react-sdk 2.0.48 → 2.0.50

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.
Files changed (36) hide show
  1. package/dist/cjs/index.cjs.js +1 -1
  2. package/dist/dts/src/components/AccessKeyManagement.d.ts +9 -0
  3. package/dist/dts/src/components/AuditManagement.d.ts +9 -0
  4. package/dist/dts/src/components/AuthProvider/AuthProvider.d.ts +13 -0
  5. package/dist/dts/src/components/AuthProvider/index.d.ts +1 -0
  6. package/dist/dts/src/components/AuthProvider/useSdk.d.ts +4 -0
  7. package/dist/dts/src/components/DefaultFlows.d.ts +5 -0
  8. package/dist/dts/src/components/Descope.d.ts +4 -0
  9. package/dist/dts/src/components/RoleManagement.d.ts +9 -0
  10. package/dist/dts/src/components/UserManagement.d.ts +9 -0
  11. package/dist/dts/src/components/UserProfile.d.ts +11 -0
  12. package/dist/dts/src/constants.d.ts +5 -0
  13. package/dist/dts/src/hooks/Context.d.ts +4 -0
  14. package/dist/dts/src/hooks/useContext.d.ts +2 -0
  15. package/dist/dts/src/hooks/useDescope.d.ts +3 -0
  16. package/dist/dts/src/hooks/useSession.d.ts +6 -0
  17. package/dist/dts/src/hooks/useUser.d.ts +5 -0
  18. package/dist/dts/src/index.d.ts +14 -0
  19. package/dist/dts/src/sdk.d.ts +3543 -0
  20. package/dist/dts/src/types.d.ts +92 -0
  21. package/dist/dts/src/utils.d.ts +7 -0
  22. package/dist/index.esm.js +1 -1
  23. package/dist/index.umd.js +2 -2
  24. package/dist/index.umd.js.map +1 -1
  25. package/package.json +27 -27
  26. /package/dist/{examples → dts/examples}/app/App.d.ts +0 -0
  27. /package/dist/{examples → dts/examples}/app/Home.d.ts +0 -0
  28. /package/dist/{examples → dts/examples}/app/Login.d.ts +0 -0
  29. /package/dist/{examples → dts/examples}/app/ManageAccessKeys.d.ts +0 -0
  30. /package/dist/{examples → dts/examples}/app/ManageAudit.d.ts +0 -0
  31. /package/dist/{examples → dts/examples}/app/ManageRoles.d.ts +0 -0
  32. /package/dist/{examples → dts/examples}/app/ManageUsers.d.ts +0 -0
  33. /package/dist/{examples → dts/examples}/app/MyUserProfile.d.ts +0 -0
  34. /package/dist/{examples → dts/examples}/app/StepUp.d.ts +0 -0
  35. /package/dist/{examples → dts/examples}/app/api.d.ts +0 -0
  36. /package/dist/{examples → dts/examples}/app/index.d.ts +0 -0
@@ -0,0 +1,3543 @@
1
+ import '@descope/core-js-sdk';
2
+ declare const createSdkWrapper: <P extends Omit<{
3
+ projectId: string;
4
+ logger?: {
5
+ debug: {
6
+ (...data: any[]): void;
7
+ (message?: any, ...optionalParams: any[]): void;
8
+ };
9
+ log: {
10
+ (...data: any[]): void;
11
+ (message?: any, ...optionalParams: any[]): void;
12
+ };
13
+ error: {
14
+ (...data: any[]): void;
15
+ (message?: any, ...optionalParams: any[]): void;
16
+ };
17
+ warn: {
18
+ (...data: any[]): void;
19
+ (message?: any, ...optionalParams: any[]): void;
20
+ };
21
+ };
22
+ baseUrl?: string;
23
+ hooks?: {
24
+ beforeRequest?: (config: import("@descope/core-js-sdk").RequestConfig) => import("@descope/core-js-sdk").RequestConfig;
25
+ afterRequest?: (req: import("@descope/core-js-sdk").RequestConfig, res: Response) => void | Promise<void>;
26
+ transformResponse?: (mutableResponse: import("@descope/core-js-sdk").ExtendedResponse) => Promise<import("@descope/core-js-sdk").ExtendedResponse>;
27
+ };
28
+ cookiePolicy?: RequestCredentials;
29
+ baseHeaders?: HeadersInit;
30
+ fetch?: typeof fetch;
31
+ }, "hooks"> & {
32
+ hooks?: {
33
+ beforeRequest?: ((config: import("@descope/core-js-sdk").RequestConfig) => import("@descope/core-js-sdk").RequestConfig) | ((config: import("@descope/core-js-sdk").RequestConfig) => import("@descope/core-js-sdk").RequestConfig)[];
34
+ afterRequest?: ((req: import("@descope/core-js-sdk").RequestConfig, res: Response) => void | Promise<void>) | ((req: import("@descope/core-js-sdk").RequestConfig, res: Response) => void | Promise<void>)[];
35
+ transformResponse?: (mutableResponse: import("@descope/core-js-sdk").ExtendedResponse) => Promise<import("@descope/core-js-sdk").ExtendedResponse>;
36
+ };
37
+ } & {
38
+ fpKey?: string;
39
+ fpLoad?: boolean;
40
+ } & {
41
+ autoRefresh?: boolean;
42
+ } & {
43
+ storeLastAuthenticatedUser?: boolean;
44
+ keepLastAuthenticatedUserAfterLogout?: boolean;
45
+ } & {
46
+ persistTokens?: boolean;
47
+ storagePrefix?: string;
48
+ preview?: boolean;
49
+ sessionTokenViaCookie?: boolean;
50
+ }>(config: P) => ((({
51
+ flow: {
52
+ start: (flowId: string, options?: Pick<{
53
+ redirectUrl?: string;
54
+ location?: string;
55
+ tenant?: string;
56
+ deviceInfo?: {
57
+ webAuthnSupport?: boolean;
58
+ };
59
+ lastAuth?: {
60
+ authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
61
+ oauthProvider?: string;
62
+ name?: string;
63
+ loginId?: string;
64
+ };
65
+ redirectAuth?: {
66
+ callbackUrl: string;
67
+ codeChallenge: string;
68
+ };
69
+ oidcIdpStateId?: string;
70
+ preview?: boolean;
71
+ samlIdpStateId?: string;
72
+ samlIdpUsername?: string;
73
+ ssoAppId?: string;
74
+ oidcLoginHint?: string;
75
+ abTestingKey?: number;
76
+ startOptionsVersion?: number;
77
+ client?: Record<string, any>;
78
+ locale?: string;
79
+ oidcPrompt?: string;
80
+ }, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt"> & {
81
+ lastAuth?: Omit<{
82
+ authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
83
+ oauthProvider?: string;
84
+ name?: string;
85
+ loginId?: string;
86
+ }, "loginId" | "name">;
87
+ }, conditionInteractionId?: string, interactionId?: string, version?: number, componentsVersion?: string, input?: {
88
+ [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[])[])[])[])[])[])[])[])[])[])[];
89
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").FlowResponse>>;
90
+ next: (executionId: string, stepId: string, interactionId: string, version?: number, componentsVersion?: string, input?: {
91
+ [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[])[])[])[])[])[])[])[])[])[])[];
92
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").FlowResponse>>;
93
+ };
94
+ webauthn: {
95
+ signUp: ((identifier: string, name: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>) & {
96
+ start: (loginId: string, origin: string, name: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
97
+ transactionId: string;
98
+ options: string;
99
+ create: boolean;
100
+ }>>;
101
+ finish: (transactionId: string, response: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
102
+ };
103
+ signIn: ((identifier: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>) & {
104
+ start: (loginId: string, origin: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
105
+ transactionId: string;
106
+ options: string;
107
+ create: boolean;
108
+ }>>;
109
+ finish: (transactionId: string, response: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
110
+ };
111
+ signUpOrIn: ((identifier: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>) & {
112
+ start: (loginId: string, origin: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
113
+ transactionId: string;
114
+ options: string;
115
+ create: boolean;
116
+ }>>;
117
+ };
118
+ update: ((identifier: string, token: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").ResponseData>>) & {
119
+ start: (loginId: string, origin: string, token: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
120
+ transactionId: string;
121
+ options: string;
122
+ create: boolean;
123
+ }>>;
124
+ finish: (transactionId: string, response: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").ResponseData>>;
125
+ };
126
+ helpers: {
127
+ create: (options: string) => Promise<string>;
128
+ get: (options: string) => Promise<string>;
129
+ isSupported: (requirePlatformAuthenticator?: boolean) => Promise<boolean>;
130
+ conditional: (options: string, abort: AbortController) => Promise<string>;
131
+ };
132
+ };
133
+ fedcm: {
134
+ oneTap(provider?: string, oneTapConfig?: import("@descope/web-js-sdk").OneTapConfig, loginOptions?: import("@descope/core-js-sdk").LoginOptions, onSkip?: () => void): Promise<unknown>;
135
+ launch(context?: "signin" | "signup" | "use" | "continue"): Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
136
+ isSupported(): boolean;
137
+ };
138
+ accessKey: {
139
+ exchange: (accessKey: string, loginOptions?: import("@descope/core-js-sdk").AccessKeyLoginOptions) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").ExchangeAccessKeyResponse>>;
140
+ };
141
+ otp: {
142
+ verify: {
143
+ sms: (loginId: string, code: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
144
+ voice: (loginId: string, code: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
145
+ whatsapp: (loginId: string, code: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
146
+ email: (loginId: string, code: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
147
+ };
148
+ signIn: {
149
+ sms: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
150
+ maskedPhone: string;
151
+ }>>;
152
+ voice: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
153
+ maskedPhone: string;
154
+ }>>;
155
+ whatsapp: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
156
+ maskedPhone: string;
157
+ }>>;
158
+ email: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
159
+ maskedEmail: string;
160
+ }>>;
161
+ };
162
+ signUp: {
163
+ sms: (loginId: string, user?: {
164
+ email?: string;
165
+ name?: string;
166
+ givenName?: string;
167
+ middleName?: string;
168
+ familyName?: string;
169
+ phone?: string;
170
+ }, signUpOptions?: {
171
+ customClaims?: Record<string, any>;
172
+ templateOptions?: {
173
+ [x: string]: string;
174
+ };
175
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
176
+ maskedPhone: string;
177
+ }>>;
178
+ voice: (loginId: string, user?: {
179
+ email?: string;
180
+ name?: string;
181
+ givenName?: string;
182
+ middleName?: string;
183
+ familyName?: string;
184
+ phone?: string;
185
+ }, signUpOptions?: {
186
+ customClaims?: Record<string, any>;
187
+ templateOptions?: {
188
+ [x: string]: string;
189
+ };
190
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
191
+ maskedPhone: string;
192
+ }>>;
193
+ whatsapp: (loginId: string, user?: {
194
+ email?: string;
195
+ name?: string;
196
+ givenName?: string;
197
+ middleName?: string;
198
+ familyName?: string;
199
+ phone?: string;
200
+ }, signUpOptions?: {
201
+ customClaims?: Record<string, any>;
202
+ templateOptions?: {
203
+ [x: string]: string;
204
+ };
205
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
206
+ maskedPhone: string;
207
+ }>>;
208
+ email: (loginId: string, user?: {
209
+ email?: string;
210
+ name?: string;
211
+ givenName?: string;
212
+ middleName?: string;
213
+ familyName?: string;
214
+ phone?: string;
215
+ }, signUpOptions?: {
216
+ customClaims?: Record<string, any>;
217
+ templateOptions?: {
218
+ [x: string]: string;
219
+ };
220
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
221
+ maskedEmail: string;
222
+ }>>;
223
+ };
224
+ signUpOrIn: {
225
+ sms: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
226
+ maskedPhone: string;
227
+ }>>;
228
+ voice: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
229
+ maskedPhone: string;
230
+ }>>;
231
+ whatsapp: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
232
+ maskedPhone: string;
233
+ }>>;
234
+ email: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
235
+ maskedEmail: string;
236
+ }>>;
237
+ };
238
+ update: {
239
+ email: <T extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
240
+ addToLoginIDs?: T;
241
+ onMergeUseExisting?: T extends true ? boolean : never;
242
+ templateOptions?: {
243
+ [x: string]: string;
244
+ };
245
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
246
+ maskedEmail: string;
247
+ }>>;
248
+ phone: {
249
+ sms: <T_1 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
250
+ addToLoginIDs?: T_1;
251
+ onMergeUseExisting?: T_1 extends true ? boolean : never;
252
+ templateOptions?: {
253
+ [x: string]: string;
254
+ };
255
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
256
+ maskedPhone: string;
257
+ }>>;
258
+ voice: <T_1_1 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
259
+ addToLoginIDs?: T_1_1;
260
+ onMergeUseExisting?: T_1_1 extends true ? boolean : never;
261
+ templateOptions?: {
262
+ [x: string]: string;
263
+ };
264
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
265
+ maskedPhone: string;
266
+ }>>;
267
+ whatsapp: <T_1_2 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
268
+ addToLoginIDs?: T_1_2;
269
+ onMergeUseExisting?: T_1_2 extends true ? boolean : never;
270
+ templateOptions?: {
271
+ [x: string]: string;
272
+ };
273
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
274
+ maskedPhone: string;
275
+ }>>;
276
+ };
277
+ };
278
+ };
279
+ magicLink: {
280
+ verify: (token: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
281
+ signIn: {
282
+ sms: (loginId: string, URI: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
283
+ maskedPhone: string;
284
+ }>>;
285
+ voice: (loginId: string, URI: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
286
+ maskedPhone: string;
287
+ }>>;
288
+ whatsapp: (loginId: string, URI: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
289
+ maskedPhone: string;
290
+ }>>;
291
+ email: (loginId: string, URI: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
292
+ maskedEmail: string;
293
+ }>>;
294
+ };
295
+ signUp: {
296
+ sms: (loginId: string, URI: string, user?: {
297
+ email?: string;
298
+ name?: string;
299
+ givenName?: string;
300
+ middleName?: string;
301
+ familyName?: string;
302
+ phone?: string;
303
+ }, signUpOptions?: {
304
+ customClaims?: Record<string, any>;
305
+ templateOptions?: {
306
+ [x: string]: string;
307
+ };
308
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
309
+ maskedPhone: string;
310
+ }>>;
311
+ voice: (loginId: string, URI: string, user?: {
312
+ email?: string;
313
+ name?: string;
314
+ givenName?: string;
315
+ middleName?: string;
316
+ familyName?: string;
317
+ phone?: string;
318
+ }, signUpOptions?: {
319
+ customClaims?: Record<string, any>;
320
+ templateOptions?: {
321
+ [x: string]: string;
322
+ };
323
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
324
+ maskedPhone: string;
325
+ }>>;
326
+ whatsapp: (loginId: string, URI: string, user?: {
327
+ email?: string;
328
+ name?: string;
329
+ givenName?: string;
330
+ middleName?: string;
331
+ familyName?: string;
332
+ phone?: string;
333
+ }, signUpOptions?: {
334
+ customClaims?: Record<string, any>;
335
+ templateOptions?: {
336
+ [x: string]: string;
337
+ };
338
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
339
+ maskedPhone: string;
340
+ }>>;
341
+ email: (loginId: string, URI: string, user?: {
342
+ email?: string;
343
+ name?: string;
344
+ givenName?: string;
345
+ middleName?: string;
346
+ familyName?: string;
347
+ phone?: string;
348
+ }, signUpOptions?: {
349
+ customClaims?: Record<string, any>;
350
+ templateOptions?: {
351
+ [x: string]: string;
352
+ };
353
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
354
+ maskedEmail: string;
355
+ }>>;
356
+ };
357
+ signUpOrIn: {
358
+ sms: (loginId: string, URI?: string, signUpOptions?: {
359
+ customClaims?: Record<string, any>;
360
+ templateOptions?: {
361
+ [x: string]: string;
362
+ };
363
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
364
+ maskedPhone: string;
365
+ }>>;
366
+ voice: (loginId: string, URI?: string, signUpOptions?: {
367
+ customClaims?: Record<string, any>;
368
+ templateOptions?: {
369
+ [x: string]: string;
370
+ };
371
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
372
+ maskedPhone: string;
373
+ }>>;
374
+ whatsapp: (loginId: string, URI?: string, signUpOptions?: {
375
+ customClaims?: Record<string, any>;
376
+ templateOptions?: {
377
+ [x: string]: string;
378
+ };
379
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
380
+ maskedPhone: string;
381
+ }>>;
382
+ email: (loginId: string, URI?: string, signUpOptions?: {
383
+ customClaims?: Record<string, any>;
384
+ templateOptions?: {
385
+ [x: string]: string;
386
+ };
387
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
388
+ maskedEmail: string;
389
+ }>>;
390
+ };
391
+ update: {
392
+ email: <T_2 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
393
+ addToLoginIDs?: T_2;
394
+ onMergeUseExisting?: T_2 extends true ? boolean : never;
395
+ templateOptions?: {
396
+ [x: string]: string;
397
+ };
398
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
399
+ maskedEmail: string;
400
+ }>>;
401
+ phone: {
402
+ sms: <T_3 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
403
+ addToLoginIDs?: T_3;
404
+ onMergeUseExisting?: T_3 extends true ? boolean : never;
405
+ templateOptions?: {
406
+ [x: string]: string;
407
+ };
408
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
409
+ maskedPhone: string;
410
+ }>>;
411
+ voice: <T_3_1 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
412
+ addToLoginIDs?: T_3_1;
413
+ onMergeUseExisting?: T_3_1 extends true ? boolean : never;
414
+ templateOptions?: {
415
+ [x: string]: string;
416
+ };
417
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
418
+ maskedPhone: string;
419
+ }>>;
420
+ whatsapp: <T_3_2 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
421
+ addToLoginIDs?: T_3_2;
422
+ onMergeUseExisting?: T_3_2 extends true ? boolean : never;
423
+ templateOptions?: {
424
+ [x: string]: string;
425
+ };
426
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
427
+ maskedPhone: string;
428
+ }>>;
429
+ };
430
+ };
431
+ };
432
+ enchantedLink: {
433
+ verify: (token: string) => Promise<import("@descope/core-js-sdk").SdkResponse<never>>;
434
+ signIn: (loginId: string, URI?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").EnchantedLinkResponse>>;
435
+ signUpOrIn: (loginId: string, URI?: string, signUpOptions?: {
436
+ customClaims?: Record<string, any>;
437
+ templateOptions?: {
438
+ [x: string]: string;
439
+ };
440
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").EnchantedLinkResponse>>;
441
+ signUp: (loginId: string, URI?: string, user?: {
442
+ email?: string;
443
+ name?: string;
444
+ givenName?: string;
445
+ middleName?: string;
446
+ familyName?: string;
447
+ phone?: string;
448
+ }, signUpOptions?: {
449
+ customClaims?: Record<string, any>;
450
+ templateOptions?: {
451
+ [x: string]: string;
452
+ };
453
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").EnchantedLinkResponse>>;
454
+ waitForSession: (pendingRef: string, config?: {
455
+ pollingIntervalMs: number;
456
+ timeoutMs: number;
457
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
458
+ update: {
459
+ email: <T_4 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
460
+ addToLoginIDs?: T_4;
461
+ onMergeUseExisting?: T_4 extends true ? boolean : never;
462
+ templateOptions?: {
463
+ [x: string]: string;
464
+ };
465
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").EnchantedLinkResponse>>;
466
+ };
467
+ };
468
+ oauth: {
469
+ start: ((provider: string, redirectUrl?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").ResponseData>>) & {
470
+ google: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
471
+ facebook: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
472
+ github: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
473
+ microsoft: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
474
+ gitlab: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
475
+ apple: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
476
+ discord: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
477
+ linkedin: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
478
+ slack: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
479
+ };
480
+ exchange: (code: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
481
+ startNative: (provider: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, implicit?: boolean) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").ResponseData>>;
482
+ finishNative: (provider: string, stateId: string, user?: string, code?: string, idToken?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").ResponseData>>;
483
+ };
484
+ saml: {
485
+ start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
486
+ exchange: (code: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
487
+ };
488
+ totp: {
489
+ signUp: (loginId: string, user?: {
490
+ email?: string;
491
+ name?: string;
492
+ givenName?: string;
493
+ middleName?: string;
494
+ familyName?: string;
495
+ phone?: string;
496
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").TOTPResponse>>;
497
+ verify: (loginId: string, code: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
498
+ update: (loginId: string, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").TOTPResponse>>;
499
+ };
500
+ notp: {
501
+ signUpOrIn: (loginId?: string, signUpOptions?: {
502
+ customClaims?: Record<string, any>;
503
+ templateOptions?: {
504
+ [x: string]: string;
505
+ };
506
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
507
+ pendingRef: string;
508
+ redirectUrl: string;
509
+ image: string;
510
+ }>>;
511
+ signUp: (loginId?: string, user?: {
512
+ email?: string;
513
+ name?: string;
514
+ givenName?: string;
515
+ middleName?: string;
516
+ familyName?: string;
517
+ phone?: string;
518
+ }, signUpOptions?: {
519
+ customClaims?: Record<string, any>;
520
+ templateOptions?: {
521
+ [x: string]: string;
522
+ };
523
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
524
+ pendingRef: string;
525
+ redirectUrl: string;
526
+ image: string;
527
+ }>>;
528
+ signIn: (loginId?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
529
+ pendingRef: string;
530
+ redirectUrl: string;
531
+ image: string;
532
+ }>>;
533
+ waitForSession: (pendingRef: string, config?: {
534
+ pollingIntervalMs: number;
535
+ timeoutMs: number;
536
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
537
+ };
538
+ password: {
539
+ signUp: (loginId: string, password: string, user?: {
540
+ email?: string;
541
+ name?: string;
542
+ givenName?: string;
543
+ middleName?: string;
544
+ familyName?: string;
545
+ phone?: string;
546
+ }, signUpOptions?: {
547
+ customClaims?: Record<string, any>;
548
+ templateOptions?: {
549
+ [x: string]: string;
550
+ };
551
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
552
+ signIn: (loginId: string, password: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
553
+ sendReset: (loginId: string, redirectUrl?: string, templateOptions?: {
554
+ [x: string]: string;
555
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
556
+ resetMethod: string;
557
+ pendingRef?: string;
558
+ linkId?: string;
559
+ maskedEmail: string;
560
+ }>>;
561
+ update: (loginId: string, newPassword: string, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<never>>;
562
+ replace: (loginId: string, oldPassword: string, newPassword: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
563
+ policy: () => Promise<import("@descope/core-js-sdk").SdkResponse<{
564
+ minLength: number;
565
+ lowercase: boolean;
566
+ uppercase: boolean;
567
+ number: boolean;
568
+ nonAlphanumeric: boolean;
569
+ }>>;
570
+ };
571
+ refresh: (token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
572
+ selectTenant: (tenantId: string, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
573
+ logout: (token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<never>>;
574
+ logoutAll: (token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<never>>;
575
+ me: (token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").UserResponse>>;
576
+ history: (token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").UserHistoryResponse>>;
577
+ isJwtExpired: (token: string) => boolean;
578
+ getTenants: (token: string) => string[];
579
+ getJwtPermissions: (token: string, tenant?: string) => string[];
580
+ getJwtRoles: (token: string, tenant?: string) => string[];
581
+ httpClient: {
582
+ get: (path: string, config?: {
583
+ headers?: HeadersInit;
584
+ queryParams?: {
585
+ [key: string]: string;
586
+ };
587
+ token?: string;
588
+ }) => Promise<Response>;
589
+ post: (path: string, body?: any, config?: {
590
+ headers?: HeadersInit;
591
+ queryParams?: {
592
+ [key: string]: string;
593
+ };
594
+ token?: string;
595
+ }) => Promise<Response>;
596
+ patch: (path: string, body?: any, config?: {
597
+ headers?: HeadersInit;
598
+ queryParams?: {
599
+ [key: string]: string;
600
+ };
601
+ token?: string;
602
+ }) => Promise<Response>;
603
+ put: (path: string, body?: any, config?: {
604
+ headers?: HeadersInit;
605
+ queryParams?: {
606
+ [key: string]: string;
607
+ };
608
+ token?: string;
609
+ }) => Promise<Response>;
610
+ delete: (path: string, config?: {
611
+ headers?: HeadersInit;
612
+ queryParams?: {
613
+ [key: string]: string;
614
+ };
615
+ token?: string;
616
+ }) => Promise<Response>;
617
+ hooks?: {
618
+ beforeRequest?: (config: import("@descope/core-js-sdk").RequestConfig) => import("@descope/core-js-sdk").RequestConfig;
619
+ afterRequest?: (req: import("@descope/core-js-sdk").RequestConfig, res: Response) => void | Promise<void>;
620
+ transformResponse?: (mutableResponse: import("@descope/core-js-sdk").ExtendedResponse) => Promise<import("@descope/core-js-sdk").ExtendedResponse>;
621
+ };
622
+ buildUrl: (path: string, queryParams?: {
623
+ [key: string]: string;
624
+ }) => string;
625
+ };
626
+ } | {
627
+ flow: {
628
+ start: (flowId: string, options?: Pick<{
629
+ redirectUrl?: string;
630
+ location?: string;
631
+ tenant?: string;
632
+ deviceInfo?: {
633
+ webAuthnSupport?: boolean;
634
+ };
635
+ lastAuth?: {
636
+ authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
637
+ oauthProvider?: string;
638
+ name?: string;
639
+ loginId?: string;
640
+ };
641
+ redirectAuth?: {
642
+ callbackUrl: string;
643
+ codeChallenge: string;
644
+ };
645
+ oidcIdpStateId?: string;
646
+ preview?: boolean;
647
+ samlIdpStateId?: string;
648
+ samlIdpUsername?: string;
649
+ ssoAppId?: string;
650
+ oidcLoginHint?: string;
651
+ abTestingKey?: number;
652
+ startOptionsVersion?: number;
653
+ client?: Record<string, any>;
654
+ locale?: string;
655
+ oidcPrompt?: string;
656
+ }, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt"> & {
657
+ lastAuth?: Omit<{
658
+ authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
659
+ oauthProvider?: string;
660
+ name?: string;
661
+ loginId?: string;
662
+ }, "loginId" | "name">;
663
+ }, conditionInteractionId?: string, interactionId?: string, version?: number, componentsVersion?: string, input?: {
664
+ [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[])[])[])[])[])[])[])[])[])[])[];
665
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").FlowResponse>>;
666
+ next: (executionId: string, stepId: string, interactionId: string, version?: number, componentsVersion?: string, input?: {
667
+ [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[])[])[])[])[])[])[])[])[])[])[];
668
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").FlowResponse>>;
669
+ };
670
+ webauthn: {
671
+ signUp: ((identifier: string, name: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>) & {
672
+ start: (loginId: string, origin: string, name: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
673
+ transactionId: string;
674
+ options: string;
675
+ create: boolean;
676
+ }>>;
677
+ finish: (transactionId: string, response: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
678
+ };
679
+ signIn: ((identifier: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>) & {
680
+ start: (loginId: string, origin: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
681
+ transactionId: string;
682
+ options: string;
683
+ create: boolean;
684
+ }>>;
685
+ finish: (transactionId: string, response: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
686
+ };
687
+ signUpOrIn: ((identifier: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>) & {
688
+ start: (loginId: string, origin: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
689
+ transactionId: string;
690
+ options: string;
691
+ create: boolean;
692
+ }>>;
693
+ };
694
+ update: ((identifier: string, token: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").ResponseData>>) & {
695
+ start: (loginId: string, origin: string, token: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
696
+ transactionId: string;
697
+ options: string;
698
+ create: boolean;
699
+ }>>;
700
+ finish: (transactionId: string, response: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").ResponseData>>;
701
+ };
702
+ helpers: {
703
+ create: (options: string) => Promise<string>;
704
+ get: (options: string) => Promise<string>;
705
+ isSupported: (requirePlatformAuthenticator?: boolean) => Promise<boolean>;
706
+ conditional: (options: string, abort: AbortController) => Promise<string>;
707
+ };
708
+ };
709
+ fedcm: {
710
+ oneTap(provider?: string, oneTapConfig?: import("@descope/web-js-sdk").OneTapConfig, loginOptions?: import("@descope/core-js-sdk").LoginOptions, onSkip?: () => void): Promise<unknown>;
711
+ launch(context?: "signin" | "signup" | "use" | "continue"): Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
712
+ isSupported(): boolean;
713
+ };
714
+ accessKey: {
715
+ exchange: (accessKey: string, loginOptions?: import("@descope/core-js-sdk").AccessKeyLoginOptions) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").ExchangeAccessKeyResponse>>;
716
+ };
717
+ otp: {
718
+ verify: {
719
+ sms: (loginId: string, code: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
720
+ voice: (loginId: string, code: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
721
+ whatsapp: (loginId: string, code: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
722
+ email: (loginId: string, code: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
723
+ };
724
+ signIn: {
725
+ sms: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
726
+ maskedPhone: string;
727
+ }>>;
728
+ voice: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
729
+ maskedPhone: string;
730
+ }>>;
731
+ whatsapp: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
732
+ maskedPhone: string;
733
+ }>>;
734
+ email: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
735
+ maskedEmail: string;
736
+ }>>;
737
+ };
738
+ signUp: {
739
+ sms: (loginId: string, user?: {
740
+ email?: string;
741
+ name?: string;
742
+ givenName?: string;
743
+ middleName?: string;
744
+ familyName?: string;
745
+ phone?: string;
746
+ }, signUpOptions?: {
747
+ customClaims?: Record<string, any>;
748
+ templateOptions?: {
749
+ [x: string]: string;
750
+ };
751
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
752
+ maskedPhone: string;
753
+ }>>;
754
+ voice: (loginId: string, user?: {
755
+ email?: string;
756
+ name?: string;
757
+ givenName?: string;
758
+ middleName?: string;
759
+ familyName?: string;
760
+ phone?: string;
761
+ }, signUpOptions?: {
762
+ customClaims?: Record<string, any>;
763
+ templateOptions?: {
764
+ [x: string]: string;
765
+ };
766
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
767
+ maskedPhone: string;
768
+ }>>;
769
+ whatsapp: (loginId: string, user?: {
770
+ email?: string;
771
+ name?: string;
772
+ givenName?: string;
773
+ middleName?: string;
774
+ familyName?: string;
775
+ phone?: string;
776
+ }, signUpOptions?: {
777
+ customClaims?: Record<string, any>;
778
+ templateOptions?: {
779
+ [x: string]: string;
780
+ };
781
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
782
+ maskedPhone: string;
783
+ }>>;
784
+ email: (loginId: string, user?: {
785
+ email?: string;
786
+ name?: string;
787
+ givenName?: string;
788
+ middleName?: string;
789
+ familyName?: string;
790
+ phone?: string;
791
+ }, signUpOptions?: {
792
+ customClaims?: Record<string, any>;
793
+ templateOptions?: {
794
+ [x: string]: string;
795
+ };
796
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
797
+ maskedEmail: string;
798
+ }>>;
799
+ };
800
+ signUpOrIn: {
801
+ sms: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
802
+ maskedPhone: string;
803
+ }>>;
804
+ voice: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
805
+ maskedPhone: string;
806
+ }>>;
807
+ whatsapp: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
808
+ maskedPhone: string;
809
+ }>>;
810
+ email: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
811
+ maskedEmail: string;
812
+ }>>;
813
+ };
814
+ update: {
815
+ email: <T_5 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
816
+ addToLoginIDs?: T_5;
817
+ onMergeUseExisting?: T_5 extends true ? boolean : never;
818
+ templateOptions?: {
819
+ [x: string]: string;
820
+ };
821
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
822
+ maskedEmail: string;
823
+ }>>;
824
+ phone: {
825
+ sms: <T_1_3 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
826
+ addToLoginIDs?: T_1_3;
827
+ onMergeUseExisting?: T_1_3 extends true ? boolean : never;
828
+ templateOptions?: {
829
+ [x: string]: string;
830
+ };
831
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
832
+ maskedPhone: string;
833
+ }>>;
834
+ voice: <T_1_4 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
835
+ addToLoginIDs?: T_1_4;
836
+ onMergeUseExisting?: T_1_4 extends true ? boolean : never;
837
+ templateOptions?: {
838
+ [x: string]: string;
839
+ };
840
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
841
+ maskedPhone: string;
842
+ }>>;
843
+ whatsapp: <T_1_5 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
844
+ addToLoginIDs?: T_1_5;
845
+ onMergeUseExisting?: T_1_5 extends true ? boolean : never;
846
+ templateOptions?: {
847
+ [x: string]: string;
848
+ };
849
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
850
+ maskedPhone: string;
851
+ }>>;
852
+ };
853
+ };
854
+ };
855
+ magicLink: {
856
+ verify: (token: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
857
+ signIn: {
858
+ sms: (loginId: string, URI: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
859
+ maskedPhone: string;
860
+ }>>;
861
+ voice: (loginId: string, URI: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
862
+ maskedPhone: string;
863
+ }>>;
864
+ whatsapp: (loginId: string, URI: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
865
+ maskedPhone: string;
866
+ }>>;
867
+ email: (loginId: string, URI: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
868
+ maskedEmail: string;
869
+ }>>;
870
+ };
871
+ signUp: {
872
+ sms: (loginId: string, URI: string, user?: {
873
+ email?: string;
874
+ name?: string;
875
+ givenName?: string;
876
+ middleName?: string;
877
+ familyName?: string;
878
+ phone?: string;
879
+ }, signUpOptions?: {
880
+ customClaims?: Record<string, any>;
881
+ templateOptions?: {
882
+ [x: string]: string;
883
+ };
884
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
885
+ maskedPhone: string;
886
+ }>>;
887
+ voice: (loginId: string, URI: string, user?: {
888
+ email?: string;
889
+ name?: string;
890
+ givenName?: string;
891
+ middleName?: string;
892
+ familyName?: string;
893
+ phone?: string;
894
+ }, signUpOptions?: {
895
+ customClaims?: Record<string, any>;
896
+ templateOptions?: {
897
+ [x: string]: string;
898
+ };
899
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
900
+ maskedPhone: string;
901
+ }>>;
902
+ whatsapp: (loginId: string, URI: string, user?: {
903
+ email?: string;
904
+ name?: string;
905
+ givenName?: string;
906
+ middleName?: string;
907
+ familyName?: string;
908
+ phone?: string;
909
+ }, signUpOptions?: {
910
+ customClaims?: Record<string, any>;
911
+ templateOptions?: {
912
+ [x: string]: string;
913
+ };
914
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
915
+ maskedPhone: string;
916
+ }>>;
917
+ email: (loginId: string, URI: string, user?: {
918
+ email?: string;
919
+ name?: string;
920
+ givenName?: string;
921
+ middleName?: string;
922
+ familyName?: string;
923
+ phone?: string;
924
+ }, signUpOptions?: {
925
+ customClaims?: Record<string, any>;
926
+ templateOptions?: {
927
+ [x: string]: string;
928
+ };
929
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
930
+ maskedEmail: string;
931
+ }>>;
932
+ };
933
+ signUpOrIn: {
934
+ sms: (loginId: string, URI?: string, signUpOptions?: {
935
+ customClaims?: Record<string, any>;
936
+ templateOptions?: {
937
+ [x: string]: string;
938
+ };
939
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
940
+ maskedPhone: string;
941
+ }>>;
942
+ voice: (loginId: string, URI?: string, signUpOptions?: {
943
+ customClaims?: Record<string, any>;
944
+ templateOptions?: {
945
+ [x: string]: string;
946
+ };
947
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
948
+ maskedPhone: string;
949
+ }>>;
950
+ whatsapp: (loginId: string, URI?: string, signUpOptions?: {
951
+ customClaims?: Record<string, any>;
952
+ templateOptions?: {
953
+ [x: string]: string;
954
+ };
955
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
956
+ maskedPhone: string;
957
+ }>>;
958
+ email: (loginId: string, URI?: string, signUpOptions?: {
959
+ customClaims?: Record<string, any>;
960
+ templateOptions?: {
961
+ [x: string]: string;
962
+ };
963
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
964
+ maskedEmail: string;
965
+ }>>;
966
+ };
967
+ update: {
968
+ email: <T_2_1 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
969
+ addToLoginIDs?: T_2_1;
970
+ onMergeUseExisting?: T_2_1 extends true ? boolean : never;
971
+ templateOptions?: {
972
+ [x: string]: string;
973
+ };
974
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
975
+ maskedEmail: string;
976
+ }>>;
977
+ phone: {
978
+ sms: <T_3_3 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
979
+ addToLoginIDs?: T_3_3;
980
+ onMergeUseExisting?: T_3_3 extends true ? boolean : never;
981
+ templateOptions?: {
982
+ [x: string]: string;
983
+ };
984
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
985
+ maskedPhone: string;
986
+ }>>;
987
+ voice: <T_3_4 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
988
+ addToLoginIDs?: T_3_4;
989
+ onMergeUseExisting?: T_3_4 extends true ? boolean : never;
990
+ templateOptions?: {
991
+ [x: string]: string;
992
+ };
993
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
994
+ maskedPhone: string;
995
+ }>>;
996
+ whatsapp: <T_3_5 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
997
+ addToLoginIDs?: T_3_5;
998
+ onMergeUseExisting?: T_3_5 extends true ? boolean : never;
999
+ templateOptions?: {
1000
+ [x: string]: string;
1001
+ };
1002
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1003
+ maskedPhone: string;
1004
+ }>>;
1005
+ };
1006
+ };
1007
+ };
1008
+ enchantedLink: {
1009
+ verify: (token: string) => Promise<import("@descope/core-js-sdk").SdkResponse<never>>;
1010
+ signIn: (loginId: string, URI?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").EnchantedLinkResponse>>;
1011
+ signUpOrIn: (loginId: string, URI?: string, signUpOptions?: {
1012
+ customClaims?: Record<string, any>;
1013
+ templateOptions?: {
1014
+ [x: string]: string;
1015
+ };
1016
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").EnchantedLinkResponse>>;
1017
+ signUp: (loginId: string, URI?: string, user?: {
1018
+ email?: string;
1019
+ name?: string;
1020
+ givenName?: string;
1021
+ middleName?: string;
1022
+ familyName?: string;
1023
+ phone?: string;
1024
+ }, signUpOptions?: {
1025
+ customClaims?: Record<string, any>;
1026
+ templateOptions?: {
1027
+ [x: string]: string;
1028
+ };
1029
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").EnchantedLinkResponse>>;
1030
+ waitForSession: (pendingRef: string, config?: {
1031
+ pollingIntervalMs: number;
1032
+ timeoutMs: number;
1033
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
1034
+ update: {
1035
+ email: <T_4_1 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
1036
+ addToLoginIDs?: T_4_1;
1037
+ onMergeUseExisting?: T_4_1 extends true ? boolean : never;
1038
+ templateOptions?: {
1039
+ [x: string]: string;
1040
+ };
1041
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").EnchantedLinkResponse>>;
1042
+ };
1043
+ };
1044
+ oauth: {
1045
+ start: ((provider: string, redirectUrl?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").ResponseData>>) & {
1046
+ google: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
1047
+ facebook: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
1048
+ github: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
1049
+ microsoft: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
1050
+ gitlab: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
1051
+ apple: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
1052
+ discord: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
1053
+ linkedin: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
1054
+ slack: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
1055
+ };
1056
+ exchange: (code: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
1057
+ startNative: (provider: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, implicit?: boolean) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").ResponseData>>;
1058
+ finishNative: (provider: string, stateId: string, user?: string, code?: string, idToken?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").ResponseData>>;
1059
+ };
1060
+ saml: {
1061
+ start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
1062
+ exchange: (code: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
1063
+ };
1064
+ totp: {
1065
+ signUp: (loginId: string, user?: {
1066
+ email?: string;
1067
+ name?: string;
1068
+ givenName?: string;
1069
+ middleName?: string;
1070
+ familyName?: string;
1071
+ phone?: string;
1072
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").TOTPResponse>>;
1073
+ verify: (loginId: string, code: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
1074
+ update: (loginId: string, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").TOTPResponse>>;
1075
+ };
1076
+ notp: {
1077
+ signUpOrIn: (loginId?: string, signUpOptions?: {
1078
+ customClaims?: Record<string, any>;
1079
+ templateOptions?: {
1080
+ [x: string]: string;
1081
+ };
1082
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1083
+ pendingRef: string;
1084
+ redirectUrl: string;
1085
+ image: string;
1086
+ }>>;
1087
+ signUp: (loginId?: string, user?: {
1088
+ email?: string;
1089
+ name?: string;
1090
+ givenName?: string;
1091
+ middleName?: string;
1092
+ familyName?: string;
1093
+ phone?: string;
1094
+ }, signUpOptions?: {
1095
+ customClaims?: Record<string, any>;
1096
+ templateOptions?: {
1097
+ [x: string]: string;
1098
+ };
1099
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1100
+ pendingRef: string;
1101
+ redirectUrl: string;
1102
+ image: string;
1103
+ }>>;
1104
+ signIn: (loginId?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1105
+ pendingRef: string;
1106
+ redirectUrl: string;
1107
+ image: string;
1108
+ }>>;
1109
+ waitForSession: (pendingRef: string, config?: {
1110
+ pollingIntervalMs: number;
1111
+ timeoutMs: number;
1112
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
1113
+ };
1114
+ password: {
1115
+ signUp: (loginId: string, password: string, user?: {
1116
+ email?: string;
1117
+ name?: string;
1118
+ givenName?: string;
1119
+ middleName?: string;
1120
+ familyName?: string;
1121
+ phone?: string;
1122
+ }, signUpOptions?: {
1123
+ customClaims?: Record<string, any>;
1124
+ templateOptions?: {
1125
+ [x: string]: string;
1126
+ };
1127
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
1128
+ signIn: (loginId: string, password: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
1129
+ sendReset: (loginId: string, redirectUrl?: string, templateOptions?: {
1130
+ [x: string]: string;
1131
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1132
+ resetMethod: string;
1133
+ pendingRef?: string;
1134
+ linkId?: string;
1135
+ maskedEmail: string;
1136
+ }>>;
1137
+ update: (loginId: string, newPassword: string, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<never>>;
1138
+ replace: (loginId: string, oldPassword: string, newPassword: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
1139
+ policy: () => Promise<import("@descope/core-js-sdk").SdkResponse<{
1140
+ minLength: number;
1141
+ lowercase: boolean;
1142
+ uppercase: boolean;
1143
+ number: boolean;
1144
+ nonAlphanumeric: boolean;
1145
+ }>>;
1146
+ };
1147
+ refresh: (token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
1148
+ selectTenant: (tenantId: string, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
1149
+ logout: (token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<never>>;
1150
+ logoutAll: (token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<never>>;
1151
+ me: (token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").UserResponse>>;
1152
+ history: (token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").UserHistoryResponse>>;
1153
+ isJwtExpired: (token: string) => boolean;
1154
+ getTenants: (token: string) => string[];
1155
+ getJwtPermissions: (token: string, tenant?: string) => string[];
1156
+ getJwtRoles: (token: string, tenant?: string) => string[];
1157
+ httpClient: {
1158
+ get: (path: string, config?: {
1159
+ headers?: HeadersInit;
1160
+ queryParams?: {
1161
+ [key: string]: string;
1162
+ };
1163
+ token?: string;
1164
+ }) => Promise<Response>;
1165
+ post: (path: string, body?: any, config?: {
1166
+ headers?: HeadersInit;
1167
+ queryParams?: {
1168
+ [key: string]: string;
1169
+ };
1170
+ token?: string;
1171
+ }) => Promise<Response>;
1172
+ patch: (path: string, body?: any, config?: {
1173
+ headers?: HeadersInit;
1174
+ queryParams?: {
1175
+ [key: string]: string;
1176
+ };
1177
+ token?: string;
1178
+ }) => Promise<Response>;
1179
+ put: (path: string, body?: any, config?: {
1180
+ headers?: HeadersInit;
1181
+ queryParams?: {
1182
+ [key: string]: string;
1183
+ };
1184
+ token?: string;
1185
+ }) => Promise<Response>;
1186
+ delete: (path: string, config?: {
1187
+ headers?: HeadersInit;
1188
+ queryParams?: {
1189
+ [key: string]: string;
1190
+ };
1191
+ token?: string;
1192
+ }) => Promise<Response>;
1193
+ hooks?: {
1194
+ beforeRequest?: (config: import("@descope/core-js-sdk").RequestConfig) => import("@descope/core-js-sdk").RequestConfig;
1195
+ afterRequest?: (req: import("@descope/core-js-sdk").RequestConfig, res: Response) => void | Promise<void>;
1196
+ transformResponse?: (mutableResponse: import("@descope/core-js-sdk").ExtendedResponse) => Promise<import("@descope/core-js-sdk").ExtendedResponse>;
1197
+ };
1198
+ buildUrl: (path: string, queryParams?: {
1199
+ [key: string]: string;
1200
+ }) => string;
1201
+ };
1202
+ }) & {
1203
+ onSessionTokenChange: (cb: (data: string) => void) => () => any[];
1204
+ onUserChange: (cb: (data: import("@descope/core-js-sdk").UserResponse) => void) => () => any[];
1205
+ }) & {
1206
+ getLastUserLoginId: () => string;
1207
+ getLastUserDisplayName: () => string;
1208
+ }) & {
1209
+ getRefreshToken: () => string;
1210
+ getSessionToken: () => string;
1211
+ };
1212
+ export declare const createTempSdk: () => ((({
1213
+ flow: {
1214
+ start: (flowId: string, options?: Pick<{
1215
+ redirectUrl?: string;
1216
+ location?: string;
1217
+ tenant?: string;
1218
+ deviceInfo?: {
1219
+ webAuthnSupport?: boolean;
1220
+ };
1221
+ lastAuth?: {
1222
+ authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
1223
+ oauthProvider?: string;
1224
+ name?: string;
1225
+ loginId?: string;
1226
+ };
1227
+ redirectAuth?: {
1228
+ callbackUrl: string;
1229
+ codeChallenge: string;
1230
+ };
1231
+ oidcIdpStateId?: string;
1232
+ preview?: boolean;
1233
+ samlIdpStateId?: string;
1234
+ samlIdpUsername?: string;
1235
+ ssoAppId?: string;
1236
+ oidcLoginHint?: string;
1237
+ abTestingKey?: number;
1238
+ startOptionsVersion?: number;
1239
+ client?: Record<string, any>;
1240
+ locale?: string;
1241
+ oidcPrompt?: string;
1242
+ }, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt"> & {
1243
+ lastAuth?: Omit<{
1244
+ authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
1245
+ oauthProvider?: string;
1246
+ name?: string;
1247
+ loginId?: string;
1248
+ }, "loginId" | "name">;
1249
+ }, conditionInteractionId?: string, interactionId?: string, version?: number, componentsVersion?: string, input?: {
1250
+ [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[])[])[])[])[])[])[])[])[])[])[];
1251
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").FlowResponse>>;
1252
+ next: (executionId: string, stepId: string, interactionId: string, version?: number, componentsVersion?: string, input?: {
1253
+ [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[])[])[])[])[])[])[])[])[])[])[];
1254
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").FlowResponse>>;
1255
+ };
1256
+ webauthn: {
1257
+ signUp: ((identifier: string, name: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>) & {
1258
+ start: (loginId: string, origin: string, name: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1259
+ transactionId: string;
1260
+ options: string;
1261
+ create: boolean;
1262
+ }>>;
1263
+ finish: (transactionId: string, response: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
1264
+ };
1265
+ signIn: ((identifier: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>) & {
1266
+ start: (loginId: string, origin: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1267
+ transactionId: string;
1268
+ options: string;
1269
+ create: boolean;
1270
+ }>>;
1271
+ finish: (transactionId: string, response: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
1272
+ };
1273
+ signUpOrIn: ((identifier: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>) & {
1274
+ start: (loginId: string, origin: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1275
+ transactionId: string;
1276
+ options: string;
1277
+ create: boolean;
1278
+ }>>;
1279
+ };
1280
+ update: ((identifier: string, token: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").ResponseData>>) & {
1281
+ start: (loginId: string, origin: string, token: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1282
+ transactionId: string;
1283
+ options: string;
1284
+ create: boolean;
1285
+ }>>;
1286
+ finish: (transactionId: string, response: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").ResponseData>>;
1287
+ };
1288
+ helpers: {
1289
+ create: (options: string) => Promise<string>;
1290
+ get: (options: string) => Promise<string>;
1291
+ isSupported: (requirePlatformAuthenticator?: boolean) => Promise<boolean>;
1292
+ conditional: (options: string, abort: AbortController) => Promise<string>;
1293
+ };
1294
+ };
1295
+ fedcm: {
1296
+ oneTap(provider?: string, oneTapConfig?: import("@descope/web-js-sdk").OneTapConfig, loginOptions?: import("@descope/core-js-sdk").LoginOptions, onSkip?: () => void): Promise<unknown>;
1297
+ launch(context?: "signin" | "signup" | "use" | "continue"): Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
1298
+ isSupported(): boolean;
1299
+ };
1300
+ accessKey: {
1301
+ exchange: (accessKey: string, loginOptions?: import("@descope/core-js-sdk").AccessKeyLoginOptions) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").ExchangeAccessKeyResponse>>;
1302
+ };
1303
+ otp: {
1304
+ verify: {
1305
+ sms: (loginId: string, code: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
1306
+ voice: (loginId: string, code: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
1307
+ whatsapp: (loginId: string, code: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
1308
+ email: (loginId: string, code: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
1309
+ };
1310
+ signIn: {
1311
+ sms: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1312
+ maskedPhone: string;
1313
+ }>>;
1314
+ voice: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1315
+ maskedPhone: string;
1316
+ }>>;
1317
+ whatsapp: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1318
+ maskedPhone: string;
1319
+ }>>;
1320
+ email: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1321
+ maskedEmail: string;
1322
+ }>>;
1323
+ };
1324
+ signUp: {
1325
+ sms: (loginId: string, user?: {
1326
+ email?: string;
1327
+ name?: string;
1328
+ givenName?: string;
1329
+ middleName?: string;
1330
+ familyName?: string;
1331
+ phone?: string;
1332
+ }, signUpOptions?: {
1333
+ customClaims?: Record<string, any>;
1334
+ templateOptions?: {
1335
+ [x: string]: string;
1336
+ };
1337
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1338
+ maskedPhone: string;
1339
+ }>>;
1340
+ voice: (loginId: string, user?: {
1341
+ email?: string;
1342
+ name?: string;
1343
+ givenName?: string;
1344
+ middleName?: string;
1345
+ familyName?: string;
1346
+ phone?: string;
1347
+ }, signUpOptions?: {
1348
+ customClaims?: Record<string, any>;
1349
+ templateOptions?: {
1350
+ [x: string]: string;
1351
+ };
1352
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1353
+ maskedPhone: string;
1354
+ }>>;
1355
+ whatsapp: (loginId: string, user?: {
1356
+ email?: string;
1357
+ name?: string;
1358
+ givenName?: string;
1359
+ middleName?: string;
1360
+ familyName?: string;
1361
+ phone?: string;
1362
+ }, signUpOptions?: {
1363
+ customClaims?: Record<string, any>;
1364
+ templateOptions?: {
1365
+ [x: string]: string;
1366
+ };
1367
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1368
+ maskedPhone: string;
1369
+ }>>;
1370
+ email: (loginId: string, user?: {
1371
+ email?: string;
1372
+ name?: string;
1373
+ givenName?: string;
1374
+ middleName?: string;
1375
+ familyName?: string;
1376
+ phone?: string;
1377
+ }, signUpOptions?: {
1378
+ customClaims?: Record<string, any>;
1379
+ templateOptions?: {
1380
+ [x: string]: string;
1381
+ };
1382
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1383
+ maskedEmail: string;
1384
+ }>>;
1385
+ };
1386
+ signUpOrIn: {
1387
+ sms: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1388
+ maskedPhone: string;
1389
+ }>>;
1390
+ voice: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1391
+ maskedPhone: string;
1392
+ }>>;
1393
+ whatsapp: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1394
+ maskedPhone: string;
1395
+ }>>;
1396
+ email: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1397
+ maskedEmail: string;
1398
+ }>>;
1399
+ };
1400
+ update: {
1401
+ email: <T extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
1402
+ addToLoginIDs?: T;
1403
+ onMergeUseExisting?: T extends true ? boolean : never;
1404
+ templateOptions?: {
1405
+ [x: string]: string;
1406
+ };
1407
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1408
+ maskedEmail: string;
1409
+ }>>;
1410
+ phone: {
1411
+ sms: <T_1 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
1412
+ addToLoginIDs?: T_1;
1413
+ onMergeUseExisting?: T_1 extends true ? boolean : never;
1414
+ templateOptions?: {
1415
+ [x: string]: string;
1416
+ };
1417
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1418
+ maskedPhone: string;
1419
+ }>>;
1420
+ voice: <T_1_1 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
1421
+ addToLoginIDs?: T_1_1;
1422
+ onMergeUseExisting?: T_1_1 extends true ? boolean : never;
1423
+ templateOptions?: {
1424
+ [x: string]: string;
1425
+ };
1426
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1427
+ maskedPhone: string;
1428
+ }>>;
1429
+ whatsapp: <T_1_2 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
1430
+ addToLoginIDs?: T_1_2;
1431
+ onMergeUseExisting?: T_1_2 extends true ? boolean : never;
1432
+ templateOptions?: {
1433
+ [x: string]: string;
1434
+ };
1435
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1436
+ maskedPhone: string;
1437
+ }>>;
1438
+ };
1439
+ };
1440
+ };
1441
+ magicLink: {
1442
+ verify: (token: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
1443
+ signIn: {
1444
+ sms: (loginId: string, URI: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1445
+ maskedPhone: string;
1446
+ }>>;
1447
+ voice: (loginId: string, URI: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1448
+ maskedPhone: string;
1449
+ }>>;
1450
+ whatsapp: (loginId: string, URI: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1451
+ maskedPhone: string;
1452
+ }>>;
1453
+ email: (loginId: string, URI: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1454
+ maskedEmail: string;
1455
+ }>>;
1456
+ };
1457
+ signUp: {
1458
+ sms: (loginId: string, URI: string, user?: {
1459
+ email?: string;
1460
+ name?: string;
1461
+ givenName?: string;
1462
+ middleName?: string;
1463
+ familyName?: string;
1464
+ phone?: string;
1465
+ }, signUpOptions?: {
1466
+ customClaims?: Record<string, any>;
1467
+ templateOptions?: {
1468
+ [x: string]: string;
1469
+ };
1470
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1471
+ maskedPhone: string;
1472
+ }>>;
1473
+ voice: (loginId: string, URI: string, user?: {
1474
+ email?: string;
1475
+ name?: string;
1476
+ givenName?: string;
1477
+ middleName?: string;
1478
+ familyName?: string;
1479
+ phone?: string;
1480
+ }, signUpOptions?: {
1481
+ customClaims?: Record<string, any>;
1482
+ templateOptions?: {
1483
+ [x: string]: string;
1484
+ };
1485
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1486
+ maskedPhone: string;
1487
+ }>>;
1488
+ whatsapp: (loginId: string, URI: string, user?: {
1489
+ email?: string;
1490
+ name?: string;
1491
+ givenName?: string;
1492
+ middleName?: string;
1493
+ familyName?: string;
1494
+ phone?: string;
1495
+ }, signUpOptions?: {
1496
+ customClaims?: Record<string, any>;
1497
+ templateOptions?: {
1498
+ [x: string]: string;
1499
+ };
1500
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1501
+ maskedPhone: string;
1502
+ }>>;
1503
+ email: (loginId: string, URI: string, user?: {
1504
+ email?: string;
1505
+ name?: string;
1506
+ givenName?: string;
1507
+ middleName?: string;
1508
+ familyName?: string;
1509
+ phone?: string;
1510
+ }, signUpOptions?: {
1511
+ customClaims?: Record<string, any>;
1512
+ templateOptions?: {
1513
+ [x: string]: string;
1514
+ };
1515
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1516
+ maskedEmail: string;
1517
+ }>>;
1518
+ };
1519
+ signUpOrIn: {
1520
+ sms: (loginId: string, URI?: string, signUpOptions?: {
1521
+ customClaims?: Record<string, any>;
1522
+ templateOptions?: {
1523
+ [x: string]: string;
1524
+ };
1525
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1526
+ maskedPhone: string;
1527
+ }>>;
1528
+ voice: (loginId: string, URI?: string, signUpOptions?: {
1529
+ customClaims?: Record<string, any>;
1530
+ templateOptions?: {
1531
+ [x: string]: string;
1532
+ };
1533
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1534
+ maskedPhone: string;
1535
+ }>>;
1536
+ whatsapp: (loginId: string, URI?: string, signUpOptions?: {
1537
+ customClaims?: Record<string, any>;
1538
+ templateOptions?: {
1539
+ [x: string]: string;
1540
+ };
1541
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1542
+ maskedPhone: string;
1543
+ }>>;
1544
+ email: (loginId: string, URI?: string, signUpOptions?: {
1545
+ customClaims?: Record<string, any>;
1546
+ templateOptions?: {
1547
+ [x: string]: string;
1548
+ };
1549
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1550
+ maskedEmail: string;
1551
+ }>>;
1552
+ };
1553
+ update: {
1554
+ email: <T_2 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
1555
+ addToLoginIDs?: T_2;
1556
+ onMergeUseExisting?: T_2 extends true ? boolean : never;
1557
+ templateOptions?: {
1558
+ [x: string]: string;
1559
+ };
1560
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1561
+ maskedEmail: string;
1562
+ }>>;
1563
+ phone: {
1564
+ sms: <T_3 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
1565
+ addToLoginIDs?: T_3;
1566
+ onMergeUseExisting?: T_3 extends true ? boolean : never;
1567
+ templateOptions?: {
1568
+ [x: string]: string;
1569
+ };
1570
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1571
+ maskedPhone: string;
1572
+ }>>;
1573
+ voice: <T_3_1 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
1574
+ addToLoginIDs?: T_3_1;
1575
+ onMergeUseExisting?: T_3_1 extends true ? boolean : never;
1576
+ templateOptions?: {
1577
+ [x: string]: string;
1578
+ };
1579
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1580
+ maskedPhone: string;
1581
+ }>>;
1582
+ whatsapp: <T_3_2 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
1583
+ addToLoginIDs?: T_3_2;
1584
+ onMergeUseExisting?: T_3_2 extends true ? boolean : never;
1585
+ templateOptions?: {
1586
+ [x: string]: string;
1587
+ };
1588
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1589
+ maskedPhone: string;
1590
+ }>>;
1591
+ };
1592
+ };
1593
+ };
1594
+ enchantedLink: {
1595
+ verify: (token: string) => Promise<import("@descope/core-js-sdk").SdkResponse<never>>;
1596
+ signIn: (loginId: string, URI?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").EnchantedLinkResponse>>;
1597
+ signUpOrIn: (loginId: string, URI?: string, signUpOptions?: {
1598
+ customClaims?: Record<string, any>;
1599
+ templateOptions?: {
1600
+ [x: string]: string;
1601
+ };
1602
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").EnchantedLinkResponse>>;
1603
+ signUp: (loginId: string, URI?: string, user?: {
1604
+ email?: string;
1605
+ name?: string;
1606
+ givenName?: string;
1607
+ middleName?: string;
1608
+ familyName?: string;
1609
+ phone?: string;
1610
+ }, signUpOptions?: {
1611
+ customClaims?: Record<string, any>;
1612
+ templateOptions?: {
1613
+ [x: string]: string;
1614
+ };
1615
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").EnchantedLinkResponse>>;
1616
+ waitForSession: (pendingRef: string, config?: {
1617
+ pollingIntervalMs: number;
1618
+ timeoutMs: number;
1619
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
1620
+ update: {
1621
+ email: <T_4 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
1622
+ addToLoginIDs?: T_4;
1623
+ onMergeUseExisting?: T_4 extends true ? boolean : never;
1624
+ templateOptions?: {
1625
+ [x: string]: string;
1626
+ };
1627
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").EnchantedLinkResponse>>;
1628
+ };
1629
+ };
1630
+ oauth: {
1631
+ start: ((provider: string, redirectUrl?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").ResponseData>>) & {
1632
+ google: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
1633
+ facebook: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
1634
+ github: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
1635
+ microsoft: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
1636
+ gitlab: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
1637
+ apple: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
1638
+ discord: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
1639
+ linkedin: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
1640
+ slack: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
1641
+ };
1642
+ exchange: (code: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
1643
+ startNative: (provider: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, implicit?: boolean) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").ResponseData>>;
1644
+ finishNative: (provider: string, stateId: string, user?: string, code?: string, idToken?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").ResponseData>>;
1645
+ };
1646
+ saml: {
1647
+ start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
1648
+ exchange: (code: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
1649
+ };
1650
+ totp: {
1651
+ signUp: (loginId: string, user?: {
1652
+ email?: string;
1653
+ name?: string;
1654
+ givenName?: string;
1655
+ middleName?: string;
1656
+ familyName?: string;
1657
+ phone?: string;
1658
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").TOTPResponse>>;
1659
+ verify: (loginId: string, code: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
1660
+ update: (loginId: string, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").TOTPResponse>>;
1661
+ };
1662
+ notp: {
1663
+ signUpOrIn: (loginId?: string, signUpOptions?: {
1664
+ customClaims?: Record<string, any>;
1665
+ templateOptions?: {
1666
+ [x: string]: string;
1667
+ };
1668
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1669
+ pendingRef: string;
1670
+ redirectUrl: string;
1671
+ image: string;
1672
+ }>>;
1673
+ signUp: (loginId?: string, user?: {
1674
+ email?: string;
1675
+ name?: string;
1676
+ givenName?: string;
1677
+ middleName?: string;
1678
+ familyName?: string;
1679
+ phone?: string;
1680
+ }, signUpOptions?: {
1681
+ customClaims?: Record<string, any>;
1682
+ templateOptions?: {
1683
+ [x: string]: string;
1684
+ };
1685
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1686
+ pendingRef: string;
1687
+ redirectUrl: string;
1688
+ image: string;
1689
+ }>>;
1690
+ signIn: (loginId?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1691
+ pendingRef: string;
1692
+ redirectUrl: string;
1693
+ image: string;
1694
+ }>>;
1695
+ waitForSession: (pendingRef: string, config?: {
1696
+ pollingIntervalMs: number;
1697
+ timeoutMs: number;
1698
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
1699
+ };
1700
+ password: {
1701
+ signUp: (loginId: string, password: string, user?: {
1702
+ email?: string;
1703
+ name?: string;
1704
+ givenName?: string;
1705
+ middleName?: string;
1706
+ familyName?: string;
1707
+ phone?: string;
1708
+ }, signUpOptions?: {
1709
+ customClaims?: Record<string, any>;
1710
+ templateOptions?: {
1711
+ [x: string]: string;
1712
+ };
1713
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
1714
+ signIn: (loginId: string, password: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
1715
+ sendReset: (loginId: string, redirectUrl?: string, templateOptions?: {
1716
+ [x: string]: string;
1717
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1718
+ resetMethod: string;
1719
+ pendingRef?: string;
1720
+ linkId?: string;
1721
+ maskedEmail: string;
1722
+ }>>;
1723
+ update: (loginId: string, newPassword: string, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<never>>;
1724
+ replace: (loginId: string, oldPassword: string, newPassword: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
1725
+ policy: () => Promise<import("@descope/core-js-sdk").SdkResponse<{
1726
+ minLength: number;
1727
+ lowercase: boolean;
1728
+ uppercase: boolean;
1729
+ number: boolean;
1730
+ nonAlphanumeric: boolean;
1731
+ }>>;
1732
+ };
1733
+ refresh: (token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
1734
+ selectTenant: (tenantId: string, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
1735
+ logout: (token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<never>>;
1736
+ logoutAll: (token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<never>>;
1737
+ me: (token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").UserResponse>>;
1738
+ history: (token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").UserHistoryResponse>>;
1739
+ isJwtExpired: (token: string) => boolean;
1740
+ getTenants: (token: string) => string[];
1741
+ getJwtPermissions: (token: string, tenant?: string) => string[];
1742
+ getJwtRoles: (token: string, tenant?: string) => string[];
1743
+ httpClient: {
1744
+ get: (path: string, config?: {
1745
+ headers?: HeadersInit;
1746
+ queryParams?: {
1747
+ [key: string]: string;
1748
+ };
1749
+ token?: string;
1750
+ }) => Promise<Response>;
1751
+ post: (path: string, body?: any, config?: {
1752
+ headers?: HeadersInit;
1753
+ queryParams?: {
1754
+ [key: string]: string;
1755
+ };
1756
+ token?: string;
1757
+ }) => Promise<Response>;
1758
+ patch: (path: string, body?: any, config?: {
1759
+ headers?: HeadersInit;
1760
+ queryParams?: {
1761
+ [key: string]: string;
1762
+ };
1763
+ token?: string;
1764
+ }) => Promise<Response>;
1765
+ put: (path: string, body?: any, config?: {
1766
+ headers?: HeadersInit;
1767
+ queryParams?: {
1768
+ [key: string]: string;
1769
+ };
1770
+ token?: string;
1771
+ }) => Promise<Response>;
1772
+ delete: (path: string, config?: {
1773
+ headers?: HeadersInit;
1774
+ queryParams?: {
1775
+ [key: string]: string;
1776
+ };
1777
+ token?: string;
1778
+ }) => Promise<Response>;
1779
+ hooks?: {
1780
+ beforeRequest?: (config: import("@descope/core-js-sdk").RequestConfig) => import("@descope/core-js-sdk").RequestConfig;
1781
+ afterRequest?: (req: import("@descope/core-js-sdk").RequestConfig, res: Response) => void | Promise<void>;
1782
+ transformResponse?: (mutableResponse: import("@descope/core-js-sdk").ExtendedResponse) => Promise<import("@descope/core-js-sdk").ExtendedResponse>;
1783
+ };
1784
+ buildUrl: (path: string, queryParams?: {
1785
+ [key: string]: string;
1786
+ }) => string;
1787
+ };
1788
+ } | {
1789
+ flow: {
1790
+ start: (flowId: string, options?: Pick<{
1791
+ redirectUrl?: string;
1792
+ location?: string;
1793
+ tenant?: string;
1794
+ deviceInfo?: {
1795
+ webAuthnSupport?: boolean;
1796
+ };
1797
+ lastAuth?: {
1798
+ authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
1799
+ oauthProvider?: string;
1800
+ name?: string;
1801
+ loginId?: string;
1802
+ };
1803
+ redirectAuth?: {
1804
+ callbackUrl: string;
1805
+ codeChallenge: string;
1806
+ };
1807
+ oidcIdpStateId?: string;
1808
+ preview?: boolean;
1809
+ samlIdpStateId?: string;
1810
+ samlIdpUsername?: string;
1811
+ ssoAppId?: string;
1812
+ oidcLoginHint?: string;
1813
+ abTestingKey?: number;
1814
+ startOptionsVersion?: number;
1815
+ client?: Record<string, any>;
1816
+ locale?: string;
1817
+ oidcPrompt?: string;
1818
+ }, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt"> & {
1819
+ lastAuth?: Omit<{
1820
+ authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
1821
+ oauthProvider?: string;
1822
+ name?: string;
1823
+ loginId?: string;
1824
+ }, "loginId" | "name">;
1825
+ }, conditionInteractionId?: string, interactionId?: string, version?: number, componentsVersion?: string, input?: {
1826
+ [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[])[])[])[])[])[])[])[])[])[])[];
1827
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").FlowResponse>>;
1828
+ next: (executionId: string, stepId: string, interactionId: string, version?: number, componentsVersion?: string, input?: {
1829
+ [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[])[])[])[])[])[])[])[])[])[])[];
1830
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").FlowResponse>>;
1831
+ };
1832
+ webauthn: {
1833
+ signUp: ((identifier: string, name: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>) & {
1834
+ start: (loginId: string, origin: string, name: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1835
+ transactionId: string;
1836
+ options: string;
1837
+ create: boolean;
1838
+ }>>;
1839
+ finish: (transactionId: string, response: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
1840
+ };
1841
+ signIn: ((identifier: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>) & {
1842
+ start: (loginId: string, origin: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1843
+ transactionId: string;
1844
+ options: string;
1845
+ create: boolean;
1846
+ }>>;
1847
+ finish: (transactionId: string, response: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
1848
+ };
1849
+ signUpOrIn: ((identifier: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>) & {
1850
+ start: (loginId: string, origin: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1851
+ transactionId: string;
1852
+ options: string;
1853
+ create: boolean;
1854
+ }>>;
1855
+ };
1856
+ update: ((identifier: string, token: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").ResponseData>>) & {
1857
+ start: (loginId: string, origin: string, token: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1858
+ transactionId: string;
1859
+ options: string;
1860
+ create: boolean;
1861
+ }>>;
1862
+ finish: (transactionId: string, response: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").ResponseData>>;
1863
+ };
1864
+ helpers: {
1865
+ create: (options: string) => Promise<string>;
1866
+ get: (options: string) => Promise<string>;
1867
+ isSupported: (requirePlatformAuthenticator?: boolean) => Promise<boolean>;
1868
+ conditional: (options: string, abort: AbortController) => Promise<string>;
1869
+ };
1870
+ };
1871
+ fedcm: {
1872
+ oneTap(provider?: string, oneTapConfig?: import("@descope/web-js-sdk").OneTapConfig, loginOptions?: import("@descope/core-js-sdk").LoginOptions, onSkip?: () => void): Promise<unknown>;
1873
+ launch(context?: "signin" | "signup" | "use" | "continue"): Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
1874
+ isSupported(): boolean;
1875
+ };
1876
+ accessKey: {
1877
+ exchange: (accessKey: string, loginOptions?: import("@descope/core-js-sdk").AccessKeyLoginOptions) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").ExchangeAccessKeyResponse>>;
1878
+ };
1879
+ otp: {
1880
+ verify: {
1881
+ sms: (loginId: string, code: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
1882
+ voice: (loginId: string, code: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
1883
+ whatsapp: (loginId: string, code: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
1884
+ email: (loginId: string, code: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
1885
+ };
1886
+ signIn: {
1887
+ sms: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1888
+ maskedPhone: string;
1889
+ }>>;
1890
+ voice: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1891
+ maskedPhone: string;
1892
+ }>>;
1893
+ whatsapp: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1894
+ maskedPhone: string;
1895
+ }>>;
1896
+ email: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1897
+ maskedEmail: string;
1898
+ }>>;
1899
+ };
1900
+ signUp: {
1901
+ sms: (loginId: string, user?: {
1902
+ email?: string;
1903
+ name?: string;
1904
+ givenName?: string;
1905
+ middleName?: string;
1906
+ familyName?: string;
1907
+ phone?: string;
1908
+ }, signUpOptions?: {
1909
+ customClaims?: Record<string, any>;
1910
+ templateOptions?: {
1911
+ [x: string]: string;
1912
+ };
1913
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1914
+ maskedPhone: string;
1915
+ }>>;
1916
+ voice: (loginId: string, user?: {
1917
+ email?: string;
1918
+ name?: string;
1919
+ givenName?: string;
1920
+ middleName?: string;
1921
+ familyName?: string;
1922
+ phone?: string;
1923
+ }, signUpOptions?: {
1924
+ customClaims?: Record<string, any>;
1925
+ templateOptions?: {
1926
+ [x: string]: string;
1927
+ };
1928
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1929
+ maskedPhone: string;
1930
+ }>>;
1931
+ whatsapp: (loginId: string, user?: {
1932
+ email?: string;
1933
+ name?: string;
1934
+ givenName?: string;
1935
+ middleName?: string;
1936
+ familyName?: string;
1937
+ phone?: string;
1938
+ }, signUpOptions?: {
1939
+ customClaims?: Record<string, any>;
1940
+ templateOptions?: {
1941
+ [x: string]: string;
1942
+ };
1943
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1944
+ maskedPhone: string;
1945
+ }>>;
1946
+ email: (loginId: string, user?: {
1947
+ email?: string;
1948
+ name?: string;
1949
+ givenName?: string;
1950
+ middleName?: string;
1951
+ familyName?: string;
1952
+ phone?: string;
1953
+ }, signUpOptions?: {
1954
+ customClaims?: Record<string, any>;
1955
+ templateOptions?: {
1956
+ [x: string]: string;
1957
+ };
1958
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1959
+ maskedEmail: string;
1960
+ }>>;
1961
+ };
1962
+ signUpOrIn: {
1963
+ sms: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1964
+ maskedPhone: string;
1965
+ }>>;
1966
+ voice: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1967
+ maskedPhone: string;
1968
+ }>>;
1969
+ whatsapp: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1970
+ maskedPhone: string;
1971
+ }>>;
1972
+ email: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1973
+ maskedEmail: string;
1974
+ }>>;
1975
+ };
1976
+ update: {
1977
+ email: <T_5 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
1978
+ addToLoginIDs?: T_5;
1979
+ onMergeUseExisting?: T_5 extends true ? boolean : never;
1980
+ templateOptions?: {
1981
+ [x: string]: string;
1982
+ };
1983
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1984
+ maskedEmail: string;
1985
+ }>>;
1986
+ phone: {
1987
+ sms: <T_1_3 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
1988
+ addToLoginIDs?: T_1_3;
1989
+ onMergeUseExisting?: T_1_3 extends true ? boolean : never;
1990
+ templateOptions?: {
1991
+ [x: string]: string;
1992
+ };
1993
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
1994
+ maskedPhone: string;
1995
+ }>>;
1996
+ voice: <T_1_4 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
1997
+ addToLoginIDs?: T_1_4;
1998
+ onMergeUseExisting?: T_1_4 extends true ? boolean : never;
1999
+ templateOptions?: {
2000
+ [x: string]: string;
2001
+ };
2002
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2003
+ maskedPhone: string;
2004
+ }>>;
2005
+ whatsapp: <T_1_5 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
2006
+ addToLoginIDs?: T_1_5;
2007
+ onMergeUseExisting?: T_1_5 extends true ? boolean : never;
2008
+ templateOptions?: {
2009
+ [x: string]: string;
2010
+ };
2011
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2012
+ maskedPhone: string;
2013
+ }>>;
2014
+ };
2015
+ };
2016
+ };
2017
+ magicLink: {
2018
+ verify: (token: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
2019
+ signIn: {
2020
+ sms: (loginId: string, URI: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2021
+ maskedPhone: string;
2022
+ }>>;
2023
+ voice: (loginId: string, URI: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2024
+ maskedPhone: string;
2025
+ }>>;
2026
+ whatsapp: (loginId: string, URI: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2027
+ maskedPhone: string;
2028
+ }>>;
2029
+ email: (loginId: string, URI: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2030
+ maskedEmail: string;
2031
+ }>>;
2032
+ };
2033
+ signUp: {
2034
+ sms: (loginId: string, URI: string, user?: {
2035
+ email?: string;
2036
+ name?: string;
2037
+ givenName?: string;
2038
+ middleName?: string;
2039
+ familyName?: string;
2040
+ phone?: string;
2041
+ }, signUpOptions?: {
2042
+ customClaims?: Record<string, any>;
2043
+ templateOptions?: {
2044
+ [x: string]: string;
2045
+ };
2046
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2047
+ maskedPhone: string;
2048
+ }>>;
2049
+ voice: (loginId: string, URI: string, user?: {
2050
+ email?: string;
2051
+ name?: string;
2052
+ givenName?: string;
2053
+ middleName?: string;
2054
+ familyName?: string;
2055
+ phone?: string;
2056
+ }, signUpOptions?: {
2057
+ customClaims?: Record<string, any>;
2058
+ templateOptions?: {
2059
+ [x: string]: string;
2060
+ };
2061
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2062
+ maskedPhone: string;
2063
+ }>>;
2064
+ whatsapp: (loginId: string, URI: string, user?: {
2065
+ email?: string;
2066
+ name?: string;
2067
+ givenName?: string;
2068
+ middleName?: string;
2069
+ familyName?: string;
2070
+ phone?: string;
2071
+ }, signUpOptions?: {
2072
+ customClaims?: Record<string, any>;
2073
+ templateOptions?: {
2074
+ [x: string]: string;
2075
+ };
2076
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2077
+ maskedPhone: string;
2078
+ }>>;
2079
+ email: (loginId: string, URI: string, user?: {
2080
+ email?: string;
2081
+ name?: string;
2082
+ givenName?: string;
2083
+ middleName?: string;
2084
+ familyName?: string;
2085
+ phone?: string;
2086
+ }, signUpOptions?: {
2087
+ customClaims?: Record<string, any>;
2088
+ templateOptions?: {
2089
+ [x: string]: string;
2090
+ };
2091
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2092
+ maskedEmail: string;
2093
+ }>>;
2094
+ };
2095
+ signUpOrIn: {
2096
+ sms: (loginId: string, URI?: string, signUpOptions?: {
2097
+ customClaims?: Record<string, any>;
2098
+ templateOptions?: {
2099
+ [x: string]: string;
2100
+ };
2101
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2102
+ maskedPhone: string;
2103
+ }>>;
2104
+ voice: (loginId: string, URI?: string, signUpOptions?: {
2105
+ customClaims?: Record<string, any>;
2106
+ templateOptions?: {
2107
+ [x: string]: string;
2108
+ };
2109
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2110
+ maskedPhone: string;
2111
+ }>>;
2112
+ whatsapp: (loginId: string, URI?: string, signUpOptions?: {
2113
+ customClaims?: Record<string, any>;
2114
+ templateOptions?: {
2115
+ [x: string]: string;
2116
+ };
2117
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2118
+ maskedPhone: string;
2119
+ }>>;
2120
+ email: (loginId: string, URI?: string, signUpOptions?: {
2121
+ customClaims?: Record<string, any>;
2122
+ templateOptions?: {
2123
+ [x: string]: string;
2124
+ };
2125
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2126
+ maskedEmail: string;
2127
+ }>>;
2128
+ };
2129
+ update: {
2130
+ email: <T_2_1 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
2131
+ addToLoginIDs?: T_2_1;
2132
+ onMergeUseExisting?: T_2_1 extends true ? boolean : never;
2133
+ templateOptions?: {
2134
+ [x: string]: string;
2135
+ };
2136
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2137
+ maskedEmail: string;
2138
+ }>>;
2139
+ phone: {
2140
+ sms: <T_3_3 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
2141
+ addToLoginIDs?: T_3_3;
2142
+ onMergeUseExisting?: T_3_3 extends true ? boolean : never;
2143
+ templateOptions?: {
2144
+ [x: string]: string;
2145
+ };
2146
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2147
+ maskedPhone: string;
2148
+ }>>;
2149
+ voice: <T_3_4 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
2150
+ addToLoginIDs?: T_3_4;
2151
+ onMergeUseExisting?: T_3_4 extends true ? boolean : never;
2152
+ templateOptions?: {
2153
+ [x: string]: string;
2154
+ };
2155
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2156
+ maskedPhone: string;
2157
+ }>>;
2158
+ whatsapp: <T_3_5 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
2159
+ addToLoginIDs?: T_3_5;
2160
+ onMergeUseExisting?: T_3_5 extends true ? boolean : never;
2161
+ templateOptions?: {
2162
+ [x: string]: string;
2163
+ };
2164
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2165
+ maskedPhone: string;
2166
+ }>>;
2167
+ };
2168
+ };
2169
+ };
2170
+ enchantedLink: {
2171
+ verify: (token: string) => Promise<import("@descope/core-js-sdk").SdkResponse<never>>;
2172
+ signIn: (loginId: string, URI?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").EnchantedLinkResponse>>;
2173
+ signUpOrIn: (loginId: string, URI?: string, signUpOptions?: {
2174
+ customClaims?: Record<string, any>;
2175
+ templateOptions?: {
2176
+ [x: string]: string;
2177
+ };
2178
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").EnchantedLinkResponse>>;
2179
+ signUp: (loginId: string, URI?: string, user?: {
2180
+ email?: string;
2181
+ name?: string;
2182
+ givenName?: string;
2183
+ middleName?: string;
2184
+ familyName?: string;
2185
+ phone?: string;
2186
+ }, signUpOptions?: {
2187
+ customClaims?: Record<string, any>;
2188
+ templateOptions?: {
2189
+ [x: string]: string;
2190
+ };
2191
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").EnchantedLinkResponse>>;
2192
+ waitForSession: (pendingRef: string, config?: {
2193
+ pollingIntervalMs: number;
2194
+ timeoutMs: number;
2195
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
2196
+ update: {
2197
+ email: <T_4_1 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
2198
+ addToLoginIDs?: T_4_1;
2199
+ onMergeUseExisting?: T_4_1 extends true ? boolean : never;
2200
+ templateOptions?: {
2201
+ [x: string]: string;
2202
+ };
2203
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").EnchantedLinkResponse>>;
2204
+ };
2205
+ };
2206
+ oauth: {
2207
+ start: ((provider: string, redirectUrl?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").ResponseData>>) & {
2208
+ google: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
2209
+ facebook: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
2210
+ github: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
2211
+ microsoft: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
2212
+ gitlab: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
2213
+ apple: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
2214
+ discord: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
2215
+ linkedin: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
2216
+ slack: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
2217
+ };
2218
+ exchange: (code: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
2219
+ startNative: (provider: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, implicit?: boolean) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").ResponseData>>;
2220
+ finishNative: (provider: string, stateId: string, user?: string, code?: string, idToken?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").ResponseData>>;
2221
+ };
2222
+ saml: {
2223
+ start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
2224
+ exchange: (code: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
2225
+ };
2226
+ totp: {
2227
+ signUp: (loginId: string, user?: {
2228
+ email?: string;
2229
+ name?: string;
2230
+ givenName?: string;
2231
+ middleName?: string;
2232
+ familyName?: string;
2233
+ phone?: string;
2234
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").TOTPResponse>>;
2235
+ verify: (loginId: string, code: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
2236
+ update: (loginId: string, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").TOTPResponse>>;
2237
+ };
2238
+ notp: {
2239
+ signUpOrIn: (loginId?: string, signUpOptions?: {
2240
+ customClaims?: Record<string, any>;
2241
+ templateOptions?: {
2242
+ [x: string]: string;
2243
+ };
2244
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2245
+ pendingRef: string;
2246
+ redirectUrl: string;
2247
+ image: string;
2248
+ }>>;
2249
+ signUp: (loginId?: string, user?: {
2250
+ email?: string;
2251
+ name?: string;
2252
+ givenName?: string;
2253
+ middleName?: string;
2254
+ familyName?: string;
2255
+ phone?: string;
2256
+ }, signUpOptions?: {
2257
+ customClaims?: Record<string, any>;
2258
+ templateOptions?: {
2259
+ [x: string]: string;
2260
+ };
2261
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2262
+ pendingRef: string;
2263
+ redirectUrl: string;
2264
+ image: string;
2265
+ }>>;
2266
+ signIn: (loginId?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2267
+ pendingRef: string;
2268
+ redirectUrl: string;
2269
+ image: string;
2270
+ }>>;
2271
+ waitForSession: (pendingRef: string, config?: {
2272
+ pollingIntervalMs: number;
2273
+ timeoutMs: number;
2274
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
2275
+ };
2276
+ password: {
2277
+ signUp: (loginId: string, password: string, user?: {
2278
+ email?: string;
2279
+ name?: string;
2280
+ givenName?: string;
2281
+ middleName?: string;
2282
+ familyName?: string;
2283
+ phone?: string;
2284
+ }, signUpOptions?: {
2285
+ customClaims?: Record<string, any>;
2286
+ templateOptions?: {
2287
+ [x: string]: string;
2288
+ };
2289
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
2290
+ signIn: (loginId: string, password: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
2291
+ sendReset: (loginId: string, redirectUrl?: string, templateOptions?: {
2292
+ [x: string]: string;
2293
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2294
+ resetMethod: string;
2295
+ pendingRef?: string;
2296
+ linkId?: string;
2297
+ maskedEmail: string;
2298
+ }>>;
2299
+ update: (loginId: string, newPassword: string, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<never>>;
2300
+ replace: (loginId: string, oldPassword: string, newPassword: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
2301
+ policy: () => Promise<import("@descope/core-js-sdk").SdkResponse<{
2302
+ minLength: number;
2303
+ lowercase: boolean;
2304
+ uppercase: boolean;
2305
+ number: boolean;
2306
+ nonAlphanumeric: boolean;
2307
+ }>>;
2308
+ };
2309
+ refresh: (token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
2310
+ selectTenant: (tenantId: string, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
2311
+ logout: (token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<never>>;
2312
+ logoutAll: (token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<never>>;
2313
+ me: (token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").UserResponse>>;
2314
+ history: (token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").UserHistoryResponse>>;
2315
+ isJwtExpired: (token: string) => boolean;
2316
+ getTenants: (token: string) => string[];
2317
+ getJwtPermissions: (token: string, tenant?: string) => string[];
2318
+ getJwtRoles: (token: string, tenant?: string) => string[];
2319
+ httpClient: {
2320
+ get: (path: string, config?: {
2321
+ headers?: HeadersInit;
2322
+ queryParams?: {
2323
+ [key: string]: string;
2324
+ };
2325
+ token?: string;
2326
+ }) => Promise<Response>;
2327
+ post: (path: string, body?: any, config?: {
2328
+ headers?: HeadersInit;
2329
+ queryParams?: {
2330
+ [key: string]: string;
2331
+ };
2332
+ token?: string;
2333
+ }) => Promise<Response>;
2334
+ patch: (path: string, body?: any, config?: {
2335
+ headers?: HeadersInit;
2336
+ queryParams?: {
2337
+ [key: string]: string;
2338
+ };
2339
+ token?: string;
2340
+ }) => Promise<Response>;
2341
+ put: (path: string, body?: any, config?: {
2342
+ headers?: HeadersInit;
2343
+ queryParams?: {
2344
+ [key: string]: string;
2345
+ };
2346
+ token?: string;
2347
+ }) => Promise<Response>;
2348
+ delete: (path: string, config?: {
2349
+ headers?: HeadersInit;
2350
+ queryParams?: {
2351
+ [key: string]: string;
2352
+ };
2353
+ token?: string;
2354
+ }) => Promise<Response>;
2355
+ hooks?: {
2356
+ beforeRequest?: (config: import("@descope/core-js-sdk").RequestConfig) => import("@descope/core-js-sdk").RequestConfig;
2357
+ afterRequest?: (req: import("@descope/core-js-sdk").RequestConfig, res: Response) => void | Promise<void>;
2358
+ transformResponse?: (mutableResponse: import("@descope/core-js-sdk").ExtendedResponse) => Promise<import("@descope/core-js-sdk").ExtendedResponse>;
2359
+ };
2360
+ buildUrl: (path: string, queryParams?: {
2361
+ [key: string]: string;
2362
+ }) => string;
2363
+ };
2364
+ }) & {
2365
+ onSessionTokenChange: (cb: (data: string) => void) => () => any[];
2366
+ onUserChange: (cb: (data: import("@descope/core-js-sdk").UserResponse) => void) => () => any[];
2367
+ }) & {
2368
+ getLastUserLoginId: () => string;
2369
+ getLastUserDisplayName: () => string;
2370
+ }) & {
2371
+ getRefreshToken: () => string;
2372
+ getSessionToken: () => string;
2373
+ };
2374
+ export declare const getSessionToken: () => string;
2375
+ export declare const getRefreshToken: () => string;
2376
+ export declare const isSessionTokenExpired: (token?: string) => boolean;
2377
+ export declare const isRefreshTokenExpired: (token?: string) => boolean;
2378
+ export declare const getJwtPermissions: (token?: any, tenant?: string) => string[];
2379
+ export declare const getJwtRoles: (token?: any, tenant?: string) => string[];
2380
+ export declare const refresh: (token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
2381
+ export declare const getGlobalSdk: () => ((({
2382
+ flow: {
2383
+ start: (flowId: string, options?: Pick<{
2384
+ redirectUrl?: string;
2385
+ location?: string;
2386
+ tenant?: string;
2387
+ deviceInfo?: {
2388
+ webAuthnSupport?: boolean;
2389
+ };
2390
+ lastAuth?: {
2391
+ authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
2392
+ oauthProvider?: string;
2393
+ name?: string;
2394
+ loginId?: string;
2395
+ };
2396
+ redirectAuth?: {
2397
+ callbackUrl: string;
2398
+ codeChallenge: string;
2399
+ };
2400
+ oidcIdpStateId?: string;
2401
+ preview?: boolean;
2402
+ samlIdpStateId?: string;
2403
+ samlIdpUsername?: string;
2404
+ ssoAppId?: string;
2405
+ oidcLoginHint?: string;
2406
+ abTestingKey?: number;
2407
+ startOptionsVersion?: number;
2408
+ client?: Record<string, any>;
2409
+ locale?: string;
2410
+ oidcPrompt?: string;
2411
+ }, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt"> & {
2412
+ lastAuth?: Omit<{
2413
+ authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
2414
+ oauthProvider?: string;
2415
+ name?: string;
2416
+ loginId?: string;
2417
+ }, "loginId" | "name">;
2418
+ }, conditionInteractionId?: string, interactionId?: string, version?: number, componentsVersion?: string, input?: {
2419
+ [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[])[])[])[])[])[])[])[])[])[])[];
2420
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").FlowResponse>>;
2421
+ next: (executionId: string, stepId: string, interactionId: string, version?: number, componentsVersion?: string, input?: {
2422
+ [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[])[])[])[])[])[])[])[])[])[])[];
2423
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").FlowResponse>>;
2424
+ };
2425
+ webauthn: {
2426
+ signUp: ((identifier: string, name: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>) & {
2427
+ start: (loginId: string, origin: string, name: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2428
+ transactionId: string;
2429
+ options: string;
2430
+ create: boolean;
2431
+ }>>;
2432
+ finish: (transactionId: string, response: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
2433
+ };
2434
+ signIn: ((identifier: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>) & {
2435
+ start: (loginId: string, origin: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2436
+ transactionId: string;
2437
+ options: string;
2438
+ create: boolean;
2439
+ }>>;
2440
+ finish: (transactionId: string, response: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
2441
+ };
2442
+ signUpOrIn: ((identifier: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>) & {
2443
+ start: (loginId: string, origin: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2444
+ transactionId: string;
2445
+ options: string;
2446
+ create: boolean;
2447
+ }>>;
2448
+ };
2449
+ update: ((identifier: string, token: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").ResponseData>>) & {
2450
+ start: (loginId: string, origin: string, token: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2451
+ transactionId: string;
2452
+ options: string;
2453
+ create: boolean;
2454
+ }>>;
2455
+ finish: (transactionId: string, response: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").ResponseData>>;
2456
+ };
2457
+ helpers: {
2458
+ create: (options: string) => Promise<string>;
2459
+ get: (options: string) => Promise<string>;
2460
+ isSupported: (requirePlatformAuthenticator?: boolean) => Promise<boolean>;
2461
+ conditional: (options: string, abort: AbortController) => Promise<string>;
2462
+ };
2463
+ };
2464
+ fedcm: {
2465
+ oneTap(provider?: string, oneTapConfig?: import("@descope/web-js-sdk").OneTapConfig, loginOptions?: import("@descope/core-js-sdk").LoginOptions, onSkip?: () => void): Promise<unknown>;
2466
+ launch(context?: "signin" | "signup" | "use" | "continue"): Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
2467
+ isSupported(): boolean;
2468
+ };
2469
+ accessKey: {
2470
+ exchange: (accessKey: string, loginOptions?: import("@descope/core-js-sdk").AccessKeyLoginOptions) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").ExchangeAccessKeyResponse>>;
2471
+ };
2472
+ otp: {
2473
+ verify: {
2474
+ sms: (loginId: string, code: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
2475
+ voice: (loginId: string, code: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
2476
+ whatsapp: (loginId: string, code: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
2477
+ email: (loginId: string, code: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
2478
+ };
2479
+ signIn: {
2480
+ sms: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2481
+ maskedPhone: string;
2482
+ }>>;
2483
+ voice: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2484
+ maskedPhone: string;
2485
+ }>>;
2486
+ whatsapp: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2487
+ maskedPhone: string;
2488
+ }>>;
2489
+ email: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2490
+ maskedEmail: string;
2491
+ }>>;
2492
+ };
2493
+ signUp: {
2494
+ sms: (loginId: string, user?: {
2495
+ email?: string;
2496
+ name?: string;
2497
+ givenName?: string;
2498
+ middleName?: string;
2499
+ familyName?: string;
2500
+ phone?: string;
2501
+ }, signUpOptions?: {
2502
+ customClaims?: Record<string, any>;
2503
+ templateOptions?: {
2504
+ [x: string]: string;
2505
+ };
2506
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2507
+ maskedPhone: string;
2508
+ }>>;
2509
+ voice: (loginId: string, user?: {
2510
+ email?: string;
2511
+ name?: string;
2512
+ givenName?: string;
2513
+ middleName?: string;
2514
+ familyName?: string;
2515
+ phone?: string;
2516
+ }, signUpOptions?: {
2517
+ customClaims?: Record<string, any>;
2518
+ templateOptions?: {
2519
+ [x: string]: string;
2520
+ };
2521
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2522
+ maskedPhone: string;
2523
+ }>>;
2524
+ whatsapp: (loginId: string, user?: {
2525
+ email?: string;
2526
+ name?: string;
2527
+ givenName?: string;
2528
+ middleName?: string;
2529
+ familyName?: string;
2530
+ phone?: string;
2531
+ }, signUpOptions?: {
2532
+ customClaims?: Record<string, any>;
2533
+ templateOptions?: {
2534
+ [x: string]: string;
2535
+ };
2536
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2537
+ maskedPhone: string;
2538
+ }>>;
2539
+ email: (loginId: string, user?: {
2540
+ email?: string;
2541
+ name?: string;
2542
+ givenName?: string;
2543
+ middleName?: string;
2544
+ familyName?: string;
2545
+ phone?: string;
2546
+ }, signUpOptions?: {
2547
+ customClaims?: Record<string, any>;
2548
+ templateOptions?: {
2549
+ [x: string]: string;
2550
+ };
2551
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2552
+ maskedEmail: string;
2553
+ }>>;
2554
+ };
2555
+ signUpOrIn: {
2556
+ sms: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2557
+ maskedPhone: string;
2558
+ }>>;
2559
+ voice: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2560
+ maskedPhone: string;
2561
+ }>>;
2562
+ whatsapp: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2563
+ maskedPhone: string;
2564
+ }>>;
2565
+ email: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2566
+ maskedEmail: string;
2567
+ }>>;
2568
+ };
2569
+ update: {
2570
+ email: <T extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
2571
+ addToLoginIDs?: T;
2572
+ onMergeUseExisting?: T extends true ? boolean : never;
2573
+ templateOptions?: {
2574
+ [x: string]: string;
2575
+ };
2576
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2577
+ maskedEmail: string;
2578
+ }>>;
2579
+ phone: {
2580
+ sms: <T_1 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
2581
+ addToLoginIDs?: T_1;
2582
+ onMergeUseExisting?: T_1 extends true ? boolean : never;
2583
+ templateOptions?: {
2584
+ [x: string]: string;
2585
+ };
2586
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2587
+ maskedPhone: string;
2588
+ }>>;
2589
+ voice: <T_1_1 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
2590
+ addToLoginIDs?: T_1_1;
2591
+ onMergeUseExisting?: T_1_1 extends true ? boolean : never;
2592
+ templateOptions?: {
2593
+ [x: string]: string;
2594
+ };
2595
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2596
+ maskedPhone: string;
2597
+ }>>;
2598
+ whatsapp: <T_1_2 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
2599
+ addToLoginIDs?: T_1_2;
2600
+ onMergeUseExisting?: T_1_2 extends true ? boolean : never;
2601
+ templateOptions?: {
2602
+ [x: string]: string;
2603
+ };
2604
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2605
+ maskedPhone: string;
2606
+ }>>;
2607
+ };
2608
+ };
2609
+ };
2610
+ magicLink: {
2611
+ verify: (token: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
2612
+ signIn: {
2613
+ sms: (loginId: string, URI: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2614
+ maskedPhone: string;
2615
+ }>>;
2616
+ voice: (loginId: string, URI: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2617
+ maskedPhone: string;
2618
+ }>>;
2619
+ whatsapp: (loginId: string, URI: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2620
+ maskedPhone: string;
2621
+ }>>;
2622
+ email: (loginId: string, URI: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2623
+ maskedEmail: string;
2624
+ }>>;
2625
+ };
2626
+ signUp: {
2627
+ sms: (loginId: string, URI: string, user?: {
2628
+ email?: string;
2629
+ name?: string;
2630
+ givenName?: string;
2631
+ middleName?: string;
2632
+ familyName?: string;
2633
+ phone?: string;
2634
+ }, signUpOptions?: {
2635
+ customClaims?: Record<string, any>;
2636
+ templateOptions?: {
2637
+ [x: string]: string;
2638
+ };
2639
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2640
+ maskedPhone: string;
2641
+ }>>;
2642
+ voice: (loginId: string, URI: string, user?: {
2643
+ email?: string;
2644
+ name?: string;
2645
+ givenName?: string;
2646
+ middleName?: string;
2647
+ familyName?: string;
2648
+ phone?: string;
2649
+ }, signUpOptions?: {
2650
+ customClaims?: Record<string, any>;
2651
+ templateOptions?: {
2652
+ [x: string]: string;
2653
+ };
2654
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2655
+ maskedPhone: string;
2656
+ }>>;
2657
+ whatsapp: (loginId: string, URI: string, user?: {
2658
+ email?: string;
2659
+ name?: string;
2660
+ givenName?: string;
2661
+ middleName?: string;
2662
+ familyName?: string;
2663
+ phone?: string;
2664
+ }, signUpOptions?: {
2665
+ customClaims?: Record<string, any>;
2666
+ templateOptions?: {
2667
+ [x: string]: string;
2668
+ };
2669
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2670
+ maskedPhone: string;
2671
+ }>>;
2672
+ email: (loginId: string, URI: string, user?: {
2673
+ email?: string;
2674
+ name?: string;
2675
+ givenName?: string;
2676
+ middleName?: string;
2677
+ familyName?: string;
2678
+ phone?: string;
2679
+ }, signUpOptions?: {
2680
+ customClaims?: Record<string, any>;
2681
+ templateOptions?: {
2682
+ [x: string]: string;
2683
+ };
2684
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2685
+ maskedEmail: string;
2686
+ }>>;
2687
+ };
2688
+ signUpOrIn: {
2689
+ sms: (loginId: string, URI?: string, signUpOptions?: {
2690
+ customClaims?: Record<string, any>;
2691
+ templateOptions?: {
2692
+ [x: string]: string;
2693
+ };
2694
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2695
+ maskedPhone: string;
2696
+ }>>;
2697
+ voice: (loginId: string, URI?: string, signUpOptions?: {
2698
+ customClaims?: Record<string, any>;
2699
+ templateOptions?: {
2700
+ [x: string]: string;
2701
+ };
2702
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2703
+ maskedPhone: string;
2704
+ }>>;
2705
+ whatsapp: (loginId: string, URI?: string, signUpOptions?: {
2706
+ customClaims?: Record<string, any>;
2707
+ templateOptions?: {
2708
+ [x: string]: string;
2709
+ };
2710
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2711
+ maskedPhone: string;
2712
+ }>>;
2713
+ email: (loginId: string, URI?: string, signUpOptions?: {
2714
+ customClaims?: Record<string, any>;
2715
+ templateOptions?: {
2716
+ [x: string]: string;
2717
+ };
2718
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2719
+ maskedEmail: string;
2720
+ }>>;
2721
+ };
2722
+ update: {
2723
+ email: <T_2 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
2724
+ addToLoginIDs?: T_2;
2725
+ onMergeUseExisting?: T_2 extends true ? boolean : never;
2726
+ templateOptions?: {
2727
+ [x: string]: string;
2728
+ };
2729
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2730
+ maskedEmail: string;
2731
+ }>>;
2732
+ phone: {
2733
+ sms: <T_3 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
2734
+ addToLoginIDs?: T_3;
2735
+ onMergeUseExisting?: T_3 extends true ? boolean : never;
2736
+ templateOptions?: {
2737
+ [x: string]: string;
2738
+ };
2739
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2740
+ maskedPhone: string;
2741
+ }>>;
2742
+ voice: <T_3_1 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
2743
+ addToLoginIDs?: T_3_1;
2744
+ onMergeUseExisting?: T_3_1 extends true ? boolean : never;
2745
+ templateOptions?: {
2746
+ [x: string]: string;
2747
+ };
2748
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2749
+ maskedPhone: string;
2750
+ }>>;
2751
+ whatsapp: <T_3_2 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
2752
+ addToLoginIDs?: T_3_2;
2753
+ onMergeUseExisting?: T_3_2 extends true ? boolean : never;
2754
+ templateOptions?: {
2755
+ [x: string]: string;
2756
+ };
2757
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2758
+ maskedPhone: string;
2759
+ }>>;
2760
+ };
2761
+ };
2762
+ };
2763
+ enchantedLink: {
2764
+ verify: (token: string) => Promise<import("@descope/core-js-sdk").SdkResponse<never>>;
2765
+ signIn: (loginId: string, URI?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").EnchantedLinkResponse>>;
2766
+ signUpOrIn: (loginId: string, URI?: string, signUpOptions?: {
2767
+ customClaims?: Record<string, any>;
2768
+ templateOptions?: {
2769
+ [x: string]: string;
2770
+ };
2771
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").EnchantedLinkResponse>>;
2772
+ signUp: (loginId: string, URI?: string, user?: {
2773
+ email?: string;
2774
+ name?: string;
2775
+ givenName?: string;
2776
+ middleName?: string;
2777
+ familyName?: string;
2778
+ phone?: string;
2779
+ }, signUpOptions?: {
2780
+ customClaims?: Record<string, any>;
2781
+ templateOptions?: {
2782
+ [x: string]: string;
2783
+ };
2784
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").EnchantedLinkResponse>>;
2785
+ waitForSession: (pendingRef: string, config?: {
2786
+ pollingIntervalMs: number;
2787
+ timeoutMs: number;
2788
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
2789
+ update: {
2790
+ email: <T_4 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
2791
+ addToLoginIDs?: T_4;
2792
+ onMergeUseExisting?: T_4 extends true ? boolean : never;
2793
+ templateOptions?: {
2794
+ [x: string]: string;
2795
+ };
2796
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").EnchantedLinkResponse>>;
2797
+ };
2798
+ };
2799
+ oauth: {
2800
+ start: ((provider: string, redirectUrl?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").ResponseData>>) & {
2801
+ google: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
2802
+ facebook: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
2803
+ github: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
2804
+ microsoft: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
2805
+ gitlab: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
2806
+ apple: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
2807
+ discord: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
2808
+ linkedin: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
2809
+ slack: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
2810
+ };
2811
+ exchange: (code: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
2812
+ startNative: (provider: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, implicit?: boolean) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").ResponseData>>;
2813
+ finishNative: (provider: string, stateId: string, user?: string, code?: string, idToken?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").ResponseData>>;
2814
+ };
2815
+ saml: {
2816
+ start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
2817
+ exchange: (code: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
2818
+ };
2819
+ totp: {
2820
+ signUp: (loginId: string, user?: {
2821
+ email?: string;
2822
+ name?: string;
2823
+ givenName?: string;
2824
+ middleName?: string;
2825
+ familyName?: string;
2826
+ phone?: string;
2827
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").TOTPResponse>>;
2828
+ verify: (loginId: string, code: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
2829
+ update: (loginId: string, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").TOTPResponse>>;
2830
+ };
2831
+ notp: {
2832
+ signUpOrIn: (loginId?: string, signUpOptions?: {
2833
+ customClaims?: Record<string, any>;
2834
+ templateOptions?: {
2835
+ [x: string]: string;
2836
+ };
2837
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2838
+ pendingRef: string;
2839
+ redirectUrl: string;
2840
+ image: string;
2841
+ }>>;
2842
+ signUp: (loginId?: string, user?: {
2843
+ email?: string;
2844
+ name?: string;
2845
+ givenName?: string;
2846
+ middleName?: string;
2847
+ familyName?: string;
2848
+ phone?: string;
2849
+ }, signUpOptions?: {
2850
+ customClaims?: Record<string, any>;
2851
+ templateOptions?: {
2852
+ [x: string]: string;
2853
+ };
2854
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2855
+ pendingRef: string;
2856
+ redirectUrl: string;
2857
+ image: string;
2858
+ }>>;
2859
+ signIn: (loginId?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2860
+ pendingRef: string;
2861
+ redirectUrl: string;
2862
+ image: string;
2863
+ }>>;
2864
+ waitForSession: (pendingRef: string, config?: {
2865
+ pollingIntervalMs: number;
2866
+ timeoutMs: number;
2867
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
2868
+ };
2869
+ password: {
2870
+ signUp: (loginId: string, password: string, user?: {
2871
+ email?: string;
2872
+ name?: string;
2873
+ givenName?: string;
2874
+ middleName?: string;
2875
+ familyName?: string;
2876
+ phone?: string;
2877
+ }, signUpOptions?: {
2878
+ customClaims?: Record<string, any>;
2879
+ templateOptions?: {
2880
+ [x: string]: string;
2881
+ };
2882
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
2883
+ signIn: (loginId: string, password: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
2884
+ sendReset: (loginId: string, redirectUrl?: string, templateOptions?: {
2885
+ [x: string]: string;
2886
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
2887
+ resetMethod: string;
2888
+ pendingRef?: string;
2889
+ linkId?: string;
2890
+ maskedEmail: string;
2891
+ }>>;
2892
+ update: (loginId: string, newPassword: string, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<never>>;
2893
+ replace: (loginId: string, oldPassword: string, newPassword: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
2894
+ policy: () => Promise<import("@descope/core-js-sdk").SdkResponse<{
2895
+ minLength: number;
2896
+ lowercase: boolean;
2897
+ uppercase: boolean;
2898
+ number: boolean;
2899
+ nonAlphanumeric: boolean;
2900
+ }>>;
2901
+ };
2902
+ refresh: (token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
2903
+ selectTenant: (tenantId: string, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
2904
+ logout: (token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<never>>;
2905
+ logoutAll: (token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<never>>;
2906
+ me: (token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").UserResponse>>;
2907
+ history: (token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").UserHistoryResponse>>;
2908
+ isJwtExpired: (token: string) => boolean;
2909
+ getTenants: (token: string) => string[];
2910
+ getJwtPermissions: (token: string, tenant?: string) => string[];
2911
+ getJwtRoles: (token: string, tenant?: string) => string[];
2912
+ httpClient: {
2913
+ get: (path: string, config?: {
2914
+ headers?: HeadersInit;
2915
+ queryParams?: {
2916
+ [key: string]: string;
2917
+ };
2918
+ token?: string;
2919
+ }) => Promise<Response>;
2920
+ post: (path: string, body?: any, config?: {
2921
+ headers?: HeadersInit;
2922
+ queryParams?: {
2923
+ [key: string]: string;
2924
+ };
2925
+ token?: string;
2926
+ }) => Promise<Response>;
2927
+ patch: (path: string, body?: any, config?: {
2928
+ headers?: HeadersInit;
2929
+ queryParams?: {
2930
+ [key: string]: string;
2931
+ };
2932
+ token?: string;
2933
+ }) => Promise<Response>;
2934
+ put: (path: string, body?: any, config?: {
2935
+ headers?: HeadersInit;
2936
+ queryParams?: {
2937
+ [key: string]: string;
2938
+ };
2939
+ token?: string;
2940
+ }) => Promise<Response>;
2941
+ delete: (path: string, config?: {
2942
+ headers?: HeadersInit;
2943
+ queryParams?: {
2944
+ [key: string]: string;
2945
+ };
2946
+ token?: string;
2947
+ }) => Promise<Response>;
2948
+ hooks?: {
2949
+ beforeRequest?: (config: import("@descope/core-js-sdk").RequestConfig) => import("@descope/core-js-sdk").RequestConfig;
2950
+ afterRequest?: (req: import("@descope/core-js-sdk").RequestConfig, res: Response) => void | Promise<void>;
2951
+ transformResponse?: (mutableResponse: import("@descope/core-js-sdk").ExtendedResponse) => Promise<import("@descope/core-js-sdk").ExtendedResponse>;
2952
+ };
2953
+ buildUrl: (path: string, queryParams?: {
2954
+ [key: string]: string;
2955
+ }) => string;
2956
+ };
2957
+ } | {
2958
+ flow: {
2959
+ start: (flowId: string, options?: Pick<{
2960
+ redirectUrl?: string;
2961
+ location?: string;
2962
+ tenant?: string;
2963
+ deviceInfo?: {
2964
+ webAuthnSupport?: boolean;
2965
+ };
2966
+ lastAuth?: {
2967
+ authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
2968
+ oauthProvider?: string;
2969
+ name?: string;
2970
+ loginId?: string;
2971
+ };
2972
+ redirectAuth?: {
2973
+ callbackUrl: string;
2974
+ codeChallenge: string;
2975
+ };
2976
+ oidcIdpStateId?: string;
2977
+ preview?: boolean;
2978
+ samlIdpStateId?: string;
2979
+ samlIdpUsername?: string;
2980
+ ssoAppId?: string;
2981
+ oidcLoginHint?: string;
2982
+ abTestingKey?: number;
2983
+ startOptionsVersion?: number;
2984
+ client?: Record<string, any>;
2985
+ locale?: string;
2986
+ oidcPrompt?: string;
2987
+ }, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt"> & {
2988
+ lastAuth?: Omit<{
2989
+ authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
2990
+ oauthProvider?: string;
2991
+ name?: string;
2992
+ loginId?: string;
2993
+ }, "loginId" | "name">;
2994
+ }, conditionInteractionId?: string, interactionId?: string, version?: number, componentsVersion?: string, input?: {
2995
+ [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[])[])[])[])[])[])[])[])[])[])[];
2996
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").FlowResponse>>;
2997
+ next: (executionId: string, stepId: string, interactionId: string, version?: number, componentsVersion?: string, input?: {
2998
+ [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[])[])[])[])[])[])[])[])[])[])[];
2999
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").FlowResponse>>;
3000
+ };
3001
+ webauthn: {
3002
+ signUp: ((identifier: string, name: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>) & {
3003
+ start: (loginId: string, origin: string, name: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
3004
+ transactionId: string;
3005
+ options: string;
3006
+ create: boolean;
3007
+ }>>;
3008
+ finish: (transactionId: string, response: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
3009
+ };
3010
+ signIn: ((identifier: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>) & {
3011
+ start: (loginId: string, origin: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
3012
+ transactionId: string;
3013
+ options: string;
3014
+ create: boolean;
3015
+ }>>;
3016
+ finish: (transactionId: string, response: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
3017
+ };
3018
+ signUpOrIn: ((identifier: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>) & {
3019
+ start: (loginId: string, origin: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
3020
+ transactionId: string;
3021
+ options: string;
3022
+ create: boolean;
3023
+ }>>;
3024
+ };
3025
+ update: ((identifier: string, token: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").ResponseData>>) & {
3026
+ start: (loginId: string, origin: string, token: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
3027
+ transactionId: string;
3028
+ options: string;
3029
+ create: boolean;
3030
+ }>>;
3031
+ finish: (transactionId: string, response: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").ResponseData>>;
3032
+ };
3033
+ helpers: {
3034
+ create: (options: string) => Promise<string>;
3035
+ get: (options: string) => Promise<string>;
3036
+ isSupported: (requirePlatformAuthenticator?: boolean) => Promise<boolean>;
3037
+ conditional: (options: string, abort: AbortController) => Promise<string>;
3038
+ };
3039
+ };
3040
+ fedcm: {
3041
+ oneTap(provider?: string, oneTapConfig?: import("@descope/web-js-sdk").OneTapConfig, loginOptions?: import("@descope/core-js-sdk").LoginOptions, onSkip?: () => void): Promise<unknown>;
3042
+ launch(context?: "signin" | "signup" | "use" | "continue"): Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
3043
+ isSupported(): boolean;
3044
+ };
3045
+ accessKey: {
3046
+ exchange: (accessKey: string, loginOptions?: import("@descope/core-js-sdk").AccessKeyLoginOptions) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").ExchangeAccessKeyResponse>>;
3047
+ };
3048
+ otp: {
3049
+ verify: {
3050
+ sms: (loginId: string, code: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
3051
+ voice: (loginId: string, code: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
3052
+ whatsapp: (loginId: string, code: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
3053
+ email: (loginId: string, code: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
3054
+ };
3055
+ signIn: {
3056
+ sms: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
3057
+ maskedPhone: string;
3058
+ }>>;
3059
+ voice: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
3060
+ maskedPhone: string;
3061
+ }>>;
3062
+ whatsapp: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
3063
+ maskedPhone: string;
3064
+ }>>;
3065
+ email: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
3066
+ maskedEmail: string;
3067
+ }>>;
3068
+ };
3069
+ signUp: {
3070
+ sms: (loginId: string, user?: {
3071
+ email?: string;
3072
+ name?: string;
3073
+ givenName?: string;
3074
+ middleName?: string;
3075
+ familyName?: string;
3076
+ phone?: string;
3077
+ }, signUpOptions?: {
3078
+ customClaims?: Record<string, any>;
3079
+ templateOptions?: {
3080
+ [x: string]: string;
3081
+ };
3082
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
3083
+ maskedPhone: string;
3084
+ }>>;
3085
+ voice: (loginId: string, user?: {
3086
+ email?: string;
3087
+ name?: string;
3088
+ givenName?: string;
3089
+ middleName?: string;
3090
+ familyName?: string;
3091
+ phone?: string;
3092
+ }, signUpOptions?: {
3093
+ customClaims?: Record<string, any>;
3094
+ templateOptions?: {
3095
+ [x: string]: string;
3096
+ };
3097
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
3098
+ maskedPhone: string;
3099
+ }>>;
3100
+ whatsapp: (loginId: string, user?: {
3101
+ email?: string;
3102
+ name?: string;
3103
+ givenName?: string;
3104
+ middleName?: string;
3105
+ familyName?: string;
3106
+ phone?: string;
3107
+ }, signUpOptions?: {
3108
+ customClaims?: Record<string, any>;
3109
+ templateOptions?: {
3110
+ [x: string]: string;
3111
+ };
3112
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
3113
+ maskedPhone: string;
3114
+ }>>;
3115
+ email: (loginId: string, user?: {
3116
+ email?: string;
3117
+ name?: string;
3118
+ givenName?: string;
3119
+ middleName?: string;
3120
+ familyName?: string;
3121
+ phone?: string;
3122
+ }, signUpOptions?: {
3123
+ customClaims?: Record<string, any>;
3124
+ templateOptions?: {
3125
+ [x: string]: string;
3126
+ };
3127
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
3128
+ maskedEmail: string;
3129
+ }>>;
3130
+ };
3131
+ signUpOrIn: {
3132
+ sms: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
3133
+ maskedPhone: string;
3134
+ }>>;
3135
+ voice: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
3136
+ maskedPhone: string;
3137
+ }>>;
3138
+ whatsapp: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
3139
+ maskedPhone: string;
3140
+ }>>;
3141
+ email: (loginId: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
3142
+ maskedEmail: string;
3143
+ }>>;
3144
+ };
3145
+ update: {
3146
+ email: <T_5 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
3147
+ addToLoginIDs?: T_5;
3148
+ onMergeUseExisting?: T_5 extends true ? boolean : never;
3149
+ templateOptions?: {
3150
+ [x: string]: string;
3151
+ };
3152
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
3153
+ maskedEmail: string;
3154
+ }>>;
3155
+ phone: {
3156
+ sms: <T_1_3 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
3157
+ addToLoginIDs?: T_1_3;
3158
+ onMergeUseExisting?: T_1_3 extends true ? boolean : never;
3159
+ templateOptions?: {
3160
+ [x: string]: string;
3161
+ };
3162
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
3163
+ maskedPhone: string;
3164
+ }>>;
3165
+ voice: <T_1_4 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
3166
+ addToLoginIDs?: T_1_4;
3167
+ onMergeUseExisting?: T_1_4 extends true ? boolean : never;
3168
+ templateOptions?: {
3169
+ [x: string]: string;
3170
+ };
3171
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
3172
+ maskedPhone: string;
3173
+ }>>;
3174
+ whatsapp: <T_1_5 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
3175
+ addToLoginIDs?: T_1_5;
3176
+ onMergeUseExisting?: T_1_5 extends true ? boolean : never;
3177
+ templateOptions?: {
3178
+ [x: string]: string;
3179
+ };
3180
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
3181
+ maskedPhone: string;
3182
+ }>>;
3183
+ };
3184
+ };
3185
+ };
3186
+ magicLink: {
3187
+ verify: (token: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
3188
+ signIn: {
3189
+ sms: (loginId: string, URI: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
3190
+ maskedPhone: string;
3191
+ }>>;
3192
+ voice: (loginId: string, URI: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
3193
+ maskedPhone: string;
3194
+ }>>;
3195
+ whatsapp: (loginId: string, URI: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
3196
+ maskedPhone: string;
3197
+ }>>;
3198
+ email: (loginId: string, URI: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
3199
+ maskedEmail: string;
3200
+ }>>;
3201
+ };
3202
+ signUp: {
3203
+ sms: (loginId: string, URI: string, user?: {
3204
+ email?: string;
3205
+ name?: string;
3206
+ givenName?: string;
3207
+ middleName?: string;
3208
+ familyName?: string;
3209
+ phone?: string;
3210
+ }, signUpOptions?: {
3211
+ customClaims?: Record<string, any>;
3212
+ templateOptions?: {
3213
+ [x: string]: string;
3214
+ };
3215
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
3216
+ maskedPhone: string;
3217
+ }>>;
3218
+ voice: (loginId: string, URI: string, user?: {
3219
+ email?: string;
3220
+ name?: string;
3221
+ givenName?: string;
3222
+ middleName?: string;
3223
+ familyName?: string;
3224
+ phone?: string;
3225
+ }, signUpOptions?: {
3226
+ customClaims?: Record<string, any>;
3227
+ templateOptions?: {
3228
+ [x: string]: string;
3229
+ };
3230
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
3231
+ maskedPhone: string;
3232
+ }>>;
3233
+ whatsapp: (loginId: string, URI: string, user?: {
3234
+ email?: string;
3235
+ name?: string;
3236
+ givenName?: string;
3237
+ middleName?: string;
3238
+ familyName?: string;
3239
+ phone?: string;
3240
+ }, signUpOptions?: {
3241
+ customClaims?: Record<string, any>;
3242
+ templateOptions?: {
3243
+ [x: string]: string;
3244
+ };
3245
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
3246
+ maskedPhone: string;
3247
+ }>>;
3248
+ email: (loginId: string, URI: string, user?: {
3249
+ email?: string;
3250
+ name?: string;
3251
+ givenName?: string;
3252
+ middleName?: string;
3253
+ familyName?: string;
3254
+ phone?: string;
3255
+ }, signUpOptions?: {
3256
+ customClaims?: Record<string, any>;
3257
+ templateOptions?: {
3258
+ [x: string]: string;
3259
+ };
3260
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
3261
+ maskedEmail: string;
3262
+ }>>;
3263
+ };
3264
+ signUpOrIn: {
3265
+ sms: (loginId: string, URI?: string, signUpOptions?: {
3266
+ customClaims?: Record<string, any>;
3267
+ templateOptions?: {
3268
+ [x: string]: string;
3269
+ };
3270
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
3271
+ maskedPhone: string;
3272
+ }>>;
3273
+ voice: (loginId: string, URI?: string, signUpOptions?: {
3274
+ customClaims?: Record<string, any>;
3275
+ templateOptions?: {
3276
+ [x: string]: string;
3277
+ };
3278
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
3279
+ maskedPhone: string;
3280
+ }>>;
3281
+ whatsapp: (loginId: string, URI?: string, signUpOptions?: {
3282
+ customClaims?: Record<string, any>;
3283
+ templateOptions?: {
3284
+ [x: string]: string;
3285
+ };
3286
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
3287
+ maskedPhone: string;
3288
+ }>>;
3289
+ email: (loginId: string, URI?: string, signUpOptions?: {
3290
+ customClaims?: Record<string, any>;
3291
+ templateOptions?: {
3292
+ [x: string]: string;
3293
+ };
3294
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
3295
+ maskedEmail: string;
3296
+ }>>;
3297
+ };
3298
+ update: {
3299
+ email: <T_2_1 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
3300
+ addToLoginIDs?: T_2_1;
3301
+ onMergeUseExisting?: T_2_1 extends true ? boolean : never;
3302
+ templateOptions?: {
3303
+ [x: string]: string;
3304
+ };
3305
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
3306
+ maskedEmail: string;
3307
+ }>>;
3308
+ phone: {
3309
+ sms: <T_3_3 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
3310
+ addToLoginIDs?: T_3_3;
3311
+ onMergeUseExisting?: T_3_3 extends true ? boolean : never;
3312
+ templateOptions?: {
3313
+ [x: string]: string;
3314
+ };
3315
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
3316
+ maskedPhone: string;
3317
+ }>>;
3318
+ voice: <T_3_4 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
3319
+ addToLoginIDs?: T_3_4;
3320
+ onMergeUseExisting?: T_3_4 extends true ? boolean : never;
3321
+ templateOptions?: {
3322
+ [x: string]: string;
3323
+ };
3324
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
3325
+ maskedPhone: string;
3326
+ }>>;
3327
+ whatsapp: <T_3_5 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
3328
+ addToLoginIDs?: T_3_5;
3329
+ onMergeUseExisting?: T_3_5 extends true ? boolean : never;
3330
+ templateOptions?: {
3331
+ [x: string]: string;
3332
+ };
3333
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
3334
+ maskedPhone: string;
3335
+ }>>;
3336
+ };
3337
+ };
3338
+ };
3339
+ enchantedLink: {
3340
+ verify: (token: string) => Promise<import("@descope/core-js-sdk").SdkResponse<never>>;
3341
+ signIn: (loginId: string, URI?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").EnchantedLinkResponse>>;
3342
+ signUpOrIn: (loginId: string, URI?: string, signUpOptions?: {
3343
+ customClaims?: Record<string, any>;
3344
+ templateOptions?: {
3345
+ [x: string]: string;
3346
+ };
3347
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").EnchantedLinkResponse>>;
3348
+ signUp: (loginId: string, URI?: string, user?: {
3349
+ email?: string;
3350
+ name?: string;
3351
+ givenName?: string;
3352
+ middleName?: string;
3353
+ familyName?: string;
3354
+ phone?: string;
3355
+ }, signUpOptions?: {
3356
+ customClaims?: Record<string, any>;
3357
+ templateOptions?: {
3358
+ [x: string]: string;
3359
+ };
3360
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").EnchantedLinkResponse>>;
3361
+ waitForSession: (pendingRef: string, config?: {
3362
+ pollingIntervalMs: number;
3363
+ timeoutMs: number;
3364
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
3365
+ update: {
3366
+ email: <T_4_1 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
3367
+ addToLoginIDs?: T_4_1;
3368
+ onMergeUseExisting?: T_4_1 extends true ? boolean : never;
3369
+ templateOptions?: {
3370
+ [x: string]: string;
3371
+ };
3372
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").EnchantedLinkResponse>>;
3373
+ };
3374
+ };
3375
+ oauth: {
3376
+ start: ((provider: string, redirectUrl?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").ResponseData>>) & {
3377
+ google: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
3378
+ facebook: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
3379
+ github: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
3380
+ microsoft: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
3381
+ gitlab: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
3382
+ apple: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
3383
+ discord: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
3384
+ linkedin: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
3385
+ slack: (redirectURL?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
3386
+ };
3387
+ exchange: (code: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
3388
+ startNative: (provider: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, implicit?: boolean) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").ResponseData>>;
3389
+ finishNative: (provider: string, stateId: string, user?: string, code?: string, idToken?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").ResponseData>>;
3390
+ };
3391
+ saml: {
3392
+ start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").URLResponse>>;
3393
+ exchange: (code: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
3394
+ };
3395
+ totp: {
3396
+ signUp: (loginId: string, user?: {
3397
+ email?: string;
3398
+ name?: string;
3399
+ givenName?: string;
3400
+ middleName?: string;
3401
+ familyName?: string;
3402
+ phone?: string;
3403
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").TOTPResponse>>;
3404
+ verify: (loginId: string, code: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
3405
+ update: (loginId: string, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").TOTPResponse>>;
3406
+ };
3407
+ notp: {
3408
+ signUpOrIn: (loginId?: string, signUpOptions?: {
3409
+ customClaims?: Record<string, any>;
3410
+ templateOptions?: {
3411
+ [x: string]: string;
3412
+ };
3413
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
3414
+ pendingRef: string;
3415
+ redirectUrl: string;
3416
+ image: string;
3417
+ }>>;
3418
+ signUp: (loginId?: string, user?: {
3419
+ email?: string;
3420
+ name?: string;
3421
+ givenName?: string;
3422
+ middleName?: string;
3423
+ familyName?: string;
3424
+ phone?: string;
3425
+ }, signUpOptions?: {
3426
+ customClaims?: Record<string, any>;
3427
+ templateOptions?: {
3428
+ [x: string]: string;
3429
+ };
3430
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
3431
+ pendingRef: string;
3432
+ redirectUrl: string;
3433
+ image: string;
3434
+ }>>;
3435
+ signIn: (loginId?: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<{
3436
+ pendingRef: string;
3437
+ redirectUrl: string;
3438
+ image: string;
3439
+ }>>;
3440
+ waitForSession: (pendingRef: string, config?: {
3441
+ pollingIntervalMs: number;
3442
+ timeoutMs: number;
3443
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
3444
+ };
3445
+ password: {
3446
+ signUp: (loginId: string, password: string, user?: {
3447
+ email?: string;
3448
+ name?: string;
3449
+ givenName?: string;
3450
+ middleName?: string;
3451
+ familyName?: string;
3452
+ phone?: string;
3453
+ }, signUpOptions?: {
3454
+ customClaims?: Record<string, any>;
3455
+ templateOptions?: {
3456
+ [x: string]: string;
3457
+ };
3458
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
3459
+ signIn: (loginId: string, password: string, loginOptions?: import("@descope/core-js-sdk").LoginOptions) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
3460
+ sendReset: (loginId: string, redirectUrl?: string, templateOptions?: {
3461
+ [x: string]: string;
3462
+ }) => Promise<import("@descope/core-js-sdk").SdkResponse<{
3463
+ resetMethod: string;
3464
+ pendingRef?: string;
3465
+ linkId?: string;
3466
+ maskedEmail: string;
3467
+ }>>;
3468
+ update: (loginId: string, newPassword: string, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<never>>;
3469
+ replace: (loginId: string, oldPassword: string, newPassword: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
3470
+ policy: () => Promise<import("@descope/core-js-sdk").SdkResponse<{
3471
+ minLength: number;
3472
+ lowercase: boolean;
3473
+ uppercase: boolean;
3474
+ number: boolean;
3475
+ nonAlphanumeric: boolean;
3476
+ }>>;
3477
+ };
3478
+ refresh: (token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
3479
+ selectTenant: (tenantId: string, token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").JWTResponse>>;
3480
+ logout: (token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<never>>;
3481
+ logoutAll: (token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<never>>;
3482
+ me: (token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").UserResponse>>;
3483
+ history: (token?: string) => Promise<import("@descope/core-js-sdk").SdkResponse<import("@descope/core-js-sdk").UserHistoryResponse>>;
3484
+ isJwtExpired: (token: string) => boolean;
3485
+ getTenants: (token: string) => string[];
3486
+ getJwtPermissions: (token: string, tenant?: string) => string[];
3487
+ getJwtRoles: (token: string, tenant?: string) => string[];
3488
+ httpClient: {
3489
+ get: (path: string, config?: {
3490
+ headers?: HeadersInit;
3491
+ queryParams?: {
3492
+ [key: string]: string;
3493
+ };
3494
+ token?: string;
3495
+ }) => Promise<Response>;
3496
+ post: (path: string, body?: any, config?: {
3497
+ headers?: HeadersInit;
3498
+ queryParams?: {
3499
+ [key: string]: string;
3500
+ };
3501
+ token?: string;
3502
+ }) => Promise<Response>;
3503
+ patch: (path: string, body?: any, config?: {
3504
+ headers?: HeadersInit;
3505
+ queryParams?: {
3506
+ [key: string]: string;
3507
+ };
3508
+ token?: string;
3509
+ }) => Promise<Response>;
3510
+ put: (path: string, body?: any, config?: {
3511
+ headers?: HeadersInit;
3512
+ queryParams?: {
3513
+ [key: string]: string;
3514
+ };
3515
+ token?: string;
3516
+ }) => Promise<Response>;
3517
+ delete: (path: string, config?: {
3518
+ headers?: HeadersInit;
3519
+ queryParams?: {
3520
+ [key: string]: string;
3521
+ };
3522
+ token?: string;
3523
+ }) => Promise<Response>;
3524
+ hooks?: {
3525
+ beforeRequest?: (config: import("@descope/core-js-sdk").RequestConfig) => import("@descope/core-js-sdk").RequestConfig;
3526
+ afterRequest?: (req: import("@descope/core-js-sdk").RequestConfig, res: Response) => void | Promise<void>;
3527
+ transformResponse?: (mutableResponse: import("@descope/core-js-sdk").ExtendedResponse) => Promise<import("@descope/core-js-sdk").ExtendedResponse>;
3528
+ };
3529
+ buildUrl: (path: string, queryParams?: {
3530
+ [key: string]: string;
3531
+ }) => string;
3532
+ };
3533
+ }) & {
3534
+ onSessionTokenChange: (cb: (data: string) => void) => () => any[];
3535
+ onUserChange: (cb: (data: import("@descope/core-js-sdk").UserResponse) => void) => () => any[];
3536
+ }) & {
3537
+ getLastUserLoginId: () => string;
3538
+ getLastUserDisplayName: () => string;
3539
+ }) & {
3540
+ getRefreshToken: () => string;
3541
+ getSessionToken: () => string;
3542
+ };
3543
+ export default createSdkWrapper;