@liorian/sdk 0.28.0-alpha.56010ca

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 (362) hide show
  1. package/README.md +483 -0
  2. package/package.json +94 -0
  3. package/schemas/module.schema.json +818 -0
  4. package/src/application/index.ts +3 -0
  5. package/src/application/module-instance.ts +36 -0
  6. package/src/application/service/auth-api-service.ts +291 -0
  7. package/src/application/service/auth-user.service.ts +108 -0
  8. package/src/application/service/index.ts +12 -0
  9. package/src/application/service/module-activation-api.service.ts +105 -0
  10. package/src/application/service/notifications-api-service.ts +38 -0
  11. package/src/application/service/notifications-push.service.ts +299 -0
  12. package/src/application/service/notifications-socket-service.ts +76 -0
  13. package/src/application/service/organizations-api-service.ts +104 -0
  14. package/src/application/service/otp-api-service.ts +11 -0
  15. package/src/application/service/storage-api-service.ts +77 -0
  16. package/src/application/service/storefront-api.service.ts +72 -0
  17. package/src/application/service/user-preferences-api.service.ts +57 -0
  18. package/src/domain/config/app.config.ts +35 -0
  19. package/src/domain/config/auth.config.ts +30 -0
  20. package/src/domain/config/index.ts +4 -0
  21. package/src/domain/config/logo.config.ts +17 -0
  22. package/src/domain/entities/activities.interface.ts +18 -0
  23. package/src/domain/entities/catalog.interface.ts +96 -0
  24. package/src/domain/entities/index.ts +13 -0
  25. package/src/domain/entities/media.ts +22 -0
  26. package/src/domain/entities/module-activation.interface.ts +173 -0
  27. package/src/domain/entities/module.interface.ts +101 -0
  28. package/src/domain/entities/notification.interface.ts +23 -0
  29. package/src/domain/entities/objectable.type.ts +3 -0
  30. package/src/domain/entities/organization.interface.ts +81 -0
  31. package/src/domain/entities/user-auth.interface.ts +17 -0
  32. package/src/domain/entities/user-phone.interface.ts +11 -0
  33. package/src/domain/entities/user-profile.interface.ts +23 -0
  34. package/src/domain/entities/user.interface.ts +79 -0
  35. package/src/domain/enums/coloring.enum.ts +6 -0
  36. package/src/domain/enums/domains.enum.ts +282 -0
  37. package/src/domain/enums/index.ts +8 -0
  38. package/src/domain/enums/module-category.enum.ts +57 -0
  39. package/src/domain/enums/module.enum.ts +97 -0
  40. package/src/domain/enums/routine.enum.ts +12 -0
  41. package/src/domain/enums/user-profile.enum.ts +25 -0
  42. package/src/domain/enums/user-status.enum.ts +7 -0
  43. package/src/domain/index.ts +6 -0
  44. package/src/domain/typing/auth-caches.ts +12 -0
  45. package/src/domain/typing/auth-oauth.types.ts +172 -0
  46. package/src/domain/typing/devise.ts +2 -0
  47. package/src/domain/typing/index.ts +10 -0
  48. package/src/domain/typing/response.ts +30 -0
  49. package/src/domain/typing/routine.types.ts +113 -0
  50. package/src/domain/typing/session.interface.ts +28 -0
  51. package/src/domain/typing/statisticals.ts +11 -0
  52. package/src/domain/typing/user-media-upload.ts +9 -0
  53. package/src/domain/typing/values.ts +6 -0
  54. package/src/index.tsx +168 -0
  55. package/src/infrastructure/capabilities/cache-storage/capability.ts +129 -0
  56. package/src/infrastructure/capabilities/cache-storage/enum.ts +5 -0
  57. package/src/infrastructure/capabilities/cache-storage/index.ts +4 -0
  58. package/src/infrastructure/capabilities/cache-storage/types.ts +13 -0
  59. package/src/infrastructure/capabilities/index.ts +3 -0
  60. package/src/infrastructure/capabilities/stackable/capability.ts +55 -0
  61. package/src/infrastructure/capabilities/stackable/index.ts +3 -0
  62. package/src/infrastructure/capabilities/stackable/types.ts +24 -0
  63. package/src/infrastructure/common-classname.constant.ts +4 -0
  64. package/src/infrastructure/data/countries.ts +208 -0
  65. package/src/infrastructure/data/gender.ts +5 -0
  66. package/src/infrastructure/data/index.ts +3 -0
  67. package/src/infrastructure/dataset/index.ts +3 -0
  68. package/src/infrastructure/dataset/sign-in.dataset.ts +21 -0
  69. package/src/infrastructure/dataset/sign-up.dataset.ts +64 -0
  70. package/src/infrastructure/hooks/index.ts +10 -0
  71. package/src/infrastructure/hooks/use-activity-lock-draft.ts +69 -0
  72. package/src/infrastructure/hooks/use-auth.ts +24 -0
  73. package/src/infrastructure/hooks/use-elastic-interaction.ts +180 -0
  74. package/src/infrastructure/hooks/use-is-desktop.ts +25 -0
  75. package/src/infrastructure/hooks/use-is-tauri.ts +17 -0
  76. package/src/infrastructure/hooks/use-mobile.ts +19 -0
  77. package/src/infrastructure/hooks/use-notifications.ts +128 -0
  78. package/src/infrastructure/hooks/use-recent-colors.ts +113 -0
  79. package/src/infrastructure/hooks/use-recent-modules.ts +76 -0
  80. package/src/infrastructure/index.tsx +11 -0
  81. package/src/infrastructure/library/design-system.ts +95 -0
  82. package/src/infrastructure/library/index.tsx +5 -0
  83. package/src/infrastructure/library/motion-utils.ts +77 -0
  84. package/src/infrastructure/library/motion.tsx +31 -0
  85. package/src/infrastructure/library/scroll-progress.tsx +93 -0
  86. package/src/infrastructure/providers/auth-guard.provider.tsx +47 -0
  87. package/src/infrastructure/providers/auth.provider.tsx +168 -0
  88. package/src/infrastructure/providers/index.tsx +8 -0
  89. package/src/infrastructure/providers/module-usage.provider.tsx +95 -0
  90. package/src/infrastructure/providers/modules-guard.provider.tsx +64 -0
  91. package/src/infrastructure/providers/modules-routines.provider.tsx +33 -0
  92. package/src/infrastructure/providers/modules-switcher.provider.tsx +25 -0
  93. package/src/infrastructure/providers/query.provider.tsx +27 -0
  94. package/src/infrastructure/routines/__tests__/routine.test.ts +368 -0
  95. package/src/infrastructure/routines/index.tsx +3 -0
  96. package/src/infrastructure/routines/routine.hook.ts +121 -0
  97. package/src/infrastructure/routines/routine.ts +283 -0
  98. package/src/infrastructure/routines/routine.tsx +283 -0
  99. package/src/infrastructure/stores/activity-lock.store.ts +22 -0
  100. package/src/infrastructure/stores/auth-user-connected.store.ts +24 -0
  101. package/src/infrastructure/stores/dataset.store.ts +106 -0
  102. package/src/infrastructure/stores/index.ts +6 -0
  103. package/src/infrastructure/stores/module.store.ts +266 -0
  104. package/src/infrastructure/stores/upload.store.ts +198 -0
  105. package/src/infrastructure/utilities/access-label.util.ts +158 -0
  106. package/src/infrastructure/utilities/activities.util.tsx +54 -0
  107. package/src/infrastructure/utilities/activity-lock.service.ts +263 -0
  108. package/src/infrastructure/utilities/activity-tracker.service.ts +205 -0
  109. package/src/infrastructure/utilities/api-service.ts +237 -0
  110. package/src/infrastructure/utilities/auth-logout.util.ts +23 -0
  111. package/src/infrastructure/utilities/classname.util.ts +7 -0
  112. package/src/infrastructure/utilities/encryption.service.ts +125 -0
  113. package/src/infrastructure/utilities/form-snapshot.service.ts +304 -0
  114. package/src/infrastructure/utilities/format.util.ts +40 -0
  115. package/src/infrastructure/utilities/index.tsx +23 -0
  116. package/src/infrastructure/utilities/media-label.service.ts +47 -0
  117. package/src/infrastructure/utilities/modules.ts +11 -0
  118. package/src/infrastructure/utilities/permission.util.ts +22 -0
  119. package/src/infrastructure/utilities/push-permission.util.ts +43 -0
  120. package/src/infrastructure/utilities/route-access.ts +38 -0
  121. package/src/infrastructure/utilities/socket-service.ts +123 -0
  122. package/src/infrastructure/utilities/sso-auth.util.ts +188 -0
  123. package/src/infrastructure/utilities/stringable.util.ts +16 -0
  124. package/src/infrastructure/utilities/strings.util.ts +18 -0
  125. package/src/infrastructure/utilities/tauri.util.ts +15 -0
  126. package/src/infrastructure/utilities/utils.ts +6 -0
  127. package/src/infrastructure/utilities/values.ts +5 -0
  128. package/src/presentation/8starlabs-ui/button.tsx +94 -0
  129. package/src/presentation/8starlabs-ui/flip-clock.tsx +368 -0
  130. package/src/presentation/8starlabs-ui/heatmap.tsx +430 -0
  131. package/src/presentation/8starlabs-ui/hooks/index.tsx +2 -0
  132. package/src/presentation/8starlabs-ui/hooks/use-mobile.ts +21 -0
  133. package/src/presentation/8starlabs-ui/index.tsx +20 -0
  134. package/src/presentation/8starlabs-ui/json-viewer.tsx +972 -0
  135. package/src/presentation/8starlabs-ui/marquee.tsx +134 -0
  136. package/src/presentation/8starlabs-ui/partition-bar.tsx +198 -0
  137. package/src/presentation/8starlabs-ui/scroll-fade.tsx +158 -0
  138. package/src/presentation/8starlabs-ui/status-indicator.tsx +86 -0
  139. package/src/presentation/8starlabs-ui/system-banner.tsx +50 -0
  140. package/src/presentation/8starlabs-ui/timeline.tsx +576 -0
  141. package/src/presentation/8starlabs-ui/transport-badge.tsx +249 -0
  142. package/src/presentation/8starlabs-ui/ui/copy-button.tsx +60 -0
  143. package/src/presentation/8starlabs-ui/ui/index.tsx +2 -0
  144. package/src/presentation/analytics-section.tsx +85 -0
  145. package/src/presentation/app-sidebar.tsx +234 -0
  146. package/src/presentation/charts/area-widget.chart-skeleton.tsx +61 -0
  147. package/src/presentation/charts/area-widget.chart.tsx +128 -0
  148. package/src/presentation/charts/chart-widgets.types.ts +81 -0
  149. package/src/presentation/charts/index.tsx +16 -0
  150. package/src/presentation/charts/line-widget.chart-skeleton.tsx +64 -0
  151. package/src/presentation/charts/line-widget.chart.tsx +105 -0
  152. package/src/presentation/charts/pie-widget.chart-skeleton.tsx +56 -0
  153. package/src/presentation/charts/pie-widget.chart.tsx +168 -0
  154. package/src/presentation/charts/radar-widget.chart-skeleton.tsx +67 -0
  155. package/src/presentation/charts/radar-widget.chart.tsx +80 -0
  156. package/src/presentation/charts/radial-stacked-widget.chart-skeleton.tsx +66 -0
  157. package/src/presentation/charts/radial-stacked-widget.chart.tsx +120 -0
  158. package/src/presentation/charts/radial-widget.chart-skeleton.tsx +61 -0
  159. package/src/presentation/charts/radial-widget.chart.tsx +87 -0
  160. package/src/presentation/charts/tooltip-widget.chart-skeleton.tsx +64 -0
  161. package/src/presentation/charts/tooltip-widget.chart.tsx +89 -0
  162. package/src/presentation/components/activity-actions.tsx +20 -0
  163. package/src/presentation/components/activity-container.tsx +55 -0
  164. package/src/presentation/components/activity-content.tsx +20 -0
  165. package/src/presentation/components/activity-descriptor-parser.tsx +37 -0
  166. package/src/presentation/components/activity-header.tsx +20 -0
  167. package/src/presentation/components/activity-loader.tsx +19 -0
  168. package/src/presentation/components/activity-title.tsx +32 -0
  169. package/src/presentation/components/activity.tsx +22 -0
  170. package/src/presentation/components/auth/index.tsx +4 -0
  171. package/src/presentation/components/auth/sso-callback.view.tsx +44 -0
  172. package/src/presentation/components/auth/sso-disconnect.view.tsx +41 -0
  173. package/src/presentation/components/auth/sso-sign-in.view.tsx +29 -0
  174. package/src/presentation/components/auth-lock-screen.tsx +309 -0
  175. package/src/presentation/components/auth-session.view.tsx +17 -0
  176. package/src/presentation/components/data-table.tsx +814 -0
  177. package/src/presentation/components/dynamic-icon.tsx +16 -0
  178. package/src/presentation/components/floating-upload.tsx +291 -0
  179. package/src/presentation/components/index.tsx +40 -0
  180. package/src/presentation/components/local-time.tsx +170 -0
  181. package/src/presentation/components/markdown-parser.tsx +201 -0
  182. package/src/presentation/components/message-scroller.tsx +131 -0
  183. package/src/presentation/components/module-first-access-config.view.tsx +181 -0
  184. package/src/presentation/components/module-first-access-pending.view.tsx +38 -0
  185. package/src/presentation/components/module-guard.tsx +34 -0
  186. package/src/presentation/components/modules-first-access.guard.tsx +88 -0
  187. package/src/presentation/components/modules-guard-forbidden.tsx +46 -0
  188. package/src/presentation/components/notification-details.modal.tsx +145 -0
  189. package/src/presentation/components/notification-item.tsx +127 -0
  190. package/src/presentation/components/notifications-popover.tsx +128 -0
  191. package/src/presentation/components/push-notifications.provider.tsx +65 -0
  192. package/src/presentation/components/upload-progress-dialog.tsx +140 -0
  193. package/src/presentation/components/waiting-bar.tsx +22 -0
  194. package/src/presentation/components/waiting-section.tsx +15 -0
  195. package/src/presentation/components/waiting.tsx +14 -0
  196. package/src/presentation/data-grid/data-grid-empty.tsx +24 -0
  197. package/src/presentation/data-grid/data-grid-search-engine.tsx +32 -0
  198. package/src/presentation/data-grid/data-grid.tsx +892 -0
  199. package/src/presentation/data-grid/index.tsx +4 -0
  200. package/src/presentation/form-screen.tsx +95 -0
  201. package/src/presentation/icons/custom.tsx +20 -0
  202. package/src/presentation/icons/glyphIcons.tsx +53 -0
  203. package/src/presentation/icons/icons.enum.ts +4 -0
  204. package/src/presentation/icons/icons.util.ts +6 -0
  205. package/src/presentation/icons/index.tsx +8 -0
  206. package/src/presentation/icons/lucide.tsx +17 -0
  207. package/src/presentation/icons/remix.tsx +33 -0
  208. package/src/presentation/icons/types.ts +27 -0
  209. package/src/presentation/index.tsx +45 -0
  210. package/src/presentation/modals/components/ModalBox.tsx +74 -0
  211. package/src/presentation/modals/components/ModalPortal.tsx +31 -0
  212. package/src/presentation/modals/components/ModalStepper.tsx +319 -0
  213. package/src/presentation/modals/components/ModalWrapper.tsx +65 -0
  214. package/src/presentation/modals/components/index.tsx +5 -0
  215. package/src/presentation/modals/hooks/index.ts +2 -0
  216. package/src/presentation/modals/hooks/useModal.ts +38 -0
  217. package/src/presentation/modals/index.tsx +5 -0
  218. package/src/presentation/modals/stores/index.ts +2 -0
  219. package/src/presentation/modals/stores/useModalStore.ts +90 -0
  220. package/src/presentation/modals/types/index.ts +2 -0
  221. package/src/presentation/modals/types/modal.type.ts +33 -0
  222. package/src/presentation/module-menubar.tsx +300 -0
  223. package/src/presentation/module-widget.tsx +233 -0
  224. package/src/presentation/nav-documents.tsx +89 -0
  225. package/src/presentation/nav-main.tsx +62 -0
  226. package/src/presentation/nav-secondary.tsx +41 -0
  227. package/src/presentation/nav-user.tsx +109 -0
  228. package/src/presentation/permission-action-badge.tsx +35 -0
  229. package/src/presentation/reui/index.tsx +3 -0
  230. package/src/presentation/reui/stepper.tsx +508 -0
  231. package/src/presentation/reui/timeline.tsx +226 -0
  232. package/src/presentation/sheets/index.tsx +2 -0
  233. package/src/presentation/sheets/legacy-sheet-header.tsx +0 -0
  234. package/src/presentation/sheets/legacy-sheet.tsx +37 -0
  235. package/src/presentation/size.enum.ts +19 -0
  236. package/src/presentation/system/index.tsx +3 -0
  237. package/src/presentation/system/logo.theme.tsx +21 -0
  238. package/src/presentation/system/types.ts +10 -0
  239. package/src/presentation/theme/index.tsx +6 -0
  240. package/src/presentation/theme/prefer-color-scheme.tsx +50 -0
  241. package/src/presentation/theme/switch-color-scheme.tsx +16 -0
  242. package/src/presentation/theme/theme-switcher-button.tsx +20 -0
  243. package/src/presentation/theme/theme.enum.ts +4 -0
  244. package/src/presentation/theme/theme.store.ts +87 -0
  245. package/src/presentation/themes/index.tsx +2 -0
  246. package/src/presentation/themes/katon/dashboard-layout.tsx +1080 -0
  247. package/src/presentation/themes/katon/edge-section.tsx +19 -0
  248. package/src/presentation/themes/katon/header-menubar.tsx +270 -0
  249. package/src/presentation/themes/katon/header-modules-available.tsx +44 -0
  250. package/src/presentation/themes/katon/header-modules-recents.tsx +52 -0
  251. package/src/presentation/themes/katon/header-modules-store.tsx +25 -0
  252. package/src/presentation/themes/katon/header-options.tsx +13 -0
  253. package/src/presentation/themes/katon/header-organization-select.tsx +146 -0
  254. package/src/presentation/themes/katon/header-routines.tsx +74 -0
  255. package/src/presentation/themes/katon/header-tasks-connected-user.tsx +150 -0
  256. package/src/presentation/themes/katon/index.tsx +16 -0
  257. package/src/presentation/themes/katon/main-wrapper.tsx +34 -0
  258. package/src/presentation/themes/katon/module-item-link.tsx +32 -0
  259. package/src/presentation/themes/katon/view-frame.tsx +25 -0
  260. package/src/presentation/themes/katon/view-helmet.tsx +53 -0
  261. package/src/presentation/themes/katon/view-status.tsx +32 -0
  262. package/src/presentation/themes/katon/view-wrapper.tsx +15 -0
  263. package/src/presentation/themes/katon/view.tsx +42 -0
  264. package/src/presentation/ui/accordion-multiselect.tsx +206 -0
  265. package/src/presentation/ui/accordion.tsx +81 -0
  266. package/src/presentation/ui/alert-dialog.tsx +199 -0
  267. package/src/presentation/ui/alert.tsx +76 -0
  268. package/src/presentation/ui/aspect-ratio.tsx +11 -0
  269. package/src/presentation/ui/attachment.tsx +204 -0
  270. package/src/presentation/ui/avatar.tsx +112 -0
  271. package/src/presentation/ui/badge.tsx +49 -0
  272. package/src/presentation/ui/breadcrumb.tsx +122 -0
  273. package/src/presentation/ui/bubble.tsx +125 -0
  274. package/src/presentation/ui/button-group.tsx +83 -0
  275. package/src/presentation/ui/button.tsx +87 -0
  276. package/src/presentation/ui/calendar.tsx +222 -0
  277. package/src/presentation/ui/card.tsx +106 -0
  278. package/src/presentation/ui/carousel.tsx +242 -0
  279. package/src/presentation/ui/chart.tsx +373 -0
  280. package/src/presentation/ui/checkbox.tsx +33 -0
  281. package/src/presentation/ui/clickable.tsx +58 -0
  282. package/src/presentation/ui/collapsible.tsx +33 -0
  283. package/src/presentation/ui/color-swatch-selector.tsx +81 -0
  284. package/src/presentation/ui/combobox.tsx +299 -0
  285. package/src/presentation/ui/command.tsx +195 -0
  286. package/src/presentation/ui/context-menu.tsx +263 -0
  287. package/src/presentation/ui/dialog.tsx +168 -0
  288. package/src/presentation/ui/direction.tsx +22 -0
  289. package/src/presentation/ui/drawer.tsx +134 -0
  290. package/src/presentation/ui/dropdown-menu.tsx +269 -0
  291. package/src/presentation/ui/empty.tsx +104 -0
  292. package/src/presentation/ui/field.tsx +238 -0
  293. package/src/presentation/ui/granularity-selector.tsx +58 -0
  294. package/src/presentation/ui/hover-card.tsx +44 -0
  295. package/src/presentation/ui/index.tsx +74 -0
  296. package/src/presentation/ui/input-group.tsx +156 -0
  297. package/src/presentation/ui/input-otp.tsx +87 -0
  298. package/src/presentation/ui/input.tsx +19 -0
  299. package/src/presentation/ui/item.tsx +196 -0
  300. package/src/presentation/ui/kpi-card.tsx +203 -0
  301. package/src/presentation/ui/label-selector.tsx +100 -0
  302. package/src/presentation/ui/label.tsx +24 -0
  303. package/src/presentation/ui/legacy-birth-date-input.tsx +43 -0
  304. package/src/presentation/ui/legacy-color-picker/index.tsx +42 -0
  305. package/src/presentation/ui/legacy-color-picker/legacy-color-picker.content.tsx +37 -0
  306. package/src/presentation/ui/legacy-color-picker/legacy-color-picker.context.tsx +42 -0
  307. package/src/presentation/ui/legacy-color-picker/legacy-color-picker.hex-input.tsx +97 -0
  308. package/src/presentation/ui/legacy-color-picker/legacy-color-picker.picker.tsx +266 -0
  309. package/src/presentation/ui/legacy-color-picker/legacy-color-picker.presets.ts +22 -0
  310. package/src/presentation/ui/legacy-color-picker/legacy-color-picker.quick-list.tsx +49 -0
  311. package/src/presentation/ui/legacy-color-picker/legacy-color-picker.recent.tsx +43 -0
  312. package/src/presentation/ui/legacy-color-picker/legacy-color-picker.swatches.tsx +111 -0
  313. package/src/presentation/ui/legacy-color-picker/legacy-color-picker.trigger.tsx +128 -0
  314. package/src/presentation/ui/legacy-color-picker/legacy-color-picker.tsx +110 -0
  315. package/src/presentation/ui/legacy-color-picker/legacy-color-picker.types.ts +1 -0
  316. package/src/presentation/ui/legacy-color-picker/legacy-color-picker.utils.ts +114 -0
  317. package/src/presentation/ui/legacy-country-input.tsx +171 -0
  318. package/src/presentation/ui/legacy-gender-input.tsx +22 -0
  319. package/src/presentation/ui/legacy-input.tsx +106 -0
  320. package/src/presentation/ui/legacy-phone-input.tsx +213 -0
  321. package/src/presentation/ui/legacy-select-input.tsx +114 -0
  322. package/src/presentation/ui/legacy-text-area.tsx +111 -0
  323. package/src/presentation/ui/list-items.tsx +59 -0
  324. package/src/presentation/ui/marker.tsx +69 -0
  325. package/src/presentation/ui/media-player/index.tsx +12 -0
  326. package/src/presentation/ui/media-player/media-player.context.tsx +36 -0
  327. package/src/presentation/ui/media-player/media-player.tsx +167 -0
  328. package/src/presentation/ui/media-player/player-controls.tsx +207 -0
  329. package/src/presentation/ui/media-player/players/audio-player.tsx +78 -0
  330. package/src/presentation/ui/media-player/players/index.tsx +4 -0
  331. package/src/presentation/ui/media-player/players/video-player.tsx +193 -0
  332. package/src/presentation/ui/media-player/players/voice-note-player.tsx +108 -0
  333. package/src/presentation/ui/media-player/use-media-player.hook.ts +263 -0
  334. package/src/presentation/ui/menubar.tsx +281 -0
  335. package/src/presentation/ui/message.tsx +92 -0
  336. package/src/presentation/ui/navigation-menu.tsx +172 -0
  337. package/src/presentation/ui/pagination.tsx +129 -0
  338. package/src/presentation/ui/popover.tsx +89 -0
  339. package/src/presentation/ui/progress.tsx +31 -0
  340. package/src/presentation/ui/resizable.tsx +50 -0
  341. package/src/presentation/ui/select.tsx +192 -0
  342. package/src/presentation/ui/separator.tsx +28 -0
  343. package/src/presentation/ui/sheet.tsx +147 -0
  344. package/src/presentation/ui/sidebar.tsx +702 -0
  345. package/src/presentation/ui/skeleton.tsx +13 -0
  346. package/src/presentation/ui/slide-to-confirm.tsx +129 -0
  347. package/src/presentation/ui/slider.tsx +59 -0
  348. package/src/presentation/ui/sonner.tsx +58 -0
  349. package/src/presentation/ui/switch.tsx +33 -0
  350. package/src/presentation/ui/table.tsx +116 -0
  351. package/src/presentation/ui/tabs.tsx +90 -0
  352. package/src/presentation/ui/text-gradient.tsx +84 -0
  353. package/src/presentation/ui/textarea.tsx +18 -0
  354. package/src/presentation/ui/timeline-steps.tsx +235 -0
  355. package/src/presentation/ui/toggle-group.tsx +89 -0
  356. package/src/presentation/ui/toggle.tsx +47 -0
  357. package/src/presentation/ui/tooltip.tsx +57 -0
  358. package/src/presentation/uploading/index.tsx +3 -0
  359. package/src/presentation/uploading/media-upload-field.tsx +152 -0
  360. package/src/presentation/uploading/storage-media.tsx +210 -0
  361. package/src/styles.css +403 -0
  362. package/src/themes.css +1038 -0
@@ -0,0 +1,57 @@
1
+ import {ApiService} from "../../infrastructure/utilities/api-service";
2
+
3
+ export interface UserPreferenceInterface {
4
+ id: string;
5
+ user_id: string;
6
+ label: string | null;
7
+ value: string;
8
+ }
9
+
10
+ export class UserPreferencesApiService extends ApiService {
11
+
12
+ static async getByUserId(userId: string) {
13
+ return await this.get(`/user-preferences/user/${userId}`);
14
+ }
15
+
16
+ static async getValue(userId: string, label: string): Promise<string | undefined> {
17
+ const response = await this.getByUserId(userId);
18
+ const payload = response?.data;
19
+ const preferences = Array.isArray(payload)
20
+ ? (payload as UserPreferenceInterface[])
21
+ : Array.isArray(payload?.data) ? (payload.data as UserPreferenceInterface[]) : [];
22
+ if (!preferences.length) return undefined;
23
+ return preferences.find((preference) => preference.label === label)?.value;
24
+ }
25
+
26
+ static async setValue(userId: string, label: string, value: string): Promise<void> {
27
+ await this.post<UserPreferenceInterface>('/user-preferences', {
28
+ user_id: userId,
29
+ label,
30
+ value,
31
+ });
32
+ }
33
+
34
+ static async getRecentColors(userId: string): Promise<string[]> {
35
+ const response = await this.get(`/user-preferences/colors/recent`);
36
+ return this.parseRecentColors(response);
37
+ }
38
+
39
+ static async addRecentColor(userId: string, color: string): Promise<string[]> {
40
+ const response = await this.post(`/user-preferences/colors/recent`, { color });
41
+ return this.parseRecentColors(response);
42
+ }
43
+
44
+ private static parseRecentColors(response: unknown): string[] {
45
+ const body = (response as {data?: any} | undefined)?.data ?? response;
46
+ const colors = Array.isArray(body?.colors)
47
+ ? body.colors
48
+ : Array.isArray(body?.data?.colors)
49
+ ? body.data.colors
50
+ : [];
51
+ return colors.filter(
52
+ (color: unknown): color is string =>
53
+ typeof color === 'string' && /^#([0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(color)
54
+ );
55
+ }
56
+
57
+ }
@@ -0,0 +1,35 @@
1
+ /** Convertit une valeur d'environnement en durée (ms) strictement positive, sinon repli. */
2
+ function toPositiveMilliseconds(value: unknown, fallback: number): number {
3
+ const parsed = Number(value);
4
+ return Number.isFinite(parsed) && parsed > 0 ? parsed : fallback;
5
+ }
6
+
7
+ export const AppConfig = {
8
+ APP_HOST: process.env.NEXT_PUBLIC_APP_HOST as unknown as string,
9
+ APP_SLUG: process.env.NEXT_PUBLIC_APP_SLUG as unknown as string,
10
+ APP_NAME: process.env.NEXT_PUBLIC_APP_NAME as unknown as string,
11
+ APP_VERSION: process.env.NEXT_PUBLIC_APP_VERSION as unknown as string,
12
+ APP_VERSION_NUMBER: process.env.NEXT_PUBLIC_APP_VERSION_NUMBER as unknown as number,
13
+
14
+ UI_REFRESH_TIMEOUT: process.env.NEXT_PUBLIC_UI_REFRESH_TIMEOUT as unknown as number,
15
+ UI_ACTIVITY_TRACKER_TIMEOUT: toPositiveMilliseconds(process.env.NEXT_PUBLIC_UI_ACTIVITY_TRACKER_TIMEOUT, 3 * 60 * 1000),
16
+ APP_REFRESH_UI: toPositiveMilliseconds(process.env.NEXT_PUBLIC_APP_REFRESH_UI, 30 * 1000),
17
+
18
+ AUTH_HOST: process.env.NEXT_PUBLIC_AUTH_HOST as unknown as string,
19
+ CONNECT_HOST: process.env.NEXT_PUBLIC_CONNECT_HOST as unknown as string,
20
+ CONSOLE_HOST: process.env.NEXT_PUBLIC_CONSOLE_HOST as unknown as string,
21
+ MANAGER_HOST: process.env.NEXT_PUBLIC_MANAGER_HOST as unknown as string,
22
+ STORE_HOST: process.env.NEXT_PUBLIC_MANAGER_HOST as unknown as string,
23
+
24
+ CORE_API_HOST: process.env.NEXT_PUBLIC_CORE_API_HOST as unknown as string,
25
+ CORE_SOCKET_HOST: process.env.NEXT_PUBLIC_CORE_SOCKET_HOST as unknown as string,
26
+ CONNECT_API_HOST: process.env.NEXT_PUBLIC_CONNECT_API_HOST as unknown as string,
27
+ STORE_API_HOST: process.env.NEXT_PUBLIC_STORE_API_HOST as unknown as string,
28
+ STORAGE_API_HOST: process.env.NEXT_PUBLIC_STORAGE_API_HOST as unknown as string,
29
+
30
+ API_TIMEOUT: process.env.NEXT_PUBLIC_API_TIMEOUT as unknown as number,
31
+ VAPID_PUBLIC_KEY: process.env.NEXT_PUBLIC_VAPID_PUBLIC_KEY as unknown as string,
32
+ AUTH_CHECK_SESSION_TIMEOUT: process.env.NEXT_PUBLIC_AUTH_CHECK_SESSION_TIMEOUT as unknown as number,
33
+ COPYRIGHT_YEAR: new Intl.DateTimeFormat('fr-FR', {year: 'numeric'}).format(new Date()),
34
+
35
+ }
@@ -0,0 +1,30 @@
1
+ export const AuthConfig = {
2
+ storages: {
3
+ sessionKey: '@auth-session'
4
+ },
5
+ services: {
6
+ api: "AuthApiService"
7
+ },
8
+ routes: {
9
+ login: '/auth/sign-in',
10
+ logout: '/auth/disconnect',
11
+ register: '/auth/sign-up',
12
+ selectOrganization: '/auth/select-organization',
13
+ verifyPhone: '/auth/sign-up/check-phone',
14
+ },
15
+ sso: {
16
+ /**
17
+ * Identifiant OAuth réservé à l'application consommatrice auprès de
18
+ * Liorian Auth (ex. `liorian-socle`, `liorian-connect`).
19
+ * Chaque application doit déclarer `NEXT_PUBLIC_AUTH_CLIENT_ID`.
20
+ */
21
+ clientId: process.env.NEXT_PUBLIC_AUTH_CLIENT_ID || 'liorian-socle',
22
+ /** Chemin de rappel SSO de l'application (code + state). */
23
+ redirectPath: '/auth/callback',
24
+ },
25
+ excludes: [
26
+ '/auth',
27
+ '/intl',
28
+ '/pos/menu'
29
+ ]
30
+ };
@@ -0,0 +1,4 @@
1
+ // @liorian/sdk/domain/config — centralized configuration contracts.
2
+ export * from "./app.config";
3
+ export * from "./auth.config";
4
+ export * from "./logo.config";
@@ -0,0 +1,17 @@
1
+ export const LogoConfig = {
2
+ icon: {
3
+ normal: '/assets/logo/icon.png',
4
+ white: '/assets/logo/icon-white.png',
5
+ black: '/assets/logo/icon-black.png',
6
+ },
7
+ banner: {
8
+ normal: '/assets/logo/banner.png',
9
+ white: '/assets/logo/banner-white.png',
10
+ black: '/assets/logo/banner-black.png',
11
+ },
12
+ square: {
13
+ normal: '/assets/logo/square.png',
14
+ white: '/assets/logo/square-white.png',
15
+ black: '/assets/logo/square-black.png',
16
+ },
17
+ }
@@ -0,0 +1,18 @@
1
+ import {UserInterface} from "./user.interface";
2
+
3
+ export interface ActivityInterface {
4
+ id: string;
5
+ action: string;
6
+ module: string;
7
+ description?: string;
8
+ describe?: string;
9
+ details?: Record<string, any>;
10
+ ipAddress?: string;
11
+ userAgent?: string;
12
+ userId: string;
13
+ organizationId: string;
14
+ createdAt: string;
15
+ user?: UserInterface;
16
+ }
17
+
18
+ export type ActivitiesType = ActivityInterface[];
@@ -0,0 +1,96 @@
1
+ import type {ModuleCategory} from "../enums/module-category.enum";
2
+
3
+ /**
4
+ * Types du catalogue public (storefront).
5
+ *
6
+ * Le catalogue est porté par `liorian-api-store` (base `/catalog`). Une fiche
7
+ * référence l'identité canonique `identifier` (`mod.liorian.*`) définie par
8
+ * `liorian-api-core` (`ModuleDomain`), sans jamais de clé étrangère
9
+ * inter-service.
10
+ */
11
+
12
+ export type CatalogModuleType = 'INTERNAL' | 'EXTERNAL';
13
+
14
+ export interface CatalogCategoryInterface {
15
+ id: string;
16
+ code: string;
17
+ label: string;
18
+ description?: string | null;
19
+ icon?: string | null;
20
+ isDefault: boolean;
21
+ sortOrder: number;
22
+ status: boolean;
23
+ editorId?: string | null;
24
+ createdAt?: Date | string | null;
25
+ updatedAt?: Date | string | null;
26
+ }
27
+
28
+ export interface CatalogModuleInterface {
29
+ id: string;
30
+ identifier: string;
31
+ name: string;
32
+ description?: string | null;
33
+ icon?: string | null;
34
+ logoUrl?: string | null;
35
+ bannerUrl?: string | null;
36
+ url: string;
37
+ isEnabled: boolean;
38
+ isDefault: boolean;
39
+ type: CatalogModuleType;
40
+ categoryId?: string | null;
41
+ category?: keyof typeof ModuleCategory | null;
42
+ editorId?: string | null;
43
+ createdAt?: Date | string | null;
44
+ updatedAt?: Date | string | null;
45
+ }
46
+
47
+ export interface CreateCatalogModulePayloadInterface {
48
+ identifier: string;
49
+ name: string;
50
+ description?: string;
51
+ icon?: string;
52
+ logoUrl?: string | null;
53
+ bannerUrl?: string | null;
54
+ url: string;
55
+ isEnabled?: boolean;
56
+ isDefault?: boolean;
57
+ type?: CatalogModuleType;
58
+ categoryId?: string | null;
59
+ }
60
+
61
+ export interface UpdateCatalogModulePayloadInterface {
62
+ identifier?: string;
63
+ name?: string;
64
+ description?: string;
65
+ icon?: string;
66
+ logoUrl?: string | null;
67
+ bannerUrl?: string | null;
68
+ url?: string;
69
+ isEnabled?: boolean;
70
+ isDefault?: boolean;
71
+ type?: CatalogModuleType;
72
+ categoryId?: string | null;
73
+ }
74
+
75
+ export interface CreateCatalogCategoryPayloadInterface {
76
+ code: string;
77
+ label: string;
78
+ description?: string;
79
+ icon?: string;
80
+ isDefault?: boolean;
81
+ sortOrder?: number;
82
+ status?: boolean;
83
+ }
84
+
85
+ export interface UpdateCatalogCategoryPayloadInterface {
86
+ code?: string;
87
+ label?: string;
88
+ description?: string;
89
+ icon?: string;
90
+ isDefault?: boolean;
91
+ sortOrder?: number;
92
+ status?: boolean;
93
+ }
94
+
95
+ /** Catégorie d'un module telle qu'exposée dans la fiche catalogue. */
96
+ export type CatalogModuleCategory = keyof typeof ModuleCategory;
@@ -0,0 +1,13 @@
1
+ // @liorian/sdk/domain/entities — shared entity interfaces.
2
+ export * from "./activities.interface";
3
+ export * from "./media";
4
+ export * from "./catalog.interface";
5
+ export * from "./module-activation.interface";
6
+ export * from "./module.interface";
7
+ export * from "./notification.interface";
8
+ export * from "./objectable.type";
9
+ export * from "./organization.interface";
10
+ export * from "./user-auth.interface";
11
+ export * from "./user-phone.interface";
12
+ export * from "./user-profile.interface";
13
+ export * from "./user.interface";
@@ -0,0 +1,22 @@
1
+ export interface MediaStorageInterface {
2
+ id?: string;
3
+ filename: string;
4
+ type: string;
5
+ label: string;
6
+ metadata?: any;
7
+ organizationId: string;
8
+ status?: boolean;
9
+ deletedAt?: Date;
10
+ createdAt?: Date;
11
+ updatedAt?: Date;
12
+ }
13
+
14
+ export interface MediaUploadOptions {
15
+ section?: string;
16
+ module?: string;
17
+ type?: string;
18
+ isDocument?: boolean;
19
+ }
20
+
21
+ export const MEDIA_SECTIONS = ["document", "image", "video", "audio", "autre"] as const;
22
+ export type MediaSection = (typeof MEDIA_SECTIONS)[number];
@@ -0,0 +1,173 @@
1
+ import {ModuleCategory} from "../enums/module-category.enum";
2
+
3
+ export interface ModuleSerialKeyInterface {
4
+ id: string;
5
+ moduleIdentifier: string;
6
+ serialKey: string;
7
+ expiredAt?: Date | string | null;
8
+ }
9
+
10
+ /**
11
+ * Activation d'un module pour une organisation.
12
+ *
13
+ * `moduleIdentifier` est l'identité canonique `mod.liorian.*` (dénormalisée,
14
+ * sans FK vers le catalogue). Le statut « au catalogue mais non activé »
15
+ * (`available`) est calculé côté client en comparant ce champ au catalogue.
16
+ */
17
+ export interface ModuleActivationInterface {
18
+ id: string;
19
+ organizationId: string;
20
+ moduleIdentifier: string;
21
+ serialKeyId: string;
22
+ isEnabled: boolean;
23
+ isDefault: boolean;
24
+ activatedAt?: Date | string | null;
25
+ expiredAt?: Date | string | null;
26
+ serialKey?: ModuleSerialKeyInterface | null;
27
+ }
28
+
29
+ export interface ValidateActivationResponseInterface {
30
+ isValid: boolean;
31
+ }
32
+
33
+ export interface ActivateModulePayloadInterface {
34
+ moduleIdentifier: string;
35
+ serialKey: string;
36
+ auditId?: string;
37
+ }
38
+
39
+ export type ModuleConfigSettingsFieldType = 'TEXT' | 'NUMBER' | 'EMAIL' | 'PASSWORD' | 'URL' | 'TEL' | 'SELECT' | 'TOGGLE';
40
+
41
+ export interface ModuleConfigSettingsFieldOption {
42
+ label: string;
43
+ value: string;
44
+ }
45
+
46
+ export interface ModuleConfigSettingsFieldInterface {
47
+ key: string;
48
+ label: string;
49
+ description?: string;
50
+ placeholder?: string;
51
+ type?: ModuleConfigSettingsFieldType;
52
+ required?: boolean;
53
+ defaultValue?: string;
54
+ options?: ModuleConfigSettingsFieldOption[];
55
+ }
56
+
57
+ // --- État local d'un module côté client (store state) ---
58
+
59
+ export type ModuleStoreStateType =
60
+ | 'available'
61
+ | 'activating'
62
+ | 'downloading'
63
+ | 'verifying'
64
+ | 'installing'
65
+ | 'installed'
66
+ | 'resolved'
67
+ | 'enabled'
68
+ | 'disabled'
69
+ | 'update_available'
70
+ | 'expired'
71
+ | 'revoked'
72
+ | 'incompatible'
73
+ | 'platform_unsupported'
74
+ | 'corrupted'
75
+ | 'uninstalled'
76
+ | 'failed';
77
+
78
+ export interface ModuleStoreActivationResultInterface {
79
+ moduleId: string;
80
+ version?: string;
81
+ activationId?: string;
82
+ installationToken?: string;
83
+ downloadUrl?: string;
84
+ manifestUrl?: string;
85
+ checksum?: string;
86
+ signature?: string;
87
+ signatureKeyId?: string;
88
+ expiresAt?: string;
89
+ }
90
+
91
+ export interface ModuleStoreSyncPayloadInterface {
92
+ deviceId?: string;
93
+ managerVersion?: string;
94
+ runtime?: string;
95
+ modules: {
96
+ id: string;
97
+ version?: string;
98
+ enabled: boolean;
99
+ checksum?: string;
100
+ type?: string;
101
+ }[];
102
+ }
103
+
104
+ export interface ModuleStoreSyncResultInterface {
105
+ modules: {
106
+ id: string;
107
+ version?: string;
108
+ status: string;
109
+ updateAvailable?: boolean;
110
+ latestVersion?: string;
111
+ revoked?: boolean;
112
+ expired?: boolean;
113
+ updateRequired?: boolean;
114
+ platformSupported?: boolean;
115
+ }[];
116
+ }
117
+
118
+ export interface ModuleStoreConfigInterface {
119
+ moduleId: string;
120
+ organizationId: string;
121
+ settings: Record<string, string>;
122
+ updatedAt?: string;
123
+ }
124
+
125
+ export interface ModuleUsageRecordPayloadInterface {
126
+ moduleId: string;
127
+ moduleName?: string;
128
+ usageTimeMs: number;
129
+ useCount?: number;
130
+ }
131
+
132
+ export interface ModuleUsageAnalyticsItemInterface {
133
+ moduleId: string;
134
+ moduleName?: string | null;
135
+ usageTimeMs: number;
136
+ usagePercent: number;
137
+ useCount: number;
138
+ frequencyPercent: number;
139
+ }
140
+
141
+ export interface ModuleUsageAnalyticsInterface {
142
+ consent: boolean;
143
+ scope: 'organization' | 'user';
144
+ modules: ModuleUsageAnalyticsItemInterface[];
145
+ }
146
+
147
+ export interface ModuleRegistryEntryInterface {
148
+ schemaVersion: number;
149
+ deviceId?: string;
150
+ managerVersion?: string;
151
+ runtime?: string;
152
+ installedModules: ModuleRegistryInstalledModuleInterface[];
153
+ }
154
+
155
+ export interface ModuleRegistryInstalledModuleInterface {
156
+ id: string;
157
+ key?: string;
158
+ name: string;
159
+ version: string;
160
+ type: 'INTERNAL' | 'EXTERNAL';
161
+ category?: keyof typeof ModuleCategory;
162
+ enabled: boolean;
163
+ state: ModuleStoreStateType;
164
+ path?: string;
165
+ url?: string;
166
+ checksum?: string;
167
+ signature?: string;
168
+ signatureKeyId?: string;
169
+ installedAt?: string;
170
+ lastValidatedAt?: string;
171
+ activationExpiresAt?: string;
172
+ configSettings?: Record<string, string>;
173
+ }
@@ -0,0 +1,101 @@
1
+ import React from "react";
2
+ import {ApiService} from "../../infrastructure/utilities/api-service";
3
+ import {IconKey} from "../../presentation/icons/types";
4
+ import {RoutineInterface} from "../typing/routine.types";
5
+ import {AppRouterInstance} from "next/dist/shared/lib/app-router-context.shared-runtime";
6
+ import {ModuleStoreStateType, ModuleConfigSettingsFieldInterface} from "./module-activation.interface";
7
+ import {ModuleCategory} from "../enums/module-category.enum";
8
+
9
+ export type ModuleType = 'INTERNAL' | 'EXTERNAL';
10
+
11
+ export interface ModuleWidgetsInterface {
12
+ [K: string]: React.ComponentType<any>;
13
+ }
14
+
15
+ export interface ModuleInstanceInterface {
16
+ readonly identifier: string;
17
+
18
+ get options(): ModuleDeclarationInterface;
19
+
20
+ getOption<K extends keyof ModuleDeclarationInterface>(key: K): ModuleDeclarationInterface[K];
21
+
22
+ setOption<K extends keyof ModuleDeclarationInterface>(key: K, value: ModuleDeclarationInterface[K]): this;
23
+ }
24
+
25
+ export interface ModuleDeclarationServicesInterface {
26
+ fetch?: ApiService
27
+ }
28
+
29
+ export interface ModuleDeclarationProvidersInterface {
30
+ layout?: React.FC;
31
+ }
32
+
33
+ export interface ModuleDeclarationInterface {
34
+ identifier: string;
35
+ key?: string;
36
+ version?: string;
37
+ name: string;
38
+ description: string;
39
+ icon: IconKey;
40
+ logo?: string;
41
+ banner?: string;
42
+ routines?: RoutineInterface<any>[];
43
+ widgets?: ModuleWidgetsInterface;
44
+ service?: ModuleDeclarationServicesInterface;
45
+ uri: string; // URL de base pour la navigation
46
+ isEnabled?: boolean;
47
+ isDefault?: boolean; // Si true, ne peut pas être désactivé ou déplacé
48
+ type: ModuleType;
49
+ menu?: ModuleNavigationMenu;
50
+ requirements?: Record<string, string>; // Modules nécessaires pour fonctionner. Ex: 'nom-du-module' : 'version'
51
+ optionalRequirements?: Record<string, string>; // Modules nécessaires pour fonctionner. Ex: 'nom-du-module' : 'version'
52
+ dependencies?: Record<string, string>; // Dépendence de package npm nécessaires pour fonctionner. Ex: 'nom-du-module' : 'version'
53
+ devDependencies?: Record<string, string>; // Dépendence de package npm nécessaires pour fonctionner en mode dev. Ex: 'nom-du-module' : 'version'
54
+
55
+ // Module Store extensions
56
+ storeState?: ModuleStoreStateType; // État du module dans le store
57
+ configSettings?: ModuleConfigSettingsFieldInterface[]; // Paramètres configurables du module
58
+ storeConfig?: Record<string, string>; // Valeurs de configuration sauvegardées
59
+ isInstalled?: boolean; // Si le module est installé localement
60
+ lastSyncedAt?: string; // Dernière synchronisation avec le backend
61
+ activationExpiresAt?: string; // Date d'expiration de l'activation
62
+
63
+ // Catégorie du module (filtrage & regroupement dans le Module Store)
64
+ category?: keyof typeof ModuleCategory;
65
+
66
+ providers?: ModuleDeclarationProvidersInterface;
67
+ }
68
+
69
+ export interface ModuleNavigationDropdownInterface {
70
+ type: 'mega' | 'default' | 'mini';
71
+ side?: 'left' | 'right' | 'top' | 'bottom';
72
+ component: (module: ModuleNavigationInterface) => React.ReactNode;
73
+ }
74
+
75
+ export interface ModuleNavigationInterface {
76
+ id: string;
77
+ label: string;
78
+ description?: string;
79
+ icon?: IconKey;
80
+ url: string;
81
+ useOnlyIcon?: boolean;
82
+ dropdown?: ModuleNavigationDropdownInterface
83
+ }
84
+
85
+
86
+ export interface ModuleNavigationMenuItem {
87
+ label: string;
88
+ description?: string;
89
+ icon?: IconKey;
90
+ url?: string;
91
+ action?: (() => void | Promise<void>) | ((router: AppRouterInstance) => void);
92
+ items?: (ModuleNavigationMenuItem | ModuleNavigationMenuSeparator)[];
93
+ }
94
+
95
+ export interface ModuleNavigationMenuSeparator {
96
+ separator: boolean;
97
+ }
98
+
99
+ export interface ModuleNavigationMenu {
100
+ items: ModuleNavigationMenuItem[];
101
+ }
@@ -0,0 +1,23 @@
1
+ export enum NotificationTypeEnum {
2
+ ALERT = "ALERT",
3
+ INFORMATION = "INFORMATION",
4
+ CONFIRMATION = "CONFIRMATION",
5
+ REMINDER = "REMINDER",
6
+ SECURITY = "SECURITY",
7
+ }
8
+
9
+ export interface NotificationInterface {
10
+ id: string;
11
+ title?: string;
12
+ subject?: string;
13
+ body?: string;
14
+ message?: string;
15
+ content?: string;
16
+ type?: NotificationTypeEnum | string;
17
+ // isRead?: boolean;
18
+ // read?: boolean;
19
+ readAt?: string | null;
20
+ organizationId?: string | null;
21
+ createdAt?: string;
22
+ updatedAt?: string;
23
+ }
@@ -0,0 +1,3 @@
1
+
2
+
3
+ export type ObjectableType = Record<string|number|symbol, any>;
@@ -0,0 +1,81 @@
1
+ import {ModuleEnum} from "../enums/module.enum";
2
+ import {MediaStorageInterface} from "./media";
3
+
4
+ export interface OrganizationInterface {
5
+ id: string;
6
+ name: string;
7
+ description?: string | null;
8
+ logoId?: string | null;
9
+ logo?: MediaStorageInterface | null;
10
+ enabledModules: ModuleEnum[] | string[];
11
+ status: boolean;
12
+ deletedAt?: Date | string | null;
13
+ ownerId?: string;
14
+ auditId: string;
15
+ createdAt?: Date | string;
16
+ updatedAt?: Date | string;
17
+ }
18
+
19
+ export interface OrganizationMemberInterface {
20
+ id: string;
21
+ userId: string;
22
+ organizationId: string;
23
+ auditId: string;
24
+ isFounder: boolean;
25
+ status?: boolean;
26
+ deletedAt?: Date | string | null;
27
+ user?: {
28
+ id?: string;
29
+ username?: string;
30
+ email?: string;
31
+ avatar?: MediaStorageInterface | null;
32
+ userData?: {
33
+ firstname?: string;
34
+ lastname?: string;
35
+ };
36
+ } | null;
37
+ }
38
+
39
+ export interface OrganizationApiAccessKeyInterface {
40
+ id: string;
41
+ public: string;
42
+ secret: string;
43
+ organizationId: string;
44
+ expiredAt?: Date | string | null;
45
+ status: boolean;
46
+ deletedAt?: Date | string | null;
47
+ auditId: string;
48
+ }
49
+
50
+ export interface OrganizationApiAccessResponseInterface {
51
+ id: string;
52
+ publicKeys: string[];
53
+ }
54
+
55
+ export interface CreateOrganizationPayload {
56
+ name: string;
57
+ description?: string;
58
+ logoId?: string;
59
+ enabledModules?: ModuleEnum[];
60
+ auditId?: string;
61
+ }
62
+
63
+ export interface UpdateOrganizationPayload {
64
+ name?: string;
65
+ description?: string;
66
+ logoId?: string;
67
+ enabledModules?: ModuleEnum[];
68
+ status?: boolean;
69
+ auditId?: string;
70
+ }
71
+
72
+ export interface AddMemberPayload {
73
+ userId: string;
74
+ auditId?: string;
75
+ }
76
+
77
+ export interface CreateApiKeyPayload {
78
+ organizationId: string;
79
+ expiredAt?: Date | string | null;
80
+ auditId?: string;
81
+ }