@descope/react-sdk 2.18.0 → 2.18.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/constants.js +1 -1
- package/dist/esm/constants.js +1 -1
- package/dist/index.d.ts +6 -144
- package/dist/index.umd.js +2 -3
- package/dist/index.umd.js.map +1 -1
- package/dist/types/sdk.d.ts +12 -414
- package/package.json +11 -11
package/dist/types/sdk.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as _1 from '@descope/core-js-sdk';
|
|
2
2
|
import type * as _2 from 'oidc-client-ts';
|
|
3
|
-
declare const createSdkWrapper: <P extends
|
|
3
|
+
declare const createSdkWrapper: <P extends {
|
|
4
4
|
projectId: string;
|
|
5
5
|
logger?: {
|
|
6
6
|
error: {
|
|
@@ -22,20 +22,14 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
22
22
|
};
|
|
23
23
|
baseUrl?: string;
|
|
24
24
|
hooks?: {
|
|
25
|
-
beforeRequest?: (config: _1.RequestConfig) => _1.RequestConfig;
|
|
26
|
-
afterRequest?: (req: _1.RequestConfig, res: Response) => void | Promise<void
|
|
25
|
+
beforeRequest?: ((config: _1.RequestConfig) => _1.RequestConfig) | ((config: _1.RequestConfig) => _1.RequestConfig)[];
|
|
26
|
+
afterRequest?: ((req: _1.RequestConfig, res: Response) => void | Promise<void>) | ((req: _1.RequestConfig, res: Response) => void | Promise<void>)[];
|
|
27
27
|
transformResponse?: (mutableResponse: _1.ExtendedResponse) => Promise<_1.ExtendedResponse>;
|
|
28
28
|
};
|
|
29
29
|
cookiePolicy?: RequestCredentials;
|
|
30
30
|
baseHeaders?: HeadersInit;
|
|
31
31
|
refreshCookieName?: string;
|
|
32
32
|
fetch?: typeof fetch;
|
|
33
|
-
}, "hooks"> & {
|
|
34
|
-
hooks?: {
|
|
35
|
-
beforeRequest?: ((config: _1.RequestConfig) => _1.RequestConfig) | ((config: _1.RequestConfig) => _1.RequestConfig)[];
|
|
36
|
-
afterRequest?: ((req: _1.RequestConfig, res: Response) => void | Promise<void>) | ((req: _1.RequestConfig, res: Response) => void | Promise<void>)[];
|
|
37
|
-
transformResponse?: (mutableResponse: _1.ExtendedResponse) => Promise<_1.ExtendedResponse>;
|
|
38
|
-
};
|
|
39
33
|
} & {
|
|
40
34
|
oidcConfig?: import("@descope/web-js-sdk").OidcConfig;
|
|
41
35
|
getExternalToken?: () => Promise<string>;
|
|
@@ -679,51 +673,7 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
679
673
|
getJwtPermissions: (token: string, tenant?: string) => string[];
|
|
680
674
|
getJwtRoles: (token: string, tenant?: string) => string[];
|
|
681
675
|
getCurrentTenant: (token: string) => string;
|
|
682
|
-
httpClient:
|
|
683
|
-
get: (path: string, config?: {
|
|
684
|
-
headers?: HeadersInit;
|
|
685
|
-
queryParams?: {
|
|
686
|
-
[key: string]: string;
|
|
687
|
-
};
|
|
688
|
-
token?: string;
|
|
689
|
-
}) => Promise<Response>;
|
|
690
|
-
post: (path: string, body?: any, config?: {
|
|
691
|
-
headers?: HeadersInit;
|
|
692
|
-
queryParams?: {
|
|
693
|
-
[key: string]: string;
|
|
694
|
-
};
|
|
695
|
-
token?: string;
|
|
696
|
-
}) => Promise<Response>;
|
|
697
|
-
patch: (path: string, body?: any, config?: {
|
|
698
|
-
headers?: HeadersInit;
|
|
699
|
-
queryParams?: {
|
|
700
|
-
[key: string]: string;
|
|
701
|
-
};
|
|
702
|
-
token?: string;
|
|
703
|
-
}) => Promise<Response>;
|
|
704
|
-
put: (path: string, body?: any, config?: {
|
|
705
|
-
headers?: HeadersInit;
|
|
706
|
-
queryParams?: {
|
|
707
|
-
[key: string]: string;
|
|
708
|
-
};
|
|
709
|
-
token?: string;
|
|
710
|
-
}) => Promise<Response>;
|
|
711
|
-
delete: (path: string, config?: {
|
|
712
|
-
headers?: HeadersInit;
|
|
713
|
-
queryParams?: {
|
|
714
|
-
[key: string]: string;
|
|
715
|
-
};
|
|
716
|
-
token?: string;
|
|
717
|
-
}) => Promise<Response>;
|
|
718
|
-
hooks?: {
|
|
719
|
-
beforeRequest?: (config: _1.RequestConfig) => _1.RequestConfig;
|
|
720
|
-
afterRequest?: (req: _1.RequestConfig, res: Response) => void | Promise<void>;
|
|
721
|
-
transformResponse?: (mutableResponse: _1.ExtendedResponse) => Promise<_1.ExtendedResponse>;
|
|
722
|
-
};
|
|
723
|
-
buildUrl: (path: string, queryParams?: {
|
|
724
|
-
[key: string]: string;
|
|
725
|
-
}) => string;
|
|
726
|
-
};
|
|
676
|
+
httpClient: _1.HttpClient;
|
|
727
677
|
} | {
|
|
728
678
|
refresh: (token?: string) => Promise<_1.SdkResponse<_1.JWTResponse>>;
|
|
729
679
|
logout: (token?: string) => Promise<_1.SdkResponse<never>>;
|
|
@@ -1351,51 +1301,7 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
1351
1301
|
getJwtPermissions: (token: string, tenant?: string) => string[];
|
|
1352
1302
|
getJwtRoles: (token: string, tenant?: string) => string[];
|
|
1353
1303
|
getCurrentTenant: (token: string) => string;
|
|
1354
|
-
httpClient:
|
|
1355
|
-
get: (path: string, config?: {
|
|
1356
|
-
headers?: HeadersInit;
|
|
1357
|
-
queryParams?: {
|
|
1358
|
-
[key: string]: string;
|
|
1359
|
-
};
|
|
1360
|
-
token?: string;
|
|
1361
|
-
}) => Promise<Response>;
|
|
1362
|
-
post: (path: string, body?: any, config?: {
|
|
1363
|
-
headers?: HeadersInit;
|
|
1364
|
-
queryParams?: {
|
|
1365
|
-
[key: string]: string;
|
|
1366
|
-
};
|
|
1367
|
-
token?: string;
|
|
1368
|
-
}) => Promise<Response>;
|
|
1369
|
-
patch: (path: string, body?: any, config?: {
|
|
1370
|
-
headers?: HeadersInit;
|
|
1371
|
-
queryParams?: {
|
|
1372
|
-
[key: string]: string;
|
|
1373
|
-
};
|
|
1374
|
-
token?: string;
|
|
1375
|
-
}) => Promise<Response>;
|
|
1376
|
-
put: (path: string, body?: any, config?: {
|
|
1377
|
-
headers?: HeadersInit;
|
|
1378
|
-
queryParams?: {
|
|
1379
|
-
[key: string]: string;
|
|
1380
|
-
};
|
|
1381
|
-
token?: string;
|
|
1382
|
-
}) => Promise<Response>;
|
|
1383
|
-
delete: (path: string, config?: {
|
|
1384
|
-
headers?: HeadersInit;
|
|
1385
|
-
queryParams?: {
|
|
1386
|
-
[key: string]: string;
|
|
1387
|
-
};
|
|
1388
|
-
token?: string;
|
|
1389
|
-
}) => Promise<Response>;
|
|
1390
|
-
hooks?: {
|
|
1391
|
-
beforeRequest?: (config: _1.RequestConfig) => _1.RequestConfig;
|
|
1392
|
-
afterRequest?: (req: _1.RequestConfig, res: Response) => void | Promise<void>;
|
|
1393
|
-
transformResponse?: (mutableResponse: _1.ExtendedResponse) => Promise<_1.ExtendedResponse>;
|
|
1394
|
-
};
|
|
1395
|
-
buildUrl: (path: string, queryParams?: {
|
|
1396
|
-
[key: string]: string;
|
|
1397
|
-
}) => string;
|
|
1398
|
-
};
|
|
1304
|
+
httpClient: _1.HttpClient;
|
|
1399
1305
|
} | {
|
|
1400
1306
|
refresh: (token?: string) => Promise<_1.SdkResponse<_1.JWTResponse>>;
|
|
1401
1307
|
logout: (token?: string) => Promise<_1.SdkResponse<never>>;
|
|
@@ -2023,51 +1929,7 @@ declare const createSdkWrapper: <P extends Omit<{
|
|
|
2023
1929
|
getJwtPermissions: (token: string, tenant?: string) => string[];
|
|
2024
1930
|
getJwtRoles: (token: string, tenant?: string) => string[];
|
|
2025
1931
|
getCurrentTenant: (token: string) => string;
|
|
2026
|
-
httpClient:
|
|
2027
|
-
get: (path: string, config?: {
|
|
2028
|
-
headers?: HeadersInit;
|
|
2029
|
-
queryParams?: {
|
|
2030
|
-
[key: string]: string;
|
|
2031
|
-
};
|
|
2032
|
-
token?: string;
|
|
2033
|
-
}) => Promise<Response>;
|
|
2034
|
-
post: (path: string, body?: any, config?: {
|
|
2035
|
-
headers?: HeadersInit;
|
|
2036
|
-
queryParams?: {
|
|
2037
|
-
[key: string]: string;
|
|
2038
|
-
};
|
|
2039
|
-
token?: string;
|
|
2040
|
-
}) => Promise<Response>;
|
|
2041
|
-
patch: (path: string, body?: any, config?: {
|
|
2042
|
-
headers?: HeadersInit;
|
|
2043
|
-
queryParams?: {
|
|
2044
|
-
[key: string]: string;
|
|
2045
|
-
};
|
|
2046
|
-
token?: string;
|
|
2047
|
-
}) => Promise<Response>;
|
|
2048
|
-
put: (path: string, body?: any, config?: {
|
|
2049
|
-
headers?: HeadersInit;
|
|
2050
|
-
queryParams?: {
|
|
2051
|
-
[key: string]: string;
|
|
2052
|
-
};
|
|
2053
|
-
token?: string;
|
|
2054
|
-
}) => Promise<Response>;
|
|
2055
|
-
delete: (path: string, config?: {
|
|
2056
|
-
headers?: HeadersInit;
|
|
2057
|
-
queryParams?: {
|
|
2058
|
-
[key: string]: string;
|
|
2059
|
-
};
|
|
2060
|
-
token?: string;
|
|
2061
|
-
}) => Promise<Response>;
|
|
2062
|
-
hooks?: {
|
|
2063
|
-
beforeRequest?: (config: _1.RequestConfig) => _1.RequestConfig;
|
|
2064
|
-
afterRequest?: (req: _1.RequestConfig, res: Response) => void | Promise<void>;
|
|
2065
|
-
transformResponse?: (mutableResponse: _1.ExtendedResponse) => Promise<_1.ExtendedResponse>;
|
|
2066
|
-
};
|
|
2067
|
-
buildUrl: (path: string, queryParams?: {
|
|
2068
|
-
[key: string]: string;
|
|
2069
|
-
}) => string;
|
|
2070
|
-
};
|
|
1932
|
+
httpClient: _1.HttpClient;
|
|
2071
1933
|
}) & {
|
|
2072
1934
|
onSessionTokenChange: (cb: (data: string) => void) => () => any[];
|
|
2073
1935
|
onUserChange: (cb: (data: _1.UserResponse) => void) => () => any[];
|
|
@@ -2707,51 +2569,7 @@ export declare const createTempSdk: () => ((({
|
|
|
2707
2569
|
getJwtPermissions: (token: string, tenant?: string) => string[];
|
|
2708
2570
|
getJwtRoles: (token: string, tenant?: string) => string[];
|
|
2709
2571
|
getCurrentTenant: (token: string) => string;
|
|
2710
|
-
httpClient:
|
|
2711
|
-
get: (path: string, config?: {
|
|
2712
|
-
headers?: HeadersInit;
|
|
2713
|
-
queryParams?: {
|
|
2714
|
-
[key: string]: string;
|
|
2715
|
-
};
|
|
2716
|
-
token?: string;
|
|
2717
|
-
}) => Promise<Response>;
|
|
2718
|
-
post: (path: string, body?: any, config?: {
|
|
2719
|
-
headers?: HeadersInit;
|
|
2720
|
-
queryParams?: {
|
|
2721
|
-
[key: string]: string;
|
|
2722
|
-
};
|
|
2723
|
-
token?: string;
|
|
2724
|
-
}) => Promise<Response>;
|
|
2725
|
-
patch: (path: string, body?: any, config?: {
|
|
2726
|
-
headers?: HeadersInit;
|
|
2727
|
-
queryParams?: {
|
|
2728
|
-
[key: string]: string;
|
|
2729
|
-
};
|
|
2730
|
-
token?: string;
|
|
2731
|
-
}) => Promise<Response>;
|
|
2732
|
-
put: (path: string, body?: any, config?: {
|
|
2733
|
-
headers?: HeadersInit;
|
|
2734
|
-
queryParams?: {
|
|
2735
|
-
[key: string]: string;
|
|
2736
|
-
};
|
|
2737
|
-
token?: string;
|
|
2738
|
-
}) => Promise<Response>;
|
|
2739
|
-
delete: (path: string, config?: {
|
|
2740
|
-
headers?: HeadersInit;
|
|
2741
|
-
queryParams?: {
|
|
2742
|
-
[key: string]: string;
|
|
2743
|
-
};
|
|
2744
|
-
token?: string;
|
|
2745
|
-
}) => Promise<Response>;
|
|
2746
|
-
hooks?: {
|
|
2747
|
-
beforeRequest?: (config: _1.RequestConfig) => _1.RequestConfig;
|
|
2748
|
-
afterRequest?: (req: _1.RequestConfig, res: Response) => void | Promise<void>;
|
|
2749
|
-
transformResponse?: (mutableResponse: _1.ExtendedResponse) => Promise<_1.ExtendedResponse>;
|
|
2750
|
-
};
|
|
2751
|
-
buildUrl: (path: string, queryParams?: {
|
|
2752
|
-
[key: string]: string;
|
|
2753
|
-
}) => string;
|
|
2754
|
-
};
|
|
2572
|
+
httpClient: _1.HttpClient;
|
|
2755
2573
|
} | {
|
|
2756
2574
|
refresh: (token?: string) => Promise<_1.SdkResponse<_1.JWTResponse>>;
|
|
2757
2575
|
logout: (token?: string) => Promise<_1.SdkResponse<never>>;
|
|
@@ -3379,51 +3197,7 @@ export declare const createTempSdk: () => ((({
|
|
|
3379
3197
|
getJwtPermissions: (token: string, tenant?: string) => string[];
|
|
3380
3198
|
getJwtRoles: (token: string, tenant?: string) => string[];
|
|
3381
3199
|
getCurrentTenant: (token: string) => string;
|
|
3382
|
-
httpClient:
|
|
3383
|
-
get: (path: string, config?: {
|
|
3384
|
-
headers?: HeadersInit;
|
|
3385
|
-
queryParams?: {
|
|
3386
|
-
[key: string]: string;
|
|
3387
|
-
};
|
|
3388
|
-
token?: string;
|
|
3389
|
-
}) => Promise<Response>;
|
|
3390
|
-
post: (path: string, body?: any, config?: {
|
|
3391
|
-
headers?: HeadersInit;
|
|
3392
|
-
queryParams?: {
|
|
3393
|
-
[key: string]: string;
|
|
3394
|
-
};
|
|
3395
|
-
token?: string;
|
|
3396
|
-
}) => Promise<Response>;
|
|
3397
|
-
patch: (path: string, body?: any, config?: {
|
|
3398
|
-
headers?: HeadersInit;
|
|
3399
|
-
queryParams?: {
|
|
3400
|
-
[key: string]: string;
|
|
3401
|
-
};
|
|
3402
|
-
token?: string;
|
|
3403
|
-
}) => Promise<Response>;
|
|
3404
|
-
put: (path: string, body?: any, config?: {
|
|
3405
|
-
headers?: HeadersInit;
|
|
3406
|
-
queryParams?: {
|
|
3407
|
-
[key: string]: string;
|
|
3408
|
-
};
|
|
3409
|
-
token?: string;
|
|
3410
|
-
}) => Promise<Response>;
|
|
3411
|
-
delete: (path: string, config?: {
|
|
3412
|
-
headers?: HeadersInit;
|
|
3413
|
-
queryParams?: {
|
|
3414
|
-
[key: string]: string;
|
|
3415
|
-
};
|
|
3416
|
-
token?: string;
|
|
3417
|
-
}) => Promise<Response>;
|
|
3418
|
-
hooks?: {
|
|
3419
|
-
beforeRequest?: (config: _1.RequestConfig) => _1.RequestConfig;
|
|
3420
|
-
afterRequest?: (req: _1.RequestConfig, res: Response) => void | Promise<void>;
|
|
3421
|
-
transformResponse?: (mutableResponse: _1.ExtendedResponse) => Promise<_1.ExtendedResponse>;
|
|
3422
|
-
};
|
|
3423
|
-
buildUrl: (path: string, queryParams?: {
|
|
3424
|
-
[key: string]: string;
|
|
3425
|
-
}) => string;
|
|
3426
|
-
};
|
|
3200
|
+
httpClient: _1.HttpClient;
|
|
3427
3201
|
} | {
|
|
3428
3202
|
refresh: (token?: string) => Promise<_1.SdkResponse<_1.JWTResponse>>;
|
|
3429
3203
|
logout: (token?: string) => Promise<_1.SdkResponse<never>>;
|
|
@@ -4051,51 +3825,7 @@ export declare const createTempSdk: () => ((({
|
|
|
4051
3825
|
getJwtPermissions: (token: string, tenant?: string) => string[];
|
|
4052
3826
|
getJwtRoles: (token: string, tenant?: string) => string[];
|
|
4053
3827
|
getCurrentTenant: (token: string) => string;
|
|
4054
|
-
httpClient:
|
|
4055
|
-
get: (path: string, config?: {
|
|
4056
|
-
headers?: HeadersInit;
|
|
4057
|
-
queryParams?: {
|
|
4058
|
-
[key: string]: string;
|
|
4059
|
-
};
|
|
4060
|
-
token?: string;
|
|
4061
|
-
}) => Promise<Response>;
|
|
4062
|
-
post: (path: string, body?: any, config?: {
|
|
4063
|
-
headers?: HeadersInit;
|
|
4064
|
-
queryParams?: {
|
|
4065
|
-
[key: string]: string;
|
|
4066
|
-
};
|
|
4067
|
-
token?: string;
|
|
4068
|
-
}) => Promise<Response>;
|
|
4069
|
-
patch: (path: string, body?: any, config?: {
|
|
4070
|
-
headers?: HeadersInit;
|
|
4071
|
-
queryParams?: {
|
|
4072
|
-
[key: string]: string;
|
|
4073
|
-
};
|
|
4074
|
-
token?: string;
|
|
4075
|
-
}) => Promise<Response>;
|
|
4076
|
-
put: (path: string, body?: any, config?: {
|
|
4077
|
-
headers?: HeadersInit;
|
|
4078
|
-
queryParams?: {
|
|
4079
|
-
[key: string]: string;
|
|
4080
|
-
};
|
|
4081
|
-
token?: string;
|
|
4082
|
-
}) => Promise<Response>;
|
|
4083
|
-
delete: (path: string, config?: {
|
|
4084
|
-
headers?: HeadersInit;
|
|
4085
|
-
queryParams?: {
|
|
4086
|
-
[key: string]: string;
|
|
4087
|
-
};
|
|
4088
|
-
token?: string;
|
|
4089
|
-
}) => Promise<Response>;
|
|
4090
|
-
hooks?: {
|
|
4091
|
-
beforeRequest?: (config: _1.RequestConfig) => _1.RequestConfig;
|
|
4092
|
-
afterRequest?: (req: _1.RequestConfig, res: Response) => void | Promise<void>;
|
|
4093
|
-
transformResponse?: (mutableResponse: _1.ExtendedResponse) => Promise<_1.ExtendedResponse>;
|
|
4094
|
-
};
|
|
4095
|
-
buildUrl: (path: string, queryParams?: {
|
|
4096
|
-
[key: string]: string;
|
|
4097
|
-
}) => string;
|
|
4098
|
-
};
|
|
3828
|
+
httpClient: _1.HttpClient;
|
|
4099
3829
|
}) & {
|
|
4100
3830
|
onSessionTokenChange: (cb: (data: string) => void) => () => any[];
|
|
4101
3831
|
onUserChange: (cb: (data: _1.UserResponse) => void) => () => any[];
|
|
@@ -4743,51 +4473,7 @@ export declare const getGlobalSdk: () => ((({
|
|
|
4743
4473
|
getJwtPermissions: (token: string, tenant?: string) => string[];
|
|
4744
4474
|
getJwtRoles: (token: string, tenant?: string) => string[];
|
|
4745
4475
|
getCurrentTenant: (token: string) => string;
|
|
4746
|
-
httpClient:
|
|
4747
|
-
get: (path: string, config?: {
|
|
4748
|
-
headers?: HeadersInit;
|
|
4749
|
-
queryParams?: {
|
|
4750
|
-
[key: string]: string;
|
|
4751
|
-
};
|
|
4752
|
-
token?: string;
|
|
4753
|
-
}) => Promise<Response>;
|
|
4754
|
-
post: (path: string, body?: any, config?: {
|
|
4755
|
-
headers?: HeadersInit;
|
|
4756
|
-
queryParams?: {
|
|
4757
|
-
[key: string]: string;
|
|
4758
|
-
};
|
|
4759
|
-
token?: string;
|
|
4760
|
-
}) => Promise<Response>;
|
|
4761
|
-
patch: (path: string, body?: any, config?: {
|
|
4762
|
-
headers?: HeadersInit;
|
|
4763
|
-
queryParams?: {
|
|
4764
|
-
[key: string]: string;
|
|
4765
|
-
};
|
|
4766
|
-
token?: string;
|
|
4767
|
-
}) => Promise<Response>;
|
|
4768
|
-
put: (path: string, body?: any, config?: {
|
|
4769
|
-
headers?: HeadersInit;
|
|
4770
|
-
queryParams?: {
|
|
4771
|
-
[key: string]: string;
|
|
4772
|
-
};
|
|
4773
|
-
token?: string;
|
|
4774
|
-
}) => Promise<Response>;
|
|
4775
|
-
delete: (path: string, config?: {
|
|
4776
|
-
headers?: HeadersInit;
|
|
4777
|
-
queryParams?: {
|
|
4778
|
-
[key: string]: string;
|
|
4779
|
-
};
|
|
4780
|
-
token?: string;
|
|
4781
|
-
}) => Promise<Response>;
|
|
4782
|
-
hooks?: {
|
|
4783
|
-
beforeRequest?: (config: _1.RequestConfig) => _1.RequestConfig;
|
|
4784
|
-
afterRequest?: (req: _1.RequestConfig, res: Response) => void | Promise<void>;
|
|
4785
|
-
transformResponse?: (mutableResponse: _1.ExtendedResponse) => Promise<_1.ExtendedResponse>;
|
|
4786
|
-
};
|
|
4787
|
-
buildUrl: (path: string, queryParams?: {
|
|
4788
|
-
[key: string]: string;
|
|
4789
|
-
}) => string;
|
|
4790
|
-
};
|
|
4476
|
+
httpClient: _1.HttpClient;
|
|
4791
4477
|
} | {
|
|
4792
4478
|
refresh: (token?: string) => Promise<_1.SdkResponse<_1.JWTResponse>>;
|
|
4793
4479
|
logout: (token?: string) => Promise<_1.SdkResponse<never>>;
|
|
@@ -5415,51 +5101,7 @@ export declare const getGlobalSdk: () => ((({
|
|
|
5415
5101
|
getJwtPermissions: (token: string, tenant?: string) => string[];
|
|
5416
5102
|
getJwtRoles: (token: string, tenant?: string) => string[];
|
|
5417
5103
|
getCurrentTenant: (token: string) => string;
|
|
5418
|
-
httpClient:
|
|
5419
|
-
get: (path: string, config?: {
|
|
5420
|
-
headers?: HeadersInit;
|
|
5421
|
-
queryParams?: {
|
|
5422
|
-
[key: string]: string;
|
|
5423
|
-
};
|
|
5424
|
-
token?: string;
|
|
5425
|
-
}) => Promise<Response>;
|
|
5426
|
-
post: (path: string, body?: any, config?: {
|
|
5427
|
-
headers?: HeadersInit;
|
|
5428
|
-
queryParams?: {
|
|
5429
|
-
[key: string]: string;
|
|
5430
|
-
};
|
|
5431
|
-
token?: string;
|
|
5432
|
-
}) => Promise<Response>;
|
|
5433
|
-
patch: (path: string, body?: any, config?: {
|
|
5434
|
-
headers?: HeadersInit;
|
|
5435
|
-
queryParams?: {
|
|
5436
|
-
[key: string]: string;
|
|
5437
|
-
};
|
|
5438
|
-
token?: string;
|
|
5439
|
-
}) => Promise<Response>;
|
|
5440
|
-
put: (path: string, body?: any, config?: {
|
|
5441
|
-
headers?: HeadersInit;
|
|
5442
|
-
queryParams?: {
|
|
5443
|
-
[key: string]: string;
|
|
5444
|
-
};
|
|
5445
|
-
token?: string;
|
|
5446
|
-
}) => Promise<Response>;
|
|
5447
|
-
delete: (path: string, config?: {
|
|
5448
|
-
headers?: HeadersInit;
|
|
5449
|
-
queryParams?: {
|
|
5450
|
-
[key: string]: string;
|
|
5451
|
-
};
|
|
5452
|
-
token?: string;
|
|
5453
|
-
}) => Promise<Response>;
|
|
5454
|
-
hooks?: {
|
|
5455
|
-
beforeRequest?: (config: _1.RequestConfig) => _1.RequestConfig;
|
|
5456
|
-
afterRequest?: (req: _1.RequestConfig, res: Response) => void | Promise<void>;
|
|
5457
|
-
transformResponse?: (mutableResponse: _1.ExtendedResponse) => Promise<_1.ExtendedResponse>;
|
|
5458
|
-
};
|
|
5459
|
-
buildUrl: (path: string, queryParams?: {
|
|
5460
|
-
[key: string]: string;
|
|
5461
|
-
}) => string;
|
|
5462
|
-
};
|
|
5104
|
+
httpClient: _1.HttpClient;
|
|
5463
5105
|
} | {
|
|
5464
5106
|
refresh: (token?: string) => Promise<_1.SdkResponse<_1.JWTResponse>>;
|
|
5465
5107
|
logout: (token?: string) => Promise<_1.SdkResponse<never>>;
|
|
@@ -6087,51 +5729,7 @@ export declare const getGlobalSdk: () => ((({
|
|
|
6087
5729
|
getJwtPermissions: (token: string, tenant?: string) => string[];
|
|
6088
5730
|
getJwtRoles: (token: string, tenant?: string) => string[];
|
|
6089
5731
|
getCurrentTenant: (token: string) => string;
|
|
6090
|
-
httpClient:
|
|
6091
|
-
get: (path: string, config?: {
|
|
6092
|
-
headers?: HeadersInit;
|
|
6093
|
-
queryParams?: {
|
|
6094
|
-
[key: string]: string;
|
|
6095
|
-
};
|
|
6096
|
-
token?: string;
|
|
6097
|
-
}) => Promise<Response>;
|
|
6098
|
-
post: (path: string, body?: any, config?: {
|
|
6099
|
-
headers?: HeadersInit;
|
|
6100
|
-
queryParams?: {
|
|
6101
|
-
[key: string]: string;
|
|
6102
|
-
};
|
|
6103
|
-
token?: string;
|
|
6104
|
-
}) => Promise<Response>;
|
|
6105
|
-
patch: (path: string, body?: any, config?: {
|
|
6106
|
-
headers?: HeadersInit;
|
|
6107
|
-
queryParams?: {
|
|
6108
|
-
[key: string]: string;
|
|
6109
|
-
};
|
|
6110
|
-
token?: string;
|
|
6111
|
-
}) => Promise<Response>;
|
|
6112
|
-
put: (path: string, body?: any, config?: {
|
|
6113
|
-
headers?: HeadersInit;
|
|
6114
|
-
queryParams?: {
|
|
6115
|
-
[key: string]: string;
|
|
6116
|
-
};
|
|
6117
|
-
token?: string;
|
|
6118
|
-
}) => Promise<Response>;
|
|
6119
|
-
delete: (path: string, config?: {
|
|
6120
|
-
headers?: HeadersInit;
|
|
6121
|
-
queryParams?: {
|
|
6122
|
-
[key: string]: string;
|
|
6123
|
-
};
|
|
6124
|
-
token?: string;
|
|
6125
|
-
}) => Promise<Response>;
|
|
6126
|
-
hooks?: {
|
|
6127
|
-
beforeRequest?: (config: _1.RequestConfig) => _1.RequestConfig;
|
|
6128
|
-
afterRequest?: (req: _1.RequestConfig, res: Response) => void | Promise<void>;
|
|
6129
|
-
transformResponse?: (mutableResponse: _1.ExtendedResponse) => Promise<_1.ExtendedResponse>;
|
|
6130
|
-
};
|
|
6131
|
-
buildUrl: (path: string, queryParams?: {
|
|
6132
|
-
[key: string]: string;
|
|
6133
|
-
}) => string;
|
|
6134
|
-
};
|
|
5732
|
+
httpClient: _1.HttpClient;
|
|
6135
5733
|
}) & {
|
|
6136
5734
|
onSessionTokenChange: (cb: (data: string) => void) => () => any[];
|
|
6137
5735
|
onUserChange: (cb: (data: _1.UserResponse) => void) => () => any[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@descope/react-sdk",
|
|
3
|
-
"version": "2.18.
|
|
3
|
+
"version": "2.18.2",
|
|
4
4
|
"description": "Descope React SDK",
|
|
5
5
|
"author": "Descope Team <info@descope.com>",
|
|
6
6
|
"homepage": "https://github.com/descope/descope-js",
|
|
@@ -50,16 +50,16 @@
|
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@descope/sdk-helpers": "0.4.0",
|
|
53
|
-
"@descope/
|
|
54
|
-
"@descope/
|
|
55
|
-
"@descope/
|
|
56
|
-
"@descope/
|
|
57
|
-
"@descope/user-
|
|
58
|
-
"@descope/
|
|
59
|
-
"@descope/
|
|
60
|
-
"@descope/web-js-sdk": "1.34.
|
|
61
|
-
"@descope/tenant-profile-widget": "0.2.
|
|
62
|
-
"@descope/core-js-sdk": "2.46.
|
|
53
|
+
"@descope/access-key-management-widget": "0.5.5",
|
|
54
|
+
"@descope/audit-management-widget": "0.5.5",
|
|
55
|
+
"@descope/role-management-widget": "0.4.5",
|
|
56
|
+
"@descope/user-management-widget": "0.9.2",
|
|
57
|
+
"@descope/user-profile-widget": "0.6.10",
|
|
58
|
+
"@descope/applications-portal-widget": "0.4.5",
|
|
59
|
+
"@descope/web-component": "3.46.2",
|
|
60
|
+
"@descope/web-js-sdk": "1.34.2",
|
|
61
|
+
"@descope/tenant-profile-widget": "0.2.7",
|
|
62
|
+
"@descope/core-js-sdk": "2.46.2"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@babel/core": "7.26.0",
|