@descope/react-sdk 2.0.5 → 2.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/examples/app/ManageUsers.d.ts +3 -0
- package/dist/index.d.ts +233 -46
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React, { FC, DOMAttributes } from 'react';
|
|
2
2
|
import DescopeWc, { ILogger, ThemeOptions, AutoFocusOptions } from '@descope/web-component';
|
|
3
3
|
export { ILogger } from '@descope/web-component';
|
|
4
|
+
import UserManagementWidget from '@descope/user-management-widget';
|
|
5
|
+
import * as _descope_web_js_sdk from '@descope/web-js-sdk';
|
|
4
6
|
import * as _descope_core_js_sdk from '@descope/core-js-sdk';
|
|
5
7
|
|
|
6
8
|
interface IAuthProviderProps {
|
|
@@ -135,8 +137,11 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
135
137
|
conditional: (options: string, abort: AbortController) => Promise<string>;
|
|
136
138
|
};
|
|
137
139
|
};
|
|
140
|
+
fedcm: {
|
|
141
|
+
oneTap(provider?: string, oneTapConfig?: _descope_web_js_sdk.OneTapConfig, loginOptions?: _descope_core_js_sdk.LoginOptions, onSkip?: () => void): Promise<unknown>;
|
|
142
|
+
};
|
|
138
143
|
accessKey: {
|
|
139
|
-
exchange: (accessKey: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
|
|
144
|
+
exchange: (accessKey: string, loginOptions?: _descope_core_js_sdk.AccessKeyLoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
|
|
140
145
|
};
|
|
141
146
|
otp: {
|
|
142
147
|
verify: {
|
|
@@ -145,13 +150,13 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
145
150
|
email: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
146
151
|
};
|
|
147
152
|
signIn: {
|
|
148
|
-
sms: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
153
|
+
sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
149
154
|
maskedPhone: string;
|
|
150
155
|
}>>;
|
|
151
|
-
whatsapp: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
156
|
+
whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
152
157
|
maskedPhone: string;
|
|
153
158
|
}>>;
|
|
154
|
-
email: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
159
|
+
email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
155
160
|
maskedEmail: string;
|
|
156
161
|
}>>;
|
|
157
162
|
};
|
|
@@ -163,6 +168,11 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
163
168
|
middleName?: string;
|
|
164
169
|
familyName?: string;
|
|
165
170
|
phone?: string;
|
|
171
|
+
}, signUpOptions?: {
|
|
172
|
+
customClaims?: Record<string, any>;
|
|
173
|
+
templateOptions?: {
|
|
174
|
+
[x: string]: string;
|
|
175
|
+
};
|
|
166
176
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
167
177
|
maskedPhone: string;
|
|
168
178
|
}>>;
|
|
@@ -173,6 +183,11 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
173
183
|
middleName?: string;
|
|
174
184
|
familyName?: string;
|
|
175
185
|
phone?: string;
|
|
186
|
+
}, signUpOptions?: {
|
|
187
|
+
customClaims?: Record<string, any>;
|
|
188
|
+
templateOptions?: {
|
|
189
|
+
[x: string]: string;
|
|
190
|
+
};
|
|
176
191
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
177
192
|
maskedPhone: string;
|
|
178
193
|
}>>;
|
|
@@ -183,18 +198,23 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
183
198
|
middleName?: string;
|
|
184
199
|
familyName?: string;
|
|
185
200
|
phone?: string;
|
|
201
|
+
}, signUpOptions?: {
|
|
202
|
+
customClaims?: Record<string, any>;
|
|
203
|
+
templateOptions?: {
|
|
204
|
+
[x: string]: string;
|
|
205
|
+
};
|
|
186
206
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
187
207
|
maskedEmail: string;
|
|
188
208
|
}>>;
|
|
189
209
|
};
|
|
190
210
|
signUpOrIn: {
|
|
191
|
-
sms: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
211
|
+
sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
192
212
|
maskedPhone: string;
|
|
193
213
|
}>>;
|
|
194
|
-
whatsapp: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
214
|
+
whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
195
215
|
maskedPhone: string;
|
|
196
216
|
}>>;
|
|
197
|
-
email: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
217
|
+
email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
198
218
|
maskedEmail: string;
|
|
199
219
|
}>>;
|
|
200
220
|
};
|
|
@@ -202,6 +222,9 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
202
222
|
email: <T extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
|
|
203
223
|
addToLoginIDs?: T;
|
|
204
224
|
onMergeUseExisting?: T extends true ? boolean : never;
|
|
225
|
+
templateOptions?: {
|
|
226
|
+
[x: string]: string;
|
|
227
|
+
};
|
|
205
228
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
206
229
|
maskedEmail: string;
|
|
207
230
|
}>>;
|
|
@@ -209,12 +232,18 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
209
232
|
sms: <T_1 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
210
233
|
addToLoginIDs?: T_1;
|
|
211
234
|
onMergeUseExisting?: T_1 extends true ? boolean : never;
|
|
235
|
+
templateOptions?: {
|
|
236
|
+
[x: string]: string;
|
|
237
|
+
};
|
|
212
238
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
213
239
|
maskedPhone: string;
|
|
214
240
|
}>>;
|
|
215
241
|
whatsapp: <T_1_1 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
216
242
|
addToLoginIDs?: T_1_1;
|
|
217
243
|
onMergeUseExisting?: T_1_1 extends true ? boolean : never;
|
|
244
|
+
templateOptions?: {
|
|
245
|
+
[x: string]: string;
|
|
246
|
+
};
|
|
218
247
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
219
248
|
maskedPhone: string;
|
|
220
249
|
}>>;
|
|
@@ -224,56 +253,86 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
224
253
|
magicLink: {
|
|
225
254
|
verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
226
255
|
signIn: {
|
|
227
|
-
sms: (loginId: string,
|
|
256
|
+
sms: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
228
257
|
maskedPhone: string;
|
|
229
258
|
}>>;
|
|
230
|
-
whatsapp: (loginId: string,
|
|
259
|
+
whatsapp: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
231
260
|
maskedPhone: string;
|
|
232
261
|
}>>;
|
|
233
|
-
email: (loginId: string,
|
|
262
|
+
email: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
234
263
|
maskedEmail: string;
|
|
235
264
|
}>>;
|
|
236
265
|
};
|
|
237
266
|
signUp: {
|
|
238
|
-
sms: (loginId: string,
|
|
267
|
+
sms: (loginId: string, URI: string, user?: {
|
|
239
268
|
email?: string;
|
|
240
269
|
name?: string;
|
|
241
270
|
givenName?: string;
|
|
242
271
|
middleName?: string;
|
|
243
272
|
familyName?: string;
|
|
244
273
|
phone?: string;
|
|
274
|
+
}, signUpOptions?: {
|
|
275
|
+
customClaims?: Record<string, any>;
|
|
276
|
+
templateOptions?: {
|
|
277
|
+
[x: string]: string;
|
|
278
|
+
};
|
|
245
279
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
246
280
|
maskedPhone: string;
|
|
247
281
|
}>>;
|
|
248
|
-
whatsapp: (loginId: string,
|
|
282
|
+
whatsapp: (loginId: string, URI: string, user?: {
|
|
249
283
|
email?: string;
|
|
250
284
|
name?: string;
|
|
251
285
|
givenName?: string;
|
|
252
286
|
middleName?: string;
|
|
253
287
|
familyName?: string;
|
|
254
288
|
phone?: string;
|
|
289
|
+
}, signUpOptions?: {
|
|
290
|
+
customClaims?: Record<string, any>;
|
|
291
|
+
templateOptions?: {
|
|
292
|
+
[x: string]: string;
|
|
293
|
+
};
|
|
255
294
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
256
295
|
maskedPhone: string;
|
|
257
296
|
}>>;
|
|
258
|
-
email: (loginId: string,
|
|
297
|
+
email: (loginId: string, URI: string, user?: {
|
|
259
298
|
email?: string;
|
|
260
299
|
name?: string;
|
|
261
300
|
givenName?: string;
|
|
262
301
|
middleName?: string;
|
|
263
302
|
familyName?: string;
|
|
264
303
|
phone?: string;
|
|
304
|
+
}, signUpOptions?: {
|
|
305
|
+
customClaims?: Record<string, any>;
|
|
306
|
+
templateOptions?: {
|
|
307
|
+
[x: string]: string;
|
|
308
|
+
};
|
|
265
309
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
266
310
|
maskedEmail: string;
|
|
267
311
|
}>>;
|
|
268
312
|
};
|
|
269
313
|
signUpOrIn: {
|
|
270
|
-
sms: (loginId: string,
|
|
314
|
+
sms: (loginId: string, URI?: string, signUpOptions?: {
|
|
315
|
+
customClaims?: Record<string, any>;
|
|
316
|
+
templateOptions?: {
|
|
317
|
+
[x: string]: string;
|
|
318
|
+
};
|
|
319
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
271
320
|
maskedPhone: string;
|
|
272
321
|
}>>;
|
|
273
|
-
whatsapp: (loginId: string,
|
|
322
|
+
whatsapp: (loginId: string, URI?: string, signUpOptions?: {
|
|
323
|
+
customClaims?: Record<string, any>;
|
|
324
|
+
templateOptions?: {
|
|
325
|
+
[x: string]: string;
|
|
326
|
+
};
|
|
327
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
274
328
|
maskedPhone: string;
|
|
275
329
|
}>>;
|
|
276
|
-
email: (loginId: string,
|
|
330
|
+
email: (loginId: string, URI?: string, signUpOptions?: {
|
|
331
|
+
customClaims?: Record<string, any>;
|
|
332
|
+
templateOptions?: {
|
|
333
|
+
[x: string]: string;
|
|
334
|
+
};
|
|
335
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
277
336
|
maskedEmail: string;
|
|
278
337
|
}>>;
|
|
279
338
|
};
|
|
@@ -281,6 +340,9 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
281
340
|
email: <T_2 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
282
341
|
addToLoginIDs?: T_2;
|
|
283
342
|
onMergeUseExisting?: T_2 extends true ? boolean : never;
|
|
343
|
+
templateOptions?: {
|
|
344
|
+
[x: string]: string;
|
|
345
|
+
};
|
|
284
346
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
285
347
|
maskedEmail: string;
|
|
286
348
|
}>>;
|
|
@@ -288,12 +350,18 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
288
350
|
sms: <T_3 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
289
351
|
addToLoginIDs?: T_3;
|
|
290
352
|
onMergeUseExisting?: T_3 extends true ? boolean : never;
|
|
353
|
+
templateOptions?: {
|
|
354
|
+
[x: string]: string;
|
|
355
|
+
};
|
|
291
356
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
292
357
|
maskedPhone: string;
|
|
293
358
|
}>>;
|
|
294
359
|
whatsapp: <T_3_1 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
295
360
|
addToLoginIDs?: T_3_1;
|
|
296
361
|
onMergeUseExisting?: T_3_1 extends true ? boolean : never;
|
|
362
|
+
templateOptions?: {
|
|
363
|
+
[x: string]: string;
|
|
364
|
+
};
|
|
297
365
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
298
366
|
maskedPhone: string;
|
|
299
367
|
}>>;
|
|
@@ -302,15 +370,25 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
302
370
|
};
|
|
303
371
|
enchantedLink: {
|
|
304
372
|
verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
305
|
-
signIn: (loginId: string,
|
|
306
|
-
signUpOrIn: (loginId: string,
|
|
307
|
-
|
|
373
|
+
signIn: (loginId: string, URI?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
374
|
+
signUpOrIn: (loginId: string, URI?: string, signUpOptions?: {
|
|
375
|
+
customClaims?: Record<string, any>;
|
|
376
|
+
templateOptions?: {
|
|
377
|
+
[x: string]: string;
|
|
378
|
+
};
|
|
379
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
380
|
+
signUp: (loginId: string, URI?: string, user?: {
|
|
308
381
|
email?: string;
|
|
309
382
|
name?: string;
|
|
310
383
|
givenName?: string;
|
|
311
384
|
middleName?: string;
|
|
312
385
|
familyName?: string;
|
|
313
386
|
phone?: string;
|
|
387
|
+
}, signUpOptions?: {
|
|
388
|
+
customClaims?: Record<string, any>;
|
|
389
|
+
templateOptions?: {
|
|
390
|
+
[x: string]: string;
|
|
391
|
+
};
|
|
314
392
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
315
393
|
waitForSession: (pendingRef: string, config?: {
|
|
316
394
|
pollingIntervalMs: number;
|
|
@@ -320,14 +398,17 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
320
398
|
email: <T_4 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
321
399
|
addToLoginIDs?: T_4;
|
|
322
400
|
onMergeUseExisting?: T_4 extends true ? boolean : never;
|
|
401
|
+
templateOptions?: {
|
|
402
|
+
[x: string]: string;
|
|
403
|
+
};
|
|
323
404
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
324
405
|
};
|
|
325
406
|
};
|
|
326
407
|
oauth: {
|
|
327
408
|
start: ((provider: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>) & {
|
|
409
|
+
google: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
328
410
|
facebook: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
329
411
|
github: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
330
|
-
google: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
331
412
|
microsoft: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
332
413
|
gitlab: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
333
414
|
apple: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
@@ -336,6 +417,8 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
336
417
|
slack: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
337
418
|
};
|
|
338
419
|
exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
420
|
+
startNative: (provider: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
421
|
+
finishNative: (provider: string, stateId: string, user?: string, code?: string, idToken?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
339
422
|
};
|
|
340
423
|
saml: {
|
|
341
424
|
start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
@@ -363,7 +446,9 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
363
446
|
phone?: string;
|
|
364
447
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
365
448
|
signIn: (loginId: string, password: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
366
|
-
sendReset: (loginId: string, redirectUrl?: string
|
|
449
|
+
sendReset: (loginId: string, redirectUrl?: string, templateOptions?: {
|
|
450
|
+
[x: string]: string;
|
|
451
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
367
452
|
resetMethod: string;
|
|
368
453
|
pendingRef?: string;
|
|
369
454
|
linkId?: string;
|
|
@@ -384,6 +469,7 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
384
469
|
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
385
470
|
logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
386
471
|
me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
|
|
472
|
+
history: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserHistoryResponse>>;
|
|
387
473
|
isJwtExpired: (token: string) => boolean;
|
|
388
474
|
getTenants: (token: string) => string[];
|
|
389
475
|
getJwtPermissions: (token: string, tenant?: string) => string[];
|
|
@@ -503,8 +589,11 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
503
589
|
conditional: (options: string, abort: AbortController) => Promise<string>;
|
|
504
590
|
};
|
|
505
591
|
};
|
|
592
|
+
fedcm: {
|
|
593
|
+
oneTap(provider?: string, oneTapConfig?: _descope_web_js_sdk.OneTapConfig, loginOptions?: _descope_core_js_sdk.LoginOptions, onSkip?: () => void): Promise<unknown>;
|
|
594
|
+
};
|
|
506
595
|
accessKey: {
|
|
507
|
-
exchange: (accessKey: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
|
|
596
|
+
exchange: (accessKey: string, loginOptions?: _descope_core_js_sdk.AccessKeyLoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ExchangeAccessKeyResponse>>;
|
|
508
597
|
};
|
|
509
598
|
otp: {
|
|
510
599
|
verify: {
|
|
@@ -513,13 +602,13 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
513
602
|
email: (loginId: string, code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
514
603
|
};
|
|
515
604
|
signIn: {
|
|
516
|
-
sms: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
605
|
+
sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
517
606
|
maskedPhone: string;
|
|
518
607
|
}>>;
|
|
519
|
-
whatsapp: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
608
|
+
whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
520
609
|
maskedPhone: string;
|
|
521
610
|
}>>;
|
|
522
|
-
email: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
611
|
+
email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
523
612
|
maskedEmail: string;
|
|
524
613
|
}>>;
|
|
525
614
|
};
|
|
@@ -531,6 +620,11 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
531
620
|
middleName?: string;
|
|
532
621
|
familyName?: string;
|
|
533
622
|
phone?: string;
|
|
623
|
+
}, signUpOptions?: {
|
|
624
|
+
customClaims?: Record<string, any>;
|
|
625
|
+
templateOptions?: {
|
|
626
|
+
[x: string]: string;
|
|
627
|
+
};
|
|
534
628
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
535
629
|
maskedPhone: string;
|
|
536
630
|
}>>;
|
|
@@ -541,6 +635,11 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
541
635
|
middleName?: string;
|
|
542
636
|
familyName?: string;
|
|
543
637
|
phone?: string;
|
|
638
|
+
}, signUpOptions?: {
|
|
639
|
+
customClaims?: Record<string, any>;
|
|
640
|
+
templateOptions?: {
|
|
641
|
+
[x: string]: string;
|
|
642
|
+
};
|
|
544
643
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
545
644
|
maskedPhone: string;
|
|
546
645
|
}>>;
|
|
@@ -551,18 +650,23 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
551
650
|
middleName?: string;
|
|
552
651
|
familyName?: string;
|
|
553
652
|
phone?: string;
|
|
653
|
+
}, signUpOptions?: {
|
|
654
|
+
customClaims?: Record<string, any>;
|
|
655
|
+
templateOptions?: {
|
|
656
|
+
[x: string]: string;
|
|
657
|
+
};
|
|
554
658
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
555
659
|
maskedEmail: string;
|
|
556
660
|
}>>;
|
|
557
661
|
};
|
|
558
662
|
signUpOrIn: {
|
|
559
|
-
sms: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
663
|
+
sms: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
560
664
|
maskedPhone: string;
|
|
561
665
|
}>>;
|
|
562
|
-
whatsapp: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
666
|
+
whatsapp: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
563
667
|
maskedPhone: string;
|
|
564
668
|
}>>;
|
|
565
|
-
email: (loginId: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
669
|
+
email: (loginId: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
566
670
|
maskedEmail: string;
|
|
567
671
|
}>>;
|
|
568
672
|
};
|
|
@@ -570,6 +674,9 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
570
674
|
email: <T_5 extends boolean>(loginId: string, email: string, token?: string, updateOptions?: {
|
|
571
675
|
addToLoginIDs?: T_5;
|
|
572
676
|
onMergeUseExisting?: T_5 extends true ? boolean : never;
|
|
677
|
+
templateOptions?: {
|
|
678
|
+
[x: string]: string;
|
|
679
|
+
};
|
|
573
680
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
574
681
|
maskedEmail: string;
|
|
575
682
|
}>>;
|
|
@@ -577,12 +684,18 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
577
684
|
sms: <T_1_2 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
578
685
|
addToLoginIDs?: T_1_2;
|
|
579
686
|
onMergeUseExisting?: T_1_2 extends true ? boolean : never;
|
|
687
|
+
templateOptions?: {
|
|
688
|
+
[x: string]: string;
|
|
689
|
+
};
|
|
580
690
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
581
691
|
maskedPhone: string;
|
|
582
692
|
}>>;
|
|
583
693
|
whatsapp: <T_1_3 extends boolean>(loginId: string, phone: string, token?: string, updateOptions?: {
|
|
584
694
|
addToLoginIDs?: T_1_3;
|
|
585
695
|
onMergeUseExisting?: T_1_3 extends true ? boolean : never;
|
|
696
|
+
templateOptions?: {
|
|
697
|
+
[x: string]: string;
|
|
698
|
+
};
|
|
586
699
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
587
700
|
maskedPhone: string;
|
|
588
701
|
}>>;
|
|
@@ -592,56 +705,86 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
592
705
|
magicLink: {
|
|
593
706
|
verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
594
707
|
signIn: {
|
|
595
|
-
sms: (loginId: string,
|
|
708
|
+
sms: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
596
709
|
maskedPhone: string;
|
|
597
710
|
}>>;
|
|
598
|
-
whatsapp: (loginId: string,
|
|
711
|
+
whatsapp: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
599
712
|
maskedPhone: string;
|
|
600
713
|
}>>;
|
|
601
|
-
email: (loginId: string,
|
|
714
|
+
email: (loginId: string, URI: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
602
715
|
maskedEmail: string;
|
|
603
716
|
}>>;
|
|
604
717
|
};
|
|
605
718
|
signUp: {
|
|
606
|
-
sms: (loginId: string,
|
|
719
|
+
sms: (loginId: string, URI: string, user?: {
|
|
607
720
|
email?: string;
|
|
608
721
|
name?: string;
|
|
609
722
|
givenName?: string;
|
|
610
723
|
middleName?: string;
|
|
611
724
|
familyName?: string;
|
|
612
725
|
phone?: string;
|
|
726
|
+
}, signUpOptions?: {
|
|
727
|
+
customClaims?: Record<string, any>;
|
|
728
|
+
templateOptions?: {
|
|
729
|
+
[x: string]: string;
|
|
730
|
+
};
|
|
613
731
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
614
732
|
maskedPhone: string;
|
|
615
733
|
}>>;
|
|
616
|
-
whatsapp: (loginId: string,
|
|
734
|
+
whatsapp: (loginId: string, URI: string, user?: {
|
|
617
735
|
email?: string;
|
|
618
736
|
name?: string;
|
|
619
737
|
givenName?: string;
|
|
620
738
|
middleName?: string;
|
|
621
739
|
familyName?: string;
|
|
622
740
|
phone?: string;
|
|
741
|
+
}, signUpOptions?: {
|
|
742
|
+
customClaims?: Record<string, any>;
|
|
743
|
+
templateOptions?: {
|
|
744
|
+
[x: string]: string;
|
|
745
|
+
};
|
|
623
746
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
624
747
|
maskedPhone: string;
|
|
625
748
|
}>>;
|
|
626
|
-
email: (loginId: string,
|
|
749
|
+
email: (loginId: string, URI: string, user?: {
|
|
627
750
|
email?: string;
|
|
628
751
|
name?: string;
|
|
629
752
|
givenName?: string;
|
|
630
753
|
middleName?: string;
|
|
631
754
|
familyName?: string;
|
|
632
755
|
phone?: string;
|
|
756
|
+
}, signUpOptions?: {
|
|
757
|
+
customClaims?: Record<string, any>;
|
|
758
|
+
templateOptions?: {
|
|
759
|
+
[x: string]: string;
|
|
760
|
+
};
|
|
633
761
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
634
762
|
maskedEmail: string;
|
|
635
763
|
}>>;
|
|
636
764
|
};
|
|
637
765
|
signUpOrIn: {
|
|
638
|
-
sms: (loginId: string,
|
|
766
|
+
sms: (loginId: string, URI?: string, signUpOptions?: {
|
|
767
|
+
customClaims?: Record<string, any>;
|
|
768
|
+
templateOptions?: {
|
|
769
|
+
[x: string]: string;
|
|
770
|
+
};
|
|
771
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
639
772
|
maskedPhone: string;
|
|
640
773
|
}>>;
|
|
641
|
-
whatsapp: (loginId: string,
|
|
774
|
+
whatsapp: (loginId: string, URI?: string, signUpOptions?: {
|
|
775
|
+
customClaims?: Record<string, any>;
|
|
776
|
+
templateOptions?: {
|
|
777
|
+
[x: string]: string;
|
|
778
|
+
};
|
|
779
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
642
780
|
maskedPhone: string;
|
|
643
781
|
}>>;
|
|
644
|
-
email: (loginId: string,
|
|
782
|
+
email: (loginId: string, URI?: string, signUpOptions?: {
|
|
783
|
+
customClaims?: Record<string, any>;
|
|
784
|
+
templateOptions?: {
|
|
785
|
+
[x: string]: string;
|
|
786
|
+
};
|
|
787
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
645
788
|
maskedEmail: string;
|
|
646
789
|
}>>;
|
|
647
790
|
};
|
|
@@ -649,6 +792,9 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
649
792
|
email: <T_2_1 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
650
793
|
addToLoginIDs?: T_2_1;
|
|
651
794
|
onMergeUseExisting?: T_2_1 extends true ? boolean : never;
|
|
795
|
+
templateOptions?: {
|
|
796
|
+
[x: string]: string;
|
|
797
|
+
};
|
|
652
798
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
653
799
|
maskedEmail: string;
|
|
654
800
|
}>>;
|
|
@@ -656,12 +802,18 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
656
802
|
sms: <T_3_2 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
657
803
|
addToLoginIDs?: T_3_2;
|
|
658
804
|
onMergeUseExisting?: T_3_2 extends true ? boolean : never;
|
|
805
|
+
templateOptions?: {
|
|
806
|
+
[x: string]: string;
|
|
807
|
+
};
|
|
659
808
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
660
809
|
maskedPhone: string;
|
|
661
810
|
}>>;
|
|
662
811
|
whatsapp: <T_3_3 extends boolean>(loginId: string, phone: string, URI?: string, token?: string, updateOptions?: {
|
|
663
812
|
addToLoginIDs?: T_3_3;
|
|
664
813
|
onMergeUseExisting?: T_3_3 extends true ? boolean : never;
|
|
814
|
+
templateOptions?: {
|
|
815
|
+
[x: string]: string;
|
|
816
|
+
};
|
|
665
817
|
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
666
818
|
maskedPhone: string;
|
|
667
819
|
}>>;
|
|
@@ -670,15 +822,25 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
670
822
|
};
|
|
671
823
|
enchantedLink: {
|
|
672
824
|
verify: (token: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
673
|
-
signIn: (loginId: string,
|
|
674
|
-
signUpOrIn: (loginId: string,
|
|
675
|
-
|
|
825
|
+
signIn: (loginId: string, URI?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
826
|
+
signUpOrIn: (loginId: string, URI?: string, signUpOptions?: {
|
|
827
|
+
customClaims?: Record<string, any>;
|
|
828
|
+
templateOptions?: {
|
|
829
|
+
[x: string]: string;
|
|
830
|
+
};
|
|
831
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
832
|
+
signUp: (loginId: string, URI?: string, user?: {
|
|
676
833
|
email?: string;
|
|
677
834
|
name?: string;
|
|
678
835
|
givenName?: string;
|
|
679
836
|
middleName?: string;
|
|
680
837
|
familyName?: string;
|
|
681
838
|
phone?: string;
|
|
839
|
+
}, signUpOptions?: {
|
|
840
|
+
customClaims?: Record<string, any>;
|
|
841
|
+
templateOptions?: {
|
|
842
|
+
[x: string]: string;
|
|
843
|
+
};
|
|
682
844
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
683
845
|
waitForSession: (pendingRef: string, config?: {
|
|
684
846
|
pollingIntervalMs: number;
|
|
@@ -688,14 +850,17 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
688
850
|
email: <T_4_1 extends boolean>(loginId: string, email: string, URI?: string, token?: string, updateOptions?: {
|
|
689
851
|
addToLoginIDs?: T_4_1;
|
|
690
852
|
onMergeUseExisting?: T_4_1 extends true ? boolean : never;
|
|
853
|
+
templateOptions?: {
|
|
854
|
+
[x: string]: string;
|
|
855
|
+
};
|
|
691
856
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.EnchantedLinkResponse>>;
|
|
692
857
|
};
|
|
693
858
|
};
|
|
694
859
|
oauth: {
|
|
695
860
|
start: ((provider: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>) & {
|
|
861
|
+
google: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
696
862
|
facebook: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
697
863
|
github: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
698
|
-
google: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
699
864
|
microsoft: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
700
865
|
gitlab: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
701
866
|
apple: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
@@ -704,6 +869,8 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
704
869
|
slack: (redirectURL?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
705
870
|
};
|
|
706
871
|
exchange: (code: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
872
|
+
startNative: (provider: string, loginOptions?: _descope_core_js_sdk.LoginOptions) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
873
|
+
finishNative: (provider: string, stateId: string, user?: string, code?: string, idToken?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.ResponseData>>;
|
|
707
874
|
};
|
|
708
875
|
saml: {
|
|
709
876
|
start: (tenantIdOrEmail: string, redirectUrl?: string, loginOptions?: _descope_core_js_sdk.LoginOptions, token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.URLResponse>>;
|
|
@@ -731,7 +898,9 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
731
898
|
phone?: string;
|
|
732
899
|
}) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
733
900
|
signIn: (loginId: string, password: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.JWTResponse>>;
|
|
734
|
-
sendReset: (loginId: string, redirectUrl?: string
|
|
901
|
+
sendReset: (loginId: string, redirectUrl?: string, templateOptions?: {
|
|
902
|
+
[x: string]: string;
|
|
903
|
+
}) => Promise<_descope_core_js_sdk.SdkResponse<{
|
|
735
904
|
resetMethod: string;
|
|
736
905
|
pendingRef?: string;
|
|
737
906
|
linkId?: string;
|
|
@@ -752,6 +921,7 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
752
921
|
logout: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
753
922
|
logoutAll: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<never>>;
|
|
754
923
|
me: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserResponse>>;
|
|
924
|
+
history: (token?: string) => Promise<_descope_core_js_sdk.SdkResponse<_descope_core_js_sdk.UserHistoryResponse>>;
|
|
755
925
|
isJwtExpired: (token: string) => boolean;
|
|
756
926
|
getTenants: (token: string) => string[];
|
|
757
927
|
getJwtPermissions: (token: string, tenant?: string) => string[];
|
|
@@ -810,6 +980,7 @@ declare global {
|
|
|
810
980
|
namespace JSX {
|
|
811
981
|
interface IntrinsicElements {
|
|
812
982
|
['descope-wc']: DescopeCustomElement;
|
|
983
|
+
['descope-user-management-widget']: UserManagementCustomElement;
|
|
813
984
|
}
|
|
814
985
|
}
|
|
815
986
|
}
|
|
@@ -821,11 +992,13 @@ type CustomElement<T, K extends string = ''> = Partial<T & DOMAttributes<T> & {
|
|
|
821
992
|
children: React.ReactChild;
|
|
822
993
|
ref: React.Ref<HTMLElement>;
|
|
823
994
|
} & CustomEvents<`on${K}`>>;
|
|
824
|
-
type DescopeCustomElement = CustomElement<DescopeWc, 'success' | 'error'>;
|
|
825
|
-
|
|
995
|
+
type DescopeCustomElement = CustomElement<DescopeWc, 'success' | 'error' | 'ready'>;
|
|
996
|
+
type UserManagementCustomElement = CustomElement<typeof UserManagementWidget & UserManagementProps>;
|
|
997
|
+
type DescopeProps = {
|
|
826
998
|
flowId: string;
|
|
827
999
|
onSuccess?: DescopeCustomElement['onsuccess'];
|
|
828
1000
|
onError?: DescopeCustomElement['onerror'];
|
|
1001
|
+
onReady?: DescopeCustomElement['onready'];
|
|
829
1002
|
logger?: ILogger;
|
|
830
1003
|
tenant?: string;
|
|
831
1004
|
theme?: ThemeOptions;
|
|
@@ -840,7 +1013,14 @@ interface DescopeProps {
|
|
|
840
1013
|
}) => string;
|
|
841
1014
|
form?: Record<string, any>;
|
|
842
1015
|
client?: Record<string, any>;
|
|
843
|
-
}
|
|
1016
|
+
};
|
|
1017
|
+
type UserManagementProps = {
|
|
1018
|
+
logger?: ILogger;
|
|
1019
|
+
tenant: string;
|
|
1020
|
+
widgetId: string;
|
|
1021
|
+
theme?: ThemeOptions;
|
|
1022
|
+
debug?: boolean;
|
|
1023
|
+
};
|
|
844
1024
|
|
|
845
1025
|
type DefaultFlowProps = Omit<DescopeProps, 'flowId'>;
|
|
846
1026
|
|
|
@@ -850,6 +1030,8 @@ declare const SignUpOrInFlow: (props: DefaultFlowProps) => React.JSX.Element;
|
|
|
850
1030
|
|
|
851
1031
|
declare const Descope: React.ForwardRefExoticComponent<DescopeProps & React.RefAttributes<HTMLElement>>;
|
|
852
1032
|
|
|
1033
|
+
declare const UserManagement: React.ForwardRefExoticComponent<UserManagementProps & React.RefAttributes<HTMLElement>>;
|
|
1034
|
+
|
|
853
1035
|
declare const useDescope: () => Sdk;
|
|
854
1036
|
|
|
855
1037
|
declare const useSession: () => {
|
|
@@ -863,4 +1045,9 @@ declare const useUser: () => {
|
|
|
863
1045
|
user: _descope_core_js_sdk.UserResponse;
|
|
864
1046
|
};
|
|
865
1047
|
|
|
866
|
-
|
|
1048
|
+
declare const baseHeaders: {
|
|
1049
|
+
'x-descope-sdk-name': string;
|
|
1050
|
+
'x-descope-sdk-version': string;
|
|
1051
|
+
};
|
|
1052
|
+
|
|
1053
|
+
export { AuthProvider, Descope, SignInFlow, SignUpFlow, SignUpOrInFlow, UserManagement, baseHeaders, getJwtPermissions, getJwtRoles, getRefreshToken, getSessionToken, refresh, useDescope, useSession, useUser };
|