@descope/react-sdk 2.8.1 → 2.10.0

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.
@@ -4,6 +4,6 @@ export { default as Descope } from './components/Descope';
4
4
  export { default as useDescope } from './hooks/useDescope';
5
5
  export { default as useSession } from './hooks/useSession';
6
6
  export { default as useUser } from './hooks/useUser';
7
- export { getJwtPermissions, getJwtRoles, refresh, getRefreshToken, getSessionToken, isSessionTokenExpired, isRefreshTokenExpired, } from './sdk';
7
+ export { getJwtPermissions, getJwtRoles, refresh, getRefreshToken, getSessionToken, isSessionTokenExpired, isRefreshTokenExpired, getCurrentTenant, } from './sdk';
8
8
  export { baseHeaders } from './constants';
9
9
  export type { ILogger } from './types';
@@ -617,6 +617,7 @@ declare const createSdkWrapper: <P extends Omit<{
617
617
  getTenants: (token: string) => string[];
618
618
  getJwtPermissions: (token: string, tenant?: string) => string[];
619
619
  getJwtRoles: (token: string, tenant?: string) => string[];
620
+ getCurrentTenant: (token: string) => string;
620
621
  httpClient: {
621
622
  get: (path: string, config?: {
622
623
  headers?: HeadersInit;
@@ -1227,6 +1228,7 @@ declare const createSdkWrapper: <P extends Omit<{
1227
1228
  getTenants: (token: string) => string[];
1228
1229
  getJwtPermissions: (token: string, tenant?: string) => string[];
1229
1230
  getJwtRoles: (token: string, tenant?: string) => string[];
1231
+ getCurrentTenant: (token: string) => string;
1230
1232
  httpClient: {
1231
1233
  get: (path: string, config?: {
1232
1234
  headers?: HeadersInit;
@@ -1848,6 +1850,7 @@ export declare const createTempSdk: () => ((({
1848
1850
  getTenants: (token: string) => string[];
1849
1851
  getJwtPermissions: (token: string, tenant?: string) => string[];
1850
1852
  getJwtRoles: (token: string, tenant?: string) => string[];
1853
+ getCurrentTenant: (token: string) => string;
1851
1854
  httpClient: {
1852
1855
  get: (path: string, config?: {
1853
1856
  headers?: HeadersInit;
@@ -2458,6 +2461,7 @@ export declare const createTempSdk: () => ((({
2458
2461
  getTenants: (token: string) => string[];
2459
2462
  getJwtPermissions: (token: string, tenant?: string) => string[];
2460
2463
  getJwtRoles: (token: string, tenant?: string) => string[];
2464
+ getCurrentTenant: (token: string) => string;
2461
2465
  httpClient: {
2462
2466
  get: (path: string, config?: {
2463
2467
  headers?: HeadersInit;
@@ -2520,6 +2524,7 @@ export declare const isSessionTokenExpired: (token?: string) => boolean;
2520
2524
  export declare const isRefreshTokenExpired: (token?: string) => boolean;
2521
2525
  export declare const getJwtPermissions: (token?: any, tenant?: string) => string[];
2522
2526
  export declare const getJwtRoles: (token?: any, tenant?: string) => string[];
2527
+ export declare const getCurrentTenant: (token?: any) => string;
2523
2528
  export declare const refresh: (token?: string) => Promise<_1.SdkResponse<_1.JWTResponse>>;
2524
2529
  export declare const getGlobalSdk: () => ((({
2525
2530
  refresh: (token?: string) => Promise<_1.SdkResponse<_1.JWTResponse>>;
@@ -3086,6 +3091,7 @@ export declare const getGlobalSdk: () => ((({
3086
3091
  getTenants: (token: string) => string[];
3087
3092
  getJwtPermissions: (token: string, tenant?: string) => string[];
3088
3093
  getJwtRoles: (token: string, tenant?: string) => string[];
3094
+ getCurrentTenant: (token: string) => string;
3089
3095
  httpClient: {
3090
3096
  get: (path: string, config?: {
3091
3097
  headers?: HeadersInit;
@@ -3696,6 +3702,7 @@ export declare const getGlobalSdk: () => ((({
3696
3702
  getTenants: (token: string) => string[];
3697
3703
  getJwtPermissions: (token: string, tenant?: string) => string[];
3698
3704
  getJwtRoles: (token: string, tenant?: string) => string[];
3705
+ getCurrentTenant: (token: string) => string;
3699
3706
  httpClient: {
3700
3707
  get: (path: string, config?: {
3701
3708
  headers?: HeadersInit;
@@ -78,6 +78,7 @@ export type DescopeProps = {
78
78
  tenant?: string;
79
79
  theme?: ThemeOptions;
80
80
  locale?: string;
81
+ nonce?: string;
81
82
  autoFocus?: AutoFocusOptions;
82
83
  validateOnBlur?: boolean;
83
84
  restartOnError?: boolean;
@@ -91,6 +92,7 @@ export type DescopeProps = {
91
92
  form?: Record<string, any>;
92
93
  client?: Record<string, any>;
93
94
  styleId?: string;
95
+ dismissScreenErrorOnInput?: boolean;
94
96
  onScreenUpdate?: (screenName: string, context: Record<string, any>, next: (interactionId: string, form: Record<string, any>) => Promise<unknown>, ref: HTMLElement) => boolean | Promise<boolean>;
95
97
  children?: React.ReactNode;
96
98
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descope/react-sdk",
3
- "version": "2.8.1",
3
+ "version": "2.10.0",
4
4
  "description": "Descope React SDK",
5
5
  "author": "Descope Team <info@descope.com>",
6
6
  "homepage": "https://github.com/descope/descope-js",
@@ -49,16 +49,16 @@
49
49
  ]
50
50
  },
51
51
  "dependencies": {
52
- "@descope/sdk-helpers": "0.2.0",
53
- "@descope/audit-management-widget": "0.4.3",
54
- "@descope/role-management-widget": "0.3.3",
55
- "@descope/access-key-management-widget": "0.4.3",
56
- "@descope/user-management-widget": "0.7.3",
57
- "@descope/user-profile-widget": "0.3.4",
58
- "@descope/web-component": "3.38.1",
59
- "@descope/applications-portal-widget": "0.3.3",
60
- "@descope/web-js-sdk": "1.26.1",
61
- "@descope/core-js-sdk": "2.37.0"
52
+ "@descope/sdk-helpers": "0.3.0",
53
+ "@descope/audit-management-widget": "0.4.5",
54
+ "@descope/access-key-management-widget": "0.4.5",
55
+ "@descope/user-management-widget": "0.7.5",
56
+ "@descope/user-profile-widget": "0.4.0",
57
+ "@descope/role-management-widget": "0.3.5",
58
+ "@descope/applications-portal-widget": "0.3.5",
59
+ "@descope/web-component": "3.39.0",
60
+ "@descope/web-js-sdk": "1.26.2",
61
+ "@descope/core-js-sdk": "2.38.0"
62
62
  },
63
63
  "devDependencies": {
64
64
  "@babel/core": "7.26.0",