Skip to content

Open Self Service Release 1.7.0

Latest

Choose a tag to compare

@MichuZmb MichuZmb released this 30 Nov 13:47
c788077

header

We're excited to announce Release 1.7.0 of Open Self Service! This release brings custom framework modules, Strapi Live Preview with draft content across all blocks, shareable and SEO-friendly list filters, and a much simpler integration configuration where only the CMS and auth are required. Under the hood, the whole stack moves to NestJS 12, TypeScript 6/7, Node.js 24 and npm 12, and create-o2s-app gets a refreshed template and a round of scaffolding fixes.

Let's dive into what's new!

New features

Custom framework modules

Until now, the harmonization layer offered a fixed set of core modules (tickets, orders, invoices, and so on). If your project needed a domain that O2S doesn't cover, you had to build it outside the framework.

With the new createModule() factory you can define your own base modules that follow the same patterns as the built-in ones: a normalized model, an abstract service that integrations implement, and a controller exposed through the API Harmonization app. Custom modules are registered in app.module.ts, and there's a new generator that scaffolds a module together with its integration, so the module and the backend that serves it stay cleanly separated.

See the Extending framework modules guide for a step-by-step walkthrough.

Strapi Live Preview and draft content everywhere

Editors working with Strapi can now use Live Preview with edit-in-place. Draft content is fetched from Strapi, and Content Source Maps are encoded on the API Harmonization server after mapping, so clicking a piece of text in the Strapi preview takes the editor straight to the field to edit. Edit-in-place currently covers the FAQ, Quick Links, Ticket List, Category List and Article List blocks, each with an "Edit block" shortcut, and requires Strapi Enterprise 5.12 or later.

Along the way we fixed a long-standing gap in draft mode: previously only a handful of blocks passed the CMS preview flag, so most of a page showed published content even in preview. The flag now travels through every block, from the renderer to the CMS integration, so a draft page looks exactly like it will after publishing.

There's also a new endpoint for keeping caches fresh: your CMS can call POST /api/cms/purge-cache on publish to clear cached content. It's protected with a shared secret (CMS_CACHE_PURGE_SECRET) and refuses all requests when the secret is not set.

See the Strapi Live Preview documentation for setup instructions.

Shareable, indexable list filters

Filters in list blocks (tickets, orders, invoices, notifications, products) are now kept in the URL. A filtered view can be bookmarked, shared or linked to from anywhere in the app, and the page is rendered with the filters already applied on the server, so there's no flash of unfiltered data and one request instead of two.

For public listings like the product list, this also helps with SEO:

  • filter params are plain and linkable (for example /products?category=TOOLS),
  • facet values are rendered as real links that crawlers can follow,
  • a single value of a whitelisted facet is indexable with its own canonical URL, while sorting, deep pages and facet combinations point back to the base listing and are marked noindex, follow,
  • unrelated params such as utm_source or gclid no longer affect indexing.

Simpler integration configuration

Configuring which integration serves which domain used to be spread across 18 separate model files. It's now a single typed config.ts built with the new createIntegrationConfig helper:

  • swapping an integration for a domain is a one-line change,
  • assigning an integration to a domain it doesn't provide is a compile-time error instead of a runtime crash.

On top of that, only cms and auth are required now. Every other domain (tickets, orders, carts, search, cache, and the rest) can be omitted, and its module registers as a no-op. This makes minimal setups, such as a CMS-driven portal, possible without pulling in the mocked integration just to fill unused slots. When no cache integration is configured, a pass-through cache is used so integrations that depend on it keep working.

Declarative pages for integrations without a CMS

Integrations that serve pages without a CMS (like the mocked ones) can now declare each page once with CMS.Pages.definePage and build a registry with CMS.Pages.createPageRegistry. The registry derives getPage, getPages and getAlternativePages from that single declaration, supports dynamic routes like /cases/:id, and validates definitions up front (missing leading slashes, inconsistent localized slugs, ambiguous routes, duplicate ids).

The mocked integrations already use it, which also fixed several inconsistencies in their sitemaps, hreflang alternates and breadcrumbs.

One place to register blocks

Registering a block in the API Harmonization app used to require edits in several files. Now each app has a single blocks.config.ts that lists the blocks it uses; their NestJS modules are registered automatically, and the frontend renderer registry is type-checked against the same list. The block generator (npm run generate) fills it in for you.

Leaner block SDKs

Blocks talk to the API through small SDKs, and each of them used to repeat the same setup and request boilerplate. This release adds:

  • createBlockRequest in @o2s/framework/sdk, which handles headers, the access token, query params, typing and error wrapping (BlockRequestError) for every SDK method,
  • getSharedSdk in @o2s/utils.frontend/sdk, a single SDK instance that all blocks build on instead of creating their own HTTP client and logger.

extendSdk was also fixed: extending a group that already exists (for example notifications) now merges the methods instead of silently replacing the whole group.

Carts per organization

Carts are now scoped to the selected organization. Switching organizations no longer mixes up cart contents, and a new cart badge in the header shows the current number of items, kept in sync across blocks through a lightweight event bus.

REST API reference

The documentation now includes a full REST API reference for the API Harmonization layer, generated from OpenAPI, with request and response schemas for every endpoint.

Other changes

Platform and dependencies

This release moves the whole stack forward:

Area Before Now
Node.js 22+ 24.15+
npm (packageManager) 11 12
NestJS 11 12 (Express 5)
TypeScript 5 6 for type-checking, native 7 for package builds
Next.js 16.1 16.4
Vite / Storybook / Turborepo 7 / 10.2 / 2.8 8 / 10.6 / 2.11

Other notable upgrades include Medusa 2.20, Redis 6, SurveyJS 3 and react-day-picker 10.

Migration notes

A few changes may require action if you maintain your own project or custom packages:

  • @o2s/framework is now a peer dependency of all published blocks, integrations, modules and utils. Make sure your app installs @o2s/framework itself, so a single copy is shared and NestJS can resolve its dependency injection tokens.
  • Environment variables: server-only variables lost their NEXT_PUBLIC_ prefix: LOG_LEVEL, LOG_FORMAT, LOG_COLORS_ENABLED, BASE_URL and API_URL_INTERNAL. NEXT_PUBLIC_API_URL is now read at runtime.
  • CMS integrations: the 36+ block-specific methods of CmsService were replaced with a single generic getBlockConfig<T>(). Custom CMS integrations need to implement it instead of the individual methods.
  • Optional integration slots: code that reads a non-core slot directly (for example config.integrations.orders.service) may need optional chaining, since those slots can now be undefined.
  • Product list URLs: filter params no longer use the product_ prefix.
  • UI: the captionClassName prop was removed from the Calendar component (styling is unchanged).

create-o2s-app

  • The project template was refreshed with everything above, and all @o2s/* packages in it point to the latest versions. If npx create-o2s-app failed for you with an ERESOLVE error recently, it works again with version 4.1.11.
  • Scaffolding now correctly removes unselected blocks from blocks.config.ts and their unused imports from the frontend, so projects generated with a subset of blocks build and pass lint out of the box.
  • Dependencies are deduplicated during scaffolding, private modules are preserved, and install scripts needed by the mocked integration and telemetry are allowed under npm 12.

Bugfixes

  • Fixed hydration errors on article pages caused by nested paragraphs in rich text.
  • Fixed an error toast when opening an unread notification in the mocked integration.
  • Fixed payment methods not being shown in checkout in some cases.
  • Fixed order sorting in the Medusa integration.
  • Live Preview components are now published as .js, so they resolve correctly when installed from npm.
  • List blocks no longer fall back to a single-row page when the CMS doesn't define a page size.