diff --git a/.changeset/afraid-rings-wave.md b/.changeset/afraid-rings-wave.md deleted file mode 100644 index 5b9b69e01..000000000 --- a/.changeset/afraid-rings-wave.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -'@o2s/configs.integrations': minor -'@o2s/api-harmonization': minor -'@o2s/framework': minor -'@o2s/integrations.mocked': patch -'@o2s/integrations.mocked-dxp': patch -'@o2s/integrations.zendesk': patch -'@o2s/integrations.strapi-cms': patch -'@o2s/integrations.contentful-cms': patch -'@o2s/integrations.medusajs': patch -'@o2s/integrations.algolia': patch -'@o2s/integrations.redis': patch ---- - -Refactored integration configuration by consolidating the 18 individual model files into a single typed `config.ts` backed by a `createIntegrationConfig` helper. Each domain now maps to an integration through a per-domain import alias shared by both the runtime map and its type re-export, so swapping an integration is a single-line change that cannot desync value and types. - -Integration `Config` objects are now declared with `satisfies Partial` (instead of a type annotation), which lets `createIntegrationConfig` validate domain bindings **at compile time** — assigning an integration to a domain it does not provide is now a type error rather than a runtime crash. The runtime check remains as a defense-in-depth backstop. diff --git a/.changeset/arid-chinchillas.md b/.changeset/arid-chinchillas.md deleted file mode 100644 index a7538f72c..000000000 --- a/.changeset/arid-chinchillas.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@o2s/integrations.medusajs': patch ---- - -chore(deps): update dependencies diff --git a/.changeset/block-preview-threading.md b/.changeset/block-preview-threading.md deleted file mode 100644 index 21b2597ac..000000000 --- a/.changeset/block-preview-threading.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -'@o2s/framework': minor -'@o2s/blocks.article': patch -'@o2s/blocks.article-search': patch -'@o2s/blocks.bento-grid': patch -'@o2s/blocks.cart': patch -'@o2s/blocks.category': patch -'@o2s/blocks.checkout-billing-payment': patch -'@o2s/blocks.checkout-company-data': patch -'@o2s/blocks.checkout-shipping-address': patch -'@o2s/blocks.checkout-summary': patch -'@o2s/blocks.cta-section': patch -'@o2s/blocks.document-list': patch -'@o2s/blocks.featured-service-list': patch -'@o2s/blocks.feature-section': patch -'@o2s/blocks.feature-section-grid': patch -'@o2s/blocks.hero-section': patch -'@o2s/blocks.invoice-list': patch -'@o2s/blocks.media-section': patch -'@o2s/blocks.notification-details': patch -'@o2s/blocks.notification-list': patch -'@o2s/blocks.notification-summary': patch -'@o2s/blocks.order-confirmation': patch -'@o2s/blocks.order-details': patch -'@o2s/blocks.order-list': patch -'@o2s/blocks.orders-summary': patch -'@o2s/blocks.payments-history': patch -'@o2s/blocks.payments-summary': patch -'@o2s/blocks.pricing-section': patch -'@o2s/blocks.product-details': patch -'@o2s/blocks.product-list': patch -'@o2s/blocks.recommended-products': patch -'@o2s/blocks.service-details': patch -'@o2s/blocks.service-list': patch -'@o2s/blocks.surveyjs-form': patch -'@o2s/blocks.ticket-details': patch -'@o2s/blocks.ticket-recent': patch -'@o2s/blocks.ticket-summary': patch -'@o2s/blocks.user-account': patch ---- - -Threaded the CMS `preview` flag through every block so draft content actually renders in draft -mode. Previously only 5 of ~42 blocks passed it - the rest always fetched published content, so CMS -live preview (and any draft-mode view) showed stale data for most of the page. - -Per block, the flag now survives all four hops: the renderer forwards `isDraftModeEnabled` (added -to the framework's `BaseBlockProps` - `renderBlocks` already passed it to every block), the server -component sends `preview` on its block fetch, the request DTO declares it, and the API -Harmonization service forwards it to `CmsService.getBlockConfig`. diff --git a/.changeset/blocks-shared-sdk.md b/.changeset/blocks-shared-sdk.md deleted file mode 100644 index 40cf17bff..000000000 --- a/.changeset/blocks-shared-sdk.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -'@o2s/blocks.article': patch -'@o2s/blocks.article-list': patch -'@o2s/blocks.article-search': patch -'@o2s/blocks.bento-grid': patch -'@o2s/blocks.cart': patch -'@o2s/blocks.category': patch -'@o2s/blocks.category-list': patch -'@o2s/blocks.checkout-billing-payment': patch -'@o2s/blocks.checkout-company-data': patch -'@o2s/blocks.checkout-shipping-address': patch -'@o2s/blocks.checkout-summary': patch -'@o2s/blocks.cta-section': patch -'@o2s/blocks.document-list': patch -'@o2s/blocks.faq': patch -'@o2s/blocks.feature-section': patch -'@o2s/blocks.feature-section-grid': patch -'@o2s/blocks.featured-service-list': patch -'@o2s/blocks.hero-section': patch -'@o2s/blocks.invoice-list': patch -'@o2s/blocks.media-section': patch -'@o2s/blocks.notification-details': patch -'@o2s/blocks.notification-list': patch -'@o2s/blocks.notification-summary': patch -'@o2s/blocks.order-confirmation': patch -'@o2s/blocks.order-details': minor -'@o2s/blocks.order-list': patch -'@o2s/blocks.orders-summary': patch -'@o2s/blocks.payments-history': patch -'@o2s/blocks.payments-summary': patch -'@o2s/blocks.pricing-section': patch -'@o2s/blocks.product-details': patch -'@o2s/blocks.product-list': patch -'@o2s/blocks.quick-links': patch -'@o2s/blocks.recommended-products': patch -'@o2s/blocks.service-details': patch -'@o2s/blocks.service-list': patch -'@o2s/blocks.surveyjs-form': patch -'@o2s/blocks.ticket-details': patch -'@o2s/blocks.ticket-list': patch -'@o2s/blocks.ticket-recent': patch -'@o2s/blocks.ticket-summary': patch -'@o2s/blocks.user-account': patch ---- - -refactor(blocks): build the block SDKs on the shared instance - -Every block built an SDK of its own out of the same 15 lines: the API url resolution, the logger settings with an `@ts-expect-error` per environment variable, and a method-by-method pick out of its own factory. They now take the instance from `@o2s/utils.frontend/sdk` and extend it with everything their factory returns, which leaves one `ofetch` client and one logger for all of them instead of 42, and drops the undeclared dependency on `next-runtime-env` that every block relied on. - -`order-details` gains `sdk.blocks.getOrderPdf`: its factory has always defined the method, and only the method-by-method pick left it out. diff --git a/.changeset/bold-badgers.md b/.changeset/bold-badgers.md deleted file mode 100644 index 644542f97..000000000 --- a/.changeset/bold-badgers.md +++ /dev/null @@ -1,60 +0,0 @@ ---- -'@o2s/blocks.user-account': patch -'@o2s/blocks.invoice-list': patch -'@o2s/blocks.payments-history': patch -'@o2s/blocks.payments-summary': patch -'@o2s/blocks.cart': patch -'@o2s/blocks.checkout-billing-payment': patch -'@o2s/blocks.checkout-company-data': patch -'@o2s/blocks.checkout-shipping-address': patch -'@o2s/blocks.checkout-summary': patch -'@o2s/blocks.order-confirmation': patch -'@o2s/blocks.bento-grid': patch -'@o2s/blocks.cta-section': patch -'@o2s/blocks.document-list': patch -'@o2s/blocks.faq': patch -'@o2s/blocks.feature-section-grid': patch -'@o2s/blocks.feature-section': patch -'@o2s/blocks.hero-section': patch -'@o2s/blocks.media-section': patch -'@o2s/blocks.pricing-section': patch -'@o2s/blocks.quick-links': patch -'@o2s/blocks.surveyjs-form': patch -'@o2s/blocks.article-list': patch -'@o2s/blocks.article-search': patch -'@o2s/blocks.article': patch -'@o2s/blocks.category-list': patch -'@o2s/blocks.category': patch -'@o2s/blocks.notification-details': patch -'@o2s/blocks.notification-list': patch -'@o2s/blocks.notification-summary': patch -'@o2s/blocks.order-details': patch -'@o2s/blocks.order-list': patch -'@o2s/blocks.orders-summary': patch -'@o2s/blocks.product-details': patch -'@o2s/blocks.product-list': patch -'@o2s/blocks.recommended-products': patch -'@o2s/blocks.featured-service-list': patch -'@o2s/blocks.service-details': patch -'@o2s/blocks.service-list': patch -'@o2s/blocks.ticket-details': patch -'@o2s/blocks.ticket-list': patch -'@o2s/blocks.ticket-recent': patch -'@o2s/blocks.ticket-summary': patch -'@o2s/framework': patch -'@o2s/integrations.algolia': patch -'@o2s/integrations.contentful-cms': patch -'@o2s/integrations.medusajs': patch -'@o2s/integrations.mocked-dxp': patch -'@o2s/integrations.mocked': patch -'@o2s/integrations.redis': patch -'@o2s/integrations.strapi-cms': patch -'@o2s/integrations.zendesk': patch -'@o2s/modules.surveyjs': patch -'@o2s/telemetry': patch -'@o2s/utils.api-harmonization': patch -'@o2s/utils.frontend': patch -'@o2s/utils.logger': patch ---- - -chore(deps): update dependencies diff --git a/.changeset/cms-page-registry.md b/.changeset/cms-page-registry.md deleted file mode 100644 index fa4853956..000000000 --- a/.changeset/cms-page-registry.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -'@o2s/framework': minor -'@o2s/integrations.mocked': minor -'@o2s/integrations.mocked-dxp': minor ---- - -feat(framework): add a declarative page registry and move the mocked integrations onto it - -Adds `CMS.Pages.definePage` and `CMS.Pages.createPageRegistry` to `@o2s/framework/modules`. A page is declared once, with one entry per locale (its localized slug and SEO), and the registry derives the whole `CmsService` page trio from that single declaration: `getPage` (`mapPage`), `getPages` (`getAllPages`) and `getAlternativePages`. Integrations that serve pages without a CMS no longer keep three hand-written lists of the same pages, which is what let them drift apart. - -Dynamic routes are declared as `/cases/:id` instead of a regex kept in the slug field: the registry matches a slug segment by segment, prefers a static route over a dynamic one, exposes the extracted params through `matchPage` and fills them back into the slug of the page it returns. `definePage` validates a definition up front and rejects the mistakes that used to be silent — a slug without a leading slash, a translated slug that drops a param the other locales declare, a breadcrumb parent that does not cover every locale of its child, two pages that can match the same path with neither being more specific, or two pages sharing an id. - -`@o2s/integrations.mocked` and `@o2s/integrations.mocked-dxp` now declare their pages this way, which cuts their page mocks from 9880 to 1673 lines and their page mappers from 973 to 203. Every page of `@o2s/integrations.mocked` comes back field for field as before; in both integrations the derived lists fix what the hand-kept ones had lost: - -- pages that `getPage` served but the page list had forgotten now reach the sitemap and the hreflang alternates (`/help-and-support` and `/help-and-support/troubleshooting` in `mocked`, 10 of the 22 pages in `mocked-dxp`); -- alternates are emitted per locale instead of being resolved through the requested one, so a page whose slug is not localized (`/`) no longer advertises one locale three times; -- pages with a dynamic slug are left out of the page list, so the sitemap stops publishing `/cases/(.+)` as a URL; -- a slug deeper than its route (`/cases/a/b`) is no longer answered with `/cases/b`, and a request is answered with the slug it asked about instead of the one of the requested locale; -- breadcrumbs come from the page they point at, which corrects the copies that had drifted in `mocked-dxp` (`Geschäftlich` vs `Geschäft`, `Personlich` vs `Persönlich`, `Konten` in a Polish breadcrumb) and gives `/personal/accounts` the breadcrumb it declared in English only; -- the home page of `mocked-dxp` gets an id of its own (`home-1`): it shared `personal-1` with `/personal`, so the two pages were grouped as one in the sitemap and advertised each other as localized alternates. diff --git a/.changeset/cold-cats.md b/.changeset/cold-cats.md deleted file mode 100644 index 644542f97..000000000 --- a/.changeset/cold-cats.md +++ /dev/null @@ -1,60 +0,0 @@ ---- -'@o2s/blocks.user-account': patch -'@o2s/blocks.invoice-list': patch -'@o2s/blocks.payments-history': patch -'@o2s/blocks.payments-summary': patch -'@o2s/blocks.cart': patch -'@o2s/blocks.checkout-billing-payment': patch -'@o2s/blocks.checkout-company-data': patch -'@o2s/blocks.checkout-shipping-address': patch -'@o2s/blocks.checkout-summary': patch -'@o2s/blocks.order-confirmation': patch -'@o2s/blocks.bento-grid': patch -'@o2s/blocks.cta-section': patch -'@o2s/blocks.document-list': patch -'@o2s/blocks.faq': patch -'@o2s/blocks.feature-section-grid': patch -'@o2s/blocks.feature-section': patch -'@o2s/blocks.hero-section': patch -'@o2s/blocks.media-section': patch -'@o2s/blocks.pricing-section': patch -'@o2s/blocks.quick-links': patch -'@o2s/blocks.surveyjs-form': patch -'@o2s/blocks.article-list': patch -'@o2s/blocks.article-search': patch -'@o2s/blocks.article': patch -'@o2s/blocks.category-list': patch -'@o2s/blocks.category': patch -'@o2s/blocks.notification-details': patch -'@o2s/blocks.notification-list': patch -'@o2s/blocks.notification-summary': patch -'@o2s/blocks.order-details': patch -'@o2s/blocks.order-list': patch -'@o2s/blocks.orders-summary': patch -'@o2s/blocks.product-details': patch -'@o2s/blocks.product-list': patch -'@o2s/blocks.recommended-products': patch -'@o2s/blocks.featured-service-list': patch -'@o2s/blocks.service-details': patch -'@o2s/blocks.service-list': patch -'@o2s/blocks.ticket-details': patch -'@o2s/blocks.ticket-list': patch -'@o2s/blocks.ticket-recent': patch -'@o2s/blocks.ticket-summary': patch -'@o2s/framework': patch -'@o2s/integrations.algolia': patch -'@o2s/integrations.contentful-cms': patch -'@o2s/integrations.medusajs': patch -'@o2s/integrations.mocked-dxp': patch -'@o2s/integrations.mocked': patch -'@o2s/integrations.redis': patch -'@o2s/integrations.strapi-cms': patch -'@o2s/integrations.zendesk': patch -'@o2s/modules.surveyjs': patch -'@o2s/telemetry': patch -'@o2s/utils.api-harmonization': patch -'@o2s/utils.frontend': patch -'@o2s/utils.logger': patch ---- - -chore(deps): update dependencies diff --git a/.changeset/contentful-drop-page-mocks.md b/.changeset/contentful-drop-page-mocks.md deleted file mode 100644 index f6efb5b01..000000000 --- a/.changeset/contentful-drop-page-mocks.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@o2s/integrations.contentful-cms': patch ---- - -chore(integrations.contentful-cms): drop the unreachable page mocks - -Removes `mapMockPage`, the mock `getAllPages` and the mock `getAlternativePages` from `cms.page.mapper.ts`, together with the 15 files of mock page objects under `mappers/mocks/pages`. Nothing reached that code: `CmsService` imports only `mapPage` (which maps real Contentful entries) and answers `getPages` and `getAlternativePages` from Contentful itself, `mapMockPage` was called only by the mock `getAlternativePages` next to it, and the package exports just `./integration` and `./live-preview`. The mocks came in with the first version of the integration, before the real mapping existed, and had been maintained since — the PBAC change alone rewrote all 15 of them. - -`cms.page.mapper.ts` keeps the live mapping (`mapPage`, `mapSeo`, `mapTemplate`, `mapSlot`, `mapLayout`, `mapComponent`) and goes from 531 to 141 lines; ~2930 lines are gone in total. diff --git a/.changeset/create-block-request-helper.md b/.changeset/create-block-request-helper.md deleted file mode 100644 index d2cff1aa8..000000000 --- a/.changeset/create-block-request-helper.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -'@o2s/framework': minor -'@o2s/utils.frontend': patch -'@o2s/modules.surveyjs': patch -'@o2s/blocks.article': patch -'@o2s/blocks.article-list': patch -'@o2s/blocks.article-search': patch -'@o2s/blocks.bento-grid': patch -'@o2s/blocks.cart': patch -'@o2s/blocks.category': patch -'@o2s/blocks.category-list': patch -'@o2s/blocks.checkout-billing-payment': patch -'@o2s/blocks.checkout-company-data': patch -'@o2s/blocks.checkout-shipping-address': patch -'@o2s/blocks.checkout-summary': patch -'@o2s/blocks.cta-section': patch -'@o2s/blocks.document-list': patch -'@o2s/blocks.faq': patch -'@o2s/blocks.feature-section': patch -'@o2s/blocks.feature-section-grid': patch -'@o2s/blocks.featured-service-list': patch -'@o2s/blocks.hero-section': patch -'@o2s/blocks.invoice-list': patch -'@o2s/blocks.media-section': patch -'@o2s/blocks.notification-details': patch -'@o2s/blocks.notification-list': patch -'@o2s/blocks.notification-summary': patch -'@o2s/blocks.order-confirmation': patch -'@o2s/blocks.order-details': patch -'@o2s/blocks.order-list': patch -'@o2s/blocks.orders-summary': patch -'@o2s/blocks.payments-history': patch -'@o2s/blocks.payments-summary': patch -'@o2s/blocks.pricing-section': patch -'@o2s/blocks.product-details': patch -'@o2s/blocks.product-list': patch -'@o2s/blocks.quick-links': patch -'@o2s/blocks.recommended-products': patch -'@o2s/blocks.service-details': patch -'@o2s/blocks.service-list': patch -'@o2s/blocks.surveyjs-form': patch -'@o2s/blocks.ticket-details': patch -'@o2s/blocks.ticket-list': patch -'@o2s/blocks.ticket-recent': patch -'@o2s/blocks.ticket-summary': patch -'@o2s/blocks.user-account': patch ---- - -feat(framework): add `createBlockRequest` helper for block SDK methods - -Adds `createBlockRequest` to `@o2s/framework/sdk`. It creates the request function used by the methods of a block (or module) SDK and takes care of the boilerplate that was previously copy-pasted into every method: merging the default API headers with the caller's headers and the access token, serializing query params, typing the response and wrapping failures into a `BlockRequestError` (which exposes `status`, `data` and the original error as `cause`). - -`getApiHeaders` is now provided by `@o2s/framework/headers` and re-exported by `@o2s/utils.frontend` (`Utils.Headers.getApiHeaders`), so the default headers are defined in a single place. All block SDKs, the SurveyJS module SDK and the block generator template use the new helper. diff --git a/.changeset/dark-sparrows.md b/.changeset/dark-sparrows.md deleted file mode 100644 index a7538f72c..000000000 --- a/.changeset/dark-sparrows.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@o2s/integrations.medusajs': patch ---- - -chore(deps): update dependencies diff --git a/.changeset/deep-otters.md b/.changeset/deep-otters.md deleted file mode 100644 index cc64ff899..000000000 --- a/.changeset/deep-otters.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -'@o2s/blocks.invoice-list': patch -'@o2s/blocks.notification-list': patch -'@o2s/blocks.order-list': patch -'@o2s/blocks.orders-summary': patch -'@o2s/blocks.product-details': patch -'@o2s/blocks.product-list': patch -'@o2s/blocks.service-details': patch -'@o2s/blocks.ticket-details': patch -'@o2s/blocks.ticket-list': patch -'@o2s/blocks.ticket-recent': patch -'@o2s/modules.surveyjs': patch ---- - -chore(deps): update dependencies diff --git a/.changeset/deep-wallabies.md b/.changeset/deep-wallabies.md deleted file mode 100644 index a7538f72c..000000000 --- a/.changeset/deep-wallabies.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@o2s/integrations.medusajs': patch ---- - -chore(deps): update dependencies diff --git a/.changeset/dependency-update-pass.md b/.changeset/dependency-update-pass.md deleted file mode 100644 index 724a27307..000000000 --- a/.changeset/dependency-update-pass.md +++ /dev/null @@ -1,72 +0,0 @@ ---- -'@o2s/api-harmonization': patch -'@o2s/blocks.article': patch -'@o2s/blocks.article-list': patch -'@o2s/blocks.article-search': patch -'@o2s/blocks.bento-grid': patch -'@o2s/blocks.cart': patch -'@o2s/blocks.category': patch -'@o2s/blocks.category-list': patch -'@o2s/blocks.checkout-billing-payment': patch -'@o2s/blocks.checkout-company-data': patch -'@o2s/blocks.checkout-shipping-address': patch -'@o2s/blocks.checkout-summary': patch -'@o2s/blocks.cta-section': patch -'@o2s/blocks.document-list': patch -'@o2s/blocks.faq': patch -'@o2s/blocks.feature-section': patch -'@o2s/blocks.feature-section-grid': patch -'@o2s/blocks.featured-service-list': patch -'@o2s/blocks.hero-section': patch -'@o2s/blocks.invoice-list': patch -'@o2s/blocks.media-section': patch -'@o2s/blocks.notification-details': patch -'@o2s/blocks.notification-list': patch -'@o2s/blocks.notification-summary': patch -'@o2s/blocks.order-confirmation': patch -'@o2s/blocks.order-details': patch -'@o2s/blocks.order-list': patch -'@o2s/blocks.orders-summary': patch -'@o2s/blocks.payments-history': patch -'@o2s/blocks.payments-summary': patch -'@o2s/blocks.pricing-section': patch -'@o2s/blocks.product-details': patch -'@o2s/blocks.product-list': patch -'@o2s/blocks.quick-links': patch -'@o2s/blocks.recommended-products': patch -'@o2s/blocks.service-details': patch -'@o2s/blocks.service-list': patch -'@o2s/blocks.surveyjs-form': patch -'@o2s/blocks.ticket-details': patch -'@o2s/blocks.ticket-list': patch -'@o2s/blocks.ticket-recent': patch -'@o2s/blocks.ticket-summary': patch -'@o2s/blocks.user-account': patch -'@o2s/configs.integrations': patch -'@o2s/framework': patch -'@o2s/integrations.algolia': patch -'@o2s/integrations.contentful-cms': patch -'@o2s/integrations.medusajs': patch -'@o2s/integrations.mocked': patch -'@o2s/integrations.mocked-dxp': patch -'@o2s/integrations.redis': patch -'@o2s/integrations.strapi-cms': patch -'@o2s/integrations.zendesk': patch -'@o2s/modules.documents': patch -'@o2s/modules.surveyjs': patch -'@o2s/telemetry': patch -'@o2s/ui': patch -'@o2s/utils.api-harmonization': patch -'@o2s/utils.frontend': patch -'@o2s/utils.logger': patch -'create-o2s-app': patch ---- - -chore: dependency update pass - -Update dependencies across the monorepo. Highlights: NestJS 12 (Express 5), -TypeScript 6 for type-checking/lint with native TypeScript 7 compiling the -package builds, Vite 8, Docusaurus 3.10, Storybook 10.6, @medusajs 2.20, -redis 6, surveyjs (core + react-ui) 3, and assorted minor/patch bumps. No -public package API changed; peer ranges were bumped to match (notably -@nestjs/* to ^12). diff --git a/.changeset/deps-followup-easy-batch.md b/.changeset/deps-followup-easy-batch.md deleted file mode 100644 index 094563ff5..000000000 --- a/.changeset/deps-followup-easy-batch.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -'@o2s/blocks.invoice-list': patch -'@o2s/blocks.surveyjs-form': patch -'@o2s/blocks.notification-list': patch -'@o2s/blocks.order-list': patch -'@o2s/blocks.orders-summary': patch -'@o2s/blocks.product-details': patch -'@o2s/blocks.product-list': patch -'@o2s/blocks.service-details': patch -'@o2s/blocks.ticket-details': patch -'@o2s/blocks.ticket-list': patch -'@o2s/blocks.ticket-recent': patch -'@o2s/integrations.medusajs': patch -'@o2s/modules.surveyjs': patch -'@o2s/ui': patch ---- - -Routine dependency maintenance (patch/minor, no code changes): `@medusajs/js-sdk` & `@medusajs/types` to 2.20.1, `survey-core` & `survey-react-ui` to 3.0.3, `lucide-react` to 1.40, `sass` to 1.104, `docusaurus-plugin-sass` to 0.2.7. diff --git a/.changeset/extend-sdk-group-merge.md b/.changeset/extend-sdk-group-merge.md deleted file mode 100644 index 67bb6b96f..000000000 --- a/.changeset/extend-sdk-group-merge.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -'@o2s/framework': minor ---- - -fix(framework): merge SDK method groups instead of replacing them - -`extendSdk` spread the groups it was given over the SDK, so naming a group that was already there dropped everything it held. The frontend application hits this today: it passes a `notifications` group of its own, which leaves `sdk.notifications` with that one method and without `getNotifications`, `getNotification` and `markAs`. The returned type never showed it, being an intersection of both sides, so the compiler kept promising methods that were no longer there at runtime. - -A group the SDK already has is now merged one level deep: the methods that were there stay, the new ones land next to them, and a method of the same name replaces the one below it. Anything that is not a group of methods, `makeRequest` for instance, is replaced as before. - -The return type says all of this now, instead of intersecting both sides and hoping they agree. `extendSdk` keeps the type of the SDK it extends rather than narrowing it to `Sdk`, so extending an already extended SDK no longer hides what the first extension added, and a method the extension replaces is typed as the replacement alone rather than as both signatures at once, which used to let a call written against the old signature compile against a value that no longer had it. The type itself is exported as `ExtendedSdk`. - -`getSdk` and `extendSdk` now say in their doc comments what they build and how the merge behaves. diff --git a/.changeset/filters-active-count-arrays.md b/.changeset/filters-active-count-arrays.md deleted file mode 100644 index a1c87f6e4..000000000 --- a/.changeset/filters-active-count-arrays.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@o2s/ui': patch ---- - -fix(ui): count multi-value list filters correctly in the filters drawer, so clearing every option no longer leaves the "remove filters" counter at one and equal selections are compared by contents instead of by reference diff --git a/.changeset/firm-mice.md b/.changeset/firm-mice.md deleted file mode 100644 index e547b2fa8..000000000 --- a/.changeset/firm-mice.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -'@o2s/blocks.invoice-list': patch -'@o2s/blocks.notification-list': patch -'@o2s/blocks.order-list': patch -'@o2s/blocks.orders-summary': patch -'@o2s/blocks.product-details': patch -'@o2s/blocks.product-list': patch -'@o2s/blocks.service-details': patch -'@o2s/blocks.ticket-details': patch -'@o2s/blocks.ticket-list': patch -'@o2s/blocks.ticket-recent': patch -'@o2s/integrations.contentful-cms': patch -'@o2s/modules.surveyjs': patch ---- - -chore(deps): update dependencies diff --git a/.changeset/firm-voles.md b/.changeset/firm-voles.md deleted file mode 100644 index a7538f72c..000000000 --- a/.changeset/firm-voles.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@o2s/integrations.medusajs': patch ---- - -chore(deps): update dependencies diff --git a/.changeset/hard-dogs.md b/.changeset/hard-dogs.md deleted file mode 100644 index cc64ff899..000000000 --- a/.changeset/hard-dogs.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -'@o2s/blocks.invoice-list': patch -'@o2s/blocks.notification-list': patch -'@o2s/blocks.order-list': patch -'@o2s/blocks.orders-summary': patch -'@o2s/blocks.product-details': patch -'@o2s/blocks.product-list': patch -'@o2s/blocks.service-details': patch -'@o2s/blocks.ticket-details': patch -'@o2s/blocks.ticket-list': patch -'@o2s/blocks.ticket-recent': patch -'@o2s/modules.surveyjs': patch ---- - -chore(deps): update dependencies diff --git a/.changeset/huge-pandas.md b/.changeset/huge-pandas.md deleted file mode 100644 index a7538f72c..000000000 --- a/.changeset/huge-pandas.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@o2s/integrations.medusajs': patch ---- - -chore(deps): update dependencies diff --git a/.changeset/list-blocks-ssr-filters.md b/.changeset/list-blocks-ssr-filters.md deleted file mode 100644 index 9a8069281..000000000 --- a/.changeset/list-blocks-ssr-filters.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -'@o2s/blocks.ticket-list': minor -'@o2s/blocks.order-list': minor -'@o2s/blocks.invoice-list': minor -'@o2s/blocks.notification-list': minor -'@o2s/ui': minor -'@o2s/integrations.mocked': patch -'@o2s/blocks.product-list': patch ---- - -feat(blocks): render list filters from the URL on the server - -Opening a filtered list link rendered the unfiltered list first and let the client replace it, so the page showed the wrong data until the second request landed. The ticket, order, invoice and notification lists now resolve the query params into their own query on the server, and each block query takes a 1-based `page` that the API turns into an `offset` with the page size from the CMS config. With the server rendering the filtered state, the client's refetch on mount is gone: a filtered link costs one request instead of two. - -The parsing lives in `@o2s/ui` as `parseFiltersFromSearchParams`, next to the hook that writes those params, so both ends of the URL contract stay in one place; the product list uses it too, and `searchParamsKey` keys each block on the params it was rendered for. Multi-value filters are named per block, because whether a filter accepts more than one value is part of the API contract: the tickets module takes repeated `status` values, the others take one value per filter. - -The mocked tickets integration now honours that array form, which its own contract documents ("use a single value or repeat the query parameter for multiple"): it compared the filter as a single string, so any multi-status selection returned nothing. diff --git a/.changeset/list-filters-reset-pagination.md b/.changeset/list-filters-reset-pagination.md deleted file mode 100644 index 3d62400bf..000000000 --- a/.changeset/list-filters-reset-pagination.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -'@o2s/blocks.ticket-list': patch -'@o2s/blocks.order-list': patch -'@o2s/blocks.invoice-list': patch -'@o2s/blocks.notification-list': patch -'@o2s/blocks.product-list': patch ---- - -fix(blocks): reset list block pagination when filters change, so filtering from page 2 or later no longer lands on a page of the new result set that the user never asked for (often an empty one) diff --git a/.changeset/list-filters-select-single-value.md b/.changeset/list-filters-select-single-value.md deleted file mode 100644 index e7b25313b..000000000 --- a/.changeset/list-filters-select-single-value.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@o2s/blocks.invoice-list': patch -'@o2s/blocks.notification-list': patch -'@o2s/blocks.ticket-list': patch -'@o2s/blocks.order-list': patch ---- - -fix(blocks): restore select filters from the URL as single values, so opening a shared link no longer hands an array to a single-value select and trips React's `` check. diff --git a/.changeset/shared-block-sdk.md b/.changeset/shared-block-sdk.md deleted file mode 100644 index 47134202f..000000000 --- a/.changeset/shared-block-sdk.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -'@o2s/framework': minor -'@o2s/utils.frontend': minor ---- - -feat(utils.frontend): add the shared SDK instance the blocks can build on - -Adds `getSharedSdk` to `@o2s/utils.frontend/sdk`: the API url resolution (internal while rendering on the server, the runtime public url in the browser) and the logger settings now live in one place, and the SDK behind them is built on first use and reused — per process on the server, per bundle in the browser. Each of the 42 blocks used to repeat that setup and end up with an `ofetch` client and a logger of its own; they are migrated onto the shared instance in the same release, each reduced to `extendSdk(sdk, (sdk))`. `extendSdk` copies the instance it extends, so what one block adds to it stays invisible to the others. - -To make that possible without an `@ts-expect-error` per environment variable, `@o2s/framework/sdk` now exports `toLoggerConfig` along with the `LoggerConfig`, `LogLevel` and `LogFormat` types. It turns raw environment values into a logger config and leaves out a level or a format the logger does not know, so a typo in `LOG_LEVEL` falls back to the default instead of reaching winston. diff --git a/.changeset/shared-block-state-keys.md b/.changeset/shared-block-state-keys.md deleted file mode 100644 index d04390f3d..000000000 --- a/.changeset/shared-block-state-keys.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -'@o2s/ui': patch -'@o2s/blocks.ticket-list': patch -'@o2s/blocks.order-list': patch -'@o2s/blocks.invoice-list': patch -'@o2s/blocks.notification-list': patch -'@o2s/blocks.product-list': patch ---- - -refactor(ui): one list of the keys that describe a block rather than a filter - -The same idea was written out three times, and the lists had drifted: the active-filter counter skipped `offset`, `limit` and `id`, the filter badges skipped those plus `viewMode`, and the URL serialisation skipped only `id` and `limit` while checking `offset` separately. - -`BLOCK_STATE_KEYS` in `use-url-filters.utils` is now the single list, and the other two are derived from it: `DEFAULT_EXCLUDED_KEYS` drops the offset, because it is not left out of the URL but written as the 1-based `page`, and the badges add the view toggle, which is a display choice rather than a filter. The difference that used to be an accident is now one `filter` call with the reason next to it. - -`parseFiltersFromSearchParams` is also generic over the block's query now, so it returns `Partial` and the five server components no longer cast its result. A query string carries no types, so the assertion happens once inside the helper instead of at every call site, and each call names the query it is building. diff --git a/.changeset/shared-list-filters-hook.md b/.changeset/shared-list-filters-hook.md deleted file mode 100644 index 607398258..000000000 --- a/.changeset/shared-list-filters-hook.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -'@o2s/utils.frontend': minor -'@o2s/blocks.ticket-list': patch -'@o2s/blocks.order-list': patch -'@o2s/blocks.invoice-list': patch -'@o2s/blocks.notification-list': patch -'@o2s/blocks.product-list': patch ---- - -refactor(utils.frontend): one hook for wiring a list block to the URL - -Each list block repeated the same forty lines around `useUrlFilters`, which is deliberately framework-agnostic and therefore takes its inputs from the caller: the params snapshot, the History API writer, and the multi-value keys, filter keys and starting view mode derived from the block's CMS filter config. - -`Hooks.useListFilters` does all of it, so a block passes its defaults, its namespace and its filter config. Only the two values that come from `next/navigation` stay with the block, which keeps this package free of a dependency on Next. A block with a namespace gets prefixed params; one without gets plain, linkable ones and its filter keys are derived, so the two conventions need no extra flag. diff --git a/.changeset/shared-pagination-resolver-utils.md b/.changeset/shared-pagination-resolver-utils.md deleted file mode 100644 index 84b678916..000000000 --- a/.changeset/shared-pagination-resolver-utils.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -'@o2s/utils.api-harmonization': minor -'@o2s/framework': minor -'@o2s/blocks.ticket-list': patch -'@o2s/blocks.order-list': patch -'@o2s/blocks.invoice-list': patch -'@o2s/blocks.notification-list': patch -'@o2s/blocks.product-list': patch ---- - -refactor(framework): one pagination resolver for the list blocks - -Every list block carried its own copy of the same two helpers, turning a query's `limit`, `offset` and `page` into the window to fetch. `Utils.Pagination.resolvePagination` in `@o2s/utils.api-harmonization` replaces all five: it takes the pagination a URL can carry (`Models.Pagination.PaginatedQuery`, structurally satisfied by any block query, so a block no longer types the helper with its own class) plus the page size to fall back on, and returns the `limit` and `offset` to use. The query shape stays a model in `@o2s/framework`, while the resolving lives with the other API-side helpers. - -`PaginatedQuery` is kept apart from `PaginationQuery`, which the domain modules extend: `page` is consumed by the block API and never reaches them, so advertising it in their contracts would promise integrations something they never receive. - -Two behaviours change with the move. A page size counts only as a whole number of rows above zero, so `?limit=-5` falls back to the CMS config instead of travelling on as a negative limit; the unit tests for the new helper are what surfaced it. - -And the fallback page size is no longer a single row. Four of the five blocks fell back to `limit: 1` when neither the query nor the CMS config named one. That fallback was inherited, and reachable, because `pagination` is optional in the CMS block models, so an entry without it rendered a one-row list. `Utils.Pagination.DEFAULT_LIMIT` (10) is the shared fallback now; the product list keeps its own 12, which matches its three-column grid. diff --git a/.changeset/short-humans.md b/.changeset/short-humans.md deleted file mode 100644 index cc64ff899..000000000 --- a/.changeset/short-humans.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -'@o2s/blocks.invoice-list': patch -'@o2s/blocks.notification-list': patch -'@o2s/blocks.order-list': patch -'@o2s/blocks.orders-summary': patch -'@o2s/blocks.product-details': patch -'@o2s/blocks.product-list': patch -'@o2s/blocks.service-details': patch -'@o2s/blocks.ticket-details': patch -'@o2s/blocks.ticket-list': patch -'@o2s/blocks.ticket-recent': patch -'@o2s/modules.surveyjs': patch ---- - -chore(deps): update dependencies diff --git a/.changeset/solid-deer.md b/.changeset/solid-deer.md deleted file mode 100644 index 2f8995231..000000000 --- a/.changeset/solid-deer.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -'@o2s/integrations.medusajs': patch -'@o2s/integrations.zendesk': patch ---- - -chore(deps): update dependencies diff --git a/.changeset/sour-koalas.md b/.changeset/sour-koalas.md deleted file mode 100644 index 58e8a5add..000000000 --- a/.changeset/sour-koalas.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@o2s/integrations.algolia': patch ---- - -chore(deps): update dependencies diff --git a/.changeset/strapi-live-preview.md b/.changeset/strapi-live-preview.md deleted file mode 100644 index ee019d6af..000000000 --- a/.changeset/strapi-live-preview.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@o2s/integrations.strapi-cms': minor ---- - -Add Strapi Live Preview with edit-in-place. Draft content is fetched over GraphQL (`status: DRAFT`) and Content Source Maps are encoded on the API Harmonization server after mapping, so editors can click text in the Strapi admin preview to edit it in place. Covers the FAQ, QuickLinks, TicketList, CategoryList and ArticleList blocks, and adds a per-block "Edit block" affordance plus a single-component preview route to handle the page-to-component document boundary. Requires Strapi Enterprise (version 5.12 or later). diff --git a/.changeset/surveyjs-shared-sdk.md b/.changeset/surveyjs-shared-sdk.md deleted file mode 100644 index 32fdd3294..000000000 --- a/.changeset/surveyjs-shared-sdk.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@o2s/modules.surveyjs': patch ---- - -refactor(modules.surveyjs): build the module SDK on the shared instance - -The SurveyJS module repeated the same SDK setup as the blocks — the API url resolution, the logger settings with an `@ts-expect-error` per environment variable and a method-by-method pick out of its own factory. It now extends the instance from `@o2s/utils.frontend/sdk` like they do, which also drops its undeclared import of `next-runtime-env`. diff --git a/.changeset/thin-kangaroos.md b/.changeset/thin-kangaroos.md deleted file mode 100644 index 766969901..000000000 --- a/.changeset/thin-kangaroos.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@o2s/blocks.invoice-list': patch ---- - -chore(deps): update dependencies diff --git a/.changeset/url-filters-batched-setters.md b/.changeset/url-filters-batched-setters.md deleted file mode 100644 index 8f61b9fe8..000000000 --- a/.changeset/url-filters-batched-setters.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@o2s/ui': patch ---- - -fix(ui): derive list filter URL writes from the next state, so a filter change and a view mode change applied in one batch no longer write the URL from each other's stale value diff --git a/.changeset/url-filters-live-params.md b/.changeset/url-filters-live-params.md deleted file mode 100644 index cb3468e81..000000000 --- a/.changeset/url-filters-live-params.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@o2s/ui': patch ---- - -fix(ui): merge list filter URL writes into the live query string, so a write queued before `useSearchParams` catches up (another block's filter change, or a debounced one) no longer drops the params written in between diff --git a/.changeset/url-filters-sync.md b/.changeset/url-filters-sync.md deleted file mode 100644 index a5e87b100..000000000 --- a/.changeset/url-filters-sync.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -'@o2s/ui': minor -'@o2s/blocks.ticket-list': minor -'@o2s/blocks.order-list': minor -'@o2s/blocks.invoice-list': minor -'@o2s/blocks.product-list': minor -'@o2s/blocks.notification-list': minor ---- - -feat(ui): bidirectional URL query params sync for list block filters - -List block filter state is now kept in the URL, so filtered views can be shared, bookmarked and linked -to from elsewhere in the application. - -New `useUrlFilters` hook (plus `use-url-filters.utils` serialization helpers) in `@o2s/ui`, replacing -`useState(initialFilters)` in the ticket, order, invoice, product and notification list blocks. -Params are namespaced per block (`?ticket_status=OPEN`), multi-value filters repeat the key, -pagination is written as a 1-based `{ns}_page`, view mode as `{ns}_view`, and only values differing -from the block defaults end up in the URL. Filter changes are written with the History API -(`replaceUrlParams`), so they add no history entries and trigger no navigation. The list refetches -its own data client-side instead of the whole route being re-rendered on the server. The hook takes -`searchParams` and `onUrlChange` as arguments instead of importing `next/navigation`, which keeps -`@o2s/ui` framework-agnostic. - -Blocks that do not use the hook are unaffected. diff --git a/.changeset/wide-raccoons.md b/.changeset/wide-raccoons.md deleted file mode 100644 index cc64ff899..000000000 --- a/.changeset/wide-raccoons.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -'@o2s/blocks.invoice-list': patch -'@o2s/blocks.notification-list': patch -'@o2s/blocks.order-list': patch -'@o2s/blocks.orders-summary': patch -'@o2s/blocks.product-details': patch -'@o2s/blocks.product-list': patch -'@o2s/blocks.service-details': patch -'@o2s/blocks.ticket-details': patch -'@o2s/blocks.ticket-list': patch -'@o2s/blocks.ticket-recent': patch -'@o2s/modules.surveyjs': patch ---- - -chore(deps): update dependencies diff --git a/apps/api-harmonization/CHANGELOG.md b/apps/api-harmonization/CHANGELOG.md index 1ecc4ec20..8f95723c8 100644 --- a/apps/api-harmonization/CHANGELOG.md +++ b/apps/api-harmonization/CHANGELOG.md @@ -1,5 +1,118 @@ # @o2s/api-harmonization +## 1.21.0 + +### Minor Changes + +- 010ae15: Refactored integration configuration by consolidating the 18 individual model files into a single typed `config.ts` backed by a `createIntegrationConfig` helper. Each domain now maps to an integration through a per-domain import alias shared by both the runtime map and its type re-export, so swapping an integration is a single-line change that cannot desync value and types. + + Integration `Config` objects are now declared with `satisfies Partial` (instead of a type annotation), which lets `createIntegrationConfig` validate domain bindings **at compile time** — assigning an integration to a domain it does not provide is now a type error rather than a runtime crash. The runtime check remains as a defense-in-depth backstop. + +### Patch Changes + +- 1a520c8: chore: dependency update pass + + Update dependencies across the monorepo. Highlights: NestJS 12 (Express 5), + TypeScript 6 for type-checking/lint with native TypeScript 7 compiling the + package builds, Vite 8, Docusaurus 3.10, Storybook 10.6, @medusajs 2.20, + redis 6, surveyjs (core + react-ui) 3, and assorted minor/patch bumps. No + public package API changed; peer ranges were bumped to match (notably + @nestjs/* to ^12). + +- dfc3fbb: Make non-core `ApiConfig` integration slots optional. Only `cms` and `auth` are required now; every other domain (tickets, orders, carts, checkout, payments, products, customers, invoices, billingAccounts, resources, organizations, users, notifications, articles, search, cache) can be omitted. + + When a domain is omitted, its framework module registers as a no-op instead of crashing, so a project can run a minimal setup (for example a CMS-backed portal) without importing `@o2s/integrations.mocked` to fill unused slots. `createIntegrationConfig` now accepts a partial map (core domains still required) and skips absent domains. A new `DefaultCacheService` is used as a pass-through fallback when no `cache` integration is configured (caching disabled, logged at startup), so services that depend on `Cache.Service` (e.g. the Strapi/Contentful CMS integrations) keep working. The `page` service treats `articles` as optional, and the SurveyJS module registers as a no-op when `tickets` is not configured. + + This also fixes a latent bug in the search module, which previously fell back to the abstract `SearchService` (which cannot be instantiated) when no search service was configured; it now registers as a no-op instead. + + Migration: this is backward compatible for the standard, module-based usage — existing configs that provide all domains keep working unchanged. Custom code that reads an integration slot directly (e.g. `config.integrations.orders.service`) may now need optional chaining, since non-core slots are typed as possibly `undefined`. + +- Updated dependencies [010ae15] +- Updated dependencies [f8591c1] +- Updated dependencies [270355f] +- Updated dependencies [cb50455] +- Updated dependencies [c8a58ad] +- Updated dependencies [681d153] +- Updated dependencies [457b243] +- Updated dependencies [3f1c980] +- Updated dependencies [1a520c8] +- Updated dependencies [02401b2] +- Updated dependencies [92c0bf8] +- Updated dependencies [c070aff] +- Updated dependencies [b7f8177] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [692ecf4] +- Updated dependencies [c4aa242] +- Updated dependencies [c4aa242] +- Updated dependencies [c8a58ad] +- Updated dependencies [cb50455] +- Updated dependencies [dfc3fbb] +- Updated dependencies [ee42afd] +- Updated dependencies [b775189] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [270355f] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [3f1c980] +- Updated dependencies [270355f] +- Updated dependencies [9683bb6] +- Updated dependencies [ee42afd] +- Updated dependencies [3f1c980] + - @o2s/configs.integrations@1.1.0 + - @o2s/framework@1.24.0 + - @o2s/integrations.mocked@2.1.0 + - @o2s/blocks.article@2.0.1 + - @o2s/blocks.article-search@2.0.1 + - @o2s/blocks.bento-grid@1.0.1 + - @o2s/blocks.cart@1.0.1 + - @o2s/blocks.category@2.0.1 + - @o2s/blocks.checkout-billing-payment@1.0.1 + - @o2s/blocks.checkout-company-data@1.0.1 + - @o2s/blocks.checkout-shipping-address@1.0.1 + - @o2s/blocks.checkout-summary@1.0.1 + - @o2s/blocks.cta-section@1.0.1 + - @o2s/blocks.document-list@1.0.1 + - @o2s/blocks.featured-service-list@2.0.1 + - @o2s/blocks.feature-section@1.0.1 + - @o2s/blocks.feature-section-grid@1.0.1 + - @o2s/blocks.hero-section@1.0.1 + - @o2s/blocks.invoice-list@2.1.0 + - @o2s/blocks.media-section@1.0.1 + - @o2s/blocks.notification-details@2.0.1 + - @o2s/blocks.notification-list@2.1.0 + - @o2s/blocks.notification-summary@2.0.1 + - @o2s/blocks.order-confirmation@1.0.1 + - @o2s/blocks.order-details@2.1.0 + - @o2s/blocks.order-list@2.1.0 + - @o2s/blocks.orders-summary@2.0.1 + - @o2s/blocks.payments-history@2.0.1 + - @o2s/blocks.payments-summary@2.0.1 + - @o2s/blocks.pricing-section@1.0.1 + - @o2s/blocks.product-details@1.0.1 + - @o2s/blocks.product-list@1.1.0 + - @o2s/blocks.recommended-products@1.0.1 + - @o2s/blocks.service-details@2.0.1 + - @o2s/blocks.service-list@2.0.1 + - @o2s/blocks.surveyjs-form@2.0.1 + - @o2s/blocks.ticket-details@2.0.1 + - @o2s/blocks.ticket-recent@2.0.1 + - @o2s/blocks.ticket-summary@2.0.1 + - @o2s/blocks.user-account@2.0.1 + - @o2s/blocks.article-list@2.0.1 + - @o2s/blocks.category-list@2.0.1 + - @o2s/blocks.faq@2.0.1 + - @o2s/blocks.quick-links@2.0.1 + - @o2s/blocks.ticket-list@2.1.0 + - @o2s/modules.surveyjs@1.1.0 + - @o2s/telemetry@1.2.3 + - @o2s/utils.api-harmonization@1.1.0 + - @o2s/utils.frontend@1.1.0 + - @o2s/utils.logger@1.2.4 + ## 1.20.0 ### Minor Changes diff --git a/apps/api-harmonization/package.json b/apps/api-harmonization/package.json index 69858b5b0..a1b7b5c17 100644 --- a/apps/api-harmonization/package.json +++ b/apps/api-harmonization/package.json @@ -1,6 +1,6 @@ { "name": "@o2s/api-harmonization", - "version": "1.20.0", + "version": "1.21.0", "description": "", "author": "", "private": true, diff --git a/packages/blocks/account/user-account/CHANGELOG.md b/packages/blocks/account/user-account/CHANGELOG.md index 2690d73aa..7dee5a47f 100644 --- a/packages/blocks/account/user-account/CHANGELOG.md +++ b/packages/blocks/account/user-account/CHANGELOG.md @@ -1,16 +1,83 @@ # @o2s/blocks.user-account +## 2.0.1 + +### Patch Changes + +- f8591c1: Threaded the CMS `preview` flag through every block so draft content actually renders in draft + mode. Previously only 5 of ~42 blocks passed it - the rest always fetched published content, so CMS + live preview (and any draft-mode view) showed stale data for most of the page. + + Per block, the flag now survives all four hops: the renderer forwards `isDraftModeEnabled` (added + to the framework's `BaseBlockProps` - `renderBlocks` already passed it to every block), the server + component sends `preview` on its block fetch, the request DTO declares it, and the API + Harmonization service forwards it to `CmsService.getBlockConfig`. + +- 270355f: refactor(blocks): build the block SDKs on the shared instance + + Every block built an SDK of its own out of the same 15 lines: the API url resolution, the logger settings with an `@ts-expect-error` per environment variable, and a method-by-method pick out of its own factory. They now take the instance from `@o2s/utils.frontend/sdk` and extend it with everything their factory returns, which leaves one `ofetch` client and one logger for all of them instead of 42, and drops the undeclared dependency on `next-runtime-env` that every block relied on. + + `order-details` gains `sdk.blocks.getOrderPdf`: its factory has always defined the method, and only the method-by-method pick left it out. + +- cb50455: chore(deps): update dependencies +- 681d153: chore(deps): update dependencies +- 457b243: feat(framework): add `createBlockRequest` helper for block SDK methods + + Adds `createBlockRequest` to `@o2s/framework/sdk`. It creates the request function used by the methods of a block (or module) SDK and takes care of the boilerplate that was previously copy-pasted into every method: merging the default API headers with the caller's headers and the access token, serializing query params, typing the response and wrapping failures into a `BlockRequestError` (which exposes `status`, `data` and the original error as `cause`). + + `getApiHeaders` is now provided by `@o2s/framework/headers` and re-exported by `@o2s/utils.frontend` (`Utils.Headers.getApiHeaders`), so the default headers are defined in a single place. All block SDKs, the SurveyJS module SDK and the block generator template use the new helper. + +- 1a520c8: chore: dependency update pass + + Update dependencies across the monorepo. Highlights: NestJS 12 (Express 5), + TypeScript 6 for type-checking/lint with native TypeScript 7 compiling the + package builds, Vite 8, Docusaurus 3.10, Storybook 10.6, @medusajs 2.20, + redis 6, surveyjs (core + react-ui) 3, and assorted minor/patch bumps. No + public package API changed; peer ranges were bumped to match (notably + @nestjs/* to ^12). + +- cb50455: chore(deps): update dependencies +- Updated dependencies [010ae15] +- Updated dependencies [f8591c1] +- Updated dependencies [cb50455] +- Updated dependencies [c8a58ad] +- Updated dependencies [681d153] +- Updated dependencies [457b243] +- Updated dependencies [1a520c8] +- Updated dependencies [02401b2] +- Updated dependencies [92c0bf8] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [cb50455] +- Updated dependencies [dfc3fbb] +- Updated dependencies [b775189] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [270355f] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] + - @o2s/configs.integrations@1.1.0 + - @o2s/framework@1.24.0 + - @o2s/utils.api-harmonization@1.1.0 + - @o2s/utils.frontend@1.1.0 + - @o2s/utils.logger@1.2.4 + - @o2s/ui@2.1.0 + ## 2.0.0 ### Patch Changes - Updated dependencies [86b4c5a] - Updated dependencies [24fb9a9] - - @o2s/framework@1.23.0 - - @o2s/ui@2.0.0 - - @o2s/configs.integrations@1.0.0 - - @o2s/utils.api-harmonization@1.0.0 - - @o2s/utils.frontend@1.0.0 + - @o2s/framework@1.23.0 + - @o2s/ui@2.0.0 + - @o2s/configs.integrations@1.0.0 + - @o2s/utils.api-harmonization@1.0.0 + - @o2s/utils.frontend@1.0.0 ## 1.6.3 @@ -24,7 +91,7 @@ - 025bfb3: fix(deps): declare `@o2s/utils.frontend` and `@o2s/utils.api-harmonization` as peer dependencies in blocks and surveyjs module - Moves both shared utils from `dependencies` to `peerDependencies` (with `devDependencies` for monorepo builds) so consuming apps supply a single hoisted version and npm does not nest conflicting copies under published packages. + Moves both shared utils from `dependencies` to `peerDependencies` (with `devDependencies` for monorepo builds) so consuming apps supply a single hoisted version and npm does not nest conflicting copies under published packages. ## 1.6.1 @@ -32,13 +99,13 @@ - 31df3a8: fix(deps): move @o2s/framework to peerDependencies in all published packages - `@o2s/framework` was listed in `dependencies` of blocks, integrations, modules, and utils packages. When installed from npm with mismatched versions across the dependency tree, npm would create nested copies of `@o2s/framework` with different class references. This caused NestJS to fail resolving DI tokens (e.g. `SearchService`) because injected class instances came from a different `@o2s/framework` copy than the one registered in the application module. + `@o2s/framework` was listed in `dependencies` of blocks, integrations, modules, and utils packages. When installed from npm with mismatched versions across the dependency tree, npm would create nested copies of `@o2s/framework` with different class references. This caused NestJS to fail resolving DI tokens (e.g. `SearchService`) because injected class instances came from a different `@o2s/framework` copy than the one registered in the application module. - Moved `@o2s/framework` to `peerDependencies` across all affected packages so that the consuming application always provides a single shared copy. Also moved `@o2s/integrations.mocked` to `peerDependencies` in `@o2s/integrations.mocked-dxp`. + Moved `@o2s/framework` to `peerDependencies` across all affected packages so that the consuming application always provides a single shared copy. Also moved `@o2s/integrations.mocked` to `peerDependencies` in `@o2s/integrations.mocked-dxp`. - Updated dependencies [31df3a8] - - @o2s/utils.api-harmonization@0.3.4 - - @o2s/utils.frontend@0.6.1 + - @o2s/utils.api-harmonization@0.3.4 + - @o2s/utils.frontend@0.6.1 ## 1.6.0 @@ -51,7 +118,7 @@ - Updated dependencies [7d99d13] - Updated dependencies [7d99d13] - Updated dependencies [6edc9ca] - - @o2s/framework@1.22.0 + - @o2s/framework@1.22.0 ## 1.5.1 @@ -59,24 +126,24 @@ - 0aaac5b: fix: add missing dependency declarations for turbo boundaries compliance - Declare previously undeclared imports as explicit dependencies across 55 packages. This resolves all `turbo boundaries` violations where packages imported modules not listed in their `package.json`. + Declare previously undeclared imports as explicit dependencies across 55 packages. This resolves all `turbo boundaries` violations where packages imported modules not listed in their `package.json`. - Key dependency categories added: - - `@storybook/nextjs-vite`, `@storybook/react`, `storybook` for story files - - `vitest`, `@nestjs/testing`, `@o2s/vitest-config` for test files - - `lucide-react`, `dayjs`, `string-template`, `class-variance-authority` for runtime code - - `vite` for vitest configs in integrations - - `@o2s/api-harmonization`, `@auth/core`, `@docusaurus/*` for app-level imports + Key dependency categories added: + - `@storybook/nextjs-vite`, `@storybook/react`, `storybook` for story files + - `vitest`, `@nestjs/testing`, `@o2s/vitest-config` for test files + - `lucide-react`, `dayjs`, `string-template`, `class-variance-authority` for runtime code + - `vite` for vitest configs in integrations + - `@o2s/api-harmonization`, `@auth/core`, `@docusaurus/*` for app-level imports - Updated dependencies [e8cdde6] - Updated dependencies [0aaac5b] - Updated dependencies [0aaac5b] - Updated dependencies [7ac16b0] - Updated dependencies [0aaac5b] - - @o2s/ui@1.14.0 - - @o2s/utils.frontend@0.5.2 - - @o2s/configs.integrations@0.7.0 - - @o2s/framework@1.21.0 + - @o2s/ui@1.14.0 + - @o2s/utils.frontend@0.5.2 + - @o2s/configs.integrations@0.7.0 + - @o2s/framework@1.21.0 ## 1.5.0 @@ -96,7 +163,7 @@ - fab2aea: refactor: group Storybook stories by domain and rename UI component directories to PascalCase - Updated dependencies [a7bb35c] - Updated dependencies [fab2aea] - - @o2s/ui@1.13.1 + - @o2s/ui@1.13.1 ## 1.4.2 @@ -104,23 +171,23 @@ - fadbc63: Extract shared block prop types into framework models and migrate block frontend props to the common `BlockWith*` helpers. - This removes duplicated `slug`, `userId`, and `isDraftModeEnabled` definitions and keeps renderer props aligned across blocks. + This removes duplicated `slug`, `userId`, and `isDraftModeEnabled` definitions and keeps renderer props aligned across blocks. - fadbc63: Align renderer prop types with runtime usage across blocks. - Restore missing `isDraftModeEnabled` and `userId` coverage in renderer prop contracts and rename the misnamed notification details renderer prop type for consistency. + Restore missing `isDraftModeEnabled` and `userId` coverage in renderer prop contracts and rename the misnamed notification details renderer prop type for consistency. - 338cb01: fix(api-harmonization): align typed header usage across services and generated SDK/controller contracts - 338cb01: Refactor header access to use `HeaderName` constants instead of literal header keys across framework controllers, block harmonization services, and mocked auth guards. - This unifies header handling, reduces string-key typos, and aligns modules with the typed headers approach exposed by `@o2s/framework/headers`. + This unifies header handling, reduces string-key typos, and aligns modules with the typed headers approach exposed by `@o2s/framework/headers`. - Updated dependencies [fadbc63] - Updated dependencies [338cb01] - Updated dependencies [338cb01] - Updated dependencies [338cb01] - - @o2s/framework@1.20.1 - - @o2s/utils.api-harmonization@0.3.3 + - @o2s/framework@1.20.1 + - @o2s/utils.api-harmonization@0.3.3 ## 1.4.1 @@ -133,11 +200,11 @@ - Updated dependencies [daf592e] - Updated dependencies [375cd90] - Updated dependencies [98b2e68] - - @o2s/framework@1.20.0 - - @o2s/utils.api-harmonization@0.3.2 - - @o2s/utils.frontend@0.5.1 - - @o2s/utils.logger@1.2.3 - - @o2s/ui@1.13.0 + - @o2s/framework@1.20.0 + - @o2s/utils.api-harmonization@0.3.2 + - @o2s/utils.frontend@0.5.1 + - @o2s/utils.logger@1.2.3 + - @o2s/ui@1.13.0 ## 1.4.0 @@ -164,12 +231,12 @@ - Updated dependencies [8c01be4] - Updated dependencies [ea200fc] - Updated dependencies [cc2e932] - - @o2s/framework@1.18.0 - - @o2s/utils.api-harmonization@0.3.1 - - @o2s/utils.frontend@0.4.1 - - @o2s/utils.logger@1.2.2 - - @o2s/configs.integrations@0.6.0 - - @o2s/ui@1.11.0 + - @o2s/framework@1.18.0 + - @o2s/utils.api-harmonization@0.3.1 + - @o2s/utils.frontend@0.4.1 + - @o2s/utils.logger@1.2.2 + - @o2s/configs.integrations@0.6.0 + - @o2s/ui@1.11.0 ## 1.3.0 @@ -177,29 +244,29 @@ - 72391c1: ### Authorization & PBAC Implementation - This release introduces a comprehensive Policy-Based Access Control system interlaced with Role-Based Access Control. + This release introduces a comprehensive Policy-Based Access Control system interlaced with Role-Based Access Control. - #### Framework & Core - - **`@o2s/framework` (AuthService)**: Enhanced with abstract permission logic (`getPermissions`, `hasPermission`), role checks (`hasRole`, `requireRoles`), and action batching (`canPerformActions`). - - **`@o2s/api-harmonization`**: Implemented global `RolesGuard` and `PermissionsGuard` in `AppModule`. - - **`@o2s/utils.api-harmonization`**: Added `extractUserRolesFromJwt` to unify role extraction from different JWT claims. + #### Framework & Core + - **`@o2s/framework` (AuthService)**: Enhanced with abstract permission logic (`getPermissions`, `hasPermission`), role checks (`hasRole`, `requireRoles`), and action batching (`canPerformActions`). + - **`@o2s/api-harmonization`**: Implemented global `RolesGuard` and `PermissionsGuard` in `AppModule`. + - **`@o2s/utils.api-harmonization`**: Added `extractUserRolesFromJwt` to unify role extraction from different JWT claims. - #### Features - - **Decorators**: New `@Auth.Decorators.Permissions({ resource, actions })` for securing controllers. - - **Data Filtering**: Mappers (e.g., `page.mapper.ts`) now filter UI elements (header/footer navigation) based on user roles. + #### Features + - **Decorators**: New `@Auth.Decorators.Permissions({ resource, actions })` for securing controllers. + - **Data Filtering**: Mappers (e.g., `page.mapper.ts`) now filter UI elements (header/footer navigation) based on user roles. - This provides granular control over resource access and UI visibility based on user roles and permissions. + This provides granular control over resource access and UI visibility based on user roles and permissions. ### Patch Changes - Updated dependencies [1a5a22d] - Updated dependencies [72391c1] - - @o2s/framework@1.16.0 - - @o2s/utils.api-harmonization@0.3.0 - - @o2s/configs.integrations@0.4.0 - - @o2s/ui@1.9.0 - - @o2s/utils.frontend@0.4.0 - - @o2s/utils.logger@1.2.0 + - @o2s/framework@1.16.0 + - @o2s/utils.api-harmonization@0.3.0 + - @o2s/configs.integrations@0.4.0 + - @o2s/ui@1.9.0 + - @o2s/utils.frontend@0.4.0 + - @o2s/utils.logger@1.2.0 ## 1.2.0 @@ -219,11 +286,11 @@ - Updated dependencies [d197b89] - Updated dependencies [cd483b7] - Updated dependencies [d197b89] - - @o2s/ui@1.8.0 - - @o2s/utils.api-harmonization@0.2.0 - - @o2s/configs.integrations@0.3.0 - - @o2s/utils.frontend@0.3.0 - - @o2s/framework@1.15.0 + - @o2s/ui@1.8.0 + - @o2s/utils.api-harmonization@0.2.0 + - @o2s/configs.integrations@0.3.0 + - @o2s/utils.frontend@0.3.0 + - @o2s/framework@1.15.0 ## 1.1.2 @@ -233,12 +300,12 @@ - Updated dependencies [221dc2c] - Updated dependencies [db5b381] - Updated dependencies [c2d9438] - - @o2s/utils.api-harmonization@0.1.3 - - @o2s/configs.integrations@0.2.1 - - @o2s/utils.frontend@0.2.1 - - @o2s/utils.logger@1.1.3 - - @o2s/ui@1.7.0 - - @o2s/framework@1.14.0 + - @o2s/utils.api-harmonization@0.1.3 + - @o2s/configs.integrations@0.2.1 + - @o2s/utils.frontend@0.2.1 + - @o2s/utils.logger@1.1.3 + - @o2s/ui@1.7.0 + - @o2s/framework@1.14.0 ## 1.1.1 @@ -251,12 +318,12 @@ - Updated dependencies [2c780d5] - Updated dependencies [0354126] - Updated dependencies [1653b74] - - @o2s/framework@1.13.0 - - @o2s/configs.integrations@0.2.0 - - @o2s/ui@1.6.0 - - @o2s/utils.frontend@0.2.0 - - @o2s/utils.api-harmonization@0.1.2 - - @o2s/utils.logger@1.1.2 + - @o2s/framework@1.13.0 + - @o2s/configs.integrations@0.2.0 + - @o2s/ui@1.6.0 + - @o2s/utils.frontend@0.2.0 + - @o2s/utils.api-harmonization@0.1.2 + - @o2s/utils.logger@1.1.2 ## 1.1.0 @@ -269,7 +336,7 @@ - Updated dependencies [9ad8658] - Updated dependencies [9ad8658] - - @o2s/ui@1.4.0 + - @o2s/ui@1.4.0 ## 1.0.0 @@ -280,8 +347,8 @@ ### Patch Changes - Updated dependencies [2421fb2] - - @o2s/utils.api-harmonization@0.1.0 - - @o2s/configs.integrations@0.1.0 - - @o2s/utils.frontend@0.1.0 - - @o2s/framework@1.11.0 - - @o2s/ui@1.3.0 + - @o2s/utils.api-harmonization@0.1.0 + - @o2s/configs.integrations@0.1.0 + - @o2s/utils.frontend@0.1.0 + - @o2s/framework@1.11.0 + - @o2s/ui@1.3.0 diff --git a/packages/blocks/account/user-account/package.json b/packages/blocks/account/user-account/package.json index cda3487b6..47616bf4e 100644 --- a/packages/blocks/account/user-account/package.json +++ b/packages/blocks/account/user-account/package.json @@ -1,6 +1,6 @@ { "name": "@o2s/blocks.user-account", - "version": "2.0.0", + "version": "2.0.1", "private": false, "license": "MIT", "description": "A block displaying and managing user account information.", diff --git a/packages/blocks/billing/invoice-list/CHANGELOG.md b/packages/blocks/billing/invoice-list/CHANGELOG.md index 4aca10ee8..44274516c 100644 --- a/packages/blocks/billing/invoice-list/CHANGELOG.md +++ b/packages/blocks/billing/invoice-list/CHANGELOG.md @@ -1,16 +1,143 @@ # @o2s/blocks.invoice-list +## 2.1.0 + +### Minor Changes + +- ee42afd: feat(blocks): render list filters from the URL on the server + + Opening a filtered list link rendered the unfiltered list first and let the client replace it, so the page showed the wrong data until the second request landed. The ticket, order, invoice and notification lists now resolve the query params into their own query on the server, and each block query takes a 1-based `page` that the API turns into an `offset` with the page size from the CMS config. With the server rendering the filtered state, the client's refetch on mount is gone: a filtered link costs one request instead of two. + + The parsing lives in `@o2s/ui` as `parseFiltersFromSearchParams`, next to the hook that writes those params, so both ends of the URL contract stay in one place; the product list uses it too, and `searchParamsKey` keys each block on the params it was rendered for. Multi-value filters are named per block, because whether a filter accepts more than one value is part of the API contract: the tickets module takes repeated `status` values, the others take one value per filter. + + The mocked tickets integration now honours that array form, which its own contract documents ("use a single value or repeat the query parameter for multiple"): it compared the filter as a single string, so any multi-status selection returned nothing. + +- ee42afd: feat(ui): bidirectional URL query params sync for list block filters + + List block filter state is now kept in the URL, so filtered views can be shared, bookmarked and linked + to from elsewhere in the application. + + New `useUrlFilters` hook (plus `use-url-filters.utils` serialization helpers) in `@o2s/ui`, replacing + `useState(initialFilters)` in the ticket, order, invoice, product and notification list blocks. + Params are namespaced per block (`?ticket_status=OPEN`), multi-value filters repeat the key, + pagination is written as a 1-based `{ns}_page`, view mode as `{ns}_view`, and only values differing + from the block defaults end up in the URL. Filter changes are written with the History API + (`replaceUrlParams`), so they add no history entries and trigger no navigation. The list refetches + its own data client-side instead of the whole route being re-rendered on the server. The hook takes + `searchParams` and `onUrlChange` as arguments instead of importing `next/navigation`, which keeps + `@o2s/ui` framework-agnostic. + + Blocks that do not use the hook are unaffected. + +### Patch Changes + +- f8591c1: Threaded the CMS `preview` flag through every block so draft content actually renders in draft + mode. Previously only 5 of ~42 blocks passed it - the rest always fetched published content, so CMS + live preview (and any draft-mode view) showed stale data for most of the page. + + Per block, the flag now survives all four hops: the renderer forwards `isDraftModeEnabled` (added + to the framework's `BaseBlockProps` - `renderBlocks` already passed it to every block), the server + component sends `preview` on its block fetch, the request DTO declares it, and the API + Harmonization service forwards it to `CmsService.getBlockConfig`. + +- 270355f: refactor(blocks): build the block SDKs on the shared instance + + Every block built an SDK of its own out of the same 15 lines: the API url resolution, the logger settings with an `@ts-expect-error` per environment variable, and a method-by-method pick out of its own factory. They now take the instance from `@o2s/utils.frontend/sdk` and extend it with everything their factory returns, which leaves one `ofetch` client and one logger for all of them instead of 42, and drops the undeclared dependency on `next-runtime-env` that every block relied on. + + `order-details` gains `sdk.blocks.getOrderPdf`: its factory has always defined the method, and only the method-by-method pick left it out. + +- cb50455: chore(deps): update dependencies +- 681d153: chore(deps): update dependencies +- 457b243: feat(framework): add `createBlockRequest` helper for block SDK methods + + Adds `createBlockRequest` to `@o2s/framework/sdk`. It creates the request function used by the methods of a block (or module) SDK and takes care of the boilerplate that was previously copy-pasted into every method: merging the default API headers with the caller's headers and the access token, serializing query params, typing the response and wrapping failures into a `BlockRequestError` (which exposes `status`, `data` and the original error as `cause`). + + `getApiHeaders` is now provided by `@o2s/framework/headers` and re-exported by `@o2s/utils.frontend` (`Utils.Headers.getApiHeaders`), so the default headers are defined in a single place. All block SDKs, the SurveyJS module SDK and the block generator template use the new helper. + +- 3f1c980: chore(deps): update dependencies +- 1a520c8: chore: dependency update pass + + Update dependencies across the monorepo. Highlights: NestJS 12 (Express 5), + TypeScript 6 for type-checking/lint with native TypeScript 7 compiling the + package builds, Vite 8, Docusaurus 3.10, Storybook 10.6, @medusajs 2.20, + redis 6, surveyjs (core + react-ui) 3, and assorted minor/patch bumps. No + public package API changed; peer ranges were bumped to match (notably + @nestjs/* to ^12). + +- 02401b2: Routine dependency maintenance (patch/minor, no code changes): `@medusajs/js-sdk` & `@medusajs/types` to 2.20.1, `survey-core` & `survey-react-ui` to 3.0.3, `lucide-react` to 1.40, `sass` to 1.104, `docusaurus-plugin-sass` to 0.2.7. +- c070aff: chore(deps): update dependencies +- b7f8177: chore(deps): update dependencies +- ee42afd: fix(blocks): reset list block pagination when filters change, so filtering from page 2 or later no longer lands on a page of the new result set that the user never asked for (often an empty one) +- ee42afd: fix(blocks): restore select filters from the URL as single values, so opening a shared link no longer hands an array to a single-value select and trips React's `` check. + +- Updated dependencies [010ae15] +- Updated dependencies [f8591c1] +- Updated dependencies [cb50455] +- Updated dependencies [c8a58ad] +- Updated dependencies [681d153] +- Updated dependencies [457b243] +- Updated dependencies [1a520c8] +- Updated dependencies [02401b2] +- Updated dependencies [92c0bf8] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [cb50455] +- Updated dependencies [dfc3fbb] +- Updated dependencies [b775189] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [270355f] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] + - @o2s/configs.integrations@1.1.0 + - @o2s/framework@1.24.0 + - @o2s/utils.api-harmonization@1.1.0 + - @o2s/utils.frontend@1.1.0 + - @o2s/utils.logger@1.2.4 + - @o2s/ui@2.1.0 + ## 2.0.0 ### Patch Changes - Updated dependencies [86b4c5a] - Updated dependencies [24fb9a9] - - @o2s/framework@1.23.0 - - @o2s/ui@2.0.0 - - @o2s/configs.integrations@1.0.0 - - @o2s/utils.api-harmonization@1.0.0 - - @o2s/utils.frontend@1.0.0 + - @o2s/framework@1.23.0 + - @o2s/ui@2.0.0 + - @o2s/configs.integrations@1.0.0 + - @o2s/utils.api-harmonization@1.0.0 + - @o2s/utils.frontend@1.0.0 ## 1.8.3 @@ -24,7 +113,7 @@ - 025bfb3: fix(deps): declare `@o2s/utils.frontend` and `@o2s/utils.api-harmonization` as peer dependencies in blocks and surveyjs module - Moves both shared utils from `dependencies` to `peerDependencies` (with `devDependencies` for monorepo builds) so consuming apps supply a single hoisted version and npm does not nest conflicting copies under published packages. + Moves both shared utils from `dependencies` to `peerDependencies` (with `devDependencies` for monorepo builds) so consuming apps supply a single hoisted version and npm does not nest conflicting copies under published packages. ## 1.8.1 @@ -32,13 +121,13 @@ - 31df3a8: fix(deps): move @o2s/framework to peerDependencies in all published packages - `@o2s/framework` was listed in `dependencies` of blocks, integrations, modules, and utils packages. When installed from npm with mismatched versions across the dependency tree, npm would create nested copies of `@o2s/framework` with different class references. This caused NestJS to fail resolving DI tokens (e.g. `SearchService`) because injected class instances came from a different `@o2s/framework` copy than the one registered in the application module. + `@o2s/framework` was listed in `dependencies` of blocks, integrations, modules, and utils packages. When installed from npm with mismatched versions across the dependency tree, npm would create nested copies of `@o2s/framework` with different class references. This caused NestJS to fail resolving DI tokens (e.g. `SearchService`) because injected class instances came from a different `@o2s/framework` copy than the one registered in the application module. - Moved `@o2s/framework` to `peerDependencies` across all affected packages so that the consuming application always provides a single shared copy. Also moved `@o2s/integrations.mocked` to `peerDependencies` in `@o2s/integrations.mocked-dxp`. + Moved `@o2s/framework` to `peerDependencies` across all affected packages so that the consuming application always provides a single shared copy. Also moved `@o2s/integrations.mocked` to `peerDependencies` in `@o2s/integrations.mocked-dxp`. - Updated dependencies [31df3a8] - - @o2s/utils.api-harmonization@0.3.4 - - @o2s/utils.frontend@0.6.1 + - @o2s/utils.api-harmonization@0.3.4 + - @o2s/utils.frontend@0.6.1 ## 1.8.0 @@ -51,7 +140,7 @@ - Updated dependencies [7d99d13] - Updated dependencies [7d99d13] - Updated dependencies [6edc9ca] - - @o2s/framework@1.22.0 + - @o2s/framework@1.22.0 ## 1.7.1 @@ -59,24 +148,24 @@ - 0aaac5b: fix: add missing dependency declarations for turbo boundaries compliance - Declare previously undeclared imports as explicit dependencies across 55 packages. This resolves all `turbo boundaries` violations where packages imported modules not listed in their `package.json`. + Declare previously undeclared imports as explicit dependencies across 55 packages. This resolves all `turbo boundaries` violations where packages imported modules not listed in their `package.json`. - Key dependency categories added: - - `@storybook/nextjs-vite`, `@storybook/react`, `storybook` for story files - - `vitest`, `@nestjs/testing`, `@o2s/vitest-config` for test files - - `lucide-react`, `dayjs`, `string-template`, `class-variance-authority` for runtime code - - `vite` for vitest configs in integrations - - `@o2s/api-harmonization`, `@auth/core`, `@docusaurus/*` for app-level imports + Key dependency categories added: + - `@storybook/nextjs-vite`, `@storybook/react`, `storybook` for story files + - `vitest`, `@nestjs/testing`, `@o2s/vitest-config` for test files + - `lucide-react`, `dayjs`, `string-template`, `class-variance-authority` for runtime code + - `vite` for vitest configs in integrations + - `@o2s/api-harmonization`, `@auth/core`, `@docusaurus/*` for app-level imports - Updated dependencies [e8cdde6] - Updated dependencies [0aaac5b] - Updated dependencies [0aaac5b] - Updated dependencies [7ac16b0] - Updated dependencies [0aaac5b] - - @o2s/ui@1.14.0 - - @o2s/utils.frontend@0.5.2 - - @o2s/configs.integrations@0.7.0 - - @o2s/framework@1.21.0 + - @o2s/ui@1.14.0 + - @o2s/utils.frontend@0.5.2 + - @o2s/configs.integrations@0.7.0 + - @o2s/framework@1.21.0 ## 1.7.0 @@ -92,7 +181,7 @@ - fab2aea: refactor: group Storybook stories by domain and rename UI component directories to PascalCase - Updated dependencies [a7bb35c] - Updated dependencies [fab2aea] - - @o2s/ui@1.13.1 + - @o2s/ui@1.13.1 ## 1.6.2 @@ -100,19 +189,19 @@ - fadbc63: Extract shared block prop types into framework models and migrate block frontend props to the common `BlockWith*` helpers. - This removes duplicated `slug`, `userId`, and `isDraftModeEnabled` definitions and keeps renderer props aligned across blocks. + This removes duplicated `slug`, `userId`, and `isDraftModeEnabled` definitions and keeps renderer props aligned across blocks. - 338cb01: fix(api-harmonization): align typed header usage across services and generated SDK/controller contracts - 338cb01: Refactor header access to use `HeaderName` constants instead of literal header keys across framework controllers, block harmonization services, and mocked auth guards. - This unifies header handling, reduces string-key typos, and aligns modules with the typed headers approach exposed by `@o2s/framework/headers`. + This unifies header handling, reduces string-key typos, and aligns modules with the typed headers approach exposed by `@o2s/framework/headers`. - Updated dependencies [fadbc63] - Updated dependencies [338cb01] - Updated dependencies [338cb01] - Updated dependencies [338cb01] - - @o2s/framework@1.20.1 - - @o2s/utils.api-harmonization@0.3.3 + - @o2s/framework@1.20.1 + - @o2s/utils.api-harmonization@0.3.3 ## 1.6.1 @@ -125,11 +214,11 @@ - Updated dependencies [daf592e] - Updated dependencies [375cd90] - Updated dependencies [98b2e68] - - @o2s/framework@1.20.0 - - @o2s/utils.api-harmonization@0.3.2 - - @o2s/utils.frontend@0.5.1 - - @o2s/utils.logger@1.2.3 - - @o2s/ui@1.13.0 + - @o2s/framework@1.20.0 + - @o2s/utils.api-harmonization@0.3.2 + - @o2s/utils.frontend@0.5.1 + - @o2s/utils.logger@1.2.3 + - @o2s/ui@1.13.0 ## 1.6.0 @@ -156,12 +245,12 @@ - Updated dependencies [8c01be4] - Updated dependencies [ea200fc] - Updated dependencies [cc2e932] - - @o2s/framework@1.18.0 - - @o2s/utils.api-harmonization@0.3.1 - - @o2s/utils.frontend@0.4.1 - - @o2s/utils.logger@1.2.2 - - @o2s/configs.integrations@0.6.0 - - @o2s/ui@1.11.0 + - @o2s/framework@1.18.0 + - @o2s/utils.api-harmonization@0.3.1 + - @o2s/utils.frontend@0.4.1 + - @o2s/utils.logger@1.2.2 + - @o2s/configs.integrations@0.6.0 + - @o2s/ui@1.11.0 ## 1.5.0 @@ -179,10 +268,10 @@ - Updated dependencies [002ff11] - Updated dependencies [78ea1f7] - Updated dependencies [241ab52] - - @o2s/utils.logger@1.2.1 - - @o2s/framework@1.17.0 - - @o2s/configs.integrations@0.5.0 - - @o2s/ui@1.10.0 + - @o2s/utils.logger@1.2.1 + - @o2s/framework@1.17.0 + - @o2s/configs.integrations@0.5.0 + - @o2s/ui@1.10.0 ## 1.4.0 @@ -190,29 +279,29 @@ - 72391c1: ### Authorization & PBAC Implementation - This release introduces a comprehensive Policy-Based Access Control system interlaced with Role-Based Access Control. + This release introduces a comprehensive Policy-Based Access Control system interlaced with Role-Based Access Control. - #### Framework & Core - - **`@o2s/framework` (AuthService)**: Enhanced with abstract permission logic (`getPermissions`, `hasPermission`), role checks (`hasRole`, `requireRoles`), and action batching (`canPerformActions`). - - **`@o2s/api-harmonization`**: Implemented global `RolesGuard` and `PermissionsGuard` in `AppModule`. - - **`@o2s/utils.api-harmonization`**: Added `extractUserRolesFromJwt` to unify role extraction from different JWT claims. + #### Framework & Core + - **`@o2s/framework` (AuthService)**: Enhanced with abstract permission logic (`getPermissions`, `hasPermission`), role checks (`hasRole`, `requireRoles`), and action batching (`canPerformActions`). + - **`@o2s/api-harmonization`**: Implemented global `RolesGuard` and `PermissionsGuard` in `AppModule`. + - **`@o2s/utils.api-harmonization`**: Added `extractUserRolesFromJwt` to unify role extraction from different JWT claims. - #### Features - - **Decorators**: New `@Auth.Decorators.Permissions({ resource, actions })` for securing controllers. - - **Data Filtering**: Mappers (e.g., `page.mapper.ts`) now filter UI elements (header/footer navigation) based on user roles. + #### Features + - **Decorators**: New `@Auth.Decorators.Permissions({ resource, actions })` for securing controllers. + - **Data Filtering**: Mappers (e.g., `page.mapper.ts`) now filter UI elements (header/footer navigation) based on user roles. - This provides granular control over resource access and UI visibility based on user roles and permissions. + This provides granular control over resource access and UI visibility based on user roles and permissions. ### Patch Changes - Updated dependencies [1a5a22d] - Updated dependencies [72391c1] - - @o2s/framework@1.16.0 - - @o2s/utils.api-harmonization@0.3.0 - - @o2s/configs.integrations@0.4.0 - - @o2s/ui@1.9.0 - - @o2s/utils.frontend@0.4.0 - - @o2s/utils.logger@1.2.0 + - @o2s/framework@1.16.0 + - @o2s/utils.api-harmonization@0.3.0 + - @o2s/configs.integrations@0.4.0 + - @o2s/ui@1.9.0 + - @o2s/utils.frontend@0.4.0 + - @o2s/utils.logger@1.2.0 ## 1.3.0 @@ -232,11 +321,11 @@ - Updated dependencies [d197b89] - Updated dependencies [cd483b7] - Updated dependencies [d197b89] - - @o2s/ui@1.8.0 - - @o2s/utils.api-harmonization@0.2.0 - - @o2s/configs.integrations@0.3.0 - - @o2s/utils.frontend@0.3.0 - - @o2s/framework@1.15.0 + - @o2s/ui@1.8.0 + - @o2s/utils.api-harmonization@0.2.0 + - @o2s/configs.integrations@0.3.0 + - @o2s/utils.frontend@0.3.0 + - @o2s/framework@1.15.0 ## 1.2.0 @@ -250,12 +339,12 @@ - Updated dependencies [221dc2c] - Updated dependencies [db5b381] - Updated dependencies [c2d9438] - - @o2s/utils.api-harmonization@0.1.3 - - @o2s/configs.integrations@0.2.1 - - @o2s/utils.frontend@0.2.1 - - @o2s/utils.logger@1.1.3 - - @o2s/ui@1.7.0 - - @o2s/framework@1.14.0 + - @o2s/utils.api-harmonization@0.1.3 + - @o2s/configs.integrations@0.2.1 + - @o2s/utils.frontend@0.2.1 + - @o2s/utils.logger@1.1.3 + - @o2s/ui@1.7.0 + - @o2s/framework@1.14.0 ## 1.1.2 @@ -268,12 +357,12 @@ - Updated dependencies [2c780d5] - Updated dependencies [0354126] - Updated dependencies [1653b74] - - @o2s/framework@1.13.0 - - @o2s/configs.integrations@0.2.0 - - @o2s/ui@1.6.0 - - @o2s/utils.frontend@0.2.0 - - @o2s/utils.api-harmonization@0.1.2 - - @o2s/utils.logger@1.1.2 + - @o2s/framework@1.13.0 + - @o2s/configs.integrations@0.2.0 + - @o2s/ui@1.6.0 + - @o2s/utils.frontend@0.2.0 + - @o2s/utils.api-harmonization@0.1.2 + - @o2s/utils.logger@1.1.2 ## 1.1.1 @@ -288,10 +377,10 @@ - Updated dependencies [b519464] - Updated dependencies [b1c47e8] - Updated dependencies [3da2e69] - - @o2s/framework@1.12.0 - - @o2s/ui@1.5.0 - - @o2s/utils.logger@1.1.1 - - @o2s/configs.integrations@0.1.1 + - @o2s/framework@1.12.0 + - @o2s/ui@1.5.0 + - @o2s/utils.logger@1.1.1 + - @o2s/configs.integrations@0.1.1 ## 1.1.0 @@ -304,7 +393,7 @@ - Updated dependencies [9ad8658] - Updated dependencies [9ad8658] - - @o2s/ui@1.4.0 + - @o2s/ui@1.4.0 ## 1.0.1 @@ -312,8 +401,8 @@ - 4a42e9c: improvements for knowledge base blocks and layouts - Updated dependencies [4a42e9c] - - @o2s/framework@1.11.2 - - @o2s/ui@1.3.2 + - @o2s/framework@1.11.2 + - @o2s/ui@1.3.2 ## 1.0.0 @@ -324,8 +413,8 @@ ### Patch Changes - Updated dependencies [2421fb2] - - @o2s/utils.api-harmonization@0.1.0 - - @o2s/configs.integrations@0.1.0 - - @o2s/utils.frontend@0.1.0 - - @o2s/framework@1.11.0 - - @o2s/ui@1.3.0 + - @o2s/utils.api-harmonization@0.1.0 + - @o2s/configs.integrations@0.1.0 + - @o2s/utils.frontend@0.1.0 + - @o2s/framework@1.11.0 + - @o2s/ui@1.3.0 diff --git a/packages/blocks/knowledge-base/category/package.json b/packages/blocks/knowledge-base/category/package.json index a6ebae87a..4e2e9d309 100644 --- a/packages/blocks/knowledge-base/category/package.json +++ b/packages/blocks/knowledge-base/category/package.json @@ -1,6 +1,6 @@ { "name": "@o2s/blocks.category", - "version": "2.0.0", + "version": "2.0.1", "private": false, "license": "MIT", "description": "A block displaying a category with its articles, including pagination and filtering capabilities.", diff --git a/packages/blocks/notifications/notification-details/CHANGELOG.md b/packages/blocks/notifications/notification-details/CHANGELOG.md index e4649dfdd..7310100db 100644 --- a/packages/blocks/notifications/notification-details/CHANGELOG.md +++ b/packages/blocks/notifications/notification-details/CHANGELOG.md @@ -1,16 +1,83 @@ # @o2s/blocks.notification-details +## 2.0.1 + +### Patch Changes + +- f8591c1: Threaded the CMS `preview` flag through every block so draft content actually renders in draft + mode. Previously only 5 of ~42 blocks passed it - the rest always fetched published content, so CMS + live preview (and any draft-mode view) showed stale data for most of the page. + + Per block, the flag now survives all four hops: the renderer forwards `isDraftModeEnabled` (added + to the framework's `BaseBlockProps` - `renderBlocks` already passed it to every block), the server + component sends `preview` on its block fetch, the request DTO declares it, and the API + Harmonization service forwards it to `CmsService.getBlockConfig`. + +- 270355f: refactor(blocks): build the block SDKs on the shared instance + + Every block built an SDK of its own out of the same 15 lines: the API url resolution, the logger settings with an `@ts-expect-error` per environment variable, and a method-by-method pick out of its own factory. They now take the instance from `@o2s/utils.frontend/sdk` and extend it with everything their factory returns, which leaves one `ofetch` client and one logger for all of them instead of 42, and drops the undeclared dependency on `next-runtime-env` that every block relied on. + + `order-details` gains `sdk.blocks.getOrderPdf`: its factory has always defined the method, and only the method-by-method pick left it out. + +- cb50455: chore(deps): update dependencies +- 681d153: chore(deps): update dependencies +- 457b243: feat(framework): add `createBlockRequest` helper for block SDK methods + + Adds `createBlockRequest` to `@o2s/framework/sdk`. It creates the request function used by the methods of a block (or module) SDK and takes care of the boilerplate that was previously copy-pasted into every method: merging the default API headers with the caller's headers and the access token, serializing query params, typing the response and wrapping failures into a `BlockRequestError` (which exposes `status`, `data` and the original error as `cause`). + + `getApiHeaders` is now provided by `@o2s/framework/headers` and re-exported by `@o2s/utils.frontend` (`Utils.Headers.getApiHeaders`), so the default headers are defined in a single place. All block SDKs, the SurveyJS module SDK and the block generator template use the new helper. + +- 1a520c8: chore: dependency update pass + + Update dependencies across the monorepo. Highlights: NestJS 12 (Express 5), + TypeScript 6 for type-checking/lint with native TypeScript 7 compiling the + package builds, Vite 8, Docusaurus 3.10, Storybook 10.6, @medusajs 2.20, + redis 6, surveyjs (core + react-ui) 3, and assorted minor/patch bumps. No + public package API changed; peer ranges were bumped to match (notably + @nestjs/* to ^12). + +- cb50455: chore(deps): update dependencies +- Updated dependencies [010ae15] +- Updated dependencies [f8591c1] +- Updated dependencies [cb50455] +- Updated dependencies [c8a58ad] +- Updated dependencies [681d153] +- Updated dependencies [457b243] +- Updated dependencies [1a520c8] +- Updated dependencies [02401b2] +- Updated dependencies [92c0bf8] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [cb50455] +- Updated dependencies [dfc3fbb] +- Updated dependencies [b775189] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [270355f] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] + - @o2s/configs.integrations@1.1.0 + - @o2s/framework@1.24.0 + - @o2s/utils.api-harmonization@1.1.0 + - @o2s/utils.frontend@1.1.0 + - @o2s/utils.logger@1.2.4 + - @o2s/ui@2.1.0 + ## 2.0.0 ### Patch Changes - Updated dependencies [86b4c5a] - Updated dependencies [24fb9a9] - - @o2s/framework@1.23.0 - - @o2s/ui@2.0.0 - - @o2s/configs.integrations@1.0.0 - - @o2s/utils.api-harmonization@1.0.0 - - @o2s/utils.frontend@1.0.0 + - @o2s/framework@1.23.0 + - @o2s/ui@2.0.0 + - @o2s/configs.integrations@1.0.0 + - @o2s/utils.api-harmonization@1.0.0 + - @o2s/utils.frontend@1.0.0 ## 1.8.3 @@ -24,7 +91,7 @@ - 025bfb3: fix(deps): declare `@o2s/utils.frontend` and `@o2s/utils.api-harmonization` as peer dependencies in blocks and surveyjs module - Moves both shared utils from `dependencies` to `peerDependencies` (with `devDependencies` for monorepo builds) so consuming apps supply a single hoisted version and npm does not nest conflicting copies under published packages. + Moves both shared utils from `dependencies` to `peerDependencies` (with `devDependencies` for monorepo builds) so consuming apps supply a single hoisted version and npm does not nest conflicting copies under published packages. ## 1.8.1 @@ -32,13 +99,13 @@ - 31df3a8: fix(deps): move @o2s/framework to peerDependencies in all published packages - `@o2s/framework` was listed in `dependencies` of blocks, integrations, modules, and utils packages. When installed from npm with mismatched versions across the dependency tree, npm would create nested copies of `@o2s/framework` with different class references. This caused NestJS to fail resolving DI tokens (e.g. `SearchService`) because injected class instances came from a different `@o2s/framework` copy than the one registered in the application module. + `@o2s/framework` was listed in `dependencies` of blocks, integrations, modules, and utils packages. When installed from npm with mismatched versions across the dependency tree, npm would create nested copies of `@o2s/framework` with different class references. This caused NestJS to fail resolving DI tokens (e.g. `SearchService`) because injected class instances came from a different `@o2s/framework` copy than the one registered in the application module. - Moved `@o2s/framework` to `peerDependencies` across all affected packages so that the consuming application always provides a single shared copy. Also moved `@o2s/integrations.mocked` to `peerDependencies` in `@o2s/integrations.mocked-dxp`. + Moved `@o2s/framework` to `peerDependencies` across all affected packages so that the consuming application always provides a single shared copy. Also moved `@o2s/integrations.mocked` to `peerDependencies` in `@o2s/integrations.mocked-dxp`. - Updated dependencies [31df3a8] - - @o2s/utils.api-harmonization@0.3.4 - - @o2s/utils.frontend@0.6.1 + - @o2s/utils.api-harmonization@0.3.4 + - @o2s/utils.frontend@0.6.1 ## 1.8.0 @@ -51,7 +118,7 @@ - Updated dependencies [7d99d13] - Updated dependencies [7d99d13] - Updated dependencies [6edc9ca] - - @o2s/framework@1.22.0 + - @o2s/framework@1.22.0 ## 1.7.0 @@ -63,24 +130,24 @@ - 0aaac5b: fix: add missing dependency declarations for turbo boundaries compliance - Declare previously undeclared imports as explicit dependencies across 55 packages. This resolves all `turbo boundaries` violations where packages imported modules not listed in their `package.json`. + Declare previously undeclared imports as explicit dependencies across 55 packages. This resolves all `turbo boundaries` violations where packages imported modules not listed in their `package.json`. - Key dependency categories added: - - `@storybook/nextjs-vite`, `@storybook/react`, `storybook` for story files - - `vitest`, `@nestjs/testing`, `@o2s/vitest-config` for test files - - `lucide-react`, `dayjs`, `string-template`, `class-variance-authority` for runtime code - - `vite` for vitest configs in integrations - - `@o2s/api-harmonization`, `@auth/core`, `@docusaurus/*` for app-level imports + Key dependency categories added: + - `@storybook/nextjs-vite`, `@storybook/react`, `storybook` for story files + - `vitest`, `@nestjs/testing`, `@o2s/vitest-config` for test files + - `lucide-react`, `dayjs`, `string-template`, `class-variance-authority` for runtime code + - `vite` for vitest configs in integrations + - `@o2s/api-harmonization`, `@auth/core`, `@docusaurus/*` for app-level imports - Updated dependencies [e8cdde6] - Updated dependencies [0aaac5b] - Updated dependencies [0aaac5b] - Updated dependencies [7ac16b0] - Updated dependencies [0aaac5b] - - @o2s/ui@1.14.0 - - @o2s/utils.frontend@0.5.2 - - @o2s/configs.integrations@0.7.0 - - @o2s/framework@1.21.0 + - @o2s/ui@1.14.0 + - @o2s/utils.frontend@0.5.2 + - @o2s/configs.integrations@0.7.0 + - @o2s/framework@1.21.0 ## 1.6.0 @@ -100,7 +167,7 @@ - fab2aea: refactor: group Storybook stories by domain and rename UI component directories to PascalCase - Updated dependencies [a7bb35c] - Updated dependencies [fab2aea] - - @o2s/ui@1.13.1 + - @o2s/ui@1.13.1 ## 1.5.2 @@ -108,23 +175,23 @@ - fadbc63: Extract shared block prop types into framework models and migrate block frontend props to the common `BlockWith*` helpers. - This removes duplicated `slug`, `userId`, and `isDraftModeEnabled` definitions and keeps renderer props aligned across blocks. + This removes duplicated `slug`, `userId`, and `isDraftModeEnabled` definitions and keeps renderer props aligned across blocks. - fadbc63: Align renderer prop types with runtime usage across blocks. - Restore missing `isDraftModeEnabled` and `userId` coverage in renderer prop contracts and rename the misnamed notification details renderer prop type for consistency. + Restore missing `isDraftModeEnabled` and `userId` coverage in renderer prop contracts and rename the misnamed notification details renderer prop type for consistency. - 338cb01: fix(api-harmonization): align typed header usage across services and generated SDK/controller contracts - 338cb01: Refactor header access to use `HeaderName` constants instead of literal header keys across framework controllers, block harmonization services, and mocked auth guards. - This unifies header handling, reduces string-key typos, and aligns modules with the typed headers approach exposed by `@o2s/framework/headers`. + This unifies header handling, reduces string-key typos, and aligns modules with the typed headers approach exposed by `@o2s/framework/headers`. - Updated dependencies [fadbc63] - Updated dependencies [338cb01] - Updated dependencies [338cb01] - Updated dependencies [338cb01] - - @o2s/framework@1.20.1 - - @o2s/utils.api-harmonization@0.3.3 + - @o2s/framework@1.20.1 + - @o2s/utils.api-harmonization@0.3.3 ## 1.5.1 @@ -137,11 +204,11 @@ - Updated dependencies [daf592e] - Updated dependencies [375cd90] - Updated dependencies [98b2e68] - - @o2s/framework@1.20.0 - - @o2s/utils.api-harmonization@0.3.2 - - @o2s/utils.frontend@0.5.1 - - @o2s/utils.logger@1.2.3 - - @o2s/ui@1.13.0 + - @o2s/framework@1.20.0 + - @o2s/utils.api-harmonization@0.3.2 + - @o2s/utils.frontend@0.5.1 + - @o2s/utils.logger@1.2.3 + - @o2s/ui@1.13.0 ## 1.5.0 @@ -168,12 +235,12 @@ - Updated dependencies [8c01be4] - Updated dependencies [ea200fc] - Updated dependencies [cc2e932] - - @o2s/framework@1.18.0 - - @o2s/utils.api-harmonization@0.3.1 - - @o2s/utils.frontend@0.4.1 - - @o2s/utils.logger@1.2.2 - - @o2s/configs.integrations@0.6.0 - - @o2s/ui@1.11.0 + - @o2s/framework@1.18.0 + - @o2s/utils.api-harmonization@0.3.1 + - @o2s/utils.frontend@0.4.1 + - @o2s/utils.logger@1.2.2 + - @o2s/configs.integrations@0.6.0 + - @o2s/ui@1.11.0 ## 1.4.0 @@ -181,29 +248,29 @@ - 72391c1: ### Authorization & PBAC Implementation - This release introduces a comprehensive Policy-Based Access Control system interlaced with Role-Based Access Control. + This release introduces a comprehensive Policy-Based Access Control system interlaced with Role-Based Access Control. - #### Framework & Core - - **`@o2s/framework` (AuthService)**: Enhanced with abstract permission logic (`getPermissions`, `hasPermission`), role checks (`hasRole`, `requireRoles`), and action batching (`canPerformActions`). - - **`@o2s/api-harmonization`**: Implemented global `RolesGuard` and `PermissionsGuard` in `AppModule`. - - **`@o2s/utils.api-harmonization`**: Added `extractUserRolesFromJwt` to unify role extraction from different JWT claims. + #### Framework & Core + - **`@o2s/framework` (AuthService)**: Enhanced with abstract permission logic (`getPermissions`, `hasPermission`), role checks (`hasRole`, `requireRoles`), and action batching (`canPerformActions`). + - **`@o2s/api-harmonization`**: Implemented global `RolesGuard` and `PermissionsGuard` in `AppModule`. + - **`@o2s/utils.api-harmonization`**: Added `extractUserRolesFromJwt` to unify role extraction from different JWT claims. - #### Features - - **Decorators**: New `@Auth.Decorators.Permissions({ resource, actions })` for securing controllers. - - **Data Filtering**: Mappers (e.g., `page.mapper.ts`) now filter UI elements (header/footer navigation) based on user roles. + #### Features + - **Decorators**: New `@Auth.Decorators.Permissions({ resource, actions })` for securing controllers. + - **Data Filtering**: Mappers (e.g., `page.mapper.ts`) now filter UI elements (header/footer navigation) based on user roles. - This provides granular control over resource access and UI visibility based on user roles and permissions. + This provides granular control over resource access and UI visibility based on user roles and permissions. ### Patch Changes - Updated dependencies [1a5a22d] - Updated dependencies [72391c1] - - @o2s/framework@1.16.0 - - @o2s/utils.api-harmonization@0.3.0 - - @o2s/configs.integrations@0.4.0 - - @o2s/ui@1.9.0 - - @o2s/utils.frontend@0.4.0 - - @o2s/utils.logger@1.2.0 + - @o2s/framework@1.16.0 + - @o2s/utils.api-harmonization@0.3.0 + - @o2s/configs.integrations@0.4.0 + - @o2s/ui@1.9.0 + - @o2s/utils.frontend@0.4.0 + - @o2s/utils.logger@1.2.0 ## 1.3.0 @@ -223,11 +290,11 @@ - Updated dependencies [d197b89] - Updated dependencies [cd483b7] - Updated dependencies [d197b89] - - @o2s/ui@1.8.0 - - @o2s/utils.api-harmonization@0.2.0 - - @o2s/configs.integrations@0.3.0 - - @o2s/utils.frontend@0.3.0 - - @o2s/framework@1.15.0 + - @o2s/ui@1.8.0 + - @o2s/utils.api-harmonization@0.2.0 + - @o2s/configs.integrations@0.3.0 + - @o2s/utils.frontend@0.3.0 + - @o2s/framework@1.15.0 ## 1.2.0 @@ -241,12 +308,12 @@ - Updated dependencies [221dc2c] - Updated dependencies [db5b381] - Updated dependencies [c2d9438] - - @o2s/utils.api-harmonization@0.1.3 - - @o2s/configs.integrations@0.2.1 - - @o2s/utils.frontend@0.2.1 - - @o2s/utils.logger@1.1.3 - - @o2s/ui@1.7.0 - - @o2s/framework@1.14.0 + - @o2s/utils.api-harmonization@0.1.3 + - @o2s/configs.integrations@0.2.1 + - @o2s/utils.frontend@0.2.1 + - @o2s/utils.logger@1.1.3 + - @o2s/ui@1.7.0 + - @o2s/framework@1.14.0 ## 1.1.1 @@ -259,12 +326,12 @@ - Updated dependencies [2c780d5] - Updated dependencies [0354126] - Updated dependencies [1653b74] - - @o2s/framework@1.13.0 - - @o2s/configs.integrations@0.2.0 - - @o2s/ui@1.6.0 - - @o2s/utils.frontend@0.2.0 - - @o2s/utils.api-harmonization@0.1.2 - - @o2s/utils.logger@1.1.2 + - @o2s/framework@1.13.0 + - @o2s/configs.integrations@0.2.0 + - @o2s/ui@1.6.0 + - @o2s/utils.frontend@0.2.0 + - @o2s/utils.api-harmonization@0.1.2 + - @o2s/utils.logger@1.1.2 ## 1.1.0 @@ -277,7 +344,7 @@ - Updated dependencies [9ad8658] - Updated dependencies [9ad8658] - - @o2s/ui@1.4.0 + - @o2s/ui@1.4.0 ## 1.0.0 @@ -288,8 +355,8 @@ ### Patch Changes - Updated dependencies [2421fb2] - - @o2s/utils.api-harmonization@0.1.0 - - @o2s/configs.integrations@0.1.0 - - @o2s/utils.frontend@0.1.0 - - @o2s/framework@1.11.0 - - @o2s/ui@1.3.0 + - @o2s/utils.api-harmonization@0.1.0 + - @o2s/configs.integrations@0.1.0 + - @o2s/utils.frontend@0.1.0 + - @o2s/framework@1.11.0 + - @o2s/ui@1.3.0 diff --git a/packages/blocks/notifications/notification-details/package.json b/packages/blocks/notifications/notification-details/package.json index 0a05b2f7b..e4d4421ce 100644 --- a/packages/blocks/notifications/notification-details/package.json +++ b/packages/blocks/notifications/notification-details/package.json @@ -1,6 +1,6 @@ { "name": "@o2s/blocks.notification-details", - "version": "2.0.0", + "version": "2.0.1", "private": false, "license": "MIT", "description": "A block displaying and managing notification details.", diff --git a/packages/blocks/notifications/notification-list/CHANGELOG.md b/packages/blocks/notifications/notification-list/CHANGELOG.md index 57426c99a..f827ba899 100644 --- a/packages/blocks/notifications/notification-list/CHANGELOG.md +++ b/packages/blocks/notifications/notification-list/CHANGELOG.md @@ -1,16 +1,142 @@ # @o2s/blocks.notification-list +## 2.1.0 + +### Minor Changes + +- ee42afd: feat(blocks): render list filters from the URL on the server + + Opening a filtered list link rendered the unfiltered list first and let the client replace it, so the page showed the wrong data until the second request landed. The ticket, order, invoice and notification lists now resolve the query params into their own query on the server, and each block query takes a 1-based `page` that the API turns into an `offset` with the page size from the CMS config. With the server rendering the filtered state, the client's refetch on mount is gone: a filtered link costs one request instead of two. + + The parsing lives in `@o2s/ui` as `parseFiltersFromSearchParams`, next to the hook that writes those params, so both ends of the URL contract stay in one place; the product list uses it too, and `searchParamsKey` keys each block on the params it was rendered for. Multi-value filters are named per block, because whether a filter accepts more than one value is part of the API contract: the tickets module takes repeated `status` values, the others take one value per filter. + + The mocked tickets integration now honours that array form, which its own contract documents ("use a single value or repeat the query parameter for multiple"): it compared the filter as a single string, so any multi-status selection returned nothing. + +- ee42afd: feat(ui): bidirectional URL query params sync for list block filters + + List block filter state is now kept in the URL, so filtered views can be shared, bookmarked and linked + to from elsewhere in the application. + + New `useUrlFilters` hook (plus `use-url-filters.utils` serialization helpers) in `@o2s/ui`, replacing + `useState(initialFilters)` in the ticket, order, invoice, product and notification list blocks. + Params are namespaced per block (`?ticket_status=OPEN`), multi-value filters repeat the key, + pagination is written as a 1-based `{ns}_page`, view mode as `{ns}_view`, and only values differing + from the block defaults end up in the URL. Filter changes are written with the History API + (`replaceUrlParams`), so they add no history entries and trigger no navigation. The list refetches + its own data client-side instead of the whole route being re-rendered on the server. The hook takes + `searchParams` and `onUrlChange` as arguments instead of importing `next/navigation`, which keeps + `@o2s/ui` framework-agnostic. + + Blocks that do not use the hook are unaffected. + +### Patch Changes + +- f8591c1: Threaded the CMS `preview` flag through every block so draft content actually renders in draft + mode. Previously only 5 of ~42 blocks passed it - the rest always fetched published content, so CMS + live preview (and any draft-mode view) showed stale data for most of the page. + + Per block, the flag now survives all four hops: the renderer forwards `isDraftModeEnabled` (added + to the framework's `BaseBlockProps` - `renderBlocks` already passed it to every block), the server + component sends `preview` on its block fetch, the request DTO declares it, and the API + Harmonization service forwards it to `CmsService.getBlockConfig`. + +- 270355f: refactor(blocks): build the block SDKs on the shared instance + + Every block built an SDK of its own out of the same 15 lines: the API url resolution, the logger settings with an `@ts-expect-error` per environment variable, and a method-by-method pick out of its own factory. They now take the instance from `@o2s/utils.frontend/sdk` and extend it with everything their factory returns, which leaves one `ofetch` client and one logger for all of them instead of 42, and drops the undeclared dependency on `next-runtime-env` that every block relied on. + + `order-details` gains `sdk.blocks.getOrderPdf`: its factory has always defined the method, and only the method-by-method pick left it out. + +- cb50455: chore(deps): update dependencies +- 681d153: chore(deps): update dependencies +- 457b243: feat(framework): add `createBlockRequest` helper for block SDK methods + + Adds `createBlockRequest` to `@o2s/framework/sdk`. It creates the request function used by the methods of a block (or module) SDK and takes care of the boilerplate that was previously copy-pasted into every method: merging the default API headers with the caller's headers and the access token, serializing query params, typing the response and wrapping failures into a `BlockRequestError` (which exposes `status`, `data` and the original error as `cause`). + + `getApiHeaders` is now provided by `@o2s/framework/headers` and re-exported by `@o2s/utils.frontend` (`Utils.Headers.getApiHeaders`), so the default headers are defined in a single place. All block SDKs, the SurveyJS module SDK and the block generator template use the new helper. + +- 3f1c980: chore(deps): update dependencies +- 1a520c8: chore: dependency update pass + + Update dependencies across the monorepo. Highlights: NestJS 12 (Express 5), + TypeScript 6 for type-checking/lint with native TypeScript 7 compiling the + package builds, Vite 8, Docusaurus 3.10, Storybook 10.6, @medusajs 2.20, + redis 6, surveyjs (core + react-ui) 3, and assorted minor/patch bumps. No + public package API changed; peer ranges were bumped to match (notably + @nestjs/* to ^12). + +- 02401b2: Routine dependency maintenance (patch/minor, no code changes): `@medusajs/js-sdk` & `@medusajs/types` to 2.20.1, `survey-core` & `survey-react-ui` to 3.0.3, `lucide-react` to 1.40, `sass` to 1.104, `docusaurus-plugin-sass` to 0.2.7. +- c070aff: chore(deps): update dependencies +- b7f8177: chore(deps): update dependencies +- ee42afd: fix(blocks): reset list block pagination when filters change, so filtering from page 2 or later no longer lands on a page of the new result set that the user never asked for (often an empty one) +- ee42afd: fix(blocks): restore select filters from the URL as single values, so opening a shared link no longer hands an array to a single-value select and trips React's `` check +- cb50455: chore(deps): update dependencies +- ee42afd: refactor(ui): one list of the keys that describe a block rather than a filter + + The same idea was written out three times, and the lists had drifted: the active-filter counter skipped `offset`, `limit` and `id`, the filter badges skipped those plus `viewMode`, and the URL serialisation skipped only `id` and `limit` while checking `offset` separately. + + `BLOCK_STATE_KEYS` in `use-url-filters.utils` is now the single list, and the other two are derived from it: `DEFAULT_EXCLUDED_KEYS` drops the offset, because it is not left out of the URL but written as the 1-based `page`, and the badges add the view toggle, which is a display choice rather than a filter. The difference that used to be an accident is now one `filter` call with the reason next to it. + + `parseFiltersFromSearchParams` is also generic over the block's query now, so it returns `Partial` and the five server components no longer cast its result. A query string carries no types, so the assertion happens once inside the helper instead of at every call site, and each call names the query it is building. + +- ee42afd: refactor(utils.frontend): one hook for wiring a list block to the URL + + Each list block repeated the same forty lines around `useUrlFilters`, which is deliberately framework-agnostic and therefore takes its inputs from the caller: the params snapshot, the History API writer, and the multi-value keys, filter keys and starting view mode derived from the block's CMS filter config. + + `Hooks.useListFilters` does all of it, so a block passes its defaults, its namespace and its filter config. Only the two values that come from `next/navigation` stay with the block, which keeps this package free of a dependency on Next. A block with a namespace gets prefixed params; one without gets plain, linkable ones and its filter keys are derived, so the two conventions need no extra flag. + +- ee42afd: refactor(framework): one pagination resolver for the list blocks + + Every list block carried its own copy of the same two helpers, turning a query's `limit`, `offset` and `page` into the window to fetch. `Utils.Pagination.resolvePagination` in `@o2s/utils.api-harmonization` replaces all five: it takes the pagination a URL can carry (`Models.Pagination.PaginatedQuery`, structurally satisfied by any block query, so a block no longer types the helper with its own class) plus the page size to fall back on, and returns the `limit` and `offset` to use. The query shape stays a model in `@o2s/framework`, while the resolving lives with the other API-side helpers. + + `PaginatedQuery` is kept apart from `PaginationQuery`, which the domain modules extend: `page` is consumed by the block API and never reaches them, so advertising it in their contracts would promise integrations something they never receive. + + Two behaviours change with the move. A page size counts only as a whole number of rows above zero, so `?limit=-5` falls back to the CMS config instead of travelling on as a negative limit; the unit tests for the new helper are what surfaced it. + + And the fallback page size is no longer a single row. Four of the five blocks fell back to `limit: 1` when neither the query nor the CMS config named one. That fallback was inherited, and reachable, because `pagination` is optional in the CMS block models, so an entry without it rendered a one-row list. `Utils.Pagination.DEFAULT_LIMIT` (10) is the shared fallback now; the product list keeps its own 12, which matches its three-column grid. + +- 3f1c980: chore(deps): update dependencies +- 3f1c980: chore(deps): update dependencies +- Updated dependencies [010ae15] +- Updated dependencies [f8591c1] +- Updated dependencies [cb50455] +- Updated dependencies [c8a58ad] +- Updated dependencies [681d153] +- Updated dependencies [457b243] +- Updated dependencies [1a520c8] +- Updated dependencies [02401b2] +- Updated dependencies [92c0bf8] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [cb50455] +- Updated dependencies [dfc3fbb] +- Updated dependencies [b775189] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [270355f] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] + - @o2s/configs.integrations@1.1.0 + - @o2s/framework@1.24.0 + - @o2s/utils.api-harmonization@1.1.0 + - @o2s/utils.frontend@1.1.0 + - @o2s/utils.logger@1.2.4 + - @o2s/ui@2.1.0 + ## 2.0.0 ### Patch Changes - Updated dependencies [86b4c5a] - Updated dependencies [24fb9a9] - - @o2s/framework@1.23.0 - - @o2s/ui@2.0.0 - - @o2s/configs.integrations@1.0.0 - - @o2s/utils.api-harmonization@1.0.0 - - @o2s/utils.frontend@1.0.0 + - @o2s/framework@1.23.0 + - @o2s/ui@2.0.0 + - @o2s/configs.integrations@1.0.0 + - @o2s/utils.api-harmonization@1.0.0 + - @o2s/utils.frontend@1.0.0 ## 1.8.3 @@ -24,7 +150,7 @@ - 025bfb3: fix(deps): declare `@o2s/utils.frontend` and `@o2s/utils.api-harmonization` as peer dependencies in blocks and surveyjs module - Moves both shared utils from `dependencies` to `peerDependencies` (with `devDependencies` for monorepo builds) so consuming apps supply a single hoisted version and npm does not nest conflicting copies under published packages. + Moves both shared utils from `dependencies` to `peerDependencies` (with `devDependencies` for monorepo builds) so consuming apps supply a single hoisted version and npm does not nest conflicting copies under published packages. ## 1.8.1 @@ -32,13 +158,13 @@ - 31df3a8: fix(deps): move @o2s/framework to peerDependencies in all published packages - `@o2s/framework` was listed in `dependencies` of blocks, integrations, modules, and utils packages. When installed from npm with mismatched versions across the dependency tree, npm would create nested copies of `@o2s/framework` with different class references. This caused NestJS to fail resolving DI tokens (e.g. `SearchService`) because injected class instances came from a different `@o2s/framework` copy than the one registered in the application module. + `@o2s/framework` was listed in `dependencies` of blocks, integrations, modules, and utils packages. When installed from npm with mismatched versions across the dependency tree, npm would create nested copies of `@o2s/framework` with different class references. This caused NestJS to fail resolving DI tokens (e.g. `SearchService`) because injected class instances came from a different `@o2s/framework` copy than the one registered in the application module. - Moved `@o2s/framework` to `peerDependencies` across all affected packages so that the consuming application always provides a single shared copy. Also moved `@o2s/integrations.mocked` to `peerDependencies` in `@o2s/integrations.mocked-dxp`. + Moved `@o2s/framework` to `peerDependencies` across all affected packages so that the consuming application always provides a single shared copy. Also moved `@o2s/integrations.mocked` to `peerDependencies` in `@o2s/integrations.mocked-dxp`. - Updated dependencies [31df3a8] - - @o2s/utils.api-harmonization@0.3.4 - - @o2s/utils.frontend@0.6.1 + - @o2s/utils.api-harmonization@0.3.4 + - @o2s/utils.frontend@0.6.1 ## 1.8.0 @@ -51,7 +177,7 @@ - Updated dependencies [7d99d13] - Updated dependencies [7d99d13] - Updated dependencies [6edc9ca] - - @o2s/framework@1.22.0 + - @o2s/framework@1.22.0 ## 1.7.1 @@ -59,24 +185,24 @@ - 0aaac5b: fix: add missing dependency declarations for turbo boundaries compliance - Declare previously undeclared imports as explicit dependencies across 55 packages. This resolves all `turbo boundaries` violations where packages imported modules not listed in their `package.json`. + Declare previously undeclared imports as explicit dependencies across 55 packages. This resolves all `turbo boundaries` violations where packages imported modules not listed in their `package.json`. - Key dependency categories added: - - `@storybook/nextjs-vite`, `@storybook/react`, `storybook` for story files - - `vitest`, `@nestjs/testing`, `@o2s/vitest-config` for test files - - `lucide-react`, `dayjs`, `string-template`, `class-variance-authority` for runtime code - - `vite` for vitest configs in integrations - - `@o2s/api-harmonization`, `@auth/core`, `@docusaurus/*` for app-level imports + Key dependency categories added: + - `@storybook/nextjs-vite`, `@storybook/react`, `storybook` for story files + - `vitest`, `@nestjs/testing`, `@o2s/vitest-config` for test files + - `lucide-react`, `dayjs`, `string-template`, `class-variance-authority` for runtime code + - `vite` for vitest configs in integrations + - `@o2s/api-harmonization`, `@auth/core`, `@docusaurus/*` for app-level imports - Updated dependencies [e8cdde6] - Updated dependencies [0aaac5b] - Updated dependencies [0aaac5b] - Updated dependencies [7ac16b0] - Updated dependencies [0aaac5b] - - @o2s/ui@1.14.0 - - @o2s/utils.frontend@0.5.2 - - @o2s/configs.integrations@0.7.0 - - @o2s/framework@1.21.0 + - @o2s/ui@1.14.0 + - @o2s/utils.frontend@0.5.2 + - @o2s/configs.integrations@0.7.0 + - @o2s/framework@1.21.0 ## 1.7.0 @@ -96,7 +222,7 @@ - fab2aea: refactor: group Storybook stories by domain and rename UI component directories to PascalCase - Updated dependencies [a7bb35c] - Updated dependencies [fab2aea] - - @o2s/ui@1.13.1 + - @o2s/ui@1.13.1 ## 1.6.2 @@ -104,19 +230,19 @@ - fadbc63: Extract shared block prop types into framework models and migrate block frontend props to the common `BlockWith*` helpers. - This removes duplicated `slug`, `userId`, and `isDraftModeEnabled` definitions and keeps renderer props aligned across blocks. + This removes duplicated `slug`, `userId`, and `isDraftModeEnabled` definitions and keeps renderer props aligned across blocks. - 338cb01: fix(api-harmonization): align typed header usage across services and generated SDK/controller contracts - 338cb01: Refactor header access to use `HeaderName` constants instead of literal header keys across framework controllers, block harmonization services, and mocked auth guards. - This unifies header handling, reduces string-key typos, and aligns modules with the typed headers approach exposed by `@o2s/framework/headers`. + This unifies header handling, reduces string-key typos, and aligns modules with the typed headers approach exposed by `@o2s/framework/headers`. - Updated dependencies [fadbc63] - Updated dependencies [338cb01] - Updated dependencies [338cb01] - Updated dependencies [338cb01] - - @o2s/framework@1.20.1 - - @o2s/utils.api-harmonization@0.3.3 + - @o2s/framework@1.20.1 + - @o2s/utils.api-harmonization@0.3.3 ## 1.6.1 @@ -129,11 +255,11 @@ - Updated dependencies [daf592e] - Updated dependencies [375cd90] - Updated dependencies [98b2e68] - - @o2s/framework@1.20.0 - - @o2s/utils.api-harmonization@0.3.2 - - @o2s/utils.frontend@0.5.1 - - @o2s/utils.logger@1.2.3 - - @o2s/ui@1.13.0 + - @o2s/framework@1.20.0 + - @o2s/utils.api-harmonization@0.3.2 + - @o2s/utils.frontend@0.5.1 + - @o2s/utils.logger@1.2.3 + - @o2s/ui@1.13.0 ## 1.6.0 @@ -160,12 +286,12 @@ - Updated dependencies [8c01be4] - Updated dependencies [ea200fc] - Updated dependencies [cc2e932] - - @o2s/framework@1.18.0 - - @o2s/utils.api-harmonization@0.3.1 - - @o2s/utils.frontend@0.4.1 - - @o2s/utils.logger@1.2.2 - - @o2s/configs.integrations@0.6.0 - - @o2s/ui@1.11.0 + - @o2s/framework@1.18.0 + - @o2s/utils.api-harmonization@0.3.1 + - @o2s/utils.frontend@0.4.1 + - @o2s/utils.logger@1.2.2 + - @o2s/configs.integrations@0.6.0 + - @o2s/ui@1.11.0 ## 1.5.0 @@ -173,29 +299,29 @@ - 72391c1: ### Authorization & PBAC Implementation - This release introduces a comprehensive Policy-Based Access Control system interlaced with Role-Based Access Control. + This release introduces a comprehensive Policy-Based Access Control system interlaced with Role-Based Access Control. - #### Framework & Core - - **`@o2s/framework` (AuthService)**: Enhanced with abstract permission logic (`getPermissions`, `hasPermission`), role checks (`hasRole`, `requireRoles`), and action batching (`canPerformActions`). - - **`@o2s/api-harmonization`**: Implemented global `RolesGuard` and `PermissionsGuard` in `AppModule`. - - **`@o2s/utils.api-harmonization`**: Added `extractUserRolesFromJwt` to unify role extraction from different JWT claims. + #### Framework & Core + - **`@o2s/framework` (AuthService)**: Enhanced with abstract permission logic (`getPermissions`, `hasPermission`), role checks (`hasRole`, `requireRoles`), and action batching (`canPerformActions`). + - **`@o2s/api-harmonization`**: Implemented global `RolesGuard` and `PermissionsGuard` in `AppModule`. + - **`@o2s/utils.api-harmonization`**: Added `extractUserRolesFromJwt` to unify role extraction from different JWT claims. - #### Features - - **Decorators**: New `@Auth.Decorators.Permissions({ resource, actions })` for securing controllers. - - **Data Filtering**: Mappers (e.g., `page.mapper.ts`) now filter UI elements (header/footer navigation) based on user roles. + #### Features + - **Decorators**: New `@Auth.Decorators.Permissions({ resource, actions })` for securing controllers. + - **Data Filtering**: Mappers (e.g., `page.mapper.ts`) now filter UI elements (header/footer navigation) based on user roles. - This provides granular control over resource access and UI visibility based on user roles and permissions. + This provides granular control over resource access and UI visibility based on user roles and permissions. ### Patch Changes - Updated dependencies [1a5a22d] - Updated dependencies [72391c1] - - @o2s/framework@1.16.0 - - @o2s/utils.api-harmonization@0.3.0 - - @o2s/configs.integrations@0.4.0 - - @o2s/ui@1.9.0 - - @o2s/utils.frontend@0.4.0 - - @o2s/utils.logger@1.2.0 + - @o2s/framework@1.16.0 + - @o2s/utils.api-harmonization@0.3.0 + - @o2s/configs.integrations@0.4.0 + - @o2s/ui@1.9.0 + - @o2s/utils.frontend@0.4.0 + - @o2s/utils.logger@1.2.0 ## 1.4.0 @@ -215,11 +341,11 @@ - Updated dependencies [d197b89] - Updated dependencies [cd483b7] - Updated dependencies [d197b89] - - @o2s/ui@1.8.0 - - @o2s/utils.api-harmonization@0.2.0 - - @o2s/configs.integrations@0.3.0 - - @o2s/utils.frontend@0.3.0 - - @o2s/framework@1.15.0 + - @o2s/ui@1.8.0 + - @o2s/utils.api-harmonization@0.2.0 + - @o2s/configs.integrations@0.3.0 + - @o2s/utils.frontend@0.3.0 + - @o2s/framework@1.15.0 ## 1.3.1 @@ -229,7 +355,7 @@ - Updated dependencies [abd3b41] - Updated dependencies [be6f80b] - Updated dependencies [f999bb1] - - @o2s/ui@1.7.1 + - @o2s/ui@1.7.1 ## 1.3.0 @@ -243,12 +369,12 @@ - Updated dependencies [221dc2c] - Updated dependencies [db5b381] - Updated dependencies [c2d9438] - - @o2s/utils.api-harmonization@0.1.3 - - @o2s/configs.integrations@0.2.1 - - @o2s/utils.frontend@0.2.1 - - @o2s/utils.logger@1.1.3 - - @o2s/ui@1.7.0 - - @o2s/framework@1.14.0 + - @o2s/utils.api-harmonization@0.1.3 + - @o2s/configs.integrations@0.2.1 + - @o2s/utils.frontend@0.2.1 + - @o2s/utils.logger@1.1.3 + - @o2s/ui@1.7.0 + - @o2s/framework@1.14.0 ## 1.2.1 @@ -261,12 +387,12 @@ - Updated dependencies [2c780d5] - Updated dependencies [0354126] - Updated dependencies [1653b74] - - @o2s/framework@1.13.0 - - @o2s/configs.integrations@0.2.0 - - @o2s/ui@1.6.0 - - @o2s/utils.frontend@0.2.0 - - @o2s/utils.api-harmonization@0.1.2 - - @o2s/utils.logger@1.1.2 + - @o2s/framework@1.13.0 + - @o2s/configs.integrations@0.2.0 + - @o2s/ui@1.6.0 + - @o2s/utils.frontend@0.2.0 + - @o2s/utils.api-harmonization@0.1.2 + - @o2s/utils.logger@1.1.2 ## 1.2.0 @@ -284,10 +410,10 @@ - Updated dependencies [b519464] - Updated dependencies [b1c47e8] - Updated dependencies [3da2e69] - - @o2s/framework@1.12.0 - - @o2s/ui@1.5.0 - - @o2s/utils.logger@1.1.1 - - @o2s/configs.integrations@0.1.1 + - @o2s/framework@1.12.0 + - @o2s/ui@1.5.0 + - @o2s/utils.logger@1.1.1 + - @o2s/configs.integrations@0.1.1 ## 1.1.0 @@ -300,7 +426,7 @@ - Updated dependencies [9ad8658] - Updated dependencies [9ad8658] - - @o2s/ui@1.4.0 + - @o2s/ui@1.4.0 ## 1.0.0 @@ -311,8 +437,8 @@ ### Patch Changes - Updated dependencies [2421fb2] - - @o2s/utils.api-harmonization@0.1.0 - - @o2s/configs.integrations@0.1.0 - - @o2s/utils.frontend@0.1.0 - - @o2s/framework@1.11.0 - - @o2s/ui@1.3.0 + - @o2s/utils.api-harmonization@0.1.0 + - @o2s/configs.integrations@0.1.0 + - @o2s/utils.frontend@0.1.0 + - @o2s/framework@1.11.0 + - @o2s/ui@1.3.0 diff --git a/packages/blocks/orders/order-list/package.json b/packages/blocks/orders/order-list/package.json index daf8e6a78..31f78c29d 100644 --- a/packages/blocks/orders/order-list/package.json +++ b/packages/blocks/orders/order-list/package.json @@ -1,6 +1,6 @@ { "name": "@o2s/blocks.order-list", - "version": "2.0.0", + "version": "2.1.0", "private": false, "license": "MIT", "description": "A block displaying a list of orders.", diff --git a/packages/blocks/orders/orders-summary/CHANGELOG.md b/packages/blocks/orders/orders-summary/CHANGELOG.md index 5ca829d47..3739c3733 100644 --- a/packages/blocks/orders/orders-summary/CHANGELOG.md +++ b/packages/blocks/orders/orders-summary/CHANGELOG.md @@ -1,16 +1,89 @@ # @o2s/blocks.orders-summary +## 2.0.1 + +### Patch Changes + +- f8591c1: Threaded the CMS `preview` flag through every block so draft content actually renders in draft + mode. Previously only 5 of ~42 blocks passed it - the rest always fetched published content, so CMS + live preview (and any draft-mode view) showed stale data for most of the page. + + Per block, the flag now survives all four hops: the renderer forwards `isDraftModeEnabled` (added + to the framework's `BaseBlockProps` - `renderBlocks` already passed it to every block), the server + component sends `preview` on its block fetch, the request DTO declares it, and the API + Harmonization service forwards it to `CmsService.getBlockConfig`. + +- 270355f: refactor(blocks): build the block SDKs on the shared instance + + Every block built an SDK of its own out of the same 15 lines: the API url resolution, the logger settings with an `@ts-expect-error` per environment variable, and a method-by-method pick out of its own factory. They now take the instance from `@o2s/utils.frontend/sdk` and extend it with everything their factory returns, which leaves one `ofetch` client and one logger for all of them instead of 42, and drops the undeclared dependency on `next-runtime-env` that every block relied on. + + `order-details` gains `sdk.blocks.getOrderPdf`: its factory has always defined the method, and only the method-by-method pick left it out. + +- cb50455: chore(deps): update dependencies +- 681d153: chore(deps): update dependencies +- 457b243: feat(framework): add `createBlockRequest` helper for block SDK methods + + Adds `createBlockRequest` to `@o2s/framework/sdk`. It creates the request function used by the methods of a block (or module) SDK and takes care of the boilerplate that was previously copy-pasted into every method: merging the default API headers with the caller's headers and the access token, serializing query params, typing the response and wrapping failures into a `BlockRequestError` (which exposes `status`, `data` and the original error as `cause`). + + `getApiHeaders` is now provided by `@o2s/framework/headers` and re-exported by `@o2s/utils.frontend` (`Utils.Headers.getApiHeaders`), so the default headers are defined in a single place. All block SDKs, the SurveyJS module SDK and the block generator template use the new helper. + +- 3f1c980: chore(deps): update dependencies +- 1a520c8: chore: dependency update pass + + Update dependencies across the monorepo. Highlights: NestJS 12 (Express 5), + TypeScript 6 for type-checking/lint with native TypeScript 7 compiling the + package builds, Vite 8, Docusaurus 3.10, Storybook 10.6, @medusajs 2.20, + redis 6, surveyjs (core + react-ui) 3, and assorted minor/patch bumps. No + public package API changed; peer ranges were bumped to match (notably + @nestjs/* to ^12). + +- 02401b2: Routine dependency maintenance (patch/minor, no code changes): `@medusajs/js-sdk` & `@medusajs/types` to 2.20.1, `survey-core` & `survey-react-ui` to 3.0.3, `lucide-react` to 1.40, `sass` to 1.104, `docusaurus-plugin-sass` to 0.2.7. +- c070aff: chore(deps): update dependencies +- b7f8177: chore(deps): update dependencies +- cb50455: chore(deps): update dependencies +- 3f1c980: chore(deps): update dependencies +- 3f1c980: chore(deps): update dependencies +- Updated dependencies [010ae15] +- Updated dependencies [f8591c1] +- Updated dependencies [cb50455] +- Updated dependencies [c8a58ad] +- Updated dependencies [681d153] +- Updated dependencies [457b243] +- Updated dependencies [1a520c8] +- Updated dependencies [02401b2] +- Updated dependencies [92c0bf8] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [cb50455] +- Updated dependencies [dfc3fbb] +- Updated dependencies [b775189] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [270355f] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] + - @o2s/configs.integrations@1.1.0 + - @o2s/framework@1.24.0 + - @o2s/utils.api-harmonization@1.1.0 + - @o2s/utils.frontend@1.1.0 + - @o2s/utils.logger@1.2.4 + - @o2s/ui@2.1.0 + ## 2.0.0 ### Patch Changes - Updated dependencies [86b4c5a] - Updated dependencies [24fb9a9] - - @o2s/framework@1.23.0 - - @o2s/ui@2.0.0 - - @o2s/configs.integrations@1.0.0 - - @o2s/utils.api-harmonization@1.0.0 - - @o2s/utils.frontend@1.0.0 + - @o2s/framework@1.23.0 + - @o2s/ui@2.0.0 + - @o2s/configs.integrations@1.0.0 + - @o2s/utils.api-harmonization@1.0.0 + - @o2s/utils.frontend@1.0.0 ## 1.7.3 @@ -24,7 +97,7 @@ - 025bfb3: fix(deps): declare `@o2s/utils.frontend` and `@o2s/utils.api-harmonization` as peer dependencies in blocks and surveyjs module - Moves both shared utils from `dependencies` to `peerDependencies` (with `devDependencies` for monorepo builds) so consuming apps supply a single hoisted version and npm does not nest conflicting copies under published packages. + Moves both shared utils from `dependencies` to `peerDependencies` (with `devDependencies` for monorepo builds) so consuming apps supply a single hoisted version and npm does not nest conflicting copies under published packages. ## 1.7.1 @@ -32,13 +105,13 @@ - 31df3a8: fix(deps): move @o2s/framework to peerDependencies in all published packages - `@o2s/framework` was listed in `dependencies` of blocks, integrations, modules, and utils packages. When installed from npm with mismatched versions across the dependency tree, npm would create nested copies of `@o2s/framework` with different class references. This caused NestJS to fail resolving DI tokens (e.g. `SearchService`) because injected class instances came from a different `@o2s/framework` copy than the one registered in the application module. + `@o2s/framework` was listed in `dependencies` of blocks, integrations, modules, and utils packages. When installed from npm with mismatched versions across the dependency tree, npm would create nested copies of `@o2s/framework` with different class references. This caused NestJS to fail resolving DI tokens (e.g. `SearchService`) because injected class instances came from a different `@o2s/framework` copy than the one registered in the application module. - Moved `@o2s/framework` to `peerDependencies` across all affected packages so that the consuming application always provides a single shared copy. Also moved `@o2s/integrations.mocked` to `peerDependencies` in `@o2s/integrations.mocked-dxp`. + Moved `@o2s/framework` to `peerDependencies` across all affected packages so that the consuming application always provides a single shared copy. Also moved `@o2s/integrations.mocked` to `peerDependencies` in `@o2s/integrations.mocked-dxp`. - Updated dependencies [31df3a8] - - @o2s/utils.api-harmonization@0.3.4 - - @o2s/utils.frontend@0.6.1 + - @o2s/utils.api-harmonization@0.3.4 + - @o2s/utils.frontend@0.6.1 ## 1.7.0 @@ -50,15 +123,15 @@ - 7d99d13: docs(api): REST API reference, OpenAPI tooling, and cross-package alignment - Expand `@nestjs/swagger` metadata and related types across framework modules, exports, and CMS block - models. Update billing and orders blocks that call the harmonization API, plus checkout billing - payment UI where needed. Align Algolia, Contentful, Medusa, mocked, mocked-dxp, Strapi, and Zendesk - integrations with the updated contracts, mappers, and tests. + Expand `@nestjs/swagger` metadata and related types across framework modules, exports, and CMS block + models. Update billing and orders blocks that call the harmonization API, plus checkout billing + payment UI where needed. Align Algolia, Contentful, Medusa, mocked, mocked-dxp, Strapi, and Zendesk + integrations with the updated contracts, mappers, and tests. - Updated dependencies [7d99d13] - Updated dependencies [7d99d13] - Updated dependencies [6edc9ca] - - @o2s/framework@1.22.0 + - @o2s/framework@1.22.0 ## 1.6.1 @@ -66,24 +139,24 @@ - 0aaac5b: fix: add missing dependency declarations for turbo boundaries compliance - Declare previously undeclared imports as explicit dependencies across 55 packages. This resolves all `turbo boundaries` violations where packages imported modules not listed in their `package.json`. + Declare previously undeclared imports as explicit dependencies across 55 packages. This resolves all `turbo boundaries` violations where packages imported modules not listed in their `package.json`. - Key dependency categories added: - - `@storybook/nextjs-vite`, `@storybook/react`, `storybook` for story files - - `vitest`, `@nestjs/testing`, `@o2s/vitest-config` for test files - - `lucide-react`, `dayjs`, `string-template`, `class-variance-authority` for runtime code - - `vite` for vitest configs in integrations - - `@o2s/api-harmonization`, `@auth/core`, `@docusaurus/*` for app-level imports + Key dependency categories added: + - `@storybook/nextjs-vite`, `@storybook/react`, `storybook` for story files + - `vitest`, `@nestjs/testing`, `@o2s/vitest-config` for test files + - `lucide-react`, `dayjs`, `string-template`, `class-variance-authority` for runtime code + - `vite` for vitest configs in integrations + - `@o2s/api-harmonization`, `@auth/core`, `@docusaurus/*` for app-level imports - Updated dependencies [e8cdde6] - Updated dependencies [0aaac5b] - Updated dependencies [0aaac5b] - Updated dependencies [7ac16b0] - Updated dependencies [0aaac5b] - - @o2s/ui@1.14.0 - - @o2s/utils.frontend@0.5.2 - - @o2s/configs.integrations@0.7.0 - - @o2s/framework@1.21.0 + - @o2s/ui@1.14.0 + - @o2s/utils.frontend@0.5.2 + - @o2s/configs.integrations@0.7.0 + - @o2s/framework@1.21.0 ## 1.6.0 @@ -99,7 +172,7 @@ - fab2aea: refactor: group Storybook stories by domain and rename UI component directories to PascalCase - Updated dependencies [a7bb35c] - Updated dependencies [fab2aea] - - @o2s/ui@1.13.1 + - @o2s/ui@1.13.1 ## 1.5.2 @@ -107,19 +180,19 @@ - fadbc63: Extract shared block prop types into framework models and migrate block frontend props to the common `BlockWith*` helpers. - This removes duplicated `slug`, `userId`, and `isDraftModeEnabled` definitions and keeps renderer props aligned across blocks. + This removes duplicated `slug`, `userId`, and `isDraftModeEnabled` definitions and keeps renderer props aligned across blocks. - 338cb01: fix(api-harmonization): align typed header usage across services and generated SDK/controller contracts - 338cb01: Refactor header access to use `HeaderName` constants instead of literal header keys across framework controllers, block harmonization services, and mocked auth guards. - This unifies header handling, reduces string-key typos, and aligns modules with the typed headers approach exposed by `@o2s/framework/headers`. + This unifies header handling, reduces string-key typos, and aligns modules with the typed headers approach exposed by `@o2s/framework/headers`. - Updated dependencies [fadbc63] - Updated dependencies [338cb01] - Updated dependencies [338cb01] - Updated dependencies [338cb01] - - @o2s/framework@1.20.1 - - @o2s/utils.api-harmonization@0.3.3 + - @o2s/framework@1.20.1 + - @o2s/utils.api-harmonization@0.3.3 ## 1.5.1 @@ -132,11 +205,11 @@ - Updated dependencies [daf592e] - Updated dependencies [375cd90] - Updated dependencies [98b2e68] - - @o2s/framework@1.20.0 - - @o2s/utils.api-harmonization@0.3.2 - - @o2s/utils.frontend@0.5.1 - - @o2s/utils.logger@1.2.3 - - @o2s/ui@1.13.0 + - @o2s/framework@1.20.0 + - @o2s/utils.api-harmonization@0.3.2 + - @o2s/utils.frontend@0.5.1 + - @o2s/utils.logger@1.2.3 + - @o2s/ui@1.13.0 ## 1.5.0 @@ -163,12 +236,12 @@ - Updated dependencies [8c01be4] - Updated dependencies [ea200fc] - Updated dependencies [cc2e932] - - @o2s/framework@1.18.0 - - @o2s/utils.api-harmonization@0.3.1 - - @o2s/utils.frontend@0.4.1 - - @o2s/utils.logger@1.2.2 - - @o2s/configs.integrations@0.6.0 - - @o2s/ui@1.11.0 + - @o2s/framework@1.18.0 + - @o2s/utils.api-harmonization@0.3.1 + - @o2s/utils.frontend@0.4.1 + - @o2s/utils.logger@1.2.2 + - @o2s/configs.integrations@0.6.0 + - @o2s/ui@1.11.0 ## 1.4.0 @@ -176,29 +249,29 @@ - 72391c1: ### Authorization & PBAC Implementation - This release introduces a comprehensive Policy-Based Access Control system interlaced with Role-Based Access Control. + This release introduces a comprehensive Policy-Based Access Control system interlaced with Role-Based Access Control. - #### Framework & Core - - **`@o2s/framework` (AuthService)**: Enhanced with abstract permission logic (`getPermissions`, `hasPermission`), role checks (`hasRole`, `requireRoles`), and action batching (`canPerformActions`). - - **`@o2s/api-harmonization`**: Implemented global `RolesGuard` and `PermissionsGuard` in `AppModule`. - - **`@o2s/utils.api-harmonization`**: Added `extractUserRolesFromJwt` to unify role extraction from different JWT claims. + #### Framework & Core + - **`@o2s/framework` (AuthService)**: Enhanced with abstract permission logic (`getPermissions`, `hasPermission`), role checks (`hasRole`, `requireRoles`), and action batching (`canPerformActions`). + - **`@o2s/api-harmonization`**: Implemented global `RolesGuard` and `PermissionsGuard` in `AppModule`. + - **`@o2s/utils.api-harmonization`**: Added `extractUserRolesFromJwt` to unify role extraction from different JWT claims. - #### Features - - **Decorators**: New `@Auth.Decorators.Permissions({ resource, actions })` for securing controllers. - - **Data Filtering**: Mappers (e.g., `page.mapper.ts`) now filter UI elements (header/footer navigation) based on user roles. + #### Features + - **Decorators**: New `@Auth.Decorators.Permissions({ resource, actions })` for securing controllers. + - **Data Filtering**: Mappers (e.g., `page.mapper.ts`) now filter UI elements (header/footer navigation) based on user roles. - This provides granular control over resource access and UI visibility based on user roles and permissions. + This provides granular control over resource access and UI visibility based on user roles and permissions. ### Patch Changes - Updated dependencies [1a5a22d] - Updated dependencies [72391c1] - - @o2s/framework@1.16.0 - - @o2s/utils.api-harmonization@0.3.0 - - @o2s/configs.integrations@0.4.0 - - @o2s/ui@1.9.0 - - @o2s/utils.frontend@0.4.0 - - @o2s/utils.logger@1.2.0 + - @o2s/framework@1.16.0 + - @o2s/utils.api-harmonization@0.3.0 + - @o2s/configs.integrations@0.4.0 + - @o2s/ui@1.9.0 + - @o2s/utils.frontend@0.4.0 + - @o2s/utils.logger@1.2.0 ## 1.3.0 @@ -218,11 +291,11 @@ - Updated dependencies [d197b89] - Updated dependencies [cd483b7] - Updated dependencies [d197b89] - - @o2s/ui@1.8.0 - - @o2s/utils.api-harmonization@0.2.0 - - @o2s/configs.integrations@0.3.0 - - @o2s/utils.frontend@0.3.0 - - @o2s/framework@1.15.0 + - @o2s/ui@1.8.0 + - @o2s/utils.api-harmonization@0.2.0 + - @o2s/configs.integrations@0.3.0 + - @o2s/utils.frontend@0.3.0 + - @o2s/framework@1.15.0 ## 1.2.1 @@ -232,7 +305,7 @@ - Updated dependencies [abd3b41] - Updated dependencies [be6f80b] - Updated dependencies [f999bb1] - - @o2s/ui@1.7.1 + - @o2s/ui@1.7.1 ## 1.2.0 @@ -247,12 +320,12 @@ - Updated dependencies [221dc2c] - Updated dependencies [db5b381] - Updated dependencies [c2d9438] - - @o2s/utils.api-harmonization@0.1.3 - - @o2s/configs.integrations@0.2.1 - - @o2s/utils.frontend@0.2.1 - - @o2s/utils.logger@1.1.3 - - @o2s/ui@1.7.0 - - @o2s/framework@1.14.0 + - @o2s/utils.api-harmonization@0.1.3 + - @o2s/configs.integrations@0.2.1 + - @o2s/utils.frontend@0.2.1 + - @o2s/utils.logger@1.1.3 + - @o2s/ui@1.7.0 + - @o2s/framework@1.14.0 ## 1.1.1 @@ -265,12 +338,12 @@ - Updated dependencies [2c780d5] - Updated dependencies [0354126] - Updated dependencies [1653b74] - - @o2s/framework@1.13.0 - - @o2s/configs.integrations@0.2.0 - - @o2s/ui@1.6.0 - - @o2s/utils.frontend@0.2.0 - - @o2s/utils.api-harmonization@0.1.2 - - @o2s/utils.logger@1.1.2 + - @o2s/framework@1.13.0 + - @o2s/configs.integrations@0.2.0 + - @o2s/ui@1.6.0 + - @o2s/utils.frontend@0.2.0 + - @o2s/utils.api-harmonization@0.1.2 + - @o2s/utils.logger@1.1.2 ## 1.1.0 @@ -283,7 +356,7 @@ - Updated dependencies [9ad8658] - Updated dependencies [9ad8658] - - @o2s/ui@1.4.0 + - @o2s/ui@1.4.0 ## 1.0.0 @@ -294,8 +367,8 @@ ### Patch Changes - Updated dependencies [2421fb2] - - @o2s/utils.api-harmonization@0.1.0 - - @o2s/configs.integrations@0.1.0 - - @o2s/utils.frontend@0.1.0 - - @o2s/framework@1.11.0 - - @o2s/ui@1.3.0 + - @o2s/utils.api-harmonization@0.1.0 + - @o2s/configs.integrations@0.1.0 + - @o2s/utils.frontend@0.1.0 + - @o2s/framework@1.11.0 + - @o2s/ui@1.3.0 diff --git a/packages/blocks/orders/orders-summary/package.json b/packages/blocks/orders/orders-summary/package.json index b88940f39..7f9481ef5 100644 --- a/packages/blocks/orders/orders-summary/package.json +++ b/packages/blocks/orders/orders-summary/package.json @@ -1,6 +1,6 @@ { "name": "@o2s/blocks.orders-summary", - "version": "2.0.0", + "version": "2.0.1", "private": false, "license": "MIT", "description": "A block displaying a summary of orders, including statistics and recent activity.", diff --git a/packages/blocks/products/product-details/CHANGELOG.md b/packages/blocks/products/product-details/CHANGELOG.md index 3efa1ca3b..4bb1a5d07 100644 --- a/packages/blocks/products/product-details/CHANGELOG.md +++ b/packages/blocks/products/product-details/CHANGELOG.md @@ -1,16 +1,89 @@ # @o2s/blocks.product-details +## 1.0.1 + +### Patch Changes + +- f8591c1: Threaded the CMS `preview` flag through every block so draft content actually renders in draft + mode. Previously only 5 of ~42 blocks passed it - the rest always fetched published content, so CMS + live preview (and any draft-mode view) showed stale data for most of the page. + + Per block, the flag now survives all four hops: the renderer forwards `isDraftModeEnabled` (added + to the framework's `BaseBlockProps` - `renderBlocks` already passed it to every block), the server + component sends `preview` on its block fetch, the request DTO declares it, and the API + Harmonization service forwards it to `CmsService.getBlockConfig`. + +- 270355f: refactor(blocks): build the block SDKs on the shared instance + + Every block built an SDK of its own out of the same 15 lines: the API url resolution, the logger settings with an `@ts-expect-error` per environment variable, and a method-by-method pick out of its own factory. They now take the instance from `@o2s/utils.frontend/sdk` and extend it with everything their factory returns, which leaves one `ofetch` client and one logger for all of them instead of 42, and drops the undeclared dependency on `next-runtime-env` that every block relied on. + + `order-details` gains `sdk.blocks.getOrderPdf`: its factory has always defined the method, and only the method-by-method pick left it out. + +- cb50455: chore(deps): update dependencies +- 681d153: chore(deps): update dependencies +- 457b243: feat(framework): add `createBlockRequest` helper for block SDK methods + + Adds `createBlockRequest` to `@o2s/framework/sdk`. It creates the request function used by the methods of a block (or module) SDK and takes care of the boilerplate that was previously copy-pasted into every method: merging the default API headers with the caller's headers and the access token, serializing query params, typing the response and wrapping failures into a `BlockRequestError` (which exposes `status`, `data` and the original error as `cause`). + + `getApiHeaders` is now provided by `@o2s/framework/headers` and re-exported by `@o2s/utils.frontend` (`Utils.Headers.getApiHeaders`), so the default headers are defined in a single place. All block SDKs, the SurveyJS module SDK and the block generator template use the new helper. + +- 3f1c980: chore(deps): update dependencies +- 1a520c8: chore: dependency update pass + + Update dependencies across the monorepo. Highlights: NestJS 12 (Express 5), + TypeScript 6 for type-checking/lint with native TypeScript 7 compiling the + package builds, Vite 8, Docusaurus 3.10, Storybook 10.6, @medusajs 2.20, + redis 6, surveyjs (core + react-ui) 3, and assorted minor/patch bumps. No + public package API changed; peer ranges were bumped to match (notably + @nestjs/* to ^12). + +- 02401b2: Routine dependency maintenance (patch/minor, no code changes): `@medusajs/js-sdk` & `@medusajs/types` to 2.20.1, `survey-core` & `survey-react-ui` to 3.0.3, `lucide-react` to 1.40, `sass` to 1.104, `docusaurus-plugin-sass` to 0.2.7. +- c070aff: chore(deps): update dependencies +- b7f8177: chore(deps): update dependencies +- cb50455: chore(deps): update dependencies +- 3f1c980: chore(deps): update dependencies +- 3f1c980: chore(deps): update dependencies +- Updated dependencies [010ae15] +- Updated dependencies [f8591c1] +- Updated dependencies [cb50455] +- Updated dependencies [c8a58ad] +- Updated dependencies [681d153] +- Updated dependencies [457b243] +- Updated dependencies [1a520c8] +- Updated dependencies [02401b2] +- Updated dependencies [92c0bf8] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [cb50455] +- Updated dependencies [dfc3fbb] +- Updated dependencies [b775189] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [270355f] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] + - @o2s/configs.integrations@1.1.0 + - @o2s/framework@1.24.0 + - @o2s/utils.api-harmonization@1.1.0 + - @o2s/utils.frontend@1.1.0 + - @o2s/utils.logger@1.2.4 + - @o2s/ui@2.1.0 + ## 1.0.0 ### Patch Changes - Updated dependencies [86b4c5a] - Updated dependencies [24fb9a9] - - @o2s/framework@1.23.0 - - @o2s/ui@2.0.0 - - @o2s/configs.integrations@1.0.0 - - @o2s/utils.api-harmonization@1.0.0 - - @o2s/utils.frontend@1.0.0 + - @o2s/framework@1.23.0 + - @o2s/ui@2.0.0 + - @o2s/configs.integrations@1.0.0 + - @o2s/utils.api-harmonization@1.0.0 + - @o2s/utils.frontend@1.0.0 ## 0.6.3 @@ -24,7 +97,7 @@ - 025bfb3: fix(deps): declare `@o2s/utils.frontend` and `@o2s/utils.api-harmonization` as peer dependencies in blocks and surveyjs module - Moves both shared utils from `dependencies` to `peerDependencies` (with `devDependencies` for monorepo builds) so consuming apps supply a single hoisted version and npm does not nest conflicting copies under published packages. + Moves both shared utils from `dependencies` to `peerDependencies` (with `devDependencies` for monorepo builds) so consuming apps supply a single hoisted version and npm does not nest conflicting copies under published packages. ## 0.6.1 @@ -32,13 +105,13 @@ - 31df3a8: fix(deps): move @o2s/framework to peerDependencies in all published packages - `@o2s/framework` was listed in `dependencies` of blocks, integrations, modules, and utils packages. When installed from npm with mismatched versions across the dependency tree, npm would create nested copies of `@o2s/framework` with different class references. This caused NestJS to fail resolving DI tokens (e.g. `SearchService`) because injected class instances came from a different `@o2s/framework` copy than the one registered in the application module. + `@o2s/framework` was listed in `dependencies` of blocks, integrations, modules, and utils packages. When installed from npm with mismatched versions across the dependency tree, npm would create nested copies of `@o2s/framework` with different class references. This caused NestJS to fail resolving DI tokens (e.g. `SearchService`) because injected class instances came from a different `@o2s/framework` copy than the one registered in the application module. - Moved `@o2s/framework` to `peerDependencies` across all affected packages so that the consuming application always provides a single shared copy. Also moved `@o2s/integrations.mocked` to `peerDependencies` in `@o2s/integrations.mocked-dxp`. + Moved `@o2s/framework` to `peerDependencies` across all affected packages so that the consuming application always provides a single shared copy. Also moved `@o2s/integrations.mocked` to `peerDependencies` in `@o2s/integrations.mocked-dxp`. - Updated dependencies [31df3a8] - - @o2s/utils.api-harmonization@0.3.4 - - @o2s/utils.frontend@0.6.1 + - @o2s/utils.api-harmonization@0.3.4 + - @o2s/utils.frontend@0.6.1 ## 0.6.0 @@ -51,7 +124,7 @@ - Updated dependencies [7d99d13] - Updated dependencies [7d99d13] - Updated dependencies [6edc9ca] - - @o2s/framework@1.22.0 + - @o2s/framework@1.22.0 ## 0.5.0 @@ -62,8 +135,8 @@ ### Patch Changes - Updated dependencies [1dbf967] - - @o2s/utils.frontend@0.6.0 - - @o2s/ui@1.15.0 + - @o2s/utils.frontend@0.6.0 + - @o2s/ui@1.15.0 ## 0.4.2 @@ -77,28 +150,28 @@ - e8cdde6: feat: add mitt-based event bus (`@o2s/ui/event-bus`), cart header badge with `cart:changed`, SDK `GET /carts/current`, and emit `cart:changed` from product list, product details, recommended products, and cart block - refactor: read guest cart localStorage key from `NEXT_PUBLIC_CART_ID_LOCAL_STORAGE_KEY` (required; set in e.g. `apps/frontend/.env.development`) across shop and checkout blocks + refactor: read guest cart localStorage key from `NEXT_PUBLIC_CART_ID_LOCAL_STORAGE_KEY` (required; set in e.g. `apps/frontend/.env.development`) across shop and checkout blocks - 0aaac5b: fix: add missing dependency declarations for turbo boundaries compliance - Declare previously undeclared imports as explicit dependencies across 55 packages. This resolves all `turbo boundaries` violations where packages imported modules not listed in their `package.json`. + Declare previously undeclared imports as explicit dependencies across 55 packages. This resolves all `turbo boundaries` violations where packages imported modules not listed in their `package.json`. - Key dependency categories added: - - `@storybook/nextjs-vite`, `@storybook/react`, `storybook` for story files - - `vitest`, `@nestjs/testing`, `@o2s/vitest-config` for test files - - `lucide-react`, `dayjs`, `string-template`, `class-variance-authority` for runtime code - - `vite` for vitest configs in integrations - - `@o2s/api-harmonization`, `@auth/core`, `@docusaurus/*` for app-level imports + Key dependency categories added: + - `@storybook/nextjs-vite`, `@storybook/react`, `storybook` for story files + - `vitest`, `@nestjs/testing`, `@o2s/vitest-config` for test files + - `lucide-react`, `dayjs`, `string-template`, `class-variance-authority` for runtime code + - `vite` for vitest configs in integrations + - `@o2s/api-harmonization`, `@auth/core`, `@docusaurus/*` for app-level imports - Updated dependencies [e8cdde6] - Updated dependencies [0aaac5b] - Updated dependencies [0aaac5b] - Updated dependencies [7ac16b0] - Updated dependencies [0aaac5b] - - @o2s/ui@1.14.0 - - @o2s/utils.frontend@0.5.2 - - @o2s/configs.integrations@0.7.0 - - @o2s/framework@1.21.0 + - @o2s/ui@1.14.0 + - @o2s/utils.frontend@0.5.2 + - @o2s/configs.integrations@0.7.0 + - @o2s/framework@1.21.0 ## 0.4.0 @@ -114,7 +187,7 @@ - fab2aea: refactor: group Storybook stories by domain and rename UI component directories to PascalCase - Updated dependencies [a7bb35c] - Updated dependencies [fab2aea] - - @o2s/ui@1.13.1 + - @o2s/ui@1.13.1 ## 0.3.1 @@ -122,19 +195,19 @@ - fadbc63: Extract shared block prop types into framework models and migrate block frontend props to the common `BlockWith*` helpers. - This removes duplicated `slug`, `userId`, and `isDraftModeEnabled` definitions and keeps renderer props aligned across blocks. + This removes duplicated `slug`, `userId`, and `isDraftModeEnabled` definitions and keeps renderer props aligned across blocks. - 338cb01: fix(api-harmonization): align typed header usage across services and generated SDK/controller contracts - 338cb01: Refactor header access to use `HeaderName` constants instead of literal header keys across framework controllers, block harmonization services, and mocked auth guards. - This unifies header handling, reduces string-key typos, and aligns modules with the typed headers approach exposed by `@o2s/framework/headers`. + This unifies header handling, reduces string-key typos, and aligns modules with the typed headers approach exposed by `@o2s/framework/headers`. - Updated dependencies [fadbc63] - Updated dependencies [338cb01] - Updated dependencies [338cb01] - Updated dependencies [338cb01] - - @o2s/framework@1.20.1 - - @o2s/utils.api-harmonization@0.3.3 + - @o2s/framework@1.20.1 + - @o2s/utils.api-harmonization@0.3.3 ## 0.3.0 @@ -151,25 +224,25 @@ - Updated dependencies [daf592e] - Updated dependencies [375cd90] - Updated dependencies [98b2e68] - - @o2s/framework@1.20.0 - - @o2s/utils.api-harmonization@0.3.2 - - @o2s/utils.frontend@0.5.1 - - @o2s/utils.logger@1.2.3 - - @o2s/ui@1.13.0 + - @o2s/framework@1.20.0 + - @o2s/utils.api-harmonization@0.3.2 + - @o2s/utils.frontend@0.5.1 + - @o2s/utils.logger@1.2.3 + - @o2s/ui@1.13.0 ## 0.2.0 ### Minor Changes - 1f2965c: feat(products): Medusa integration for product catalog - - Add product list and product detail pages powered by Medusa Admin SDK - - Support SEO-friendly URLs using product handles and variant slugs (e.g. `/products/sweatpants/s-blue`) - - Add variant selection with option-based navigation between product variants - - Map Medusa product data (prices, categories, tags, images, specs) to the unified product model - - Extract key specs and detailed specs from Medusa variant metadata and attributes - - Add related products support via custom Medusa product references API - - Implement lazy initialization for MedusaJS service to improve startup performance - - Add localized mocked product data (EN, DE, PL) with variant overrides for testing + - Add product list and product detail pages powered by Medusa Admin SDK + - Support SEO-friendly URLs using product handles and variant slugs (e.g. `/products/sweatpants/s-blue`) + - Add variant selection with option-based navigation between product variants + - Map Medusa product data (prices, categories, tags, images, specs) to the unified product model + - Extract key specs and detailed specs from Medusa variant metadata and attributes + - Add related products support via custom Medusa product references API + - Implement lazy initialization for MedusaJS service to improve startup performance + - Add localized mocked product data (EN, DE, PL) with variant overrides for testing - fcf14d2: Configure Storybook to use package README.md as documentation source - 600d5ac: chore: add create-o2s-app flag to package.json in all blocks and integrations @@ -183,9 +256,9 @@ - ea200fc: chore(deps): update dependencies - cc2e932: fix: prevent multiple carousels from responding to arrow keys at the same time - Added managed keyboard control for Swiper-based carousels so only the active carousel handles left/right arrows. - Keyboard control is activated by focus/pointer interaction on a carousel, without any default active carousel that captures arrow keys before interaction. - Introduced automatic `keyboardCarouselId` resolution when it is not provided in props. + Added managed keyboard control for Swiper-based carousels so only the active carousel handles left/right arrows. + Keyboard control is activated by focus/pointer interaction on a carousel, without any default active carousel that captures arrow keys before interaction. + Introduced automatic `keyboardCarouselId` resolution when it is not provided in props. - Updated dependencies [46d4077] - Updated dependencies [a288b11] @@ -199,12 +272,12 @@ - Updated dependencies [8c01be4] - Updated dependencies [ea200fc] - Updated dependencies [cc2e932] - - @o2s/framework@1.18.0 - - @o2s/utils.api-harmonization@0.3.1 - - @o2s/utils.frontend@0.4.1 - - @o2s/utils.logger@1.2.2 - - @o2s/configs.integrations@0.6.0 - - @o2s/ui@1.11.0 + - @o2s/framework@1.18.0 + - @o2s/utils.api-harmonization@0.3.1 + - @o2s/utils.frontend@0.4.1 + - @o2s/utils.logger@1.2.2 + - @o2s/configs.integrations@0.6.0 + - @o2s/ui@1.11.0 ## 0.1.0 @@ -212,26 +285,26 @@ - 72391c1: ### Authorization & PBAC Implementation - This release introduces a comprehensive Policy-Based Access Control system interlaced with Role-Based Access Control. + This release introduces a comprehensive Policy-Based Access Control system interlaced with Role-Based Access Control. - #### Framework & Core - - **`@o2s/framework` (AuthService)**: Enhanced with abstract permission logic (`getPermissions`, `hasPermission`), role checks (`hasRole`, `requireRoles`), and action batching (`canPerformActions`). - - **`@o2s/api-harmonization`**: Implemented global `RolesGuard` and `PermissionsGuard` in `AppModule`. - - **`@o2s/utils.api-harmonization`**: Added `extractUserRolesFromJwt` to unify role extraction from different JWT claims. + #### Framework & Core + - **`@o2s/framework` (AuthService)**: Enhanced with abstract permission logic (`getPermissions`, `hasPermission`), role checks (`hasRole`, `requireRoles`), and action batching (`canPerformActions`). + - **`@o2s/api-harmonization`**: Implemented global `RolesGuard` and `PermissionsGuard` in `AppModule`. + - **`@o2s/utils.api-harmonization`**: Added `extractUserRolesFromJwt` to unify role extraction from different JWT claims. - #### Features - - **Decorators**: New `@Auth.Decorators.Permissions({ resource, actions })` for securing controllers. - - **Data Filtering**: Mappers (e.g., `page.mapper.ts`) now filter UI elements (header/footer navigation) based on user roles. + #### Features + - **Decorators**: New `@Auth.Decorators.Permissions({ resource, actions })` for securing controllers. + - **Data Filtering**: Mappers (e.g., `page.mapper.ts`) now filter UI elements (header/footer navigation) based on user roles. - This provides granular control over resource access and UI visibility based on user roles and permissions. + This provides granular control over resource access and UI visibility based on user roles and permissions. ### Patch Changes - Updated dependencies [1a5a22d] - Updated dependencies [72391c1] - - @o2s/framework@1.16.0 - - @o2s/utils.api-harmonization@0.3.0 - - @o2s/configs.integrations@0.4.0 - - @o2s/ui@1.9.0 - - @o2s/utils.frontend@0.4.0 - - @o2s/utils.logger@1.2.0 + - @o2s/framework@1.16.0 + - @o2s/utils.api-harmonization@0.3.0 + - @o2s/configs.integrations@0.4.0 + - @o2s/ui@1.9.0 + - @o2s/utils.frontend@0.4.0 + - @o2s/utils.logger@1.2.0 diff --git a/packages/blocks/products/product-details/package.json b/packages/blocks/products/product-details/package.json index ef4b385a8..86b0be4b4 100644 --- a/packages/blocks/products/product-details/package.json +++ b/packages/blocks/products/product-details/package.json @@ -1,6 +1,6 @@ { "name": "@o2s/blocks.product-details", - "version": "1.0.0", + "version": "1.0.1", "private": false, "license": "MIT", "description": "A block for displaying comprehensive product information including title, images, price, description.", diff --git a/packages/blocks/products/product-list/CHANGELOG.md b/packages/blocks/products/product-list/CHANGELOG.md index 41287fda3..7ca0734e6 100644 --- a/packages/blocks/products/product-list/CHANGELOG.md +++ b/packages/blocks/products/product-list/CHANGELOG.md @@ -1,16 +1,172 @@ # @o2s/blocks.product-list +## 1.1.0 + +### Minor Changes + +- ee42afd: feat(frontend): server-rendered, indexable URLs for list filters + + Filter params reached the browser only: a page always rendered with the default filters and the client + replaced them afterwards, so `/products?category=TOOLS` served the full catalogue to anyone opening the + link (a crawler included) and every filtered variant canonicalised to the bare page. + + `searchParams` now travel from the page through `renderBlocks` into the blocks (`BlockSearchParams` on + `BaseBlockProps`), and the product list resolves them into its query server-side. The block query takes + a 1-based `page` and turns it into an `offset` with the page size from the CMS config, which only the + API knows. With the server rendering the filtered state, the client's mount refetch is gone, so a + shared link costs one request instead of two. + + Its params also lost the `product_` prefix: `useUrlFilters` accepts `filterKeys` in place of a + `namespace`, which is what a public, indexed list needs to have plain, linkable URLs. Facet values are + rendered as real links next to the filter controls, because a crawler follows `` and does not + operate a select, and `generateSeo` keeps the index clean: one value of one whitelisted facet is + self-canonical and indexable, while sorting, deep pages and facet combinations canonicalise back and + are marked `noindex, follow`. + + Multi-value restore from the URL is now limited to toggle groups. A select writes a single string back + whatever `allowMultiple` says, so restoring an array into one only tripped React's `` check +- cb50455: chore(deps): update dependencies +- ee42afd: refactor(ui): one list of the keys that describe a block rather than a filter + + The same idea was written out three times, and the lists had drifted: the active-filter counter skipped `offset`, `limit` and `id`, the filter badges skipped those plus `viewMode`, and the URL serialisation skipped only `id` and `limit` while checking `offset` separately. + + `BLOCK_STATE_KEYS` in `use-url-filters.utils` is now the single list, and the other two are derived from it: `DEFAULT_EXCLUDED_KEYS` drops the offset, because it is not left out of the URL but written as the 1-based `page`, and the badges add the view toggle, which is a display choice rather than a filter. The difference that used to be an accident is now one `filter` call with the reason next to it. + + `parseFiltersFromSearchParams` is also generic over the block's query now, so it returns `Partial` and the five server components no longer cast its result. A query string carries no types, so the assertion happens once inside the helper instead of at every call site, and each call names the query it is building. + +- ee42afd: refactor(utils.frontend): one hook for wiring a list block to the URL + + Each list block repeated the same forty lines around `useUrlFilters`, which is deliberately framework-agnostic and therefore takes its inputs from the caller: the params snapshot, the History API writer, and the multi-value keys, filter keys and starting view mode derived from the block's CMS filter config. + + `Hooks.useListFilters` does all of it, so a block passes its defaults, its namespace and its filter config. Only the two values that come from `next/navigation` stay with the block, which keeps this package free of a dependency on Next. A block with a namespace gets prefixed params; one without gets plain, linkable ones and its filter keys are derived, so the two conventions need no extra flag. + +- ee42afd: refactor(framework): one pagination resolver for the list blocks + + Every list block carried its own copy of the same two helpers, turning a query's `limit`, `offset` and `page` into the window to fetch. `Utils.Pagination.resolvePagination` in `@o2s/utils.api-harmonization` replaces all five: it takes the pagination a URL can carry (`Models.Pagination.PaginatedQuery`, structurally satisfied by any block query, so a block no longer types the helper with its own class) plus the page size to fall back on, and returns the `limit` and `offset` to use. The query shape stays a model in `@o2s/framework`, while the resolving lives with the other API-side helpers. + + `PaginatedQuery` is kept apart from `PaginationQuery`, which the domain modules extend: `page` is consumed by the block API and never reaches them, so advertising it in their contracts would promise integrations something they never receive. + + Two behaviours change with the move. A page size counts only as a whole number of rows above zero, so `?limit=-5` falls back to the CMS config instead of travelling on as a negative limit; the unit tests for the new helper are what surfaced it. + + And the fallback page size is no longer a single row. Four of the five blocks fell back to `limit: 1` when neither the query nor the CMS config named one. That fallback was inherited, and reachable, because `pagination` is optional in the CMS block models, so an entry without it rendered a one-row list. `Utils.Pagination.DEFAULT_LIMIT` (10) is the shared fallback now; the product list keeps its own 12, which matches its three-column grid. + +- 3f1c980: chore(deps): update dependencies +- 3f1c980: chore(deps): update dependencies +- Updated dependencies [010ae15] +- Updated dependencies [f8591c1] +- Updated dependencies [cb50455] +- Updated dependencies [c8a58ad] +- Updated dependencies [681d153] +- Updated dependencies [457b243] +- Updated dependencies [1a520c8] +- Updated dependencies [02401b2] +- Updated dependencies [92c0bf8] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [cb50455] +- Updated dependencies [dfc3fbb] +- Updated dependencies [b775189] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [270355f] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] + - @o2s/configs.integrations@1.1.0 + - @o2s/framework@1.24.0 + - @o2s/utils.api-harmonization@1.1.0 + - @o2s/utils.frontend@1.1.0 + - @o2s/utils.logger@1.2.4 + - @o2s/ui@2.1.0 + ## 2.0.0 ### Patch Changes - Updated dependencies [86b4c5a] - Updated dependencies [24fb9a9] - - @o2s/framework@1.23.0 - - @o2s/ui@2.0.0 - - @o2s/configs.integrations@1.0.0 - - @o2s/utils.api-harmonization@1.0.0 - - @o2s/utils.frontend@1.0.0 + - @o2s/framework@1.23.0 + - @o2s/ui@2.0.0 + - @o2s/configs.integrations@1.0.0 + - @o2s/utils.api-harmonization@1.0.0 + - @o2s/utils.frontend@1.0.0 ## 1.10.3 @@ -24,7 +141,7 @@ - 025bfb3: fix(deps): declare `@o2s/utils.frontend` and `@o2s/utils.api-harmonization` as peer dependencies in blocks and surveyjs module - Moves both shared utils from `dependencies` to `peerDependencies` (with `devDependencies` for monorepo builds) so consuming apps supply a single hoisted version and npm does not nest conflicting copies under published packages. + Moves both shared utils from `dependencies` to `peerDependencies` (with `devDependencies` for monorepo builds) so consuming apps supply a single hoisted version and npm does not nest conflicting copies under published packages. ## 1.10.1 @@ -32,13 +149,13 @@ - 31df3a8: fix(deps): move @o2s/framework to peerDependencies in all published packages - `@o2s/framework` was listed in `dependencies` of blocks, integrations, modules, and utils packages. When installed from npm with mismatched versions across the dependency tree, npm would create nested copies of `@o2s/framework` with different class references. This caused NestJS to fail resolving DI tokens (e.g. `SearchService`) because injected class instances came from a different `@o2s/framework` copy than the one registered in the application module. + `@o2s/framework` was listed in `dependencies` of blocks, integrations, modules, and utils packages. When installed from npm with mismatched versions across the dependency tree, npm would create nested copies of `@o2s/framework` with different class references. This caused NestJS to fail resolving DI tokens (e.g. `SearchService`) because injected class instances came from a different `@o2s/framework` copy than the one registered in the application module. - Moved `@o2s/framework` to `peerDependencies` across all affected packages so that the consuming application always provides a single shared copy. Also moved `@o2s/integrations.mocked` to `peerDependencies` in `@o2s/integrations.mocked-dxp`. + Moved `@o2s/framework` to `peerDependencies` across all affected packages so that the consuming application always provides a single shared copy. Also moved `@o2s/integrations.mocked` to `peerDependencies` in `@o2s/integrations.mocked-dxp`. - Updated dependencies [31df3a8] - - @o2s/utils.api-harmonization@0.3.4 - - @o2s/utils.frontend@0.6.1 + - @o2s/utils.api-harmonization@0.3.4 + - @o2s/utils.frontend@0.6.1 ## 1.10.0 @@ -51,7 +168,7 @@ - Updated dependencies [7d99d13] - Updated dependencies [7d99d13] - Updated dependencies [6edc9ca] - - @o2s/framework@1.22.0 + - @o2s/framework@1.22.0 ## 1.9.0 @@ -63,24 +180,24 @@ - 0aaac5b: fix: add missing dependency declarations for turbo boundaries compliance - Declare previously undeclared imports as explicit dependencies across 55 packages. This resolves all `turbo boundaries` violations where packages imported modules not listed in their `package.json`. + Declare previously undeclared imports as explicit dependencies across 55 packages. This resolves all `turbo boundaries` violations where packages imported modules not listed in their `package.json`. - Key dependency categories added: - - `@storybook/nextjs-vite`, `@storybook/react`, `storybook` for story files - - `vitest`, `@nestjs/testing`, `@o2s/vitest-config` for test files - - `lucide-react`, `dayjs`, `string-template`, `class-variance-authority` for runtime code - - `vite` for vitest configs in integrations - - `@o2s/api-harmonization`, `@auth/core`, `@docusaurus/*` for app-level imports + Key dependency categories added: + - `@storybook/nextjs-vite`, `@storybook/react`, `storybook` for story files + - `vitest`, `@nestjs/testing`, `@o2s/vitest-config` for test files + - `lucide-react`, `dayjs`, `string-template`, `class-variance-authority` for runtime code + - `vite` for vitest configs in integrations + - `@o2s/api-harmonization`, `@auth/core`, `@docusaurus/*` for app-level imports - Updated dependencies [e8cdde6] - Updated dependencies [0aaac5b] - Updated dependencies [0aaac5b] - Updated dependencies [7ac16b0] - Updated dependencies [0aaac5b] - - @o2s/ui@1.14.0 - - @o2s/utils.frontend@0.5.2 - - @o2s/configs.integrations@0.7.0 - - @o2s/framework@1.21.0 + - @o2s/ui@1.14.0 + - @o2s/utils.frontend@0.5.2 + - @o2s/configs.integrations@0.7.0 + - @o2s/framework@1.21.0 ## 1.8.0 @@ -100,7 +217,7 @@ - fab2aea: refactor: group Storybook stories by domain and rename UI component directories to PascalCase - Updated dependencies [a7bb35c] - Updated dependencies [fab2aea] - - @o2s/ui@1.13.1 + - @o2s/ui@1.13.1 ## 1.7.2 @@ -108,23 +225,23 @@ - fadbc63: Extract shared block prop types into framework models and migrate block frontend props to the common `BlockWith*` helpers. - This removes duplicated `slug`, `userId`, and `isDraftModeEnabled` definitions and keeps renderer props aligned across blocks. + This removes duplicated `slug`, `userId`, and `isDraftModeEnabled` definitions and keeps renderer props aligned across blocks. - fadbc63: Align renderer prop types with runtime usage across blocks. - Restore missing `isDraftModeEnabled` and `userId` coverage in renderer prop contracts and rename the misnamed notification details renderer prop type for consistency. + Restore missing `isDraftModeEnabled` and `userId` coverage in renderer prop contracts and rename the misnamed notification details renderer prop type for consistency. - 338cb01: fix(api-harmonization): align typed header usage across services and generated SDK/controller contracts - 338cb01: Refactor header access to use `HeaderName` constants instead of literal header keys across framework controllers, block harmonization services, and mocked auth guards. - This unifies header handling, reduces string-key typos, and aligns modules with the typed headers approach exposed by `@o2s/framework/headers`. + This unifies header handling, reduces string-key typos, and aligns modules with the typed headers approach exposed by `@o2s/framework/headers`. - Updated dependencies [fadbc63] - Updated dependencies [338cb01] - Updated dependencies [338cb01] - Updated dependencies [338cb01] - - @o2s/framework@1.20.1 - - @o2s/utils.api-harmonization@0.3.3 + - @o2s/framework@1.20.1 + - @o2s/utils.api-harmonization@0.3.3 ## 1.7.1 @@ -137,11 +254,11 @@ - Updated dependencies [daf592e] - Updated dependencies [375cd90] - Updated dependencies [98b2e68] - - @o2s/framework@1.20.0 - - @o2s/utils.api-harmonization@0.3.2 - - @o2s/utils.frontend@0.5.1 - - @o2s/utils.logger@1.2.3 - - @o2s/ui@1.13.0 + - @o2s/framework@1.20.0 + - @o2s/utils.api-harmonization@0.3.2 + - @o2s/utils.frontend@0.5.1 + - @o2s/utils.logger@1.2.3 + - @o2s/ui@1.13.0 ## 1.7.0 @@ -168,12 +285,12 @@ - Updated dependencies [8c01be4] - Updated dependencies [ea200fc] - Updated dependencies [cc2e932] - - @o2s/framework@1.18.0 - - @o2s/utils.api-harmonization@0.3.1 - - @o2s/utils.frontend@0.4.1 - - @o2s/utils.logger@1.2.2 - - @o2s/configs.integrations@0.6.0 - - @o2s/ui@1.11.0 + - @o2s/framework@1.18.0 + - @o2s/utils.api-harmonization@0.3.1 + - @o2s/utils.frontend@0.4.1 + - @o2s/utils.logger@1.2.2 + - @o2s/configs.integrations@0.6.0 + - @o2s/ui@1.11.0 ## 1.6.0 @@ -182,29 +299,29 @@ - 1a5a22d: Added ticket creation functionality to the Zendesk integration. Users can now create tickets via POST /tickets with attachments and custom fields. Added custom field mapping from Survey.js format to Zendesk custom fields via new zendesk-field.mapper. Updated table columns on TicketList component to display: ticket type (topic), status, and last updated date. Added display of custom field values from ticket properties on TicketDetails. Updated mapper mocks in cms - 72391c1: ### Authorization & PBAC Implementation - This release introduces a comprehensive Policy-Based Access Control system interlaced with Role-Based Access Control. + This release introduces a comprehensive Policy-Based Access Control system interlaced with Role-Based Access Control. - #### Framework & Core - - **`@o2s/framework` (AuthService)**: Enhanced with abstract permission logic (`getPermissions`, `hasPermission`), role checks (`hasRole`, `requireRoles`), and action batching (`canPerformActions`). - - **`@o2s/api-harmonization`**: Implemented global `RolesGuard` and `PermissionsGuard` in `AppModule`. - - **`@o2s/utils.api-harmonization`**: Added `extractUserRolesFromJwt` to unify role extraction from different JWT claims. + #### Framework & Core + - **`@o2s/framework` (AuthService)**: Enhanced with abstract permission logic (`getPermissions`, `hasPermission`), role checks (`hasRole`, `requireRoles`), and action batching (`canPerformActions`). + - **`@o2s/api-harmonization`**: Implemented global `RolesGuard` and `PermissionsGuard` in `AppModule`. + - **`@o2s/utils.api-harmonization`**: Added `extractUserRolesFromJwt` to unify role extraction from different JWT claims. - #### Features - - **Decorators**: New `@Auth.Decorators.Permissions({ resource, actions })` for securing controllers. - - **Data Filtering**: Mappers (e.g., `page.mapper.ts`) now filter UI elements (header/footer navigation) based on user roles. + #### Features + - **Decorators**: New `@Auth.Decorators.Permissions({ resource, actions })` for securing controllers. + - **Data Filtering**: Mappers (e.g., `page.mapper.ts`) now filter UI elements (header/footer navigation) based on user roles. - This provides granular control over resource access and UI visibility based on user roles and permissions. + This provides granular control over resource access and UI visibility based on user roles and permissions. ### Patch Changes - Updated dependencies [1a5a22d] - Updated dependencies [72391c1] - - @o2s/framework@1.16.0 - - @o2s/utils.api-harmonization@0.3.0 - - @o2s/configs.integrations@0.4.0 - - @o2s/ui@1.9.0 - - @o2s/utils.frontend@0.4.0 - - @o2s/utils.logger@1.2.0 + - @o2s/framework@1.16.0 + - @o2s/utils.api-harmonization@0.3.0 + - @o2s/configs.integrations@0.4.0 + - @o2s/ui@1.9.0 + - @o2s/utils.frontend@0.4.0 + - @o2s/utils.logger@1.2.0 ## 1.5.0 @@ -213,8 +330,8 @@ - e11b23a: resolving linter errors - 79b7c87: add inline filters variant with expandable sections - cd483b7: - add MoreActionsMenu component and refactor ActionList - - migrate OrderDetails and TicketList to unified ActionList API - - improve breadcrumbs visibility and card border styling + - migrate OrderDetails and TicketList to unified ActionList API + - improve breadcrumbs visibility and card border styling ### Patch Changes @@ -228,11 +345,11 @@ - Updated dependencies [d197b89] - Updated dependencies [cd483b7] - Updated dependencies [d197b89] - - @o2s/ui@1.8.0 - - @o2s/utils.api-harmonization@0.2.0 - - @o2s/configs.integrations@0.3.0 - - @o2s/utils.frontend@0.3.0 - - @o2s/framework@1.15.0 + - @o2s/ui@1.8.0 + - @o2s/utils.api-harmonization@0.2.0 + - @o2s/configs.integrations@0.3.0 + - @o2s/utils.frontend@0.3.0 + - @o2s/framework@1.15.0 ## 1.4.0 @@ -248,12 +365,12 @@ - Updated dependencies [221dc2c] - Updated dependencies [db5b381] - Updated dependencies [c2d9438] - - @o2s/utils.api-harmonization@0.1.3 - - @o2s/configs.integrations@0.2.1 - - @o2s/utils.frontend@0.2.1 - - @o2s/utils.logger@1.1.3 - - @o2s/ui@1.7.0 - - @o2s/framework@1.14.0 + - @o2s/utils.api-harmonization@0.1.3 + - @o2s/configs.integrations@0.2.1 + - @o2s/utils.frontend@0.2.1 + - @o2s/utils.logger@1.1.3 + - @o2s/ui@1.7.0 + - @o2s/framework@1.14.0 ## 1.3.0 @@ -272,12 +389,12 @@ - Updated dependencies [2c780d5] - Updated dependencies [0354126] - Updated dependencies [1653b74] - - @o2s/framework@1.13.0 - - @o2s/configs.integrations@0.2.0 - - @o2s/ui@1.6.0 - - @o2s/utils.frontend@0.2.0 - - @o2s/utils.api-harmonization@0.1.2 - - @o2s/utils.logger@1.1.2 + - @o2s/framework@1.13.0 + - @o2s/configs.integrations@0.2.0 + - @o2s/ui@1.6.0 + - @o2s/utils.frontend@0.2.0 + - @o2s/utils.api-harmonization@0.1.2 + - @o2s/utils.logger@1.1.2 ## 1.2.0 @@ -296,10 +413,10 @@ - Updated dependencies [b519464] - Updated dependencies [b1c47e8] - Updated dependencies [3da2e69] - - @o2s/framework@1.12.0 - - @o2s/ui@1.5.0 - - @o2s/utils.logger@1.1.1 - - @o2s/configs.integrations@0.1.1 + - @o2s/framework@1.12.0 + - @o2s/ui@1.5.0 + - @o2s/utils.logger@1.1.1 + - @o2s/configs.integrations@0.1.1 ## 1.1.0 @@ -312,7 +429,7 @@ - Updated dependencies [9ad8658] - Updated dependencies [9ad8658] - - @o2s/ui@1.4.0 + - @o2s/ui@1.4.0 ## 1.0.0 @@ -323,8 +440,8 @@ ### Patch Changes - Updated dependencies [2421fb2] - - @o2s/utils.api-harmonization@0.1.0 - - @o2s/configs.integrations@0.1.0 - - @o2s/utils.frontend@0.1.0 - - @o2s/framework@1.11.0 - - @o2s/ui@1.3.0 + - @o2s/utils.api-harmonization@0.1.0 + - @o2s/configs.integrations@0.1.0 + - @o2s/utils.frontend@0.1.0 + - @o2s/framework@1.11.0 + - @o2s/ui@1.3.0 diff --git a/packages/blocks/support/ticket-list/package.json b/packages/blocks/support/ticket-list/package.json index f09d4bcf4..b742fc69c 100644 --- a/packages/blocks/support/ticket-list/package.json +++ b/packages/blocks/support/ticket-list/package.json @@ -1,6 +1,6 @@ { "name": "@o2s/blocks.ticket-list", - "version": "2.0.0", + "version": "2.1.0", "private": false, "license": "MIT", "description": "A block for displaying and managing user cases and tickets.", diff --git a/packages/blocks/support/ticket-recent/CHANGELOG.md b/packages/blocks/support/ticket-recent/CHANGELOG.md index 528eb012b..800033351 100644 --- a/packages/blocks/support/ticket-recent/CHANGELOG.md +++ b/packages/blocks/support/ticket-recent/CHANGELOG.md @@ -1,16 +1,89 @@ # @o2s/blocks.ticket-recent +## 2.0.1 + +### Patch Changes + +- f8591c1: Threaded the CMS `preview` flag through every block so draft content actually renders in draft + mode. Previously only 5 of ~42 blocks passed it - the rest always fetched published content, so CMS + live preview (and any draft-mode view) showed stale data for most of the page. + + Per block, the flag now survives all four hops: the renderer forwards `isDraftModeEnabled` (added + to the framework's `BaseBlockProps` - `renderBlocks` already passed it to every block), the server + component sends `preview` on its block fetch, the request DTO declares it, and the API + Harmonization service forwards it to `CmsService.getBlockConfig`. + +- 270355f: refactor(blocks): build the block SDKs on the shared instance + + Every block built an SDK of its own out of the same 15 lines: the API url resolution, the logger settings with an `@ts-expect-error` per environment variable, and a method-by-method pick out of its own factory. They now take the instance from `@o2s/utils.frontend/sdk` and extend it with everything their factory returns, which leaves one `ofetch` client and one logger for all of them instead of 42, and drops the undeclared dependency on `next-runtime-env` that every block relied on. + + `order-details` gains `sdk.blocks.getOrderPdf`: its factory has always defined the method, and only the method-by-method pick left it out. + +- cb50455: chore(deps): update dependencies +- 681d153: chore(deps): update dependencies +- 457b243: feat(framework): add `createBlockRequest` helper for block SDK methods + + Adds `createBlockRequest` to `@o2s/framework/sdk`. It creates the request function used by the methods of a block (or module) SDK and takes care of the boilerplate that was previously copy-pasted into every method: merging the default API headers with the caller's headers and the access token, serializing query params, typing the response and wrapping failures into a `BlockRequestError` (which exposes `status`, `data` and the original error as `cause`). + + `getApiHeaders` is now provided by `@o2s/framework/headers` and re-exported by `@o2s/utils.frontend` (`Utils.Headers.getApiHeaders`), so the default headers are defined in a single place. All block SDKs, the SurveyJS module SDK and the block generator template use the new helper. + +- 3f1c980: chore(deps): update dependencies +- 1a520c8: chore: dependency update pass + + Update dependencies across the monorepo. Highlights: NestJS 12 (Express 5), + TypeScript 6 for type-checking/lint with native TypeScript 7 compiling the + package builds, Vite 8, Docusaurus 3.10, Storybook 10.6, @medusajs 2.20, + redis 6, surveyjs (core + react-ui) 3, and assorted minor/patch bumps. No + public package API changed; peer ranges were bumped to match (notably + @nestjs/* to ^12). + +- 02401b2: Routine dependency maintenance (patch/minor, no code changes): `@medusajs/js-sdk` & `@medusajs/types` to 2.20.1, `survey-core` & `survey-react-ui` to 3.0.3, `lucide-react` to 1.40, `sass` to 1.104, `docusaurus-plugin-sass` to 0.2.7. +- c070aff: chore(deps): update dependencies +- b7f8177: chore(deps): update dependencies +- cb50455: chore(deps): update dependencies +- 3f1c980: chore(deps): update dependencies +- 3f1c980: chore(deps): update dependencies +- Updated dependencies [010ae15] +- Updated dependencies [f8591c1] +- Updated dependencies [cb50455] +- Updated dependencies [c8a58ad] +- Updated dependencies [681d153] +- Updated dependencies [457b243] +- Updated dependencies [1a520c8] +- Updated dependencies [02401b2] +- Updated dependencies [92c0bf8] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [cb50455] +- Updated dependencies [dfc3fbb] +- Updated dependencies [b775189] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [270355f] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] + - @o2s/configs.integrations@1.1.0 + - @o2s/framework@1.24.0 + - @o2s/utils.api-harmonization@1.1.0 + - @o2s/utils.frontend@1.1.0 + - @o2s/utils.logger@1.2.4 + - @o2s/ui@2.1.0 + ## 2.0.0 ### Patch Changes - Updated dependencies [86b4c5a] - Updated dependencies [24fb9a9] - - @o2s/framework@1.23.0 - - @o2s/ui@2.0.0 - - @o2s/configs.integrations@1.0.0 - - @o2s/utils.api-harmonization@1.0.0 - - @o2s/utils.frontend@1.0.0 + - @o2s/framework@1.23.0 + - @o2s/ui@2.0.0 + - @o2s/configs.integrations@1.0.0 + - @o2s/utils.api-harmonization@1.0.0 + - @o2s/utils.frontend@1.0.0 ## 1.7.3 @@ -24,7 +97,7 @@ - 025bfb3: fix(deps): declare `@o2s/utils.frontend` and `@o2s/utils.api-harmonization` as peer dependencies in blocks and surveyjs module - Moves both shared utils from `dependencies` to `peerDependencies` (with `devDependencies` for monorepo builds) so consuming apps supply a single hoisted version and npm does not nest conflicting copies under published packages. + Moves both shared utils from `dependencies` to `peerDependencies` (with `devDependencies` for monorepo builds) so consuming apps supply a single hoisted version and npm does not nest conflicting copies under published packages. ## 1.7.1 @@ -32,13 +105,13 @@ - 31df3a8: fix(deps): move @o2s/framework to peerDependencies in all published packages - `@o2s/framework` was listed in `dependencies` of blocks, integrations, modules, and utils packages. When installed from npm with mismatched versions across the dependency tree, npm would create nested copies of `@o2s/framework` with different class references. This caused NestJS to fail resolving DI tokens (e.g. `SearchService`) because injected class instances came from a different `@o2s/framework` copy than the one registered in the application module. + `@o2s/framework` was listed in `dependencies` of blocks, integrations, modules, and utils packages. When installed from npm with mismatched versions across the dependency tree, npm would create nested copies of `@o2s/framework` with different class references. This caused NestJS to fail resolving DI tokens (e.g. `SearchService`) because injected class instances came from a different `@o2s/framework` copy than the one registered in the application module. - Moved `@o2s/framework` to `peerDependencies` across all affected packages so that the consuming application always provides a single shared copy. Also moved `@o2s/integrations.mocked` to `peerDependencies` in `@o2s/integrations.mocked-dxp`. + Moved `@o2s/framework` to `peerDependencies` across all affected packages so that the consuming application always provides a single shared copy. Also moved `@o2s/integrations.mocked` to `peerDependencies` in `@o2s/integrations.mocked-dxp`. - Updated dependencies [31df3a8] - - @o2s/utils.api-harmonization@0.3.4 - - @o2s/utils.frontend@0.6.1 + - @o2s/utils.api-harmonization@0.3.4 + - @o2s/utils.frontend@0.6.1 ## 1.7.0 @@ -51,7 +124,7 @@ - Updated dependencies [7d99d13] - Updated dependencies [7d99d13] - Updated dependencies [6edc9ca] - - @o2s/framework@1.22.0 + - @o2s/framework@1.22.0 ## 1.6.0 @@ -63,24 +136,24 @@ - 0aaac5b: fix: add missing dependency declarations for turbo boundaries compliance - Declare previously undeclared imports as explicit dependencies across 55 packages. This resolves all `turbo boundaries` violations where packages imported modules not listed in their `package.json`. + Declare previously undeclared imports as explicit dependencies across 55 packages. This resolves all `turbo boundaries` violations where packages imported modules not listed in their `package.json`. - Key dependency categories added: - - `@storybook/nextjs-vite`, `@storybook/react`, `storybook` for story files - - `vitest`, `@nestjs/testing`, `@o2s/vitest-config` for test files - - `lucide-react`, `dayjs`, `string-template`, `class-variance-authority` for runtime code - - `vite` for vitest configs in integrations - - `@o2s/api-harmonization`, `@auth/core`, `@docusaurus/*` for app-level imports + Key dependency categories added: + - `@storybook/nextjs-vite`, `@storybook/react`, `storybook` for story files + - `vitest`, `@nestjs/testing`, `@o2s/vitest-config` for test files + - `lucide-react`, `dayjs`, `string-template`, `class-variance-authority` for runtime code + - `vite` for vitest configs in integrations + - `@o2s/api-harmonization`, `@auth/core`, `@docusaurus/*` for app-level imports - Updated dependencies [e8cdde6] - Updated dependencies [0aaac5b] - Updated dependencies [0aaac5b] - Updated dependencies [7ac16b0] - Updated dependencies [0aaac5b] - - @o2s/ui@1.14.0 - - @o2s/utils.frontend@0.5.2 - - @o2s/configs.integrations@0.7.0 - - @o2s/framework@1.21.0 + - @o2s/ui@1.14.0 + - @o2s/utils.frontend@0.5.2 + - @o2s/configs.integrations@0.7.0 + - @o2s/framework@1.21.0 ## 1.5.0 @@ -100,7 +173,7 @@ - fab2aea: refactor: group Storybook stories by domain and rename UI component directories to PascalCase - Updated dependencies [a7bb35c] - Updated dependencies [fab2aea] - - @o2s/ui@1.13.1 + - @o2s/ui@1.13.1 ## 1.4.2 @@ -108,19 +181,19 @@ - fadbc63: Extract shared block prop types into framework models and migrate block frontend props to the common `BlockWith*` helpers. - This removes duplicated `slug`, `userId`, and `isDraftModeEnabled` definitions and keeps renderer props aligned across blocks. + This removes duplicated `slug`, `userId`, and `isDraftModeEnabled` definitions and keeps renderer props aligned across blocks. - 338cb01: fix(api-harmonization): align typed header usage across services and generated SDK/controller contracts - 338cb01: Refactor header access to use `HeaderName` constants instead of literal header keys across framework controllers, block harmonization services, and mocked auth guards. - This unifies header handling, reduces string-key typos, and aligns modules with the typed headers approach exposed by `@o2s/framework/headers`. + This unifies header handling, reduces string-key typos, and aligns modules with the typed headers approach exposed by `@o2s/framework/headers`. - Updated dependencies [fadbc63] - Updated dependencies [338cb01] - Updated dependencies [338cb01] - Updated dependencies [338cb01] - - @o2s/framework@1.20.1 - - @o2s/utils.api-harmonization@0.3.3 + - @o2s/framework@1.20.1 + - @o2s/utils.api-harmonization@0.3.3 ## 1.4.1 @@ -133,11 +206,11 @@ - Updated dependencies [daf592e] - Updated dependencies [375cd90] - Updated dependencies [98b2e68] - - @o2s/framework@1.20.0 - - @o2s/utils.api-harmonization@0.3.2 - - @o2s/utils.frontend@0.5.1 - - @o2s/utils.logger@1.2.3 - - @o2s/ui@1.13.0 + - @o2s/framework@1.20.0 + - @o2s/utils.api-harmonization@0.3.2 + - @o2s/utils.frontend@0.5.1 + - @o2s/utils.logger@1.2.3 + - @o2s/ui@1.13.0 ## 1.4.0 @@ -164,12 +237,12 @@ - Updated dependencies [8c01be4] - Updated dependencies [ea200fc] - Updated dependencies [cc2e932] - - @o2s/framework@1.18.0 - - @o2s/utils.api-harmonization@0.3.1 - - @o2s/utils.frontend@0.4.1 - - @o2s/utils.logger@1.2.2 - - @o2s/configs.integrations@0.6.0 - - @o2s/ui@1.11.0 + - @o2s/framework@1.18.0 + - @o2s/utils.api-harmonization@0.3.1 + - @o2s/utils.frontend@0.4.1 + - @o2s/utils.logger@1.2.2 + - @o2s/configs.integrations@0.6.0 + - @o2s/ui@1.11.0 ## 1.3.0 @@ -178,29 +251,29 @@ - 1a5a22d: Added ticket creation functionality to the Zendesk integration. Users can now create tickets via POST /tickets with attachments and custom fields. Added custom field mapping from Survey.js format to Zendesk custom fields via new zendesk-field.mapper. Updated table columns on TicketList component to display: ticket type (topic), status, and last updated date. Added display of custom field values from ticket properties on TicketDetails. Updated mapper mocks in cms - 72391c1: ### Authorization & PBAC Implementation - This release introduces a comprehensive Policy-Based Access Control system interlaced with Role-Based Access Control. + This release introduces a comprehensive Policy-Based Access Control system interlaced with Role-Based Access Control. - #### Framework & Core - - **`@o2s/framework` (AuthService)**: Enhanced with abstract permission logic (`getPermissions`, `hasPermission`), role checks (`hasRole`, `requireRoles`), and action batching (`canPerformActions`). - - **`@o2s/api-harmonization`**: Implemented global `RolesGuard` and `PermissionsGuard` in `AppModule`. - - **`@o2s/utils.api-harmonization`**: Added `extractUserRolesFromJwt` to unify role extraction from different JWT claims. + #### Framework & Core + - **`@o2s/framework` (AuthService)**: Enhanced with abstract permission logic (`getPermissions`, `hasPermission`), role checks (`hasRole`, `requireRoles`), and action batching (`canPerformActions`). + - **`@o2s/api-harmonization`**: Implemented global `RolesGuard` and `PermissionsGuard` in `AppModule`. + - **`@o2s/utils.api-harmonization`**: Added `extractUserRolesFromJwt` to unify role extraction from different JWT claims. - #### Features - - **Decorators**: New `@Auth.Decorators.Permissions({ resource, actions })` for securing controllers. - - **Data Filtering**: Mappers (e.g., `page.mapper.ts`) now filter UI elements (header/footer navigation) based on user roles. + #### Features + - **Decorators**: New `@Auth.Decorators.Permissions({ resource, actions })` for securing controllers. + - **Data Filtering**: Mappers (e.g., `page.mapper.ts`) now filter UI elements (header/footer navigation) based on user roles. - This provides granular control over resource access and UI visibility based on user roles and permissions. + This provides granular control over resource access and UI visibility based on user roles and permissions. ### Patch Changes - Updated dependencies [1a5a22d] - Updated dependencies [72391c1] - - @o2s/framework@1.16.0 - - @o2s/utils.api-harmonization@0.3.0 - - @o2s/configs.integrations@0.4.0 - - @o2s/ui@1.9.0 - - @o2s/utils.frontend@0.4.0 - - @o2s/utils.logger@1.2.0 + - @o2s/framework@1.16.0 + - @o2s/utils.api-harmonization@0.3.0 + - @o2s/configs.integrations@0.4.0 + - @o2s/ui@1.9.0 + - @o2s/utils.frontend@0.4.0 + - @o2s/utils.logger@1.2.0 ## 1.2.0 @@ -220,11 +293,11 @@ - Updated dependencies [d197b89] - Updated dependencies [cd483b7] - Updated dependencies [d197b89] - - @o2s/ui@1.8.0 - - @o2s/utils.api-harmonization@0.2.0 - - @o2s/configs.integrations@0.3.0 - - @o2s/utils.frontend@0.3.0 - - @o2s/framework@1.15.0 + - @o2s/ui@1.8.0 + - @o2s/utils.api-harmonization@0.2.0 + - @o2s/configs.integrations@0.3.0 + - @o2s/utils.frontend@0.3.0 + - @o2s/framework@1.15.0 ## 1.1.2 @@ -234,12 +307,12 @@ - Updated dependencies [221dc2c] - Updated dependencies [db5b381] - Updated dependencies [c2d9438] - - @o2s/utils.api-harmonization@0.1.3 - - @o2s/configs.integrations@0.2.1 - - @o2s/utils.frontend@0.2.1 - - @o2s/utils.logger@1.1.3 - - @o2s/ui@1.7.0 - - @o2s/framework@1.14.0 + - @o2s/utils.api-harmonization@0.1.3 + - @o2s/configs.integrations@0.2.1 + - @o2s/utils.frontend@0.2.1 + - @o2s/utils.logger@1.1.3 + - @o2s/ui@1.7.0 + - @o2s/framework@1.14.0 ## 1.1.1 @@ -252,12 +325,12 @@ - Updated dependencies [2c780d5] - Updated dependencies [0354126] - Updated dependencies [1653b74] - - @o2s/framework@1.13.0 - - @o2s/configs.integrations@0.2.0 - - @o2s/ui@1.6.0 - - @o2s/utils.frontend@0.2.0 - - @o2s/utils.api-harmonization@0.1.2 - - @o2s/utils.logger@1.1.2 + - @o2s/framework@1.13.0 + - @o2s/configs.integrations@0.2.0 + - @o2s/ui@1.6.0 + - @o2s/utils.frontend@0.2.0 + - @o2s/utils.api-harmonization@0.1.2 + - @o2s/utils.logger@1.1.2 ## 1.1.0 @@ -270,7 +343,7 @@ - Updated dependencies [9ad8658] - Updated dependencies [9ad8658] - - @o2s/ui@1.4.0 + - @o2s/ui@1.4.0 ## 1.0.0 @@ -281,8 +354,8 @@ ### Patch Changes - Updated dependencies [2421fb2] - - @o2s/utils.api-harmonization@0.1.0 - - @o2s/configs.integrations@0.1.0 - - @o2s/utils.frontend@0.1.0 - - @o2s/framework@1.11.0 - - @o2s/ui@1.3.0 + - @o2s/utils.api-harmonization@0.1.0 + - @o2s/configs.integrations@0.1.0 + - @o2s/utils.frontend@0.1.0 + - @o2s/framework@1.11.0 + - @o2s/ui@1.3.0 diff --git a/packages/blocks/support/ticket-recent/package.json b/packages/blocks/support/ticket-recent/package.json index c229c3e8e..f8b12bc58 100644 --- a/packages/blocks/support/ticket-recent/package.json +++ b/packages/blocks/support/ticket-recent/package.json @@ -1,6 +1,6 @@ { "name": "@o2s/blocks.ticket-recent", - "version": "2.0.0", + "version": "2.0.1", "private": false, "license": "MIT", "description": "A block displaying recent tickets and their comments.", diff --git a/packages/blocks/support/ticket-summary/CHANGELOG.md b/packages/blocks/support/ticket-summary/CHANGELOG.md index 8629fda05..793fe848f 100644 --- a/packages/blocks/support/ticket-summary/CHANGELOG.md +++ b/packages/blocks/support/ticket-summary/CHANGELOG.md @@ -1,16 +1,83 @@ # @o2s/blocks.ticket-summary +## 2.0.1 + +### Patch Changes + +- f8591c1: Threaded the CMS `preview` flag through every block so draft content actually renders in draft + mode. Previously only 5 of ~42 blocks passed it - the rest always fetched published content, so CMS + live preview (and any draft-mode view) showed stale data for most of the page. + + Per block, the flag now survives all four hops: the renderer forwards `isDraftModeEnabled` (added + to the framework's `BaseBlockProps` - `renderBlocks` already passed it to every block), the server + component sends `preview` on its block fetch, the request DTO declares it, and the API + Harmonization service forwards it to `CmsService.getBlockConfig`. + +- 270355f: refactor(blocks): build the block SDKs on the shared instance + + Every block built an SDK of its own out of the same 15 lines: the API url resolution, the logger settings with an `@ts-expect-error` per environment variable, and a method-by-method pick out of its own factory. They now take the instance from `@o2s/utils.frontend/sdk` and extend it with everything their factory returns, which leaves one `ofetch` client and one logger for all of them instead of 42, and drops the undeclared dependency on `next-runtime-env` that every block relied on. + + `order-details` gains `sdk.blocks.getOrderPdf`: its factory has always defined the method, and only the method-by-method pick left it out. + +- cb50455: chore(deps): update dependencies +- 681d153: chore(deps): update dependencies +- 457b243: feat(framework): add `createBlockRequest` helper for block SDK methods + + Adds `createBlockRequest` to `@o2s/framework/sdk`. It creates the request function used by the methods of a block (or module) SDK and takes care of the boilerplate that was previously copy-pasted into every method: merging the default API headers with the caller's headers and the access token, serializing query params, typing the response and wrapping failures into a `BlockRequestError` (which exposes `status`, `data` and the original error as `cause`). + + `getApiHeaders` is now provided by `@o2s/framework/headers` and re-exported by `@o2s/utils.frontend` (`Utils.Headers.getApiHeaders`), so the default headers are defined in a single place. All block SDKs, the SurveyJS module SDK and the block generator template use the new helper. + +- 1a520c8: chore: dependency update pass + + Update dependencies across the monorepo. Highlights: NestJS 12 (Express 5), + TypeScript 6 for type-checking/lint with native TypeScript 7 compiling the + package builds, Vite 8, Docusaurus 3.10, Storybook 10.6, @medusajs 2.20, + redis 6, surveyjs (core + react-ui) 3, and assorted minor/patch bumps. No + public package API changed; peer ranges were bumped to match (notably + @nestjs/* to ^12). + +- cb50455: chore(deps): update dependencies +- Updated dependencies [010ae15] +- Updated dependencies [f8591c1] +- Updated dependencies [cb50455] +- Updated dependencies [c8a58ad] +- Updated dependencies [681d153] +- Updated dependencies [457b243] +- Updated dependencies [1a520c8] +- Updated dependencies [02401b2] +- Updated dependencies [92c0bf8] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [cb50455] +- Updated dependencies [dfc3fbb] +- Updated dependencies [b775189] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [270355f] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] + - @o2s/configs.integrations@1.1.0 + - @o2s/framework@1.24.0 + - @o2s/utils.api-harmonization@1.1.0 + - @o2s/utils.frontend@1.1.0 + - @o2s/utils.logger@1.2.4 + - @o2s/ui@2.1.0 + ## 2.0.0 ### Patch Changes - Updated dependencies [86b4c5a] - Updated dependencies [24fb9a9] - - @o2s/framework@1.23.0 - - @o2s/ui@2.0.0 - - @o2s/configs.integrations@1.0.0 - - @o2s/utils.api-harmonization@1.0.0 - - @o2s/utils.frontend@1.0.0 + - @o2s/framework@1.23.0 + - @o2s/ui@2.0.0 + - @o2s/configs.integrations@1.0.0 + - @o2s/utils.api-harmonization@1.0.0 + - @o2s/utils.frontend@1.0.0 ## 1.6.3 @@ -24,7 +91,7 @@ - 025bfb3: fix(deps): declare `@o2s/utils.frontend` and `@o2s/utils.api-harmonization` as peer dependencies in blocks and surveyjs module - Moves both shared utils from `dependencies` to `peerDependencies` (with `devDependencies` for monorepo builds) so consuming apps supply a single hoisted version and npm does not nest conflicting copies under published packages. + Moves both shared utils from `dependencies` to `peerDependencies` (with `devDependencies` for monorepo builds) so consuming apps supply a single hoisted version and npm does not nest conflicting copies under published packages. ## 1.6.1 @@ -32,13 +99,13 @@ - 31df3a8: fix(deps): move @o2s/framework to peerDependencies in all published packages - `@o2s/framework` was listed in `dependencies` of blocks, integrations, modules, and utils packages. When installed from npm with mismatched versions across the dependency tree, npm would create nested copies of `@o2s/framework` with different class references. This caused NestJS to fail resolving DI tokens (e.g. `SearchService`) because injected class instances came from a different `@o2s/framework` copy than the one registered in the application module. + `@o2s/framework` was listed in `dependencies` of blocks, integrations, modules, and utils packages. When installed from npm with mismatched versions across the dependency tree, npm would create nested copies of `@o2s/framework` with different class references. This caused NestJS to fail resolving DI tokens (e.g. `SearchService`) because injected class instances came from a different `@o2s/framework` copy than the one registered in the application module. - Moved `@o2s/framework` to `peerDependencies` across all affected packages so that the consuming application always provides a single shared copy. Also moved `@o2s/integrations.mocked` to `peerDependencies` in `@o2s/integrations.mocked-dxp`. + Moved `@o2s/framework` to `peerDependencies` across all affected packages so that the consuming application always provides a single shared copy. Also moved `@o2s/integrations.mocked` to `peerDependencies` in `@o2s/integrations.mocked-dxp`. - Updated dependencies [31df3a8] - - @o2s/utils.api-harmonization@0.3.4 - - @o2s/utils.frontend@0.6.1 + - @o2s/utils.api-harmonization@0.3.4 + - @o2s/utils.frontend@0.6.1 ## 1.6.0 @@ -51,7 +118,7 @@ - Updated dependencies [7d99d13] - Updated dependencies [7d99d13] - Updated dependencies [6edc9ca] - - @o2s/framework@1.22.0 + - @o2s/framework@1.22.0 ## 1.5.0 @@ -63,24 +130,24 @@ - 0aaac5b: fix: add missing dependency declarations for turbo boundaries compliance - Declare previously undeclared imports as explicit dependencies across 55 packages. This resolves all `turbo boundaries` violations where packages imported modules not listed in their `package.json`. + Declare previously undeclared imports as explicit dependencies across 55 packages. This resolves all `turbo boundaries` violations where packages imported modules not listed in their `package.json`. - Key dependency categories added: - - `@storybook/nextjs-vite`, `@storybook/react`, `storybook` for story files - - `vitest`, `@nestjs/testing`, `@o2s/vitest-config` for test files - - `lucide-react`, `dayjs`, `string-template`, `class-variance-authority` for runtime code - - `vite` for vitest configs in integrations - - `@o2s/api-harmonization`, `@auth/core`, `@docusaurus/*` for app-level imports + Key dependency categories added: + - `@storybook/nextjs-vite`, `@storybook/react`, `storybook` for story files + - `vitest`, `@nestjs/testing`, `@o2s/vitest-config` for test files + - `lucide-react`, `dayjs`, `string-template`, `class-variance-authority` for runtime code + - `vite` for vitest configs in integrations + - `@o2s/api-harmonization`, `@auth/core`, `@docusaurus/*` for app-level imports - Updated dependencies [e8cdde6] - Updated dependencies [0aaac5b] - Updated dependencies [0aaac5b] - Updated dependencies [7ac16b0] - Updated dependencies [0aaac5b] - - @o2s/ui@1.14.0 - - @o2s/utils.frontend@0.5.2 - - @o2s/configs.integrations@0.7.0 - - @o2s/framework@1.21.0 + - @o2s/ui@1.14.0 + - @o2s/utils.frontend@0.5.2 + - @o2s/configs.integrations@0.7.0 + - @o2s/framework@1.21.0 ## 1.4.0 @@ -100,7 +167,7 @@ - fab2aea: refactor: group Storybook stories by domain and rename UI component directories to PascalCase - Updated dependencies [a7bb35c] - Updated dependencies [fab2aea] - - @o2s/ui@1.13.1 + - @o2s/ui@1.13.1 ## 1.3.2 @@ -108,19 +175,19 @@ - fadbc63: Extract shared block prop types into framework models and migrate block frontend props to the common `BlockWith*` helpers. - This removes duplicated `slug`, `userId`, and `isDraftModeEnabled` definitions and keeps renderer props aligned across blocks. + This removes duplicated `slug`, `userId`, and `isDraftModeEnabled` definitions and keeps renderer props aligned across blocks. - 338cb01: fix(api-harmonization): align typed header usage across services and generated SDK/controller contracts - 338cb01: Refactor header access to use `HeaderName` constants instead of literal header keys across framework controllers, block harmonization services, and mocked auth guards. - This unifies header handling, reduces string-key typos, and aligns modules with the typed headers approach exposed by `@o2s/framework/headers`. + This unifies header handling, reduces string-key typos, and aligns modules with the typed headers approach exposed by `@o2s/framework/headers`. - Updated dependencies [fadbc63] - Updated dependencies [338cb01] - Updated dependencies [338cb01] - Updated dependencies [338cb01] - - @o2s/framework@1.20.1 - - @o2s/utils.api-harmonization@0.3.3 + - @o2s/framework@1.20.1 + - @o2s/utils.api-harmonization@0.3.3 ## 1.3.1 @@ -133,11 +200,11 @@ - Updated dependencies [daf592e] - Updated dependencies [375cd90] - Updated dependencies [98b2e68] - - @o2s/framework@1.20.0 - - @o2s/utils.api-harmonization@0.3.2 - - @o2s/utils.frontend@0.5.1 - - @o2s/utils.logger@1.2.3 - - @o2s/ui@1.13.0 + - @o2s/framework@1.20.0 + - @o2s/utils.api-harmonization@0.3.2 + - @o2s/utils.frontend@0.5.1 + - @o2s/utils.logger@1.2.3 + - @o2s/ui@1.13.0 ## 1.3.0 @@ -164,12 +231,12 @@ - Updated dependencies [8c01be4] - Updated dependencies [ea200fc] - Updated dependencies [cc2e932] - - @o2s/framework@1.18.0 - - @o2s/utils.api-harmonization@0.3.1 - - @o2s/utils.frontend@0.4.1 - - @o2s/utils.logger@1.2.2 - - @o2s/configs.integrations@0.6.0 - - @o2s/ui@1.11.0 + - @o2s/framework@1.18.0 + - @o2s/utils.api-harmonization@0.3.1 + - @o2s/utils.frontend@0.4.1 + - @o2s/utils.logger@1.2.2 + - @o2s/configs.integrations@0.6.0 + - @o2s/ui@1.11.0 ## 1.2.0 @@ -177,29 +244,29 @@ - 72391c1: ### Authorization & PBAC Implementation - This release introduces a comprehensive Policy-Based Access Control system interlaced with Role-Based Access Control. + This release introduces a comprehensive Policy-Based Access Control system interlaced with Role-Based Access Control. - #### Framework & Core - - **`@o2s/framework` (AuthService)**: Enhanced with abstract permission logic (`getPermissions`, `hasPermission`), role checks (`hasRole`, `requireRoles`), and action batching (`canPerformActions`). - - **`@o2s/api-harmonization`**: Implemented global `RolesGuard` and `PermissionsGuard` in `AppModule`. - - **`@o2s/utils.api-harmonization`**: Added `extractUserRolesFromJwt` to unify role extraction from different JWT claims. + #### Framework & Core + - **`@o2s/framework` (AuthService)**: Enhanced with abstract permission logic (`getPermissions`, `hasPermission`), role checks (`hasRole`, `requireRoles`), and action batching (`canPerformActions`). + - **`@o2s/api-harmonization`**: Implemented global `RolesGuard` and `PermissionsGuard` in `AppModule`. + - **`@o2s/utils.api-harmonization`**: Added `extractUserRolesFromJwt` to unify role extraction from different JWT claims. - #### Features - - **Decorators**: New `@Auth.Decorators.Permissions({ resource, actions })` for securing controllers. - - **Data Filtering**: Mappers (e.g., `page.mapper.ts`) now filter UI elements (header/footer navigation) based on user roles. + #### Features + - **Decorators**: New `@Auth.Decorators.Permissions({ resource, actions })` for securing controllers. + - **Data Filtering**: Mappers (e.g., `page.mapper.ts`) now filter UI elements (header/footer navigation) based on user roles. - This provides granular control over resource access and UI visibility based on user roles and permissions. + This provides granular control over resource access and UI visibility based on user roles and permissions. ### Patch Changes - Updated dependencies [1a5a22d] - Updated dependencies [72391c1] - - @o2s/framework@1.16.0 - - @o2s/utils.api-harmonization@0.3.0 - - @o2s/configs.integrations@0.4.0 - - @o2s/ui@1.9.0 - - @o2s/utils.frontend@0.4.0 - - @o2s/utils.logger@1.2.0 + - @o2s/framework@1.16.0 + - @o2s/utils.api-harmonization@0.3.0 + - @o2s/configs.integrations@0.4.0 + - @o2s/ui@1.9.0 + - @o2s/utils.frontend@0.4.0 + - @o2s/utils.logger@1.2.0 ## 1.1.0 @@ -219,11 +286,11 @@ - Updated dependencies [d197b89] - Updated dependencies [cd483b7] - Updated dependencies [d197b89] - - @o2s/ui@1.8.0 - - @o2s/utils.api-harmonization@0.2.0 - - @o2s/configs.integrations@0.3.0 - - @o2s/utils.frontend@0.3.0 - - @o2s/framework@1.15.0 + - @o2s/ui@1.8.0 + - @o2s/utils.api-harmonization@0.2.0 + - @o2s/configs.integrations@0.3.0 + - @o2s/utils.frontend@0.3.0 + - @o2s/framework@1.15.0 ## 1.0.1 @@ -233,12 +300,12 @@ - Updated dependencies [221dc2c] - Updated dependencies [db5b381] - Updated dependencies [c2d9438] - - @o2s/utils.api-harmonization@0.1.3 - - @o2s/configs.integrations@0.2.1 - - @o2s/utils.frontend@0.2.1 - - @o2s/utils.logger@1.1.3 - - @o2s/ui@1.7.0 - - @o2s/framework@1.14.0 + - @o2s/utils.api-harmonization@0.1.3 + - @o2s/configs.integrations@0.2.1 + - @o2s/utils.frontend@0.2.1 + - @o2s/utils.logger@1.1.3 + - @o2s/ui@1.7.0 + - @o2s/framework@1.14.0 ## 1.0.0 @@ -259,9 +326,9 @@ - Updated dependencies [2c780d5] - Updated dependencies [0354126] - Updated dependencies [1653b74] - - @o2s/framework@1.13.0 - - @o2s/configs.integrations@0.2.0 - - @o2s/ui@1.6.0 - - @o2s/utils.frontend@0.2.0 - - @o2s/utils.api-harmonization@0.1.2 - - @o2s/utils.logger@1.1.2 + - @o2s/framework@1.13.0 + - @o2s/configs.integrations@0.2.0 + - @o2s/ui@1.6.0 + - @o2s/utils.frontend@0.2.0 + - @o2s/utils.api-harmonization@0.1.2 + - @o2s/utils.logger@1.1.2 diff --git a/packages/blocks/support/ticket-summary/package.json b/packages/blocks/support/ticket-summary/package.json index 1f31b4fa4..06b38fa23 100644 --- a/packages/blocks/support/ticket-summary/package.json +++ b/packages/blocks/support/ticket-summary/package.json @@ -1,6 +1,6 @@ { "name": "@o2s/blocks.ticket-summary", - "version": "2.0.0", + "version": "2.0.1", "private": false, "license": "MIT", "description": "Displays a dynamic TicketSummary showing ticket counts grouped by status.", diff --git a/packages/cli/create-o2s-app/CHANGELOG.md b/packages/cli/create-o2s-app/CHANGELOG.md index de4ccbbd5..c369e858a 100644 --- a/packages/cli/create-o2s-app/CHANGELOG.md +++ b/packages/cli/create-o2s-app/CHANGELOG.md @@ -1,5 +1,24 @@ # create-o2s-app +## 4.1.9 + +### Patch Changes + +- 1a520c8: chore: dependency update pass + + Update dependencies across the monorepo. Highlights: NestJS 12 (Express 5), + TypeScript 6 for type-checking/lint with native TypeScript 7 compiling the + package builds, Vite 8, Docusaurus 3.10, Storybook 10.6, @medusajs 2.20, + redis 6, surveyjs (core + react-ui) 3, and assorted minor/patch bumps. No + public package API changed; peer ranges were bumped to match (notably + @nestjs/* to ^12). + +- Updated dependencies [cb50455] +- Updated dependencies [681d153] +- Updated dependencies [1a520c8] +- Updated dependencies [cb50455] + - @o2s/telemetry@1.2.3 + ## 4.1.8 ### Patch Changes diff --git a/packages/cli/create-o2s-app/package.json b/packages/cli/create-o2s-app/package.json index 2f5ec3836..8c78ae5a4 100644 --- a/packages/cli/create-o2s-app/package.json +++ b/packages/cli/create-o2s-app/package.json @@ -1,6 +1,6 @@ { "name": "create-o2s-app", - "version": "4.1.8", + "version": "4.1.9", "private": false, "license": "MIT", "description": "CLI tool to scaffold new O2S applications with Next.js and NestJS setup.", @@ -32,7 +32,7 @@ "format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,css,scss,json}\"" }, "dependencies": { - "@o2s/telemetry": "^1.2.2", + "@o2s/telemetry": "^1.2.3", "@types/prompts": "^2.4.9", "cli-progress": "^3.12.0", "commander": "^15.0.0", diff --git a/packages/configs/integrations/CHANGELOG.md b/packages/configs/integrations/CHANGELOG.md index 407bbf311..7da33982b 100644 --- a/packages/configs/integrations/CHANGELOG.md +++ b/packages/configs/integrations/CHANGELOG.md @@ -1,5 +1,45 @@ # @o2s/configs.integrations +## 1.1.0 + +### Minor Changes + +- 010ae15: Refactored integration configuration by consolidating the 18 individual model files into a single typed `config.ts` backed by a `createIntegrationConfig` helper. Each domain now maps to an integration through a per-domain import alias shared by both the runtime map and its type re-export, so swapping an integration is a single-line change that cannot desync value and types. + + Integration `Config` objects are now declared with `satisfies Partial` (instead of a type annotation), which lets `createIntegrationConfig` validate domain bindings **at compile time** — assigning an integration to a domain it does not provide is now a type error rather than a runtime crash. The runtime check remains as a defense-in-depth backstop. + +### Patch Changes + +- 1a520c8: chore: dependency update pass + + Update dependencies across the monorepo. Highlights: NestJS 12 (Express 5), + TypeScript 6 for type-checking/lint with native TypeScript 7 compiling the + package builds, Vite 8, Docusaurus 3.10, Storybook 10.6, @medusajs 2.20, + redis 6, surveyjs (core + react-ui) 3, and assorted minor/patch bumps. No + public package API changed; peer ranges were bumped to match (notably + @nestjs/* to ^12). + +- Updated dependencies [010ae15] +- Updated dependencies [f8591c1] +- Updated dependencies [cb50455] +- Updated dependencies [c8a58ad] +- Updated dependencies [681d153] +- Updated dependencies [457b243] +- Updated dependencies [1a520c8] +- Updated dependencies [92c0bf8] +- Updated dependencies [ee42afd] +- Updated dependencies [692ecf4] +- Updated dependencies [c4aa242] +- Updated dependencies [c4aa242] +- Updated dependencies [c8a58ad] +- Updated dependencies [cb50455] +- Updated dependencies [dfc3fbb] +- Updated dependencies [ee42afd] +- Updated dependencies [270355f] +- Updated dependencies [ee42afd] + - @o2s/framework@1.24.0 + - @o2s/integrations.mocked@2.1.0 + ## 1.0.0 ### Patch Changes diff --git a/packages/configs/integrations/package.json b/packages/configs/integrations/package.json index fc86c61cc..cd7ad337c 100644 --- a/packages/configs/integrations/package.json +++ b/packages/configs/integrations/package.json @@ -1,6 +1,6 @@ { "name": "@o2s/configs.integrations", - "version": "1.0.0", + "version": "1.1.0", "private": true, "license": "MIT", "description": "Integration configuration package for O2S, providing centralized integration configs and type re-exports.", diff --git a/packages/framework/CHANGELOG.md b/packages/framework/CHANGELOG.md index 52ee544d6..fef3ff8aa 100644 --- a/packages/framework/CHANGELOG.md +++ b/packages/framework/CHANGELOG.md @@ -1,5 +1,119 @@ # @o2s/framework +## 1.24.0 + +### Minor Changes + +- 010ae15: Refactored integration configuration by consolidating the 18 individual model files into a single typed `config.ts` backed by a `createIntegrationConfig` helper. Each domain now maps to an integration through a per-domain import alias shared by both the runtime map and its type re-export, so swapping an integration is a single-line change that cannot desync value and types. + + Integration `Config` objects are now declared with `satisfies Partial` (instead of a type annotation), which lets `createIntegrationConfig` validate domain bindings **at compile time** — assigning an integration to a domain it does not provide is now a type error rather than a runtime crash. The runtime check remains as a defense-in-depth backstop. + +- f8591c1: Threaded the CMS `preview` flag through every block so draft content actually renders in draft + mode. Previously only 5 of ~42 blocks passed it - the rest always fetched published content, so CMS + live preview (and any draft-mode view) showed stale data for most of the page. + + Per block, the flag now survives all four hops: the renderer forwards `isDraftModeEnabled` (added + to the framework's `BaseBlockProps` - `renderBlocks` already passed it to every block), the server + component sends `preview` on its block fetch, the request DTO declares it, and the API + Harmonization service forwards it to `CmsService.getBlockConfig`. + +- c8a58ad: feat(framework): add a declarative page registry and move the mocked integrations onto it + + Adds `CMS.Pages.definePage` and `CMS.Pages.createPageRegistry` to `@o2s/framework/modules`. A page is declared once, with one entry per locale (its localized slug and SEO), and the registry derives the whole `CmsService` page trio from that single declaration: `getPage` (`mapPage`), `getPages` (`getAllPages`) and `getAlternativePages`. Integrations that serve pages without a CMS no longer keep three hand-written lists of the same pages, which is what let them drift apart. + + Dynamic routes are declared as `/cases/:id` instead of a regex kept in the slug field: the registry matches a slug segment by segment, prefers a static route over a dynamic one, exposes the extracted params through `matchPage` and fills them back into the slug of the page it returns. `definePage` validates a definition up front and rejects the mistakes that used to be silent — a slug without a leading slash, a translated slug that drops a param the other locales declare, a breadcrumb parent that does not cover every locale of its child, two pages that can match the same path with neither being more specific, or two pages sharing an id. + + `@o2s/integrations.mocked` and `@o2s/integrations.mocked-dxp` now declare their pages this way, which cuts their page mocks from 9880 to 1673 lines and their page mappers from 973 to 203. Every page of `@o2s/integrations.mocked` comes back field for field as before; in both integrations the derived lists fix what the hand-kept ones had lost: + + - pages that `getPage` served but the page list had forgotten now reach the sitemap and the hreflang alternates (`/help-and-support` and `/help-and-support/troubleshooting` in `mocked`, 10 of the 22 pages in `mocked-dxp`); + - alternates are emitted per locale instead of being resolved through the requested one, so a page whose slug is not localized (`/`) no longer advertises one locale three times; + - pages with a dynamic slug are left out of the page list, so the sitemap stops publishing `/cases/(.+)` as a URL; + - a slug deeper than its route (`/cases/a/b`) is no longer answered with `/cases/b`, and a request is answered with the slug it asked about instead of the one of the requested locale; + - breadcrumbs come from the page they point at, which corrects the copies that had drifted in `mocked-dxp` (`Geschäftlich` vs `Geschäft`, `Personlich` vs `Persönlich`, `Konten` in a Polish breadcrumb) and gives `/personal/accounts` the breadcrumb it declared in English only; + - the home page of `mocked-dxp` gets an id of its own (`home-1`): it shared `personal-1` with `/personal`, so the two pages were grouped as one in the sitemap and advertised each other as localized alternates. + +- 457b243: feat(framework): add `createBlockRequest` helper for block SDK methods + + Adds `createBlockRequest` to `@o2s/framework/sdk`. It creates the request function used by the methods of a block (or module) SDK and takes care of the boilerplate that was previously copy-pasted into every method: merging the default API headers with the caller's headers and the access token, serializing query params, typing the response and wrapping failures into a `BlockRequestError` (which exposes `status`, `data` and the original error as `cause`). + + `getApiHeaders` is now provided by `@o2s/framework/headers` and re-exported by `@o2s/utils.frontend` (`Utils.Headers.getApiHeaders`), so the default headers are defined in a single place. All block SDKs, the SurveyJS module SDK and the block generator template use the new helper. + +- 92c0bf8: fix(framework): merge SDK method groups instead of replacing them + + `extendSdk` spread the groups it was given over the SDK, so naming a group that was already there dropped everything it held. The frontend application hits this today: it passes a `notifications` group of its own, which leaves `sdk.notifications` with that one method and without `getNotifications`, `getNotification` and `markAs`. The returned type never showed it, being an intersection of both sides, so the compiler kept promising methods that were no longer there at runtime. + + A group the SDK already has is now merged one level deep: the methods that were there stay, the new ones land next to them, and a method of the same name replaces the one below it. Anything that is not a group of methods, `makeRequest` for instance, is replaced as before. + + The return type says all of this now, instead of intersecting both sides and hoping they agree. `extendSdk` keeps the type of the SDK it extends rather than narrowing it to `Sdk`, so extending an already extended SDK no longer hides what the first extension added, and a method the extension replaces is typed as the replacement alone rather than as both signatures at once, which used to let a call written against the old signature compile against a value that no longer had it. The type itself is exported as `ExtendedSdk`. + + `getSdk` and `extendSdk` now say in their doc comments what they build and how the merge behaves. + +- dfc3fbb: Make non-core `ApiConfig` integration slots optional. Only `cms` and `auth` are required now; every other domain (tickets, orders, carts, checkout, payments, products, customers, invoices, billingAccounts, resources, organizations, users, notifications, articles, search, cache) can be omitted. + + When a domain is omitted, its framework module registers as a no-op instead of crashing, so a project can run a minimal setup (for example a CMS-backed portal) without importing `@o2s/integrations.mocked` to fill unused slots. `createIntegrationConfig` now accepts a partial map (core domains still required) and skips absent domains. A new `DefaultCacheService` is used as a pass-through fallback when no `cache` integration is configured (caching disabled, logged at startup), so services that depend on `Cache.Service` (e.g. the Strapi/Contentful CMS integrations) keep working. The `page` service treats `articles` as optional, and the SurveyJS module registers as a no-op when `tickets` is not configured. + + This also fixes a latent bug in the search module, which previously fell back to the abstract `SearchService` (which cannot be instantiated) when no search service was configured; it now registers as a no-op instead. + + Migration: this is backward compatible for the standard, module-based usage — existing configs that provide all domains keep working unchanged. Custom code that reads an integration slot directly (e.g. `config.integrations.orders.service`) may now need optional chaining, since non-core slots are typed as possibly `undefined`. + +- ee42afd: feat(frontend): server-rendered, indexable URLs for list filters + + Filter params reached the browser only: a page always rendered with the default filters and the client + replaced them afterwards, so `/products?category=TOOLS` served the full catalogue to anyone opening the + link (a crawler included) and every filtered variant canonicalised to the bare page. + + `searchParams` now travel from the page through `renderBlocks` into the blocks (`BlockSearchParams` on + `BaseBlockProps`), and the product list resolves them into its query server-side. The block query takes + a 1-based `page` and turns it into an `offset` with the page size from the CMS config, which only the + API knows. With the server rendering the filtered state, the client's mount refetch is gone, so a + shared link costs one request instead of two. + + Its params also lost the `product_` prefix: `useUrlFilters` accepts `filterKeys` in place of a + `namespace`, which is what a public, indexed list needs to have plain, linkable URLs. Facet values are + rendered as real links next to the filter controls, because a crawler follows `` and does not + operate a select, and `generateSeo` keeps the index clean: one value of one whitelisted facet is + self-canonical and indexable, while sorting, deep pages and facet combinations canonicalise back and + are marked `noindex, follow`. + + Multi-value restore from the URL is now limited to toggle groups. A select writes a single string back + whatever `allowMultiple` says, so restoring an array into one only tripped React's `` check. + +- ee42afd: feat(ui): bidirectional URL query params sync for list block filters + + List block filter state is now kept in the URL, so filtered views can be shared, bookmarked and linked + to from elsewhere in the application. + + New `useUrlFilters` hook (plus `use-url-filters.utils` serialization helpers) in `@o2s/ui`, replacing + `useState(initialFilters)` in the ticket, order, invoice, product and notification list blocks. + Params are namespaced per block (`?ticket_status=OPEN`), multi-value filters repeat the key, + pagination is written as a 1-based `{ns}_page`, view mode as `{ns}_view`, and only values differing + from the block defaults end up in the URL. Filter changes are written with the History API + (`replaceUrlParams`), so they add no history entries and trigger no navigation. The list refetches + its own data client-side instead of the whole route being re-rendered on the server. The hook takes + `searchParams` and `onUrlChange` as arguments instead of importing `next/navigation`, which keeps + `@o2s/ui` framework-agnostic. + + Blocks that do not use the hook are unaffected. + +### Patch Changes + +- 1a520c8: chore: dependency update pass + + Update dependencies across the monorepo. Highlights: NestJS 12 (Express 5), + TypeScript 6 for type-checking/lint with native TypeScript 7 compiling the + package builds, Vite 8, Docusaurus 3.10, Storybook 10.6, @medusajs 2.20, + redis 6, surveyjs (core + react-ui) 3, and assorted minor/patch bumps. No + public package API changed; peer ranges were bumped to match (notably + @nestjs/* to ^12). + +- 02401b2: Routine dependency maintenance (patch/minor, no code changes): `@medusajs/js-sdk` & `@medusajs/types` to 2.20.1, `survey-core` & `survey-react-ui` to 3.0.3, `lucide-react` to 1.40, `sass` to 1.104, `docusaurus-plugin-sass` to 0.2.7. +- ee42afd: fix(ui): count multi-value list filters correctly in the filters drawer, so clearing every option no longer leaves the "remove filters" counter at one and equal selections are compared by contents instead of by reference +- ee42afd: refactor(ui): one list of the keys that describe a block rather than a filter + + The same idea was written out three times, and the lists had drifted: the active-filter counter skipped `offset`, `limit` and `id`, the filter badges skipped those plus `viewMode`, and the URL serialisation skipped only `id` and `limit` while checking `offset` separately. + + `BLOCK_STATE_KEYS` in `use-url-filters.utils` is now the single list, and the other two are derived from it: `DEFAULT_EXCLUDED_KEYS` drops the offset, because it is not left out of the URL but written as the 1-based `page`, and the badges add the view toggle, which is a display choice rather than a filter. The difference that used to be an accident is now one `filter` call with the reason next to it. + + `parseFiltersFromSearchParams` is also generic over the block's query now, so it returns `Partial` and the five server components no longer cast its result. A query string carries no types, so the assertion happens once inside the helper instead of at every call site, and each call names the query it is building. + +- ee42afd: fix(ui): derive list filter URL writes from the next state, so a filter change and a view mode change applied in one batch no longer write the URL from each other's stale value +- ee42afd: fix(ui): merge list filter URL writes into the live query string, so a write queued before `useSearchParams` catches up (another block's filter change, or a debounced one) no longer drops the params written in between +- Updated dependencies [010ae15] +- Updated dependencies [f8591c1] +- Updated dependencies [cb50455] +- Updated dependencies [c8a58ad] +- Updated dependencies [681d153] +- Updated dependencies [457b243] +- Updated dependencies [1a520c8] +- Updated dependencies [92c0bf8] +- Updated dependencies [cb50455] +- Updated dependencies [dfc3fbb] +- Updated dependencies [ee42afd] +- Updated dependencies [270355f] +- Updated dependencies [ee42afd] + - @o2s/configs.integrations@1.1.0 + - @o2s/framework@1.24.0 + ## 2.0.0 ### Patch Changes diff --git a/packages/ui/package.json b/packages/ui/package.json index d1057665c..c36eae94f 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -1,6 +1,6 @@ { "name": "@o2s/ui", - "version": "2.0.0", + "version": "2.1.0", "private": true, "license": "MIT", "description": "Shared UI component library for O2S blocks, built on Radix UI and Tailwind CSS.", diff --git a/packages/utils/api-harmonization/CHANGELOG.md b/packages/utils/api-harmonization/CHANGELOG.md index 8003ac8b3..6d99afb14 100644 --- a/packages/utils/api-harmonization/CHANGELOG.md +++ b/packages/utils/api-harmonization/CHANGELOG.md @@ -1,5 +1,48 @@ # @o2s/utils.api-harmonization +## 1.1.0 + +### Minor Changes + +- ee42afd: refactor(framework): one pagination resolver for the list blocks + + Every list block carried its own copy of the same two helpers, turning a query's `limit`, `offset` and `page` into the window to fetch. `Utils.Pagination.resolvePagination` in `@o2s/utils.api-harmonization` replaces all five: it takes the pagination a URL can carry (`Models.Pagination.PaginatedQuery`, structurally satisfied by any block query, so a block no longer types the helper with its own class) plus the page size to fall back on, and returns the `limit` and `offset` to use. The query shape stays a model in `@o2s/framework`, while the resolving lives with the other API-side helpers. + + `PaginatedQuery` is kept apart from `PaginationQuery`, which the domain modules extend: `page` is consumed by the block API and never reaches them, so advertising it in their contracts would promise integrations something they never receive. + + Two behaviours change with the move. A page size counts only as a whole number of rows above zero, so `?limit=-5` falls back to the CMS config instead of travelling on as a negative limit; the unit tests for the new helper are what surfaced it. + + And the fallback page size is no longer a single row. Four of the five blocks fell back to `limit: 1` when neither the query nor the CMS config named one. That fallback was inherited, and reachable, because `pagination` is optional in the CMS block models, so an entry without it rendered a one-row list. `Utils.Pagination.DEFAULT_LIMIT` (10) is the shared fallback now; the product list keeps its own 12, which matches its three-column grid. + +### Patch Changes + +- cb50455: chore(deps): update dependencies +- 681d153: chore(deps): update dependencies +- 1a520c8: chore: dependency update pass + + Update dependencies across the monorepo. Highlights: NestJS 12 (Express 5), + TypeScript 6 for type-checking/lint with native TypeScript 7 compiling the + package builds, Vite 8, Docusaurus 3.10, Storybook 10.6, @medusajs 2.20, + redis 6, surveyjs (core + react-ui) 3, and assorted minor/patch bumps. No + public package API changed; peer ranges were bumped to match (notably + @nestjs/* to ^12). + +- cb50455: chore(deps): update dependencies +- Updated dependencies [010ae15] +- Updated dependencies [f8591c1] +- Updated dependencies [cb50455] +- Updated dependencies [c8a58ad] +- Updated dependencies [681d153] +- Updated dependencies [457b243] +- Updated dependencies [1a520c8] +- Updated dependencies [92c0bf8] +- Updated dependencies [cb50455] +- Updated dependencies [dfc3fbb] +- Updated dependencies [ee42afd] +- Updated dependencies [270355f] +- Updated dependencies [ee42afd] + - @o2s/framework@1.24.0 + ## 1.0.0 ### Patch Changes diff --git a/packages/utils/api-harmonization/package.json b/packages/utils/api-harmonization/package.json index e43cf1c1c..2320863e7 100644 --- a/packages/utils/api-harmonization/package.json +++ b/packages/utils/api-harmonization/package.json @@ -1,6 +1,6 @@ { "name": "@o2s/utils.api-harmonization", - "version": "1.0.0", + "version": "1.1.0", "description": "Utility functions for O2S API Harmonization layer, including JWT and date helpers.", "private": false, "license": "MIT", diff --git a/packages/utils/frontend/CHANGELOG.md b/packages/utils/frontend/CHANGELOG.md index 5b27ef8ca..1138ca5ee 100644 --- a/packages/utils/frontend/CHANGELOG.md +++ b/packages/utils/frontend/CHANGELOG.md @@ -1,5 +1,73 @@ # @o2s/utils.frontend +## 1.1.0 + +### Minor Changes + +- ee42afd: fix(frontend): decide indexing from a filter allowlist, not from any param + + The page metadata treated every query param as a filter, so a link carrying `utm_source`, `gclid` or any other unrelated param dropped the page out of the index, and `?category=TOOLS&utm_source=x` lost its `?category=TOOLS` canonical as well. A campaign link to a category page was therefore worth nothing to a crawler. + + Two allowlists in `@o2s/utils.frontend` now drive the decision: `Utils.Seo.INDEXABLE_FILTERS` for facets whose single value still describes a page, and `Utils.Seo.LISTING_PARAMS` for the params that change a listing without deserving an index entry. Anything outside both is ignored, and a facet keeps its canonical next to them, including next to a deep page, which now canonicalises to the facet listing rather than to the bare page. + + The product list block renders its facet links from the same `INDEXABLE_FILTERS`, so the links and the canonical URLs can no longer drift apart; they were two lists kept in step by a comment. + +- 270355f: feat(utils.frontend): add the shared SDK instance the blocks can build on + + Adds `getSharedSdk` to `@o2s/utils.frontend/sdk`: the API url resolution (internal while rendering on the server, the runtime public url in the browser) and the logger settings now live in one place, and the SDK behind them is built on first use and reused — per process on the server, per bundle in the browser. Each of the 42 blocks used to repeat that setup and end up with an `ofetch` client and a logger of its own; they are migrated onto the shared instance in the same release, each reduced to `extendSdk(sdk, (sdk))`. `extendSdk` copies the instance it extends, so what one block adds to it stays invisible to the others. + + To make that possible without an `@ts-expect-error` per environment variable, `@o2s/framework/sdk` now exports `toLoggerConfig` along with the `LoggerConfig`, `LogLevel` and `LogFormat` types. It turns raw environment values into a logger config and leaves out a level or a format the logger does not know, so a typo in `LOG_LEVEL` falls back to the default instead of reaching winston. + +- ee42afd: refactor(utils.frontend): one hook for wiring a list block to the URL + + Each list block repeated the same forty lines around `useUrlFilters`, which is deliberately framework-agnostic and therefore takes its inputs from the caller: the params snapshot, the History API writer, and the multi-value keys, filter keys and starting view mode derived from the block's CMS filter config. + + `Hooks.useListFilters` does all of it, so a block passes its defaults, its namespace and its filter config. Only the two values that come from `next/navigation` stay with the block, which keeps this package free of a dependency on Next. A block with a namespace gets prefixed params; one without gets plain, linkable ones and its filter keys are derived, so the two conventions need no extra flag. + +### Patch Changes + +- cb50455: chore(deps): update dependencies +- 681d153: chore(deps): update dependencies +- 457b243: feat(framework): add `createBlockRequest` helper for block SDK methods + + Adds `createBlockRequest` to `@o2s/framework/sdk`. It creates the request function used by the methods of a block (or module) SDK and takes care of the boilerplate that was previously copy-pasted into every method: merging the default API headers with the caller's headers and the access token, serializing query params, typing the response and wrapping failures into a `BlockRequestError` (which exposes `status`, `data` and the original error as `cause`). + + `getApiHeaders` is now provided by `@o2s/framework/headers` and re-exported by `@o2s/utils.frontend` (`Utils.Headers.getApiHeaders`), so the default headers are defined in a single place. All block SDKs, the SurveyJS module SDK and the block generator template use the new helper. + +- 1a520c8: chore: dependency update pass + + Update dependencies across the monorepo. Highlights: NestJS 12 (Express 5), + TypeScript 6 for type-checking/lint with native TypeScript 7 compiling the + package builds, Vite 8, Docusaurus 3.10, Storybook 10.6, @medusajs 2.20, + redis 6, surveyjs (core + react-ui) 3, and assorted minor/patch bumps. No + public package API changed; peer ranges were bumped to match (notably + @nestjs/* to ^12). + +- cb50455: chore(deps): update dependencies +- Updated dependencies [010ae15] +- Updated dependencies [f8591c1] +- Updated dependencies [cb50455] +- Updated dependencies [c8a58ad] +- Updated dependencies [681d153] +- Updated dependencies [457b243] +- Updated dependencies [1a520c8] +- Updated dependencies [02401b2] +- Updated dependencies [92c0bf8] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [cb50455] +- Updated dependencies [dfc3fbb] +- Updated dependencies [b775189] +- Updated dependencies [ee42afd] +- Updated dependencies [270355f] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] +- Updated dependencies [ee42afd] + - @o2s/framework@1.24.0 + - @o2s/ui@2.1.0 + ## 1.0.0 ### Patch Changes diff --git a/packages/utils/frontend/package.json b/packages/utils/frontend/package.json index 8041359d6..7716724c0 100644 --- a/packages/utils/frontend/package.json +++ b/packages/utils/frontend/package.json @@ -1,6 +1,6 @@ { "name": "@o2s/utils.frontend", - "version": "1.0.0", + "version": "1.1.0", "description": "Utility functions for O2S frontend applications.", "private": false, "license": "MIT", diff --git a/packages/utils/logger/CHANGELOG.md b/packages/utils/logger/CHANGELOG.md index 4a7908bf5..c57060b23 100644 --- a/packages/utils/logger/CHANGELOG.md +++ b/packages/utils/logger/CHANGELOG.md @@ -1,5 +1,22 @@ # @o2s/utils.logger +## 1.2.4 + +### Patch Changes + +- cb50455: chore(deps): update dependencies +- 681d153: chore(deps): update dependencies +- 1a520c8: chore: dependency update pass + + Update dependencies across the monorepo. Highlights: NestJS 12 (Express 5), + TypeScript 6 for type-checking/lint with native TypeScript 7 compiling the + package builds, Vite 8, Docusaurus 3.10, Storybook 10.6, @medusajs 2.20, + redis 6, surveyjs (core + react-ui) 3, and assorted minor/patch bumps. No + public package API changed; peer ranges were bumped to match (notably + @nestjs/* to ^12). + +- cb50455: chore(deps): update dependencies + ## 1.2.3 ### Patch Changes diff --git a/packages/utils/logger/package.json b/packages/utils/logger/package.json index cf16151d6..4264f4b3e 100644 --- a/packages/utils/logger/package.json +++ b/packages/utils/logger/package.json @@ -1,6 +1,6 @@ { "name": "@o2s/utils.logger", - "version": "1.2.3", + "version": "1.2.4", "private": false, "license": "MIT", "description": "Winston-based logging utility for O2S applications with NestJS integration.",