@iblai/web-containers 0.0.6 → 0.2.0

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 (177) hide show
  1. package/dist/components/hooks/use-toast.d.ts +1 -1
  2. package/dist/components/index.d.ts +2 -0
  3. package/dist/components/loader.d.ts +1 -0
  4. package/dist/components/modals/user-profile-modal.d.ts +14 -0
  5. package/dist/components/profile/index.d.ts +5 -1
  6. package/dist/components/profile/security.d.ts +1 -1
  7. package/dist/components/profile/use-profile.d.ts +1 -1
  8. package/dist/components/ui/card.d.ts +8 -0
  9. package/dist/components/ui/pagination.d.ts +1 -1
  10. package/dist/components/ui/separator.d.ts +4 -0
  11. package/dist/components/ui/sonner.d.ts +4 -0
  12. package/dist/components/version.d.ts +6 -0
  13. package/dist/data-layer/src/config.d.ts +7 -0
  14. package/dist/data-layer/src/constants.d.ts +30 -0
  15. package/dist/data-layer/src/core/index.d.ts +4 -0
  16. package/dist/data-layer/src/features/analytics/api-slice.d.ts +1600 -0
  17. package/dist/data-layer/src/features/analytics/constants.d.ts +66 -0
  18. package/dist/data-layer/src/features/analytics/types.d.ts +100 -0
  19. package/dist/data-layer/src/features/api-keys/api-slice.d.ts +665 -0
  20. package/dist/data-layer/src/features/apps/api-slice.d.ts +683 -0
  21. package/dist/data-layer/src/features/auth/api-slice.d.ts +137 -0
  22. package/dist/data-layer/src/features/auth/constants.d.ts +8 -0
  23. package/dist/data-layer/src/features/auth/types.d.ts +13 -0
  24. package/dist/data-layer/src/features/billing/api-slice.d.ts +349 -0
  25. package/dist/data-layer/src/features/career/api-slice.d.ts +687 -0
  26. package/dist/data-layer/src/features/catalog/api-slice.d.ts +6602 -0
  27. package/dist/data-layer/src/features/chat/api-slice.d.ts +1832 -0
  28. package/dist/data-layer/src/features/chat-history/api-slice.d.ts +1386 -0
  29. package/dist/data-layer/src/features/constants.d.ts +3 -0
  30. package/dist/data-layer/src/features/core/api-slice.d.ts +653 -0
  31. package/dist/data-layer/src/features/core/constants.d.ts +4 -0
  32. package/dist/data-layer/src/features/credentials/api-slice.d.ts +2129 -0
  33. package/dist/data-layer/src/features/credentials/constants.d.ts +28 -0
  34. package/dist/data-layer/src/features/credentials/custom-api-slice.d.ts +1284 -0
  35. package/dist/data-layer/src/features/credentials/types.d.ts +16 -0
  36. package/dist/data-layer/src/features/datasets/api-slice.d.ts +576 -0
  37. package/dist/data-layer/src/features/llms/api-slice.d.ts +333 -0
  38. package/dist/data-layer/src/features/mentor/api-slice.d.ts +4298 -0
  39. package/dist/data-layer/src/features/mentor/constants.d.ts +31 -0
  40. package/dist/data-layer/src/features/mentor/custom-api-slice.d.ts +268 -0
  41. package/dist/data-layer/src/features/mentor/types.d.ts +38 -0
  42. package/dist/data-layer/src/features/mentor-categories/api-slice.d.ts +311 -0
  43. package/dist/data-layer/src/features/notifications/api-slice.d.ts +946 -0
  44. package/dist/data-layer/src/features/per-learner/api-slice.d.ts +1213 -0
  45. package/dist/data-layer/src/features/platform/api-slice.d.ts +1124 -0
  46. package/dist/data-layer/src/features/prompts/api-slice.d.ts +2276 -0
  47. package/dist/data-layer/src/features/search/api-slice.d.ts +1939 -0
  48. package/dist/data-layer/src/features/sessions/api-slice.d.ts +705 -0
  49. package/dist/data-layer/src/features/skills/api-slice.d.ts +1235 -0
  50. package/dist/data-layer/src/features/stripe/api-slice.d.ts +620 -0
  51. package/dist/data-layer/src/features/stripe/constants.d.ts +15 -0
  52. package/dist/data-layer/src/features/stripe/types.d.ts +9 -0
  53. package/dist/data-layer/src/features/tenant/api-slice.d.ts +759 -0
  54. package/dist/data-layer/src/features/tenant/constants.d.ts +11 -0
  55. package/dist/data-layer/src/features/tenant/types.d.ts +18 -0
  56. package/dist/data-layer/src/features/tenant-logo/api-slice.d.ts +349 -0
  57. package/dist/data-layer/src/features/tenant-logo/constants.d.ts +24 -0
  58. package/dist/data-layer/src/features/tools/api-slice.d.ts +333 -0
  59. package/dist/data-layer/src/features/training-documents/api-slice.d.ts +922 -0
  60. package/dist/data-layer/src/features/user/api-slice.d.ts +1703 -0
  61. package/dist/data-layer/src/features/user/constants.d.ts +40 -0
  62. package/dist/data-layer/src/features/user/types.d.ts +107 -0
  63. package/dist/data-layer/src/features/user-invitations/api-slice.d.ts +718 -0
  64. package/dist/data-layer/src/features/utils.d.ts +66 -0
  65. package/dist/data-layer/src/index.d.ts +47 -0
  66. package/dist/data-layer/src/reducers/index.d.ts +2 -0
  67. package/dist/data-layer/src/reducers/mentor.d.ts +2 -0
  68. package/dist/data-layer/src/reducers/skills.d.ts +1148 -0
  69. package/dist/data-layer/src/services/StorageService.d.ts +5 -0
  70. package/dist/data-layer/src/utils/index.d.ts +2 -0
  71. package/dist/index.esm.js +23491 -2086
  72. package/dist/index.esm.js.map +1 -1
  73. package/dist/index.js +23569 -2157
  74. package/dist/index.js.map +1 -1
  75. package/dist/package.json +98 -0
  76. package/dist/web-containers/src/components/advance-pagination.d.ts +8 -0
  77. package/dist/web-containers/src/components/error/client-error-page.d.ts +10 -0
  78. package/dist/web-containers/src/components/error/error-page.d.ts +18 -0
  79. package/dist/web-containers/src/components/hooks/use-copy-to-clipboard.d.ts +8 -0
  80. package/dist/web-containers/src/components/hooks/use-toast.d.ts +44 -0
  81. package/dist/web-containers/src/components/index.d.ts +13 -0
  82. package/dist/web-containers/src/components/loader.d.ts +1 -0
  83. package/dist/web-containers/src/components/modals/user-profile-modal.d.ts +23 -0
  84. package/dist/web-containers/src/components/notifications/index.d.ts +1 -0
  85. package/dist/web-containers/src/components/notifications/notification-dropdown.d.ts +6 -0
  86. package/dist/web-containers/src/components/profile/account.d.ts +19 -0
  87. package/dist/web-containers/src/components/profile/admin.d.ts +4 -0
  88. package/dist/web-containers/src/components/profile/advanced.d.ts +5 -0
  89. package/dist/web-containers/src/components/profile/billing.d.ts +5 -0
  90. package/dist/web-containers/src/components/profile/index.d.ts +16 -0
  91. package/dist/web-containers/src/components/profile/integration/api-tab/api-key-modal.d.ts +7 -0
  92. package/dist/web-containers/src/components/profile/integration/api-tab/constants.d.ts +2 -0
  93. package/dist/web-containers/src/components/profile/integration/api-tab/create-api-modal.d.ts +8 -0
  94. package/dist/web-containers/src/components/profile/integration/api-tab/delete-api-modal.d.ts +11 -0
  95. package/dist/web-containers/src/components/profile/integration/api-tab/integration-autogenerated-table.d.ts +3 -0
  96. package/dist/web-containers/src/components/profile/integration/data-sources-tab/create-data-source-modal.d.ts +8 -0
  97. package/dist/web-containers/src/components/profile/integration/data-sources-tab/integration-data-sources-tab.d.ts +3 -0
  98. package/dist/web-containers/src/components/profile/integration/index.d.ts +4 -0
  99. package/dist/web-containers/src/components/profile/integration/llms-tab/create-llm-modal.d.ts +8 -0
  100. package/dist/web-containers/src/components/profile/integration/llms-tab/integration-llms-tab.d.ts +3 -0
  101. package/dist/web-containers/src/components/profile/invite-user.d.ts +5 -0
  102. package/dist/web-containers/src/components/profile/invited-users.d.ts +4 -0
  103. package/dist/web-containers/src/components/profile/organization.d.ts +4 -0
  104. package/dist/web-containers/src/components/profile/security.d.ts +3 -0
  105. package/dist/web-containers/src/components/profile/use-profile.d.ts +44 -0
  106. package/dist/web-containers/src/components/spinner/index.d.ts +6 -0
  107. package/dist/web-containers/src/components/tenant-switch/index.d.ts +11 -0
  108. package/dist/web-containers/src/components/tenant-switch/types.d.ts +6 -0
  109. package/dist/web-containers/src/components/top-banner/index.d.ts +3 -0
  110. package/dist/web-containers/src/components/top-banner/types.d.ts +10 -0
  111. package/dist/web-containers/src/components/top-banner/use-top-banner.d.ts +11 -0
  112. package/dist/web-containers/src/components/ui/avatar.d.ts +13 -0
  113. package/dist/web-containers/src/components/ui/badge.d.ts +9 -0
  114. package/dist/web-containers/src/components/ui/button.d.ts +11 -0
  115. package/dist/web-containers/src/components/ui/calendar.d.ts +8 -0
  116. package/dist/web-containers/src/components/ui/card.d.ts +8 -0
  117. package/dist/web-containers/src/components/ui/checkbox.d.ts +4 -0
  118. package/dist/web-containers/src/components/ui/dialog.d.ts +19 -0
  119. package/dist/web-containers/src/components/ui/dropdown-menu.d.ts +25 -0
  120. package/dist/web-containers/src/components/ui/input.d.ts +3 -0
  121. package/dist/web-containers/src/components/ui/label.d.ts +5 -0
  122. package/dist/web-containers/src/components/ui/pagination.d.ts +28 -0
  123. package/dist/web-containers/src/components/ui/popover.d.ts +6 -0
  124. package/dist/web-containers/src/components/ui/select.d.ts +13 -0
  125. package/dist/web-containers/src/components/ui/separator.d.ts +4 -0
  126. package/dist/web-containers/src/components/ui/skeleton.d.ts +2 -0
  127. package/dist/web-containers/src/components/ui/sonner.d.ts +4 -0
  128. package/dist/web-containers/src/components/ui/switch.d.ts +4 -0
  129. package/dist/web-containers/src/components/ui/table.d.ts +10 -0
  130. package/dist/web-containers/src/components/ui/tabs.d.ts +7 -0
  131. package/dist/web-containers/src/components/ui/textarea.d.ts +3 -0
  132. package/dist/web-containers/src/components/ui/toast.d.ts +15 -0
  133. package/dist/web-containers/src/components/ui/toaster.d.ts +15 -0
  134. package/dist/web-containers/src/components/ui/tooltip.d.ts +7 -0
  135. package/dist/web-containers/src/components/ui/use-toast.d.ts +15 -0
  136. package/dist/web-containers/src/components/user-profile-dropdown/index.d.ts +52 -0
  137. package/dist/web-containers/src/components/version.d.ts +6 -0
  138. package/dist/web-containers/src/hooks/index.d.ts +1 -0
  139. package/dist/web-containers/src/hooks/use-iframe-message-handler.d.ts +8 -0
  140. package/dist/web-containers/src/index.d.ts +2 -0
  141. package/dist/web-containers/src/lib/error-utils.d.ts +15 -0
  142. package/dist/web-containers/src/lib/utils.d.ts +2 -0
  143. package/dist/web-containers/src/utils.d.ts +1 -0
  144. package/dist/web-utils/src/features/chat/slice.d.ts +91 -0
  145. package/dist/web-utils/src/features/index.d.ts +1 -0
  146. package/dist/web-utils/src/hooks/chat/use-advanced-chat.d.ts +48 -0
  147. package/dist/web-utils/src/hooks/chat/use-chat-v2.d.ts +56 -0
  148. package/dist/web-utils/src/hooks/chat/use-mentor-tools.d.ts +18 -0
  149. package/dist/web-utils/src/hooks/index.d.ts +15 -0
  150. package/dist/web-utils/src/hooks/profile/use-profile-image-upload.d.ts +13 -0
  151. package/dist/web-utils/src/hooks/profile/use-user-profile-update.d.ts +28 -0
  152. package/dist/web-utils/src/hooks/subscription/class-subscription-flow.d.ts +70 -0
  153. package/dist/web-utils/src/hooks/subscription/constants.d.ts +4 -0
  154. package/dist/web-utils/src/hooks/subscription/use-subscription-handler.d.ts +11 -0
  155. package/dist/web-utils/src/hooks/subscription-v2/class-subscription-flow.d.ts +77 -0
  156. package/dist/web-utils/src/hooks/subscription-v2/constants.d.ts +51 -0
  157. package/dist/web-utils/src/hooks/subscription-v2/use-external-pricing-plan.d.ts +7 -0
  158. package/dist/web-utils/src/hooks/subscription-v2/use-subscription-handler.d.ts +16 -0
  159. package/dist/web-utils/src/hooks/tenant-metadata/config-loader.d.ts +41 -0
  160. package/dist/web-utils/src/hooks/tenant-metadata/constants.d.ts +9 -0
  161. package/dist/web-utils/src/hooks/tenant-metadata/types.d.ts +9 -0
  162. package/dist/web-utils/src/hooks/tenant-metadata/use-tenant-metadata.d.ts +24 -0
  163. package/dist/web-utils/src/hooks/use-day-js.d.ts +7 -0
  164. package/dist/web-utils/src/hooks/use-mentor-settings.d.ts +21 -0
  165. package/dist/web-utils/src/index.d.ts +5 -0
  166. package/dist/web-utils/src/providers/auth-provider.d.ts +64 -0
  167. package/dist/web-utils/src/providers/index.d.ts +3 -0
  168. package/dist/web-utils/src/providers/mentor-provider.d.ts +40 -0
  169. package/dist/web-utils/src/providers/tenant-provider.d.ts +63 -0
  170. package/dist/web-utils/src/types/chat.d.ts +1 -0
  171. package/dist/web-utils/src/types/index.d.ts +55 -0
  172. package/dist/web-utils/src/types/subscription.d.ts +18 -0
  173. package/dist/web-utils/src/utils/constants.d.ts +37 -0
  174. package/dist/web-utils/src/utils/data/advanced-tab.d.ts +62 -0
  175. package/dist/web-utils/src/utils/helpers.d.ts +6 -0
  176. package/dist/web-utils/src/utils/index.d.ts +3 -0
  177. package/package.json +38 -21
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ import * as LabelPrimitive from "@radix-ui/react-label";
3
+ import { type VariantProps } from "class-variance-authority";
4
+ declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
5
+ export { Label };
@@ -0,0 +1,28 @@
1
+ import * as React from "react";
2
+ import { ButtonProps } from "@web-containers/components/ui/button";
3
+ declare const Pagination: {
4
+ ({ className, ...props }: React.ComponentProps<"nav">): import("react/jsx-runtime").JSX.Element;
5
+ displayName: string;
6
+ };
7
+ declare const PaginationContent: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & React.RefAttributes<HTMLUListElement>>;
8
+ declare const PaginationItem: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
9
+ type PaginationLinkProps = {
10
+ isActive?: boolean;
11
+ } & Pick<ButtonProps, "size"> & React.ComponentProps<"a">;
12
+ declare const PaginationLink: {
13
+ ({ className, isActive, size, ...props }: PaginationLinkProps): import("react/jsx-runtime").JSX.Element;
14
+ displayName: string;
15
+ };
16
+ declare const PaginationPrevious: {
17
+ ({ className, ...props }: React.ComponentProps<typeof PaginationLink>): import("react/jsx-runtime").JSX.Element;
18
+ displayName: string;
19
+ };
20
+ declare const PaginationNext: {
21
+ ({ className, ...props }: React.ComponentProps<typeof PaginationLink>): import("react/jsx-runtime").JSX.Element;
22
+ displayName: string;
23
+ };
24
+ declare const PaginationEllipsis: {
25
+ ({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
26
+ displayName: string;
27
+ };
28
+ export { Pagination, PaginationContent, PaginationLink, PaginationItem, PaginationPrevious, PaginationNext, PaginationEllipsis, };
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ import * as PopoverPrimitive from "@radix-ui/react-popover";
3
+ declare const Popover: React.FC<PopoverPrimitive.PopoverProps>;
4
+ declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
6
+ export { Popover, PopoverTrigger, PopoverContent };
@@ -0,0 +1,13 @@
1
+ import * as React from "react";
2
+ import * as SelectPrimitive from "@radix-ui/react-select";
3
+ declare const Select: React.FC<SelectPrimitive.SelectProps>;
4
+ declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
5
+ declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
6
+ declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
7
+ declare const SelectScrollUpButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollUpButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
+ declare const SelectScrollDownButton: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectScrollDownButtonProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
+ declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
10
+ declare const SelectLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
11
+ declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
+ declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
+ export { Select, SelectGroup, SelectValue, SelectTrigger, SelectContent, SelectLabel, SelectItem, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton, };
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import * as SeparatorPrimitive from "@radix-ui/react-separator";
3
+ declare const Separator: React.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
+ export { Separator };
@@ -0,0 +1,2 @@
1
+ declare function Skeleton({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
2
+ export { Skeleton };
@@ -0,0 +1,4 @@
1
+ import { Toaster as Sonner } from "sonner";
2
+ type ToasterProps = React.ComponentProps<typeof Sonner>;
3
+ declare const Toaster: ({ ...props }: ToasterProps) => import("react/jsx-runtime").JSX.Element;
4
+ export { Toaster };
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ import * as SwitchPrimitives from "@radix-ui/react-switch";
3
+ declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
4
+ export { Switch };
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ declare const Table: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableElement> & React.RefAttributes<HTMLTableElement>>;
3
+ declare const TableHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
4
+ declare const TableBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
5
+ declare const TableFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
6
+ declare const TableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableRowElement> & React.RefAttributes<HTMLTableRowElement>>;
7
+ declare const TableHead: React.ForwardRefExoticComponent<React.ThHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
8
+ declare const TableCell: React.ForwardRefExoticComponent<React.TdHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
9
+ declare const TableCaption: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableCaptionElement> & React.RefAttributes<HTMLTableCaptionElement>>;
10
+ export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ import * as TabsPrimitive from "@radix-ui/react-tabs";
3
+ declare const Tabs: React.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>>;
4
+ declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
+ declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
6
+ declare const TabsContent: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
+ export { Tabs, TabsList, TabsTrigger, TabsContent };
@@ -0,0 +1,3 @@
1
+ import * as React from "react";
2
+ declare const Textarea: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref"> & React.RefAttributes<HTMLTextAreaElement>>;
3
+ export { Textarea };
@@ -0,0 +1,15 @@
1
+ import * as React from "react";
2
+ import * as ToastPrimitives from "@radix-ui/react-toast";
3
+ import { type VariantProps } from "class-variance-authority";
4
+ declare const ToastProvider: React.FC<ToastPrimitives.ToastProviderProps>;
5
+ declare const ToastViewport: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React.RefAttributes<HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
6
+ declare const Toast: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React.RefAttributes<HTMLLIElement>, "ref"> & VariantProps<(props?: ({
7
+ variant?: "default" | "destructive" | null | undefined;
8
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLLIElement>>;
9
+ declare const ToastAction: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
10
+ declare const ToastClose: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
11
+ declare const ToastTitle: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastTitleProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
+ declare const ToastDescription: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastDescriptionProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
+ type ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;
14
+ type ToastActionElement = React.ReactElement<typeof ToastAction>;
15
+ export { type ToastProps, type ToastActionElement, ToastProvider, ToastViewport, Toast, ToastTitle, ToastDescription, ToastClose, ToastAction, };
@@ -0,0 +1,15 @@
1
+ import * as React from "react";
2
+ import * as ToastPrimitives from "@radix-ui/react-toast";
3
+ import { type VariantProps } from "class-variance-authority";
4
+ declare const ToastProvider: React.FC<ToastPrimitives.ToastProviderProps>;
5
+ declare const ToastViewport: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React.RefAttributes<HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
6
+ declare const Toast: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React.RefAttributes<HTMLLIElement>, "ref"> & VariantProps<(props?: ({
7
+ variant?: "default" | "destructive" | null | undefined;
8
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLLIElement>>;
9
+ declare const ToastAction: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
10
+ declare const ToastClose: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
11
+ declare const ToastTitle: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastTitleProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
+ declare const ToastDescription: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastDescriptionProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
+ type ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;
14
+ type ToastActionElement = React.ReactElement<typeof ToastAction>;
15
+ export { type ToastProps, type ToastActionElement, ToastProvider, ToastViewport, Toast, ToastTitle, ToastDescription, ToastClose, ToastAction, };
@@ -0,0 +1,7 @@
1
+ import * as React from "react";
2
+ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
3
+ declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): import("react/jsx-runtime").JSX.Element;
4
+ declare function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
5
+ declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
6
+ declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
7
+ export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
@@ -0,0 +1,15 @@
1
+ import * as React from "react";
2
+ import * as ToastPrimitives from "@radix-ui/react-toast";
3
+ import { type VariantProps } from "class-variance-authority";
4
+ declare const ToastProvider: React.FC<ToastPrimitives.ToastProviderProps>;
5
+ declare const ToastViewport: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React.RefAttributes<HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
6
+ declare const Toast: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React.RefAttributes<HTMLLIElement>, "ref"> & VariantProps<(props?: ({
7
+ variant?: "default" | "destructive" | null | undefined;
8
+ } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLLIElement>>;
9
+ declare const ToastAction: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
10
+ declare const ToastClose: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
11
+ declare const ToastTitle: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastTitleProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
+ declare const ToastDescription: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastDescriptionProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
+ type ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;
14
+ type ToastActionElement = React.ReactElement<typeof ToastAction>;
15
+ export { type ToastProps, type ToastActionElement, ToastProvider, ToastViewport, Toast, ToastTitle, ToastDescription, ToastClose, ToastAction, };
@@ -0,0 +1,52 @@
1
+ import React from "react";
2
+ import { Tenant } from "../tenant-switch/types";
3
+ export interface UserMetadata {
4
+ name?: string;
5
+ username?: string;
6
+ email?: string;
7
+ profile_image?: {
8
+ has_image?: boolean;
9
+ image_url_small?: string;
10
+ };
11
+ }
12
+ export interface UserProfileDropdownProps {
13
+ username?: string;
14
+ userIsAdmin?: boolean;
15
+ userIsStudent?: boolean;
16
+ tenantKey?: string;
17
+ mentorId?: string;
18
+ currentTenant?: Tenant;
19
+ userTenants?: Tenant[];
20
+ showProfileTab?: boolean;
21
+ showAccountTab?: boolean;
22
+ showTenantSwitcher?: boolean;
23
+ showHelpLink?: boolean;
24
+ showLogoutButton?: boolean;
25
+ showLearnerModeSwitch?: boolean;
26
+ helpCenterUrl?: string;
27
+ enableGravatarOnProfilePic?: boolean;
28
+ onProfileClick?: (tab: string) => void;
29
+ onLogout?: () => void;
30
+ onTenantChange?: (tenantKey: string) => void;
31
+ onHelpClick?: (url: string) => void;
32
+ billingEnabled?: boolean;
33
+ billingURL?: string;
34
+ topUpEnabled?: boolean;
35
+ topUpURL?: string;
36
+ currentPlan?: string;
37
+ currentSPA?: string;
38
+ LearnerModeSwitchComponent?: React.ComponentType<any>;
39
+ CustomProfileModal?: React.ComponentType<any>;
40
+ className?: string;
41
+ dropdownClassName?: string;
42
+ avatarSize?: number;
43
+ metadata?: {
44
+ help_center_url?: string;
45
+ };
46
+ metadataLoaded?: boolean;
47
+ showMentorAIDisplayCheckbox?: boolean;
48
+ showLeaderboardDisplayCheckbox?: boolean;
49
+ showUsernameField?: boolean;
50
+ showPlatformName?: boolean;
51
+ }
52
+ export declare function UserProfileDropdown({ username, userIsAdmin, userIsStudent, tenantKey, mentorId, currentTenant, userTenants, showProfileTab, showAccountTab, showTenantSwitcher, showHelpLink, showLogoutButton, showLearnerModeSwitch, helpCenterUrl, enableGravatarOnProfilePic, onProfileClick, onLogout, onTenantChange, onHelpClick, billingEnabled, billingURL, topUpEnabled, topUpURL, currentPlan, LearnerModeSwitchComponent, CustomProfileModal, className, dropdownClassName, avatarSize, metadata, metadataLoaded, currentSPA, showMentorAIDisplayCheckbox, showLeaderboardDisplayCheckbox, showUsernameField, showPlatformName, }: UserProfileDropdownProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ export declare function Version({ appName, appVersion, poweredBy, }: {
3
+ appName: string;
4
+ appVersion: string;
5
+ poweredBy: React.ReactNode;
6
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export * from "./use-iframe-message-handler";
@@ -0,0 +1,8 @@
1
+ type MessageHandler = (payload: any, rawEvent: MessageEvent) => void | Promise<void>;
2
+ type UseIframeMessageHandlerOptions = {
3
+ handlers: Record<string, MessageHandler>;
4
+ allowedOrigins?: string[];
5
+ defaultHandler?: (data: any) => void;
6
+ };
7
+ export declare function useIframeMessageHandler({ handlers, allowedOrigins, defaultHandler, }: UseIframeMessageHandlerOptions): void;
8
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from "./hooks";
2
+ export * from "./components";
@@ -0,0 +1,15 @@
1
+ import type React from "react";
2
+ export interface ErrorData {
3
+ code: string;
4
+ title: string;
5
+ description: string;
6
+ icon: React.ReactNode;
7
+ }
8
+ export declare const ErrorIcons: {
9
+ notFound: import("react/jsx-runtime").JSX.Element;
10
+ serverError: import("react/jsx-runtime").JSX.Element;
11
+ forbidden: import("react/jsx-runtime").JSX.Element;
12
+ unauthorized: import("react/jsx-runtime").JSX.Element;
13
+ timeout: import("react/jsx-runtime").JSX.Element;
14
+ };
15
+ export declare function getErrorData(code: string): ErrorData;
@@ -0,0 +1,2 @@
1
+ import { type ClassValue } from "clsx";
2
+ export declare function cn(...inputs: ClassValue[]): string;
@@ -0,0 +1 @@
1
+ export declare const getUserName: () => string;
@@ -0,0 +1,91 @@
1
+ import type { AdvancedTab } from "../../utils";
2
+ import type { Message } from "../../hooks/chat/use-chat-v2";
3
+ export type ChatState = Record<AdvancedTab, Message[]>;
4
+ export interface SessionIds extends Record<AdvancedTab, string> {
5
+ }
6
+ export type StreamingMessage = {
7
+ id: string;
8
+ content: string;
9
+ };
10
+ export declare const defaultSessionIds: SessionIds;
11
+ export type ChatStatus = "idle" | "pending" | "streaming" | "stopped" | "error";
12
+ type ChatSliceState = {
13
+ chats: ChatState;
14
+ isTyping: boolean;
15
+ streaming: boolean;
16
+ currentStreamingMessage: StreamingMessage;
17
+ activeTab: AdvancedTab;
18
+ sessionId: string;
19
+ sessionIds: SessionIds;
20
+ status: ChatStatus;
21
+ tools: string[];
22
+ token: string | null;
23
+ iframeContext: {
24
+ hostInfo: {
25
+ title: string;
26
+ href: string;
27
+ };
28
+ pageContent: string;
29
+ };
30
+ documentFilter: Record<string, unknown> | null;
31
+ };
32
+ export declare const chatActions: import("@reduxjs/toolkit").CaseReducerActions<import("@reduxjs/toolkit").SliceCaseReducers<ChatSliceState>, string>;
33
+ export declare const chatSliceReducerShared: import("@reduxjs/toolkit").Reducer<ChatSliceState>;
34
+ export declare const selectChats: (state: {
35
+ chatSliceShared: ChatSliceState;
36
+ }) => ChatState;
37
+ export declare const selectIsTyping: (state: {
38
+ chatSliceShared: ChatSliceState;
39
+ }) => boolean;
40
+ export declare const selectStreaming: (state: {
41
+ chatSliceShared: ChatSliceState;
42
+ }) => boolean;
43
+ export declare const selectStatus: (state: {
44
+ chatSliceShared: ChatSliceState;
45
+ }) => ChatStatus;
46
+ export declare const selectIsPending: (state: {
47
+ chatSliceShared: ChatSliceState;
48
+ }) => boolean;
49
+ export declare const selectIsStopped: (state: {
50
+ chatSliceShared: ChatSliceState;
51
+ }) => boolean;
52
+ export declare const selectIsError: (state: {
53
+ chatSliceShared: ChatSliceState;
54
+ }) => boolean;
55
+ export declare const selectCurrentStreamingMessage: (state: {
56
+ chatSliceShared: ChatSliceState;
57
+ }) => StreamingMessage;
58
+ export declare const selectActiveTab: (state: {
59
+ chatSliceShared: ChatSliceState;
60
+ }) => "chat" | "summarize" | "translate" | "expand";
61
+ export declare const selectSessionId: (state: {
62
+ chatSliceShared: ChatSliceState;
63
+ }) => string;
64
+ export declare const selectSessionIds: (state: {
65
+ chatSliceShared: ChatSliceState;
66
+ }) => SessionIds;
67
+ export declare const selectIframeContext: (state: {
68
+ chatSliceShared: ChatSliceState;
69
+ }) => {
70
+ hostInfo: {
71
+ title: string;
72
+ href: string;
73
+ };
74
+ pageContent: string;
75
+ };
76
+ export declare const selectDocumentFilter: (state: {
77
+ chatSliceShared: ChatSliceState;
78
+ }) => Record<string, unknown> | null;
79
+ export declare const selectTools: (state: {
80
+ chatSliceShared: ChatSliceState;
81
+ }) => string[];
82
+ export declare const selectToken: (state: {
83
+ chatSliceShared: ChatSliceState;
84
+ }) => string | null;
85
+ export declare const selectActiveChatMessages: (state: {
86
+ chatSliceShared: ChatSliceState;
87
+ }) => Message[];
88
+ export declare const selectNumberOfActiveChatMessages: (state: {
89
+ chatSliceShared: ChatSliceState;
90
+ }) => number;
91
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./chat/slice";
@@ -0,0 +1,48 @@
1
+ import React from "react";
2
+ import type { ChatMode } from "../../types";
3
+ import { type AdvancedTab } from "../../utils";
4
+ import { Message } from "./use-chat-v2";
5
+ import { ChatStatus } from "../../features/chat/slice";
6
+ type Props = {
7
+ mode: ChatMode;
8
+ tenantKey: string;
9
+ mentorId: string;
10
+ username: string;
11
+ token: string;
12
+ wsUrl: string;
13
+ redirectToAuthSpa: () => void;
14
+ stopGenerationWsUrl: string;
15
+ sendMessageToParentWebsite?: (payload: unknown) => void;
16
+ errorHandler?: (message: string, error?: any) => void;
17
+ isPreviewMode?: boolean;
18
+ mentorShareableToken?: string | null;
19
+ on402Error?: (message: Record<string, unknown>) => void;
20
+ };
21
+ export declare function useAdvancedChat({ mode, tenantKey, mentorId, username, token, wsUrl, stopGenerationWsUrl, redirectToAuthSpa, errorHandler, sendMessageToParentWebsite, isPreviewMode, mentorShareableToken, on402Error, }: Props): {
22
+ messages: Message[];
23
+ isStreaming: boolean;
24
+ status: ChatStatus;
25
+ isPending: boolean;
26
+ isStopped: boolean;
27
+ isError: boolean;
28
+ currentStreamingMessage: import("../../features/chat/slice").StreamingMessage;
29
+ activeTab: "chat" | "summarize" | "translate" | "expand";
30
+ uniqueMentorId: string;
31
+ mentorName: string;
32
+ profileImage: string;
33
+ enabledGuidedPrompts: boolean;
34
+ sendMessage: (tab: AdvancedTab, text: string, options?: import("./use-chat-v2").SendMessageOptions) => Promise<void>;
35
+ stopGenerating: () => void;
36
+ setMessage: (message: Message) => void;
37
+ changeTab: (tab: AdvancedTab) => Promise<void>;
38
+ sessionId: string;
39
+ startNewChat: () => Promise<void>;
40
+ isLoadingSessionIds: boolean;
41
+ ws: React.MutableRefObject<WebSocket | null>;
42
+ isConnected: React.MutableRefObject<boolean>;
43
+ messageQueue: React.MutableRefObject<any[]>;
44
+ sessionIds: import("../../features/chat/slice").SessionIds;
45
+ enableSafetyDisclaimer: any;
46
+ resetConnection: () => void;
47
+ };
48
+ export {};
@@ -0,0 +1,56 @@
1
+ import type { AdvancedTab } from "../../utils/data/advanced-tab";
2
+ import { ChatStatus } from "@web-utils/features";
3
+ export interface Message {
4
+ id: string;
5
+ role: "user" | "assistant" | "system";
6
+ content: string;
7
+ timestamp: string;
8
+ url?: string;
9
+ fileType?: string;
10
+ contentType?: string;
11
+ visible: boolean;
12
+ }
13
+ export type SendMessageOptions = {
14
+ visible?: boolean;
15
+ } | undefined;
16
+ export interface UseChatProps {
17
+ wsUrl: string;
18
+ wsToken: string;
19
+ flowConfig: {
20
+ name: string;
21
+ tenant: string;
22
+ username: string;
23
+ pathway: string;
24
+ };
25
+ sessionId: string;
26
+ stopGenerationWsUrl: string;
27
+ activeTab: AdvancedTab;
28
+ enableHaptics?: boolean;
29
+ hapticFeedback?: {
30
+ impactAsync: (style: any) => Promise<void>;
31
+ };
32
+ redirectToAuthSpa: () => void;
33
+ store?: {
34
+ sendMessage?: (text: string) => Promise<void>;
35
+ };
36
+ WebSocketImpl?: typeof WebSocket;
37
+ errorHandler?: (message: string, error?: any) => void;
38
+ onStatusChange: (status: ChatStatus) => void;
39
+ onStreamingChange: (streaming: boolean) => void;
40
+ onStreamingMessageUpdate: (message: {
41
+ id: string | null;
42
+ content: string;
43
+ }) => void;
44
+ onAddUserMessage?: (activeTab: AdvancedTab, message: Message) => void;
45
+ sendMessageToParentWebsite?: (payload: unknown) => void;
46
+ on402Error?: (message: Record<string, unknown>) => void;
47
+ }
48
+ export interface UseChatReturn {
49
+ sendMessage: (tab: AdvancedTab, text: string, options?: SendMessageOptions) => Promise<void>;
50
+ ws: React.MutableRefObject<WebSocket | null>;
51
+ isConnected: React.MutableRefObject<boolean>;
52
+ messageQueue: React.MutableRefObject<any[]>;
53
+ stopGenerating: () => void;
54
+ resetConnection: () => void;
55
+ }
56
+ export declare const useChat: ({ wsUrl, wsToken, flowConfig, sessionId, stopGenerationWsUrl, activeTab, enableHaptics, hapticFeedback, store, errorHandler, onStatusChange, onStreamingChange, onStreamingMessageUpdate, onAddUserMessage, WebSocketImpl, redirectToAuthSpa, sendMessageToParentWebsite, on402Error, }: UseChatProps) => UseChatReturn;
@@ -0,0 +1,18 @@
1
+ type Props = {
2
+ tenantKey: string;
3
+ mentorId: string;
4
+ username: string;
5
+ errorHandler?: (message: string, error?: any) => void;
6
+ };
7
+ export declare function useMentorTools({ tenantKey, mentorId, username, errorHandler, }: Props): {
8
+ tools: any;
9
+ activeTools: string[];
10
+ updateSessionTools: (tool: string) => Promise<void>;
11
+ enableWebBrowsing: boolean;
12
+ screenSharing: boolean;
13
+ deepResearch: boolean;
14
+ imageGeneration: boolean;
15
+ codeInterpreter: boolean;
16
+ promptsIsEnabled: boolean;
17
+ };
18
+ export {};
@@ -0,0 +1,15 @@
1
+ export * from "./subscription/use-subscription-handler";
2
+ export * from "./subscription/constants";
3
+ export * from "./subscription/class-subscription-flow";
4
+ export * from "./subscription-v2/use-subscription-handler";
5
+ export * from "./subscription-v2/class-subscription-flow";
6
+ export * from "./subscription-v2/use-external-pricing-plan";
7
+ export * from "./subscription-v2/constants";
8
+ export * from "./use-day-js";
9
+ export * from "./chat/use-advanced-chat";
10
+ export * from "./chat/use-mentor-tools";
11
+ export * from "./profile/use-user-profile-update";
12
+ export * from "./profile/use-profile-image-upload";
13
+ export * from "./chat/use-chat-v2";
14
+ export * from "./tenant-metadata/use-tenant-metadata";
15
+ export * from "./tenant-metadata/constants";
@@ -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,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 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
+ 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
+ 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
+ handleSubscriptionOnGoingFlow(timeRemainingInString: string): void;
50
+ /**
51
+ * Handles redirection to external URLs with optional toast notification
52
+ */
53
+ 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
+ handleSuccessfullySubscribedFlow(message?: string): void;
68
+ getMainTenantKey(): string;
69
+ }
70
+ export {};
@@ -0,0 +1,4 @@
1
+ export declare const SUBSCRIPTION_TRIGGERS: {
2
+ PRICING_MODAL: string;
3
+ SUBSCRIBE_USER: string;
4
+ };