@iblai/web-utils 1.9.0 → 1.9.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iblai/web-utils",
3
- "version": "1.9.0",
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",
@@ -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, hasNonExpiredAuthToken, username, pathname, storageService, skipAuthCheck, token, enableStorageSync, }: Props): {
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, hasNonExpiredAuthToken, 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;
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.9.0",
3
+ "version": "1.9.2",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",
@@ -22,16 +22,6 @@
22
22
  "engines": {
23
23
  "node": "25.3.0"
24
24
  },
25
- "scripts": {
26
- "build": "rollup -c",
27
- "watch": "rollup -c -w",
28
- "test": "vitest run",
29
- "test:watch": "vitest",
30
- "test:coverage": "vitest run --coverage",
31
- "typecheck": "tsc --noEmit",
32
- "prepublishOnly": "pnpm run build",
33
- "release": "release-it"
34
- },
35
25
  "keywords": [],
36
26
  "author": "",
37
27
  "license": "ISC",
@@ -97,9 +87,17 @@
97
87
  "optional": true
98
88
  }
99
89
  },
100
- "packageManager": "pnpm@10.11.0",
101
90
  "publishConfig": {
102
91
  "access": "public",
103
92
  "registry": "https://registry.npmjs.org/"
93
+ },
94
+ "scripts": {
95
+ "build": "rollup -c",
96
+ "watch": "rollup -c -w",
97
+ "test": "vitest run",
98
+ "test:watch": "vitest",
99
+ "test:coverage": "vitest run --coverage",
100
+ "typecheck": "tsc --noEmit",
101
+ "release": "release-it"
104
102
  }
105
- }
103
+ }