@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.
Files changed (300) hide show
  1. package/dist/auth/index.esm.js.map +1 -1
  2. package/dist/auth/index.js.map +1 -1
  3. package/dist/auth/web-utils/src/__tests__/index.mobile.test.d.ts +7 -0
  4. package/dist/auth/web-utils/src/__tests__/index.web.test.d.ts +8 -0
  5. package/dist/auth/web-utils/src/constants/__tests__/chat.test.d.ts +1 -0
  6. package/dist/auth/web-utils/src/constants/chat.d.ts +8 -0
  7. package/dist/auth/web-utils/src/features/apple-restriction/__tests__/slice.test.d.ts +1 -0
  8. package/dist/auth/web-utils/src/features/apple-restriction/slice.d.ts +7 -0
  9. package/dist/auth/web-utils/src/features/chat/__tests__/slice.test.d.ts +1 -0
  10. package/dist/auth/web-utils/src/features/chat/slice.d.ts +164 -0
  11. package/dist/auth/web-utils/src/features/chat-input/__tests__/api-slice.test.d.ts +1 -0
  12. package/dist/auth/web-utils/src/features/chat-input/api-slice.d.ts +12 -0
  13. package/dist/auth/web-utils/src/features/csv/combine-csv.d.ts +35 -0
  14. package/dist/auth/web-utils/src/features/csv/index.d.ts +1 -0
  15. package/dist/auth/web-utils/src/features/files/__tests__/filesSlice.test.d.ts +1 -0
  16. package/dist/auth/web-utils/src/features/files/filesSlice.d.ts +23 -0
  17. package/dist/auth/web-utils/src/features/host-chat/__tests__/slice.test.d.ts +1 -0
  18. package/dist/auth/web-utils/src/features/host-chat/slice.d.ts +17 -0
  19. package/dist/auth/web-utils/src/features/index.d.ts +11 -0
  20. package/dist/auth/web-utils/src/features/monetization/__tests__/slice.test.d.ts +1 -0
  21. package/dist/auth/web-utils/src/features/monetization/slice.d.ts +16 -0
  22. package/dist/auth/web-utils/src/features/rbac/__tests__/rbac-slice.test.d.ts +1 -0
  23. package/dist/auth/web-utils/src/features/rbac/rbac-slice.d.ts +13 -0
  24. package/dist/auth/web-utils/src/features/subscription/__tests__/slice.test.d.ts +1 -0
  25. package/dist/auth/web-utils/src/features/subscription/constants.d.ts +12 -0
  26. package/dist/auth/web-utils/src/features/subscription/slice.d.ts +28 -0
  27. package/dist/auth/web-utils/src/features/top-banner/__tests__/slice.test.d.ts +1 -0
  28. package/dist/auth/web-utils/src/features/top-banner/slice.d.ts +24 -0
  29. package/dist/auth/web-utils/src/features/tracking/__tests__/time-tracker.test.d.ts +1 -0
  30. package/dist/auth/web-utils/src/features/tracking/examples.d.ts +4 -0
  31. package/dist/auth/web-utils/src/features/tracking/index.d.ts +6 -0
  32. package/dist/auth/web-utils/src/features/tracking/time-tracker.d.ts +29 -0
  33. package/dist/auth/web-utils/src/features/tracking/use-time-tracker-native.d.ts +14 -0
  34. package/dist/auth/web-utils/src/features/tracking/use-time-tracker.d.ts +14 -0
  35. package/dist/auth/web-utils/src/hoc/index.d.ts +2 -0
  36. package/dist/auth/web-utils/src/hoc/with-permissions.d.ts +44 -0
  37. package/dist/auth/web-utils/src/hooks/__tests__/use-accessing-public-route.test.d.ts +1 -0
  38. package/dist/auth/web-utils/src/hooks/__tests__/use-cached-session-id.test.d.ts +1 -0
  39. package/dist/auth/web-utils/src/hooks/__tests__/use-chat-file-upload.test.d.ts +1 -0
  40. package/dist/auth/web-utils/src/hooks/__tests__/use-embed-mode.test.d.ts +1 -0
  41. package/dist/auth/web-utils/src/hooks/__tests__/use-event-callback.test.d.ts +1 -0
  42. package/dist/auth/web-utils/src/hooks/__tests__/use-event-listener.test.d.ts +1 -0
  43. package/dist/auth/web-utils/src/hooks/__tests__/use-file-drag-drop.test.d.ts +1 -0
  44. package/dist/auth/web-utils/src/hooks/__tests__/use-local-storage.test.d.ts +1 -0
  45. package/dist/auth/web-utils/src/hooks/__tests__/use-mentor-settings.test.d.ts +1 -0
  46. package/dist/auth/web-utils/src/hooks/__tests__/use-model-file-upload-capabilities.test.d.ts +1 -0
  47. package/dist/auth/web-utils/src/hooks/__tests__/use-os.test.d.ts +1 -0
  48. package/dist/auth/web-utils/src/hooks/__tests__/use-responsive.test.d.ts +1 -0
  49. package/dist/auth/web-utils/src/hooks/__tests__/use-show-attachment.test.d.ts +1 -0
  50. package/dist/auth/web-utils/src/hooks/__tests__/use-show-free-trial-dialog.test.d.ts +1 -0
  51. package/dist/auth/web-utils/src/hooks/__tests__/use-show-voice-call.test.d.ts +1 -0
  52. package/dist/auth/web-utils/src/hooks/__tests__/use-show-voice-recorder.test.d.ts +1 -0
  53. package/dist/auth/web-utils/src/hooks/__tests__/use-timer.test.d.ts +1 -0
  54. package/dist/auth/web-utils/src/hooks/__tests__/use-tokens.test.d.ts +1 -0
  55. package/dist/auth/web-utils/src/hooks/__tests__/use-user-agreement.test.d.ts +1 -0
  56. package/dist/auth/web-utils/src/hooks/__tests__/use-user.test.d.ts +1 -0
  57. package/dist/auth/web-utils/src/hooks/__tests__/use-voice-chat.test.d.ts +1 -0
  58. package/dist/auth/web-utils/src/hooks/__tests__/use-welcome-message.test.d.ts +1 -0
  59. package/dist/auth/web-utils/src/hooks/chat/__tests__/chat-history.utils.test.d.ts +1 -0
  60. package/dist/auth/web-utils/src/hooks/chat/chat-history.utils.d.ts +10 -0
  61. package/dist/auth/web-utils/src/hooks/chat/ollama-client.d.ts +57 -0
  62. package/dist/auth/web-utils/src/hooks/chat/use-advanced-chat.d.ts +61 -0
  63. package/dist/auth/web-utils/src/hooks/chat/use-advanced-chat.test.d.ts +1 -0
  64. package/dist/auth/web-utils/src/hooks/chat/use-chat-history.d.ts +17 -0
  65. package/dist/auth/web-utils/src/hooks/chat/use-chat-v2.d.ts +146 -0
  66. package/dist/auth/web-utils/src/hooks/chat/use-chat-v2.test.d.ts +1 -0
  67. package/dist/auth/web-utils/src/hooks/chat/use-chat.d.ts +53 -0
  68. package/dist/auth/web-utils/src/hooks/chat/use-get-chat-details.d.ts +14 -0
  69. package/dist/auth/web-utils/src/hooks/chat/use-get-chat-details.test.d.ts +1 -0
  70. package/dist/auth/web-utils/src/hooks/chat/use-mentor-tools.d.ts +24 -0
  71. package/dist/auth/web-utils/src/hooks/chat/use-mentor-tools.test.d.ts +1 -0
  72. package/dist/auth/web-utils/src/hooks/index.d.ts +42 -0
  73. package/dist/auth/web-utils/src/hooks/profile/use-profile-image-upload.d.ts +13 -0
  74. package/dist/auth/web-utils/src/hooks/profile/use-user-profile-update.d.ts +28 -0
  75. package/dist/auth/web-utils/src/hooks/stripe/__tests__/use-stripe-upgrade.test.d.ts +1 -0
  76. package/dist/auth/web-utils/src/hooks/stripe/use-stripe-upgrade.d.ts +14 -0
  77. package/dist/auth/web-utils/src/hooks/subscription/class-subscription-flow.d.ts +70 -0
  78. package/dist/auth/web-utils/src/hooks/subscription/constants.d.ts +4 -0
  79. package/dist/auth/web-utils/src/hooks/subscription/use-subscription-handler.d.ts +11 -0
  80. package/dist/auth/web-utils/src/hooks/subscription-v2/__tests__/use-402-error-check.test.d.ts +1 -0
  81. package/dist/auth/web-utils/src/hooks/subscription-v2/class-subscription-flow.d.ts +78 -0
  82. package/dist/auth/web-utils/src/hooks/subscription-v2/constants.d.ts +56 -0
  83. package/dist/auth/web-utils/src/hooks/subscription-v2/use-402-error-check.d.ts +22 -0
  84. package/dist/auth/web-utils/src/hooks/subscription-v2/use-external-pricing-plan.d.ts +7 -0
  85. package/dist/auth/web-utils/src/hooks/subscription-v2/use-subscription-handler.d.ts +71 -0
  86. package/dist/auth/web-utils/src/hooks/tenant-metadata/__tests__/config-loader.test.d.ts +10 -0
  87. package/dist/auth/web-utils/src/hooks/tenant-metadata/__tests__/use-tenant-metadata.test.d.ts +1 -0
  88. package/dist/auth/web-utils/src/hooks/tenant-metadata/config-loader.d.ts +41 -0
  89. package/dist/auth/web-utils/src/hooks/tenant-metadata/constants.d.ts +9 -0
  90. package/dist/auth/web-utils/src/hooks/tenant-metadata/index.d.ts +5 -0
  91. package/dist/auth/web-utils/src/hooks/tenant-metadata/types.d.ts +9 -0
  92. package/dist/auth/web-utils/src/hooks/tenant-metadata/use-tenant-metadata.d.ts +29 -0
  93. package/dist/auth/web-utils/src/hooks/use-accessing-public-route.d.ts +1 -0
  94. package/dist/auth/web-utils/src/hooks/use-cached-session-id.d.ts +8 -0
  95. package/dist/auth/web-utils/src/hooks/use-chat-file-upload.d.ts +17 -0
  96. package/dist/auth/web-utils/src/hooks/use-day-js.d.ts +7 -0
  97. package/dist/auth/web-utils/src/hooks/use-embed-mode.d.ts +1 -0
  98. package/dist/auth/web-utils/src/hooks/use-event-callback.d.ts +2 -0
  99. package/dist/auth/web-utils/src/hooks/use-event-listener.d.ts +6 -0
  100. package/dist/auth/web-utils/src/hooks/use-file-drag-drop.d.ts +15 -0
  101. package/dist/auth/web-utils/src/hooks/use-isomorphic-layout-effect.d.ts +2 -0
  102. package/dist/auth/web-utils/src/hooks/use-local-storage.d.ts +13 -0
  103. package/dist/auth/web-utils/src/hooks/use-mentor-settings.d.ts +46 -0
  104. package/dist/auth/web-utils/src/hooks/use-model-file-upload-capabilities.d.ts +21 -0
  105. package/dist/auth/web-utils/src/hooks/use-os.d.ts +8 -0
  106. package/dist/auth/web-utils/src/hooks/use-responsive.d.ts +13 -0
  107. package/dist/auth/web-utils/src/hooks/use-show-attachment.d.ts +7 -0
  108. package/dist/auth/web-utils/src/hooks/use-show-free-trial-dialog.d.ts +31 -0
  109. package/dist/auth/web-utils/src/hooks/use-show-voice-call.d.ts +7 -0
  110. package/dist/auth/web-utils/src/hooks/use-show-voice-recorder.d.ts +7 -0
  111. package/dist/auth/web-utils/src/hooks/use-tenant-switch-sync.d.ts +13 -0
  112. package/dist/auth/web-utils/src/hooks/use-timer.d.ts +7 -0
  113. package/dist/auth/web-utils/src/hooks/use-tokens.d.ts +2 -0
  114. package/dist/auth/web-utils/src/hooks/use-user-agreement.d.ts +18 -0
  115. package/dist/auth/web-utils/src/hooks/use-user.d.ts +23 -0
  116. package/dist/auth/web-utils/src/hooks/use-voice-chat.d.ts +11 -0
  117. package/dist/auth/web-utils/src/hooks/use-welcome-message.d.ts +16 -0
  118. package/dist/auth/web-utils/src/index.d.ts +8 -0
  119. package/dist/auth/web-utils/src/index.mobile.d.ts +86 -0
  120. package/dist/auth/web-utils/src/index.web.d.ts +142 -0
  121. package/dist/auth/web-utils/src/providers/__tests__/auth-provider.test.d.ts +1 -0
  122. package/dist/auth/web-utils/src/providers/__tests__/mentor-provider.test.d.ts +1 -0
  123. package/dist/auth/web-utils/src/providers/__tests__/service-worker-provider.test.d.ts +1 -0
  124. package/dist/auth/web-utils/src/providers/__tests__/tenant-provider.test.d.ts +1 -0
  125. package/dist/auth/web-utils/src/providers/auth-provider.d.ts +129 -0
  126. package/dist/auth/web-utils/src/providers/index.d.ts +4 -0
  127. package/dist/auth/web-utils/src/providers/mentor-provider.d.ts +44 -0
  128. package/dist/auth/web-utils/src/providers/service-worker-provider.d.ts +21 -0
  129. package/dist/auth/web-utils/src/providers/tenant-provider.d.ts +77 -0
  130. package/dist/auth/web-utils/src/services/__tests__/event-bus.test.d.ts +1 -0
  131. package/dist/auth/web-utils/src/services/__tests__/file-upload.test.d.ts +1 -0
  132. package/dist/auth/web-utils/src/services/__tests__/register-sw.test.d.ts +1 -0
  133. package/dist/auth/web-utils/src/services/event-bus.d.ts +6 -0
  134. package/dist/auth/web-utils/src/services/file-upload.d.ts +60 -0
  135. package/dist/auth/web-utils/src/services/index.d.ts +3 -0
  136. package/dist/auth/web-utils/src/services/register-sw.d.ts +71 -0
  137. package/dist/auth/web-utils/src/types/chat.d.ts +1 -0
  138. package/dist/auth/web-utils/src/types/file-upload.d.ts +62 -0
  139. package/dist/auth/web-utils/src/types/index.d.ts +68 -0
  140. package/dist/auth/web-utils/src/types/subscription.d.ts +40 -0
  141. package/dist/auth/web-utils/src/utils/__tests__/auth.test.d.ts +1 -0
  142. package/dist/auth/web-utils/src/utils/__tests__/constants.test.d.ts +1 -0
  143. package/dist/auth/web-utils/src/utils/__tests__/helpers.test.d.ts +1 -0
  144. package/dist/auth/web-utils/src/utils/__tests__/platform.test.d.ts +1 -0
  145. package/dist/auth/web-utils/src/utils/__tests__/tauri-api-cache.test.d.ts +1 -0
  146. package/dist/auth/web-utils/src/utils/__tests__/tenant-switch.test.d.ts +1 -0
  147. package/dist/auth/web-utils/src/utils/constants.d.ts +69 -0
  148. package/dist/auth/web-utils/src/utils/data/__tests__/advanced-tab.test.d.ts +1 -0
  149. package/dist/auth/web-utils/src/utils/data/advanced-tab.d.ts +62 -0
  150. package/dist/auth/web-utils/src/utils/helpers.d.ts +33 -0
  151. package/dist/auth/web-utils/src/utils/index.d.ts +6 -0
  152. package/dist/auth/web-utils/src/utils/platform.d.ts +9 -0
  153. package/dist/auth/web-utils/src/utils/tauri-api-cache.d.ts +19 -0
  154. package/dist/index.esm.js +575 -262
  155. package/dist/index.esm.js.map +1 -1
  156. package/dist/index.js +588 -275
  157. package/dist/index.js.map +1 -1
  158. package/dist/package.json +1 -2
  159. package/dist/web-utils/src/hooks/chat/use-advanced-chat.d.ts +4 -4
  160. package/dist/web-utils/src/hooks/subscription-v2/use-subscription-handler.d.ts +3 -3
  161. package/dist/web-utils/src/hooks/tenant-metadata/use-tenant-metadata.d.ts +3 -3
  162. package/dist/web-utils/src/hooks/use-isomorphic-layout-effect.d.ts +2 -2
  163. package/dist/web-utils/src/hooks/use-mentor-settings.d.ts +21 -21
  164. package/dist/web-utils/src/hooks/use-user-agreement.d.ts +3 -6
  165. package/dist/web-utils/tsconfig.tsbuildinfo +1 -0
  166. package/package.json +1 -2
  167. package/dist/data-layer/src/config.d.ts +0 -8
  168. package/dist/data-layer/src/constants.d.ts +0 -31
  169. package/dist/data-layer/src/core/index.d.ts +0 -11
  170. package/dist/data-layer/src/features/analytics/api-slice.d.ts +0 -3756
  171. package/dist/data-layer/src/features/analytics/constants.d.ts +0 -133
  172. package/dist/data-layer/src/features/analytics/custom-api-slice.d.ts +0 -8
  173. package/dist/data-layer/src/features/analytics/types.d.ts +0 -696
  174. package/dist/data-layer/src/features/api-keys/api-slice.d.ts +0 -702
  175. package/dist/data-layer/src/features/apps/api-slice.d.ts +0 -720
  176. package/dist/data-layer/src/features/artifacts/api-slice.d.ts +0 -1798
  177. package/dist/data-layer/src/features/artifacts/constants.d.ts +0 -42
  178. package/dist/data-layer/src/features/artifacts/types.d.ts +0 -37
  179. package/dist/data-layer/src/features/audit-logs/api-slice.d.ts +0 -268
  180. package/dist/data-layer/src/features/audit-logs/constants.d.ts +0 -11
  181. package/dist/data-layer/src/features/audit-logs/types.d.ts +0 -32
  182. package/dist/data-layer/src/features/auth/api-slice.d.ts +0 -639
  183. package/dist/data-layer/src/features/auth/constants.d.ts +0 -20
  184. package/dist/data-layer/src/features/auth/types.d.ts +0 -33
  185. package/dist/data-layer/src/features/billing/api-slice.d.ts +0 -359
  186. package/dist/data-layer/src/features/billing/constants.d.ts +0 -16
  187. package/dist/data-layer/src/features/billing/custom-api-slice.d.ts +0 -634
  188. package/dist/data-layer/src/features/billing/types.d.ts +0 -36
  189. package/dist/data-layer/src/features/call-configurations/api-slice.d.ts +0 -855
  190. package/dist/data-layer/src/features/call-configurations/constants.d.ts +0 -16
  191. package/dist/data-layer/src/features/call-configurations/types.d.ts +0 -49
  192. package/dist/data-layer/src/features/career/api-slice.d.ts +0 -3080
  193. package/dist/data-layer/src/features/catalog/api-slice.d.ts +0 -10260
  194. package/dist/data-layer/src/features/chat/api-slice.d.ts +0 -1977
  195. package/dist/data-layer/src/features/chat/constants.d.ts +0 -8
  196. package/dist/data-layer/src/features/chat/custom-api-slice.d.ts +0 -272
  197. package/dist/data-layer/src/features/chat-files/api-slice.d.ts +0 -185
  198. package/dist/data-layer/src/features/chat-files/types.d.ts +0 -32
  199. package/dist/data-layer/src/features/chat-history/api-slice.d.ts +0 -1528
  200. package/dist/data-layer/src/features/chat-privacy/api-slice.d.ts +0 -1398
  201. package/dist/data-layer/src/features/chat-privacy/constants.d.ts +0 -13
  202. package/dist/data-layer/src/features/claw/api-slice.d.ts +0 -5471
  203. package/dist/data-layer/src/features/claw/constants.d.ts +0 -126
  204. package/dist/data-layer/src/features/claw/types.d.ts +0 -275
  205. package/dist/data-layer/src/features/constants.d.ts +0 -3
  206. package/dist/data-layer/src/features/core/api-slice.d.ts +0 -9045
  207. package/dist/data-layer/src/features/core/constants.d.ts +0 -51
  208. package/dist/data-layer/src/features/core/custom-api-slice.d.ts +0 -1766
  209. package/dist/data-layer/src/features/core/custom-public-image-asset-api-slice.d.ts +0 -373
  210. package/dist/data-layer/src/features/core/types.d.ts +0 -73
  211. package/dist/data-layer/src/features/course-metadata/api-slice.d.ts +0 -1728
  212. package/dist/data-layer/src/features/course-metadata/types.d.ts +0 -179
  213. package/dist/data-layer/src/features/courses/api-slice.d.ts +0 -664
  214. package/dist/data-layer/src/features/courses/types.d.ts +0 -26
  215. package/dist/data-layer/src/features/credentials/api-slice.d.ts +0 -6360
  216. package/dist/data-layer/src/features/credentials/constants.d.ts +0 -36
  217. package/dist/data-layer/src/features/credentials/custom-api-slice.d.ts +0 -1839
  218. package/dist/data-layer/src/features/credentials/types.d.ts +0 -39
  219. package/dist/data-layer/src/features/custom-domain/api-slice.d.ts +0 -602
  220. package/dist/data-layer/src/features/custom-domain/constants.d.ts +0 -20
  221. package/dist/data-layer/src/features/custom-domain/types.d.ts +0 -46
  222. package/dist/data-layer/src/features/datasets/api-slice.d.ts +0 -439
  223. package/dist/data-layer/src/features/disclaimers/api-slice.d.ts +0 -912
  224. package/dist/data-layer/src/features/disclaimers/constants.d.ts +0 -27
  225. package/dist/data-layer/src/features/disclaimers/types.d.ts +0 -67
  226. package/dist/data-layer/src/features/edx-proctoring/api-slice.d.ts +0 -590
  227. package/dist/data-layer/src/features/edx-proctoring/constants.d.ts +0 -15
  228. package/dist/data-layer/src/features/edx-proctoring/types.d.ts +0 -61
  229. package/dist/data-layer/src/features/edx-sso/api-slice.d.ts +0 -334
  230. package/dist/data-layer/src/features/edx-sso/types.d.ts +0 -10
  231. package/dist/data-layer/src/features/llms/api-slice.d.ts +0 -373
  232. package/dist/data-layer/src/features/mcp/api-slice.d.ts +0 -2613
  233. package/dist/data-layer/src/features/mcp/constants.d.ts +0 -57
  234. package/dist/data-layer/src/features/mcp/types.d.ts +0 -176
  235. package/dist/data-layer/src/features/memory/api-slice.d.ts +0 -3462
  236. package/dist/data-layer/src/features/memory/constants.d.ts +0 -80
  237. package/dist/data-layer/src/features/memory/types.d.ts +0 -190
  238. package/dist/data-layer/src/features/mentor/api-slice.d.ts +0 -7984
  239. package/dist/data-layer/src/features/mentor/constants.d.ts +0 -45
  240. package/dist/data-layer/src/features/mentor/custom-api-slice.d.ts +0 -957
  241. package/dist/data-layer/src/features/mentor/privacy.d.ts +0 -61
  242. package/dist/data-layer/src/features/mentor/types.d.ts +0 -83
  243. package/dist/data-layer/src/features/mentor-categories/api-slice.d.ts +0 -785
  244. package/dist/data-layer/src/features/moderation-logs/api-slice.d.ts +0 -705
  245. package/dist/data-layer/src/features/monetization/constants.d.ts +0 -76
  246. package/dist/data-layer/src/features/monetization/custom-api-slice.d.ts +0 -5178
  247. package/dist/data-layer/src/features/monetization/types.d.ts +0 -229
  248. package/dist/data-layer/src/features/notifications/api-slice.d.ts +0 -1728
  249. package/dist/data-layer/src/features/notifications/constants.d.ts +0 -26
  250. package/dist/data-layer/src/features/notifications/custom-api-slice.d.ts +0 -996
  251. package/dist/data-layer/src/features/notifications/types.d.ts +0 -69
  252. package/dist/data-layer/src/features/per-learner/api-slice.d.ts +0 -1329
  253. package/dist/data-layer/src/features/periodic-agents/api-slice.d.ts +0 -2347
  254. package/dist/data-layer/src/features/platform/api-slice.d.ts +0 -2553
  255. package/dist/data-layer/src/features/platform/constants.d.ts +0 -17
  256. package/dist/data-layer/src/features/platform/custom-api-slice.d.ts +0 -493
  257. package/dist/data-layer/src/features/platform/types.d.ts +0 -61
  258. package/dist/data-layer/src/features/projects/api-slice.d.ts +0 -2026
  259. package/dist/data-layer/src/features/projects/constants.d.ts +0 -51
  260. package/dist/data-layer/src/features/projects/types.d.ts +0 -79
  261. package/dist/data-layer/src/features/prompts/api-slice.d.ts +0 -2464
  262. package/dist/data-layer/src/features/reports/api-slice.d.ts +0 -789
  263. package/dist/data-layer/src/features/retirement/api-slice.d.ts +0 -165
  264. package/dist/data-layer/src/features/retirement/constants.d.ts +0 -7
  265. package/dist/data-layer/src/features/retirement/types.d.ts +0 -3
  266. package/dist/data-layer/src/features/search/ai-search-api-slice.d.ts +0 -1413
  267. package/dist/data-layer/src/features/search/api-slice.d.ts +0 -2017
  268. package/dist/data-layer/src/features/search/constants.d.ts +0 -41
  269. package/dist/data-layer/src/features/search/types.d.ts +0 -161
  270. package/dist/data-layer/src/features/sessions/api-slice.d.ts +0 -969
  271. package/dist/data-layer/src/features/sessions/constants.d.ts +0 -3
  272. package/dist/data-layer/src/features/sessions/url.d.ts +0 -9
  273. package/dist/data-layer/src/features/skills/api-slice.d.ts +0 -1389
  274. package/dist/data-layer/src/features/stripe/api-slice.d.ts +0 -803
  275. package/dist/data-layer/src/features/stripe/constants.d.ts +0 -19
  276. package/dist/data-layer/src/features/stripe/types.d.ts +0 -19
  277. package/dist/data-layer/src/features/tenant/api-slice.d.ts +0 -832
  278. package/dist/data-layer/src/features/tenant/constants.d.ts +0 -11
  279. package/dist/data-layer/src/features/tenant/types.d.ts +0 -19
  280. package/dist/data-layer/src/features/tenant-logo/api-slice.d.ts +0 -349
  281. package/dist/data-layer/src/features/tenant-logo/constants.d.ts +0 -24
  282. package/dist/data-layer/src/features/tools/api-slice.d.ts +0 -417
  283. package/dist/data-layer/src/features/training-documents/api-slice.d.ts +0 -1523
  284. package/dist/data-layer/src/features/user/api-slice.d.ts +0 -2128
  285. package/dist/data-layer/src/features/user/constants.d.ts +0 -47
  286. package/dist/data-layer/src/features/user/types.d.ts +0 -134
  287. package/dist/data-layer/src/features/user-invitations/api-slice.d.ts +0 -762
  288. package/dist/data-layer/src/features/utils.d.ts +0 -94
  289. package/dist/data-layer/src/features/watched-groups/api-slice.d.ts +0 -2481
  290. package/dist/data-layer/src/features/watched-groups/constants.d.ts +0 -66
  291. package/dist/data-layer/src/features/watched-groups/types.d.ts +0 -143
  292. package/dist/data-layer/src/features/workflows/api-slice.d.ts +0 -2454
  293. package/dist/data-layer/src/features/workflows/constants.d.ts +0 -57
  294. package/dist/data-layer/src/features/workflows/types.d.ts +0 -130
  295. package/dist/data-layer/src/index.d.ts +0 -121
  296. package/dist/data-layer/src/reducers/index.d.ts +0 -2
  297. package/dist/data-layer/src/reducers/mentor.d.ts +0 -2
  298. package/dist/data-layer/src/reducers/skills.d.ts +0 -2
  299. package/dist/data-layer/src/services/StorageService.d.ts +0 -5
  300. package/dist/data-layer/src/utils/index.d.ts +0 -6
@@ -0,0 +1,129 @@
1
+ /**
2
+ * AuthProvider Component
3
+ *
4
+ * Provider that handles authentication state and route protection.
5
+ * It manages authentication checks, public route access, and redirects to auth SPA when needed.
6
+ *
7
+ * Platform Support:
8
+ * - Web (Next.js): Uses cookies for cross-SPA synchronization
9
+ * - React Native (Expo): Uses AsyncStorage only (no cookies)
10
+ *
11
+ * IMPORTANT: Cross-SPA Synchronization (Web Only)
12
+ * ================================================
13
+ * On web platforms, this component uses cookies to keep authentication state synchronized
14
+ * across multiple SPAs (e.g., skills and mentor) that share the same domain.
15
+ *
16
+ * To ensure proper synchronization on web, you MUST call the following functions:
17
+ *
18
+ * 1. On Login:
19
+ * ```typescript
20
+ * await storageService.setItem(LOCAL_STORAGE_KEYS.USER_DATA, userData);
21
+ * await storageService.setItem(LOCAL_STORAGE_KEYS.CURRENT_TENANT, tenantKey);
22
+ * await storageService.setItem(LOCAL_STORAGE_KEYS.TENANTS, tenants);
23
+ * await syncAuthToCookies(storageService);
24
+ * ```
25
+ *
26
+ * 2. On Logout:
27
+ * ```typescript
28
+ * await storageService.clear();
29
+ * clearAuthCookies();
30
+ * ```
31
+ *
32
+ * 3. On Tenant Switch:
33
+ * ```typescript
34
+ * await storageService.setItem(LOCAL_STORAGE_KEYS.CURRENT_TENANT, newTenantKey);
35
+ * await syncAuthToCookies(storageService);
36
+ * ```
37
+ *
38
+ * The AuthProvider automatically (web only):
39
+ * - Syncs cookies to localStorage on mount
40
+ * - Polls for cookie changes every 2 seconds
41
+ * - Refreshes the page when cross-SPA changes are detected
42
+ * - Listens for storage events to update cookies when localStorage changes
43
+ * - Monitors logout timestamp cookie to trigger cross-SPA logout
44
+ * - Automatically logs out when another SPA initiates logout
45
+ *
46
+ * For React Native:
47
+ * - Relies on AsyncStorage only (handled by StorageService)
48
+ * - No cookie synchronization
49
+ * - No cross-app automatic sync
50
+ */
51
+ import React from "react";
52
+ import { StorageService } from "@iblai/data-layer";
53
+ /**
54
+ * Sync authentication state to cookies (web only)
55
+ * Should be called on login, logout, and tenant switch
56
+ * On React Native, this is a no-op
57
+ */
58
+ export declare function syncAuthToCookies(storageService: StorageService): Promise<void>;
59
+ export declare function hasNonExpiredAuthToken(): boolean;
60
+ /**
61
+ * Clear current tenant cookie only (web only)
62
+ * Should be called before tenant switching
63
+ * On React Native, this is a no-op
64
+ */
65
+ export declare function clearCurrentTenantCookie(): void;
66
+ /**
67
+ * Clear all authentication cookies (web only)
68
+ * Should be called on logout
69
+ * On React Native, this is a no-op
70
+ */
71
+ export declare function clearAuthCookies(): void;
72
+ export declare function getStoredUserName(storageService: StorageService): Promise<any>;
73
+ export declare function useAuthProvider({ middleware, onAuthSuccess, onAuthFailure, redirectToAuthSpa, username, pathname, storageService, skipAuthCheck, token, enableStorageSync, }: Props): {
74
+ isAuthenticating: boolean;
75
+ userIsAccessingPublicRoute: boolean;
76
+ setUserIsAccessingPublicRoute: React.Dispatch<React.SetStateAction<boolean>>;
77
+ };
78
+ /**
79
+ * Type definition for the authentication context
80
+ * Tracks whether the user is accessing a public route and provides a setter
81
+ */
82
+ export type AuthContextType = {
83
+ userIsAccessingPublicRoute: boolean;
84
+ isLoggedIn: boolean;
85
+ setUserIsAccessingPublicRoute: (iuserIsAccessingPublicRoute: boolean) => void;
86
+ };
87
+ export declare const AuthContext: React.Context<AuthContextType | undefined>;
88
+ /**
89
+ * Hook to access the auth context
90
+ * @throws Error if used outside of AuthContextProvider
91
+ */
92
+ export declare const useAuthContext: () => AuthContextType;
93
+ /**
94
+ * Context Provider component that wraps children with auth context
95
+ */
96
+ export declare const AuthContextProvider: ({ value, children, }: {
97
+ value: AuthContextType;
98
+ children: React.ReactNode;
99
+ }) => import("react/jsx-runtime").JSX.Element;
100
+ /**
101
+ * Props for the AuthProvider component
102
+ */
103
+ type Props = {
104
+ children?: React.ReactNode;
105
+ fallback?: React.ReactNode;
106
+ middleware?: Map<string | RegExp, () => Promise<boolean>>;
107
+ onAuthSuccess?: () => void;
108
+ onAuthFailure?: (reason: string) => void;
109
+ redirectToAuthSpa: (redirectTo?: string, platformKey?: string, logout?: boolean, saveRedirect?: boolean) => void;
110
+ username: string;
111
+ pathname: string;
112
+ skipAuthCheck?: boolean;
113
+ storageService?: StorageService;
114
+ token?: string;
115
+ enableStorageSync?: boolean;
116
+ skip?: boolean;
117
+ };
118
+ /**
119
+ * AuthProvider Component
120
+ *
121
+ * Main authentication provider that:
122
+ * 1. Checks if the current route requires authentication
123
+ * 2. Validates the auth token
124
+ * 3. Fetches user metadata to verify authentication
125
+ * 4. Handles redirects to auth SPA when needed
126
+ * 5. Manages public route access state
127
+ */
128
+ export declare function AuthProvider({ children, fallback, middleware, onAuthSuccess, onAuthFailure, redirectToAuthSpa, username, pathname, storageService, token, enableStorageSync, skip, }: Props): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
129
+ export {};
@@ -0,0 +1,4 @@
1
+ export * from "./auth-provider";
2
+ export * from "./mentor-provider";
3
+ export * from "./tenant-provider";
4
+ export * from "./service-worker-provider";
@@ -0,0 +1,44 @@
1
+ /**
2
+ * MentorProvider Component
3
+ *
4
+ * Provider that manages AI mentor selection and redirection logic.
5
+ * It handles:
6
+ * - Mentor selection based on user preferences and history
7
+ * - Mentor seeding for new tenants
8
+ * - Redirection to appropriate mentor or creation flow
9
+ * - Integration with tenant context for access control
10
+ */
11
+ import React from "react";
12
+ /**
13
+ * Props for the MentorProvider component
14
+ */
15
+ type Props = {
16
+ children?: React.ReactNode;
17
+ fallback?: React.ReactNode;
18
+ onAuthSuccess?: () => void;
19
+ onAuthFailure?: (reason: string) => void;
20
+ redirectToAuthSpa: () => void;
21
+ redirectToMentor: (tenantKey: string, mentorId: string) => void;
22
+ onLoadMentorsPermissions?: (rbacPermissions: Record<string, unknown> | undefined) => void;
23
+ redirectToNoMentorsPage: () => void;
24
+ redirectToCreateMentor: () => void;
25
+ username: string;
26
+ isAdmin: boolean;
27
+ mainTenantKey: string;
28
+ requestedMentorId?: string;
29
+ handleMentorNotFound?: () => Promise<void>;
30
+ forceDetermineMentor?: boolean;
31
+ onComplete?: () => void;
32
+ skip?: boolean;
33
+ };
34
+ /**
35
+ * MentorProvider Component
36
+ *
37
+ * Main mentor provider that:
38
+ * 1. Determines the most appropriate mentor for the user
39
+ * 2. Handles mentor seeding for new tenants
40
+ * 3. Manages redirection based on mentor availability
41
+ * 4. Integrates with tenant context for access control
42
+ */
43
+ export declare function MentorProvider({ children, fallback, onAuthSuccess, onAuthFailure, redirectToAuthSpa, redirectToMentor, onLoadMentorsPermissions, redirectToNoMentorsPage, redirectToCreateMentor, username, isAdmin, mainTenantKey, requestedMentorId, handleMentorNotFound, forceDetermineMentor, onComplete, skip, }: Props): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
44
+ export {};
@@ -0,0 +1,21 @@
1
+ import { type ServiceWorkerStatus } from "../services/register-sw";
2
+ interface ServiceWorkerContextValue {
3
+ status: ServiceWorkerStatus;
4
+ applyUpdate: () => void;
5
+ clearCache: () => void;
6
+ refreshCacheStatus: () => Promise<Record<string, number> | null>;
7
+ checkNetworkNow: () => Promise<boolean>;
8
+ }
9
+ export declare function useServiceWorker(): ServiceWorkerContextValue;
10
+ interface ServiceWorkerProviderProps {
11
+ children: React.ReactNode;
12
+ /**
13
+ * Base path used when registering the service worker. The SW is fetched
14
+ * from `${basePath}/sw.js` and scoped to `basePath || '/'`. Pass the
15
+ * host app's bundler-resolved base path (e.g. Next.js's
16
+ * `process.env.NEXT_PUBLIC_BASE_PATH`). Defaults to '' (root).
17
+ */
18
+ basePath?: string;
19
+ }
20
+ export declare function ServiceWorkerProvider({ children, basePath, }: ServiceWorkerProviderProps): import("react/jsx-runtime").JSX.Element;
21
+ export {};
@@ -0,0 +1,77 @@
1
+ /**
2
+ * TenantProvider
3
+ *
4
+ * Provider that manages tenant-related state and access control.
5
+ * It handles:
6
+ * - Tenant validation and access control
7
+ * - Tenant switching logic
8
+ * - Tenant metadata retrieval
9
+ * - User-tenant relationship verification
10
+ */
11
+ import React from "react";
12
+ import { TokenResponse } from "@iblai/data-layer";
13
+ import { Tenant } from "@web-utils/types";
14
+ /**
15
+ * Type definition for the tenant context
16
+ * Tracks whether the user's path needs to be determined and provides a setter
17
+ */
18
+ export type TenantContextType = {
19
+ determineUserPath: boolean;
20
+ setDetermineUserPath: (value: boolean) => void;
21
+ tenantKey: string;
22
+ setTenantKey: (tenantKey: string) => void;
23
+ metadata: Record<string, any>;
24
+ setMetadata: (metadata: Record<string, any>) => void;
25
+ };
26
+ export declare const TenantContext: React.Context<TenantContextType | undefined>;
27
+ /**
28
+ * Context Provider component that wraps children with tenant context
29
+ */
30
+ export declare const TenantContextProvider: React.FC<{
31
+ value: TenantContextType;
32
+ children: React.ReactNode;
33
+ }>;
34
+ /**
35
+ * Hook to access the tenant context
36
+ * @returns TenantContextType
37
+ */
38
+ export declare const useTenantContext: () => TenantContextType;
39
+ /**
40
+ * Props for the TenantProvider component
41
+ */
42
+ type Props = {
43
+ children?: React.ReactNode;
44
+ fallback?: React.ReactNode;
45
+ onAuthSuccess?: () => void;
46
+ onAuthFailure?: (reason: string) => void;
47
+ currentTenant: string;
48
+ requestedTenant: string;
49
+ handleTenantSwitch: (tenant: string, saveRedirect: boolean, useCustomDomain?: boolean) => Promise<void>;
50
+ saveCurrentTenant: (tenant: Tenant) => void;
51
+ saveUserTenants: (tenants: Tenant[]) => void;
52
+ saveVisitingTenant?: (tenant: Tenant) => void;
53
+ removeVisitingTenant?: () => void;
54
+ saveUserTokens?: (tokens: TokenResponse) => void;
55
+ saveTenant?: (tenant: string) => void;
56
+ onAutoJoinUserToTenant?: (platformName: string) => void;
57
+ redirectToAuthSpa?: (redirectTo?: string, platformKey?: string, logout?: boolean, saveRedirect?: boolean) => void;
58
+ username?: string;
59
+ isIframed?: boolean;
60
+ setUseMentorProvider?: (useMentorProvider: boolean) => void;
61
+ skip?: boolean;
62
+ onLoadPlatformPermissions?: (rbacPermissions: Record<string, unknown> | undefined) => void;
63
+ skipCustomDomainCheck?: boolean;
64
+ onTenantMismatch?: () => void;
65
+ };
66
+ /**
67
+ * TenantProvider Component
68
+ *
69
+ * Main tenant provider that:
70
+ * 1. Validates user's access to requested tenant
71
+ * 2. Manages tenant switching
72
+ * 3. Retrieves and validates tenant metadata
73
+ * 4. Handles tenant-specific domain redirects
74
+ * 5. Maintains tenant access state
75
+ */
76
+ export declare function TenantProvider({ children, fallback, onAuthSuccess, onAuthFailure, currentTenant, requestedTenant, saveCurrentTenant, saveUserTenants, handleTenantSwitch, saveVisitingTenant, removeVisitingTenant, saveUserTokens, saveTenant, onAutoJoinUserToTenant, redirectToAuthSpa, username, isIframed, setUseMentorProvider, skip, onLoadPlatformPermissions, skipCustomDomainCheck, onTenantMismatch, }: Props): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
77
+ export {};
@@ -0,0 +1,6 @@
1
+ export declare const eventBus: import("mitt").Emitter<Record<import("mitt").EventType, unknown>>;
2
+ export declare enum RemoteEvents {
3
+ newChat = "MENTOR:NEW_CHAT",
4
+ stopChatGenerating = "MENTOR:STOP_CHAT_GENERATING",
5
+ sendChatMessage = "MENTOR:SEND_CHAT_MESSAGE"
6
+ }
@@ -0,0 +1,60 @@
1
+ import type { FileInfo, FileReference, UploadProgressCallback } from "../types/file-upload";
2
+ import type { FileUploadURLResponse } from "@iblai/data-layer";
3
+ /**
4
+ * Extract file information from File object
5
+ */
6
+ export declare function getFileInfo(file: File): FileInfo;
7
+ /**
8
+ * Request presigned S3 URL from backend
9
+ * Note: This function should be called via the RTK Query mutation hook
10
+ * This is a helper to show the data flow
11
+ */
12
+ export declare function requestPresignedUrl(sessionId: string, file: File, getUploadUrlFn: (params: {
13
+ org: string;
14
+ userId: string;
15
+ requestBody: {
16
+ session_id: string;
17
+ file_name: string;
18
+ content_type: string;
19
+ file_size: number;
20
+ };
21
+ }) => Promise<FileUploadURLResponse>, org: string, userId: string): Promise<FileUploadURLResponse>;
22
+ /**
23
+ * Upload file directly to S3 using presigned URL
24
+ * Uses axios for cross-platform support (web + React Native)
25
+ */
26
+ export declare function uploadToS3(presignedUrl: string, file: File, contentType: string, onProgress?: UploadProgressCallback): Promise<void>;
27
+ /**
28
+ * Complete file upload flow:
29
+ * 1. Request presigned URL
30
+ * 2. Upload to S3
31
+ * 3. Return file reference
32
+ */
33
+ export declare function createFileReference(file: File, sessionId: string, getUploadUrlFn: (params: {
34
+ org: string;
35
+ userId: string;
36
+ requestBody: {
37
+ session_id: string;
38
+ file_name: string;
39
+ content_type: string;
40
+ file_size: number;
41
+ };
42
+ }) => Promise<FileUploadURLResponse>, org: string, userId: string, onProgress?: UploadProgressCallback): Promise<FileReference>;
43
+ /**
44
+ * Upload multiple files and return their references
45
+ */
46
+ export declare function createMultipleFileReferences(files: File[], sessionId: string, getUploadUrlFn: (params: {
47
+ org: string;
48
+ userId: string;
49
+ requestBody: {
50
+ session_id: string;
51
+ file_name: string;
52
+ content_type: string;
53
+ file_size: number;
54
+ };
55
+ }) => Promise<FileUploadURLResponse>, org: string, userId: string, onFileProgress?: (fileIndex: number, progress: number) => void): Promise<FileReference[]>;
56
+ /**
57
+ * Validate file before upload
58
+ * Returns error message if invalid, null if valid
59
+ */
60
+ export declare function validateFile(file: File, maxSizeBytes?: number, allowedTypes?: string[]): string | null;
@@ -0,0 +1,3 @@
1
+ export * from "./file-upload";
2
+ export * from "./register-sw";
3
+ export * from "./event-bus";
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Service Worker Registration Helper
3
+ *
4
+ * Handles registration, updates, and communication with the service worker.
5
+ */
6
+ export interface ServiceWorkerStatus {
7
+ isSupported: boolean;
8
+ isRegistered: boolean;
9
+ isOnline: boolean;
10
+ registration: ServiceWorkerRegistration | null;
11
+ updateAvailable: boolean;
12
+ }
13
+ type UpdateCallback = (registration: ServiceWorkerRegistration) => void;
14
+ type StatusChangeCallback = (status: ServiceWorkerStatus) => void;
15
+ /**
16
+ * Check if service workers are supported
17
+ */
18
+ export declare function isServiceWorkerSupported(): boolean;
19
+ /**
20
+ * Get current service worker status
21
+ */
22
+ export declare function getServiceWorkerStatus(): ServiceWorkerStatus;
23
+ /**
24
+ * Register the service worker.
25
+ * Defers registration until the page is fully loaded to avoid
26
+ * interfering with chunk loading — especially in WebKit/Safari where
27
+ * early SW registration can cause ChunkLoadError timeouts.
28
+ */
29
+ export declare function registerServiceWorker(basePath?: string): Promise<ServiceWorkerRegistration | null>;
30
+ /**
31
+ * Unregister the service worker
32
+ */
33
+ export declare function unregisterServiceWorker(): Promise<boolean>;
34
+ /**
35
+ * Skip waiting and activate new service worker immediately
36
+ */
37
+ export declare function skipWaiting(): void;
38
+ /**
39
+ * Clear all caches
40
+ */
41
+ export declare function clearAllCaches(): void;
42
+ /**
43
+ * Tell service worker we're running in Tauri
44
+ */
45
+ export declare function setTauriMode(isTauri: boolean): void;
46
+ /**
47
+ * Tell service worker about offline status (from Tauri)
48
+ */
49
+ export declare function setOfflineStatus(isOffline: boolean): void;
50
+ /**
51
+ * Request cache status from service worker
52
+ */
53
+ export declare function getCacheStatus(): Promise<Record<string, number> | null>;
54
+ /**
55
+ * Subscribe to service worker updates
56
+ */
57
+ export declare function onUpdate(callback: UpdateCallback): () => void;
58
+ /**
59
+ * Subscribe to status changes (online/offline, registration, updates)
60
+ */
61
+ export declare function onStatusChange(callback: StatusChangeCallback): () => void;
62
+ /**
63
+ * Setup online/offline listeners
64
+ */
65
+ export declare function setupNetworkListeners(): () => void;
66
+ /**
67
+ * Initialize service worker and network listeners
68
+ * Call this once when app loads
69
+ */
70
+ export declare function initServiceWorker(basePath?: string): Promise<ServiceWorkerStatus>;
71
+ export {};
@@ -0,0 +1 @@
1
+ export type ChatMode = "advanced" | "default";
@@ -0,0 +1,62 @@
1
+ /**
2
+ * File reference sent via WebSocket to backend
3
+ * Backend uses this to retrieve file from S3
4
+ */
5
+ export interface FileReference {
6
+ /** Unique identifier for the ChatFile record */
7
+ file_id: string;
8
+ /** S3 object key for the uploaded file */
9
+ file_key: string;
10
+ /** Original filename */
11
+ file_name: string;
12
+ /** MIME type of the file */
13
+ content_type: string;
14
+ /** File size in bytes */
15
+ file_size: number;
16
+ /** Presigned URL for displaying the file (optional, for UI) */
17
+ upload_url?: string;
18
+ }
19
+ /**
20
+ * File upload state for UI tracking
21
+ */
22
+ export interface FileUploadState {
23
+ /** Original File object */
24
+ file: File;
25
+ /** Upload/processing status */
26
+ status: "pending" | "uploading" | "processing" | "success" | "error";
27
+ /** Upload progress (0-100) */
28
+ progress: number;
29
+ /** File reference after successful upload */
30
+ fileReference?: FileReference;
31
+ /** Error message if upload failed */
32
+ error?: string;
33
+ }
34
+ /**
35
+ * File processing event from WebSocket
36
+ */
37
+ export type FileProcessingEvent = {
38
+ type: "file_processing_progress";
39
+ file_name: string;
40
+ progress: string;
41
+ } | {
42
+ type: "file_processing_success";
43
+ file_name: string;
44
+ file_url: string;
45
+ } | {
46
+ type: "file_error";
47
+ file_name?: string;
48
+ error: string;
49
+ developer_error?: string;
50
+ };
51
+ /**
52
+ * Upload progress callback
53
+ */
54
+ export type UploadProgressCallback = (progress: number) => void;
55
+ /**
56
+ * File info extracted from File object
57
+ */
58
+ export interface FileInfo {
59
+ fileName: string;
60
+ contentType: string;
61
+ fileSize: number;
62
+ }
@@ -0,0 +1,68 @@
1
+ import { z } from "zod";
2
+ export declare const userDataSchema: z.ZodObject<{
3
+ user_display_name: z.ZodString;
4
+ user_email: z.ZodString;
5
+ user_fullname: z.ZodString;
6
+ user_id: z.ZodNumber;
7
+ user_nicename: z.ZodString;
8
+ }, "strip", z.ZodTypeAny, {
9
+ user_display_name: string;
10
+ user_email: string;
11
+ user_fullname: string;
12
+ user_id: number;
13
+ user_nicename: string;
14
+ }, {
15
+ user_display_name: string;
16
+ user_email: string;
17
+ user_fullname: string;
18
+ user_id: number;
19
+ user_nicename: string;
20
+ }>;
21
+ export declare const tenantSchema: z.ZodObject<{
22
+ key: z.ZodString;
23
+ is_admin: z.ZodBoolean;
24
+ org: z.ZodString;
25
+ }, "strip", z.ZodTypeAny, {
26
+ key: string;
27
+ is_admin: boolean;
28
+ org: string;
29
+ }, {
30
+ key: string;
31
+ is_admin: boolean;
32
+ org: string;
33
+ }>;
34
+ export declare const tenantKeySchema: z.ZodString;
35
+ export type TenantKeyMentorIdParams = {
36
+ tenantKey: string;
37
+ mentorId: string;
38
+ };
39
+ export interface TopTrialBannerProps {
40
+ parentContainer: string;
41
+ bannerText?: string;
42
+ onUpgrade?: string;
43
+ loading?: boolean;
44
+ tooltipText?: string;
45
+ }
46
+ export interface Prompt {
47
+ type: "static" | "human" | "ai";
48
+ icon?: string;
49
+ summary?: string;
50
+ content?: string;
51
+ proactive?: boolean;
52
+ hide?: boolean;
53
+ tag?: string;
54
+ }
55
+ export interface Tenant {
56
+ key: string;
57
+ is_admin: boolean;
58
+ org: string;
59
+ name?: string;
60
+ platform_name: string;
61
+ is_advertising?: boolean;
62
+ is_enterprise?: boolean;
63
+ show_paywall?: boolean;
64
+ enable_monetization?: boolean;
65
+ }
66
+ export * from "./chat";
67
+ export * from "./subscription";
68
+ export * from "./file-upload";
@@ -0,0 +1,40 @@
1
+ import { StripeCustomerPortalRequest } from "@iblai/iblai-api";
2
+ import { AccessCheckResponse } from "@iblai/data-layer";
3
+ export interface UseExternalPricingProps {
4
+ referenceId: string;
5
+ customerEmail: string;
6
+ publishableKey: string;
7
+ pricingId?: string;
8
+ }
9
+ export interface PricingModalData {
10
+ referenceId: string;
11
+ customerEmail: string;
12
+ publishableKey: string;
13
+ pricingTableId: string;
14
+ }
15
+ export interface CreateStripeCustomerPortalRequest {
16
+ org: string;
17
+ userId: string;
18
+ requestBody: StripeCustomerPortalRequest;
19
+ }
20
+ /**
21
+ * Shape of the 402 Payment Required error response body.
22
+ * Note: Only `error` is required. Other fields may not be present
23
+ * in all error scenarios (e.g., generic API 402 vs WebSocket 402).
24
+ */
25
+ export interface Error402MessageData extends Partial<AccessCheckResponse> {
26
+ error: string;
27
+ message?: string;
28
+ details?: {
29
+ platform_key: string;
30
+ current_balance_usd: string;
31
+ required_usd: string;
32
+ deficit_usd: string;
33
+ };
34
+ pricing_table?: {
35
+ pricing_table_id: string;
36
+ pricing_table_js: string;
37
+ publishable_key?: string;
38
+ client_reference_id?: string;
39
+ };
40
+ }