@iblai/web-utils 1.11.7 → 1.11.9
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.esm.js.map +1 -1
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/web-utils/src/__tests__/index.mobile.test.d.ts +7 -0
- package/dist/auth/web-utils/src/__tests__/index.web.test.d.ts +8 -0
- package/dist/auth/web-utils/src/constants/__tests__/chat.test.d.ts +1 -0
- package/dist/auth/web-utils/src/constants/chat.d.ts +8 -0
- package/dist/auth/web-utils/src/features/apple-restriction/__tests__/slice.test.d.ts +1 -0
- package/dist/auth/web-utils/src/features/apple-restriction/slice.d.ts +7 -0
- package/dist/auth/web-utils/src/features/chat/__tests__/slice.test.d.ts +1 -0
- package/dist/auth/web-utils/src/features/chat/slice.d.ts +164 -0
- package/dist/auth/web-utils/src/features/chat-input/__tests__/api-slice.test.d.ts +1 -0
- package/dist/auth/web-utils/src/features/chat-input/api-slice.d.ts +12 -0
- package/dist/auth/web-utils/src/features/csv/combine-csv.d.ts +35 -0
- package/dist/auth/web-utils/src/features/csv/index.d.ts +1 -0
- package/dist/auth/web-utils/src/features/files/__tests__/filesSlice.test.d.ts +1 -0
- package/dist/auth/web-utils/src/features/files/filesSlice.d.ts +23 -0
- package/dist/auth/web-utils/src/features/host-chat/__tests__/slice.test.d.ts +1 -0
- package/dist/auth/web-utils/src/features/host-chat/slice.d.ts +17 -0
- package/dist/auth/web-utils/src/features/index.d.ts +11 -0
- package/dist/auth/web-utils/src/features/monetization/__tests__/slice.test.d.ts +1 -0
- package/dist/auth/web-utils/src/features/monetization/slice.d.ts +16 -0
- package/dist/auth/web-utils/src/features/rbac/__tests__/rbac-slice.test.d.ts +1 -0
- package/dist/auth/web-utils/src/features/rbac/rbac-slice.d.ts +13 -0
- package/dist/auth/web-utils/src/features/subscription/__tests__/slice.test.d.ts +1 -0
- package/dist/auth/web-utils/src/features/subscription/constants.d.ts +12 -0
- package/dist/auth/web-utils/src/features/subscription/slice.d.ts +28 -0
- package/dist/auth/web-utils/src/features/top-banner/__tests__/slice.test.d.ts +1 -0
- package/dist/auth/web-utils/src/features/top-banner/slice.d.ts +24 -0
- package/dist/auth/web-utils/src/features/tracking/__tests__/time-tracker.test.d.ts +1 -0
- package/dist/auth/web-utils/src/features/tracking/examples.d.ts +4 -0
- package/dist/auth/web-utils/src/features/tracking/index.d.ts +6 -0
- package/dist/auth/web-utils/src/features/tracking/time-tracker.d.ts +29 -0
- package/dist/auth/web-utils/src/features/tracking/use-time-tracker-native.d.ts +14 -0
- package/dist/auth/web-utils/src/features/tracking/use-time-tracker.d.ts +14 -0
- package/dist/auth/web-utils/src/hoc/index.d.ts +2 -0
- package/dist/auth/web-utils/src/hoc/with-permissions.d.ts +44 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-accessing-public-route.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-cached-session-id.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-chat-file-upload.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-embed-mode.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-event-callback.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-event-listener.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-file-drag-drop.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-local-storage.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-mentor-settings.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-model-file-upload-capabilities.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-os.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-responsive.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-show-attachment.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-show-free-trial-dialog.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-show-voice-call.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-show-voice-recorder.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-timer.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-tokens.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-user-agreement.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-user.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-voice-chat.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/__tests__/use-welcome-message.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/chat/__tests__/chat-history.utils.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/chat/chat-history.utils.d.ts +10 -0
- package/dist/auth/web-utils/src/hooks/chat/ollama-client.d.ts +57 -0
- package/dist/auth/web-utils/src/hooks/chat/use-advanced-chat.d.ts +61 -0
- package/dist/auth/web-utils/src/hooks/chat/use-advanced-chat.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/chat/use-chat-history.d.ts +17 -0
- package/dist/auth/web-utils/src/hooks/chat/use-chat-v2.d.ts +146 -0
- package/dist/auth/web-utils/src/hooks/chat/use-chat-v2.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/chat/use-chat.d.ts +53 -0
- package/dist/auth/web-utils/src/hooks/chat/use-get-chat-details.d.ts +14 -0
- package/dist/auth/web-utils/src/hooks/chat/use-get-chat-details.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/chat/use-mentor-tools.d.ts +24 -0
- package/dist/auth/web-utils/src/hooks/chat/use-mentor-tools.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/index.d.ts +42 -0
- package/dist/auth/web-utils/src/hooks/profile/use-profile-image-upload.d.ts +13 -0
- package/dist/auth/web-utils/src/hooks/profile/use-user-profile-update.d.ts +28 -0
- package/dist/auth/web-utils/src/hooks/stripe/__tests__/use-stripe-upgrade.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/stripe/use-stripe-upgrade.d.ts +14 -0
- package/dist/auth/web-utils/src/hooks/subscription/class-subscription-flow.d.ts +70 -0
- package/dist/auth/web-utils/src/hooks/subscription/constants.d.ts +4 -0
- package/dist/auth/web-utils/src/hooks/subscription/use-subscription-handler.d.ts +11 -0
- package/dist/auth/web-utils/src/hooks/subscription-v2/__tests__/use-402-error-check.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/subscription-v2/class-subscription-flow.d.ts +78 -0
- package/dist/auth/web-utils/src/hooks/subscription-v2/constants.d.ts +56 -0
- package/dist/auth/web-utils/src/hooks/subscription-v2/use-402-error-check.d.ts +22 -0
- package/dist/auth/web-utils/src/hooks/subscription-v2/use-external-pricing-plan.d.ts +7 -0
- package/dist/auth/web-utils/src/hooks/subscription-v2/use-subscription-handler.d.ts +71 -0
- package/dist/auth/web-utils/src/hooks/tenant-metadata/__tests__/config-loader.test.d.ts +10 -0
- package/dist/auth/web-utils/src/hooks/tenant-metadata/__tests__/use-tenant-metadata.test.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/tenant-metadata/config-loader.d.ts +41 -0
- package/dist/auth/web-utils/src/hooks/tenant-metadata/constants.d.ts +9 -0
- package/dist/auth/web-utils/src/hooks/tenant-metadata/index.d.ts +5 -0
- package/dist/auth/web-utils/src/hooks/tenant-metadata/types.d.ts +9 -0
- package/dist/auth/web-utils/src/hooks/tenant-metadata/use-tenant-metadata.d.ts +29 -0
- package/dist/auth/web-utils/src/hooks/use-accessing-public-route.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/use-cached-session-id.d.ts +8 -0
- package/dist/auth/web-utils/src/hooks/use-chat-file-upload.d.ts +17 -0
- package/dist/auth/web-utils/src/hooks/use-day-js.d.ts +7 -0
- package/dist/auth/web-utils/src/hooks/use-embed-mode.d.ts +1 -0
- package/dist/auth/web-utils/src/hooks/use-event-callback.d.ts +2 -0
- package/dist/auth/web-utils/src/hooks/use-event-listener.d.ts +6 -0
- package/dist/auth/web-utils/src/hooks/use-file-drag-drop.d.ts +15 -0
- package/dist/auth/web-utils/src/hooks/use-isomorphic-layout-effect.d.ts +2 -0
- package/dist/auth/web-utils/src/hooks/use-local-storage.d.ts +13 -0
- package/dist/auth/web-utils/src/hooks/use-mentor-settings.d.ts +46 -0
- package/dist/auth/web-utils/src/hooks/use-model-file-upload-capabilities.d.ts +21 -0
- package/dist/auth/web-utils/src/hooks/use-os.d.ts +8 -0
- package/dist/auth/web-utils/src/hooks/use-responsive.d.ts +13 -0
- package/dist/auth/web-utils/src/hooks/use-show-attachment.d.ts +7 -0
- package/dist/auth/web-utils/src/hooks/use-show-free-trial-dialog.d.ts +31 -0
- package/dist/auth/web-utils/src/hooks/use-show-voice-call.d.ts +7 -0
- package/dist/auth/web-utils/src/hooks/use-show-voice-recorder.d.ts +7 -0
- package/dist/auth/web-utils/src/hooks/use-tenant-switch-sync.d.ts +13 -0
- package/dist/auth/web-utils/src/hooks/use-timer.d.ts +7 -0
- package/dist/auth/web-utils/src/hooks/use-tokens.d.ts +2 -0
- package/dist/auth/web-utils/src/hooks/use-user-agreement.d.ts +18 -0
- package/dist/auth/web-utils/src/hooks/use-user.d.ts +23 -0
- package/dist/auth/web-utils/src/hooks/use-voice-chat.d.ts +11 -0
- package/dist/auth/web-utils/src/hooks/use-welcome-message.d.ts +16 -0
- package/dist/auth/web-utils/src/index.d.ts +8 -0
- package/dist/auth/web-utils/src/index.mobile.d.ts +86 -0
- package/dist/auth/web-utils/src/index.web.d.ts +142 -0
- package/dist/auth/web-utils/src/providers/__tests__/auth-provider.test.d.ts +1 -0
- package/dist/auth/web-utils/src/providers/__tests__/mentor-provider.test.d.ts +1 -0
- package/dist/auth/web-utils/src/providers/__tests__/service-worker-provider.test.d.ts +1 -0
- package/dist/auth/web-utils/src/providers/__tests__/tenant-provider.test.d.ts +1 -0
- package/dist/auth/web-utils/src/providers/auth-provider.d.ts +129 -0
- package/dist/auth/web-utils/src/providers/index.d.ts +4 -0
- package/dist/auth/web-utils/src/providers/mentor-provider.d.ts +44 -0
- package/dist/auth/web-utils/src/providers/service-worker-provider.d.ts +21 -0
- package/dist/auth/web-utils/src/providers/tenant-provider.d.ts +77 -0
- package/dist/auth/web-utils/src/services/__tests__/event-bus.test.d.ts +1 -0
- package/dist/auth/web-utils/src/services/__tests__/file-upload.test.d.ts +1 -0
- package/dist/auth/web-utils/src/services/__tests__/register-sw.test.d.ts +1 -0
- package/dist/auth/web-utils/src/services/event-bus.d.ts +6 -0
- package/dist/auth/web-utils/src/services/file-upload.d.ts +60 -0
- package/dist/auth/web-utils/src/services/index.d.ts +3 -0
- package/dist/auth/web-utils/src/services/register-sw.d.ts +71 -0
- package/dist/auth/web-utils/src/types/chat.d.ts +1 -0
- package/dist/auth/web-utils/src/types/file-upload.d.ts +62 -0
- package/dist/auth/web-utils/src/types/index.d.ts +68 -0
- package/dist/auth/web-utils/src/types/subscription.d.ts +40 -0
- package/dist/auth/web-utils/src/utils/__tests__/auth.test.d.ts +1 -0
- package/dist/auth/web-utils/src/utils/__tests__/constants.test.d.ts +1 -0
- package/dist/auth/web-utils/src/utils/__tests__/helpers.test.d.ts +1 -0
- package/dist/auth/web-utils/src/utils/__tests__/platform.test.d.ts +1 -0
- package/dist/auth/web-utils/src/utils/__tests__/tauri-api-cache.test.d.ts +1 -0
- package/dist/auth/web-utils/src/utils/__tests__/tenant-switch.test.d.ts +1 -0
- package/dist/auth/web-utils/src/utils/constants.d.ts +69 -0
- package/dist/auth/web-utils/src/utils/data/__tests__/advanced-tab.test.d.ts +1 -0
- package/dist/auth/web-utils/src/utils/data/advanced-tab.d.ts +62 -0
- package/dist/auth/web-utils/src/utils/helpers.d.ts +33 -0
- package/dist/auth/web-utils/src/utils/index.d.ts +6 -0
- package/dist/auth/web-utils/src/utils/platform.d.ts +9 -0
- package/dist/auth/web-utils/src/utils/tauri-api-cache.d.ts +19 -0
- package/dist/index.esm.js +581 -266
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +594 -279
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -2
- package/dist/web-utils/src/hooks/chat/use-advanced-chat.d.ts +4 -4
- package/dist/web-utils/src/hooks/subscription-v2/use-subscription-handler.d.ts +3 -3
- package/dist/web-utils/src/hooks/tenant-metadata/use-tenant-metadata.d.ts +3 -3
- package/dist/web-utils/src/hooks/use-isomorphic-layout-effect.d.ts +2 -2
- package/dist/web-utils/src/hooks/use-mentor-settings.d.ts +21 -21
- package/dist/web-utils/src/hooks/use-user-agreement.d.ts +3 -6
- package/dist/web-utils/tsconfig.tsbuildinfo +1 -0
- package/package.json +1 -2
- package/dist/data-layer/src/config.d.ts +0 -8
- package/dist/data-layer/src/constants.d.ts +0 -31
- package/dist/data-layer/src/core/index.d.ts +0 -11
- package/dist/data-layer/src/features/analytics/api-slice.d.ts +0 -3756
- package/dist/data-layer/src/features/analytics/constants.d.ts +0 -133
- package/dist/data-layer/src/features/analytics/custom-api-slice.d.ts +0 -311
- package/dist/data-layer/src/features/analytics/types.d.ts +0 -696
- package/dist/data-layer/src/features/api-keys/api-slice.d.ts +0 -702
- package/dist/data-layer/src/features/apps/api-slice.d.ts +0 -720
- package/dist/data-layer/src/features/artifacts/api-slice.d.ts +0 -1798
- package/dist/data-layer/src/features/artifacts/constants.d.ts +0 -42
- package/dist/data-layer/src/features/artifacts/types.d.ts +0 -37
- package/dist/data-layer/src/features/audit-logs/api-slice.d.ts +0 -268
- package/dist/data-layer/src/features/audit-logs/constants.d.ts +0 -11
- package/dist/data-layer/src/features/audit-logs/types.d.ts +0 -32
- package/dist/data-layer/src/features/auth/api-slice.d.ts +0 -639
- package/dist/data-layer/src/features/auth/constants.d.ts +0 -20
- package/dist/data-layer/src/features/auth/types.d.ts +0 -33
- package/dist/data-layer/src/features/billing/api-slice.d.ts +0 -359
- package/dist/data-layer/src/features/billing/constants.d.ts +0 -16
- package/dist/data-layer/src/features/billing/custom-api-slice.d.ts +0 -634
- package/dist/data-layer/src/features/billing/types.d.ts +0 -36
- package/dist/data-layer/src/features/call-configurations/api-slice.d.ts +0 -855
- package/dist/data-layer/src/features/call-configurations/constants.d.ts +0 -16
- package/dist/data-layer/src/features/call-configurations/types.d.ts +0 -49
- package/dist/data-layer/src/features/career/api-slice.d.ts +0 -3080
- package/dist/data-layer/src/features/catalog/api-slice.d.ts +0 -10260
- package/dist/data-layer/src/features/chat/api-slice.d.ts +0 -1977
- package/dist/data-layer/src/features/chat/constants.d.ts +0 -8
- package/dist/data-layer/src/features/chat/custom-api-slice.d.ts +0 -272
- package/dist/data-layer/src/features/chat-files/api-slice.d.ts +0 -185
- package/dist/data-layer/src/features/chat-files/types.d.ts +0 -32
- package/dist/data-layer/src/features/chat-history/api-slice.d.ts +0 -1528
- package/dist/data-layer/src/features/chat-privacy/api-slice.d.ts +0 -1398
- package/dist/data-layer/src/features/chat-privacy/constants.d.ts +0 -13
- package/dist/data-layer/src/features/claw/api-slice.d.ts +0 -5471
- package/dist/data-layer/src/features/claw/constants.d.ts +0 -126
- package/dist/data-layer/src/features/claw/types.d.ts +0 -275
- package/dist/data-layer/src/features/constants.d.ts +0 -3
- package/dist/data-layer/src/features/core/api-slice.d.ts +0 -6188
- package/dist/data-layer/src/features/core/constants.d.ts +0 -51
- package/dist/data-layer/src/features/core/custom-api-slice.d.ts +0 -1766
- package/dist/data-layer/src/features/core/custom-public-image-asset-api-slice.d.ts +0 -373
- package/dist/data-layer/src/features/core/types.d.ts +0 -73
- package/dist/data-layer/src/features/course-metadata/api-slice.d.ts +0 -1728
- package/dist/data-layer/src/features/course-metadata/types.d.ts +0 -179
- package/dist/data-layer/src/features/courses/api-slice.d.ts +0 -664
- package/dist/data-layer/src/features/courses/types.d.ts +0 -26
- package/dist/data-layer/src/features/credentials/api-slice.d.ts +0 -6360
- package/dist/data-layer/src/features/credentials/constants.d.ts +0 -36
- package/dist/data-layer/src/features/credentials/custom-api-slice.d.ts +0 -1839
- package/dist/data-layer/src/features/credentials/types.d.ts +0 -39
- package/dist/data-layer/src/features/custom-domain/api-slice.d.ts +0 -602
- package/dist/data-layer/src/features/custom-domain/constants.d.ts +0 -20
- package/dist/data-layer/src/features/custom-domain/types.d.ts +0 -46
- package/dist/data-layer/src/features/datasets/api-slice.d.ts +0 -439
- package/dist/data-layer/src/features/disclaimers/api-slice.d.ts +0 -912
- package/dist/data-layer/src/features/disclaimers/constants.d.ts +0 -27
- package/dist/data-layer/src/features/disclaimers/types.d.ts +0 -67
- package/dist/data-layer/src/features/edx-proctoring/api-slice.d.ts +0 -590
- package/dist/data-layer/src/features/edx-proctoring/constants.d.ts +0 -15
- package/dist/data-layer/src/features/edx-proctoring/types.d.ts +0 -61
- package/dist/data-layer/src/features/edx-sso/api-slice.d.ts +0 -334
- package/dist/data-layer/src/features/edx-sso/types.d.ts +0 -10
- package/dist/data-layer/src/features/llms/api-slice.d.ts +0 -373
- package/dist/data-layer/src/features/mcp/api-slice.d.ts +0 -2613
- package/dist/data-layer/src/features/mcp/constants.d.ts +0 -57
- package/dist/data-layer/src/features/mcp/types.d.ts +0 -176
- package/dist/data-layer/src/features/memory/api-slice.d.ts +0 -3462
- package/dist/data-layer/src/features/memory/constants.d.ts +0 -80
- package/dist/data-layer/src/features/memory/types.d.ts +0 -190
- package/dist/data-layer/src/features/mentor/api-slice.d.ts +0 -7984
- package/dist/data-layer/src/features/mentor/constants.d.ts +0 -45
- package/dist/data-layer/src/features/mentor/custom-api-slice.d.ts +0 -957
- package/dist/data-layer/src/features/mentor/privacy.d.ts +0 -61
- package/dist/data-layer/src/features/mentor/types.d.ts +0 -83
- package/dist/data-layer/src/features/mentor-categories/api-slice.d.ts +0 -785
- package/dist/data-layer/src/features/moderation-logs/api-slice.d.ts +0 -705
- package/dist/data-layer/src/features/monetization/constants.d.ts +0 -76
- package/dist/data-layer/src/features/monetization/custom-api-slice.d.ts +0 -5178
- package/dist/data-layer/src/features/monetization/types.d.ts +0 -229
- package/dist/data-layer/src/features/notifications/api-slice.d.ts +0 -1728
- package/dist/data-layer/src/features/notifications/constants.d.ts +0 -26
- package/dist/data-layer/src/features/notifications/custom-api-slice.d.ts +0 -996
- package/dist/data-layer/src/features/notifications/types.d.ts +0 -69
- package/dist/data-layer/src/features/per-learner/api-slice.d.ts +0 -1329
- package/dist/data-layer/src/features/periodic-agents/api-slice.d.ts +0 -2347
- package/dist/data-layer/src/features/platform/api-slice.d.ts +0 -2553
- package/dist/data-layer/src/features/platform/constants.d.ts +0 -17
- package/dist/data-layer/src/features/platform/custom-api-slice.d.ts +0 -493
- package/dist/data-layer/src/features/platform/types.d.ts +0 -61
- package/dist/data-layer/src/features/projects/api-slice.d.ts +0 -2026
- package/dist/data-layer/src/features/projects/constants.d.ts +0 -51
- package/dist/data-layer/src/features/projects/types.d.ts +0 -79
- package/dist/data-layer/src/features/prompts/api-slice.d.ts +0 -2464
- package/dist/data-layer/src/features/reports/api-slice.d.ts +0 -789
- package/dist/data-layer/src/features/retirement/api-slice.d.ts +0 -165
- package/dist/data-layer/src/features/retirement/constants.d.ts +0 -7
- package/dist/data-layer/src/features/retirement/types.d.ts +0 -3
- package/dist/data-layer/src/features/search/ai-search-api-slice.d.ts +0 -1413
- package/dist/data-layer/src/features/search/api-slice.d.ts +0 -2017
- package/dist/data-layer/src/features/search/constants.d.ts +0 -41
- package/dist/data-layer/src/features/search/types.d.ts +0 -161
- package/dist/data-layer/src/features/sessions/api-slice.d.ts +0 -969
- package/dist/data-layer/src/features/sessions/constants.d.ts +0 -3
- package/dist/data-layer/src/features/sessions/url.d.ts +0 -9
- package/dist/data-layer/src/features/skills/api-slice.d.ts +0 -1389
- package/dist/data-layer/src/features/stripe/api-slice.d.ts +0 -803
- package/dist/data-layer/src/features/stripe/constants.d.ts +0 -19
- package/dist/data-layer/src/features/stripe/types.d.ts +0 -19
- package/dist/data-layer/src/features/tenant/api-slice.d.ts +0 -832
- package/dist/data-layer/src/features/tenant/constants.d.ts +0 -11
- package/dist/data-layer/src/features/tenant/types.d.ts +0 -19
- package/dist/data-layer/src/features/tenant-logo/api-slice.d.ts +0 -349
- package/dist/data-layer/src/features/tenant-logo/constants.d.ts +0 -24
- package/dist/data-layer/src/features/tools/api-slice.d.ts +0 -417
- package/dist/data-layer/src/features/training-documents/api-slice.d.ts +0 -1523
- package/dist/data-layer/src/features/user/api-slice.d.ts +0 -2128
- package/dist/data-layer/src/features/user/constants.d.ts +0 -47
- package/dist/data-layer/src/features/user/types.d.ts +0 -134
- package/dist/data-layer/src/features/user-invitations/api-slice.d.ts +0 -762
- package/dist/data-layer/src/features/utils.d.ts +0 -94
- package/dist/data-layer/src/features/watched-groups/api-slice.d.ts +0 -2481
- package/dist/data-layer/src/features/watched-groups/constants.d.ts +0 -66
- package/dist/data-layer/src/features/watched-groups/types.d.ts +0 -143
- package/dist/data-layer/src/features/workflows/api-slice.d.ts +0 -2454
- package/dist/data-layer/src/features/workflows/constants.d.ts +0 -57
- package/dist/data-layer/src/features/workflows/types.d.ts +0 -130
- package/dist/data-layer/src/index.d.ts +0 -121
- package/dist/data-layer/src/reducers/index.d.ts +0 -2
- package/dist/data-layer/src/reducers/mentor.d.ts +0 -2
- package/dist/data-layer/src/reducers/skills.d.ts +0 -2
- package/dist/data-layer/src/services/StorageService.d.ts +0 -5
- package/dist/data-layer/src/utils/index.d.ts +0 -6
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Reducer } from "@reduxjs/toolkit";
|
|
2
|
+
export type RbacPermissions = {
|
|
3
|
+
mentors: Record<string, unknown>;
|
|
4
|
+
mentor: Record<string, unknown>;
|
|
5
|
+
};
|
|
6
|
+
export interface RbacState {
|
|
7
|
+
rbacPermissions: RbacPermissions | Record<string, never>;
|
|
8
|
+
}
|
|
9
|
+
export declare const updateRbacPermissions: import("@reduxjs/toolkit").ActionCreatorWithPayload<RbacPermissions | Record<string, never>, "rbac/updateRbacPermissions">;
|
|
10
|
+
export declare const rbacReducer: Reducer<RbacState>;
|
|
11
|
+
export declare const selectRbacPermissions: (state: {
|
|
12
|
+
rbac: RbacState;
|
|
13
|
+
}) => RbacPermissions | Record<string, never>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const SUBSCRIPTION_TRIGGERS: {
|
|
2
|
+
PRICING_MODAL: string;
|
|
3
|
+
SUBSCRIBE_USER: string;
|
|
4
|
+
};
|
|
5
|
+
export declare const SUBSCRIPTION_USER_CAPABILITIES: {
|
|
6
|
+
FREE_TRIAL: string;
|
|
7
|
+
FREE_PACKAGE: string;
|
|
8
|
+
STUDENT_UNDER_PAID_PACKAGE: string;
|
|
9
|
+
PAID_PACKAGE: string;
|
|
10
|
+
PRO_PACKAGE: string;
|
|
11
|
+
STARTER_PACKAGE: string;
|
|
12
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type Slice } from "@reduxjs/toolkit";
|
|
2
|
+
interface PricingModalData {
|
|
3
|
+
referenceId: string;
|
|
4
|
+
customerEmail: string;
|
|
5
|
+
publishableKey: string;
|
|
6
|
+
pricingTableId: string;
|
|
7
|
+
}
|
|
8
|
+
interface FreeTrialUsageOptions {
|
|
9
|
+
count: number;
|
|
10
|
+
limitReached: boolean;
|
|
11
|
+
message: string;
|
|
12
|
+
}
|
|
13
|
+
interface SubscriptionStatus {
|
|
14
|
+
creditExhausted: boolean;
|
|
15
|
+
userCapability?: string;
|
|
16
|
+
callToAction?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface SubscriptionState {
|
|
19
|
+
openPricingModal: boolean;
|
|
20
|
+
freeTrialUsageOptions: FreeTrialUsageOptions;
|
|
21
|
+
pricingModalData: PricingModalData;
|
|
22
|
+
subscriptionStatus: SubscriptionStatus;
|
|
23
|
+
error402Detected: string;
|
|
24
|
+
}
|
|
25
|
+
export declare const subscriptionSlice: Slice<SubscriptionState>;
|
|
26
|
+
export declare const setOpenPricingModal: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<`${string}/${string}`> | import("@reduxjs/toolkit").ActionCreatorWithPayload<any, `${string}/${string}`> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, never> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, any> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, never> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, any>, setFreeTrialUsageOptions: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<`${string}/${string}`> | import("@reduxjs/toolkit").ActionCreatorWithPayload<any, `${string}/${string}`> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, never> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, any> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, never> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, any>, setPricingModalData: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<`${string}/${string}`> | import("@reduxjs/toolkit").ActionCreatorWithPayload<any, `${string}/${string}`> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, never> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, any> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, never> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, any>, setSubscriptionStatus: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<`${string}/${string}`> | import("@reduxjs/toolkit").ActionCreatorWithPayload<any, `${string}/${string}`> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, never> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, any> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, never> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, any>, setError402Detected: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<`${string}/${string}`> | import("@reduxjs/toolkit").ActionCreatorWithPayload<any, `${string}/${string}`> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, never> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, any> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, never> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, any>;
|
|
27
|
+
export declare const subscriptionReducer: import("@reduxjs/toolkit").Reducer<SubscriptionState>;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type Slice } from "@reduxjs/toolkit";
|
|
2
|
+
/**
|
|
3
|
+
* Structural shape of TopBannerProps. Mirrors `@iblai/web-containers`
|
|
4
|
+
* `<TopBanner>` so this slice can be consumed without taking a circular
|
|
5
|
+
* dependency on the web-containers package.
|
|
6
|
+
*/
|
|
7
|
+
export interface TopBannerOptions {
|
|
8
|
+
parentContainerSelector: string;
|
|
9
|
+
bannerText?: string;
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
tooltipText?: string;
|
|
12
|
+
buttonHandler?: () => void;
|
|
13
|
+
buttonLabel?: string;
|
|
14
|
+
onLoad?: (bannerRef: HTMLDivElement) => void;
|
|
15
|
+
onClose?: () => void;
|
|
16
|
+
enabled: boolean;
|
|
17
|
+
onUpgrade?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface TopBannerState {
|
|
20
|
+
topBannerOptions: TopBannerOptions;
|
|
21
|
+
}
|
|
22
|
+
export declare const topBannerSlice: Slice<TopBannerState>;
|
|
23
|
+
export declare const setTopBannerOptions: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<`${string}/${string}`> | import("@reduxjs/toolkit").ActionCreatorWithPayload<any, `${string}/${string}`> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, never> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, never, any> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, never> | import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<any[], any, `${string}/${string}`, any, any>;
|
|
24
|
+
export declare const topBannerReducer: import("@reduxjs/toolkit").Reducer<TopBannerState>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function NextJsExample(): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function ReactNativeExample(): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function ApiIntegrationExample(): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare function ConditionalTrackingExample(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { TimeTracker } from "./time-tracker";
|
|
2
|
+
export type { TimeTrackerConfig, TimeTrackerState } from "./time-tracker";
|
|
3
|
+
export { useTimeTracker } from "./use-time-tracker";
|
|
4
|
+
export type { UseTimeTrackerConfig, UseTimeTrackerReturn, } from "./use-time-tracker";
|
|
5
|
+
export { useTimeTrackerNative } from "./use-time-tracker-native";
|
|
6
|
+
export type { UseTimeTrackerNativeConfig, UseTimeTrackerNativeReturn, } from "./use-time-tracker-native";
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface TimeTrackerConfig {
|
|
2
|
+
intervalSeconds: number;
|
|
3
|
+
onTimeUpdate: (url: string, timeSpent: number) => void;
|
|
4
|
+
getCurrentUrl: () => string;
|
|
5
|
+
onRouteChange?: (callback: () => void) => () => void;
|
|
6
|
+
}
|
|
7
|
+
export interface TimeTrackerState {
|
|
8
|
+
currentUrl: string;
|
|
9
|
+
startTime: number;
|
|
10
|
+
intervalId: number | null;
|
|
11
|
+
routeUnsubscribe: (() => void) | null;
|
|
12
|
+
}
|
|
13
|
+
export declare class TimeTracker {
|
|
14
|
+
private state;
|
|
15
|
+
private config;
|
|
16
|
+
constructor(config: TimeTrackerConfig);
|
|
17
|
+
private initialize;
|
|
18
|
+
private startTracking;
|
|
19
|
+
private clearInterval;
|
|
20
|
+
private resetTimer;
|
|
21
|
+
private getTimeSpent;
|
|
22
|
+
private sendTimeUpdate;
|
|
23
|
+
private handleRouteChange;
|
|
24
|
+
pause(): void;
|
|
25
|
+
resume(): void;
|
|
26
|
+
destroy(): void;
|
|
27
|
+
getCurrentUrl(): string;
|
|
28
|
+
getTimeSpentSinceLastReset(): number;
|
|
29
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface UseTimeTrackerNativeConfig {
|
|
2
|
+
intervalSeconds: number;
|
|
3
|
+
onTimeUpdate: (url: string, timeSpent: number) => void;
|
|
4
|
+
getCurrentRoute: () => string;
|
|
5
|
+
onRouteChange?: (callback: () => void) => () => void;
|
|
6
|
+
enabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface UseTimeTrackerNativeReturn {
|
|
9
|
+
pause: () => void;
|
|
10
|
+
resume: () => void;
|
|
11
|
+
getCurrentUrl: () => string;
|
|
12
|
+
getTimeSpentSinceLastReset: () => number;
|
|
13
|
+
}
|
|
14
|
+
export declare function useTimeTrackerNative(config: UseTimeTrackerNativeConfig): UseTimeTrackerNativeReturn;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface UseTimeTrackerConfig {
|
|
2
|
+
intervalSeconds: number;
|
|
3
|
+
onTimeUpdate: (url: string, timeSpent: number) => void;
|
|
4
|
+
enabled?: boolean;
|
|
5
|
+
getCurrentUrl?: () => string;
|
|
6
|
+
onRouteChange?: (callback: () => void) => () => void;
|
|
7
|
+
}
|
|
8
|
+
export interface UseTimeTrackerReturn {
|
|
9
|
+
pause: () => void;
|
|
10
|
+
resume: () => void;
|
|
11
|
+
getCurrentUrl: () => string;
|
|
12
|
+
getTimeSpentSinceLastReset: () => number;
|
|
13
|
+
}
|
|
14
|
+
export declare function useTimeTracker(config: UseTimeTrackerConfig): UseTimeTrackerReturn;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type WithFormPermissionsProps = {
|
|
3
|
+
name: string | string[];
|
|
4
|
+
permissions: Record<string, {
|
|
5
|
+
read?: boolean;
|
|
6
|
+
write: boolean;
|
|
7
|
+
delete?: boolean;
|
|
8
|
+
}>;
|
|
9
|
+
children: (props: {
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
canDelete?: boolean;
|
|
12
|
+
}) => React.ReactNode;
|
|
13
|
+
enableRBAC?: boolean;
|
|
14
|
+
};
|
|
15
|
+
declare const WithFormPermissions: React.FC<WithFormPermissionsProps>;
|
|
16
|
+
export default WithFormPermissions;
|
|
17
|
+
/**
|
|
18
|
+
* Check if the user has the permissions to access the component
|
|
19
|
+
* @param rbacResource - The resource in the permission rbac slice to check for. Supports:
|
|
20
|
+
* - Single resource: "mentors#read"
|
|
21
|
+
* - OR operator (|): "apitokens#create|apitokens#list" - returns true if ANY permission exists
|
|
22
|
+
* - AND operator (&): "apitokens#create&apitokens#list" - returns true if ALL permissions exist
|
|
23
|
+
* @param rbacPermissions - The RBAC permissions object from the store.
|
|
24
|
+
* @param children - The component to render if the user has the permissions.
|
|
25
|
+
*/
|
|
26
|
+
type WithPermissionsProps = {
|
|
27
|
+
rbacResource: string;
|
|
28
|
+
rbacPermissions: object;
|
|
29
|
+
children: (props: {
|
|
30
|
+
hasPermission: boolean;
|
|
31
|
+
}) => React.ReactNode;
|
|
32
|
+
};
|
|
33
|
+
export declare const WithPermissions: ({ rbacResource, rbacPermissions, children, }: WithPermissionsProps) => import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
/**
|
|
35
|
+
* Check RBAC permissions for a resource string that may contain operators
|
|
36
|
+
* @param rbacPermissions - The RBAC permissions object
|
|
37
|
+
* @param rbacResource - The resource path to check. Supports:
|
|
38
|
+
* - Single resource: "mentors#read"
|
|
39
|
+
* - OR operator (|): "apitokens#create|apitokens#list" - returns true if ANY permission exists
|
|
40
|
+
* - AND operator (&): "apitokens#create&apitokens#list" - returns true if ALL permissions exist
|
|
41
|
+
* @param enableRBAC - Whether RBAC is enabled (if false, always returns true)
|
|
42
|
+
* @returns boolean indicating if permission exists
|
|
43
|
+
*/
|
|
44
|
+
export declare const checkRbacPermission: (rbacPermissions: object, rbacResource: string, enableRBAC?: boolean) => boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Message } from "./use-chat-v2";
|
|
2
|
+
export declare const INITIAL_CHAT_PAGE = 1;
|
|
3
|
+
export declare function normalizeSessionResult(result: any): any;
|
|
4
|
+
export declare function normalizeSessionResults(results: any[] | undefined): any[];
|
|
5
|
+
/**
|
|
6
|
+
* A session re-fetch can omit `additional_kwargs`, dropping reasoning/tool-call
|
|
7
|
+
* data that is already in memory. Carry those fields forward from the matching
|
|
8
|
+
* existing message (by content) onto the freshly-fetched message in place.
|
|
9
|
+
*/
|
|
10
|
+
export declare function mergeReasoningAndToolCalls(incoming: any[], existing: Message[]): void;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export interface OllamaMessage {
|
|
2
|
+
role: "user" | "assistant" | "system";
|
|
3
|
+
content: string;
|
|
4
|
+
}
|
|
5
|
+
export interface OllamaChatRequest {
|
|
6
|
+
model: string;
|
|
7
|
+
messages: OllamaMessage[];
|
|
8
|
+
stream?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface OllamaChatStreamResponse {
|
|
11
|
+
model: string;
|
|
12
|
+
created_at: string;
|
|
13
|
+
message: {
|
|
14
|
+
role: "assistant";
|
|
15
|
+
content: string;
|
|
16
|
+
};
|
|
17
|
+
done: boolean;
|
|
18
|
+
total_duration?: number;
|
|
19
|
+
load_duration?: number;
|
|
20
|
+
prompt_eval_count?: number;
|
|
21
|
+
prompt_eval_duration?: number;
|
|
22
|
+
eval_count?: number;
|
|
23
|
+
eval_duration?: number;
|
|
24
|
+
}
|
|
25
|
+
export interface OllamaStreamCallbacks {
|
|
26
|
+
onStart: (generationId: string) => void;
|
|
27
|
+
onToken: (token: string, fullContent: string) => void;
|
|
28
|
+
onEnd: (fullContent: string) => void;
|
|
29
|
+
onError: (error: string) => void;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Check if Ollama is running and accessible
|
|
33
|
+
*/
|
|
34
|
+
export declare function checkOllamaHealth(): Promise<boolean>;
|
|
35
|
+
/**
|
|
36
|
+
* Check if a specific model is available in Ollama
|
|
37
|
+
*/
|
|
38
|
+
export declare function checkModelAvailable(model?: string): Promise<boolean>;
|
|
39
|
+
/**
|
|
40
|
+
* Send a chat message to Ollama with streaming response
|
|
41
|
+
* This mimics the WebSocket behavior of the main chat
|
|
42
|
+
*
|
|
43
|
+
* When running in Tauri, uses Tauri commands to proxy the request
|
|
44
|
+
* to avoid mixed content (HTTPS -> HTTP) browser blocking.
|
|
45
|
+
*/
|
|
46
|
+
export declare function streamOllamaChat(messages: OllamaMessage[], callbacks: OllamaStreamCallbacks, abortController?: AbortController): Promise<void>;
|
|
47
|
+
/**
|
|
48
|
+
* Convert chat history to Ollama format
|
|
49
|
+
*/
|
|
50
|
+
export declare function convertToOllamaMessages(messages: Array<{
|
|
51
|
+
role: "user" | "assistant" | "system";
|
|
52
|
+
content: string;
|
|
53
|
+
}>): OllamaMessage[];
|
|
54
|
+
/**
|
|
55
|
+
* Get system prompt for the local LLM
|
|
56
|
+
*/
|
|
57
|
+
export declare function getLocalLLMSystemPrompt(): OllamaMessage;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ChatMode, Error402MessageData } from "../../types";
|
|
3
|
+
import { type AdvancedTab } from "../../utils";
|
|
4
|
+
import { Message, type OAuthRequiredData, type OAuthResolvedData } from "./use-chat-v2";
|
|
5
|
+
import { ChatStatus } from "../../features/chat/slice";
|
|
6
|
+
type Props = {
|
|
7
|
+
mode?: ChatMode;
|
|
8
|
+
tenantKey: string;
|
|
9
|
+
mentorId: string;
|
|
10
|
+
username: string;
|
|
11
|
+
token: string;
|
|
12
|
+
wsUrl: string;
|
|
13
|
+
redirectToAuthSpa: (redirectTo?: string, platformKey?: string, logout?: boolean) => void;
|
|
14
|
+
stopGenerationWsUrl: string;
|
|
15
|
+
sendMessageToParentWebsite?: (payload: unknown) => void;
|
|
16
|
+
errorHandler?: (message: string, error?: any) => void;
|
|
17
|
+
isPreviewMode?: boolean;
|
|
18
|
+
mentorShareableToken?: string | null;
|
|
19
|
+
on402Error?: (message: Error402MessageData) => void;
|
|
20
|
+
cachedSessionId?: Record<string, string>;
|
|
21
|
+
onStartNewChat?: (sessionId: string) => void;
|
|
22
|
+
onOAuthRequired?: (data: OAuthRequiredData) => void;
|
|
23
|
+
onOAuthResolved?: (data: OAuthResolvedData) => void;
|
|
24
|
+
isOffline?: boolean;
|
|
25
|
+
onOfflineWithoutLocalLLM?: () => void;
|
|
26
|
+
isPublicRoute?: boolean;
|
|
27
|
+
initialPrompt?: string;
|
|
28
|
+
};
|
|
29
|
+
export declare function useAdvancedChat({ tenantKey, mentorId, username, token, wsUrl, stopGenerationWsUrl, redirectToAuthSpa, errorHandler, sendMessageToParentWebsite, isPreviewMode, mentorShareableToken, on402Error, cachedSessionId, onStartNewChat, onOAuthRequired, onOAuthResolved, isOffline, onOfflineWithoutLocalLLM, isPublicRoute, initialPrompt, }: Props): {
|
|
30
|
+
messages: Message[];
|
|
31
|
+
isStreaming: boolean;
|
|
32
|
+
status: ChatStatus;
|
|
33
|
+
isPending: boolean;
|
|
34
|
+
isStopped: boolean;
|
|
35
|
+
isError: boolean;
|
|
36
|
+
currentStreamingMessage: import("../../features").StreamingMessage;
|
|
37
|
+
activeTab: "chat" | "summarize" | "translate" | "expand";
|
|
38
|
+
uniqueMentorId: string;
|
|
39
|
+
mentorName: any;
|
|
40
|
+
profileImage: any;
|
|
41
|
+
enabledGuidedPrompts: any;
|
|
42
|
+
sendMessage: (tab: AdvancedTab, text: string, options?: import("./use-chat-v2").SendMessageOptions) => Promise<void>;
|
|
43
|
+
stopGenerating: () => void;
|
|
44
|
+
setMessage: (message: Message) => void;
|
|
45
|
+
changeTab: (tab: AdvancedTab) => Promise<void>;
|
|
46
|
+
sessionId: string;
|
|
47
|
+
startNewChat: () => Promise<void>;
|
|
48
|
+
isLoadingSessionIds: any;
|
|
49
|
+
ws: React.MutableRefObject<WebSocket | null>;
|
|
50
|
+
isConnected: React.MutableRefObject<boolean>;
|
|
51
|
+
messageQueue: React.MutableRefObject<any[]>;
|
|
52
|
+
sessionIds: import("../../features").SessionIds;
|
|
53
|
+
enableSafetyDisclaimer: any;
|
|
54
|
+
resetConnection: () => void;
|
|
55
|
+
isLoadingChats: boolean;
|
|
56
|
+
refetchChats: () => Promise<void>;
|
|
57
|
+
loadOlderMessages: () => Promise<void>;
|
|
58
|
+
hasMore: boolean;
|
|
59
|
+
isLoadingOlderMessages: boolean;
|
|
60
|
+
};
|
|
61
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type UseChatHistoryParams = {
|
|
3
|
+
tenantKey: string;
|
|
4
|
+
mentorId: string;
|
|
5
|
+
username: string;
|
|
6
|
+
cachedSessionId?: Record<string, string>;
|
|
7
|
+
isOffline?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare function useChatHistory({ tenantKey, mentorId, username, cachedSessionId, isOffline, }: UseChatHistoryParams): {
|
|
10
|
+
getChats: () => Promise<void>;
|
|
11
|
+
loadOlderMessages: () => Promise<void>;
|
|
12
|
+
hasMore: boolean;
|
|
13
|
+
isLoadingOlderMessages: boolean;
|
|
14
|
+
isLoadingChats: boolean;
|
|
15
|
+
isLoadingChatsRef: React.RefObject<boolean>;
|
|
16
|
+
};
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { AdvancedTab } from "../../utils/data/advanced-tab";
|
|
3
|
+
import { ChatStatus } from "@web-utils/features";
|
|
4
|
+
import { FileReference } from "../../types/file-upload";
|
|
5
|
+
import type { Error402MessageData } from "@web-utils/types";
|
|
6
|
+
type MessageActionTypes = "redirectToAuthSpaJoinTenant";
|
|
7
|
+
export interface MessageAction {
|
|
8
|
+
text: string;
|
|
9
|
+
type: "primary" | "danger";
|
|
10
|
+
actionType: MessageActionTypes;
|
|
11
|
+
}
|
|
12
|
+
export interface ToolCallInfo {
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
input?: Record<string, unknown>;
|
|
16
|
+
log: string;
|
|
17
|
+
result: string;
|
|
18
|
+
}
|
|
19
|
+
export interface FileAttachment {
|
|
20
|
+
fileName: string;
|
|
21
|
+
fileType: string;
|
|
22
|
+
fileSize: number;
|
|
23
|
+
uploadUrl?: string;
|
|
24
|
+
fileId?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface ArtifactData {
|
|
27
|
+
id: number;
|
|
28
|
+
title: string;
|
|
29
|
+
content: string;
|
|
30
|
+
file_extension: string;
|
|
31
|
+
llm_name?: string;
|
|
32
|
+
llm_provider?: string;
|
|
33
|
+
date_created: string;
|
|
34
|
+
date_updated: string;
|
|
35
|
+
metadata?: Record<string, unknown>;
|
|
36
|
+
username?: string;
|
|
37
|
+
session_id?: string;
|
|
38
|
+
current_version_number?: number;
|
|
39
|
+
version_count?: number;
|
|
40
|
+
}
|
|
41
|
+
export interface ArtifactVersion {
|
|
42
|
+
id: number;
|
|
43
|
+
artifact: ArtifactData;
|
|
44
|
+
title: string;
|
|
45
|
+
content: string;
|
|
46
|
+
session_id?: string;
|
|
47
|
+
content_length?: number;
|
|
48
|
+
is_current: boolean;
|
|
49
|
+
is_partial?: boolean;
|
|
50
|
+
chat_message?: number;
|
|
51
|
+
version_number: number;
|
|
52
|
+
date_created: string;
|
|
53
|
+
created_by?: string;
|
|
54
|
+
change_summary?: string;
|
|
55
|
+
}
|
|
56
|
+
export interface RawMessageFromWS {
|
|
57
|
+
id: string;
|
|
58
|
+
is_ai: boolean;
|
|
59
|
+
is_human: boolean;
|
|
60
|
+
generation_id: string;
|
|
61
|
+
}
|
|
62
|
+
export interface Message {
|
|
63
|
+
id: string;
|
|
64
|
+
role: "user" | "assistant" | "system";
|
|
65
|
+
content: string;
|
|
66
|
+
timestamp: string;
|
|
67
|
+
url?: string;
|
|
68
|
+
fileType?: string;
|
|
69
|
+
contentType?: string;
|
|
70
|
+
visible: boolean;
|
|
71
|
+
actions?: MessageAction[];
|
|
72
|
+
fileAttachments?: FileAttachment[];
|
|
73
|
+
artifactVersions?: ArtifactVersion[];
|
|
74
|
+
reasoningContent?: string;
|
|
75
|
+
toolCalls?: ToolCallInfo[];
|
|
76
|
+
}
|
|
77
|
+
export type ArtifactPayload = {
|
|
78
|
+
title: string;
|
|
79
|
+
file_extension: string;
|
|
80
|
+
id: string;
|
|
81
|
+
is_partial?: boolean;
|
|
82
|
+
snippet_start?: number;
|
|
83
|
+
snippet_end?: number;
|
|
84
|
+
};
|
|
85
|
+
export type SendMessageOptions = {
|
|
86
|
+
visible?: boolean;
|
|
87
|
+
fileReferences?: FileReference[];
|
|
88
|
+
artifact?: ArtifactPayload;
|
|
89
|
+
} | undefined;
|
|
90
|
+
export interface OAuthRequiredData {
|
|
91
|
+
serverName: string;
|
|
92
|
+
serverId: number;
|
|
93
|
+
authUrl: string;
|
|
94
|
+
message: string;
|
|
95
|
+
}
|
|
96
|
+
export interface OAuthResolvedData {
|
|
97
|
+
serverName: string;
|
|
98
|
+
serverId: number;
|
|
99
|
+
message: string;
|
|
100
|
+
}
|
|
101
|
+
export interface UseChatProps {
|
|
102
|
+
wsUrl: string;
|
|
103
|
+
wsToken: string;
|
|
104
|
+
flowConfig: {
|
|
105
|
+
name: string;
|
|
106
|
+
tenant: string;
|
|
107
|
+
username: string;
|
|
108
|
+
pathway: string;
|
|
109
|
+
};
|
|
110
|
+
sessionId: string;
|
|
111
|
+
stopGenerationWsUrl: string;
|
|
112
|
+
activeTab: AdvancedTab;
|
|
113
|
+
enableHaptics?: boolean;
|
|
114
|
+
hapticFeedback?: {
|
|
115
|
+
impactAsync: (style: any) => Promise<void>;
|
|
116
|
+
};
|
|
117
|
+
redirectToAuthSpa: (redirectTo?: string, platformKey?: string, logout?: boolean) => void;
|
|
118
|
+
store?: {
|
|
119
|
+
sendMessage?: (text: string) => Promise<void>;
|
|
120
|
+
};
|
|
121
|
+
WebSocketImpl?: typeof WebSocket;
|
|
122
|
+
errorHandler?: (message: string, error?: any) => void;
|
|
123
|
+
onStatusChange: (status: ChatStatus) => void;
|
|
124
|
+
onStreamingChange: (streaming: boolean) => void;
|
|
125
|
+
onStreamingMessageUpdate: (message: {
|
|
126
|
+
id: string | null;
|
|
127
|
+
content: string;
|
|
128
|
+
}) => void;
|
|
129
|
+
onAddUserMessage?: (activeTab: AdvancedTab, message: Message) => void;
|
|
130
|
+
sendMessageToParentWebsite?: (payload: unknown) => void;
|
|
131
|
+
on402Error?: (message: Error402MessageData) => void;
|
|
132
|
+
onOAuthRequired?: (data: OAuthRequiredData) => void;
|
|
133
|
+
onOAuthResolved?: (data: OAuthResolvedData) => void;
|
|
134
|
+
onOfflineWithoutLocalLLM?: () => void;
|
|
135
|
+
isOffline?: boolean;
|
|
136
|
+
}
|
|
137
|
+
export interface UseChatReturn {
|
|
138
|
+
sendMessage: (tab: AdvancedTab, text: string, options?: SendMessageOptions) => Promise<void>;
|
|
139
|
+
ws: React.MutableRefObject<WebSocket | null>;
|
|
140
|
+
isConnected: React.MutableRefObject<boolean>;
|
|
141
|
+
messageQueue: React.MutableRefObject<any[]>;
|
|
142
|
+
stopGenerating: () => void;
|
|
143
|
+
resetConnection: () => void;
|
|
144
|
+
}
|
|
145
|
+
export declare const useChat: ({ wsUrl, wsToken, flowConfig, sessionId, stopGenerationWsUrl, enableHaptics, hapticFeedback, store, errorHandler, onStatusChange, onStreamingChange, onStreamingMessageUpdate, WebSocketImpl, redirectToAuthSpa, sendMessageToParentWebsite, on402Error, onOAuthRequired, onOAuthResolved, onOfflineWithoutLocalLLM, isOffline, }: UseChatProps) => UseChatReturn;
|
|
146
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { AdvancedTab } from "../../utils/data/advanced-tab";
|
|
3
|
+
export interface Message {
|
|
4
|
+
id: string;
|
|
5
|
+
role: "user" | "assistant" | "system";
|
|
6
|
+
content: string;
|
|
7
|
+
timestamp: string;
|
|
8
|
+
url?: string;
|
|
9
|
+
fileType?: string;
|
|
10
|
+
contentType?: string;
|
|
11
|
+
visible?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export type SendMessageOptions = {
|
|
14
|
+
visible?: boolean;
|
|
15
|
+
};
|
|
16
|
+
export interface UseChatProps {
|
|
17
|
+
wsUrl: string;
|
|
18
|
+
wsToken: string;
|
|
19
|
+
flowConfig: {
|
|
20
|
+
name: string;
|
|
21
|
+
tenant: string;
|
|
22
|
+
username: string;
|
|
23
|
+
pathway: string;
|
|
24
|
+
};
|
|
25
|
+
sessionId: string;
|
|
26
|
+
stopGenerationWsUrl: string;
|
|
27
|
+
activeTab: AdvancedTab;
|
|
28
|
+
enableHaptics?: boolean;
|
|
29
|
+
hapticFeedback?: {
|
|
30
|
+
impactAsync: (style: any) => Promise<void>;
|
|
31
|
+
};
|
|
32
|
+
store?: {
|
|
33
|
+
sendMessage?: (text: string) => Promise<void>;
|
|
34
|
+
};
|
|
35
|
+
WebSocketImpl?: typeof WebSocket;
|
|
36
|
+
errorHandler?: (error: string) => void;
|
|
37
|
+
}
|
|
38
|
+
export interface UseChatReturn {
|
|
39
|
+
messages: Message[];
|
|
40
|
+
isTyping: boolean;
|
|
41
|
+
sendMessage: (text: string, options?: SendMessageOptions) => Promise<void>;
|
|
42
|
+
currentStreamingMessage: {
|
|
43
|
+
id: string | null;
|
|
44
|
+
content: string;
|
|
45
|
+
};
|
|
46
|
+
ws: React.MutableRefObject<WebSocket | null>;
|
|
47
|
+
isConnected: React.MutableRefObject<boolean>;
|
|
48
|
+
messageQueue: React.MutableRefObject<any[]>;
|
|
49
|
+
stopGenerating: () => void;
|
|
50
|
+
streaming: boolean;
|
|
51
|
+
setMessages: (messages: Message[]) => void;
|
|
52
|
+
}
|
|
53
|
+
export declare const useChat: ({ wsUrl, wsToken, flowConfig, sessionId, stopGenerationWsUrl, activeTab, enableHaptics, hapticFeedback, store, errorHandler, WebSocketImpl, }: UseChatProps) => UseChatReturn;
|