@iblai/web-utils 1.11.8 → 1.11.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.
- 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 +575 -262
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +588 -275
- 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 -8
- 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 -9045
- 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,14 @@
|
|
|
1
|
+
import type { ChatMode } from "../../types";
|
|
2
|
+
type Props = {
|
|
3
|
+
mode: ChatMode;
|
|
4
|
+
tenantKey: string;
|
|
5
|
+
mentorId: string;
|
|
6
|
+
username: string;
|
|
7
|
+
errorHandler?: (error: string) => void;
|
|
8
|
+
searchParams?: URLSearchParams | null;
|
|
9
|
+
};
|
|
10
|
+
export declare function useGetChatDetails({ mode, tenantKey, mentorId, username, errorHandler, searchParams, }: Props): {
|
|
11
|
+
isLoadingSessionIds: boolean;
|
|
12
|
+
refetchSessionIds: () => Promise<void>;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
type Props = {
|
|
2
|
+
tenantKey: string;
|
|
3
|
+
mentorId: string;
|
|
4
|
+
username: string;
|
|
5
|
+
errorHandler?: (message: string, error?: any) => void;
|
|
6
|
+
isPublicRoute?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare function useMentorTools({ tenantKey, mentorId, username, errorHandler, isPublicRoute, }: Props): {
|
|
9
|
+
tools: any;
|
|
10
|
+
activeTools: string[];
|
|
11
|
+
updateSessionTools: (tool: string) => Promise<void>;
|
|
12
|
+
setSessionTools: (tools: string[]) => Promise<void>;
|
|
13
|
+
enableWebBrowsing: boolean;
|
|
14
|
+
screenSharing: boolean;
|
|
15
|
+
deepResearch: boolean;
|
|
16
|
+
studyMode: boolean;
|
|
17
|
+
imageGeneration: boolean;
|
|
18
|
+
codeInterpreter: boolean;
|
|
19
|
+
promptsIsEnabled: boolean;
|
|
20
|
+
googleSlidesIsEnabled: boolean;
|
|
21
|
+
googleDocumentIsEnabled: boolean;
|
|
22
|
+
artifactsEnabled: boolean;
|
|
23
|
+
};
|
|
24
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export * from "./use-tenant-switch-sync";
|
|
2
|
+
export * from "./subscription/use-subscription-handler";
|
|
3
|
+
export * from "./subscription/constants";
|
|
4
|
+
export * from "./subscription/class-subscription-flow";
|
|
5
|
+
export * from "./subscription-v2/use-subscription-handler";
|
|
6
|
+
export * from "./subscription-v2/class-subscription-flow";
|
|
7
|
+
export * from "./subscription-v2/use-external-pricing-plan";
|
|
8
|
+
export * from "./subscription-v2/constants";
|
|
9
|
+
export * from "./subscription-v2/use-402-error-check";
|
|
10
|
+
export * from "./use-day-js";
|
|
11
|
+
export * from "./chat/use-advanced-chat";
|
|
12
|
+
export * from "./chat/use-mentor-tools";
|
|
13
|
+
export * from "./profile/use-user-profile-update";
|
|
14
|
+
export * from "./profile/use-profile-image-upload";
|
|
15
|
+
export * from "./chat/use-chat-v2";
|
|
16
|
+
export * from "./chat/ollama-client";
|
|
17
|
+
export * from "./tenant-metadata/use-tenant-metadata";
|
|
18
|
+
export * from "./tenant-metadata/constants";
|
|
19
|
+
export * from "./use-mentor-settings";
|
|
20
|
+
export * from "./stripe/use-stripe-upgrade";
|
|
21
|
+
export * from "./use-isomorphic-layout-effect";
|
|
22
|
+
export * from "./use-event-callback";
|
|
23
|
+
export * from "./use-event-listener";
|
|
24
|
+
export * from "./use-local-storage";
|
|
25
|
+
export * from "./use-user";
|
|
26
|
+
export * from "./use-tokens";
|
|
27
|
+
export * from "./use-accessing-public-route";
|
|
28
|
+
export * from "./use-embed-mode";
|
|
29
|
+
export * from "./use-chat-file-upload";
|
|
30
|
+
export * from "./use-model-file-upload-capabilities";
|
|
31
|
+
export * from "./use-file-drag-drop";
|
|
32
|
+
export * from "./use-cached-session-id";
|
|
33
|
+
export * from "./use-user-agreement";
|
|
34
|
+
export * from "./use-show-voice-recorder";
|
|
35
|
+
export * from "./use-show-voice-call";
|
|
36
|
+
export * from "./use-show-attachment";
|
|
37
|
+
export { default as useWelcomeMessage } from "./use-welcome-message";
|
|
38
|
+
export * from "./use-responsive";
|
|
39
|
+
export * from "./use-timer";
|
|
40
|
+
export * from "./use-voice-chat";
|
|
41
|
+
export * from "./use-show-free-trial-dialog";
|
|
42
|
+
export * from "./use-os";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { UploadProfileImageResponse, RemoveProfileImageResponse } from '@iblai/data-layer';
|
|
2
|
+
export interface UseProfileImageUploadOptions {
|
|
3
|
+
onSuccess?: (imageUrl: string) => void;
|
|
4
|
+
onError?: (error: any) => void;
|
|
5
|
+
}
|
|
6
|
+
export interface UseProfileImageUploadReturn {
|
|
7
|
+
uploadImage: (file: File, username: string) => Promise<UploadProfileImageResponse>;
|
|
8
|
+
removeImage: (username: string) => Promise<RemoveProfileImageResponse>;
|
|
9
|
+
isLoading: boolean;
|
|
10
|
+
isRemoving: boolean;
|
|
11
|
+
error: any;
|
|
12
|
+
}
|
|
13
|
+
export declare function useProfileImageUpload(options?: UseProfileImageUploadOptions): UseProfileImageUploadReturn;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface UserProfileUpdateData {
|
|
2
|
+
name?: string;
|
|
3
|
+
title?: string;
|
|
4
|
+
about?: string;
|
|
5
|
+
social_links?: {
|
|
6
|
+
platform: string;
|
|
7
|
+
social_link: string;
|
|
8
|
+
}[];
|
|
9
|
+
public_metadata?: {
|
|
10
|
+
bio?: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
about?: string;
|
|
13
|
+
language?: string;
|
|
14
|
+
social_links?: {
|
|
15
|
+
platform: string;
|
|
16
|
+
social_link: string;
|
|
17
|
+
}[];
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
};
|
|
20
|
+
enable_sidebar_ai_mentor_display?: boolean;
|
|
21
|
+
enable_skills_leaderboard_display?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface UseUserProfileUpdateResult {
|
|
24
|
+
updateProfile: (data: UserProfileUpdateData) => Promise<void>;
|
|
25
|
+
isLoading: boolean;
|
|
26
|
+
error: any;
|
|
27
|
+
}
|
|
28
|
+
export declare function useUserProfileUpdate(username: string): UseUserProfileUpdateResult;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface UseStripeUpgradeArgs {
|
|
2
|
+
redirectUrl: string;
|
|
3
|
+
sourcePlatformKey: string;
|
|
4
|
+
mainPlatformKey: string;
|
|
5
|
+
currentUserEmail: string;
|
|
6
|
+
}
|
|
7
|
+
export type StripeUpgradePlan = "free" | "premium";
|
|
8
|
+
export declare const useStripeUpgrade: ({ redirectUrl, sourcePlatformKey, mainPlatformKey, currentUserEmail, }: UseStripeUpgradeArgs) => {
|
|
9
|
+
isLoading: boolean;
|
|
10
|
+
freeUrl: string | null;
|
|
11
|
+
premiumUrl: string | null;
|
|
12
|
+
handleUpgrade: (redirectPlan?: StripeUpgradePlan) => Promise<void>;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { FreeUsageCount } from "@iblai/iblai-api";
|
|
2
|
+
interface Tenant {
|
|
3
|
+
key: string;
|
|
4
|
+
is_admin: boolean;
|
|
5
|
+
org: string;
|
|
6
|
+
}
|
|
7
|
+
export interface SubscriptionFlowConfig {
|
|
8
|
+
platformName: string;
|
|
9
|
+
currentTenantKey: string;
|
|
10
|
+
username: string;
|
|
11
|
+
currentTenantOrg: string;
|
|
12
|
+
userTenants: Tenant[];
|
|
13
|
+
isAdmin: boolean;
|
|
14
|
+
mainTenantKey: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* SubscriptionFlow class manages all subscription-related flows and user interactions
|
|
18
|
+
* Handles free trial, usage limits, and subscription management
|
|
19
|
+
*/
|
|
20
|
+
export declare abstract class SubscriptionFlow {
|
|
21
|
+
protected platformName: string;
|
|
22
|
+
protected currentTenantKey: string;
|
|
23
|
+
protected username: string;
|
|
24
|
+
protected currentTenantOrg: string;
|
|
25
|
+
protected userTenants: Tenant[];
|
|
26
|
+
protected isAdmin: boolean;
|
|
27
|
+
protected mainTenantKey: string;
|
|
28
|
+
constructor(config: SubscriptionFlowConfig);
|
|
29
|
+
getPlatformName(): string;
|
|
30
|
+
getCurrentTenantKey(): string;
|
|
31
|
+
getUsername(): string;
|
|
32
|
+
getCurrentTenantOrg(): string;
|
|
33
|
+
getUserTenants(): Tenant[];
|
|
34
|
+
isUserAdmin(): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Handles the flow when user reaches their free usage limit
|
|
37
|
+
* Updates banner with appropriate message based on remaining usage count
|
|
38
|
+
*/
|
|
39
|
+
abstract handleFreeUsageCountFlow(freeUsageCount: FreeUsageCount): void;
|
|
40
|
+
/**
|
|
41
|
+
* Handles the flow when user's free trial period has ended
|
|
42
|
+
* Updates banner and clears any existing trial interval
|
|
43
|
+
*/
|
|
44
|
+
abstract handleTrialEndedFlow(freeTrialIntervalID?: number): void;
|
|
45
|
+
/**
|
|
46
|
+
* Handles the flow for ongoing subscription period
|
|
47
|
+
* Updates banner with remaining trial time and subscription options
|
|
48
|
+
*/
|
|
49
|
+
abstract handleSubscriptionOnGoingFlow(timeRemainingInString: string): void;
|
|
50
|
+
/**
|
|
51
|
+
* Handles redirection to external URLs with optional toast notification
|
|
52
|
+
*/
|
|
53
|
+
abstract handleRedirectToURLFlow(redirectUrl: string, toastMessage?: string): void;
|
|
54
|
+
/**
|
|
55
|
+
* Displays the pricing modal for subscription options
|
|
56
|
+
*/
|
|
57
|
+
handlePricingPageDisplayFlow(): void;
|
|
58
|
+
/**
|
|
59
|
+
* Handles the pre-subscription state
|
|
60
|
+
* Updates banner to show loading state
|
|
61
|
+
*/
|
|
62
|
+
handleBeforeSubscribeUserTriggerFlow(): void;
|
|
63
|
+
/**
|
|
64
|
+
* Handles successful subscription completion
|
|
65
|
+
* Shows success message and disables subscription banner
|
|
66
|
+
*/
|
|
67
|
+
abstract handleSuccessfullySubscribedFlow(message?: string): void;
|
|
68
|
+
getMainTenantKey(): string;
|
|
69
|
+
}
|
|
70
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SubscriptionFlow } from "./class-subscription-flow";
|
|
2
|
+
/**
|
|
3
|
+
* Hook to handle subscription logic
|
|
4
|
+
* @param subscriptionFlow Instance of SubscriptionFlow that manages different subscription states and actions
|
|
5
|
+
*/
|
|
6
|
+
export declare const useSubscriptionHandler: (subscriptionFlow: SubscriptionFlow) => {
|
|
7
|
+
handleSubscriptionCheck: () => Promise<void>;
|
|
8
|
+
handleIntervalSubscriptionCheck: () => (() => void) | undefined;
|
|
9
|
+
trialCounterStarted: boolean;
|
|
10
|
+
bannerButtonTriggerCallback: (trigger: string) => () => void;
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { StripeContextResponse } from "@iblai/data-layer";
|
|
2
|
+
interface Tenant {
|
|
3
|
+
key: string;
|
|
4
|
+
is_admin: boolean;
|
|
5
|
+
org: string;
|
|
6
|
+
is_advertising?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface SubscriptionFlowConfigV2 {
|
|
9
|
+
platformName: string;
|
|
10
|
+
currentTenantKey: string;
|
|
11
|
+
username: string;
|
|
12
|
+
currentTenantOrg: string;
|
|
13
|
+
userTenants: Tenant[];
|
|
14
|
+
isAdmin: boolean;
|
|
15
|
+
mainTenantKey: string;
|
|
16
|
+
userEmail: string;
|
|
17
|
+
mentorUrl: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* SubscriptionFlow class manages all subscription-related flows and user interactions
|
|
21
|
+
* Handles free trial, usage limits, and subscription management
|
|
22
|
+
*/
|
|
23
|
+
export declare abstract class SubscriptionFlowV2 {
|
|
24
|
+
protected platformName: string;
|
|
25
|
+
protected currentTenantKey: string;
|
|
26
|
+
protected username: string;
|
|
27
|
+
protected currentTenantOrg: string;
|
|
28
|
+
protected userTenants: Tenant[];
|
|
29
|
+
protected isAdmin: boolean;
|
|
30
|
+
protected mainTenantKey: string;
|
|
31
|
+
protected userEmail: string;
|
|
32
|
+
protected mentorUrl: string;
|
|
33
|
+
constructor(config: SubscriptionFlowConfigV2);
|
|
34
|
+
getPlatformName(): string;
|
|
35
|
+
getCurrentTenantKey(): string;
|
|
36
|
+
getUsername(): string;
|
|
37
|
+
getCurrentTenantOrg(): string;
|
|
38
|
+
getUserTenants(): Tenant[];
|
|
39
|
+
isUserAdmin(): boolean;
|
|
40
|
+
getUserEmail(): string;
|
|
41
|
+
getMainTenantKey(): string;
|
|
42
|
+
getMentorUrl(): string;
|
|
43
|
+
abstract handleRedirectToBillingPageFlow(billingUrl: string): void;
|
|
44
|
+
handleBeforeTopUpCreditTriggerFlow(): void;
|
|
45
|
+
handleBeforeBillingPageTriggerFlow(): void;
|
|
46
|
+
/**
|
|
47
|
+
* Handles the flow when user reaches their free usage limit
|
|
48
|
+
* Updates banner with appropriate message based on remaining usage count
|
|
49
|
+
*/
|
|
50
|
+
abstract handleFreeUsageCountFlow(hasCredits: boolean, appExists: boolean): void;
|
|
51
|
+
/**
|
|
52
|
+
* Displays the pricing modal for subscription options
|
|
53
|
+
*/
|
|
54
|
+
abstract handlePricingPageDisplayFlow(stripeContext: StripeContextResponse, creditExhausted: boolean): void;
|
|
55
|
+
/**
|
|
56
|
+
* Displays error notification when payment flow fails
|
|
57
|
+
*/
|
|
58
|
+
handleFailureOnPaymentFlow(): void;
|
|
59
|
+
handleBeforePricingPageDisplayFlow(): void;
|
|
60
|
+
handleFailureOnTopUpCreditTriggerFlow(): void;
|
|
61
|
+
handlePaidPlanCreditExhaustedFlow(): void;
|
|
62
|
+
handleProPlanCreditExhaustedFlow(): void;
|
|
63
|
+
handleStudentOnPaidPlanCreditExhaustedFlow(): void;
|
|
64
|
+
abstract handleOpenContactAdminFlow(adminEmail: string): void;
|
|
65
|
+
abstract handleCreditExhaustedWithUserOnFreePackageFlow({ subscriptionId, expiryDate, }: {
|
|
66
|
+
subscriptionId: string;
|
|
67
|
+
expiryDate: string;
|
|
68
|
+
}): void;
|
|
69
|
+
abstract handleCreditExhaustedWithUserOnStarterPackageFlow({ subscriptionId, expiryDate, }: {
|
|
70
|
+
subscriptionId: string;
|
|
71
|
+
expiryDate: string;
|
|
72
|
+
}): void;
|
|
73
|
+
abstract handleCreditExhaustedWithUserOnProPackageFlow({ expiryDate, }: {
|
|
74
|
+
expiryDate: string;
|
|
75
|
+
}): void;
|
|
76
|
+
handleFailureOnBillingPageTriggerFlow(): void;
|
|
77
|
+
}
|
|
78
|
+
export {};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export declare const SUBSCRIPTION_V2_TRIGGERS: {
|
|
2
|
+
PRICING_MODAL: string;
|
|
3
|
+
TOP_UP_CREDIT: string;
|
|
4
|
+
CONTACT_ADMIN: string;
|
|
5
|
+
BILLING_PAGE: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const SUBSCRIPTION_MESSAGES: {
|
|
8
|
+
CREDIT_EXHAUSTED: {
|
|
9
|
+
FREE_PACKAGE: ({ expiryDate }: {
|
|
10
|
+
expiryDate: string;
|
|
11
|
+
}) => string;
|
|
12
|
+
STARTER_PACKAGE: ({ expiryDate }: {
|
|
13
|
+
expiryDate: string;
|
|
14
|
+
}) => string;
|
|
15
|
+
PRO_PACKAGE: ({ expiryDate }: {
|
|
16
|
+
expiryDate: string;
|
|
17
|
+
}) => string;
|
|
18
|
+
STUDENT_UNDER_PAID_PACKAGE_EMAIL_BODY: ({ currentTenantOrg, userEmail, }: {
|
|
19
|
+
currentTenantOrg: string;
|
|
20
|
+
userEmail: string;
|
|
21
|
+
}) => string;
|
|
22
|
+
STUDENT_UNDER_PAID_PACKAGE_EMAIL_SUBJECT: ({ currentTenantOrg, }: {
|
|
23
|
+
currentTenantOrg: string;
|
|
24
|
+
}) => string;
|
|
25
|
+
ADMIN: string;
|
|
26
|
+
STUDENT: string;
|
|
27
|
+
FREE_TRIAL_LIMIT: string;
|
|
28
|
+
NO_APP: string;
|
|
29
|
+
};
|
|
30
|
+
ACTION_BUTTONS: {
|
|
31
|
+
FREE_PACKAGE: string;
|
|
32
|
+
STARTER_PACKAGE: string;
|
|
33
|
+
PRO_PACKAGE: string;
|
|
34
|
+
UPGRADE: string;
|
|
35
|
+
TOP_UP: string;
|
|
36
|
+
CONTACT_ADMIN: string;
|
|
37
|
+
ADD_CREDITS: string;
|
|
38
|
+
};
|
|
39
|
+
TOAST_MESSAGES: {
|
|
40
|
+
PRICING_PAGE_LOAD_ERROR: string;
|
|
41
|
+
TOP_UP_CREDIT_TRIGGER_LOAD_ERROR: string;
|
|
42
|
+
REDIRECTING_BILLING_PAGE: string;
|
|
43
|
+
BILLING_PAGE_TRIGGER_LOAD_ERROR: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
export declare const SUBSCRIPTION_PACKAGES: {
|
|
47
|
+
PRE_FREE_PACKAGE: string;
|
|
48
|
+
FREE_PACKAGE: (productName: string) => string;
|
|
49
|
+
STARTER_PACKAGE: (productName: string) => string;
|
|
50
|
+
PRO_PACKAGE: (productName: string) => string;
|
|
51
|
+
};
|
|
52
|
+
export declare const SUBSCRIPTION_PACKAGES_V2: {
|
|
53
|
+
FREE_PACKAGE: string;
|
|
54
|
+
STARTER_PACKAGE: string;
|
|
55
|
+
PRO_PACKAGE: string;
|
|
56
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type PricingTablePayload = {
|
|
2
|
+
pricing_table_id?: string;
|
|
3
|
+
publishable_key?: string;
|
|
4
|
+
client_reference_id?: string;
|
|
5
|
+
};
|
|
6
|
+
type Local402Data = {
|
|
7
|
+
error?: string;
|
|
8
|
+
message?: string;
|
|
9
|
+
pricing_table?: PricingTablePayload;
|
|
10
|
+
};
|
|
11
|
+
interface Use402ErrorCheckProps {
|
|
12
|
+
/**
|
|
13
|
+
* Called when an admin hits a 402. Hosts wire this to whatever navigation
|
|
14
|
+
* primitive they use (Next router push, history.pushState, custom event, etc.)
|
|
15
|
+
* to surface the billing tab.
|
|
16
|
+
*/
|
|
17
|
+
navigateToAdminBilling: () => void;
|
|
18
|
+
}
|
|
19
|
+
export declare const use402ErrorCheck: ({ navigateToAdminBilling, }: Use402ErrorCheckProps) => {
|
|
20
|
+
handle402Error: (messageData: Local402Data) => Promise<void>;
|
|
21
|
+
};
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PricingModalData } from "@web-utils/types/subscription";
|
|
2
|
+
export declare const useExternalPricingPlan: ({ pricingModalData, userEmail, }: {
|
|
3
|
+
pricingModalData: PricingModalData;
|
|
4
|
+
userEmail: string;
|
|
5
|
+
}) => {
|
|
6
|
+
pricingBoxIframeRef: import("react").RefObject<null>;
|
|
7
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { SubscriptionFlowV2 } from "./class-subscription-flow";
|
|
2
|
+
/**
|
|
3
|
+
* Hook to handle subscription logic
|
|
4
|
+
* @param subscriptionFlow Instance of SubscriptionFlow that manages different subscription states and actions
|
|
5
|
+
*/
|
|
6
|
+
export declare const useSubscriptionHandlerV2: (subscriptionFlow: SubscriptionFlowV2) => {
|
|
7
|
+
handleSubscriptionCheck: () => Promise<void>;
|
|
8
|
+
bannerButtonTriggerCallback: (trigger: string) => ((returnURL?: string) => Promise<void>) | (() => void);
|
|
9
|
+
CREDIT_INTERVAL_CHECK_COUNTER: number;
|
|
10
|
+
getBillingURL: ({ returnURL, includeSubscriptionIdIfNeeded, additionalPayload, }: {
|
|
11
|
+
returnURL: string;
|
|
12
|
+
includeSubscriptionIdIfNeeded?: boolean;
|
|
13
|
+
additionalPayload?: Record<string, any>;
|
|
14
|
+
}) => Promise<any>;
|
|
15
|
+
getTopUpURL: (obtainBillingPageURLIfNeeded?: boolean) => Promise<any>;
|
|
16
|
+
getUserSubscriptionPackage: () => Promise<string | null>;
|
|
17
|
+
getUserActiveApp: (platformKey?: string, useCache?: boolean) => Promise<{
|
|
18
|
+
id: null;
|
|
19
|
+
app: {
|
|
20
|
+
name: string;
|
|
21
|
+
url: string;
|
|
22
|
+
type: string;
|
|
23
|
+
metadata: null;
|
|
24
|
+
onboarding_required: boolean;
|
|
25
|
+
};
|
|
26
|
+
platform: {
|
|
27
|
+
key: any;
|
|
28
|
+
name: any;
|
|
29
|
+
org: any;
|
|
30
|
+
lms_url: null;
|
|
31
|
+
cms_url: null;
|
|
32
|
+
portal_url: null;
|
|
33
|
+
is_advertising: boolean;
|
|
34
|
+
is_enterprise: boolean;
|
|
35
|
+
};
|
|
36
|
+
subscription: {
|
|
37
|
+
identifier: any;
|
|
38
|
+
product: null;
|
|
39
|
+
active: boolean;
|
|
40
|
+
subscription_ends: null;
|
|
41
|
+
subscription_starts: null;
|
|
42
|
+
created_on: null;
|
|
43
|
+
last_updated: null;
|
|
44
|
+
owner: {
|
|
45
|
+
email: null;
|
|
46
|
+
username: null;
|
|
47
|
+
};
|
|
48
|
+
trial_ends: null;
|
|
49
|
+
entitlements: {
|
|
50
|
+
has_credits: any;
|
|
51
|
+
account_id: any;
|
|
52
|
+
available_credits: any;
|
|
53
|
+
};
|
|
54
|
+
uuid: any;
|
|
55
|
+
stripe_mode: null;
|
|
56
|
+
status: string;
|
|
57
|
+
subscription_id: null;
|
|
58
|
+
product_sku: any;
|
|
59
|
+
};
|
|
60
|
+
provider: string;
|
|
61
|
+
is_admin: boolean;
|
|
62
|
+
is_active: boolean;
|
|
63
|
+
metadata: null;
|
|
64
|
+
onboarding_completed: boolean;
|
|
65
|
+
free_trial_started: any;
|
|
66
|
+
free_trial_expired: boolean;
|
|
67
|
+
has_active_subscription: boolean;
|
|
68
|
+
pricing_table: any;
|
|
69
|
+
} | null>;
|
|
70
|
+
getUserActiveAppLegacy: (platformKey?: string, useCache?: boolean) => Promise<any>;
|
|
71
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { TenantMetadata } from "./types";
|
|
2
|
+
declare const CONFIG_MAP: {
|
|
3
|
+
base: ConfigFile;
|
|
4
|
+
skillsAI: ConfigFile;
|
|
5
|
+
mentorAI: ConfigFile;
|
|
6
|
+
};
|
|
7
|
+
export interface ConfigSetting {
|
|
8
|
+
slug: string;
|
|
9
|
+
label: string;
|
|
10
|
+
defaultValue: any;
|
|
11
|
+
description: string;
|
|
12
|
+
type: "boolean" | "string" | "number";
|
|
13
|
+
SPA?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface ConfigFile {
|
|
16
|
+
spa?: string;
|
|
17
|
+
settings: ConfigSetting[];
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Loads all metadata configurations for a given SPA
|
|
21
|
+
* @param spa - The SPA identifier (e.g., 'mentorAI', 'skillsAI', 'mentor', 'skills'). If not provided, returns all SPAs
|
|
22
|
+
* @returns Array of TenantMetadata objects
|
|
23
|
+
*/
|
|
24
|
+
export declare function loadMetadataConfig(spa?: string): TenantMetadata[];
|
|
25
|
+
/**
|
|
26
|
+
* Gets all available SPAs from the configuration
|
|
27
|
+
* @returns Array of SPA identifiers
|
|
28
|
+
*/
|
|
29
|
+
export declare function getAvailableSPAs(): string[];
|
|
30
|
+
/**
|
|
31
|
+
* Gets configuration for a specific SPA
|
|
32
|
+
* @param spa - The SPA identifier
|
|
33
|
+
* @returns ConfigFile object or null if not found
|
|
34
|
+
*/
|
|
35
|
+
export declare function getSPAConfig(spa: string): ConfigFile | null;
|
|
36
|
+
/**
|
|
37
|
+
* Gets all configurations
|
|
38
|
+
* @returns Object with all configurations
|
|
39
|
+
*/
|
|
40
|
+
export declare function getAllConfigs(): typeof CONFIG_MAP;
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { useTenantMetadata } from './use-tenant-metadata';
|
|
2
|
+
export { loadMetadataConfig, getAvailableSPAs, getSPAConfig, getAllConfigs } from './config-loader';
|
|
3
|
+
export type { TenantMetadata } from './types';
|
|
4
|
+
export type { ConfigSetting, ConfigFile } from './config-loader';
|
|
5
|
+
export { METADATAS } from './constants';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare const useTenantMetadata: ({ org, spa, skip, }: {
|
|
2
|
+
org: string;
|
|
3
|
+
spa?: string;
|
|
4
|
+
skip?: boolean;
|
|
5
|
+
}) => {
|
|
6
|
+
metadata: any;
|
|
7
|
+
platformName: any;
|
|
8
|
+
isLoading: any;
|
|
9
|
+
isError: any;
|
|
10
|
+
isSkillsAssignmentsFeatureHidden: () => boolean;
|
|
11
|
+
isSkillsResumeFeatureHidden: () => boolean;
|
|
12
|
+
isMentorAIEnabled: () => boolean;
|
|
13
|
+
isSkillsLeaderBoardEnabled: () => boolean;
|
|
14
|
+
getEmbeddedMentorToUse: () => any;
|
|
15
|
+
isMentorInappropriateContentEnabled: () => boolean;
|
|
16
|
+
metadataLoaded: any;
|
|
17
|
+
getAllMetadatas: () => {
|
|
18
|
+
value: any;
|
|
19
|
+
slug: string;
|
|
20
|
+
label: string;
|
|
21
|
+
defaultValue: any;
|
|
22
|
+
SPA?: string;
|
|
23
|
+
description?: string;
|
|
24
|
+
type?: "boolean" | "string" | "number";
|
|
25
|
+
}[];
|
|
26
|
+
getSupportEmail: () => any;
|
|
27
|
+
getSupportPhone: (defaultSupportPhone?: string) => any;
|
|
28
|
+
isSupportPhoneEnabled: () => boolean;
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useAccessingPublicRoute(): boolean;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Persists a map of mentorId -> sessionId in localStorage so a chat session
|
|
3
|
+
* can be restored across reloads on a per-mentor basis.
|
|
4
|
+
*
|
|
5
|
+
* Returns a tuple shaped like useLocalStorage:
|
|
6
|
+
* `[cachedSessionId, saveCachedSessionId]`.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useCachedSessionId(): [Record<string, string>, import("react").Dispatch<import("react").SetStateAction<Record<string, string>>>, () => void];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
interface FileUploadCapabilities {
|
|
2
|
+
supportsFileUpload: boolean;
|
|
3
|
+
allSupportedTypes: string[];
|
|
4
|
+
maxFileSizeMB: number;
|
|
5
|
+
maxFilesPerMessage: number;
|
|
6
|
+
}
|
|
7
|
+
interface UseChatFileUploadProps {
|
|
8
|
+
org: string;
|
|
9
|
+
userId: string;
|
|
10
|
+
errorHandler?: (error: string) => void;
|
|
11
|
+
capabilities?: FileUploadCapabilities;
|
|
12
|
+
}
|
|
13
|
+
export declare function useChatFileUpload({ org, userId, errorHandler, capabilities, }: UseChatFileUploadProps): {
|
|
14
|
+
uploadFiles: (files: File[]) => Promise<void>;
|
|
15
|
+
retryUpload: (fileId: string) => Promise<void>;
|
|
16
|
+
};
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { OpUnitType } from "dayjs";
|
|
2
|
+
import duration from "dayjs/plugin/duration";
|
|
3
|
+
export declare const useDayJs: () => {
|
|
4
|
+
getTimeDifferenceBetweenTwoDates: (futureDate: string, pastDate: string, format?: OpUnitType) => number;
|
|
5
|
+
getDayJSDurationObjFromSeconds: (seconds: number) => duration.Duration;
|
|
6
|
+
generateFutureDateForNMinutes: (minute?: number) => string;
|
|
7
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useEmbedMode(): boolean;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { RefObject } from "react";
|
|
2
|
+
declare function useEventListener<K extends keyof MediaQueryListEventMap>(eventName: K, handler: (event: MediaQueryListEventMap[K]) => void, element: RefObject<MediaQueryList>, options?: boolean | AddEventListenerOptions): void;
|
|
3
|
+
declare function useEventListener<K extends keyof WindowEventMap>(eventName: K, handler: (event: WindowEventMap[K]) => void, element?: undefined, options?: boolean | AddEventListenerOptions): void;
|
|
4
|
+
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;
|
|
5
|
+
declare function useEventListener<K extends keyof DocumentEventMap>(eventName: K, handler: (event: DocumentEventMap[K]) => void, element: RefObject<Document>, options?: boolean | AddEventListenerOptions): void;
|
|
6
|
+
export { useEventListener };
|