riverbankcms 0.19.0 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -166,3 +166,30 @@ If local content includes unrelated differences, see `workflows/agent-safe-sync.
166
166
  1. Read `cli-reference.md` for detailed command documentation
167
167
  2. Review `schema.md` to understand this site's content model
168
168
  3. Check `workflows/` for step-by-step guides
169
+
170
+
171
+ ## Customer portal routes
172
+
173
+ When portal auth is enabled, `riverbankcms init` generates these reserved routes:
174
+
175
+ | Route | SDK helper | Scaffold template |
176
+ | --- | --- | --- |
177
+ | `/portal` | `createPortalPage` from `@riverbankcms/sdk/next` | `portalPageTemplates` |
178
+ | `/portal/tickets/[registrationId]` | `createPortalTicketPage` | `portalPageTemplates` |
179
+ | `/portal/digital-products/[entitlementId]` | `createPortalDigitalProductPage` | `portalPageTemplates` |
180
+ | `/portal/digital-products/[entitlementId]/files/[assetId]` | `createPortalDigitalProductFilePage` | `portalPageTemplates` |
181
+ | `/api/portal/callback` (GET) | `handlePortalCallback` from `@riverbankcms/sdk/portal` | `portalCallbackRouteTemplate` |
182
+ | `/api/portal/logout` (POST) | `handlePortalLogout` | `portalLogoutRouteTemplate` |
183
+
184
+ Existing sites should add these files after upgrading the SDK. Import
185
+ `@riverbankcms/sdk/styles.css` globally. The page helpers provide the site theme
186
+ scope automatically; sites with `themeSource: 'local'` pass the same `theme`,
187
+ `themes`/`themeSwitch`, or `getTheme` options used by their catch-all. A custom
188
+ resolver receives `content.type === 'portal'` and `content.site` on these routes. The callback and logout routes own the HTTP-only cookie.
189
+ The file route authenticates before redirecting to a signed download URL.
190
+
191
+ For a custom host, `CustomerPortal` from `@riverbankcms/sdk/portal/client` takes
192
+ `siteId`, `apiBaseUrl`, `portalToken` (nullable), `demoEmailSuppressed`, plus optional `callbackPath`, `logoutPath` and `bookPath`
193
+ (defaults `/api/portal/callback`, `/api/portal/logout`, `/book`). Wrap it in the
194
+ site's `ThemeScope`. This is a reserved route component, not a CMS block.
195
+ `@riverbankcms/sdk/portal` remains the server helper entry.
@@ -328,3 +328,28 @@ riverbankcms delete entry <content-type> <identifier> --yes
328
328
  - Verify `titleField` matches an existing field `id`
329
329
  - The field must be a text field
330
330
  - If not set, defaults to `'title'`
331
+
332
+ ### Entry links and singleton identifiers
333
+
334
+ Entry fields with `type: 'link'` use the same link objects as blocks:
335
+
336
+ ```json
337
+ {
338
+ "buttonLink": { "kind": "page", "identifier": "start-a-project" },
339
+ "subLinkLink": { "kind": "external", "href": "https://example.com" }
340
+ }
341
+ ```
342
+
343
+ Use `kind: 'url'` with `href` for a relative URL such as `/contact`.
344
+ Legacy URL strings are normalized to that object when read or published.
345
+ SDK inferred link fields use `LinkValue | null`; new content should use objects.
346
+
347
+ A singleton has one entry. Config sync creates it with identifier
348
+ `<content-type-key>-singleton`. Run `riverbankcms pull entries <content-type-key>`
349
+ (with `--env=remote` for the remote environment) and edit the resulting file.
350
+ Use the pulled identifier in both the JSON `identifier` and any identifier
351
+ argument to `riverbankcms push entries`. Push does not retarget another identifier:
352
+ a mismatch fails with a message naming the existing singleton identifier, before
353
+ writing the entry. A filename alone does not rename an entry.
354
+
355
+ Resolve entry link objects with the SDK's `resolveLinkHref(link, context)`, using the same route/stage context as block links.