@iblai/web-utils 1.0.0 → 1.1.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/data-layer/src/features/core/api-slice.d.ts +110 -0
- package/dist/data-layer/src/features/credentials/api-slice.d.ts +44 -22
- package/dist/data-layer/src/features/mentor/api-slice.d.ts +70 -22
- package/dist/data-layer/src/features/stripe/api-slice.d.ts +22 -0
- package/dist/index.d.ts +24 -19
- package/dist/index.esm.js +13134 -13093
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +13221 -13180
- package/dist/index.js.map +1 -1
- package/dist/package.json +5 -4
- package/dist/web-utils/src/hooks/chat/use-advanced-chat.d.ts +2 -2
- package/dist/web-utils/src/hooks/use-mentor-settings.d.ts +18 -15
- package/dist/web-utils/src/providers/mentor-provider.d.ts +2 -1
- package/dist/web-utils/src/providers/tenant-provider.d.ts +2 -1
- package/dist/web-utils/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iblai/web-utils",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.esm.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
"test": "vitest run",
|
|
14
14
|
"test:watch": "vitest",
|
|
15
15
|
"test:coverage": "vitest run --coverage",
|
|
16
|
-
"typecheck": "tsc --noEmit"
|
|
16
|
+
"typecheck": "tsc --noEmit",
|
|
17
|
+
"prepublishOnly": "pnpm run build"
|
|
17
18
|
},
|
|
18
19
|
"keywords": [],
|
|
19
20
|
"author": "",
|
|
@@ -49,7 +50,6 @@
|
|
|
49
50
|
"vitest": "^3.2.4"
|
|
50
51
|
},
|
|
51
52
|
"dependencies": {
|
|
52
|
-
"@iblai/data-layer": "1.0.0",
|
|
53
53
|
"@reduxjs/toolkit": "^2.10.0",
|
|
54
54
|
"axios": "^1.13.1",
|
|
55
55
|
"dayjs": "^1.11.19",
|
|
@@ -60,7 +60,8 @@
|
|
|
60
60
|
"zod": "3.24.2"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
|
-
"@iblai/
|
|
63
|
+
"@iblai/data-layer": "^1.1.2",
|
|
64
|
+
"@iblai/iblai-api": "4.95.5-ai",
|
|
64
65
|
"react": "19.1.0"
|
|
65
66
|
},
|
|
66
67
|
"packageManager": "pnpm@10.11.0",
|
|
@@ -17,7 +17,7 @@ type Props = {
|
|
|
17
17
|
isPreviewMode?: boolean;
|
|
18
18
|
mentorShareableToken?: string | null;
|
|
19
19
|
on402Error?: (message: Record<string, unknown>) => void;
|
|
20
|
-
cachedSessionId?: string
|
|
20
|
+
cachedSessionId?: Record<string, string>;
|
|
21
21
|
onStartNewChat?: (sessionId: string) => void;
|
|
22
22
|
};
|
|
23
23
|
export declare function useAdvancedChat({ tenantKey, mentorId, username, token, wsUrl, stopGenerationWsUrl, redirectToAuthSpa, errorHandler, sendMessageToParentWebsite, isPreviewMode, mentorShareableToken, on402Error, cachedSessionId, onStartNewChat, }: Props): {
|
|
@@ -44,7 +44,7 @@ export declare function useAdvancedChat({ tenantKey, mentorId, username, token,
|
|
|
44
44
|
isConnected: React.MutableRefObject<boolean>;
|
|
45
45
|
messageQueue: React.MutableRefObject<any[]>;
|
|
46
46
|
sessionIds: import("../../features").SessionIds;
|
|
47
|
-
enableSafetyDisclaimer:
|
|
47
|
+
enableSafetyDisclaimer: boolean;
|
|
48
48
|
resetConnection: () => void;
|
|
49
49
|
};
|
|
50
50
|
export {};
|
|
@@ -3,20 +3,23 @@ type Props = {
|
|
|
3
3
|
tenantKey: string;
|
|
4
4
|
username: string;
|
|
5
5
|
};
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
};
|
|
6
|
+
type MentorSettingsData = {
|
|
7
|
+
profileImage?: string | null;
|
|
8
|
+
greetingMethod?: string | null;
|
|
9
|
+
proactiveResponse?: string | null;
|
|
10
|
+
llmProvider?: string | null;
|
|
11
|
+
llmName?: string | null;
|
|
12
|
+
mentorUniqueId?: string | null;
|
|
13
|
+
mentorVisibility?: string | null | any;
|
|
14
|
+
mentorName?: string | null;
|
|
15
|
+
enableGuidedPrompts?: boolean | null;
|
|
16
|
+
mentorSlug?: string | null;
|
|
17
|
+
safetyDisclaimer: boolean;
|
|
18
|
+
mentorTools?: any[] | null;
|
|
19
|
+
allowAnonymous?: boolean | null;
|
|
21
20
|
};
|
|
21
|
+
type UseMentorSettingsReturn = {
|
|
22
|
+
data: MentorSettingsData;
|
|
23
|
+
};
|
|
24
|
+
export declare function useMentorSettings({ mentorId, tenantKey, username, }: Props): UseMentorSettingsReturn;
|
|
22
25
|
export {};
|
|
@@ -28,6 +28,7 @@ type Props = {
|
|
|
28
28
|
requestedMentorId?: string;
|
|
29
29
|
handleMentorNotFound?: () => Promise<void>;
|
|
30
30
|
forceDetermineMentor?: boolean;
|
|
31
|
+
onComplete?: () => void;
|
|
31
32
|
};
|
|
32
33
|
/**
|
|
33
34
|
* MentorProvider Component
|
|
@@ -38,5 +39,5 @@ type Props = {
|
|
|
38
39
|
* 3. Manages redirection based on mentor availability
|
|
39
40
|
* 4. Integrates with tenant context for access control
|
|
40
41
|
*/
|
|
41
|
-
export declare function MentorProvider({ children, fallback, onAuthSuccess, onAuthFailure, redirectToAuthSpa, redirectToMentor, onLoadMentorsPermissions, redirectToNoMentorsPage, redirectToCreateMentor, username, isAdmin, mainTenantKey, requestedMentorId, handleMentorNotFound, forceDetermineMentor, }: Props): React.ReactNode;
|
|
42
|
+
export declare function MentorProvider({ children, fallback, onAuthSuccess, onAuthFailure, redirectToAuthSpa, redirectToMentor, onLoadMentorsPermissions, redirectToNoMentorsPage, redirectToCreateMentor, username, isAdmin, mainTenantKey, requestedMentorId, handleMentorNotFound, forceDetermineMentor, onComplete, }: Props): React.ReactNode;
|
|
42
43
|
export {};
|
|
@@ -54,6 +54,7 @@ type Props = {
|
|
|
54
54
|
saveTenant?: (tenant: string) => void;
|
|
55
55
|
onAutoJoinUserToTenant?: (platformName: string) => void;
|
|
56
56
|
redirectToAuthSpa?: (redirectTo?: string, platformKey?: string, logout?: boolean, saveRedirect?: boolean) => void;
|
|
57
|
+
username?: string;
|
|
57
58
|
};
|
|
58
59
|
/**
|
|
59
60
|
* TenantProvider Component
|
|
@@ -65,5 +66,5 @@ type Props = {
|
|
|
65
66
|
* 4. Handles tenant-specific domain redirects
|
|
66
67
|
* 5. Maintains tenant access state
|
|
67
68
|
*/
|
|
68
|
-
export declare function TenantProvider({ children, fallback, onAuthSuccess, onAuthFailure, currentTenant, requestedTenant, saveCurrentTenant, saveUserTenants, handleTenantSwitch, saveVisitingTenant, removeVisitingTenant, saveUserTokens, saveTenant, onAutoJoinUserToTenant, redirectToAuthSpa, }: 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;
|
|
69
|
+
export declare function TenantProvider({ children, fallback, onAuthSuccess, onAuthFailure, currentTenant, requestedTenant, saveCurrentTenant, saveUserTenants, handleTenantSwitch, saveVisitingTenant, removeVisitingTenant, saveUserTokens, saveTenant, onAutoJoinUserToTenant, redirectToAuthSpa, username, }: 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;
|
|
69
70
|
export {};
|