@iblai/web-utils 1.8.1 → 1.9.1
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/auth/index.d.ts +202 -0
- package/dist/auth/index.esm.js +363 -0
- package/dist/auth/index.esm.js.map +1 -0
- package/dist/auth/index.js +379 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/auth/web-utils/src/utils/auth.d.ts +199 -0
- package/dist/auth/web-utils/tests/hooks/chat/use-mentor-tools.test.d.ts +1 -0
- package/dist/auth/web-utils/tests/hooks/subscription/class-subscription-flow.test.d.ts +1 -0
- package/dist/auth/web-utils/tests/hooks/subscription/constants.test.d.ts +1 -0
- package/dist/auth/web-utils/tests/hooks/subscription/use-subscription-handler.test.d.ts +1 -0
- package/dist/auth/web-utils/tests/hooks/subscription-v2/use-subscription-handler.test.d.ts +1 -0
- package/dist/auth/web-utils/tests/hooks/use-day-js.test.d.ts +1 -0
- package/dist/auth/web-utils/tests/hooks/use-mentor-settings.test.d.ts +1 -0
- package/dist/auth/web-utils/tests/providers/mentor-provider.test.d.ts +1 -0
- package/dist/auth/web-utils/tests/providers/tenant-provider.test.d.ts +1 -0
- package/dist/auth/web-utils/tests/setupTests.d.ts +5 -0
- package/dist/auth/web-utils/tests/utils/helpers.test.d.ts +1 -0
- package/dist/data-layer/src/features/core/api-slice.d.ts +110 -109
- package/dist/index.d.ts +10 -5
- package/dist/index.esm.js +31 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +31 -3
- package/dist/index.js.map +1 -1
- package/dist/package.json +6 -1
- package/dist/web-utils/src/providers/auth-provider.d.ts +3 -3
- package/dist/web-utils/src/utils/constants.d.ts +5 -0
- package/package.json +6 -1
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iblai/web-utils",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.esm.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -9,6 +9,11 @@
|
|
|
9
9
|
"types": "./dist/index.d.ts",
|
|
10
10
|
"import": "./dist/index.esm.js",
|
|
11
11
|
"require": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./auth": {
|
|
14
|
+
"types": "./dist/auth/index.d.ts",
|
|
15
|
+
"import": "./dist/auth/index.esm.js",
|
|
16
|
+
"require": "./dist/auth/index.js"
|
|
12
17
|
}
|
|
13
18
|
},
|
|
14
19
|
"files": [
|
|
@@ -56,6 +56,7 @@ import { StorageService } from "@iblai/data-layer";
|
|
|
56
56
|
* On React Native, this is a no-op
|
|
57
57
|
*/
|
|
58
58
|
export declare function syncAuthToCookies(storageService: StorageService): Promise<void>;
|
|
59
|
+
export declare function hasNonExpiredAuthToken(): boolean;
|
|
59
60
|
/**
|
|
60
61
|
* Clear current tenant cookie only (web only)
|
|
61
62
|
* Should be called before tenant switching
|
|
@@ -69,7 +70,7 @@ export declare function clearCurrentTenantCookie(): void;
|
|
|
69
70
|
*/
|
|
70
71
|
export declare function clearAuthCookies(): void;
|
|
71
72
|
export declare function getStoredUserName(storageService: StorageService): Promise<any>;
|
|
72
|
-
export declare function useAuthProvider({ middleware, onAuthSuccess, onAuthFailure, redirectToAuthSpa,
|
|
73
|
+
export declare function useAuthProvider({ middleware, onAuthSuccess, onAuthFailure, redirectToAuthSpa, username, pathname, storageService, skipAuthCheck, token, enableStorageSync, }: Props): {
|
|
73
74
|
isAuthenticating: boolean;
|
|
74
75
|
userIsAccessingPublicRoute: boolean;
|
|
75
76
|
setUserIsAccessingPublicRoute: React.Dispatch<React.SetStateAction<boolean>>;
|
|
@@ -106,7 +107,6 @@ type Props = {
|
|
|
106
107
|
onAuthSuccess?: () => void;
|
|
107
108
|
onAuthFailure?: (reason: string) => void;
|
|
108
109
|
redirectToAuthSpa: (redirectTo?: string, platformKey?: string, logout?: boolean, saveRedirect?: boolean) => void;
|
|
109
|
-
hasNonExpiredAuthToken: () => boolean;
|
|
110
110
|
username: string;
|
|
111
111
|
pathname: string;
|
|
112
112
|
skipAuthCheck?: boolean;
|
|
@@ -125,5 +125,5 @@ type Props = {
|
|
|
125
125
|
* 4. Handles redirects to auth SPA when needed
|
|
126
126
|
* 5. Manages public route access state
|
|
127
127
|
*/
|
|
128
|
-
export declare function AuthProvider({ children, fallback, middleware, onAuthSuccess, onAuthFailure, redirectToAuthSpa,
|
|
128
|
+
export declare function AuthProvider({ children, fallback, middleware, onAuthSuccess, onAuthFailure, redirectToAuthSpa, username, pathname, storageService, token, enableStorageSync, skip, }: Props): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
129
129
|
export {};
|
|
@@ -15,6 +15,11 @@ export declare const LOCAL_STORAGE_KEYS: {
|
|
|
15
15
|
EDX_TOKEN_KEY: string;
|
|
16
16
|
DM_TOKEN_KEY: string;
|
|
17
17
|
DM_TOKEN_EXPIRES: string;
|
|
18
|
+
DM_TOKEN_EXPIRY: string;
|
|
19
|
+
AXD_TOKEN_KEY: string;
|
|
20
|
+
DEFAULT_TENANT: string;
|
|
21
|
+
MODEL_DOWNLOAD_STATE: string;
|
|
22
|
+
MODEL_DOWNLOAD_PROMPT_DISMISSED: string;
|
|
18
23
|
};
|
|
19
24
|
export declare const TOOLS: {
|
|
20
25
|
readonly WEB_SEARCH: "web-search";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iblai/web-utils",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.1",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.esm.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -9,6 +9,11 @@
|
|
|
9
9
|
"types": "./dist/index.d.ts",
|
|
10
10
|
"import": "./dist/index.esm.js",
|
|
11
11
|
"require": "./dist/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./auth": {
|
|
14
|
+
"types": "./dist/auth/index.d.ts",
|
|
15
|
+
"import": "./dist/auth/index.esm.js",
|
|
16
|
+
"require": "./dist/auth/index.js"
|
|
12
17
|
}
|
|
13
18
|
},
|
|
14
19
|
"files": [
|