@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.
- package/README.md +0 -0
- package/bin/create-adapter +18 -0
- package/bin/create-adapter.cjs +18 -0
- package/createNormalizer.ts +7 -0
- package/dist/adapters/auth.d.ts +9 -0
- package/dist/adapters/auth.js +1 -0
- package/dist/adapters/cart.d.ts +22 -0
- package/dist/adapters/cart.js +1 -0
- package/dist/adapters/catalog.d.ts +17 -0
- package/dist/adapters/catalog.js +1 -0
- package/dist/adapters/common.d.ts +9 -0
- package/dist/adapters/common.js +1 -0
- package/dist/adapters/search.d.ts +21 -0
- package/dist/adapters/search.js +1 -0
- package/dist/index.d.ts +70 -0
- package/dist/index.js +72 -0
- package/dist/plugins/defineAdapter.d.ts +6 -0
- package/dist/plugins/defineAdapter.js +3 -0
- package/dist/plugins/defineModule.d.ts +2 -0
- package/dist/plugins/defineModule.js +3 -0
- package/dist/plugins/index.d.ts +1 -0
- package/dist/plugins/index.js +3 -0
- package/dist/plugins/registry.d.ts +10 -0
- package/dist/plugins/registry.js +27 -0
- package/dist/runtime/app.d.ts +2 -0
- package/dist/runtime/app.js +20 -0
- package/dist/runtime/config.d.ts +7 -0
- package/dist/runtime/config.js +9 -0
- package/dist/runtime/context.d.ts +9 -0
- package/dist/runtime/context.js +11 -0
- package/dist/runtime/hooks.d.ts +5 -0
- package/dist/runtime/hooks.js +18 -0
- package/dist/runtime/lifecycle.d.ts +4 -0
- package/dist/runtime/lifecycle.js +5 -0
- package/dist/src/adapters/auth.d.ts +9 -0
- package/dist/src/adapters/auth.js +1 -0
- package/dist/src/adapters/cart.d.ts +22 -0
- package/dist/src/adapters/cart.js +1 -0
- package/dist/src/adapters/catalog.d.ts +17 -0
- package/dist/src/adapters/catalog.js +1 -0
- package/dist/src/adapters/common.d.ts +9 -0
- package/dist/src/adapters/common.js +1 -0
- package/dist/src/adapters/lists.d.ts +17 -0
- package/dist/src/adapters/lists.js +1 -0
- package/dist/src/adapters/search.d.ts +21 -0
- package/dist/src/adapters/search.js +1 -0
- package/dist/src/plugins/defineAdapter.d.ts +2 -0
- package/dist/src/plugins/defineAdapter.js +3 -0
- package/dist/src/plugins/defineModule.d.ts +2 -0
- package/dist/src/plugins/defineModule.js +3 -0
- package/dist/src/plugins/index.d.ts +1 -0
- package/dist/src/plugins/index.js +3 -0
- package/dist/src/plugins/registry.d.ts +14 -0
- package/dist/src/plugins/registry.js +46 -0
- package/dist/src/runtime/app.d.ts +6 -0
- package/dist/src/runtime/app.js +20 -0
- package/dist/src/runtime/config.d.ts +18 -0
- package/dist/src/runtime/config.js +20 -0
- package/dist/src/runtime/context.d.ts +9 -0
- package/dist/src/runtime/context.js +11 -0
- package/dist/src/runtime/hooks.d.ts +6 -0
- package/dist/src/runtime/hooks.js +21 -0
- package/dist/src/runtime/lifecycle.d.ts +4 -0
- package/dist/src/runtime/lifecycle.js +5 -0
- package/dist/src/types/adapters.d.ts +14 -0
- package/dist/src/types/adapters.js +1 -0
- package/dist/src/types/app.d.ts +13 -0
- package/dist/src/types/app.js +1 -0
- package/dist/src/types/auth/adapter.d.ts +6 -0
- package/dist/src/types/auth/adapter.js +1 -0
- package/dist/src/types/auth/inputs.d.ts +22 -0
- package/dist/src/types/auth/inputs.js +21 -0
- package/dist/src/types/auth/providers.d.ts +6 -0
- package/dist/src/types/auth/providers.js +1 -0
- package/dist/src/types/auth/session.d.ts +7 -0
- package/dist/src/types/auth/session.js +1 -0
- package/dist/src/types/auth/user.d.ts +9 -0
- package/dist/src/types/auth/user.js +1 -0
- package/dist/src/types/commerce/adapter.d.ts +18 -0
- package/dist/src/types/commerce/adapter.js +1 -0
- package/dist/src/types/commerce/cart.d.ts +14 -0
- package/dist/src/types/commerce/cart.js +1 -0
- package/dist/src/types/commerce/category.d.ts +7 -0
- package/dist/src/types/commerce/category.js +1 -0
- package/dist/src/types/commerce/order.d.ts +12 -0
- package/dist/src/types/commerce/order.js +1 -0
- package/dist/src/types/commerce/product.d.ts +28 -0
- package/dist/src/types/commerce/product.js +1 -0
- package/dist/src/types/compat/legacy.d.ts +21 -0
- package/dist/src/types/compat/legacy.js +1 -0
- package/dist/src/types/config.d.ts +8 -0
- package/dist/src/types/config.js +1 -0
- package/dist/src/types/core/common.d.ts +2 -0
- package/dist/src/types/core/common.js +1 -0
- package/dist/src/types/core/error.d.ts +5 -0
- package/dist/src/types/core/error.js +1 -0
- package/dist/src/types/core/id.d.ts +1 -0
- package/dist/src/types/core/id.js +1 -0
- package/dist/src/types/core/pagination.d.ts +6 -0
- package/dist/src/types/core/pagination.js +1 -0
- package/dist/src/types/core/result.d.ts +9 -0
- package/dist/src/types/core/result.js +1 -0
- package/dist/src/types/core/utility.d.ts +5 -0
- package/dist/src/types/core/utility.js +1 -0
- package/dist/src/types/events.d.ts +20 -0
- package/dist/src/types/events.js +22 -0
- package/dist/src/types/index.d.ts +38 -0
- package/dist/src/types/index.js +35 -0
- package/dist/src/types/module.d.ts +15 -0
- package/dist/src/types/module.js +1 -0
- package/dist/src/types/sdk/adapter.d.ts +5 -0
- package/dist/src/types/sdk/adapter.js +1 -0
- package/dist/src/types/sdk/endpoint.d.ts +7 -0
- package/dist/src/types/sdk/endpoint.js +1 -0
- package/dist/src/types/sdk/errors.d.ts +6 -0
- package/dist/src/types/sdk/errors.js +1 -0
- package/dist/src/types/sdk/request.d.ts +6 -0
- package/dist/src/types/sdk/request.js +1 -0
- package/dist/src/types/sdk/response.d.ts +5 -0
- package/dist/src/types/sdk/response.js +1 -0
- package/dist/src/types/search/adapter.d.ts +6 -0
- package/dist/src/types/search/adapter.js +1 -0
- package/dist/src/types/search/facet.d.ts +8 -0
- package/dist/src/types/search/facet.js +1 -0
- package/dist/src/types/search/opensearch.d.ts +21 -0
- package/dist/src/types/search/opensearch.js +1 -0
- package/dist/src/types/search/query.d.ts +17 -0
- package/dist/src/types/search/query.js +1 -0
- package/dist/src/types/search/result.d.ts +15 -0
- package/dist/src/types/search/result.js +1 -0
- package/dist/src/types/ui/api/global-search.d.ts +8 -0
- package/dist/src/types/ui/api/global-search.js +1 -0
- package/dist/src/types/ui/blocks/block-button-group.d.ts +6 -0
- package/dist/src/types/ui/blocks/block-button-group.js +1 -0
- package/dist/src/types/ui/blocks/block-button.d.ts +13 -0
- package/dist/src/types/ui/blocks/block-button.js +1 -0
- package/dist/src/types/ui/blocks/block-column.d.ts +18 -0
- package/dist/src/types/ui/blocks/block-column.js +1 -0
- package/dist/src/types/ui/blocks/block-cta.d.ts +11 -0
- package/dist/src/types/ui/blocks/block-cta.js +1 -0
- package/dist/src/types/ui/blocks/block-divider.d.ts +4 -0
- package/dist/src/types/ui/blocks/block-divider.js +1 -0
- package/dist/src/types/ui/blocks/block-faq.d.ts +11 -0
- package/dist/src/types/ui/blocks/block-faq.js +1 -0
- package/dist/src/types/ui/blocks/block-form.d.ts +7 -0
- package/dist/src/types/ui/blocks/block-form.js +1 -0
- package/dist/src/types/ui/blocks/block-gallery.d.ts +13 -0
- package/dist/src/types/ui/blocks/block-gallery.js +1 -0
- package/dist/src/types/ui/blocks/block-hero.d.ts +11 -0
- package/dist/src/types/ui/blocks/block-hero.js +1 -0
- package/dist/src/types/ui/blocks/block-html.d.ts +4 -0
- package/dist/src/types/ui/blocks/block-html.js +1 -0
- package/dist/src/types/ui/blocks/block-logocloud.d.ts +13 -0
- package/dist/src/types/ui/blocks/block-logocloud.js +1 -0
- package/dist/src/types/ui/blocks/block-quote.d.ts +10 -0
- package/dist/src/types/ui/blocks/block-quote.js +1 -0
- package/dist/src/types/ui/blocks/block-richtext.d.ts +7 -0
- package/dist/src/types/ui/blocks/block-richtext.js +1 -0
- package/dist/src/types/ui/blocks/block-steps.d.ts +21 -0
- package/dist/src/types/ui/blocks/block-steps.js +1 -0
- package/dist/src/types/ui/blocks/block-team.d.ts +6 -0
- package/dist/src/types/ui/blocks/block-team.js +1 -0
- package/dist/src/types/ui/blocks/block-testimonial.d.ts +13 -0
- package/dist/src/types/ui/blocks/block-testimonial.js +1 -0
- package/dist/src/types/ui/blocks/block-video.d.ts +9 -0
- package/dist/src/types/ui/blocks/block-video.js +1 -0
- package/dist/src/types/ui/blocks/block.d.ts +17 -0
- package/dist/src/types/ui/blocks/block.js +1 -0
- package/dist/src/types/ui/blocks/index.d.ts +18 -0
- package/dist/src/types/ui/blocks/index.js +1 -0
- package/dist/src/types/ui/component.d.ts +6 -0
- package/dist/src/types/ui/component.js +1 -0
- package/dist/src/types/ui/content/category.d.ts +10 -0
- package/dist/src/types/ui/content/category.js +1 -0
- package/dist/src/types/ui/content/form.d.ts +21 -0
- package/dist/src/types/ui/content/form.js +1 -0
- package/dist/src/types/ui/content/index.d.ts +6 -0
- package/dist/src/types/ui/content/index.js +1 -0
- package/dist/src/types/ui/content/page.d.ts +38 -0
- package/dist/src/types/ui/content/page.js +1 -0
- package/dist/src/types/ui/content/post.d.ts +38 -0
- package/dist/src/types/ui/content/post.js +1 -0
- package/dist/src/types/ui/content/team.d.ts +17 -0
- package/dist/src/types/ui/content/team.js +1 -0
- package/dist/src/types/ui/content/testimonial.d.ts +18 -0
- package/dist/src/types/ui/content/testimonial.js +1 -0
- package/dist/src/types/ui/form.d.ts +12 -0
- package/dist/src/types/ui/form.js +1 -0
- package/dist/src/types/ui/help/index.d.ts +51 -0
- package/dist/src/types/ui/help/index.js +1 -0
- package/dist/src/types/ui/meta/analytics.d.ts +21 -0
- package/dist/src/types/ui/meta/analytics.js +1 -0
- package/dist/src/types/ui/meta/config.d.ts +22 -0
- package/dist/src/types/ui/meta/config.js +1 -0
- package/dist/src/types/ui/meta/globals.d.ts +33 -0
- package/dist/src/types/ui/meta/globals.js +1 -0
- package/dist/src/types/ui/meta/index.d.ts +6 -0
- package/dist/src/types/ui/meta/index.js +1 -0
- package/dist/src/types/ui/meta/navigation.d.ts +31 -0
- package/dist/src/types/ui/meta/navigation.js +1 -0
- package/dist/src/types/ui/meta/redirect.d.ts +12 -0
- package/dist/src/types/ui/meta/redirect.js +1 -0
- package/dist/src/types/ui/meta/seo.d.ts +19 -0
- package/dist/src/types/ui/meta/seo.js +1 -0
- package/dist/src/types/ui/os/contact.d.ts +22 -0
- package/dist/src/types/ui/os/contact.js +1 -0
- package/dist/src/types/ui/os/conversation.d.ts +23 -0
- package/dist/src/types/ui/os/conversation.js +1 -0
- package/dist/src/types/ui/os/index.d.ts +16 -0
- package/dist/src/types/ui/os/index.js +1 -0
- package/dist/src/types/ui/os/organization.d.ts +51 -0
- package/dist/src/types/ui/os/organization.js +1 -0
- package/dist/src/types/ui/os/os-activity.d.ts +26 -0
- package/dist/src/types/ui/os/os-activity.js +1 -0
- package/dist/src/types/ui/os/os-deal.d.ts +42 -0
- package/dist/src/types/ui/os/os-deal.js +1 -0
- package/dist/src/types/ui/os/os-expense.d.ts +21 -0
- package/dist/src/types/ui/os/os-expense.js +1 -0
- package/dist/src/types/ui/os/os-invoice.d.ts +46 -0
- package/dist/src/types/ui/os/os-invoice.js +1 -0
- package/dist/src/types/ui/os/os-item.d.ts +17 -0
- package/dist/src/types/ui/os/os-item.js +1 -0
- package/dist/src/types/ui/os/os-payment.d.ts +27 -0
- package/dist/src/types/ui/os/os-payment.js +1 -0
- package/dist/src/types/ui/os/os-project.d.ts +45 -0
- package/dist/src/types/ui/os/os-project.js +1 -0
- package/dist/src/types/ui/os/os-proposal.d.ts +61 -0
- package/dist/src/types/ui/os/os-proposal.js +1 -0
- package/dist/src/types/ui/os/os-settings.d.ts +17 -0
- package/dist/src/types/ui/os/os-settings.js +1 -0
- package/dist/src/types/ui/os/os-subscription.d.ts +12 -0
- package/dist/src/types/ui/os/os-subscription.js +1 -0
- package/dist/src/types/ui/os/os-task.d.ts +32 -0
- package/dist/src/types/ui/os/os-task.js +1 -0
- package/dist/src/types/ui/os/os-tax-rate.d.ts +12 -0
- package/dist/src/types/ui/os/os-tax-rate.js +1 -0
- package/dist/src/types/ui/pageComponentMap.d.ts +2 -0
- package/dist/src/types/ui/pageComponentMap.js +7 -0
- package/dist/src/types/ui/pagination.d.ts +6 -0
- package/dist/src/types/ui/pagination.js +1 -0
- package/dist/src/types/ui/schema.d.ts +78 -0
- package/dist/src/types/ui/schema.js +1 -0
- package/dist/src/types/ui/state.d.ts +5 -0
- package/dist/src/types/ui/state.js +1 -0
- package/dist/src/types/ui/system/file.d.ts +47 -0
- package/dist/src/types/ui/system/file.js +1 -0
- package/dist/src/types/ui/system/folder.d.ts +8 -0
- package/dist/src/types/ui/system/folder.js +1 -0
- package/dist/src/types/ui/system/index.d.ts +4 -0
- package/dist/src/types/ui/system/index.js +1 -0
- package/dist/src/types/ui/system/role.d.ts +20 -0
- package/dist/src/types/ui/system/role.js +1 -0
- package/dist/src/types/ui/system/user.d.ts +57 -0
- package/dist/src/types/ui/system/user.js +1 -0
- package/dist/src/utils/adapterValidation.d.ts +2 -0
- package/dist/src/utils/adapterValidation.js +8 -0
- package/dist/src/utils/env.d.ts +7 -0
- package/dist/src/utils/env.js +20 -0
- package/dist/src/utils/errors.d.ts +9 -0
- package/dist/src/utils/errors.js +13 -0
- package/dist/src/utils/logger.d.ts +9 -0
- package/dist/src/utils/logger.js +29 -0
- package/dist/types/adapters.d.ts +12 -0
- package/dist/types/adapters.js +1 -0
- package/dist/types/app.d.ts +13 -0
- package/dist/types/app.js +1 -0
- package/dist/types/config.d.ts +8 -0
- package/dist/types/config.js +1 -0
- package/dist/types/events.d.ts +16 -0
- package/dist/types/events.js +22 -0
- package/dist/types/module.d.ts +15 -0
- package/dist/types/module.js +1 -0
- package/dist/utils/errors.d.ts +9 -0
- package/dist/utils/errors.js +13 -0
- package/dist/utils/logger.d.ts +9 -0
- package/dist/utils/logger.js +29 -0
- package/errors.ts +21 -0
- package/index.ts +93 -0
- package/package.json +39 -0
- package/src/adapters/auth.ts +11 -0
- package/src/adapters/cart.ts +27 -0
- package/src/adapters/catalog.ts +21 -0
- package/src/adapters/common.ts +10 -0
- package/src/adapters/lists.ts +23 -0
- package/src/adapters/search.ts +26 -0
- package/src/normalizers/factories/apiClientFactory/context.d.ts +14 -0
- package/src/normalizers/factories/apiClientFactory/index.d.ts +3 -0
- package/src/normalizers/factories/index.d.ts +19 -0
- package/src/normalizers/factories/useBillingFactory.d.ts +12 -0
- package/src/normalizers/factories/useCartFactory.d.ts +45 -0
- package/src/normalizers/factories/useCategoryFactory.d.ts +7 -0
- package/src/normalizers/factories/useContentFactory.d.ts +16 -0
- package/src/normalizers/factories/useFacetFactory.d.ts +6 -0
- package/src/normalizers/factories/useForgotPasswordFactory.d.ts +20 -0
- package/src/normalizers/factories/useMakeOrderFactory.d.ts +7 -0
- package/src/normalizers/factories/useProductFactory.d.ts +7 -0
- package/src/normalizers/factories/useReviewFactory.d.ts +10 -0
- package/src/normalizers/factories/useSearchFactory.d.ts +7 -0
- package/src/normalizers/factories/useShippingFactory.d.ts +12 -0
- package/src/normalizers/factories/useShippingProviderFactory.d.ts +14 -0
- package/src/normalizers/factories/useStoreFactory.d.ts +2 -0
- package/src/normalizers/factories/useUserBillingFactory.d.ts +27 -0
- package/src/normalizers/factories/useUserFactory.d.ts +32 -0
- package/src/normalizers/factories/useUserOrderFactory.d.ts +7 -0
- package/src/normalizers/factories/useUserShippingFactory.d.ts +27 -0
- package/src/normalizers/factories/useWishlistFactory.d.ts +24 -0
- package/src/normalizers/utils/context/index.d.ts +8 -0
- package/src/normalizers/utils/factoryParams/commonMethods.d.ts +2 -0
- package/src/normalizers/utils/factoryParams/index.d.ts +2 -0
- package/src/normalizers/utils/factoryParams/platformMethods.d.ts +2 -0
- package/src/normalizers/utils/helpers/index.d.ts +7 -0
- package/src/normalizers/utils/i18n-redirects/index.d.ts +12 -0
- package/src/normalizers/utils/logger/defaultLogger.d.ts +7 -0
- package/src/normalizers/utils/logger/index.d.ts +5 -0
- package/src/normalizers/utils/logger/makeMessageStyle.d.ts +2 -0
- package/src/normalizers/utils/logger/makeMethod.d.ts +2 -0
- package/src/normalizers/utils/logger/mask.d.ts +2 -0
- package/src/normalizers/utils/logger/types.d.ts +13 -0
- package/src/normalizers/utils/logger/utils.d.ts +4 -0
- package/src/normalizers/utils/shared/index.d.ts +4 -0
- package/src/normalizers/utils/ssr/index.d.ts +11 -0
- package/src/normalizers/utils/wrap/index.d.ts +3 -0
- package/src/plugins/defineAdapter.ts +5 -0
- package/src/plugins/defineModule.ts +5 -0
- package/src/plugins/index.ts +3 -0
- package/src/plugins/registry.ts +58 -0
- package/src/runtime/app.ts +31 -0
- package/src/runtime/config.ts +24 -0
- package/src/runtime/context.ts +18 -0
- package/src/runtime/hooks.ts +28 -0
- package/src/runtime/lifecycle.ts +16 -0
- package/src/types/adapters.ts +17 -0
- package/src/types/app.ts +15 -0
- package/src/types/auth/adapter.ts +7 -0
- package/src/types/auth/inputs.ts +33 -0
- package/src/types/auth/providers.ts +6 -0
- package/src/types/auth/session.ts +8 -0
- package/src/types/auth/user.ts +9 -0
- package/src/types/commerce/adapter.ts +21 -0
- package/src/types/commerce/cart.ts +16 -0
- package/src/types/commerce/category.ts +7 -0
- package/src/types/commerce/order.ts +13 -0
- package/src/types/commerce/product.ts +31 -0
- package/src/types/compat/legacy.ts +19 -0
- package/src/types/config.ts +9 -0
- package/src/types/core/common.ts +2 -0
- package/src/types/core/error.ts +11 -0
- package/src/types/core/id.ts +1 -0
- package/src/types/core/pagination.ts +6 -0
- package/src/types/core/result.ts +11 -0
- package/src/types/core/utility.ts +7 -0
- package/src/types/events.ts +47 -0
- package/src/types/index.ts +49 -0
- package/src/types/module.ts +18 -0
- package/src/types/sdk/adapter.ts +10 -0
- package/src/types/sdk/endpoint.ts +11 -0
- package/src/types/sdk/errors.ts +6 -0
- package/src/types/sdk/request.ts +6 -0
- package/src/types/sdk/response.ts +5 -0
- package/src/types/search/adapter.ts +7 -0
- package/src/types/search/facet.ts +9 -0
- package/src/types/search/opensearch.ts +19 -0
- package/src/types/search/query.ts +19 -0
- package/src/types/search/result.ts +17 -0
- package/src/types/ui/api/global-search.ts +8 -0
- package/src/types/ui/blocks/block-button-group.ts +7 -0
- package/src/types/ui/blocks/block-button.ts +14 -0
- package/src/types/ui/blocks/block-column.ts +20 -0
- package/src/types/ui/blocks/block-cta.ts +10 -0
- package/src/types/ui/blocks/block-divider.ts +4 -0
- package/src/types/ui/blocks/block-faq.ts +12 -0
- package/src/types/ui/blocks/block-form.ts +8 -0
- package/src/types/ui/blocks/block-gallery.ts +14 -0
- package/src/types/ui/blocks/block-hero.ts +12 -0
- package/src/types/ui/blocks/block-html.ts +4 -0
- package/src/types/ui/blocks/block-logocloud.ts +14 -0
- package/src/types/ui/blocks/block-quote.ts +11 -0
- package/src/types/ui/blocks/block-richtext.ts +7 -0
- package/src/types/ui/blocks/block-steps.ts +22 -0
- package/src/types/ui/blocks/block-team.ts +6 -0
- package/src/types/ui/blocks/block-testimonial.ts +14 -0
- package/src/types/ui/blocks/block-video.ts +10 -0
- package/src/types/ui/blocks/block.ts +49 -0
- package/src/types/ui/blocks/index.ts +18 -0
- package/src/types/ui/component.ts +7 -0
- package/src/types/ui/content/category.ts +11 -0
- package/src/types/ui/content/form.ts +20 -0
- package/src/types/ui/content/index.ts +6 -0
- package/src/types/ui/content/page.ts +76 -0
- package/src/types/ui/content/post.ts +39 -0
- package/src/types/ui/content/team.ts +16 -0
- package/src/types/ui/content/testimonial.ts +19 -0
- package/src/types/ui/env.d.ts +8 -0
- package/src/types/ui/form.ts +17 -0
- package/src/types/ui/help/index.ts +53 -0
- package/src/types/ui/meta/analytics.ts +18 -0
- package/src/types/ui/meta/config.ts +21 -0
- package/src/types/ui/meta/globals.ts +30 -0
- package/src/types/ui/meta/index.ts +6 -0
- package/src/types/ui/meta/navigation.ts +32 -0
- package/src/types/ui/meta/redirect.ts +13 -0
- package/src/types/ui/meta/seo.ts +19 -0
- package/src/types/ui/os/contact.ts +23 -0
- package/src/types/ui/os/conversation.ts +25 -0
- package/src/types/ui/os/index.ts +16 -0
- package/src/types/ui/os/organization.ts +54 -0
- package/src/types/ui/os/os-activity.ts +28 -0
- package/src/types/ui/os/os-deal.ts +45 -0
- package/src/types/ui/os/os-expense.ts +22 -0
- package/src/types/ui/os/os-invoice.ts +48 -0
- package/src/types/ui/os/os-item.ts +18 -0
- package/src/types/ui/os/os-payment.ts +29 -0
- package/src/types/ui/os/os-project.ts +47 -0
- package/src/types/ui/os/os-proposal.ts +84 -0
- package/src/types/ui/os/os-settings.ts +19 -0
- package/src/types/ui/os/os-subscription.ts +12 -0
- package/src/types/ui/os/os-task.ts +34 -0
- package/src/types/ui/os/os-tax-rate.ts +13 -0
- package/src/types/ui/pageComponentMap.ts +8 -0
- package/src/types/ui/pagination.ts +6 -0
- package/src/types/ui/schema.d.ts +39 -0
- package/src/types/ui/schema.ts +151 -0
- package/src/types/ui/state.ts +5 -0
- package/src/types/ui/system/file.ts +46 -0
- package/src/types/ui/system/folder.ts +8 -0
- package/src/types/ui/system/index.ts +4 -0
- package/src/types/ui/system/role.ts +21 -0
- package/src/types/ui/system/user.ts +56 -0
- package/src/utils/adapterValidation.ts +10 -0
- package/src/utils/env.ts +18 -0
- package/src/utils/errors.ts +15 -0
- package/src/utils/index.d.ts +11 -0
- package/src/utils/logger.ts +37 -0
- package/tsconfig.json +15 -0
- package/validation.ts +89 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Legacy compatibility types (keeps older @mframework/types shapes available)
|
|
2
|
+
export interface Product {
|
|
3
|
+
id?: string
|
|
4
|
+
title?: string
|
|
5
|
+
description?: string
|
|
6
|
+
price?: number
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface Session { id?: string; userId?: string; token?: string }
|
|
10
|
+
export interface User { id?: string; email?: string; name?: string }
|
|
11
|
+
|
|
12
|
+
// Re-export canonical types under legacy names for compatibility
|
|
13
|
+
export type { SearchQuery } from '../search/query'
|
|
14
|
+
export type { SearchResult } from '../search/result'
|
|
15
|
+
export type { AuthSession } from '../auth/session'
|
|
16
|
+
export type { CommerceCart, CommerceCartItem } from '../commerce/cart'
|
|
17
|
+
export type { CommercePrice } from '../commerce/product'
|
|
18
|
+
|
|
19
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type ID = string
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { M FrameworkAdapterKey } from './adapters'
|
|
2
|
+
|
|
3
|
+
export interface M FrameworkEventMap {
|
|
4
|
+
'app:ready': { context: unknown }
|
|
5
|
+
'app:error': { error: unknown }
|
|
6
|
+
// emitted when a module/registry registers an adapter at runtime
|
|
7
|
+
'adapter:registered': { key: M FrameworkAdapterKey }
|
|
8
|
+
// modules extend this via declaration merging
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export type M FrameworkEventKey = keyof M FrameworkEventMap
|
|
12
|
+
|
|
13
|
+
export type M FrameworkEventHandler<K extends M FrameworkEventKey> = (
|
|
14
|
+
payload: M FrameworkEventMap[K]
|
|
15
|
+
) => void | Promise<void>
|
|
16
|
+
|
|
17
|
+
export interface M FrameworkEventBus {
|
|
18
|
+
on<K extends M FrameworkEventKey>(event: K, handler: M FrameworkEventHandler<K>): void
|
|
19
|
+
off<K extends M FrameworkEventKey>(event: K, handler: M FrameworkEventHandler<K>): void
|
|
20
|
+
emit<K extends M FrameworkEventKey>(event: K, payload: M FrameworkEventMap[K]): Promise<void>
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function createEventBus(): M FrameworkEventBus {
|
|
24
|
+
const handlers = new Map<string, Set<M FrameworkEventHandler<any>>>()
|
|
25
|
+
|
|
26
|
+
return {
|
|
27
|
+
on(event, handler) {
|
|
28
|
+
if (!handlers.has(event)) {
|
|
29
|
+
handlers.set(event, new Set())
|
|
30
|
+
}
|
|
31
|
+
handlers.get(event)!.add(handler as M FrameworkEventHandler<any>)
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
off(event, handler) {
|
|
35
|
+
handlers.get(event)?.delete(handler as M FrameworkEventHandler<any>)
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
async emit(event, payload) {
|
|
39
|
+
const set = handlers.get(event)
|
|
40
|
+
if (!set || set.size === 0) return
|
|
41
|
+
|
|
42
|
+
for (const handler of set) {
|
|
43
|
+
await handler(payload as any)
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// Core
|
|
2
|
+
export * from './core/result'
|
|
3
|
+
export * from './core/utility'
|
|
4
|
+
export * from './core/pagination'
|
|
5
|
+
export * from './core/id'
|
|
6
|
+
export { Maybe } from './core/common'
|
|
7
|
+
export * from './core/error'
|
|
8
|
+
|
|
9
|
+
// Auth
|
|
10
|
+
export * from './auth/user'
|
|
11
|
+
export * from './auth/session'
|
|
12
|
+
export * from './auth/providers'
|
|
13
|
+
export * from './auth/inputs'
|
|
14
|
+
export * from './auth/adapter'
|
|
15
|
+
|
|
16
|
+
// Commerce
|
|
17
|
+
export * from './commerce/product'
|
|
18
|
+
export * from './commerce/cart'
|
|
19
|
+
export * from './commerce/order'
|
|
20
|
+
export * from './commerce/adapter'
|
|
21
|
+
|
|
22
|
+
// Search
|
|
23
|
+
export * from './search/query'
|
|
24
|
+
export * from './search/result'
|
|
25
|
+
export * from './search/facet'
|
|
26
|
+
export * from './search/result'
|
|
27
|
+
export * from './search/opensearch'
|
|
28
|
+
export * from './search/adapter'
|
|
29
|
+
|
|
30
|
+
// UI
|
|
31
|
+
export * from './ui/form'
|
|
32
|
+
export * from './ui/state'
|
|
33
|
+
export * from './ui/pagination'
|
|
34
|
+
export * from './ui/component'
|
|
35
|
+
export type * from './ui/blocks';
|
|
36
|
+
export type * from './ui/content';
|
|
37
|
+
export type * from './ui/meta';
|
|
38
|
+
export type * from './ui/system';
|
|
39
|
+
export type * from './ui/help';
|
|
40
|
+
export type * from './ui/os';
|
|
41
|
+
export type * from './ui/schema';
|
|
42
|
+
export type * from './ui/api/global-search';
|
|
43
|
+
|
|
44
|
+
// SDK
|
|
45
|
+
export * from './sdk/errors'
|
|
46
|
+
export * from './sdk/endpoint'
|
|
47
|
+
export * from './sdk/request'
|
|
48
|
+
export * from './sdk/response'
|
|
49
|
+
export * from './sdk/adapter'
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { M FrameworkContext } from '../runtime/context'
|
|
2
|
+
import type { M FrameworkAdapterKey, M FrameworkAdapterOf } from './adapters'
|
|
3
|
+
|
|
4
|
+
export type M FrameworkModuleAdapters = Partial<{
|
|
5
|
+
[K in M FrameworkAdapterKey]: M FrameworkAdapterOf<K>
|
|
6
|
+
}>
|
|
7
|
+
|
|
8
|
+
export interface M FrameworkModuleLifecycle {
|
|
9
|
+
onAppInit?(ctx: M FrameworkContext): Promise<void> | void
|
|
10
|
+
onBeforeRequest?(ctx: M FrameworkContext): Promise<void> | void
|
|
11
|
+
onAfterRequest?(ctx: M FrameworkContext): Promise<void> | void
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface M FrameworkModule extends M FrameworkModuleLifecycle {
|
|
15
|
+
id: string
|
|
16
|
+
adapters?: M FrameworkModuleAdapters
|
|
17
|
+
setup?(ctx: M FrameworkContext): void | Promise<void>
|
|
18
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { RequestOptions } from './request'
|
|
2
|
+
import type { APIResponse } from './response'
|
|
3
|
+
|
|
4
|
+
export interface TransportAdapter {
|
|
5
|
+
request<T = unknown>(
|
|
6
|
+
method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE',
|
|
7
|
+
path: string,
|
|
8
|
+
options?: RequestOptions
|
|
9
|
+
): Promise<APIResponse<T>>
|
|
10
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BaseAdapter } from '../../adapters/common'
|
|
2
|
+
import { SearchQuery } from './query'
|
|
3
|
+
import type { SearchResult } from './result'
|
|
4
|
+
|
|
5
|
+
export interface SearchAdapter<TItem = unknown> extends BaseAdapter {
|
|
6
|
+
search(query: SearchQuery): Promise<SearchResult<TItem>>
|
|
7
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface OpenSearchHit<T = unknown> {
|
|
2
|
+
_source: T
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
export interface OpenSearchHits<T = unknown> {
|
|
6
|
+
total: { value: number }
|
|
7
|
+
hits: Array<OpenSearchHit<T>>
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface OpenSearchAggregations {
|
|
11
|
+
[key: string]: {
|
|
12
|
+
buckets: Array<{ key: string; doc_count: number }>
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface OpenSearchResponse<T = unknown> {
|
|
17
|
+
hits: OpenSearchHits<T>
|
|
18
|
+
aggregations?: OpenSearchAggregations
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface SearchFilter {
|
|
2
|
+
field: string
|
|
3
|
+
value: string | number | boolean
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export interface SortOption {
|
|
7
|
+
field: string
|
|
8
|
+
direction: 'asc' | 'desc'
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface SearchQuery {
|
|
12
|
+
q: string
|
|
13
|
+
filters?: SearchFilter[]
|
|
14
|
+
sort?: SortOption[]
|
|
15
|
+
page?: number
|
|
16
|
+
limit?: number
|
|
17
|
+
offset?: number
|
|
18
|
+
pageSize?: number
|
|
19
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface SearchResultItem {
|
|
2
|
+
id: string
|
|
3
|
+
type: 'product' | 'category' | 'content' | string
|
|
4
|
+
title: string
|
|
5
|
+
description?: string
|
|
6
|
+
image?: string
|
|
7
|
+
url?: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface SearchResult<TItem = SearchResultItem> {
|
|
11
|
+
items: TItem[]
|
|
12
|
+
total: number
|
|
13
|
+
// back-compat: some consumers expect totalPages
|
|
14
|
+
totalPages?: number
|
|
15
|
+
page: number
|
|
16
|
+
pageSize: number
|
|
17
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Post, Page } from '../content';
|
|
2
|
+
|
|
3
|
+
export interface BlockButton {
|
|
4
|
+
id: string;
|
|
5
|
+
sort: number | null;
|
|
6
|
+
type: ('pages' | 'posts' | 'external') | null;
|
|
7
|
+
label: string | null;
|
|
8
|
+
color: 'primary' | 'white' | 'gray' | 'white' | 'black';
|
|
9
|
+
variant: 'solid' | 'outline' | 'ghost' | 'link' | 'soft';
|
|
10
|
+
page: string | Page | null;
|
|
11
|
+
post: string | Post | null;
|
|
12
|
+
external_url: string | null;
|
|
13
|
+
icon: string | null;
|
|
14
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { File } from '../system';
|
|
2
|
+
import type { BlockButtonGroup } from '.';
|
|
3
|
+
|
|
4
|
+
export interface BlockColumn {
|
|
5
|
+
headline?: string | null;
|
|
6
|
+
id?: string;
|
|
7
|
+
title?: string | null;
|
|
8
|
+
rows?: (number | BlockColumnRow)[];
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface BlockColumnRow {
|
|
12
|
+
block_columns?: (string | BlockColumn) | null;
|
|
13
|
+
content?: string | null;
|
|
14
|
+
headline?: string | null;
|
|
15
|
+
id?: string;
|
|
16
|
+
image?: (string | File) | null;
|
|
17
|
+
image_position?: string | null;
|
|
18
|
+
title?: string | null;
|
|
19
|
+
button_group?: (string | BlockButtonGroup) | null;
|
|
20
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { BlockButtonGroup } from '.';
|
|
2
|
+
|
|
3
|
+
export interface BlockCta {
|
|
4
|
+
buttons?: { [key: string]: any } | null;
|
|
5
|
+
content?: string | null;
|
|
6
|
+
headline?: string | null;
|
|
7
|
+
id?: string;
|
|
8
|
+
title?: string | null;
|
|
9
|
+
button_group?: (string | BlockButtonGroup) | null;
|
|
10
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface BlockFaq {
|
|
2
|
+
faqs?: BlockFaqQuestion[] | null;
|
|
3
|
+
headline?: string | null;
|
|
4
|
+
id?: string;
|
|
5
|
+
title?: string | null;
|
|
6
|
+
alignment?: 'left' | 'center' | null;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface BlockFaqQuestion {
|
|
10
|
+
title: string | null;
|
|
11
|
+
answer: string | null;
|
|
12
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { File } from '../system';
|
|
2
|
+
|
|
3
|
+
export interface BlockGallery {
|
|
4
|
+
headline?: string | null;
|
|
5
|
+
id?: string;
|
|
6
|
+
title?: string | null;
|
|
7
|
+
gallery_items?: BlockGalleryFile[] | null;
|
|
8
|
+
}
|
|
9
|
+
export interface BlockGalleryFile {
|
|
10
|
+
block_gallery?: (string | BlockGallery) | null;
|
|
11
|
+
directus_files_id?: (string | File) | null;
|
|
12
|
+
id?: number;
|
|
13
|
+
sort?: number | null;
|
|
14
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { File } from '../system';
|
|
2
|
+
import type { BlockButtonGroup } from '.';
|
|
3
|
+
|
|
4
|
+
export interface BlockHero {
|
|
5
|
+
id?: string;
|
|
6
|
+
title?: string | null;
|
|
7
|
+
headline?: string | null;
|
|
8
|
+
content?: string | null;
|
|
9
|
+
image?: (string | File) | null;
|
|
10
|
+
image_position?: 'left' | 'right' | null;
|
|
11
|
+
button_group?: (string | BlockButtonGroup) | null;
|
|
12
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { File } from '../system';
|
|
2
|
+
|
|
3
|
+
export interface BlockLogocloud {
|
|
4
|
+
headline?: string | null;
|
|
5
|
+
id?: string;
|
|
6
|
+
title?: string | null;
|
|
7
|
+
logos?: (string | BlockLogocloudFile)[];
|
|
8
|
+
}
|
|
9
|
+
export interface BlockLogocloudFile {
|
|
10
|
+
id?: string;
|
|
11
|
+
sort?: number | null;
|
|
12
|
+
block_logocloud_id?: (string | BlockLogocloud) | null;
|
|
13
|
+
directus_files_id?: (string | File) | null;
|
|
14
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { File } from '../system';
|
|
2
|
+
|
|
3
|
+
export interface BlockQuote {
|
|
4
|
+
background_color?: string | null;
|
|
5
|
+
content?: string | null;
|
|
6
|
+
headline?: string | null;
|
|
7
|
+
id?: string;
|
|
8
|
+
image?: (string | File) | null;
|
|
9
|
+
subtitle?: string | null;
|
|
10
|
+
title?: string | null;
|
|
11
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { File } from '../system';
|
|
2
|
+
import type { BlockButtonGroup } from '.';
|
|
3
|
+
|
|
4
|
+
export interface BlockStep {
|
|
5
|
+
id?: string;
|
|
6
|
+
title?: string | null;
|
|
7
|
+
headline?: string | null;
|
|
8
|
+
/** If enabled, image position is mframeworkd between left and right. */
|
|
9
|
+
mframework_image_position?: boolean;
|
|
10
|
+
/** Show the step numbers on the website. For example: (Step 1, Step 2, etc) */
|
|
11
|
+
show_step_numbers?: boolean | null;
|
|
12
|
+
steps?: (number | BlockStepItem)[];
|
|
13
|
+
}
|
|
14
|
+
export interface BlockStepItem {
|
|
15
|
+
id?: string;
|
|
16
|
+
title?: string | null;
|
|
17
|
+
content?: string | null;
|
|
18
|
+
image?: (string | File) | null;
|
|
19
|
+
sort?: number | null;
|
|
20
|
+
block_steps?: (string | BlockStep) | null;
|
|
21
|
+
button_group?: (string | BlockButtonGroup) | null;
|
|
22
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Testimonial } from '../content';
|
|
2
|
+
|
|
3
|
+
export interface BlockTestimonial {
|
|
4
|
+
headline?: string | null;
|
|
5
|
+
id?: string;
|
|
6
|
+
title?: string | null;
|
|
7
|
+
testimonials?: (string | BlockTestimonialItem)[];
|
|
8
|
+
}
|
|
9
|
+
export interface BlockTestimonialItem {
|
|
10
|
+
block_testimonials_slider_id?: (string | BlockTestimonial) | null;
|
|
11
|
+
id?: string;
|
|
12
|
+
sort?: number | null;
|
|
13
|
+
testimonials_id?: (string | Testimonial) | null;
|
|
14
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { BlockColumn } from './block-column';
|
|
2
|
+
import type { BlockCta } from './block-cta';
|
|
3
|
+
import type { BlockFaq } from './block-faq';
|
|
4
|
+
import type { BlockForm } from './block-form';
|
|
5
|
+
import type { BlockGallery } from './block-gallery';
|
|
6
|
+
import type { BlockHero } from './block-hero';
|
|
7
|
+
import type { BlockHtml } from './block-html';
|
|
8
|
+
import type { BlockLogocloud } from './block-logocloud';
|
|
9
|
+
import type { BlockQuote } from './block-quote';
|
|
10
|
+
import type { BlockRichtext } from './block-richtext';
|
|
11
|
+
import type { BlockStep } from './block-steps';
|
|
12
|
+
import type { BlockTeam } from './block-team';
|
|
13
|
+
import type { BlockTestimonial } from './block-testimonial';
|
|
14
|
+
import type { BlockVideo } from './block-video';
|
|
15
|
+
import type { BlockDivider } from './block-divider';
|
|
16
|
+
|
|
17
|
+
export type BlockType =
|
|
18
|
+
| 'block_columns'
|
|
19
|
+
| 'block_cta'
|
|
20
|
+
| 'block_faqs'
|
|
21
|
+
| 'block_form'
|
|
22
|
+
| 'block_gallery'
|
|
23
|
+
| 'block_hero'
|
|
24
|
+
| 'block_html'
|
|
25
|
+
| 'block_logocloud'
|
|
26
|
+
| 'block_quote'
|
|
27
|
+
| 'block_richtext'
|
|
28
|
+
| 'block_steps'
|
|
29
|
+
| 'block_team'
|
|
30
|
+
| 'block_testimonials'
|
|
31
|
+
| 'block_video'
|
|
32
|
+
| 'block_divider';
|
|
33
|
+
|
|
34
|
+
export type Block =
|
|
35
|
+
| BlockColumn
|
|
36
|
+
| BlockCta
|
|
37
|
+
| BlockFaq
|
|
38
|
+
| BlockForm
|
|
39
|
+
| BlockGallery
|
|
40
|
+
| BlockHero
|
|
41
|
+
| BlockHtml
|
|
42
|
+
| BlockLogocloud
|
|
43
|
+
| BlockQuote
|
|
44
|
+
| BlockRichtext
|
|
45
|
+
| BlockStep
|
|
46
|
+
| BlockTeam
|
|
47
|
+
| BlockTestimonial
|
|
48
|
+
| BlockVideo
|
|
49
|
+
| BlockDivider;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type * from './block-column';
|
|
2
|
+
export type * from './block-cta';
|
|
3
|
+
export type * from './block-faq';
|
|
4
|
+
export type * from './block-form';
|
|
5
|
+
export type * from './block-gallery';
|
|
6
|
+
export type * from './block-hero';
|
|
7
|
+
export type * from './block-html';
|
|
8
|
+
export type * from './block-logocloud';
|
|
9
|
+
export type * from './block-quote';
|
|
10
|
+
export type * from './block-richtext';
|
|
11
|
+
export type * from './block-steps';
|
|
12
|
+
export type * from './block-team';
|
|
13
|
+
export type * from './block-testimonial';
|
|
14
|
+
export type * from './block-video';
|
|
15
|
+
export type * from './block-button-group';
|
|
16
|
+
export type * from './block-button';
|
|
17
|
+
export type * from './block-divider';
|
|
18
|
+
export type * from './block';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { User } from '../system';
|
|
2
|
+
|
|
3
|
+
export interface Form {
|
|
4
|
+
date_created?: string | null;
|
|
5
|
+
date_updated?: string | null;
|
|
6
|
+
id?: string;
|
|
7
|
+
key?: string | null;
|
|
8
|
+
on_success?: string | null;
|
|
9
|
+
redirect_url?: string | null;
|
|
10
|
+
/** The fields for the form. */
|
|
11
|
+
schema?: { [key: string]: any }[] | null;
|
|
12
|
+
sort?: number | null;
|
|
13
|
+
status?: string;
|
|
14
|
+
/** The text for the submit button label. */
|
|
15
|
+
submit_label?: string | null;
|
|
16
|
+
success_message?: string | null;
|
|
17
|
+
title?: string | null;
|
|
18
|
+
user_created?: string | User | null;
|
|
19
|
+
user_updated?: string | User | null;
|
|
20
|
+
}
|