riverbankcms 0.23.0 → 0.24.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.
@@ -638,16 +638,41 @@ Footer links are managed via the site's footer navigation menu (see `content/nav
638
638
  "description": "Our main venue for large events",
639
639
  "timezone": "America/Los_Angeles",
640
640
  "capacity": 200,
641
- "address": {
642
- "line1": "123 Main St",
643
- "city": "San Francisco",
644
- "region": "CA",
645
- "postcode": "94102",
646
- "country": "US"
641
+ "locationValue": {
642
+ "address": {
643
+ "building": "Main Conference Hall",
644
+ "street": "123 Main St",
645
+ "locality": "San Francisco",
646
+ "region": "CA",
647
+ "postalCode": "94102",
648
+ "country": "US"
649
+ },
650
+ "pin": { "lat": 37.7749, "lng": -122.4194 },
651
+ "doorNote": "Use the blue door beside the courtyard.",
652
+ "addressMatch": null,
653
+ "ownerConfirmedPinAndAddress": false
647
654
  }
648
655
  }
649
656
  ```
650
657
 
658
+ Locations use structured addresses; display text is derived and omits a matching
659
+ site country. `locationValue: null` removes a venue's location. Address-only and
660
+ pin-only values are valid. Pull/push preserves the canonical value, including
661
+ private check evidence; public SDK responses expose only permitted location data.
662
+
663
+ `block.location-map` uses `locationSource: "custom"` with canonical `location`,
664
+ `"venue"` with `venueId`, or `"business_address"`. A hidden business address hides
665
+ the whole block before public projection. Optional `entrancePhoto` uses a portable
666
+ image reference such as `{ "type": "image", "identifier": "studio-door", "alt": "The way in" }`.
667
+ It participates in normal media usage and recipe validation.
668
+
669
+ Public maps render ready inline SVG with theme tokens and attribution. Import
670
+ `@riverbankcms/sdk/styles.css`; no map JavaScript or vendor requests are needed.
671
+ Without a ready drawing, retain the details and ordinary directions links. The
672
+ SDK site response supplies permitted `businessLocation`, `venuesById` and
673
+ `businessLocationPermission`; pass that context to the shared renderer. Private
674
+ provider evidence, job/storage keys and archive descriptors are never public.
675
+
651
676
  ### Event Category File Format
652
677
 
653
678
  `content/event-categories/workshop.json`:
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import { $t as pageDesignIntentSchemaVersion, A as getSiteCommandMetadata, B as eventBookingOfferIntentSchema, Dn as getDirectImageUrlForSiteScopedPath, E as parseAndPlanCommandBatchForTypes, Gn as getExtensionForMimeType, Hn as slugifyMediaIdentifier, J as createCommandRef, Jn as normalizeAmbiguousStoragePathForSite, Kn as getMimeType, O as evaluateSiteCommandBatchExposure, P as entryIdentifierForCommand, Qt as pageDesignBoundaryTreatmentSchema, Rn as buildMediaIdentifierFromFilename, T as createDryRunReport, Vn as resolveMediaIdentifier, Wt as buttonStyleSelectionSchema, Xn as FILE_SIZE_LIMITS, Y as createContentEntryRef, Zn as MAX_MANAGEMENT_MEDIA_UPLOAD_BYTES, at as slugPart, en as footerPreferencesSchema, fr as asPageFlowPresetId, k as evaluateSiteCommandExposure, lr as asAppearancePresetId, m as isInternalResolvedLinkValue, n as sdkCourseBookingSettingsSchema, nt as createSiteCommandSiteRef, pr as asSiteStyleId, r as sdkEventOccurrenceInputSchema, s as RESOLVED_INTERNAL_LINK_ENTITY_TYPES, w as stableStringify, wt as themeSchema, x as resolvePageUpsertSeo, y as eventVisibilitySchema } from "./sdk-event-upsert-BnBxyTR6.mjs";
3
- import { C as parseManagementKey, Cn as unsafeAsEventOfferingId, Dn as unsafeAsOccurrenceId, N as parseFooterCompositionV1, Rn as unsafeAsStaffMemberId, S as exposeSecret, Un as err, Wn as ok, a as areConfiguredBookingVerticalConfigsEqual, c as parseVerticalPresetId, d as EVENT_PRESET_VALUES, dn as parseSiteId, en as assertNever, h as publicReadFreshnessSeconds, l as resolveSiteVerticalBookingConfig, ln as parsePageId, lt as parseBookingLocalDate, mn as unsafeAsAppointmentResourceId, n as resolveEventCatalogue, o as canonicalizeConfiguredBookingVerticalConfig, pt as resolveBookingTimeZoneId, q as formatDate, s as parseVerticalId, u as DEFAULT_EVENT_TYPE_PRESETS, wn as unsafeAsEventSeriesId, x as createSecret } from "./src-BPh_OivC.mjs";
4
- import { n as CliSdkPeerError, t as loadConfigFile } from "./load-config-D5DDfmv1.mjs";
2
+ import { $t as pageDesignIntentSchemaVersion, A as getSiteCommandMetadata, B as eventBookingOfferIntentSchema, Bn as resolveMediaIdentifier, Dn as getDirectImageUrlForSiteScopedPath, E as parseAndPlanCommandBatchForTypes, Gn as getMimeType, J as createCommandRef, Jt as buttonStyleSelectionSchema, Ln as buildMediaIdentifierFromFilename, O as evaluateSiteCommandBatchExposure, Ot as themeSchema, P as entryIdentifierForCommand, Qt as pageDesignBoundaryTreatmentSchema, T as createDryRunReport, Vn as slugifyMediaIdentifier, Wn as getExtensionForMimeType, Xn as MAX_MANAGEMENT_MEDIA_UPLOAD_BYTES, Y as createContentEntryRef, Yn as FILE_SIZE_LIMITS, at as slugPart, cr as asAppearancePresetId, dr as asPageFlowPresetId, en as footerPreferencesSchema, fr as asSiteStyleId, k as evaluateSiteCommandExposure, kr as parseSurfaceTree, m as isInternalResolvedLinkValue, n as sdkCourseBookingSettingsSchema, nt as createSiteCommandSiteRef, qn as normalizeAmbiguousStoragePathForSite, r as sdkEventOccurrenceInputSchema, s as RESOLVED_INTERNAL_LINK_ENTITY_TYPES, w as stableStringify, x as resolvePageUpsertSeo, y as eventVisibilitySchema } from "./sdk-event-upsert-DmNSeHgP.mjs";
3
+ import { An as unsafeAsEventOfferingId, C as parseManagementKey, G as locationValueSchema, Gn as unsafeAsStaffMemberId, M as parseFooterCompositionV1, Pn as unsafeAsOccurrenceId, S as exposeSecret, Xn as err, Zn as ok, a as areConfiguredBookingVerticalConfigsEqual, bt as resolveBookingTimeZoneId, c as parseVerticalPresetId, d as EVENT_PRESET_VALUES, et as formatDate, gn as parsePageId, gt as parseBookingLocalDate, h as publicReadFreshnessSeconds, jn as unsafeAsEventSeriesId, l as resolveSiteVerticalBookingConfig, n as resolveEventCatalogue, o as canonicalizeConfiguredBookingVerticalConfig, s as parseVerticalId, sn as assertNever, u as DEFAULT_EVENT_TYPE_PRESETS, vn as parseSiteId, x as createSecret, xn as unsafeAsAppointmentResourceId } from "./src-B03aw4Tv.mjs";
4
+ import { n as CliSdkPeerError, t as loadConfigFile } from "./load-config-h2Ri_tDO.mjs";
5
5
  import { Command } from "commander";
6
6
  import { AsyncLocalStorage } from "node:async_hooks";
7
7
  import * as fs$1 from "fs/promises";
@@ -815,6 +815,7 @@ const sdkPullVenueSchema = z.object({
815
815
  lat: z.number(),
816
816
  lng: z.number()
817
817
  }).partial().nullable(),
818
+ locationValue: locationValueSchema.nullable().optional(),
818
819
  mapEmbed: z.string().nullable(),
819
820
  updatedAt: sdkTimestampSchema$2,
820
821
  createdAt: sdkTimestampSchema$2
@@ -7906,6 +7907,13 @@ const ENDPOINT_DEFINITIONS = {
7906
7907
  responseKind: "json",
7907
7908
  errors: []
7908
7909
  },
7910
+ replyToSupportTicket: {
7911
+ path: "/assistant/support/reply",
7912
+ method: "POST",
7913
+ auth: "user",
7914
+ responseKind: "json",
7915
+ errors: []
7916
+ },
7909
7917
  assistantTurn: {
7910
7918
  path: "/assistant/turn",
7911
7919
  method: "POST",
@@ -9392,6 +9400,22 @@ const ENDPOINT_DEFINITIONS = {
9392
9400
  auth: "admin",
9393
9401
  responseKind: "json"
9394
9402
  },
9403
+ adminReplyToSupportTicket: {
9404
+ path: "/admin/support/tickets/reply",
9405
+ method: "POST",
9406
+ tags: ["admin", "support"],
9407
+ auth: "admin",
9408
+ responseKind: "json",
9409
+ errors: []
9410
+ },
9411
+ adminSetSupportTicketStatus: {
9412
+ path: "/admin/support/tickets/status",
9413
+ method: "POST",
9414
+ tags: ["admin", "support"],
9415
+ auth: "admin",
9416
+ responseKind: "json",
9417
+ errors: []
9418
+ },
9395
9419
  mfaTotpEnroll: {
9396
9420
  path: "/auth/mfa/totp/enroll",
9397
9421
  method: "POST",
@@ -11460,8 +11484,17 @@ const ENDPOINT_DEFINITIONS = {
11460
11484
  responseKind: "json",
11461
11485
  errors: ["resource:conflict", "resource:not_found"]
11462
11486
  },
11463
- geocodeVenue: {
11464
- path: "/sites/{siteId}/bookings/geocode",
11487
+ previewLocationDrawing: {
11488
+ errors: ["resource:not_found"],
11489
+ path: "/sites/{siteId}/location/drawing-preview",
11490
+ method: "POST",
11491
+ tags: [],
11492
+ auth: "user",
11493
+ responseKind: "json"
11494
+ },
11495
+ geocodeLocation: {
11496
+ errors: ["resource:not_found"],
11497
+ path: "/sites/{siteId}/location/geocode",
11465
11498
  method: "POST",
11466
11499
  tags: ["site-{siteId}"],
11467
11500
  auth: "user",
@@ -13400,6 +13433,32 @@ function extractSurfaceAwareSiteSlug(value) {
13400
13433
  const result = classifySurfaceSiteHost(value);
13401
13434
  return result.kind === "managed-site" ? result.siteSlug : null;
13402
13435
  }
13436
+ /**
13437
+ * Pick the surface to embed in a per-user email link, by counting input
13438
+ * sites and returning the most common surface. The strict `next > bestCount`
13439
+ * comparison means the first surface to reach a new maximum wins ties,
13440
+ * matching input order.
13441
+ */
13442
+ function pickDominantSurface(sites) {
13443
+ const first = sites[0];
13444
+ if (first === undefined) return null;
13445
+ return sites.reduce((tally, site) => {
13446
+ const next = (tally.counts.get(site.surfaceId) ?? 0) + 1;
13447
+ const counts = new Map(tally.counts).set(site.surfaceId, next);
13448
+ return next > tally.bestCount ? {
13449
+ counts,
13450
+ best: site.surfaceId,
13451
+ bestCount: next
13452
+ } : {
13453
+ ...tally,
13454
+ counts
13455
+ };
13456
+ }, {
13457
+ counts: new Map(),
13458
+ best: first.surfaceId,
13459
+ bestCount: 0
13460
+ }).best;
13461
+ }
13403
13462
 
13404
13463
  //#endregion
13405
13464
  //#region ../api/src/url.ts
@@ -13881,7 +13940,7 @@ async function parseSuccessResponse(endpoint, response, config) {
13881
13940
  }
13882
13941
  let parsed;
13883
13942
  try {
13884
- parsed = JSON.parse(raw);
13943
+ parsed = parseSurfaceTree(JSON.parse(raw));
13885
13944
  } catch (cause) {
13886
13945
  throw new ApiRequestError(`Failed to parse JSON response for endpoint ${String(endpoint)}`, {
13887
13946
  endpoint,
@@ -13952,6 +14011,9 @@ function createRawCMSClient(getHeaders = () => ({}), baseUrl) {
13952
14011
  return fetchPromise;
13953
14012
  };
13954
14013
  }
14014
+ function surfaceTransportCapability(endpoint) {
14015
+ return endpoint === "getContentByPath" ? "revision-v1" : undefined;
14016
+ }
13955
14017
  function buildApiRequestPlan(input) {
13956
14018
  const { endpoint, body, params, headers = {}, baseUrl } = input;
13957
14019
  const options = input.options ?? {};
@@ -13993,6 +14055,7 @@ function buildApiRequestPlan(input) {
13993
14055
  appendQueryParam(queryParams, key, value);
13994
14056
  });
13995
14057
  }
14058
+ appendQueryParam(queryParams, "surfaceTransport", surfaceTransportCapability(endpoint));
13996
14059
  const queryString = queryParams.toString();
13997
14060
  if (queryString) {
13998
14061
  url += (url.includes("?") ? "&" : "?") + queryString;
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { _ as normalizeLinkValue, a as classifySdkEventSchedule, g as linkSchema, i as sdkEventUpsertOptionalFieldSchemas, n as sdkCourseBookingSettingsSchema, o as classifySdkEventBookingOffer } from "./sdk-event-upsert-BnBxyTR6.mjs";
3
- import { d as EVENT_PRESET_VALUES } from "./src-BPh_OivC.mjs";
2
+ import { _ as normalizeLinkValue, a as classifySdkEventSchedule, g as linkSchema, i as sdkEventUpsertOptionalFieldSchemas, n as sdkCourseBookingSettingsSchema, o as classifySdkEventBookingOffer } from "./sdk-event-upsert-DmNSeHgP.mjs";
3
+ import { d as EVENT_PRESET_VALUES } from "./src-B03aw4Tv.mjs";
4
4
  import { z } from "zod";
5
5
 
6
6
  //#region ../blocks/src/lib/typeGuards.ts
@@ -2631,6 +2631,10 @@ function validateBlockKindForEntrySlot(definition, blockKind) {
2631
2631
  }
2632
2632
  return ok(normalized);
2633
2633
  }
2634
+ /**
2635
+ * Kinds that read the entry a template is rendering (its event, its slots),
2636
+ * so they have nothing to show anywhere but a content type's template.
2637
+ */
2634
2638
  function isTemplateOnlyBlockKind(blockKind) {
2635
2639
  return blockKind.startsWith("system.") || TEMPLATE_ONLY_BLOCK_KINDS.includes(blockKind);
2636
2640
  }
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import { t as loadConfigFile } from "./load-config-h2Ri_tDO.mjs";
3
+
4
+ export { loadConfigFile };
@@ -7,7 +7,7 @@ import { existsSync as existsSync$1 } from "fs";
7
7
  import { fileURLToPath } from "url";
8
8
 
9
9
  //#region package.json
10
- var version = "0.23.0";
10
+ var version = "0.24.0";
11
11
  var peerDependencies = { "@riverbankcms/sdk": ">=0.157.0 <1.0.0" };
12
12
  var package_default = {
13
13
  name: "riverbankcms",
@@ -83,7 +83,7 @@ var package_default = {
83
83
  //#endregion
84
84
  //#region src/version.ts
85
85
  /** The package manifest is the source-run fallback; builds inject this value. */
86
- const CLI_VERSION = typeof "0.23.0" === "string" ? "0.23.0" : version;
86
+ const CLI_VERSION = typeof "0.24.0" === "string" ? "0.24.0" : version;
87
87
  /**
88
88
  * The CLI's SDK peer range is bundled from the CLI manifest alongside its
89
89
  * version. Runtime config loading uses this value as the single compatibility
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { Un as err, Wn as ok, dn as parseSiteId } from "./src-BPh_OivC.mjs";
2
+ import { Xn as err, Zn as ok, vn as parseSiteId } from "./src-B03aw4Tv.mjs";
3
3
  import { existsSync, readFileSync } from "node:fs";
4
4
  import { dirname, isAbsolute, join, parse, relative, resolve, sep } from "node:path";
5
5
  import { fileURLToPath } from "node:url";
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import "../src-BPh_OivC.mjs";
3
- import { a as prepareScaffoldExecution, d as loadGeneratedPackageRanges, i as preflightScaffoldTargets, l as deriveGeneratedPackageRanges, o as writeScaffoldFiles, r as preflightScaffoldPlan, s as deriveScaffoldLocalManifest, t as deriveScaffoldPlan, u as findPackageManifestPath } from "../plan-6m8gsGI8.mjs";
2
+ import "../src-B03aw4Tv.mjs";
3
+ import { a as prepareScaffoldExecution, d as loadGeneratedPackageRanges, i as preflightScaffoldTargets, l as deriveGeneratedPackageRanges, o as writeScaffoldFiles, r as preflightScaffoldPlan, s as deriveScaffoldLocalManifest, t as deriveScaffoldPlan, u as findPackageManifestPath } from "../plan-Dyv1rMTT.mjs";
4
4
 
5
5
  export { deriveGeneratedPackageRanges, deriveScaffoldLocalManifest, deriveScaffoldPlan, findPackageManifestPath, loadGeneratedPackageRanges, preflightScaffoldPlan, preflightScaffoldTargets, prepareScaffoldExecution, writeScaffoldFiles };