@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,27 @@
|
|
|
1
|
+
import type { User } from '../system';
|
|
2
|
+
import type { Organization, Contact, OsInvoice } from '.';
|
|
3
|
+
export interface OsPayment {
|
|
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
|
+
payment_date?: string | null;
|
|
12
|
+
amount?: number | null;
|
|
13
|
+
stripe_payment_id?: string;
|
|
14
|
+
transaction_fee?: number | null;
|
|
15
|
+
organization?: (string | Organization) | null;
|
|
16
|
+
contact?: (string | Contact) | null;
|
|
17
|
+
invoice?: (string | OsInvoice) | null;
|
|
18
|
+
metadata?: object | null;
|
|
19
|
+
receipt_url?: string | null;
|
|
20
|
+
}
|
|
21
|
+
export interface OsPaymentTerm {
|
|
22
|
+
id?: string;
|
|
23
|
+
user_created?: (string | User) | null;
|
|
24
|
+
date_created?: string | null;
|
|
25
|
+
user_updated?: (string | User) | null;
|
|
26
|
+
date_updated?: string | null;
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { User } from '../system';
|
|
2
|
+
import type { Organization, Contact, OsInvoice, OsTask, OsExpense } from '.';
|
|
3
|
+
export interface OsProject {
|
|
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
|
+
organization?: (string | Organization) | null;
|
|
13
|
+
description?: string | null;
|
|
14
|
+
owner?: (string | User) | null;
|
|
15
|
+
start_date?: string | null;
|
|
16
|
+
due_date?: string | null;
|
|
17
|
+
expenses?: (string | OsExpense)[];
|
|
18
|
+
invoices?: (string | OsInvoice)[];
|
|
19
|
+
contacts?: (string | OsProjectContact)[];
|
|
20
|
+
billing?: string;
|
|
21
|
+
tasks?: (string | OsTask)[];
|
|
22
|
+
}
|
|
23
|
+
export interface OsProjectContact {
|
|
24
|
+
id?: string;
|
|
25
|
+
os_projects_id?: (string | OsProject) | null;
|
|
26
|
+
contacts_id?: (string | Contact) | null;
|
|
27
|
+
sort?: number | null;
|
|
28
|
+
}
|
|
29
|
+
export interface OsProjectFile {
|
|
30
|
+
id?: string;
|
|
31
|
+
}
|
|
32
|
+
export interface OsProjectTemplate {
|
|
33
|
+
id?: string;
|
|
34
|
+
status?: string;
|
|
35
|
+
sort?: number | null;
|
|
36
|
+
user_created?: (string | User) | null;
|
|
37
|
+
date_created?: string | null;
|
|
38
|
+
user_updated?: (string | User) | null;
|
|
39
|
+
date_updated?: string | null;
|
|
40
|
+
name?: string | null;
|
|
41
|
+
tasks?: {
|
|
42
|
+
[key: string]: any;
|
|
43
|
+
} | null;
|
|
44
|
+
description?: string | null;
|
|
45
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { User, File } from '../system';
|
|
2
|
+
import type { BlockDivider, BlockFaq, BlockLogocloud, BlockQuote, BlockRichtext, BlockStep, BlockTeam, BlockVideo } from '../blocks';
|
|
3
|
+
import type { Organization, Contact, OsDeal } from '.';
|
|
4
|
+
export interface OsProposal {
|
|
5
|
+
id?: 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
|
+
organization?: (string | Organization) | null;
|
|
13
|
+
deal?: (string | OsDeal) | null;
|
|
14
|
+
owner?: (string | User) | null;
|
|
15
|
+
status?: string;
|
|
16
|
+
contacts?: (string | OsProposalContact)[];
|
|
17
|
+
activity?: string;
|
|
18
|
+
approvals?: (string | OsProposalApproval)[];
|
|
19
|
+
/** This is the content of your proposal */
|
|
20
|
+
blocks?: (string | OsProposalBlock)[];
|
|
21
|
+
}
|
|
22
|
+
export interface OsProposalApproval {
|
|
23
|
+
id?: string;
|
|
24
|
+
status?: string;
|
|
25
|
+
sort?: number | null;
|
|
26
|
+
user_created?: (string | User) | null;
|
|
27
|
+
date_created?: string | null;
|
|
28
|
+
user_updated?: (string | User) | null;
|
|
29
|
+
date_updated?: string | null;
|
|
30
|
+
signature_text?: string | null;
|
|
31
|
+
signature_image?: (string | File) | null;
|
|
32
|
+
signature_type?: string | null;
|
|
33
|
+
first_name?: string | null;
|
|
34
|
+
last_name?: string | null;
|
|
35
|
+
organization?: string | null;
|
|
36
|
+
proposal?: (string | OsProposal) | null;
|
|
37
|
+
email?: string | null;
|
|
38
|
+
metadata?: {
|
|
39
|
+
[key: string]: any;
|
|
40
|
+
} | null;
|
|
41
|
+
ip_address?: string | null;
|
|
42
|
+
esignature_agreement?: boolean | null;
|
|
43
|
+
contact?: (string | Contact) | null;
|
|
44
|
+
}
|
|
45
|
+
export interface OsProposalBlock {
|
|
46
|
+
id?: string;
|
|
47
|
+
sort?: number | null;
|
|
48
|
+
user_created?: (string | User) | null;
|
|
49
|
+
date_created?: string | null;
|
|
50
|
+
user_updated?: (string | User) | null;
|
|
51
|
+
date_updated?: string | null;
|
|
52
|
+
os_proposals_id?: (string | OsProposal) | null;
|
|
53
|
+
item?: (string | BlockDivider | BlockFaq | BlockLogocloud | BlockQuote | BlockRichtext | BlockStep | BlockTeam | BlockVideo)[] | null;
|
|
54
|
+
collection?: string | null;
|
|
55
|
+
}
|
|
56
|
+
export interface OsProposalContact {
|
|
57
|
+
id?: string;
|
|
58
|
+
os_proposals_id?: (string | OsProposal) | null;
|
|
59
|
+
contacts_id?: (string | Contact) | null;
|
|
60
|
+
sort?: number | null;
|
|
61
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { User } from '../system';
|
|
2
|
+
export interface OsSettings {
|
|
3
|
+
id?: string;
|
|
4
|
+
next_invoice_number?: number | null;
|
|
5
|
+
next_proposal_number?: number | null;
|
|
6
|
+
}
|
|
7
|
+
export interface OsEmailTemplate {
|
|
8
|
+
id?: string;
|
|
9
|
+
sort?: number | null;
|
|
10
|
+
user_created?: (string | User) | null;
|
|
11
|
+
date_created?: string | null;
|
|
12
|
+
user_updated?: (string | User) | null;
|
|
13
|
+
date_updated?: string | null;
|
|
14
|
+
subject?: string | null;
|
|
15
|
+
body?: string | null;
|
|
16
|
+
name?: string | null;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -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 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { User } from '../system';
|
|
2
|
+
import type { Form } from '../content';
|
|
3
|
+
import type { OsProject } from '.';
|
|
4
|
+
export interface OsTaskFile {
|
|
5
|
+
id?: string;
|
|
6
|
+
os_tasks_id?: (string | OsTask) | null;
|
|
7
|
+
directus_files_id?: (string | File) | null;
|
|
8
|
+
sort?: number | null;
|
|
9
|
+
}
|
|
10
|
+
export interface OsTask {
|
|
11
|
+
id?: string;
|
|
12
|
+
status?: string;
|
|
13
|
+
sort?: number | null;
|
|
14
|
+
user_created?: (string | User) | null;
|
|
15
|
+
date_created?: string | null;
|
|
16
|
+
user_updated?: (string | User) | null;
|
|
17
|
+
date_updated?: string | null;
|
|
18
|
+
project?: (string | OsProject) | null;
|
|
19
|
+
name?: string | null;
|
|
20
|
+
description?: string | null;
|
|
21
|
+
assigned_to?: (string | User) | null;
|
|
22
|
+
due_date?: string | null;
|
|
23
|
+
is_visible_to_client?: boolean;
|
|
24
|
+
type?: string;
|
|
25
|
+
date_completed?: string | null;
|
|
26
|
+
responsibility?: string | null;
|
|
27
|
+
start_date?: string | null;
|
|
28
|
+
embed_url?: string | null;
|
|
29
|
+
form?: (string | Form) | null;
|
|
30
|
+
files?: (string | OsTaskFile)[];
|
|
31
|
+
client_task_details?: string;
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { User } from '../system';
|
|
2
|
+
export interface OsTaxRate {
|
|
3
|
+
id?: string;
|
|
4
|
+
status?: string;
|
|
5
|
+
sort?: number | null;
|
|
6
|
+
user_created?: (string | User) | null;
|
|
7
|
+
date_created?: string | null;
|
|
8
|
+
user_updated?: (string | User) | null;
|
|
9
|
+
date_updated?: string | null;
|
|
10
|
+
name?: string | null;
|
|
11
|
+
rate?: number | null;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
export default pageComponentMap;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { BlockColumn, BlockCta, BlockFaq, BlockForm, BlockGallery, BlockHero, BlockHtml, BlockLogocloud, BlockQuote, BlockRichtext, BlockStep, BlockTeam, BlockTestimonial, BlockVideo } from './blocks';
|
|
2
|
+
import type { Globals, Navigation, Redirect, SEO, ProjectsSettings, PageSettings, ChatConfig, Event, Metric } from './meta';
|
|
3
|
+
import type { Page, PageBlock, Category, Form, Post, Team, Testimonial, PagesProjects, PagesBlog } from './content';
|
|
4
|
+
import type { Inbox, HelpArticle, HelpCollection, HelpFeedback } from './help';
|
|
5
|
+
import type { File, User } from './system';
|
|
6
|
+
import type { Conversation, Message, Contact, Organization, OrganizationAddress, OrganizationContact, OsActivity, OsActivityContact, OsDealContact, OsDeal, OsDealStage, OsEmailTemplate, OsExpense, OsInvoiceItem, OsInvoice, OsItem, OsPayment, OsPaymentTerm, OsProjectContact, OsProjectFile, OsProject, OsProjectTemplate, OsProposalApproval, OsProposalBlock, OsProposalContact, OsProposal, OsSettings, OsSubscription, OsTaskFile, OsTask, OsTaxRate } from './os';
|
|
7
|
+
/** Directus Schema for SDK */
|
|
8
|
+
export interface Schema {
|
|
9
|
+
pages: Page[];
|
|
10
|
+
pages_blocks: PageBlock[];
|
|
11
|
+
categories: Category[];
|
|
12
|
+
forms: Form[];
|
|
13
|
+
posts: Post[];
|
|
14
|
+
team: Team[];
|
|
15
|
+
testimonials: Testimonial[];
|
|
16
|
+
pages_projects: PagesProjects;
|
|
17
|
+
pages_blog: PagesBlog;
|
|
18
|
+
block_columns: BlockColumn[];
|
|
19
|
+
block_cta: BlockCta[];
|
|
20
|
+
block_faq: BlockFaq[];
|
|
21
|
+
block_form: BlockForm[];
|
|
22
|
+
block_gallery: BlockGallery[];
|
|
23
|
+
block_hero: BlockHero[];
|
|
24
|
+
block_html: BlockHtml[];
|
|
25
|
+
block_logocloud: BlockLogocloud[];
|
|
26
|
+
block_quote: BlockQuote[];
|
|
27
|
+
block_richtext: BlockRichtext[];
|
|
28
|
+
block_steps: BlockStep[];
|
|
29
|
+
block_team: BlockTeam[];
|
|
30
|
+
block_testimonial: BlockTestimonial[];
|
|
31
|
+
block_video: BlockVideo[];
|
|
32
|
+
contacts: Contact[];
|
|
33
|
+
organizations: Organization[];
|
|
34
|
+
organization_addresses: OrganizationAddress[];
|
|
35
|
+
organizations_contacts: OrganizationContact[];
|
|
36
|
+
os_activities: OsActivity[];
|
|
37
|
+
os_activity_contacts: OsActivityContact[];
|
|
38
|
+
os_deal_contacts: OsDealContact[];
|
|
39
|
+
os_deals: OsDeal[];
|
|
40
|
+
os_deal_stages: OsDealStage[];
|
|
41
|
+
os_email_templates: OsEmailTemplate[];
|
|
42
|
+
os_expenses: OsExpense[];
|
|
43
|
+
os_invoice_items: OsInvoiceItem[];
|
|
44
|
+
os_invoices: OsInvoice[];
|
|
45
|
+
os_items: OsItem[];
|
|
46
|
+
os_payments: OsPayment[];
|
|
47
|
+
os_payment_terms: OsPaymentTerm[];
|
|
48
|
+
os_project_contacts: OsProjectContact[];
|
|
49
|
+
os_project_files: OsProjectFile[];
|
|
50
|
+
os_projects: OsProject[];
|
|
51
|
+
os_project_templates: OsProjectTemplate[];
|
|
52
|
+
os_proposal_approvals: OsProposalApproval[];
|
|
53
|
+
os_proposal_blocks: OsProposalBlock[];
|
|
54
|
+
os_proposal_contacts: OsProposalContact[];
|
|
55
|
+
os_proposals: OsProposal[];
|
|
56
|
+
os_settings: OsSettings;
|
|
57
|
+
os_subscriptions: OsSubscription[];
|
|
58
|
+
os_task_files: OsTaskFile[];
|
|
59
|
+
os_tasks: OsTask[];
|
|
60
|
+
os_tax_rates: OsTaxRate[];
|
|
61
|
+
help_collections: HelpCollection[];
|
|
62
|
+
help_articles: HelpArticle[];
|
|
63
|
+
help_feedback: HelpFeedback[];
|
|
64
|
+
inbox: Inbox[];
|
|
65
|
+
conversations: Conversation[];
|
|
66
|
+
messages: Message[];
|
|
67
|
+
globals: Globals;
|
|
68
|
+
navigation: Navigation[];
|
|
69
|
+
redirects: Redirect[];
|
|
70
|
+
seo: SEO[];
|
|
71
|
+
projects_settings: ProjectsSettings;
|
|
72
|
+
page_settings: PageSettings;
|
|
73
|
+
chat_config: ChatConfig;
|
|
74
|
+
metrics: Metric[];
|
|
75
|
+
events: Event[];
|
|
76
|
+
directus_files: File[];
|
|
77
|
+
directus_users: User[];
|
|
78
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { Folder } from './folder.js';
|
|
2
|
+
import type { User } from './user.js';
|
|
3
|
+
export interface File {
|
|
4
|
+
/** Unique identifier for the file. */
|
|
5
|
+
id: string;
|
|
6
|
+
/** Where the file is stored. Either `local` for the local filesystem or the name of the storage adapter (for example `s3`). */
|
|
7
|
+
storage: string;
|
|
8
|
+
/** Name of the file on disk. By default, Directus uses a random hash for the filename. */
|
|
9
|
+
filename_disk: string;
|
|
10
|
+
/** How you want to the file to be named when it's being downloaded. */
|
|
11
|
+
filename_download: string;
|
|
12
|
+
/** Title for the file. Is extracted from the filename on upload, but can be edited by the user. */
|
|
13
|
+
title: string;
|
|
14
|
+
/** MIME type of the file. */
|
|
15
|
+
type: string;
|
|
16
|
+
/** Virtual folder where this file resides in. */
|
|
17
|
+
folder: string | Folder | null;
|
|
18
|
+
/** Who uploaded the file. */
|
|
19
|
+
uploaded_by: string | User;
|
|
20
|
+
/** When the file was uploaded. */
|
|
21
|
+
uploaded_on: string;
|
|
22
|
+
modified_by: string | User | null;
|
|
23
|
+
modified_on: string;
|
|
24
|
+
/** Character set of the file. */
|
|
25
|
+
charset: string | null;
|
|
26
|
+
/** Size of the file in bytes. */
|
|
27
|
+
filesize: number;
|
|
28
|
+
/** Width of the file in pixels. Only applies to images. */
|
|
29
|
+
width: number | null;
|
|
30
|
+
/** Height of the file in pixels. Only applies to images. */
|
|
31
|
+
height: number | null;
|
|
32
|
+
/** Duration of the file in seconds. Only applies to audio and video. */
|
|
33
|
+
duration: number | null;
|
|
34
|
+
/** Where the file was embedded from. */
|
|
35
|
+
embed: string | null;
|
|
36
|
+
/** Description for the file. */
|
|
37
|
+
description: string | null;
|
|
38
|
+
/** Where the file was created. Is automatically populated based on EXIF data for images. */
|
|
39
|
+
location: string | null;
|
|
40
|
+
/** Tags for the file. Is automatically populated based on EXIF data for images. */
|
|
41
|
+
tags: string[] | null;
|
|
42
|
+
/** IPTC, EXIF, and ICC metadata extracted from file */
|
|
43
|
+
metadata: {
|
|
44
|
+
[key: string]: any;
|
|
45
|
+
} | null;
|
|
46
|
+
storage_divider: string;
|
|
47
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { User } from './user.js';
|
|
2
|
+
export interface Role {
|
|
3
|
+
/** Unique identifier for the role. */
|
|
4
|
+
id: string;
|
|
5
|
+
/** Name of the role. */
|
|
6
|
+
name: string;
|
|
7
|
+
/** The role's icon. */
|
|
8
|
+
icon: string;
|
|
9
|
+
/** Description of the role. */
|
|
10
|
+
description: string | null;
|
|
11
|
+
/** Array of IP addresses that are allowed to connect to the API as a user of this role. */
|
|
12
|
+
ip_access: string[];
|
|
13
|
+
/** Whether or not this role enforces the use of 2FA. */
|
|
14
|
+
enforce_tfa: boolean;
|
|
15
|
+
/** Admin role. If true, skips all permission checks. */
|
|
16
|
+
admin_access: boolean;
|
|
17
|
+
/** The users in the role are allowed to use the app. */
|
|
18
|
+
app_access: boolean;
|
|
19
|
+
users: string | User[];
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { Role } from './role.js';
|
|
2
|
+
export interface User {
|
|
3
|
+
/** Unique identifier for the user. */
|
|
4
|
+
id: string;
|
|
5
|
+
/** First name of the user. */
|
|
6
|
+
first_name: string;
|
|
7
|
+
/** Last name of the user. */
|
|
8
|
+
last_name: string;
|
|
9
|
+
/** Unique email address for the user. */
|
|
10
|
+
email: string;
|
|
11
|
+
/** Password of the user. */
|
|
12
|
+
password: string;
|
|
13
|
+
/** The user's location. */
|
|
14
|
+
location: string | null;
|
|
15
|
+
/** The user's title. */
|
|
16
|
+
title: string | null;
|
|
17
|
+
/** The user's description. */
|
|
18
|
+
description: string | null;
|
|
19
|
+
/** The user's tags. */
|
|
20
|
+
tags: string[] | null;
|
|
21
|
+
/** The user's avatar. */
|
|
22
|
+
avatar: string | File | null;
|
|
23
|
+
/** The user's language used in Directus. */
|
|
24
|
+
language: string;
|
|
25
|
+
/** What theme the user is using. */
|
|
26
|
+
theme: 'light' | 'dark' | 'auto';
|
|
27
|
+
/** The 2FA secret string that's used to generate one time passwords. */
|
|
28
|
+
tfa_secret: string | null;
|
|
29
|
+
/** Status of the user. */
|
|
30
|
+
status: 'active' | 'invited' | 'draft' | 'suspended' | 'deleted';
|
|
31
|
+
/** Unique identifier of the role of this user. */
|
|
32
|
+
role: string | Role;
|
|
33
|
+
/** Static token for the user. */
|
|
34
|
+
token: string | null;
|
|
35
|
+
last_access: string | null;
|
|
36
|
+
/** Last page that the user was on. */
|
|
37
|
+
last_page: string | null;
|
|
38
|
+
provider: string;
|
|
39
|
+
external_identifier: string | null;
|
|
40
|
+
auth_data: {
|
|
41
|
+
[key: string]: any;
|
|
42
|
+
} | null;
|
|
43
|
+
github: string | null;
|
|
44
|
+
linkedin: string | null;
|
|
45
|
+
start_date: string | null;
|
|
46
|
+
pronouns: string | null;
|
|
47
|
+
nickname: string | null;
|
|
48
|
+
birthday: string | null;
|
|
49
|
+
personal_email: string | null;
|
|
50
|
+
classification: string | null;
|
|
51
|
+
timezone: string | null;
|
|
52
|
+
phone: string | null;
|
|
53
|
+
email_notifications: boolean | null;
|
|
54
|
+
company_info: string;
|
|
55
|
+
preferences_divider: string;
|
|
56
|
+
admin_divider: string;
|
|
57
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function getEnv(key: string, fallback?: string): string | undefined;
|
|
2
|
+
export declare function getEnvBool(key: string, fallback?: boolean): boolean;
|
|
3
|
+
declare const _default: {
|
|
4
|
+
getEnv: typeof getEnv;
|
|
5
|
+
getEnvBool: typeof getEnvBool;
|
|
6
|
+
};
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Centralized env helper for all layers and packages
|
|
2
|
+
export function getEnv(key, fallback) {
|
|
3
|
+
if (!key)
|
|
4
|
+
return fallback;
|
|
5
|
+
const direct = process.env[key];
|
|
6
|
+
if (direct !== undefined)
|
|
7
|
+
return direct;
|
|
8
|
+
const publicKey = `NUXT_PUBLIC_${key}`;
|
|
9
|
+
if (process.env[publicKey] !== undefined)
|
|
10
|
+
return process.env[publicKey];
|
|
11
|
+
return fallback;
|
|
12
|
+
}
|
|
13
|
+
export function getEnvBool(key, fallback = false) {
|
|
14
|
+
const v = getEnv(key);
|
|
15
|
+
if (v === undefined)
|
|
16
|
+
return fallback;
|
|
17
|
+
const low = String(v).toLowerCase();
|
|
18
|
+
return ['1', 'true', 'yes', 'on'].includes(low);
|
|
19
|
+
}
|
|
20
|
+
export default { getEnv, getEnvBool };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export class MeeoviError extends Error {
|
|
2
|
+
code;
|
|
3
|
+
cause;
|
|
4
|
+
constructor(message, options) {
|
|
5
|
+
super(message);
|
|
6
|
+
this.name = 'MeeoviError';
|
|
7
|
+
this.code = options?.code;
|
|
8
|
+
this.cause = options?.cause;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export function isAlternateError(err) {
|
|
12
|
+
return err instanceof MeeoviError;
|
|
13
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type AlternateLogLevel = 'debug' | 'info' | 'warn' | 'error';
|
|
2
|
+
export interface AlternateLogger {
|
|
3
|
+
level: AlternateLogLevel;
|
|
4
|
+
debug(message: string, meta?: unknown): void;
|
|
5
|
+
info(message: string, meta?: unknown): void;
|
|
6
|
+
warn(message: string, meta?: unknown): void;
|
|
7
|
+
error(message: string, meta?: unknown): void;
|
|
8
|
+
}
|
|
9
|
+
export declare function createLogger(level?: AlternateLogLevel): AlternateLogger;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export function createLogger(level = 'info') {
|
|
2
|
+
const levels = ['debug', 'info', 'warn', 'error'];
|
|
3
|
+
function shouldLog(target) {
|
|
4
|
+
return levels.indexOf(target) >= levels.indexOf(level);
|
|
5
|
+
}
|
|
6
|
+
return {
|
|
7
|
+
level,
|
|
8
|
+
debug(message, meta) {
|
|
9
|
+
if (!shouldLog('debug'))
|
|
10
|
+
return;
|
|
11
|
+
console.debug(`[Alternate][debug] ${message}`, meta ?? '');
|
|
12
|
+
},
|
|
13
|
+
info(message, meta) {
|
|
14
|
+
if (!shouldLog('info'))
|
|
15
|
+
return;
|
|
16
|
+
console.info(`[Alternate][info] ${message}`, meta ?? '');
|
|
17
|
+
},
|
|
18
|
+
warn(message, meta) {
|
|
19
|
+
if (!shouldLog('warn'))
|
|
20
|
+
return;
|
|
21
|
+
console.warn(`[Alternate][warn] ${message}`, meta ?? '');
|
|
22
|
+
},
|
|
23
|
+
error(message, meta) {
|
|
24
|
+
if (!shouldLog('error'))
|
|
25
|
+
return;
|
|
26
|
+
console.error(`[Alternate][error] ${message}`, meta ?? '');
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { SearchAdapter } from '../adapters/search';
|
|
2
|
+
import type { CatalogAdapter } from '../adapters/catalog';
|
|
3
|
+
import type { CartAdapter } from '../adapters/cart';
|
|
4
|
+
import type { AuthAdapter } from '../adapters/auth';
|
|
5
|
+
export interface AlternateAdapterMap {
|
|
6
|
+
search: SearchAdapter;
|
|
7
|
+
catalog: CatalogAdapter;
|
|
8
|
+
cart: CartAdapter;
|
|
9
|
+
auth: AuthAdapter;
|
|
10
|
+
}
|
|
11
|
+
export type AlternateAdapterKey = keyof AlternateAdapterMap;
|
|
12
|
+
export type AlternateAdapterOf<K extends AlternateAdapterKey> = AlternateAdapterMap[K];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AlternateConfig } from './config';
|
|
2
|
+
import { AlternateContext } from '../runtime/context';
|
|
3
|
+
import { AlternateEventBus } from './events';
|
|
4
|
+
import { AlternateModule } from './module';
|
|
5
|
+
export interface AlternateApp {
|
|
6
|
+
context: AlternateContext;
|
|
7
|
+
events: AlternateEventBus;
|
|
8
|
+
start(): Promise<AlternateContext>;
|
|
9
|
+
}
|
|
10
|
+
export interface AlternateAppOptions {
|
|
11
|
+
config: AlternateConfig;
|
|
12
|
+
modules?: AlternateModule[];
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|