@iblai/web-utils 1.6.8 → 1.6.10

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.
Files changed (87) hide show
  1. package/dist/data-layer/src/features/mentor/privacy.d.ts +61 -0
  2. package/dist/data-layer/src/index.d.ts +1 -0
  3. package/dist/index.d.ts +678 -129
  4. package/dist/index.esm.js +14675 -21731
  5. package/dist/index.esm.js.map +1 -1
  6. package/dist/index.js +14757 -21728
  7. package/dist/index.js.map +1 -1
  8. package/dist/package.json +11 -2
  9. package/dist/web-utils/src/features/chat-input/__tests__/api-slice.test.d.ts +1 -0
  10. package/dist/web-utils/src/features/chat-input/api-slice.d.ts +12 -0
  11. package/dist/web-utils/src/features/files/filesSlice.d.ts +3 -0
  12. package/dist/web-utils/src/features/host-chat/__tests__/slice.test.d.ts +1 -0
  13. package/dist/web-utils/src/features/host-chat/slice.d.ts +17 -0
  14. package/dist/web-utils/src/features/index.d.ts +5 -0
  15. package/dist/web-utils/src/features/rbac/__tests__/rbac-slice.test.d.ts +1 -0
  16. package/dist/web-utils/src/features/rbac/rbac-slice.d.ts +13 -0
  17. package/dist/web-utils/src/features/subscription/__tests__/slice.test.d.ts +1 -0
  18. package/dist/web-utils/src/features/subscription/constants.d.ts +12 -0
  19. package/dist/web-utils/src/features/subscription/slice.d.ts +29 -0
  20. package/dist/web-utils/src/features/top-banner/__tests__/slice.test.d.ts +1 -0
  21. package/dist/web-utils/src/features/top-banner/slice.d.ts +24 -0
  22. package/dist/web-utils/src/hooks/__tests__/use-accessing-public-route.test.d.ts +1 -0
  23. package/dist/web-utils/src/hooks/__tests__/use-cached-session-id.test.d.ts +1 -0
  24. package/dist/web-utils/src/hooks/__tests__/use-chat-file-upload.test.d.ts +1 -0
  25. package/dist/web-utils/src/hooks/__tests__/use-embed-mode.test.d.ts +1 -0
  26. package/dist/web-utils/src/hooks/__tests__/use-event-callback.test.d.ts +1 -0
  27. package/dist/web-utils/src/hooks/__tests__/use-event-listener.test.d.ts +1 -0
  28. package/dist/web-utils/src/hooks/__tests__/use-file-drag-drop.test.d.ts +1 -0
  29. package/dist/web-utils/src/hooks/__tests__/use-local-storage.test.d.ts +1 -0
  30. package/dist/web-utils/src/hooks/__tests__/use-model-file-upload-capabilities.test.d.ts +1 -0
  31. package/dist/web-utils/src/hooks/__tests__/use-os.test.d.ts +1 -0
  32. package/dist/web-utils/src/hooks/__tests__/use-responsive.test.d.ts +1 -0
  33. package/dist/web-utils/src/hooks/__tests__/use-show-attachment.test.d.ts +1 -0
  34. package/dist/web-utils/src/hooks/__tests__/use-show-free-trial-dialog.test.d.ts +1 -0
  35. package/dist/web-utils/src/hooks/__tests__/use-show-voice-call.test.d.ts +1 -0
  36. package/dist/web-utils/src/hooks/__tests__/use-show-voice-recorder.test.d.ts +1 -0
  37. package/dist/web-utils/src/hooks/__tests__/use-timer.test.d.ts +1 -0
  38. package/dist/web-utils/src/hooks/__tests__/use-tokens.test.d.ts +1 -0
  39. package/dist/web-utils/src/hooks/__tests__/use-user-agreement.test.d.ts +1 -0
  40. package/dist/web-utils/src/hooks/__tests__/use-user.test.d.ts +1 -0
  41. package/dist/web-utils/src/hooks/__tests__/use-voice-chat.test.d.ts +1 -0
  42. package/dist/web-utils/src/hooks/__tests__/use-welcome-message.test.d.ts +1 -0
  43. package/dist/web-utils/src/hooks/chat/use-advanced-chat.d.ts +3 -2
  44. package/dist/web-utils/src/hooks/chat/use-chat-v2.d.ts +1 -1
  45. package/dist/web-utils/src/hooks/index.d.ts +23 -0
  46. package/dist/web-utils/src/hooks/subscription-v2/__tests__/use-402-error-check.test.d.ts +1 -0
  47. package/dist/web-utils/src/hooks/subscription-v2/use-402-error-check.d.ts +22 -0
  48. package/dist/web-utils/src/hooks/use-accessing-public-route.d.ts +1 -0
  49. package/dist/web-utils/src/hooks/use-cached-session-id.d.ts +8 -0
  50. package/dist/web-utils/src/hooks/use-chat-file-upload.d.ts +17 -0
  51. package/dist/web-utils/src/hooks/use-embed-mode.d.ts +1 -0
  52. package/dist/web-utils/src/hooks/use-event-callback.d.ts +2 -0
  53. package/dist/web-utils/src/hooks/use-event-listener.d.ts +6 -0
  54. package/dist/web-utils/src/hooks/use-file-drag-drop.d.ts +15 -0
  55. package/dist/web-utils/src/hooks/use-isomorphic-layout-effect.d.ts +2 -0
  56. package/dist/web-utils/src/hooks/use-local-storage.d.ts +13 -0
  57. package/dist/web-utils/src/hooks/use-mentor-settings.d.ts +39 -19
  58. package/dist/web-utils/src/hooks/use-model-file-upload-capabilities.d.ts +21 -0
  59. package/dist/web-utils/src/hooks/use-os.d.ts +8 -0
  60. package/dist/web-utils/src/hooks/use-responsive.d.ts +13 -0
  61. package/dist/web-utils/src/hooks/use-show-attachment.d.ts +7 -0
  62. package/dist/web-utils/src/hooks/use-show-free-trial-dialog.d.ts +31 -0
  63. package/dist/web-utils/src/hooks/use-show-voice-call.d.ts +7 -0
  64. package/dist/web-utils/src/hooks/use-show-voice-recorder.d.ts +7 -0
  65. package/dist/web-utils/src/hooks/use-timer.d.ts +7 -0
  66. package/dist/web-utils/src/hooks/use-tokens.d.ts +2 -0
  67. package/dist/web-utils/src/hooks/use-user-agreement.d.ts +21 -0
  68. package/dist/web-utils/src/hooks/use-user.d.ts +23 -0
  69. package/dist/web-utils/src/hooks/use-voice-chat.d.ts +11 -0
  70. package/dist/web-utils/src/hooks/use-welcome-message.d.ts +16 -0
  71. package/dist/web-utils/src/providers/__tests__/auth-provider.test.d.ts +1 -0
  72. package/dist/web-utils/src/providers/__tests__/service-worker-provider.test.d.ts +1 -0
  73. package/dist/web-utils/src/providers/auth-provider.d.ts +1 -1
  74. package/dist/web-utils/src/providers/index.d.ts +1 -0
  75. package/dist/web-utils/src/providers/service-worker-provider.d.ts +21 -0
  76. package/dist/web-utils/src/services/__tests__/event-bus.test.d.ts +1 -0
  77. package/dist/web-utils/src/services/__tests__/register-sw.test.d.ts +1 -0
  78. package/dist/web-utils/src/services/event-bus.d.ts +6 -0
  79. package/dist/web-utils/src/services/index.d.ts +2 -0
  80. package/dist/web-utils/src/services/register-sw.d.ts +71 -0
  81. package/dist/web-utils/src/utils/__tests__/tauri-api-cache.test.d.ts +1 -0
  82. package/dist/web-utils/src/utils/constants.d.ts +18 -0
  83. package/dist/web-utils/src/utils/helpers.d.ts +20 -0
  84. package/dist/web-utils/src/utils/index.d.ts +1 -0
  85. package/dist/web-utils/src/utils/platform.d.ts +1 -0
  86. package/dist/web-utils/src/utils/tauri-api-cache.d.ts +19 -0
  87. package/package.json +11 -2
package/dist/index.d.ts CHANGED
@@ -1,17 +1,21 @@
1
1
  import * as _iblai_iblai_api from '@iblai/iblai-api';
2
2
  import { FreeUsageCount, StripeCustomerPortalRequest } from '@iblai/iblai-api';
3
+ import * as _iblai_data_layer from '@iblai/data-layer';
3
4
  import { StripeContextResponse, AccessCheckResponse, UploadProfileImageResponse, RemoveProfileImageResponse, StorageService, TokenResponse, FileUploadURLResponse } from '@iblai/data-layer';
4
- import * as React from 'react';
5
- import React__default from 'react';
6
- import { PricingModalData as PricingModalData$1 } from '@web-utils/types/subscription';
5
+ import * as React$1 from 'react';
6
+ import React__default, { useEffect, RefObject, Dispatch, SetStateAction, ComponentType } from 'react';
7
+ import { PricingModalData as PricingModalData$2 } from '@web-utils/types/subscription';
7
8
  import { OpUnitType } from 'dayjs';
8
9
  import duration from 'dayjs/plugin/duration';
9
10
  import { ChatStatus as ChatStatus$1 } from '@web-utils/features';
10
11
  import { Error402MessageData as Error402MessageData$1, Tenant as Tenant$3 } from '@web-utils/types';
11
12
  import * as _reduxjs_toolkit from '@reduxjs/toolkit';
12
13
  import { Reducer, Slice } from '@reduxjs/toolkit';
13
- import * as react_jsx_runtime from 'react/jsx-runtime';
14
14
  import { z } from 'zod';
15
+ import * as react_jsx_runtime from 'react/jsx-runtime';
16
+ import { Slice as Slice$1, Reducer as Reducer$1 } from '@reduxjs/toolkit/react';
17
+ import * as redux from 'redux';
18
+ import * as mitt from 'mitt';
15
19
 
16
20
  interface Tenant$2 {
17
21
  key: string;
@@ -247,10 +251,10 @@ declare const useSubscriptionHandlerV2: (subscriptionFlow: SubscriptionFlowV2) =
247
251
  };
248
252
 
249
253
  declare const useExternalPricingPlan: ({ pricingModalData, userEmail, }: {
250
- pricingModalData: PricingModalData$1;
254
+ pricingModalData: PricingModalData$2;
251
255
  userEmail: string;
252
256
  }) => {
253
- pricingBoxIframeRef: React.RefObject<null>;
257
+ pricingBoxIframeRef: React$1.RefObject<null>;
254
258
  };
255
259
 
256
260
  declare const SUBSCRIPTION_V2_TRIGGERS: {
@@ -310,6 +314,28 @@ declare const SUBSCRIPTION_PACKAGES_V2: {
310
314
  PRO_PACKAGE: string;
311
315
  };
312
316
 
317
+ type PricingTablePayload = {
318
+ pricing_table_id?: string;
319
+ publishable_key?: string;
320
+ client_reference_id?: string;
321
+ };
322
+ type Local402Data = {
323
+ error?: string;
324
+ message?: string;
325
+ pricing_table?: PricingTablePayload;
326
+ };
327
+ interface Use402ErrorCheckProps {
328
+ /**
329
+ * Called when an admin hits a 402. Hosts wire this to whatever navigation
330
+ * primitive they use (Next router push, history.pushState, custom event, etc.)
331
+ * to surface the billing tab.
332
+ */
333
+ navigateToAdminBilling: () => void;
334
+ }
335
+ declare const use402ErrorCheck: ({ navigateToAdminBilling, }: Use402ErrorCheckProps) => {
336
+ handle402Error: (messageData: Local402Data) => Promise<void>;
337
+ };
338
+
313
339
  declare const useDayJs: () => {
314
340
  getTimeDifferenceBetweenTwoDates: (futureDate: string, pastDate: string, format?: OpUnitType) => number;
315
341
  getDayJSDurationObjFromSeconds: (seconds: number) => duration.Duration;
@@ -485,7 +511,7 @@ interface ArtifactVersion {
485
511
  created_by?: string;
486
512
  change_summary?: string;
487
513
  }
488
- interface Message {
514
+ interface Message$1 {
489
515
  id: string;
490
516
  role: "user" | "assistant" | "system";
491
517
  content: string;
@@ -550,7 +576,7 @@ interface UseChatProps {
550
576
  id: string | null;
551
577
  content: string;
552
578
  }) => void;
553
- onAddUserMessage?: (activeTab: AdvancedTab, message: Message) => void;
579
+ onAddUserMessage?: (activeTab: AdvancedTab, message: Message$1) => void;
554
580
  sendMessageToParentWebsite?: (payload: unknown) => void;
555
581
  on402Error?: (message: Error402MessageData$1) => void;
556
582
  onOAuthRequired?: (data: OAuthRequiredData) => void;
@@ -570,6 +596,7 @@ declare const useChat: ({ wsUrl, wsToken, flowConfig, sessionId, stopGenerationW
570
596
 
571
597
  declare const MENTOR_CHAT_DOCUMENTS_EXTENSIONS: string[];
572
598
  declare const ANONYMOUS_USERNAME = "anonymous";
599
+ declare const DEFAULT_DISCLAIMER_CONTENT = "By accessing and using the [ibl.ai](http://ibl.ai/) MentorAI platform (\u201CPlatform\u201D), you agree to the following terms. The Platform provides AI-powered mentorship and educational support. You understand that AI responses may contain inaccuracies, and you are responsible for independently verifying any information before relying on it for academic, professional, or personal decisions. Do not input confidential, sensitive, or personally identifiable information of yourself or others.\nAll content, code, and data processed through the Platform remain the property of their respective owners. [ibl.ai](http://ibl.ai/) retains all rights to the Platform\u2019s underlying technology and intellectual property. You are granted a limited, non-exclusive, revocable license to use the Platform for personal or institutional learning purposes only.\nYour use must comply with applicable laws and institutional policies. Misuse\u2014including attempting to bypass security, copy source code, or use the service for unlawful activity\u2014may result in suspension or termination of access. Continued use constitutes acceptance of these terms.";
573
600
  declare const MAX_INITIAL_WEBSOCKET_CONNECTION_ATTEMPTS = 3;
574
601
  declare const LOCAL_STORAGE_KEYS: {
575
602
  CURRENT_TENANT: string;
@@ -579,6 +606,8 @@ declare const LOCAL_STORAGE_KEYS: {
579
606
  TOKEN_EXPIRY: string;
580
607
  USER_DATA: string;
581
608
  USER_TENANTS: string;
609
+ VISITING_TENANT: string;
610
+ SESSION_ID: string;
582
611
  EDX_TOKEN_KEY: string;
583
612
  DM_TOKEN_KEY: string;
584
613
  DM_TOKEN_EXPIRES: string;
@@ -613,7 +642,146 @@ declare const TOOLS: {
613
642
  declare const REQUIRED_ACTIONS_FOR_GROUPS: {
614
643
  readonly NOTIFICATIONS: "Ibl.Notifications/Notification/action";
615
644
  };
645
+ declare const MENTOR_VISIBILITY_VALUES: {
646
+ ADMINISTRATORS: "viewable_by_tenant_admins";
647
+ STUDENTS: "viewable_by_tenant_students";
648
+ ANYONE: "viewable_by_anyone";
649
+ };
650
+ declare const MENTOR_VISIBILITY: ({
651
+ label: string;
652
+ value: "viewable_by_tenant_admins";
653
+ } | {
654
+ label: string;
655
+ value: "viewable_by_tenant_students";
656
+ } | {
657
+ label: string;
658
+ value: "viewable_by_anyone";
659
+ })[];
660
+
661
+ type ChatMode = "advanced" | "default";
662
+
663
+ interface UseExternalPricingProps {
664
+ referenceId: string;
665
+ customerEmail: string;
666
+ publishableKey: string;
667
+ pricingId?: string;
668
+ }
669
+ interface PricingModalData$1 {
670
+ referenceId: string;
671
+ customerEmail: string;
672
+ publishableKey: string;
673
+ pricingTableId: string;
674
+ }
675
+ interface CreateStripeCustomerPortalRequest {
676
+ org: string;
677
+ userId: string;
678
+ requestBody: StripeCustomerPortalRequest;
679
+ }
680
+ /**
681
+ * Shape of the 402 Payment Required error response body.
682
+ * Note: Only `error` is required. Other fields may not be present
683
+ * in all error scenarios (e.g., generic API 402 vs WebSocket 402).
684
+ */
685
+ interface Error402MessageData extends Partial<AccessCheckResponse> {
686
+ error: string;
687
+ message?: string;
688
+ details?: {
689
+ platform_key: string;
690
+ current_balance_usd: string;
691
+ required_usd: string;
692
+ deficit_usd: string;
693
+ };
694
+ pricing_table?: {
695
+ pricing_table_id: string;
696
+ pricing_table_js: string;
697
+ publishable_key?: string;
698
+ client_reference_id?: string;
699
+ };
700
+ }
701
+
702
+ declare const userDataSchema: z.ZodObject<{
703
+ user_display_name: z.ZodString;
704
+ user_email: z.ZodString;
705
+ user_fullname: z.ZodString;
706
+ user_id: z.ZodNumber;
707
+ user_nicename: z.ZodString;
708
+ }, "strip", z.ZodTypeAny, {
709
+ user_display_name: string;
710
+ user_email: string;
711
+ user_fullname: string;
712
+ user_id: number;
713
+ user_nicename: string;
714
+ }, {
715
+ user_display_name: string;
716
+ user_email: string;
717
+ user_fullname: string;
718
+ user_id: number;
719
+ user_nicename: string;
720
+ }>;
721
+ declare const tenantSchema: z.ZodObject<{
722
+ key: z.ZodString;
723
+ is_admin: z.ZodBoolean;
724
+ org: z.ZodString;
725
+ }, "strip", z.ZodTypeAny, {
726
+ key: string;
727
+ is_admin: boolean;
728
+ org: string;
729
+ }, {
730
+ key: string;
731
+ is_admin: boolean;
732
+ org: string;
733
+ }>;
734
+ declare const tenantKeySchema: z.ZodString;
735
+ type TenantKeyMentorIdParams = {
736
+ tenantKey: string;
737
+ mentorId: string;
738
+ };
739
+ interface TopTrialBannerProps {
740
+ parentContainer: string;
741
+ bannerText?: string;
742
+ onUpgrade?: string;
743
+ loading?: boolean;
744
+ tooltipText?: string;
745
+ }
746
+ interface Prompt {
747
+ type: "static" | "human" | "ai";
748
+ icon?: string;
749
+ summary?: string;
750
+ content?: string;
751
+ proactive?: boolean;
752
+ hide?: boolean;
753
+ tag?: string;
754
+ }
755
+ interface Tenant {
756
+ key: string;
757
+ is_admin: boolean;
758
+ org: string;
759
+ name?: string;
760
+ platform_name: string;
761
+ is_advertising?: boolean;
762
+ is_enterprise?: boolean;
763
+ show_paywall?: boolean;
764
+ }
616
765
 
766
+ /**
767
+ * Reads the cached user_nicename from the LOCAL_STORAGE_KEYS.USER_DATA blob.
768
+ */
769
+ declare const getUserName: () => string | null;
770
+ /**
771
+ * Reads the cached user_email from the LOCAL_STORAGE_KEYS.USER_DATA blob.
772
+ */
773
+ declare const getUserEmail: () => string | null;
774
+ /**
775
+ * Whether Stripe-backed billing is active for the given tenant. The Stripe
776
+ * feature flag is a host-side config value; pass it in. Tenants opt in via
777
+ * `show_paywall` or by being the "main" platform tenant.
778
+ */
779
+ declare function isStripeActivated(currentTenant: Tenant | null | undefined, stripeEnabled: boolean): boolean;
780
+ /**
781
+ * Checks whether a file matches any of the accepted type specifiers.
782
+ * Supports MIME types (image/png), wildcard MIME (image/*), and extensions (.pdf).
783
+ */
784
+ declare function isFileAccepted(file: File, acceptedTypes: string[]): boolean;
617
785
  declare const isJSON: (text: string) => boolean;
618
786
  declare const getInitials: (fullName: string) => string;
619
787
  declare const ALPHANUMERIC_32_REGEX: RegExp;
@@ -832,11 +1000,32 @@ declare const isWeb: () => boolean;
832
1000
  declare const isNode: () => string | false;
833
1001
  declare const isExpo: () => any;
834
1002
  declare const isTauri: () => boolean;
835
- declare const getPlatform: () => "react-native" | "web" | "node" | "unknown";
1003
+ declare function isSafariBrowser(): boolean;
1004
+ declare const getPlatform: () => "web" | "react-native" | "node" | "unknown";
836
1005
  declare const safeRequire: (moduleName: string) => any;
837
1006
  declare const getNextNavigation: () => any;
838
1007
 
839
- type ChatState = Record<AdvancedTab, Message[]>;
1008
+ /**
1009
+ * Tauri API Cache
1010
+ *
1011
+ * localStorage-backed caching for API responses when running inside Tauri.
1012
+ * In offline mode, cached responses are returned instead of making network requests.
1013
+ */
1014
+ declare function isTauriOfflineMode(): boolean;
1015
+ declare function getCachedApiResponse<T>(endpoint: string, params?: Record<string, unknown>): T | null;
1016
+ declare function setCachedApiResponse<T>(endpoint: string, data: T, params?: Record<string, unknown>, ttlMs?: number): void;
1017
+ declare function clearApiCache(): void;
1018
+ declare function fetchWithCache<T>(endpoint: string, fetchFn: () => Promise<T>, params?: Record<string, unknown>, ttlMs?: number): Promise<T>;
1019
+ declare const CacheKeys: {
1020
+ readonly mentorSettings: (org: string, mentor: string, userId: string) => string;
1021
+ readonly mentorPublicSettings: (org: string, mentor: string) => string;
1022
+ readonly tenantMetadata: (org: string) => string;
1023
+ readonly userTenants: (userId: string) => string;
1024
+ readonly sessionChats: (sessionId: string) => string;
1025
+ };
1026
+ declare function preCacheMentorData(org: string, mentorId: string, userId: string, fetchMentorSettings: () => Promise<unknown>, fetchTenantMetadata: () => Promise<unknown>): Promise<void>;
1027
+
1028
+ type ChatState = Record<AdvancedTab, Message$1[]>;
840
1029
  type SessionIds = Record<AdvancedTab, string>;
841
1030
  type StreamingMessage = {
842
1031
  id: string;
@@ -958,7 +1147,7 @@ declare const selectTokenEnabled: (state: {
958
1147
  }) => boolean;
959
1148
  declare const selectActiveChatMessages: (state: {
960
1149
  chatSliceShared: ChatSliceState;
961
- }) => Message[];
1150
+ }) => Message$1[];
962
1151
  declare const selectNumberOfActiveChatMessages: (state: {
963
1152
  chatSliceShared: ChatSliceState;
964
1153
  }) => number;
@@ -1071,6 +1260,9 @@ declare const updateFileMetadata: _reduxjs_toolkit.ActionCreatorWithoutPayload<`
1071
1260
  declare const updateFileRetryCount: _reduxjs_toolkit.ActionCreatorWithoutPayload<`${string}/${string}`> | _reduxjs_toolkit.ActionCreatorWithPayload<any, `${string}/${string}`> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, never> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, any> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, never> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, any>;
1072
1261
  declare const updateFileUrlFromWebSocket: _reduxjs_toolkit.ActionCreatorWithoutPayload<`${string}/${string}`> | _reduxjs_toolkit.ActionCreatorWithPayload<any, `${string}/${string}`> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, never> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, any> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, never> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, any>;
1073
1262
  declare const filesReducer: Reducer<FilesState>;
1263
+ declare const selectAttachedFiles: (state: {
1264
+ files: FilesState;
1265
+ }) => AttachedFile[];
1074
1266
 
1075
1267
  /**
1076
1268
  * Combines multiple CSV data objects by merging rows based on a common column.
@@ -1125,112 +1317,107 @@ declare const setAccessCheckResponse: _reduxjs_toolkit.ActionCreatorWithoutPaylo
1125
1317
  declare const showMonetizationCheckoutModal: _reduxjs_toolkit.ActionCreatorWithoutPayload<`${string}/${string}`> | _reduxjs_toolkit.ActionCreatorWithPayload<any, `${string}/${string}`> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, never> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, any> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, never> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, any>;
1126
1318
  declare const setAdvancedDisplayMonetizationCheckoutModal: _reduxjs_toolkit.ActionCreatorWithoutPayload<`${string}/${string}`> | _reduxjs_toolkit.ActionCreatorWithPayload<any, `${string}/${string}`> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, never> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, any> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, never> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, any>;
1127
1319
 
1128
- type ChatMode = "advanced" | "default";
1320
+ type RbacPermissions = {
1321
+ mentors: Record<string, unknown>;
1322
+ mentor: Record<string, unknown>;
1323
+ };
1324
+ interface RbacState {
1325
+ rbacPermissions: RbacPermissions | Record<string, never>;
1326
+ }
1327
+ declare const updateRbacPermissions: _reduxjs_toolkit.ActionCreatorWithPayload<RbacPermissions | Record<string, never>, "rbac/updateRbacPermissions">;
1328
+ declare const rbacReducer: Reducer<RbacState>;
1329
+ declare const selectRbacPermissions: (state: {
1330
+ rbac: RbacState;
1331
+ }) => RbacPermissions | Record<string, never>;
1129
1332
 
1130
- interface UseExternalPricingProps {
1131
- referenceId: string;
1132
- customerEmail: string;
1133
- publishableKey: string;
1134
- pricingId?: string;
1333
+ interface ChatInputState {
1334
+ textareaInput: string;
1135
1335
  }
1336
+ declare const chatInputSlice: Slice$1<ChatInputState>;
1337
+ declare const chatInputSliceSelectors: {
1338
+ selectTextareaInput: (state: {
1339
+ chatInput: ChatInputState;
1340
+ }) => string;
1341
+ };
1342
+ declare const chatInputSliceActions: _reduxjs_toolkit.CaseReducerActions<_reduxjs_toolkit.SliceCaseReducers<ChatInputState>, string>;
1343
+ declare const chatInputSliceReducer: Reducer$1<ChatInputState>;
1344
+
1345
+ interface Message {
1346
+ role: "user" | "assistant";
1347
+ content: string;
1348
+ replyTo?: unknown;
1349
+ }
1350
+ interface HostChatState {
1351
+ messages: Message[];
1352
+ enableChatActionsPopup: boolean;
1353
+ }
1354
+ declare const hostChatSlice: Slice<HostChatState>;
1355
+ declare const addMessage: _reduxjs_toolkit.ActionCreatorWithoutPayload<`${string}/${string}`> | _reduxjs_toolkit.ActionCreatorWithPayload<any, `${string}/${string}`> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, never> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, any> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, never> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, any>;
1356
+ declare const clearMessages: _reduxjs_toolkit.ActionCreatorWithoutPayload<`${string}/${string}`> | _reduxjs_toolkit.ActionCreatorWithPayload<any, `${string}/${string}`> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, never> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, any> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, never> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, any>;
1357
+ declare const enableChatActionsPopup: _reduxjs_toolkit.ActionCreatorWithoutPayload<`${string}/${string}`> | _reduxjs_toolkit.ActionCreatorWithPayload<any, `${string}/${string}`> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, never> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, any> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, never> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, any>;
1358
+ declare const hostChatReducer: redux.Reducer<HostChatState>;
1359
+ declare const selectEnableChatActionsPopup: (state: {
1360
+ chat: HostChatState;
1361
+ }) => boolean;
1362
+
1136
1363
  interface PricingModalData {
1137
1364
  referenceId: string;
1138
1365
  customerEmail: string;
1139
1366
  publishableKey: string;
1140
1367
  pricingTableId: string;
1141
1368
  }
1142
- interface CreateStripeCustomerPortalRequest {
1143
- org: string;
1144
- userId: string;
1145
- requestBody: StripeCustomerPortalRequest;
1369
+ interface FreeTrialUsageOptions {
1370
+ count: number;
1371
+ limitReached: boolean;
1372
+ message: string;
1146
1373
  }
1147
- /**
1148
- * Shape of the 402 Payment Required error response body.
1149
- * Note: Only `error` is required. Other fields may not be present
1150
- * in all error scenarios (e.g., generic API 402 vs WebSocket 402).
1151
- */
1152
- interface Error402MessageData extends Partial<AccessCheckResponse> {
1153
- error: string;
1154
- message?: string;
1155
- details?: {
1156
- platform_key: string;
1157
- current_balance_usd: string;
1158
- required_usd: string;
1159
- deficit_usd: string;
1160
- };
1161
- pricing_table?: {
1162
- pricing_table_id: string;
1163
- pricing_table_js: string;
1164
- publishable_key?: string;
1165
- client_reference_id?: string;
1166
- };
1374
+ interface SubscriptionStatus {
1375
+ creditExhausted: boolean;
1376
+ userCapability?: string;
1377
+ callToAction?: string;
1378
+ }
1379
+ interface SubscriptionState {
1380
+ openPricingModal: boolean;
1381
+ openAppleRestrictionModal: boolean;
1382
+ freeTrialUsageOptions: FreeTrialUsageOptions;
1383
+ pricingModalData: PricingModalData;
1384
+ subscriptionStatus: SubscriptionStatus;
1385
+ error402Detected: string;
1167
1386
  }
1387
+ declare const subscriptionSlice: Slice<SubscriptionState>;
1388
+ declare const setOpenPricingModal: _reduxjs_toolkit.ActionCreatorWithoutPayload<`${string}/${string}`> | _reduxjs_toolkit.ActionCreatorWithPayload<any, `${string}/${string}`> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, never> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, any> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, never> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, any>;
1389
+ declare const setOpenAppleRestrictionModal: _reduxjs_toolkit.ActionCreatorWithoutPayload<`${string}/${string}`> | _reduxjs_toolkit.ActionCreatorWithPayload<any, `${string}/${string}`> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, never> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, any> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, never> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, any>;
1390
+ declare const setFreeTrialUsageOptions: _reduxjs_toolkit.ActionCreatorWithoutPayload<`${string}/${string}`> | _reduxjs_toolkit.ActionCreatorWithPayload<any, `${string}/${string}`> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, never> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, any> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, never> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, any>;
1391
+ declare const setPricingModalData: _reduxjs_toolkit.ActionCreatorWithoutPayload<`${string}/${string}`> | _reduxjs_toolkit.ActionCreatorWithPayload<any, `${string}/${string}`> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, never> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, any> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, never> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, any>;
1392
+ declare const setSubscriptionStatus: _reduxjs_toolkit.ActionCreatorWithoutPayload<`${string}/${string}`> | _reduxjs_toolkit.ActionCreatorWithPayload<any, `${string}/${string}`> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, never> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, any> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, never> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, any>;
1393
+ declare const setError402Detected: _reduxjs_toolkit.ActionCreatorWithoutPayload<`${string}/${string}`> | _reduxjs_toolkit.ActionCreatorWithPayload<any, `${string}/${string}`> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, never> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, any> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, never> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, any>;
1394
+ declare const subscriptionReducer: redux.Reducer<SubscriptionState>;
1168
1395
 
1169
- declare const userDataSchema: z.ZodObject<{
1170
- user_display_name: z.ZodString;
1171
- user_email: z.ZodString;
1172
- user_fullname: z.ZodString;
1173
- user_id: z.ZodNumber;
1174
- user_nicename: z.ZodString;
1175
- }, "strip", z.ZodTypeAny, {
1176
- user_display_name: string;
1177
- user_email: string;
1178
- user_fullname: string;
1179
- user_id: number;
1180
- user_nicename: string;
1181
- }, {
1182
- user_display_name: string;
1183
- user_email: string;
1184
- user_fullname: string;
1185
- user_id: number;
1186
- user_nicename: string;
1187
- }>;
1188
- declare const tenantSchema: z.ZodObject<{
1189
- key: z.ZodString;
1190
- is_admin: z.ZodBoolean;
1191
- org: z.ZodString;
1192
- }, "strip", z.ZodTypeAny, {
1193
- key: string;
1194
- is_admin: boolean;
1195
- org: string;
1196
- }, {
1197
- key: string;
1198
- is_admin: boolean;
1199
- org: string;
1200
- }>;
1201
- declare const tenantKeySchema: z.ZodString;
1202
- type TenantKeyMentorIdParams = {
1203
- tenantKey: string;
1204
- mentorId: string;
1205
- };
1206
- interface TopTrialBannerProps {
1207
- parentContainer: string;
1396
+ /**
1397
+ * Structural shape of TopBannerProps. Mirrors `@iblai/web-containers`
1398
+ * `<TopBanner>` so this slice can be consumed without taking a circular
1399
+ * dependency on the web-containers package.
1400
+ */
1401
+ interface TopBannerOptions {
1402
+ parentContainerSelector: string;
1208
1403
  bannerText?: string;
1209
- onUpgrade?: string;
1210
1404
  loading?: boolean;
1211
1405
  tooltipText?: string;
1406
+ buttonHandler?: () => void;
1407
+ buttonLabel?: string;
1408
+ onLoad?: (bannerRef: HTMLDivElement) => void;
1409
+ onClose?: () => void;
1410
+ enabled: boolean;
1411
+ onUpgrade?: string;
1212
1412
  }
1213
- interface Prompt {
1214
- type: "static" | "human" | "ai";
1215
- icon?: string;
1216
- summary?: string;
1217
- content?: string;
1218
- proactive?: boolean;
1219
- hide?: boolean;
1220
- tag?: string;
1221
- }
1222
- interface Tenant {
1223
- key: string;
1224
- is_admin: boolean;
1225
- org: string;
1226
- name?: string;
1227
- platform_name: string;
1228
- is_advertising?: boolean;
1229
- is_enterprise?: boolean;
1230
- show_paywall?: boolean;
1413
+ interface TopBannerState {
1414
+ topBannerOptions: TopBannerOptions;
1231
1415
  }
1416
+ declare const topBannerSlice: Slice<TopBannerState>;
1417
+ declare const setTopBannerOptions: _reduxjs_toolkit.ActionCreatorWithoutPayload<`${string}/${string}`> | _reduxjs_toolkit.ActionCreatorWithPayload<any, `${string}/${string}`> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, never> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, any> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, never> | _reduxjs_toolkit.ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, any>;
1418
+ declare const topBannerReducer: redux.Reducer<TopBannerState>;
1232
1419
 
1233
- type Props$5 = {
1420
+ type Props$7 = {
1234
1421
  mode?: ChatMode;
1235
1422
  tenantKey: string;
1236
1423
  mentorId: string;
@@ -1251,9 +1438,10 @@ type Props$5 = {
1251
1438
  isOffline?: boolean;
1252
1439
  onOfflineWithoutLocalLLM?: () => void;
1253
1440
  isPublicRoute?: boolean;
1441
+ initialPrompt?: string;
1254
1442
  };
1255
- declare function useAdvancedChat({ tenantKey, mentorId, username, token, wsUrl, stopGenerationWsUrl, redirectToAuthSpa, errorHandler, sendMessageToParentWebsite, isPreviewMode, mentorShareableToken, on402Error, cachedSessionId, onStartNewChat, onOAuthRequired, onOAuthResolved, isOffline, onOfflineWithoutLocalLLM, isPublicRoute, }: Props$5): {
1256
- messages: Message[];
1443
+ declare function useAdvancedChat({ tenantKey, mentorId, username, token, wsUrl, stopGenerationWsUrl, redirectToAuthSpa, errorHandler, sendMessageToParentWebsite, isPreviewMode, mentorShareableToken, on402Error, cachedSessionId, onStartNewChat, onOAuthRequired, onOAuthResolved, isOffline, onOfflineWithoutLocalLLM, isPublicRoute, initialPrompt, }: Props$7): {
1444
+ messages: Message$1[];
1257
1445
  isStreaming: boolean;
1258
1446
  status: ChatStatus;
1259
1447
  isPending: boolean;
@@ -1267,7 +1455,7 @@ declare function useAdvancedChat({ tenantKey, mentorId, username, token, wsUrl,
1267
1455
  enabledGuidedPrompts: boolean;
1268
1456
  sendMessage: (tab: AdvancedTab, text: string, options?: SendMessageOptions) => Promise<void>;
1269
1457
  stopGenerating: () => void;
1270
- setMessage: (message: Message) => void;
1458
+ setMessage: (message: Message$1) => void;
1271
1459
  changeTab: (tab: AdvancedTab) => Promise<void>;
1272
1460
  sessionId: string;
1273
1461
  startNewChat: () => Promise<void>;
@@ -1276,20 +1464,20 @@ declare function useAdvancedChat({ tenantKey, mentorId, username, token, wsUrl,
1276
1464
  isConnected: React__default.MutableRefObject<boolean>;
1277
1465
  messageQueue: React__default.MutableRefObject<any[]>;
1278
1466
  sessionIds: SessionIds;
1279
- enableSafetyDisclaimer: boolean;
1467
+ enableSafetyDisclaimer: any;
1280
1468
  resetConnection: () => void;
1281
1469
  isLoadingChats: boolean;
1282
1470
  refetchChats: () => Promise<void>;
1283
1471
  };
1284
1472
 
1285
- type Props$4 = {
1473
+ type Props$6 = {
1286
1474
  tenantKey: string;
1287
1475
  mentorId: string;
1288
1476
  username: string;
1289
1477
  errorHandler?: (message: string, error?: any) => void;
1290
1478
  isPublicRoute?: boolean;
1291
1479
  };
1292
- declare function useMentorTools({ tenantKey, mentorId, username, errorHandler, isPublicRoute, }: Props$4): {
1480
+ declare function useMentorTools({ tenantKey, mentorId, username, errorHandler, isPublicRoute, }: Props$6): {
1293
1481
  tools: any;
1294
1482
  activeTools: string[];
1295
1483
  updateSessionTools: (tool: string) => Promise<void>;
@@ -1460,31 +1648,51 @@ interface TenantMetadata {
1460
1648
  }
1461
1649
  declare const METADATAS: TenantMetadata$1[];
1462
1650
 
1463
- type Props$3 = {
1651
+ type Props$5 = {
1464
1652
  mentorId: string;
1465
1653
  tenantKey: string;
1466
- username: string;
1654
+ /**
1655
+ * Whether the caller is on a public route (e.g. a shareable token link).
1656
+ * Skips the private mentor-settings query when true.
1657
+ */
1467
1658
  isPublicRoute?: boolean;
1659
+ /**
1660
+ * Key of the platform's "main" tenant. When provided, isCommunityMentor
1661
+ * resolves to true only if the mentor lives under this tenant. Without it,
1662
+ * isCommunityMentor is always false.
1663
+ */
1664
+ mainTenantKey?: string;
1468
1665
  };
1469
- type MentorSettingsData = {
1470
- profileImage?: string | null;
1471
- greetingMethod?: string | null;
1472
- proactiveResponse?: string | null;
1473
- llmProvider?: string | null;
1474
- llmName?: string | null;
1475
- mentorUniqueId?: string | null;
1476
- mentorVisibility?: string | null | any;
1477
- mentorName?: string | null;
1478
- enableGuidedPrompts?: boolean | null;
1479
- mentorSlug?: string | null;
1480
- safetyDisclaimer: boolean;
1481
- mentorTools?: any[] | null;
1482
- allowAnonymous?: boolean | null;
1483
- };
1484
- type UseMentorSettingsReturn = {
1485
- data: MentorSettingsData;
1666
+ declare function useMentorSettings({ mentorId, tenantKey, isPublicRoute, mainTenantKey, }: Props$5): {
1667
+ isLoading: boolean;
1668
+ data: {
1669
+ profileImage: string | null | undefined;
1670
+ greetingMethod: string | undefined;
1671
+ proactiveResponse: string | undefined;
1672
+ llmProvider: string;
1673
+ llmName: string | undefined;
1674
+ mentorUniqueId: string | undefined;
1675
+ mentorName: string | undefined;
1676
+ enableGuidedPrompts: boolean | undefined;
1677
+ mentorSlug: string | undefined;
1678
+ safetyDisclaimer: any;
1679
+ isCommunityMentor: boolean;
1680
+ disclaimer: string | undefined;
1681
+ mentorVisibility: _iblai_iblai_api.NullEnum | null | undefined;
1682
+ allowAnonymous: boolean | undefined;
1683
+ showAttachment: boolean | undefined;
1684
+ showVoiceCall: boolean | undefined;
1685
+ showVoiceRecord: boolean | undefined;
1686
+ embedShowAttachment: boolean | undefined;
1687
+ embedShowVoiceCall: boolean | undefined;
1688
+ embedShowVoiceRecord: boolean | undefined;
1689
+ llmConfig: any;
1690
+ mentorDbId: number | undefined;
1691
+ starterPrompts: string | undefined;
1692
+ memoryEnabled: boolean;
1693
+ mentorTools: any;
1694
+ };
1486
1695
  };
1487
- declare function useMentorSettings({ mentorId, tenantKey, username, isPublicRoute, }: Props$3): UseMentorSettingsReturn;
1488
1696
 
1489
1697
  interface UseStripeUpgradeArgs {
1490
1698
  redirectUrl: string;
@@ -1500,6 +1708,249 @@ declare const useStripeUpgrade: ({ redirectUrl, sourcePlatformKey, mainPlatformK
1500
1708
  handleUpgrade: (redirectPlan?: StripeUpgradePlan) => Promise<void>;
1501
1709
  };
1502
1710
 
1711
+ declare const useIsomorphicLayoutEffect: typeof useEffect;
1712
+
1713
+ declare function useEventCallback<Args extends unknown[], R>(fn: (...args: Args) => R): (...args: Args) => R;
1714
+ declare function useEventCallback<Args extends unknown[], R>(fn: ((...args: Args) => R) | undefined): ((...args: Args) => R) | undefined;
1715
+
1716
+ declare function useEventListener<K extends keyof MediaQueryListEventMap>(eventName: K, handler: (event: MediaQueryListEventMap[K]) => void, element: RefObject<MediaQueryList>, options?: boolean | AddEventListenerOptions): void;
1717
+ declare function useEventListener<K extends keyof WindowEventMap>(eventName: K, handler: (event: WindowEventMap[K]) => void, element?: undefined, options?: boolean | AddEventListenerOptions): void;
1718
+ declare function useEventListener<K extends keyof HTMLElementEventMap & keyof SVGElementEventMap, T extends Element = K extends keyof HTMLElementEventMap ? HTMLDivElement : SVGElement>(eventName: K, handler: ((event: HTMLElementEventMap[K]) => void) | ((event: SVGElementEventMap[K]) => void), element: RefObject<T>, options?: boolean | AddEventListenerOptions): void;
1719
+ declare function useEventListener<K extends keyof DocumentEventMap>(eventName: K, handler: (event: DocumentEventMap[K]) => void, element: RefObject<Document>, options?: boolean | AddEventListenerOptions): void;
1720
+
1721
+ declare global {
1722
+ interface WindowEventMap {
1723
+ "local-storage": CustomEvent;
1724
+ }
1725
+ }
1726
+ type UseLocalStorageOptions<T> = {
1727
+ serializer?: (value: T) => string;
1728
+ deserializer?: (value: string) => T;
1729
+ initializeWithValue?: boolean;
1730
+ };
1731
+ declare function useLocalStorage<T>(key: string, initialValue: T | (() => T), options?: UseLocalStorageOptions<T>): [T, Dispatch<SetStateAction<T>>, () => void];
1732
+
1733
+ declare function useUserData(): {
1734
+ user_display_name: string;
1735
+ user_email: string;
1736
+ user_fullname: string;
1737
+ user_id: number;
1738
+ user_nicename: string;
1739
+ } | null;
1740
+ declare function useUsername(): string | null;
1741
+ declare function useVisitingTenant(): {
1742
+ visitingTenant: Tenant | undefined;
1743
+ saveVisitingTenant: React$1.Dispatch<React$1.SetStateAction<Tenant | undefined>>;
1744
+ removeVisitingTenant: () => void;
1745
+ };
1746
+ declare function useUserTenants(): {
1747
+ userTenants: Tenant[];
1748
+ saveUserTenants: React$1.Dispatch<React$1.SetStateAction<Tenant[]>>;
1749
+ };
1750
+ declare function useCurrentTenant(): {
1751
+ currentTenant: Tenant | null;
1752
+ saveCurrentTenant: React$1.Dispatch<React$1.SetStateAction<Tenant | null>>;
1753
+ };
1754
+ declare function useIsAdmin(): boolean;
1755
+
1756
+ declare function useDmToken(): string;
1757
+ declare function useAxdToken(): string;
1758
+
1759
+ declare function useAccessingPublicRoute(): boolean;
1760
+
1761
+ declare function useEmbedMode(): boolean;
1762
+
1763
+ interface FileUploadCapabilities$1 {
1764
+ supportsFileUpload: boolean;
1765
+ allSupportedTypes: string[];
1766
+ maxFileSizeMB: number;
1767
+ maxFilesPerMessage: number;
1768
+ }
1769
+ interface UseChatFileUploadProps {
1770
+ org: string;
1771
+ userId: string;
1772
+ errorHandler?: (error: string) => void;
1773
+ capabilities?: FileUploadCapabilities$1;
1774
+ }
1775
+ declare function useChatFileUpload({ org, userId, errorHandler, capabilities, }: UseChatFileUploadProps): {
1776
+ uploadFiles: (files: File[]) => Promise<void>;
1777
+ retryUpload: (fileId: string) => Promise<void>;
1778
+ };
1779
+
1780
+ interface UseModelFileUploadCapabilitiesProps {
1781
+ mentorId: string;
1782
+ tenantKey: string;
1783
+ isPublicRoute?: boolean;
1784
+ }
1785
+ interface FileUploadCapabilities {
1786
+ supportsFileUpload: boolean;
1787
+ supportsImages: boolean;
1788
+ supportsDocuments: boolean;
1789
+ supportedImageTypes: string[];
1790
+ supportedDocumentTypes: string[];
1791
+ allSupportedTypes: string[];
1792
+ maxFileSizeMB: number;
1793
+ maxFilesPerMessage: number;
1794
+ supportsFileUrls: boolean;
1795
+ }
1796
+ /**
1797
+ * Hook to determine file upload capabilities based on the LLM config.
1798
+ */
1799
+ declare function useModelFileUploadCapabilities({ mentorId, tenantKey, isPublicRoute, }: UseModelFileUploadCapabilitiesProps): FileUploadCapabilities;
1800
+
1801
+ interface UseFileDragDropOptions {
1802
+ org: string;
1803
+ userId: string;
1804
+ mentorId: string;
1805
+ tenantKey: string;
1806
+ isPublicRoute?: boolean;
1807
+ }
1808
+ declare function useFileDragDrop({ org, userId, mentorId, tenantKey, isPublicRoute, }: UseFileDragDropOptions): {
1809
+ isDraggingFile: boolean;
1810
+ handleDragOver: (e: React__default.DragEvent) => void;
1811
+ handleDragLeave: (e: React__default.DragEvent) => void;
1812
+ handleDrop: (e: React__default.DragEvent) => Promise<void>;
1813
+ };
1814
+
1815
+ /**
1816
+ * Persists a map of mentorId -> sessionId in localStorage so a chat session
1817
+ * can be restored across reloads on a per-mentor basis.
1818
+ *
1819
+ * Returns a tuple shaped like useLocalStorage:
1820
+ * `[cachedSessionId, saveCachedSessionId]`.
1821
+ */
1822
+ declare function useCachedSessionId(): [Record<string, string>, React$1.Dispatch<React$1.SetStateAction<Record<string, string>>>, () => void];
1823
+
1824
+ interface UseUserAgreementProps {
1825
+ mentorId: string;
1826
+ tenantKey: string;
1827
+ }
1828
+ declare function useUserAgreement({ mentorId, tenantKey, }: UseUserAgreementProps): {
1829
+ showDisclaimerModal: boolean;
1830
+ setShowDisclaimerModal: React$1.Dispatch<React$1.SetStateAction<boolean>>;
1831
+ isAgreeing: boolean;
1832
+ pendingSubmitContent: string;
1833
+ userAgreement: _iblai_data_layer.Disclaimer | {
1834
+ readonly content: "By accessing and using the [ibl.ai](http://ibl.ai/) MentorAI platform (“Platform”), you agree to the following terms. The Platform provides AI-powered mentorship and educational support. You understand that AI responses may contain inaccuracies, and you are responsible for independently verifying any information before relying on it for academic, professional, or personal decisions. Do not input confidential, sensitive, or personally identifiable information of yourself or others.\nAll content, code, and data processed through the Platform remain the property of their respective owners. [ibl.ai](http://ibl.ai/) retains all rights to the Platform’s underlying technology and intellectual property. You are granted a limited, non-exclusive, revocable license to use the Platform for personal or institutional learning purposes only.\nYour use must comply with applicable laws and institutional policies. Misuse—including attempting to bypass security, copy source code, or use the service for unlawful activity—may result in suspension or termination of access. Continued use constitutes acceptance of these terms.";
1835
+ readonly active: false;
1836
+ };
1837
+ hasUserAgreement: boolean;
1838
+ hasUserAgreedToDisclaimer: boolean;
1839
+ isDisclaimersLoading: boolean;
1840
+ handleDisclaimerAgree: () => Promise<void>;
1841
+ checkAgreementAndExecute: (content: string, executeCallback: (content: string) => void) => void;
1842
+ executePendingSubmit: (executeCallback: (content: string) => void) => void;
1843
+ };
1844
+
1845
+ interface UseShowVoiceRecorderProps {
1846
+ mentorId: string;
1847
+ tenantKey: string;
1848
+ isPublicRoute?: boolean;
1849
+ }
1850
+ declare function useShowVoiceRecorder({ mentorId, tenantKey, isPublicRoute, }: UseShowVoiceRecorderProps): boolean;
1851
+
1852
+ interface UseShowVoiceCallProps {
1853
+ mentorId: string;
1854
+ tenantKey: string;
1855
+ isPublicRoute?: boolean;
1856
+ }
1857
+ declare function useShowVoiceCall({ mentorId, tenantKey, isPublicRoute, }: UseShowVoiceCallProps): boolean;
1858
+
1859
+ interface UseShowAttachmentProps {
1860
+ mentorId: string;
1861
+ tenantKey: string;
1862
+ isPublicRoute?: boolean;
1863
+ }
1864
+ declare function useShowAttachment({ mentorId, tenantKey, isPublicRoute, }: UseShowAttachmentProps): boolean;
1865
+
1866
+ type Props$4 = {
1867
+ sessionId: string;
1868
+ username: string;
1869
+ tenantKey: string;
1870
+ mentorId: string;
1871
+ mentorUniqueId: string;
1872
+ token: string;
1873
+ wsUrl: string;
1874
+ isPublicRoute?: boolean;
1875
+ isNewSession?: boolean;
1876
+ };
1877
+ declare function useWelcome({ sessionId, username, tenantKey, mentorId, mentorUniqueId, token, wsUrl, isPublicRoute, isNewSession, }: Props$4): {
1878
+ welcomeMessage: string;
1879
+ handleSendProactivePrompt: () => void;
1880
+ };
1881
+
1882
+ /**
1883
+ * Tracks container width / viewport and returns a small screen-size bag.
1884
+ * If a ref is passed, the hook observes that element via ResizeObserver
1885
+ * and reacts to its width changes; otherwise it tracks window width.
1886
+ */
1887
+ declare const useResponsive: (containerRef?: React.RefObject<HTMLElement>) => {
1888
+ isMobile: boolean;
1889
+ isTablet: boolean;
1890
+ isLaptop: boolean;
1891
+ isDesktop: boolean;
1892
+ screenSize: "sm" | "md" | "lg" | "xl";
1893
+ containerWidth: number;
1894
+ };
1895
+
1896
+ declare function useTimer(): {
1897
+ startTime: Date | null;
1898
+ time: number;
1899
+ isRunning: boolean;
1900
+ start: () => void;
1901
+ stop: () => void;
1902
+ };
1903
+
1904
+ interface Props$3 {
1905
+ sendMessage: (message: string) => void;
1906
+ tenantKey: string;
1907
+ }
1908
+ declare function useVoiceChat({ sendMessage, tenantKey }: Props$3): {
1909
+ handleMicrophoneBtnClick: () => Promise<void>;
1910
+ recording: boolean;
1911
+ processing: boolean;
1912
+ time: number;
1913
+ };
1914
+
1915
+ interface FreeTrialDialogProps {
1916
+ isOpen: boolean;
1917
+ onClose: () => void;
1918
+ }
1919
+ interface UseShowFreeTrialDialogReturn {
1920
+ FreeTrialDialog: ComponentType<FreeTrialDialogProps> | null;
1921
+ closeModal: () => void;
1922
+ isModalOpen: boolean;
1923
+ /**
1924
+ * Run a callback, optionally gated by the trial check. The second
1925
+ * `enforceTrialCheck` flag mirrors the mentor app's signature so call
1926
+ * sites that pass `false` (i.e. opt-out of gating) typecheck against
1927
+ * the stub. The stub ignores the flag and always runs the callback.
1928
+ */
1929
+ executeWithTrialCheck: (callback: () => void, enforceTrialCheck?: boolean) => void;
1930
+ }
1931
+ /**
1932
+ * Stub implementation of the mentor app's free-trial gate.
1933
+ *
1934
+ * Always reports the gate as inactive (`isModalOpen: false`,
1935
+ * `FreeTrialDialog: null`) and executes any guarded callback immediately.
1936
+ * Mirrors the call-site shape of the mentor app's
1937
+ * `useShowFreeTrialDialog` so the reusable Chat can render without
1938
+ * pulling in the entire subscription / Apple-restriction flow.
1939
+ *
1940
+ * Host apps that want a real gate should replace this hook with their
1941
+ * own implementation that wires up the subscription flow they use.
1942
+ */
1943
+ declare function useShowFreeTrialDialog(): UseShowFreeTrialDialogReturn;
1944
+
1945
+ /**
1946
+ * Returns OS-derived flags. Currently only detects whether the host is an
1947
+ * Apple device (macOS or iOS) via Tauri's plugin-os. In plain browsers
1948
+ * (no Tauri runtime) `isAppleDevice` is always false.
1949
+ */
1950
+ declare const useOS: () => {
1951
+ isAppleDevice: boolean;
1952
+ };
1953
+
1503
1954
  /**
1504
1955
  * Sync authentication state to cookies (web only)
1505
1956
  * Should be called on login, logout, and tenant switch
@@ -1518,7 +1969,7 @@ declare function clearCurrentTenantCookie(): void;
1518
1969
  * On React Native, this is a no-op
1519
1970
  */
1520
1971
  declare function clearAuthCookies(): void;
1521
- declare function getUserName(storageService: StorageService): Promise<any>;
1972
+ declare function getStoredUserName(storageService: StorageService): Promise<any>;
1522
1973
  declare function useAuthProvider({ middleware, onAuthSuccess, onAuthFailure, redirectToAuthSpa, hasNonExpiredAuthToken, username, pathname, storageService, skipAuthCheck, token, enableStorageSync, }: Props$2): {
1523
1974
  isAuthenticating: boolean;
1524
1975
  userIsAccessingPublicRoute: boolean;
@@ -1674,6 +2125,97 @@ type Props = {
1674
2125
  */
1675
2126
  declare function TenantProvider({ children, fallback, onAuthSuccess, onAuthFailure, currentTenant, requestedTenant, saveCurrentTenant, saveUserTenants, handleTenantSwitch, saveVisitingTenant, removeVisitingTenant, saveUserTokens, saveTenant, onAutoJoinUserToTenant, redirectToAuthSpa, username, isIframed, setUseMentorProvider, skip, onLoadPlatformPermissions, skipCustomDomainCheck, onTenantMismatch, }: Props): string | number | bigint | boolean | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null | undefined;
1676
2127
 
2128
+ /**
2129
+ * Service Worker Registration Helper
2130
+ *
2131
+ * Handles registration, updates, and communication with the service worker.
2132
+ */
2133
+ interface ServiceWorkerStatus {
2134
+ isSupported: boolean;
2135
+ isRegistered: boolean;
2136
+ isOnline: boolean;
2137
+ registration: ServiceWorkerRegistration | null;
2138
+ updateAvailable: boolean;
2139
+ }
2140
+ type UpdateCallback = (registration: ServiceWorkerRegistration) => void;
2141
+ type StatusChangeCallback = (status: ServiceWorkerStatus) => void;
2142
+ /**
2143
+ * Check if service workers are supported
2144
+ */
2145
+ declare function isServiceWorkerSupported(): boolean;
2146
+ /**
2147
+ * Get current service worker status
2148
+ */
2149
+ declare function getServiceWorkerStatus(): ServiceWorkerStatus;
2150
+ /**
2151
+ * Register the service worker.
2152
+ * Defers registration until the page is fully loaded to avoid
2153
+ * interfering with chunk loading — especially in WebKit/Safari where
2154
+ * early SW registration can cause ChunkLoadError timeouts.
2155
+ */
2156
+ declare function registerServiceWorker(basePath?: string): Promise<ServiceWorkerRegistration | null>;
2157
+ /**
2158
+ * Unregister the service worker
2159
+ */
2160
+ declare function unregisterServiceWorker(): Promise<boolean>;
2161
+ /**
2162
+ * Skip waiting and activate new service worker immediately
2163
+ */
2164
+ declare function skipWaiting(): void;
2165
+ /**
2166
+ * Clear all caches
2167
+ */
2168
+ declare function clearAllCaches(): void;
2169
+ /**
2170
+ * Tell service worker we're running in Tauri
2171
+ */
2172
+ declare function setTauriMode(isTauri: boolean): void;
2173
+ /**
2174
+ * Tell service worker about offline status (from Tauri)
2175
+ */
2176
+ declare function setOfflineStatus(isOffline: boolean): void;
2177
+ /**
2178
+ * Request cache status from service worker
2179
+ */
2180
+ declare function getCacheStatus(): Promise<Record<string, number> | null>;
2181
+ /**
2182
+ * Subscribe to service worker updates
2183
+ */
2184
+ declare function onUpdate(callback: UpdateCallback): () => void;
2185
+ /**
2186
+ * Subscribe to status changes (online/offline, registration, updates)
2187
+ */
2188
+ declare function onStatusChange(callback: StatusChangeCallback): () => void;
2189
+ /**
2190
+ * Setup online/offline listeners
2191
+ */
2192
+ declare function setupNetworkListeners(): () => void;
2193
+ /**
2194
+ * Initialize service worker and network listeners
2195
+ * Call this once when app loads
2196
+ */
2197
+ declare function initServiceWorker(basePath?: string): Promise<ServiceWorkerStatus>;
2198
+
2199
+ interface ServiceWorkerContextValue {
2200
+ status: ServiceWorkerStatus;
2201
+ applyUpdate: () => void;
2202
+ clearCache: () => void;
2203
+ refreshCacheStatus: () => Promise<Record<string, number> | null>;
2204
+ checkNetworkNow: () => Promise<boolean>;
2205
+ }
2206
+ declare function useServiceWorker(): ServiceWorkerContextValue;
2207
+ interface ServiceWorkerProviderProps {
2208
+ children: React.ReactNode;
2209
+ /**
2210
+ * Base path used when registering the service worker. The SW is fetched
2211
+ * from `${basePath}/sw.js` and scoped to `basePath || '/'`. Pass the
2212
+ * host app's bundler-resolved base path (e.g. Next.js's
2213
+ * `process.env.NEXT_PUBLIC_BASE_PATH`). Defaults to '' (root).
2214
+ */
2215
+ basePath?: string;
2216
+ }
2217
+ declare function ServiceWorkerProvider({ children, basePath, }: ServiceWorkerProviderProps): react_jsx_runtime.JSX.Element;
2218
+
1677
2219
  /**
1678
2220
  * Chat area size constants
1679
2221
  */
@@ -1742,6 +2284,13 @@ declare function createMultipleFileReferences(files: File[], sessionId: string,
1742
2284
  */
1743
2285
  declare function validateFile(file: File, maxSizeBytes?: number, allowedTypes?: string[]): string | null;
1744
2286
 
2287
+ declare const eventBus: mitt.Emitter<Record<mitt.EventType, unknown>>;
2288
+ declare enum RemoteEvents {
2289
+ newChat = "MENTOR:NEW_CHAT",
2290
+ stopChatGenerating = "MENTOR:STOP_CHAT_GENERATING",
2291
+ sendChatMessage = "MENTOR:SEND_CHAT_MESSAGE"
2292
+ }
2293
+
1745
2294
  type WithFormPermissionsProps = {
1746
2295
  name: string | string[];
1747
2296
  permissions: Record<string, {
@@ -1786,5 +2335,5 @@ declare const WithPermissions: ({ rbacResource, rbacPermissions, children, }: Wi
1786
2335
  */
1787
2336
  declare const checkRbacPermission: (rbacPermissions: object, rbacResource: string, enableRBAC?: boolean) => boolean;
1788
2337
 
1789
- export { ALPHANUMERIC_32_REGEX, ANONYMOUS_USERNAME, AuthContext, AuthContextProvider, AuthProvider, CHAT_AREA_SIZE, LOCAL_STORAGE_KEYS, MAX_INITIAL_WEBSOCKET_CONNECTION_ATTEMPTS, MENTOR_CHAT_DOCUMENTS_EXTENSIONS, METADATAS, MentorProvider, REQUIRED_ACTIONS_FOR_GROUPS, STREAMING_CONTENT_BUFFER_THRESHOLD, STREAMING_CONTENT_FLUSH_INTERVAL, SUBSCRIPTION_MESSAGES, SUBSCRIPTION_PACKAGES, SUBSCRIPTION_PACKAGES_V2, SUBSCRIPTION_TRIGGERS, SUBSCRIPTION_V2_TRIGGERS, SubscriptionFlow, SubscriptionFlowV2, TOOLS, TenantContext, TenantContextProvider, TenantProvider, TimeTracker, WithFormPermissions, WithPermissions, addFiles, addProtocolToUrl, advancedTabs, advancedTabsProperties, chatActions, chatSliceReducerShared, checkModelAvailable, checkOllamaHealth, checkRbacPermission, clearAuthCookies, clearCookies, clearCurrentTenantCookie, clearFiles, combineCSVData, convertToOllamaMessages, createFileReference, createMultipleFileReferences, csvDataToText, defaultSessionIds, deleteCookie, deleteCookieOnAllDomains, filesReducer, filesSlice, formatRelativeTime, getAuthSpaJoinUrl, getCookieValue, getDomainParts, getFileInfo, getInitials, getLocalLLMSystemPrompt, getNextNavigation, getParentDomain, getPlatform, getPlatformKey, getTimeAgo, getUserName, handleLogout, isAlphaNumeric32, isExpo, isInIframe, isJSON, isLoggedIn, isNode, isReactNative, isTauri, isWeb, loadMetadataConfig, markdownToPlainText, monetizationSlice, parseCSV, redirectToAuthSpa, redirectToAuthSpaJoinTenant, removeFile, requestPresignedUrl, safeRequire, selectActiveChatMessages, selectActiveTab, selectArtifactsEnabled, selectChats, selectCurrentStreamingArtifact, selectCurrentStreamingMessage, selectDocumentFilter, selectIframeContext, selectIsError, selectIsPending, selectIsStopped, selectIsTyping, selectLastArtifactContentFlushTime, selectMetadata, selectNumberOfActiveChatMessages, selectSessionId, selectSessionIds, selectShouldStartNewChat, selectShowingSharedChat, selectStatus, selectStreaming, selectStreamingArtifactContentBuffer, selectStreamingArtifactFullContent, selectToken, selectTokenEnabled, selectTools, sendMessageToParentWebsite, setAccessCheckResponse, setAdvancedDisplayMonetizationCheckoutModal, setCookieForAuth, setDisplayMonetizationCheckoutModal, showMonetizationCheckoutModal, streamOllamaChat, syncAuthToCookies, tenantKeySchema, tenantSchema, translatePrompt, updateFileMetadata, updateFileProgress, updateFileRetryCount, updateFileStatus, updateFileUrl, updateFileUrlFromWebSocket, uploadToS3, useAdvancedChat, useAuthContext, useAuthProvider, useChat, useDayJs, useExternalPricingPlan, useMentorSettings, useMentorTools, useProfileImageUpload, useStripeUpgrade, useSubscriptionHandler, useSubscriptionHandlerV2, useTenantContext, useTenantMetadata, useTimeTracker, useTimeTrackerNative, useUserProfileUpdate, userDataSchema, validateFile };
1790
- export type { AdvancedTab, ArtifactData, ArtifactPayload, ArtifactVersion, AttachedFile, AuthContextType, ChatMode, ChatSliceState, ChatState, ChatStatus, CreateStripeCustomerPortalRequest, Error402MessageData, FileAttachment, FileInfo, FileProcessingEvent, FileReference, FileUploadState, FilesState, HandleLogoutOptions, Message, MessageAction, MonetizationState, OAuthRequiredData, OAuthResolvedData, OllamaChatRequest, OllamaChatStreamResponse, OllamaMessage, OllamaStreamCallbacks, PricingModalData, Prompt, RedirectToAuthSpaOptions, SendMessageOptions, SessionIds, StreamingArtifact, StreamingMessage, StripeUpgradePlan, SubscriptionFlowConfig, SubscriptionFlowConfigV2, Tenant, TenantContextType, TenantKeyMentorIdParams, TenantMetadata, TimeTrackerConfig, TimeTrackerState, TopTrialBannerProps, UploadProgressCallback, UseChatProps, UseChatReturn, UseExternalPricingProps, UseProfileImageUploadOptions, UseProfileImageUploadReturn, UseTimeTrackerConfig, UseTimeTrackerNativeConfig, UseTimeTrackerNativeReturn, UseTimeTrackerReturn, UseUserProfileUpdateResult, UserProfileUpdateData };
2338
+ export { ALPHANUMERIC_32_REGEX, ANONYMOUS_USERNAME, AuthContext, AuthContextProvider, AuthProvider, CHAT_AREA_SIZE, CacheKeys, DEFAULT_DISCLAIMER_CONTENT, LOCAL_STORAGE_KEYS, MAX_INITIAL_WEBSOCKET_CONNECTION_ATTEMPTS, MENTOR_CHAT_DOCUMENTS_EXTENSIONS, MENTOR_VISIBILITY, MENTOR_VISIBILITY_VALUES, METADATAS, MentorProvider, REQUIRED_ACTIONS_FOR_GROUPS, RemoteEvents, STREAMING_CONTENT_BUFFER_THRESHOLD, STREAMING_CONTENT_FLUSH_INTERVAL, SUBSCRIPTION_MESSAGES, SUBSCRIPTION_PACKAGES, SUBSCRIPTION_PACKAGES_V2, SUBSCRIPTION_TRIGGERS, SUBSCRIPTION_V2_TRIGGERS, ServiceWorkerProvider, SubscriptionFlow, SubscriptionFlowV2, TOOLS, TenantContext, TenantContextProvider, TenantProvider, TimeTracker, WithFormPermissions, WithPermissions, addFiles, addMessage, addProtocolToUrl, advancedTabs, advancedTabsProperties, chatActions, chatInputSlice, chatInputSliceActions, chatInputSliceReducer, chatInputSliceSelectors, chatSliceReducerShared, checkModelAvailable, checkOllamaHealth, checkRbacPermission, clearAllCaches, clearApiCache, clearAuthCookies, clearCookies, clearCurrentTenantCookie, clearFiles, clearMessages, combineCSVData, convertToOllamaMessages, createFileReference, createMultipleFileReferences, csvDataToText, defaultSessionIds, deleteCookie, deleteCookieOnAllDomains, enableChatActionsPopup, eventBus, fetchWithCache, filesReducer, filesSlice, formatRelativeTime, getAuthSpaJoinUrl, getCacheStatus, getCachedApiResponse, getCookieValue, getDomainParts, getFileInfo, getInitials, getLocalLLMSystemPrompt, getNextNavigation, getParentDomain, getPlatform, getPlatformKey, getServiceWorkerStatus, getStoredUserName, getTimeAgo, getUserEmail, getUserName, handleLogout, hostChatReducer, hostChatSlice, initServiceWorker, isAlphaNumeric32, isExpo, isFileAccepted, isInIframe, isJSON, isLoggedIn, isNode, isReactNative, isSafariBrowser, isServiceWorkerSupported, isStripeActivated, isTauri, isTauriOfflineMode, isWeb, loadMetadataConfig, markdownToPlainText, monetizationSlice, onStatusChange, onUpdate, parseCSV, preCacheMentorData, rbacReducer, redirectToAuthSpa, redirectToAuthSpaJoinTenant, registerServiceWorker, removeFile, requestPresignedUrl, safeRequire, selectActiveChatMessages, selectActiveTab, selectArtifactsEnabled, selectAttachedFiles, selectChats, selectCurrentStreamingArtifact, selectCurrentStreamingMessage, selectDocumentFilter, selectEnableChatActionsPopup, selectIframeContext, selectIsError, selectIsPending, selectIsStopped, selectIsTyping, selectLastArtifactContentFlushTime, selectMetadata, selectNumberOfActiveChatMessages, selectRbacPermissions, selectSessionId, selectSessionIds, selectShouldStartNewChat, selectShowingSharedChat, selectStatus, selectStreaming, selectStreamingArtifactContentBuffer, selectStreamingArtifactFullContent, selectToken, selectTokenEnabled, selectTools, sendMessageToParentWebsite, setAccessCheckResponse, setAdvancedDisplayMonetizationCheckoutModal, setCachedApiResponse, setCookieForAuth, setDisplayMonetizationCheckoutModal, setError402Detected, setFreeTrialUsageOptions, setOfflineStatus, setOpenAppleRestrictionModal, setOpenPricingModal, setPricingModalData, setSubscriptionStatus, setTauriMode, setTopBannerOptions, setupNetworkListeners, showMonetizationCheckoutModal, skipWaiting, streamOllamaChat, subscriptionReducer, subscriptionSlice, syncAuthToCookies, tenantKeySchema, tenantSchema, topBannerReducer, topBannerSlice, translatePrompt, unregisterServiceWorker, updateFileMetadata, updateFileProgress, updateFileRetryCount, updateFileStatus, updateFileUrl, updateFileUrlFromWebSocket, updateRbacPermissions, uploadToS3, use402ErrorCheck, useAccessingPublicRoute, useAdvancedChat, useAuthContext, useAuthProvider, useAxdToken, useCachedSessionId, useChat, useChatFileUpload, useCurrentTenant, useDayJs, useDmToken, useEmbedMode, useEventCallback, useEventListener, useExternalPricingPlan, useFileDragDrop, useIsAdmin, useIsomorphicLayoutEffect, useLocalStorage, useMentorSettings, useMentorTools, useModelFileUploadCapabilities, useOS, useProfileImageUpload, useResponsive, useServiceWorker, useShowAttachment, useShowFreeTrialDialog, useShowVoiceCall, useShowVoiceRecorder, useStripeUpgrade, useSubscriptionHandler, useSubscriptionHandlerV2, useTenantContext, useTenantMetadata, useTimeTracker, useTimeTrackerNative, useTimer, useUserAgreement, useUserData, useUserProfileUpdate, useUserTenants, useUsername, useVisitingTenant, useVoiceChat, useWelcome as useWelcomeMessage, userDataSchema, validateFile };
2339
+ export type { AdvancedTab, ArtifactData, ArtifactPayload, ArtifactVersion, AttachedFile, AuthContextType, ChatInputState, ChatMode, ChatSliceState, ChatState, ChatStatus, CreateStripeCustomerPortalRequest, Error402MessageData, FileAttachment, FileInfo, FileProcessingEvent, FileReference, FileUploadCapabilities, FileUploadState, FilesState, HandleLogoutOptions, HostChatState, Message$1 as Message, MessageAction, MonetizationState, OAuthRequiredData, OAuthResolvedData, OllamaChatRequest, OllamaChatStreamResponse, OllamaMessage, OllamaStreamCallbacks, PricingModalData$1 as PricingModalData, PricingTablePayload, Prompt, RbacPermissions, RbacState, RedirectToAuthSpaOptions, SendMessageOptions, ServiceWorkerStatus, SessionIds, StreamingArtifact, StreamingMessage, StripeUpgradePlan, SubscriptionFlowConfig, SubscriptionFlowConfigV2, SubscriptionState, Tenant, TenantContextType, TenantKeyMentorIdParams, TenantMetadata, TimeTrackerConfig, TimeTrackerState, TopBannerOptions, TopBannerState, TopTrialBannerProps, UploadProgressCallback, UseChatProps, UseChatReturn, UseExternalPricingProps, UseProfileImageUploadOptions, UseProfileImageUploadReturn, UseTimeTrackerConfig, UseTimeTrackerNativeConfig, UseTimeTrackerNativeReturn, UseTimeTrackerReturn, UseUserProfileUpdateResult, UserProfileUpdateData };