riverbankcms 0.20.0 → 0.22.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.
- package/dist/acceptance/matrix.mjs +4 -4
- package/dist/cli/index.mjs +62948 -699
- package/dist/cli/init-docs/content/getting-started.md +43 -0
- package/dist/entryCommands-CoGu0G2R.mjs +23205 -0
- package/dist/{eventUpsertInputSchema-VVBVGA6x.mjs → eventUpsertInputSchema-B0ubhUu5.mjs} +239 -7
- package/dist/load-config-Kg45qY-N.mjs +4 -0
- package/dist/{load-config-gqUEjIyB.mjs → load-config-j58KSqxl.mjs} +3 -3
- package/dist/{plan-HAEMHc5T.mjs → plan-C4IphkPc.mjs} +41 -3
- package/dist/scaffold/index.mjs +2 -2
- package/dist/{richTextSchema-DTvrDDF5.mjs → sdk-event-upsert-BqjzK2zT.mjs} +505 -304
- package/dist/{src-Dixcv4PB.mjs → src-zzwJUef5.mjs} +175 -27
- package/dist/testing.mjs +4 -4
- package/package.json +2 -2
- package/dist/entryCommands-8kDjOex0.mjs +0 -111695
- package/dist/load-config-Cut7_6t_.mjs +0 -4
|
@@ -166,3 +166,46 @@ 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
|
+
| `/redeem` | `createRedeemPage` | `portalPageTemplates` |
|
|
182
|
+
| `/api/portal/callback` (GET + POST) | `handlePortalCallback` from `@riverbankcms/sdk/portal` | `portalCallbackRouteTemplate` |
|
|
183
|
+
| `/api/portal/logout` (POST) | `handlePortalLogout` | `portalLogoutRouteTemplate` |
|
|
184
|
+
|
|
185
|
+
Existing sites should add these files after upgrading the SDK. Import
|
|
186
|
+
`@riverbankcms/sdk/styles.css` globally. The page helpers provide the site theme
|
|
187
|
+
scope automatically; sites with `themeSource: 'local'` pass the same `theme`,
|
|
188
|
+
`themes`/`themeSwitch`, or `getTheme` options used by their catch-all. A custom
|
|
189
|
+
resolver receives `content.type === 'portal'` and `content.site` on these routes. The callback and logout routes own the HTTP-only cookie.
|
|
190
|
+
The file route authenticates before redirecting to a signed download URL.
|
|
191
|
+
|
|
192
|
+
For a custom host, `CustomerPortal` from `@riverbankcms/sdk/portal/client` takes
|
|
193
|
+
`siteId`, `apiBaseUrl`, `portalToken` (nullable), `demoEmailSuppressed`, plus optional `callbackPath`, `logoutPath` and `bookPath`
|
|
194
|
+
(defaults `/api/portal/callback`, `/api/portal/logout`, `/book`). Wrap it in the
|
|
195
|
+
site's `ThemeScope`. This is a reserved route component, not a CMS block.
|
|
196
|
+
`@riverbankcms/sdk/portal` remains the server helper entry.
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
Gift delivery needs `/redeem`, the portal routes and the callback POST handler
|
|
200
|
+
in place before the site sends gifts. Upgrade the SDK and add the scaffolded
|
|
201
|
+
routes together. The redeem helper accepts the same theme options as the portal.
|
|
202
|
+
Add `Referrer-Policy: no-referrer` to `/redeem` in your Next config (the scaffold
|
|
203
|
+
includes it); this protects emailed gift tokens in outbound referrers.
|
|
204
|
+
|
|
205
|
+
For a custom host, `RedeemGiftCard` from `@riverbankcms/sdk/gifting/client` takes
|
|
206
|
+
`siteId`, `apiBaseUrl`, `siteTitle`, `publicContactEmail` (nullable), optional
|
|
207
|
+
`token` and `code`, and optional `callbackPath`, `portalPath`, `homePath` (defaults
|
|
208
|
+
`/api/portal/callback`, `/portal`, `/`). Its `onSignedIn` callback refreshes host
|
|
209
|
+
chrome after sign-in; the Next helper supplies that callback. Wrap the shared
|
|
210
|
+
component in the site's `ThemeScope`. The callback POST expects JSON
|
|
211
|
+
`{ portalCode }` from the same origin and returns JSON without redirecting.
|