@mframework/core 0.0.1

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 (435) hide show
  1. package/README.md +0 -0
  2. package/bin/create-adapter +18 -0
  3. package/bin/create-adapter.cjs +18 -0
  4. package/createNormalizer.ts +7 -0
  5. package/dist/adapters/auth.d.ts +9 -0
  6. package/dist/adapters/auth.js +1 -0
  7. package/dist/adapters/cart.d.ts +22 -0
  8. package/dist/adapters/cart.js +1 -0
  9. package/dist/adapters/catalog.d.ts +17 -0
  10. package/dist/adapters/catalog.js +1 -0
  11. package/dist/adapters/common.d.ts +9 -0
  12. package/dist/adapters/common.js +1 -0
  13. package/dist/adapters/search.d.ts +21 -0
  14. package/dist/adapters/search.js +1 -0
  15. package/dist/index.d.ts +70 -0
  16. package/dist/index.js +72 -0
  17. package/dist/plugins/defineAdapter.d.ts +6 -0
  18. package/dist/plugins/defineAdapter.js +3 -0
  19. package/dist/plugins/defineModule.d.ts +2 -0
  20. package/dist/plugins/defineModule.js +3 -0
  21. package/dist/plugins/index.d.ts +1 -0
  22. package/dist/plugins/index.js +3 -0
  23. package/dist/plugins/registry.d.ts +10 -0
  24. package/dist/plugins/registry.js +27 -0
  25. package/dist/runtime/app.d.ts +2 -0
  26. package/dist/runtime/app.js +20 -0
  27. package/dist/runtime/config.d.ts +7 -0
  28. package/dist/runtime/config.js +9 -0
  29. package/dist/runtime/context.d.ts +9 -0
  30. package/dist/runtime/context.js +11 -0
  31. package/dist/runtime/hooks.d.ts +5 -0
  32. package/dist/runtime/hooks.js +18 -0
  33. package/dist/runtime/lifecycle.d.ts +4 -0
  34. package/dist/runtime/lifecycle.js +5 -0
  35. package/dist/src/adapters/auth.d.ts +9 -0
  36. package/dist/src/adapters/auth.js +1 -0
  37. package/dist/src/adapters/cart.d.ts +22 -0
  38. package/dist/src/adapters/cart.js +1 -0
  39. package/dist/src/adapters/catalog.d.ts +17 -0
  40. package/dist/src/adapters/catalog.js +1 -0
  41. package/dist/src/adapters/common.d.ts +9 -0
  42. package/dist/src/adapters/common.js +1 -0
  43. package/dist/src/adapters/lists.d.ts +17 -0
  44. package/dist/src/adapters/lists.js +1 -0
  45. package/dist/src/adapters/search.d.ts +21 -0
  46. package/dist/src/adapters/search.js +1 -0
  47. package/dist/src/plugins/defineAdapter.d.ts +2 -0
  48. package/dist/src/plugins/defineAdapter.js +3 -0
  49. package/dist/src/plugins/defineModule.d.ts +2 -0
  50. package/dist/src/plugins/defineModule.js +3 -0
  51. package/dist/src/plugins/index.d.ts +1 -0
  52. package/dist/src/plugins/index.js +3 -0
  53. package/dist/src/plugins/registry.d.ts +14 -0
  54. package/dist/src/plugins/registry.js +46 -0
  55. package/dist/src/runtime/app.d.ts +6 -0
  56. package/dist/src/runtime/app.js +20 -0
  57. package/dist/src/runtime/config.d.ts +18 -0
  58. package/dist/src/runtime/config.js +20 -0
  59. package/dist/src/runtime/context.d.ts +9 -0
  60. package/dist/src/runtime/context.js +11 -0
  61. package/dist/src/runtime/hooks.d.ts +6 -0
  62. package/dist/src/runtime/hooks.js +21 -0
  63. package/dist/src/runtime/lifecycle.d.ts +4 -0
  64. package/dist/src/runtime/lifecycle.js +5 -0
  65. package/dist/src/types/adapters.d.ts +14 -0
  66. package/dist/src/types/adapters.js +1 -0
  67. package/dist/src/types/app.d.ts +13 -0
  68. package/dist/src/types/app.js +1 -0
  69. package/dist/src/types/auth/adapter.d.ts +6 -0
  70. package/dist/src/types/auth/adapter.js +1 -0
  71. package/dist/src/types/auth/inputs.d.ts +22 -0
  72. package/dist/src/types/auth/inputs.js +21 -0
  73. package/dist/src/types/auth/providers.d.ts +6 -0
  74. package/dist/src/types/auth/providers.js +1 -0
  75. package/dist/src/types/auth/session.d.ts +7 -0
  76. package/dist/src/types/auth/session.js +1 -0
  77. package/dist/src/types/auth/user.d.ts +9 -0
  78. package/dist/src/types/auth/user.js +1 -0
  79. package/dist/src/types/commerce/adapter.d.ts +18 -0
  80. package/dist/src/types/commerce/adapter.js +1 -0
  81. package/dist/src/types/commerce/cart.d.ts +14 -0
  82. package/dist/src/types/commerce/cart.js +1 -0
  83. package/dist/src/types/commerce/category.d.ts +7 -0
  84. package/dist/src/types/commerce/category.js +1 -0
  85. package/dist/src/types/commerce/order.d.ts +12 -0
  86. package/dist/src/types/commerce/order.js +1 -0
  87. package/dist/src/types/commerce/product.d.ts +28 -0
  88. package/dist/src/types/commerce/product.js +1 -0
  89. package/dist/src/types/compat/legacy.d.ts +21 -0
  90. package/dist/src/types/compat/legacy.js +1 -0
  91. package/dist/src/types/config.d.ts +8 -0
  92. package/dist/src/types/config.js +1 -0
  93. package/dist/src/types/core/common.d.ts +2 -0
  94. package/dist/src/types/core/common.js +1 -0
  95. package/dist/src/types/core/error.d.ts +5 -0
  96. package/dist/src/types/core/error.js +1 -0
  97. package/dist/src/types/core/id.d.ts +1 -0
  98. package/dist/src/types/core/id.js +1 -0
  99. package/dist/src/types/core/pagination.d.ts +6 -0
  100. package/dist/src/types/core/pagination.js +1 -0
  101. package/dist/src/types/core/result.d.ts +9 -0
  102. package/dist/src/types/core/result.js +1 -0
  103. package/dist/src/types/core/utility.d.ts +5 -0
  104. package/dist/src/types/core/utility.js +1 -0
  105. package/dist/src/types/events.d.ts +20 -0
  106. package/dist/src/types/events.js +22 -0
  107. package/dist/src/types/index.d.ts +38 -0
  108. package/dist/src/types/index.js +35 -0
  109. package/dist/src/types/module.d.ts +15 -0
  110. package/dist/src/types/module.js +1 -0
  111. package/dist/src/types/sdk/adapter.d.ts +5 -0
  112. package/dist/src/types/sdk/adapter.js +1 -0
  113. package/dist/src/types/sdk/endpoint.d.ts +7 -0
  114. package/dist/src/types/sdk/endpoint.js +1 -0
  115. package/dist/src/types/sdk/errors.d.ts +6 -0
  116. package/dist/src/types/sdk/errors.js +1 -0
  117. package/dist/src/types/sdk/request.d.ts +6 -0
  118. package/dist/src/types/sdk/request.js +1 -0
  119. package/dist/src/types/sdk/response.d.ts +5 -0
  120. package/dist/src/types/sdk/response.js +1 -0
  121. package/dist/src/types/search/adapter.d.ts +6 -0
  122. package/dist/src/types/search/adapter.js +1 -0
  123. package/dist/src/types/search/facet.d.ts +8 -0
  124. package/dist/src/types/search/facet.js +1 -0
  125. package/dist/src/types/search/opensearch.d.ts +21 -0
  126. package/dist/src/types/search/opensearch.js +1 -0
  127. package/dist/src/types/search/query.d.ts +17 -0
  128. package/dist/src/types/search/query.js +1 -0
  129. package/dist/src/types/search/result.d.ts +15 -0
  130. package/dist/src/types/search/result.js +1 -0
  131. package/dist/src/types/ui/api/global-search.d.ts +8 -0
  132. package/dist/src/types/ui/api/global-search.js +1 -0
  133. package/dist/src/types/ui/blocks/block-button-group.d.ts +6 -0
  134. package/dist/src/types/ui/blocks/block-button-group.js +1 -0
  135. package/dist/src/types/ui/blocks/block-button.d.ts +13 -0
  136. package/dist/src/types/ui/blocks/block-button.js +1 -0
  137. package/dist/src/types/ui/blocks/block-column.d.ts +18 -0
  138. package/dist/src/types/ui/blocks/block-column.js +1 -0
  139. package/dist/src/types/ui/blocks/block-cta.d.ts +11 -0
  140. package/dist/src/types/ui/blocks/block-cta.js +1 -0
  141. package/dist/src/types/ui/blocks/block-divider.d.ts +4 -0
  142. package/dist/src/types/ui/blocks/block-divider.js +1 -0
  143. package/dist/src/types/ui/blocks/block-faq.d.ts +11 -0
  144. package/dist/src/types/ui/blocks/block-faq.js +1 -0
  145. package/dist/src/types/ui/blocks/block-form.d.ts +7 -0
  146. package/dist/src/types/ui/blocks/block-form.js +1 -0
  147. package/dist/src/types/ui/blocks/block-gallery.d.ts +13 -0
  148. package/dist/src/types/ui/blocks/block-gallery.js +1 -0
  149. package/dist/src/types/ui/blocks/block-hero.d.ts +11 -0
  150. package/dist/src/types/ui/blocks/block-hero.js +1 -0
  151. package/dist/src/types/ui/blocks/block-html.d.ts +4 -0
  152. package/dist/src/types/ui/blocks/block-html.js +1 -0
  153. package/dist/src/types/ui/blocks/block-logocloud.d.ts +13 -0
  154. package/dist/src/types/ui/blocks/block-logocloud.js +1 -0
  155. package/dist/src/types/ui/blocks/block-quote.d.ts +10 -0
  156. package/dist/src/types/ui/blocks/block-quote.js +1 -0
  157. package/dist/src/types/ui/blocks/block-richtext.d.ts +7 -0
  158. package/dist/src/types/ui/blocks/block-richtext.js +1 -0
  159. package/dist/src/types/ui/blocks/block-steps.d.ts +21 -0
  160. package/dist/src/types/ui/blocks/block-steps.js +1 -0
  161. package/dist/src/types/ui/blocks/block-team.d.ts +6 -0
  162. package/dist/src/types/ui/blocks/block-team.js +1 -0
  163. package/dist/src/types/ui/blocks/block-testimonial.d.ts +13 -0
  164. package/dist/src/types/ui/blocks/block-testimonial.js +1 -0
  165. package/dist/src/types/ui/blocks/block-video.d.ts +9 -0
  166. package/dist/src/types/ui/blocks/block-video.js +1 -0
  167. package/dist/src/types/ui/blocks/block.d.ts +17 -0
  168. package/dist/src/types/ui/blocks/block.js +1 -0
  169. package/dist/src/types/ui/blocks/index.d.ts +18 -0
  170. package/dist/src/types/ui/blocks/index.js +1 -0
  171. package/dist/src/types/ui/component.d.ts +6 -0
  172. package/dist/src/types/ui/component.js +1 -0
  173. package/dist/src/types/ui/content/category.d.ts +10 -0
  174. package/dist/src/types/ui/content/category.js +1 -0
  175. package/dist/src/types/ui/content/form.d.ts +21 -0
  176. package/dist/src/types/ui/content/form.js +1 -0
  177. package/dist/src/types/ui/content/index.d.ts +6 -0
  178. package/dist/src/types/ui/content/index.js +1 -0
  179. package/dist/src/types/ui/content/page.d.ts +38 -0
  180. package/dist/src/types/ui/content/page.js +1 -0
  181. package/dist/src/types/ui/content/post.d.ts +38 -0
  182. package/dist/src/types/ui/content/post.js +1 -0
  183. package/dist/src/types/ui/content/team.d.ts +17 -0
  184. package/dist/src/types/ui/content/team.js +1 -0
  185. package/dist/src/types/ui/content/testimonial.d.ts +18 -0
  186. package/dist/src/types/ui/content/testimonial.js +1 -0
  187. package/dist/src/types/ui/form.d.ts +12 -0
  188. package/dist/src/types/ui/form.js +1 -0
  189. package/dist/src/types/ui/help/index.d.ts +51 -0
  190. package/dist/src/types/ui/help/index.js +1 -0
  191. package/dist/src/types/ui/meta/analytics.d.ts +21 -0
  192. package/dist/src/types/ui/meta/analytics.js +1 -0
  193. package/dist/src/types/ui/meta/config.d.ts +22 -0
  194. package/dist/src/types/ui/meta/config.js +1 -0
  195. package/dist/src/types/ui/meta/globals.d.ts +33 -0
  196. package/dist/src/types/ui/meta/globals.js +1 -0
  197. package/dist/src/types/ui/meta/index.d.ts +6 -0
  198. package/dist/src/types/ui/meta/index.js +1 -0
  199. package/dist/src/types/ui/meta/navigation.d.ts +31 -0
  200. package/dist/src/types/ui/meta/navigation.js +1 -0
  201. package/dist/src/types/ui/meta/redirect.d.ts +12 -0
  202. package/dist/src/types/ui/meta/redirect.js +1 -0
  203. package/dist/src/types/ui/meta/seo.d.ts +19 -0
  204. package/dist/src/types/ui/meta/seo.js +1 -0
  205. package/dist/src/types/ui/os/contact.d.ts +22 -0
  206. package/dist/src/types/ui/os/contact.js +1 -0
  207. package/dist/src/types/ui/os/conversation.d.ts +23 -0
  208. package/dist/src/types/ui/os/conversation.js +1 -0
  209. package/dist/src/types/ui/os/index.d.ts +16 -0
  210. package/dist/src/types/ui/os/index.js +1 -0
  211. package/dist/src/types/ui/os/organization.d.ts +51 -0
  212. package/dist/src/types/ui/os/organization.js +1 -0
  213. package/dist/src/types/ui/os/os-activity.d.ts +26 -0
  214. package/dist/src/types/ui/os/os-activity.js +1 -0
  215. package/dist/src/types/ui/os/os-deal.d.ts +42 -0
  216. package/dist/src/types/ui/os/os-deal.js +1 -0
  217. package/dist/src/types/ui/os/os-expense.d.ts +21 -0
  218. package/dist/src/types/ui/os/os-expense.js +1 -0
  219. package/dist/src/types/ui/os/os-invoice.d.ts +46 -0
  220. package/dist/src/types/ui/os/os-invoice.js +1 -0
  221. package/dist/src/types/ui/os/os-item.d.ts +17 -0
  222. package/dist/src/types/ui/os/os-item.js +1 -0
  223. package/dist/src/types/ui/os/os-payment.d.ts +27 -0
  224. package/dist/src/types/ui/os/os-payment.js +1 -0
  225. package/dist/src/types/ui/os/os-project.d.ts +45 -0
  226. package/dist/src/types/ui/os/os-project.js +1 -0
  227. package/dist/src/types/ui/os/os-proposal.d.ts +61 -0
  228. package/dist/src/types/ui/os/os-proposal.js +1 -0
  229. package/dist/src/types/ui/os/os-settings.d.ts +17 -0
  230. package/dist/src/types/ui/os/os-settings.js +1 -0
  231. package/dist/src/types/ui/os/os-subscription.d.ts +12 -0
  232. package/dist/src/types/ui/os/os-subscription.js +1 -0
  233. package/dist/src/types/ui/os/os-task.d.ts +32 -0
  234. package/dist/src/types/ui/os/os-task.js +1 -0
  235. package/dist/src/types/ui/os/os-tax-rate.d.ts +12 -0
  236. package/dist/src/types/ui/os/os-tax-rate.js +1 -0
  237. package/dist/src/types/ui/pageComponentMap.d.ts +2 -0
  238. package/dist/src/types/ui/pageComponentMap.js +7 -0
  239. package/dist/src/types/ui/pagination.d.ts +6 -0
  240. package/dist/src/types/ui/pagination.js +1 -0
  241. package/dist/src/types/ui/schema.d.ts +78 -0
  242. package/dist/src/types/ui/schema.js +1 -0
  243. package/dist/src/types/ui/state.d.ts +5 -0
  244. package/dist/src/types/ui/state.js +1 -0
  245. package/dist/src/types/ui/system/file.d.ts +47 -0
  246. package/dist/src/types/ui/system/file.js +1 -0
  247. package/dist/src/types/ui/system/folder.d.ts +8 -0
  248. package/dist/src/types/ui/system/folder.js +1 -0
  249. package/dist/src/types/ui/system/index.d.ts +4 -0
  250. package/dist/src/types/ui/system/index.js +1 -0
  251. package/dist/src/types/ui/system/role.d.ts +20 -0
  252. package/dist/src/types/ui/system/role.js +1 -0
  253. package/dist/src/types/ui/system/user.d.ts +57 -0
  254. package/dist/src/types/ui/system/user.js +1 -0
  255. package/dist/src/utils/adapterValidation.d.ts +2 -0
  256. package/dist/src/utils/adapterValidation.js +8 -0
  257. package/dist/src/utils/env.d.ts +7 -0
  258. package/dist/src/utils/env.js +20 -0
  259. package/dist/src/utils/errors.d.ts +9 -0
  260. package/dist/src/utils/errors.js +13 -0
  261. package/dist/src/utils/logger.d.ts +9 -0
  262. package/dist/src/utils/logger.js +29 -0
  263. package/dist/types/adapters.d.ts +12 -0
  264. package/dist/types/adapters.js +1 -0
  265. package/dist/types/app.d.ts +13 -0
  266. package/dist/types/app.js +1 -0
  267. package/dist/types/config.d.ts +8 -0
  268. package/dist/types/config.js +1 -0
  269. package/dist/types/events.d.ts +16 -0
  270. package/dist/types/events.js +22 -0
  271. package/dist/types/module.d.ts +15 -0
  272. package/dist/types/module.js +1 -0
  273. package/dist/utils/errors.d.ts +9 -0
  274. package/dist/utils/errors.js +13 -0
  275. package/dist/utils/logger.d.ts +9 -0
  276. package/dist/utils/logger.js +29 -0
  277. package/errors.ts +21 -0
  278. package/index.ts +93 -0
  279. package/package.json +39 -0
  280. package/src/adapters/auth.ts +11 -0
  281. package/src/adapters/cart.ts +27 -0
  282. package/src/adapters/catalog.ts +21 -0
  283. package/src/adapters/common.ts +10 -0
  284. package/src/adapters/lists.ts +23 -0
  285. package/src/adapters/search.ts +26 -0
  286. package/src/normalizers/factories/apiClientFactory/context.d.ts +14 -0
  287. package/src/normalizers/factories/apiClientFactory/index.d.ts +3 -0
  288. package/src/normalizers/factories/index.d.ts +19 -0
  289. package/src/normalizers/factories/useBillingFactory.d.ts +12 -0
  290. package/src/normalizers/factories/useCartFactory.d.ts +45 -0
  291. package/src/normalizers/factories/useCategoryFactory.d.ts +7 -0
  292. package/src/normalizers/factories/useContentFactory.d.ts +16 -0
  293. package/src/normalizers/factories/useFacetFactory.d.ts +6 -0
  294. package/src/normalizers/factories/useForgotPasswordFactory.d.ts +20 -0
  295. package/src/normalizers/factories/useMakeOrderFactory.d.ts +7 -0
  296. package/src/normalizers/factories/useProductFactory.d.ts +7 -0
  297. package/src/normalizers/factories/useReviewFactory.d.ts +10 -0
  298. package/src/normalizers/factories/useSearchFactory.d.ts +7 -0
  299. package/src/normalizers/factories/useShippingFactory.d.ts +12 -0
  300. package/src/normalizers/factories/useShippingProviderFactory.d.ts +14 -0
  301. package/src/normalizers/factories/useStoreFactory.d.ts +2 -0
  302. package/src/normalizers/factories/useUserBillingFactory.d.ts +27 -0
  303. package/src/normalizers/factories/useUserFactory.d.ts +32 -0
  304. package/src/normalizers/factories/useUserOrderFactory.d.ts +7 -0
  305. package/src/normalizers/factories/useUserShippingFactory.d.ts +27 -0
  306. package/src/normalizers/factories/useWishlistFactory.d.ts +24 -0
  307. package/src/normalizers/utils/context/index.d.ts +8 -0
  308. package/src/normalizers/utils/factoryParams/commonMethods.d.ts +2 -0
  309. package/src/normalizers/utils/factoryParams/index.d.ts +2 -0
  310. package/src/normalizers/utils/factoryParams/platformMethods.d.ts +2 -0
  311. package/src/normalizers/utils/helpers/index.d.ts +7 -0
  312. package/src/normalizers/utils/i18n-redirects/index.d.ts +12 -0
  313. package/src/normalizers/utils/logger/defaultLogger.d.ts +7 -0
  314. package/src/normalizers/utils/logger/index.d.ts +5 -0
  315. package/src/normalizers/utils/logger/makeMessageStyle.d.ts +2 -0
  316. package/src/normalizers/utils/logger/makeMethod.d.ts +2 -0
  317. package/src/normalizers/utils/logger/mask.d.ts +2 -0
  318. package/src/normalizers/utils/logger/types.d.ts +13 -0
  319. package/src/normalizers/utils/logger/utils.d.ts +4 -0
  320. package/src/normalizers/utils/shared/index.d.ts +4 -0
  321. package/src/normalizers/utils/ssr/index.d.ts +11 -0
  322. package/src/normalizers/utils/wrap/index.d.ts +3 -0
  323. package/src/plugins/defineAdapter.ts +5 -0
  324. package/src/plugins/defineModule.ts +5 -0
  325. package/src/plugins/index.ts +3 -0
  326. package/src/plugins/registry.ts +58 -0
  327. package/src/runtime/app.ts +31 -0
  328. package/src/runtime/config.ts +24 -0
  329. package/src/runtime/context.ts +18 -0
  330. package/src/runtime/hooks.ts +28 -0
  331. package/src/runtime/lifecycle.ts +16 -0
  332. package/src/types/adapters.ts +17 -0
  333. package/src/types/app.ts +15 -0
  334. package/src/types/auth/adapter.ts +7 -0
  335. package/src/types/auth/inputs.ts +33 -0
  336. package/src/types/auth/providers.ts +6 -0
  337. package/src/types/auth/session.ts +8 -0
  338. package/src/types/auth/user.ts +9 -0
  339. package/src/types/commerce/adapter.ts +21 -0
  340. package/src/types/commerce/cart.ts +16 -0
  341. package/src/types/commerce/category.ts +7 -0
  342. package/src/types/commerce/order.ts +13 -0
  343. package/src/types/commerce/product.ts +31 -0
  344. package/src/types/compat/legacy.ts +19 -0
  345. package/src/types/config.ts +9 -0
  346. package/src/types/core/common.ts +2 -0
  347. package/src/types/core/error.ts +11 -0
  348. package/src/types/core/id.ts +1 -0
  349. package/src/types/core/pagination.ts +6 -0
  350. package/src/types/core/result.ts +11 -0
  351. package/src/types/core/utility.ts +7 -0
  352. package/src/types/events.ts +47 -0
  353. package/src/types/index.ts +49 -0
  354. package/src/types/module.ts +18 -0
  355. package/src/types/sdk/adapter.ts +10 -0
  356. package/src/types/sdk/endpoint.ts +11 -0
  357. package/src/types/sdk/errors.ts +6 -0
  358. package/src/types/sdk/request.ts +6 -0
  359. package/src/types/sdk/response.ts +5 -0
  360. package/src/types/search/adapter.ts +7 -0
  361. package/src/types/search/facet.ts +9 -0
  362. package/src/types/search/opensearch.ts +19 -0
  363. package/src/types/search/query.ts +19 -0
  364. package/src/types/search/result.ts +17 -0
  365. package/src/types/ui/api/global-search.ts +8 -0
  366. package/src/types/ui/blocks/block-button-group.ts +7 -0
  367. package/src/types/ui/blocks/block-button.ts +14 -0
  368. package/src/types/ui/blocks/block-column.ts +20 -0
  369. package/src/types/ui/blocks/block-cta.ts +10 -0
  370. package/src/types/ui/blocks/block-divider.ts +4 -0
  371. package/src/types/ui/blocks/block-faq.ts +12 -0
  372. package/src/types/ui/blocks/block-form.ts +8 -0
  373. package/src/types/ui/blocks/block-gallery.ts +14 -0
  374. package/src/types/ui/blocks/block-hero.ts +12 -0
  375. package/src/types/ui/blocks/block-html.ts +4 -0
  376. package/src/types/ui/blocks/block-logocloud.ts +14 -0
  377. package/src/types/ui/blocks/block-quote.ts +11 -0
  378. package/src/types/ui/blocks/block-richtext.ts +7 -0
  379. package/src/types/ui/blocks/block-steps.ts +22 -0
  380. package/src/types/ui/blocks/block-team.ts +6 -0
  381. package/src/types/ui/blocks/block-testimonial.ts +14 -0
  382. package/src/types/ui/blocks/block-video.ts +10 -0
  383. package/src/types/ui/blocks/block.ts +49 -0
  384. package/src/types/ui/blocks/index.ts +18 -0
  385. package/src/types/ui/component.ts +7 -0
  386. package/src/types/ui/content/category.ts +11 -0
  387. package/src/types/ui/content/form.ts +20 -0
  388. package/src/types/ui/content/index.ts +6 -0
  389. package/src/types/ui/content/page.ts +76 -0
  390. package/src/types/ui/content/post.ts +39 -0
  391. package/src/types/ui/content/team.ts +16 -0
  392. package/src/types/ui/content/testimonial.ts +19 -0
  393. package/src/types/ui/env.d.ts +8 -0
  394. package/src/types/ui/form.ts +17 -0
  395. package/src/types/ui/help/index.ts +53 -0
  396. package/src/types/ui/meta/analytics.ts +18 -0
  397. package/src/types/ui/meta/config.ts +21 -0
  398. package/src/types/ui/meta/globals.ts +30 -0
  399. package/src/types/ui/meta/index.ts +6 -0
  400. package/src/types/ui/meta/navigation.ts +32 -0
  401. package/src/types/ui/meta/redirect.ts +13 -0
  402. package/src/types/ui/meta/seo.ts +19 -0
  403. package/src/types/ui/os/contact.ts +23 -0
  404. package/src/types/ui/os/conversation.ts +25 -0
  405. package/src/types/ui/os/index.ts +16 -0
  406. package/src/types/ui/os/organization.ts +54 -0
  407. package/src/types/ui/os/os-activity.ts +28 -0
  408. package/src/types/ui/os/os-deal.ts +45 -0
  409. package/src/types/ui/os/os-expense.ts +22 -0
  410. package/src/types/ui/os/os-invoice.ts +48 -0
  411. package/src/types/ui/os/os-item.ts +18 -0
  412. package/src/types/ui/os/os-payment.ts +29 -0
  413. package/src/types/ui/os/os-project.ts +47 -0
  414. package/src/types/ui/os/os-proposal.ts +84 -0
  415. package/src/types/ui/os/os-settings.ts +19 -0
  416. package/src/types/ui/os/os-subscription.ts +12 -0
  417. package/src/types/ui/os/os-task.ts +34 -0
  418. package/src/types/ui/os/os-tax-rate.ts +13 -0
  419. package/src/types/ui/pageComponentMap.ts +8 -0
  420. package/src/types/ui/pagination.ts +6 -0
  421. package/src/types/ui/schema.d.ts +39 -0
  422. package/src/types/ui/schema.ts +151 -0
  423. package/src/types/ui/state.ts +5 -0
  424. package/src/types/ui/system/file.ts +46 -0
  425. package/src/types/ui/system/folder.ts +8 -0
  426. package/src/types/ui/system/index.ts +4 -0
  427. package/src/types/ui/system/role.ts +21 -0
  428. package/src/types/ui/system/user.ts +56 -0
  429. package/src/utils/adapterValidation.ts +10 -0
  430. package/src/utils/env.ts +18 -0
  431. package/src/utils/errors.ts +15 -0
  432. package/src/utils/index.d.ts +11 -0
  433. package/src/utils/logger.ts +37 -0
  434. package/tsconfig.json +15 -0
  435. package/validation.ts +89 -0
@@ -0,0 +1,29 @@
1
+ import type { User } from '../system';
2
+ import type { Organization, Contact, OsInvoice } from '.';
3
+
4
+ export interface OsPayment {
5
+ id?: string;
6
+ status?: string;
7
+ sort?: number | null;
8
+ user_created?: (string | User) | null;
9
+ date_created?: string | null;
10
+ user_updated?: (string | User) | null;
11
+ date_updated?: string | null;
12
+ payment_date?: string | null;
13
+ amount?: number | null;
14
+ stripe_payment_id?: string;
15
+ transaction_fee?: number | null;
16
+ organization?: (string | Organization) | null;
17
+ contact?: (string | Contact) | null;
18
+ invoice?: (string | OsInvoice) | null;
19
+ metadata?: object | null;
20
+ receipt_url?: string | null;
21
+ }
22
+
23
+ export interface OsPaymentTerm {
24
+ id?: string;
25
+ user_created?: (string | User) | null;
26
+ date_created?: string | null;
27
+ user_updated?: (string | User) | null;
28
+ date_updated?: string | null;
29
+ }
@@ -0,0 +1,47 @@
1
+ import type { User } from '../system';
2
+ import type { Organization, Contact, OsInvoice, OsTask, OsExpense } from '.';
3
+
4
+ export interface OsProject {
5
+ id?: string;
6
+ status?: string;
7
+ sort?: number | null;
8
+ user_created?: (string | User) | null;
9
+ date_created?: string | null;
10
+ user_updated?: (string | User) | null;
11
+ date_updated?: string | null;
12
+ name?: string | null;
13
+ organization?: (string | Organization) | null;
14
+ description?: string | null;
15
+ owner?: (string | User) | null;
16
+ start_date?: string | null;
17
+ due_date?: string | null;
18
+ expenses?: (string | OsExpense)[];
19
+ invoices?: (string | OsInvoice)[];
20
+ contacts?: (string | OsProjectContact)[];
21
+ billing?: string;
22
+ tasks?: (string | OsTask)[];
23
+ }
24
+
25
+ export interface OsProjectContact {
26
+ id?: string;
27
+ os_projects_id?: (string | OsProject) | null;
28
+ contacts_id?: (string | Contact) | null;
29
+ sort?: number | null;
30
+ }
31
+
32
+ export interface OsProjectFile {
33
+ id?: string;
34
+ }
35
+
36
+ export interface OsProjectTemplate {
37
+ id?: string;
38
+ status?: string;
39
+ sort?: number | null;
40
+ user_created?: (string | User) | null;
41
+ date_created?: string | null;
42
+ user_updated?: (string | User) | null;
43
+ date_updated?: string | null;
44
+ name?: string | null;
45
+ tasks?: { [key: string]: any } | null;
46
+ description?: string | null;
47
+ }
@@ -0,0 +1,84 @@
1
+ import type { User, File } from '../system';
2
+ import type {
3
+ BlockDivider,
4
+ BlockFaq,
5
+ BlockLogocloud,
6
+ BlockQuote,
7
+ BlockRichtext,
8
+ BlockStep,
9
+ BlockTeam,
10
+ BlockVideo,
11
+ } from '../blocks';
12
+ import type { Organization, Contact, OsDeal } from '.';
13
+
14
+ export interface OsProposal {
15
+ id?: string;
16
+ sort?: number | null;
17
+ user_created?: (string | User) | null;
18
+ date_created?: string | null;
19
+ user_updated?: (string | User) | null;
20
+ date_updated?: string | null;
21
+ name?: string | null;
22
+ organization?: (string | Organization) | null;
23
+ deal?: (string | OsDeal) | null;
24
+ owner?: (string | User) | null;
25
+ status?: string;
26
+ contacts?: (string | OsProposalContact)[];
27
+ activity?: string;
28
+ approvals?: (string | OsProposalApproval)[];
29
+ /** This is the content of your proposal */
30
+ blocks?: (string | OsProposalBlock)[];
31
+ }
32
+
33
+ export interface OsProposalApproval {
34
+ id?: string;
35
+ status?: string;
36
+ sort?: number | null;
37
+ user_created?: (string | User) | null;
38
+ date_created?: string | null;
39
+ user_updated?: (string | User) | null;
40
+ date_updated?: string | null;
41
+ signature_text?: string | null;
42
+ signature_image?: (string | File) | null;
43
+ signature_type?: string | null;
44
+ first_name?: string | null;
45
+ last_name?: string | null;
46
+ organization?: string | null;
47
+ proposal?: (string | OsProposal) | null;
48
+ email?: string | null;
49
+ metadata?: { [key: string]: any } | null;
50
+ ip_address?: string | null;
51
+ esignature_agreement?: boolean | null;
52
+ contact?: (string | Contact) | null;
53
+ }
54
+
55
+ export interface OsProposalBlock {
56
+ id?: string;
57
+ sort?: number | null;
58
+ user_created?: (string | User) | null;
59
+ date_created?: string | null;
60
+ user_updated?: (string | User) | null;
61
+ date_updated?: string | null;
62
+ os_proposals_id?: (string | OsProposal) | null;
63
+ item?:
64
+ | (
65
+ | string
66
+ | BlockDivider
67
+ | BlockFaq
68
+ | BlockLogocloud
69
+ | BlockQuote
70
+ | BlockRichtext
71
+ | BlockStep
72
+ | BlockTeam
73
+ | BlockVideo
74
+ )[]
75
+ | null;
76
+ collection?: string | null;
77
+ }
78
+
79
+ export interface OsProposalContact {
80
+ id?: string;
81
+ os_proposals_id?: (string | OsProposal) | null;
82
+ contacts_id?: (string | Contact) | null;
83
+ sort?: number | null;
84
+ }
@@ -0,0 +1,19 @@
1
+ import type { User } from '../system';
2
+
3
+ export interface OsSettings {
4
+ id?: string;
5
+ next_invoice_number?: number | null;
6
+ next_proposal_number?: number | null;
7
+ }
8
+
9
+ export interface OsEmailTemplate {
10
+ id?: string;
11
+ sort?: number | null;
12
+ user_created?: (string | User) | null;
13
+ date_created?: string | null;
14
+ user_updated?: (string | User) | null;
15
+ date_updated?: string | null;
16
+ subject?: string | null;
17
+ body?: string | null;
18
+ name?: string | null;
19
+ }
@@ -0,0 +1,12 @@
1
+ export interface OsSubscription {
2
+ id?: string;
3
+ quantity?: number | null;
4
+ cancel_at_period_end?: boolean | null;
5
+ created?: string | null;
6
+ ended_at?: string | null;
7
+ status?: string | null;
8
+ cancel_at?: string | null;
9
+ canceled_at?: string | null;
10
+ trial_start?: string | null;
11
+ trial_end?: string | null;
12
+ }
@@ -0,0 +1,34 @@
1
+ import type { User } from '../system';
2
+ import type { Form } from '../content';
3
+ import type { OsProject } from '.';
4
+
5
+ export interface OsTaskFile {
6
+ id?: string;
7
+ os_tasks_id?: (string | OsTask) | null;
8
+ directus_files_id?: (string | File) | null;
9
+ sort?: number | null;
10
+ }
11
+
12
+ export interface OsTask {
13
+ id?: string;
14
+ status?: string;
15
+ sort?: number | null;
16
+ user_created?: (string | User) | null;
17
+ date_created?: string | null;
18
+ user_updated?: (string | User) | null;
19
+ date_updated?: string | null;
20
+ project?: (string | OsProject) | null;
21
+ name?: string | null;
22
+ description?: string | null;
23
+ assigned_to?: (string | User) | null;
24
+ due_date?: string | null;
25
+ is_visible_to_client?: boolean;
26
+ type?: string;
27
+ date_completed?: string | null;
28
+ responsibility?: string | null;
29
+ start_date?: string | null;
30
+ embed_url?: string | null;
31
+ form?: (string | Form) | null;
32
+ files?: (string | OsTaskFile)[];
33
+ client_task_details?: string;
34
+ }
@@ -0,0 +1,13 @@
1
+ import type { User } from '../system';
2
+
3
+ export interface OsTaxRate {
4
+ id?: string;
5
+ status?: string;
6
+ sort?: number | null;
7
+ user_created?: (string | User) | null;
8
+ date_created?: string | null;
9
+ user_updated?: (string | User) | null;
10
+ date_updated?: string | null;
11
+ name?: string | null;
12
+ rate?: number | null;
13
+ }
@@ -0,0 +1,8 @@
1
+ // types/pageComponentMap.ts
2
+ // Typed mapping for page name/slug -> async component loader
3
+ // Simplified pageComponentMap: dynamic page-to-component mapping is optional.
4
+ // Keeping an empty map avoids build-time resolution of many optional components
5
+ // that may not be present in all installations.
6
+ export const pageComponentMap = {}
7
+
8
+ export default pageComponentMap
@@ -0,0 +1,6 @@
1
+ export interface PaginationState {
2
+ page: number
3
+ pageSize: number
4
+ total: number
5
+ totalPages: number
6
+ }
@@ -0,0 +1,39 @@
1
+ // Shared form schema types used across the project
2
+ export interface FormField {
3
+ id?: string;
4
+ field: string;
5
+ name?: string;
6
+ label?: string;
7
+ placeholder?: string;
8
+ help?: string;
9
+ type?: string; // e.g. 'text', 'integer', 'textarea', 'select', 'checkbox', etc.
10
+ interface?: string; // optional Directus interface name
11
+ required?: boolean;
12
+ width?: string | number;
13
+ choices?: Array<any>;
14
+ options?: Record<string, any> | Array<any>;
15
+ meta?: Record<string, any>;
16
+ [key: string]: any;
17
+ }
18
+
19
+ // Provide an ambient module so imports using the `~/types/schema` alias resolve
20
+ declare module '~/types/schema' {
21
+ export interface FormField {
22
+ id?: string;
23
+ field: string;
24
+ name?: string;
25
+ label?: string;
26
+ placeholder?: string;
27
+ help?: string;
28
+ type?: string; // e.g. 'text', 'integer', 'textarea', 'select', 'checkbox', etc.
29
+ interface?: string; // optional Directus interface name
30
+ required?: boolean;
31
+ width?: string | number;
32
+ choices?: Array<any>;
33
+ options?: Record<string, any> | Array<any>;
34
+ meta?: Record<string, any>;
35
+ [key: string]: any;
36
+ }
37
+ }
38
+
39
+ export {};
@@ -0,0 +1,151 @@
1
+ import type {
2
+ BlockColumn,
3
+ BlockCta,
4
+ BlockFaq,
5
+ BlockForm,
6
+ BlockGallery,
7
+ BlockHero,
8
+ BlockHtml,
9
+ BlockLogocloud,
10
+ BlockQuote,
11
+ BlockRichtext,
12
+ BlockStep,
13
+ BlockTeam,
14
+ BlockTestimonial,
15
+ BlockVideo,
16
+ } from './blocks';
17
+ import type {
18
+ Globals,
19
+ Navigation,
20
+ Redirect,
21
+ SEO,
22
+ ProjectsSettings,
23
+ PageSettings,
24
+ ChatConfig,
25
+ Event,
26
+ Metric,
27
+ } from './meta';
28
+ import type { Page, PageBlock, Category, Form, Post, Team, Testimonial, PagesProjects, PagesBlog } from './content';
29
+ import type { Inbox, HelpArticle, HelpCollection, HelpFeedback } from './help';
30
+ import type { File, User } from './system';
31
+ import type {
32
+ Conversation,
33
+ Message,
34
+ Contact,
35
+ Organization,
36
+ OrganizationAddress,
37
+ OrganizationContact,
38
+ OsActivity,
39
+ OsActivityContact,
40
+ OsDealContact,
41
+ OsDeal,
42
+ OsDealStage,
43
+ OsEmailTemplate,
44
+ OsExpense,
45
+ OsInvoiceItem,
46
+ OsInvoice,
47
+ OsItem,
48
+ OsPayment,
49
+ OsPaymentTerm,
50
+ OsProjectContact,
51
+ OsProjectFile,
52
+ OsProject,
53
+ OsProjectTemplate,
54
+ OsProposalApproval,
55
+ OsProposalBlock,
56
+ OsProposalContact,
57
+ OsProposal,
58
+ OsSettings,
59
+ OsSubscription,
60
+ OsTaskFile,
61
+ OsTask,
62
+ OsTaxRate,
63
+ } from './os';
64
+
65
+ /** Directus Schema for SDK */
66
+ export interface Schema {
67
+ // Routes
68
+ pages: Page[];
69
+ pages_blocks: PageBlock[];
70
+
71
+ // Content
72
+ categories: Category[];
73
+ forms: Form[];
74
+ posts: Post[];
75
+ team: Team[];
76
+ testimonials: Testimonial[];
77
+ pages_projects: PagesProjects;
78
+ pages_blog: PagesBlog;
79
+
80
+ // Blocks
81
+ block_columns: BlockColumn[];
82
+ block_cta: BlockCta[];
83
+ block_faq: BlockFaq[];
84
+ block_form: BlockForm[];
85
+ block_gallery: BlockGallery[];
86
+ block_hero: BlockHero[];
87
+ block_html: BlockHtml[];
88
+ block_logocloud: BlockLogocloud[];
89
+ block_quote: BlockQuote[];
90
+ block_richtext: BlockRichtext[];
91
+ block_steps: BlockStep[];
92
+ block_team: BlockTeam[];
93
+ block_testimonial: BlockTestimonial[];
94
+ block_video: BlockVideo[];
95
+
96
+ // OS
97
+ contacts: Contact[];
98
+ organizations: Organization[];
99
+ organization_addresses: OrganizationAddress[];
100
+ organizations_contacts: OrganizationContact[];
101
+ os_activities: OsActivity[];
102
+ os_activity_contacts: OsActivityContact[];
103
+ os_deal_contacts: OsDealContact[];
104
+ os_deals: OsDeal[];
105
+ os_deal_stages: OsDealStage[];
106
+ os_email_templates: OsEmailTemplate[];
107
+ os_expenses: OsExpense[];
108
+ os_invoice_items: OsInvoiceItem[];
109
+ os_invoices: OsInvoice[];
110
+ os_items: OsItem[];
111
+ os_payments: OsPayment[];
112
+ os_payment_terms: OsPaymentTerm[];
113
+ os_project_contacts: OsProjectContact[];
114
+ os_project_files: OsProjectFile[];
115
+ os_projects: OsProject[];
116
+ os_project_templates: OsProjectTemplate[];
117
+ os_proposal_approvals: OsProposalApproval[];
118
+ os_proposal_blocks: OsProposalBlock[];
119
+ os_proposal_contacts: OsProposalContact[];
120
+ os_proposals: OsProposal[];
121
+ os_settings: OsSettings;
122
+ os_subscriptions: OsSubscription[];
123
+ os_task_files: OsTaskFile[];
124
+ os_tasks: OsTask[];
125
+ os_tax_rates: OsTaxRate[];
126
+
127
+ // Help
128
+ help_collections: HelpCollection[];
129
+ help_articles: HelpArticle[];
130
+ help_feedback: HelpFeedback[];
131
+ inbox: Inbox[];
132
+ conversations: Conversation[];
133
+ messages: Message[];
134
+
135
+ // Meta
136
+ globals: Globals;
137
+ navigation: Navigation[];
138
+ redirects: Redirect[];
139
+ seo: SEO[];
140
+ projects_settings: ProjectsSettings;
141
+ page_settings: PageSettings;
142
+ chat_config: ChatConfig;
143
+
144
+ // Data
145
+ metrics: Metric[];
146
+ events: Event[];
147
+
148
+ // System
149
+ directus_files: File[];
150
+ directus_users: User[];
151
+ }
@@ -0,0 +1,5 @@
1
+ export interface FormState {
2
+ loading: boolean
3
+ error?: string
4
+ success?: string
5
+ }
@@ -0,0 +1,46 @@
1
+ import type { Folder } from './folder.js';
2
+ import type { User } from './user.js';
3
+
4
+ export interface File {
5
+ /** Unique identifier for the file. */
6
+ id: string;
7
+ /** Where the file is stored. Either `local` for the local filesystem or the name of the storage adapter (for example `s3`). */
8
+ storage: string;
9
+ /** Name of the file on disk. By default, Directus uses a random hash for the filename. */
10
+ filename_disk: string;
11
+ /** How you want to the file to be named when it's being downloaded. */
12
+ filename_download: string;
13
+ /** Title for the file. Is extracted from the filename on upload, but can be edited by the user. */
14
+ title: string;
15
+ /** MIME type of the file. */
16
+ type: string;
17
+ /** Virtual folder where this file resides in. */
18
+ folder: string | Folder | null;
19
+ /** Who uploaded the file. */
20
+ uploaded_by: string | User;
21
+ /** When the file was uploaded. */
22
+ uploaded_on: string;
23
+ modified_by: string | User | null;
24
+ modified_on: string;
25
+ /** Character set of the file. */
26
+ charset: string | null;
27
+ /** Size of the file in bytes. */
28
+ filesize: number;
29
+ /** Width of the file in pixels. Only applies to images. */
30
+ width: number | null;
31
+ /** Height of the file in pixels. Only applies to images. */
32
+ height: number | null;
33
+ /** Duration of the file in seconds. Only applies to audio and video. */
34
+ duration: number | null;
35
+ /** Where the file was embedded from. */
36
+ embed: string | null;
37
+ /** Description for the file. */
38
+ description: string | null;
39
+ /** Where the file was created. Is automatically populated based on EXIF data for images. */
40
+ location: string | null;
41
+ /** Tags for the file. Is automatically populated based on EXIF data for images. */
42
+ tags: string[] | null;
43
+ /** IPTC, EXIF, and ICC metadata extracted from file */
44
+ metadata: { [key: string]: any } | null;
45
+ storage_divider: string;
46
+ }
@@ -0,0 +1,8 @@
1
+ export interface Folder {
2
+ /** Unique identifier for the folder. */
3
+ id: string;
4
+ /** Name of the folder. */
5
+ name: string;
6
+ /** Unique identifier of the parent folder. This allows for nested folders. */
7
+ parent: string | Folder | null;
8
+ }
@@ -0,0 +1,4 @@
1
+ export type * from './file.js';
2
+ export type * from './folder.js';
3
+ export type * from './role.js';
4
+ export type * from './user.js';
@@ -0,0 +1,21 @@
1
+ import type { User } from './user.js';
2
+
3
+ export interface Role {
4
+ /** Unique identifier for the role. */
5
+ id: string;
6
+ /** Name of the role. */
7
+ name: string;
8
+ /** The role's icon. */
9
+ icon: string;
10
+ /** Description of the role. */
11
+ description: string | null;
12
+ /** Array of IP addresses that are allowed to connect to the API as a user of this role. */
13
+ ip_access: string[];
14
+ /** Whether or not this role enforces the use of 2FA. */
15
+ enforce_tfa: boolean;
16
+ /** Admin role. If true, skips all permission checks. */
17
+ admin_access: boolean;
18
+ /** The users in the role are allowed to use the app. */
19
+ app_access: boolean;
20
+ users: string | User[];
21
+ }
@@ -0,0 +1,56 @@
1
+ import type { Role } from './role.js';
2
+
3
+ export interface User {
4
+ /** Unique identifier for the user. */
5
+ id: string;
6
+ /** First name of the user. */
7
+ first_name: string;
8
+ /** Last name of the user. */
9
+ last_name: string;
10
+ /** Unique email address for the user. */
11
+ email: string;
12
+ /** Password of the user. */
13
+ password: string;
14
+ /** The user's location. */
15
+ location: string | null;
16
+ /** The user's title. */
17
+ title: string | null;
18
+ /** The user's description. */
19
+ description: string | null;
20
+ /** The user's tags. */
21
+ tags: string[] | null;
22
+ /** The user's avatar. */
23
+ avatar: string | File | null;
24
+ /** The user's language used in Directus. */
25
+ language: string;
26
+ /** What theme the user is using. */
27
+ theme: 'light' | 'dark' | 'auto';
28
+ /** The 2FA secret string that's used to generate one time passwords. */
29
+ tfa_secret: string | null;
30
+ /** Status of the user. */
31
+ status: 'active' | 'invited' | 'draft' | 'suspended' | 'deleted';
32
+ /** Unique identifier of the role of this user. */
33
+ role: string | Role;
34
+ /** Static token for the user. */
35
+ token: string | null;
36
+ last_access: string | null;
37
+ /** Last page that the user was on. */
38
+ last_page: string | null;
39
+ provider: string;
40
+ external_identifier: string | null;
41
+ auth_data: { [key: string]: any } | null;
42
+ github: string | null;
43
+ linkedin: string | null;
44
+ start_date: string | null;
45
+ pronouns: string | null;
46
+ nickname: string | null;
47
+ birthday: string | null;
48
+ personal_email: string | null;
49
+ classification: string | null;
50
+ timezone: string | null;
51
+ phone: string | null;
52
+ email_notifications: boolean | null;
53
+ company_info: string;
54
+ preferences_divider: string;
55
+ admin_divider: string;
56
+ }
@@ -0,0 +1,10 @@
1
+ import type { BaseAdapter } from '../adapters/common'
2
+
3
+ export function validateAdapterShape(adapter: BaseAdapter, domain: string) {
4
+ if (!adapter.id) {
5
+ throw new Error(`[@mframework/core] ${domain} adapter is missing "id"`)
6
+ }
7
+ if (!adapter.type) {
8
+ throw new Error(`[@mframework/core] ${domain} adapter is missing "type"`)
9
+ }
10
+ }
@@ -0,0 +1,18 @@
1
+ // Centralized env helper for all layers and packages
2
+ export function getEnv(key: string, fallback?: string): string | undefined {
3
+ if (!key) return fallback
4
+ const direct = process.env[key]
5
+ if (direct !== undefined) return direct
6
+ const publicKey = `NUXT_PUBLIC_${key}`
7
+ if (process.env[publicKey] !== undefined) return process.env[publicKey]
8
+ return fallback
9
+ }
10
+
11
+ export function getEnvBool(key: string, fallback = false): boolean {
12
+ const v = getEnv(key)
13
+ if (v === undefined) return fallback
14
+ const low = String(v).toLowerCase()
15
+ return ['1', 'true', 'yes', 'on'].includes(low)
16
+ }
17
+
18
+ export default { getEnv, getEnvBool }
@@ -0,0 +1,15 @@
1
+ export class MeeoviError extends Error {
2
+ code?: string
3
+ cause?: unknown
4
+
5
+ constructor(message: string, options?: { code?: string; cause?: unknown }) {
6
+ super(message)
7
+ this.name = 'MeeoviError'
8
+ this.code = options?.code
9
+ this.cause = options?.cause
10
+ }
11
+ }
12
+
13
+ export function isM FrameworkError(err: unknown): err is MeeoviError {
14
+ return err instanceof MeeoviError
15
+ }
@@ -0,0 +1,11 @@
1
+ import { onSSR, vsfRef, configureSSR } from './ssr';
2
+ import { sharedRef } from './shared';
3
+ import wrap from './wrap';
4
+ import { Logger, registerLogger } from './logger';
5
+ import { addBasePath } from './helpers';
6
+ import mask from './logger/mask';
7
+ import { useVSFContext, configureContext, generateContext } from './context';
8
+ import { integrationPlugin } from './nuxt';
9
+ import { configureFactoryParams } from './factoryParams';
10
+ import i18nRedirectsUtil from './i18n-redirects';
11
+ export { wrap, onSSR, vsfRef, configureSSR, sharedRef, Logger, registerLogger, mask, configureContext, useVSFContext, configureFactoryParams, generateContext, integrationPlugin, i18nRedirectsUtil, addBasePath };