riverbankcms 0.32.1 → 0.32.2

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.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { En as sdkEntrySlotBlocksInputSchema, a as classifySdkEventSchedule, i as sdkEventUpsertOptionalFieldSchemas, n as sdkCourseBookingSettingsSchema, o as classifySdkEventBookingOffer } from "./sdk-event-upsert-D6oZBDR5.mjs";
3
- import { _ as EVENT_PRESET_VALUES } from "./src-gbODrFjm.mjs";
2
+ import { En as sdkEntrySlotBlocksInputSchema, a as classifySdkEventSchedule, i as sdkEventUpsertOptionalFieldSchemas, n as sdkCourseBookingSettingsSchema, o as classifySdkEventBookingOffer } from "./sdk-event-upsert-B3Ln6jqq.mjs";
3
+ import { y as EVENT_PRESET_VALUES } from "./src-wXdYu3yt.mjs";
4
4
  import { z } from "zod";
5
5
 
6
6
  //#region src/commands/eventUpsertInputSchema.ts
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import { t as loadConfigFile } from "./load-config-CTuNN3xv.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.32.1";
10
+ var version = "0.32.2";
11
11
  var peerDependencies = { "@riverbankcms/sdk": ">=0.157.0 <1.0.0" };
12
12
  var package_default = {
13
13
  name: "riverbankcms",
@@ -94,7 +94,7 @@ var package_default = {
94
94
  //#endregion
95
95
  //#region src/version.ts
96
96
  /** The package manifest is the source-run fallback; builds inject this value. */
97
- const CLI_VERSION = typeof "0.32.1" === "string" ? "0.32.1" : version;
97
+ const CLI_VERSION = typeof "0.32.2" === "string" ? "0.32.2" : version;
98
98
  /**
99
99
  * The CLI's SDK peer range is bundled from the CLI manifest alongside its
100
100
  * version. Runtime config loading uses this value as the single compatibility
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { Sr as ok, lr as parseSiteId, xr as err } from "./src-gbODrFjm.mjs";
2
+ import { Er as ok, Tr as err, pr as parseSiteId } from "./src-wXdYu3yt.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-gbODrFjm.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-BKUvYkD2.mjs";
2
+ import "../src-wXdYu3yt.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-pGcbGyYC.mjs";
4
4
 
5
5
  export { deriveGeneratedPackageRanges, deriveScaffoldLocalManifest, deriveScaffoldPlan, findPackageManifestPath, loadGeneratedPackageRanges, preflightScaffoldPlan, preflightScaffoldTargets, prepareScaffoldExecution, writeScaffoldFiles };
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { $n as unsafeAsStoragePath, An as unsafeAsBookingRequirementId, Ft as localScheduleTimePattern, Gn as unsafeAsFileChecksumSha256, Gt as validateBookingPaymentOptionKinds, H as parseMailingListGlobalForm, Hn as parseMediaAssetId, Ht as parseUtcIsoDateTimeString, Jn as unsafeAsPositiveByteCount, K as parseFooterCompositionV1, Kn as unsafeAsMediaAssetId, Ln as unsafeAsEntitlementId, On as assertNever, Qn as unsafeAsStorageBucketName, Sr as ok, Un as unsafeAsDeclaredMimeType, V as parseConfiguredMailingListProvider, Vn as unsafeAsBookingSessionId, Vt as parseBookingTimeZone, Wn as unsafeAsDetectedMimeType, Wt as BOOKING_COURSE_INSTALMENT_DEADLINES, Xn as unsafeAsSafeDownloadFilename, Yn as unsafeAsPositiveSeconds, Z as isCanonicalRichTextDoc, Zn as unsafeAsSiteScopedStoragePath, _ as EVENT_PRESET_VALUES, _n as mapNonEmptyArray, ct as locationValueSchema, dr as unsafeAsSiteId, er as unsafeAsUploadSessionId, et as parsePublicContactDetails, fr as unsafeAsUserId, gn as fromArray, h as resolveSiteVerticalBookingConfig, hr as unsafeAsEventCategoryId, i as isRecord$6, it as SENSITIVE_COLLECTION_MODES, lr as parseSiteId, mt as isPresent, n as OFFLINE_PAYMENT_METHODS, ot as stableJsonStringify, qn as unsafeAsOriginalFilename, rt as SENSITIVE_COLLECTION_CONFIRMATION_VERSION, sr as unsafeAsSiteFontId, t as isEventOccurrenceRouteSegment, tr as unsafeAsProductId, tt as parseWeeklyOpeningHours, u as NAVIGATION_LOCATIONS, v as ORDINARY_EVENT_PRESET_VALUES, vn as mapReadonlyNonEmptyArray, xr as err } from "./src-gbODrFjm.mjs";
2
+ import { $n as unsafeAsPositiveSeconds, Er as ok, G as parseMailingListGlobalForm, Gn as unsafeAsBookingSessionId, Gt as parseUtcIsoDateTimeString, Jn as unsafeAsDetectedMimeType, Jt as validateBookingPaymentOptionKinds, Kn as parseMediaAssetId, Mn as assertNever, Pn as unsafeAsBookingRequirementId, Qn as unsafeAsPositiveByteCount, Rt as localScheduleTimePattern, Sn as mapReadonlyNonEmptyArray, Tr as err, Vn as unsafeAsEntitlementId, W as parseConfiguredMailingListProvider, Wt as parseBookingTimeZone, Xn as unsafeAsMediaAssetId, Y as parseFooterCompositionV1, Yn as unsafeAsFileChecksumSha256, Zn as unsafeAsOriginalFilename, _ as resolveSiteVerticalBookingConfig, _t as isPresent, ar as unsafeAsProductId, b as ORDINARY_EVENT_PRESET_VALUES, bn as fromArray, dr as unsafeAsSiteFontId, dt as locationValueSchema, er as unsafeAsSafeDownloadFilename, et as isCanonicalRichTextDoc, f as NAVIGATION_LOCATIONS, gr as unsafeAsUserId, hr as unsafeAsSiteId, i as isRecord$6, ir as unsafeAsUploadSessionId, it as parseWeeklyOpeningHours, lt as stableJsonStringify, n as OFFLINE_PAYMENT_METHODS, nr as unsafeAsStorageBucketName, ot as SENSITIVE_COLLECTION_CONFIRMATION_VERSION, pr as parseSiteId, qn as unsafeAsDeclaredMimeType, qt as BOOKING_COURSE_INSTALMENT_DEADLINES, rr as unsafeAsStoragePath, rt as parsePublicContactDetails, st as SENSITIVE_COLLECTION_MODES, t as isEventOccurrenceRouteSegment, tr as unsafeAsSiteScopedStoragePath, xn as mapNonEmptyArray, y as EVENT_PRESET_VALUES, yr as unsafeAsEventCategoryId } from "./src-wXdYu3yt.mjs";
3
3
  import { createRequire } from "node:module";
4
4
  import { z } from "zod";
5
5
 
@@ -96,6 +96,7 @@ const resourceKinds = [
96
96
  "event",
97
97
  "discount-code",
98
98
  "gifting-offer",
99
+ "mailing-list-topic",
99
100
  "pass",
100
101
  "membership",
101
102
  "customer",
@@ -811,6 +812,7 @@ const decorativeTransitionIntentValues = [
811
812
  "wave-edge-drift",
812
813
  "wave-edge-echo",
813
814
  "arc-edge-echo",
815
+ "arc-edge-bulge",
814
816
  "angle-edge",
815
817
  "angle-edge-subtle",
816
818
  "angle-edge-steep"
@@ -7259,7 +7261,7 @@ const pricingOptionSchema = z.object({
7259
7261
  function slidingScaleSchema(currency, portable) {
7260
7262
  return z.object({
7261
7263
  kind: fieldMeaning(z.literal("sliding_scale"), {
7262
- ...meaning$1("Sliding scale", "People choose what to pay within your range."),
7264
+ ...meaning$1("Sliding scale", "People pick what they pay, between a lowest and highest price you set."),
7263
7265
  valueLabels: { sliding_scale: "Sliding scale" }
7264
7266
  }),
7265
7267
  currency,
@@ -7292,7 +7294,7 @@ function createEventPricingSchemas(option, currency, portable = false) {
7292
7294
  }).strict();
7293
7295
  const single = z.object({
7294
7296
  kind: fieldMeaning(z.literal("single"), {
7295
- ...meaning$1("Single price", "One price for everyone."),
7297
+ ...meaning$1("Single price", "Everyone pays the same price."),
7296
7298
  valueLabels: { single: "Single price" }
7297
7299
  }),
7298
7300
  currency,
@@ -7300,7 +7302,7 @@ function createEventPricingSchemas(option, currency, portable = false) {
7300
7302
  }).strict();
7301
7303
  const tiered = z.object({
7302
7304
  kind: fieldMeaning(z.literal("tiered"), {
7303
- ...meaning$1("Ticket types", "A few options, each with its own price."),
7305
+ ...meaning$1("Ticket types", "A few choices at different prices, like standard and concession."),
7304
7306
  valueLabels: { tiered: "Ticket types" }
7305
7307
  }),
7306
7308
  currency,
@@ -42627,6 +42629,15 @@ const configureMailingListCommandSchema = z.object({
42627
42629
  bookingOptIn: z.boolean().default(false)
42628
42630
  }).strict()
42629
42631
  }).strict();
42632
+ /** A topic people can join on the site's own list. Its name is its identity, so a rerun finds it rather than repeating it. */
42633
+ const upsertMailingListTopicCommandSchema = z.object({
42634
+ type: z.literal("upsertMailingListTopic"),
42635
+ ref: resourceRefSchema("mailing-list-topic"),
42636
+ input: z.object({
42637
+ name: z.string().min(1),
42638
+ description: z.string().min(1).nullable().optional()
42639
+ }).strict()
42640
+ }).strict();
42630
42641
 
42631
42642
  //#endregion
42632
42643
  //#region ../site-commands/src/packageCommandFields.ts
@@ -42742,7 +42753,7 @@ const configuredVerticalConfigSchema = z.object({
42742
42753
  if (resolved.kind === "configured") return resolved.config;
42743
42754
  context.addIssue({
42744
42755
  code: z.ZodIssueCode.custom,
42745
- message: resolved.kind === "unconfigured" ? "Booking vertical configuration must select a vertical and at least one preset" : `Invalid booking vertical configuration: ${resolved.issues.map((issue$1) => issue$1.code).join(", ")}`
42756
+ message: resolved.kind === "unconfigured" ? "Booking vertical configuration must select a business type" : `Invalid booking vertical configuration: ${resolved.issues.map((issue$1) => issue$1.code).join(", ")}`
42746
42757
  });
42747
42758
  return z.NEVER;
42748
42759
  });
@@ -43524,6 +43535,7 @@ const siteCommandSchema = z.discriminatedUnion("type", [
43524
43535
  configureSiteIdentityCommandSchema,
43525
43536
  configureBookingSettingsCommandSchema,
43526
43537
  configureMailingListCommandSchema,
43538
+ upsertMailingListTopicCommandSchema,
43527
43539
  applySiteStyleSelectionCommandSchema,
43528
43540
  upsertMediaAssetCommandSchema,
43529
43541
  upsertPageCommandSchema,
@@ -43847,6 +43859,19 @@ const siteCommandMetadata = {
43847
43859
  capability: "mailing_list.setup.write",
43848
43860
  support: "supported"
43849
43861
  },
43862
+ upsertMailingListTopic: {
43863
+ scope: "mailing_list",
43864
+ risk: "low",
43865
+ writeSemantics: "upsert",
43866
+ lifecycleIntent: "mutation",
43867
+ idempotencyStrategy: "recipe_ref",
43868
+ conflictPolicy: "update_existing",
43869
+ previewability: "dry_run_only",
43870
+ allowedRuntimes: allRuntimes,
43871
+ intendedExposure: recipeExposure,
43872
+ capability: "mailing_list.setup.write",
43873
+ support: "supported"
43874
+ },
43850
43875
  applySiteStyleSelection: {
43851
43876
  scope: "style",
43852
43877
  risk: "low",
@@ -44750,7 +44775,8 @@ function commandRefContributions(command) {
44750
44775
  if (isLifecycleRefCommand(command)) return lifecycleCommandRefContributions(command);
44751
44776
  if (command.type === "upsertDiscountCode") return discountCodeRefContributions(command);
44752
44777
  switch (command.type) {
44753
- case "upsertGiftingOffer": return {
44778
+ case "upsertGiftingOffer":
44779
+ case "upsertMailingListTopic": return {
44754
44780
  provides: [{
44755
44781
  ref: command.ref,
44756
44782
  field: "ref"
@@ -8471,6 +8471,13 @@ function resolveWholeSeriesPaymentDates(input) {
8471
8471
  //#endregion
8472
8472
  //#region ../core/src/public-read-cache-contract.ts
8473
8473
  const PUBLIC_AVAILABILITY_FRESHNESS_SECONDS = 60;
8474
+ /**
8475
+ * How long a rendered page may hold availability it read through the batch
8476
+ * transport. Writers purge those pages by tag and batch POSTs never touch the
8477
+ * CDN, so this is only the backstop for a purge that failed. Checkout enforces
8478
+ * capacity itself, whatever a page showed.
8479
+ */
8480
+ const PUBLIC_RENDERED_AVAILABILITY_FRESHNESS_SECONDS = 1800;
8474
8481
  const PUBLIC_CONTENT_FRESHNESS_SECONDS = 3600;
8475
8482
  function availability(fetchTags, transport) {
8476
8483
  return {
@@ -8532,6 +8539,10 @@ function getPublicReadCachePolicy(endpoint) {
8532
8539
  function publicReadFreshnessSeconds(endpoint) {
8533
8540
  return getPublicReadCachePolicy(endpoint).freshness === "availability" ? PUBLIC_AVAILABILITY_FRESHNESS_SECONDS : PUBLIC_CONTENT_FRESHNESS_SECONDS;
8534
8541
  }
8542
+ /** The freshness budget of a read made through the uncached batch transport. */
8543
+ function publicReadBatchFreshnessSeconds(endpoint) {
8544
+ return getPublicReadCachePolicy(endpoint).freshness === "availability" ? PUBLIC_RENDERED_AVAILABILITY_FRESHNESS_SECONDS : PUBLIC_CONTENT_FRESHNESS_SECONDS;
8545
+ }
8535
8546
 
8536
8547
  //#endregion
8537
8548
  //#region ../core/src/event-series-behaviour.ts
@@ -8872,14 +8883,10 @@ function createConfiguredSiteVerticalBookingConfig(verticalId, selectedPresetIds
8872
8883
  selectedPresetIds
8873
8884
  };
8874
8885
  }
8875
- function toNonEmptyVerticalPresetIds(presetIds) {
8876
- const firstPresetId = presetIds[0];
8877
- return firstPresetId ? [firstPresetId, ...presetIds.slice(1)] : null;
8878
- }
8879
8886
  /**
8880
8887
  * Construct a configured booking selection only when the supplied preset IDs
8881
8888
  * form a valid selection for the vertical. Invalid, cross-vertical, future,
8882
- * duplicate, or empty selections return null.
8889
+ * or duplicate selections return null. An empty selection keeps the business type with bookings off.
8883
8890
  */
8884
8891
  function createSiteVerticalBookingConfig(verticalId, selectedPresetIds) {
8885
8892
  const resolved = resolveSiteVerticalBookingConfig({
@@ -8914,9 +8921,6 @@ function collectRawConfigIssues(rawConfig, config) {
8914
8921
  rawValue: rawPresetValue
8915
8922
  });
8916
8923
  }
8917
- if (rawConfig.verticalId != null && config.selectedPresetIds.length === 0) {
8918
- issues = appendUniqueIssue(issues, { code: "empty_selected_presets" });
8919
- }
8920
8924
  return issues;
8921
8925
  }
8922
8926
  function collectPresetConfigIssues(config) {
@@ -8975,8 +8979,7 @@ function resolveSiteVerticalBookingConfig(rawConfig) {
8975
8979
  config,
8976
8980
  issues
8977
8981
  };
8978
- const nonEmptyPresetIds = toNonEmptyVerticalPresetIds(selectedPresetIds);
8979
- const configuredConfig = verticalId !== null && nonEmptyPresetIds !== null ? createConfiguredSiteVerticalBookingConfig(verticalId, nonEmptyPresetIds) : null;
8982
+ const configuredConfig = verticalId !== null ? createConfiguredSiteVerticalBookingConfig(verticalId, selectedPresetIds) : null;
8980
8983
  if (configuredConfig === null) {
8981
8984
  return {
8982
8985
  kind: "invalid",
@@ -9068,7 +9071,7 @@ function getVerticalPresetSelectionOptions(config) {
9068
9071
  return [{
9069
9072
  preset: presetDefinition,
9070
9073
  checked,
9071
- disabledReason: checked && selectedIds.size === 1 ? "last_selected_preset" : null
9074
+ disabledReason: null
9072
9075
  }];
9073
9076
  });
9074
9077
  }
@@ -9107,13 +9110,6 @@ function setVerticalPresetSelected(config, presetId, selected) {
9107
9110
  }
9108
9111
  const selectedIds = new Set(resolved.config.selectedPresetIds);
9109
9112
  if (!selected) {
9110
- if (selectedIds.size <= 1) {
9111
- return {
9112
- ok: false,
9113
- error: "last_selected_preset",
9114
- config: resolved.config
9115
- };
9116
- }
9117
9113
  selectedIds.delete(presetId);
9118
9114
  const nextConfig = createSiteVerticalBookingConfig(verticalId, orderPresetIdsForVertical(verticalId, selectedIds));
9119
9115
  return {
@@ -9144,13 +9140,6 @@ function setVerticalPresetsSelected(config, presetIds) {
9144
9140
  };
9145
9141
  }
9146
9142
  const fallbackConfig = resolved.kind === "configured" ? resolved.config : DEFAULT_SITE_VERTICAL_BOOKING_CONFIG;
9147
- if (presetIds.length === 0) {
9148
- return {
9149
- ok: false,
9150
- error: "last_selected_preset",
9151
- config: fallbackConfig
9152
- };
9153
- }
9154
9143
  const presetByBehaviour = new Map();
9155
9144
  for (const presetId of presetIds) {
9156
9145
  const presetDefinition = getVerticalPresetDefinition(presetId);
@@ -9306,6 +9295,101 @@ const PORTAL_NAV_DEFAULT_LABELS = {
9306
9295
  loggedIn: "My account"
9307
9296
  };
9308
9297
 
9298
+ //#endregion
9299
+ //#region ../core/src/booking-offerings.ts
9300
+ /** The selection owns availability. Stored module flags are only its write-time projection (#1773). */
9301
+ function deriveBookingModules(selection) {
9302
+ const config = selection.verticalConfig;
9303
+ const presets = (config?.selectedPresetIds ?? []).map(getVerticalPresetDefinition);
9304
+ return {
9305
+ appointments: presets.some(({ engine }) => engine === "appointment_service"),
9306
+ events: config?.verticalId != null ? presets.some(({ engine }) => engine === "event_series") : (selection.eventTypePresets ?? []).length > 0
9307
+ };
9308
+ }
9309
+ function withDerivedBookingModules(selection) {
9310
+ return {
9311
+ ...selection,
9312
+ modules: deriveBookingModules(selection)
9313
+ };
9314
+ }
9315
+ function offeringSelectionKey(selection) {
9316
+ const config = selection.verticalConfig;
9317
+ return JSON.stringify({
9318
+ business: config?.verticalId ?? null,
9319
+ choices: [...config?.verticalId != null ? config.selectedPresetIds : selection.eventTypePresets ?? []].sort()
9320
+ });
9321
+ }
9322
+ function bookingOfferingSelectionChanged(current, next) {
9323
+ return offeringSelectionKey(current) !== offeringSelectionKey(next);
9324
+ }
9325
+ /** Unrelated saves and stale module fields cannot change availability. */
9326
+ function withBookingModulesForSelectionChange(current, next) {
9327
+ return {
9328
+ ...next,
9329
+ modules: bookingOfferingSelectionChanged(current, next) ? deriveBookingModules(next) : current.modules
9330
+ };
9331
+ }
9332
+ function nonEmptyGenericKinds(kinds) {
9333
+ return kinds === undefined ? DEFAULT_EVENT_TYPE_PRESETS : kinds.length > 0 ? kinds : ["event"];
9334
+ }
9335
+ function selectionIncludesPreset(selection, preset) {
9336
+ if (selection.verticalConfig?.verticalId) return selection.verticalConfig.selectedPresetIds.includes(preset.id);
9337
+ const kinds = selection.eventTypePresets ?? DEFAULT_EVENT_TYPE_PRESETS;
9338
+ return kinds.some((kind) => preset.engine === "event_series" && kind === eventPresetForVerticalPreset(preset) || kind === "term" && preset.canonicalBehaviour === "course");
9339
+ }
9340
+ /** Generic event lists need no business profile until appointments are requested. */
9341
+ function reconcileGenericOfferings(selection, availability$1) {
9342
+ if (selection.verticalConfig?.verticalId != null) return null;
9343
+ if (!availability$1.appointments) return {
9344
+ kind: "ready",
9345
+ selection: {
9346
+ ...selection,
9347
+ eventTypePresets: availability$1.events ? nonEmptyGenericKinds(selection.eventTypePresets) : []
9348
+ }
9349
+ };
9350
+ return selection.eventTypePresets?.includes("performance") === true ? {
9351
+ kind: "unmappable",
9352
+ module: "events"
9353
+ } : null;
9354
+ }
9355
+ /** One-time availability reconciliation, also used when onboarding expresses engine intent. */
9356
+ function reconcileBookingOfferingSelection(selection, availability$1) {
9357
+ const generic = reconcileGenericOfferings(selection, availability$1);
9358
+ if (generic !== null) return generic;
9359
+ const verticalId = selection.verticalConfig?.verticalId ?? "something_else";
9360
+ const options = getVerticalPresetsForVertical(verticalId, { availability: "selectable" });
9361
+ const selected = options.filter((preset) => selectionIncludesPreset(selection, preset));
9362
+ const enabled = selected.filter(({ engine }) => availability$1[engine === "appointment_service" ? "appointments" : "events"]);
9363
+ const wanted = ["events", "appointments"].filter((module) => availability$1[module]);
9364
+ const missing = wanted.filter((module) => !enabled.some(({ engine }) => engine === (module === "events" ? "event_series" : "appointment_service")));
9365
+ const additions = missing.map((module) => options.find(({ engine }) => engine === (module === "events" ? "event_series" : "appointment_service")));
9366
+ const unmappable = missing.find((_, index) => additions[index] === undefined);
9367
+ if (unmappable !== undefined) return {
9368
+ kind: "unmappable",
9369
+ module: unmappable
9370
+ };
9371
+ const ids = [...enabled, ...additions.flatMap((preset) => preset !== undefined ? [preset] : [])].map(({ id }) => id);
9372
+ const config = createSiteVerticalBookingConfig(verticalId, ids);
9373
+ if (config === null) return {
9374
+ kind: "unmappable",
9375
+ module: "events"
9376
+ };
9377
+ return {
9378
+ kind: "ready",
9379
+ selection: {
9380
+ ...selection,
9381
+ verticalConfig: config,
9382
+ eventTypePresets: []
9383
+ }
9384
+ };
9385
+ }
9386
+ /** Permission and confirmation are about losing an engine, not removing one of several event kinds. */
9387
+ function planBookingAvailabilityChange(current, next, canChangeAvailability) {
9388
+ if (current.events === next.events && current.appointments === next.appointments) return "unchanged";
9389
+ if (!canChangeAvailability) return "forbidden";
9390
+ return current.events && !next.events || current.appointments && !next.appointments ? "confirm" : "apply";
9391
+ }
9392
+
9309
9393
  //#endregion
9310
9394
  //#region ../core/src/event-catalogue.ts
9311
9395
  /** Accepts validated settings; defaults and raw configuration parsing belong to the caller. */
@@ -9317,10 +9401,14 @@ function resolveEventCatalogue(settings) {
9317
9401
  pluralLabel: preset.pluralLabel,
9318
9402
  description: preset.description
9319
9403
  }));
9320
- if (entries.length > 0) return {
9404
+ if (settings.verticalConfig?.verticalId != null) return entries.length > 0 ? {
9321
9405
  source: "business_profile",
9322
9406
  entries,
9323
9407
  catchAll: "implicit"
9408
+ } : {
9409
+ source: "generic",
9410
+ entries: [],
9411
+ catchAll: "unavailable"
9324
9412
  };
9325
9413
  return {
9326
9414
  source: "generic",
@@ -9639,6 +9727,12 @@ function formatCreditProductUnits(useCase, count) {
9639
9727
  function formatCreditProductBalance(useCase, balance) {
9640
9728
  return `${balance.remaining} of ${balance.total} ${creditProductUnitNoun(useCase, balance.total)} left`;
9641
9729
  }
9730
+ /** Confirmation copy shared by booking screens and editable email wording. */
9731
+ function formatCreditProductPayment(input) {
9732
+ const used = input.creditsUsed;
9733
+ const payment = used !== undefined && used !== 0 && !Number.isNaN(used) ? `${used} credit${used === 1 ? "" : "s"} from your ${input.name}` : `Paid with your ${input.name}`;
9734
+ return payment + (input.creditsRemaining === undefined ? "" : ` (${input.creditsRemaining} left)`);
9735
+ }
9642
9736
 
9643
9737
  //#endregion
9644
9738
  //#region ../core/src/patch/index.ts
@@ -10755,6 +10849,11 @@ const EMAIL_DEFINITIONS = {
10755
10849
  perEvent: false,
10756
10850
  templateStorage: true
10757
10851
  },
10852
+ waitlist_cancelled: {
10853
+ wording: "editable",
10854
+ perEvent: false,
10855
+ templateStorage: true
10856
+ },
10758
10857
  waitlist_claim: {
10759
10858
  wording: "editable",
10760
10859
  perEvent: false,
@@ -11259,4 +11358,4 @@ function isEventOccurrenceRouteSegment(segment) {
11259
11358
  }
11260
11359
 
11261
11360
  //#endregion
11262
- export { formatOpeningHoursRows as $, unsafeAsStoragePath as $n, businessCancellationRefusalCodes as $t, resolveWholeSeriesBookingPhase as A, unsafeAsBookingRequirementId as An, formatLocalScheduleDate as At, assessMailingListTargeting as B, parseDatedOfferingCapacityHoldId as Bn, toBookingTimeZone as Bt, getPublicReadCachePolicy as C, toNonNegativeCents as Cn, blockInteractionContextSchema as Cr, formatTimeRange as Ct, firstLiveRunSessionStartMs as D, parseCurrencyCode as Dn, buildBookingUtcDateWindow as Dt, CANCELLED_SESSION_STATUS as E, formatCurrencyAmount as En, toScheduledBookingDateTime as Et, slugify as F, parseSiteTermsVersionId as Fn, localScheduleTimePattern as Ft, parseMailingListProviderScope as G, unsafeAsFileChecksumSha256 as Gn, validateBookingPaymentOptionKinds as Gt, parseMailingListGlobalForm as H, parseMediaAssetId as Hn, parseUtcIsoDateTimeString as Ht, parseMailingListBlockId as I, parseMembershipId as In, parseBookingLocalDate as It, parseMailingListPlacementTargeting as J, unsafeAsPositiveByteCount as Jn, clampConfiguredAmount as Jt, parseFooterCompositionV1 as K, unsafeAsMediaAssetId as Kn, isLiveOrderInstalmentPlanStatus as Kt, parseMailingListContentVersionId as L, unsafeAsEntitlementId as Ln, parseLocalScheduleTime as Lt, createSecret as M, unsafeAsAppointmentResourceId as Mn, getBookingLocalDateKey as Mt, exposeSecret as N, unsafeAsStaffMemberId as Nn, getLocalScheduleDate as Nt, nextLiveRunSessionStartMs as O, assertNever as On, addLocalScheduleDays as Ot, parseManagementKey as P, parseCustomerId as Pn, getLocalScheduleTime as Pt, richTextHasText as Q, unsafeAsStorageBucketName as Qn, splitAmountWithRemainderInFirst as Qt, parseMailingListSignedSourceToken as R, unsafeAsPassId as Rn, resolveBookingBusinessTimeZone as Rt, PUBLIC_CONTENT_FRESHNESS_SECONDS as S, toCents as Sn, ok as Sr, formatTime as St, publicReadFreshnessSeconds as T, unsafeAsPositiveCents as Tn, resolveBookingDisplayContext as Tt, DEFAULT_MAILING_LIST_PRIVACY_NOTE as U, unsafeAsDeclaredMimeType as Un, toUtcIsoDateTimeString as Ut, parseConfiguredMailingListProvider as V, unsafeAsBookingSessionId as Vn, parseBookingTimeZone as Vt, DEFAULT_MAILING_LIST_SUCCESS_MESSAGE as W, unsafeAsDetectedMimeType as Wn, BOOKING_COURSE_INSTALMENT_DEADLINES as Wt, planMailingListChoicePresentation as X, unsafeAsSafeDownloadFilename as Xn, getBookingInstalmentPlanIntervalCount as Xt, DEFAULT_MAILING_LIST_TARGETING as Y, unsafeAsPositiveSeconds as Yn, getBookingInstalmentDepositRefundability as Yt, isCanonicalRichTextDoc as Z, unsafeAsSiteScopedStoragePath as Zn, omitZeroAmountFutureRows as Zt, EVENT_PRESET_VALUES as _, mapNonEmptyArray as _n, unsafeAsEventOfferingId as _r, selectCategoryView as _t, authoredValuesEqual as a, EVENT_PRESET_VOCABULARY as an, parseEditorSessionGeneration as ar, decideLocationSave as at, WHOLE_SERIES_EVENT_PRESET_VALUES as b, parseNonNegativeCents as bn, unsafeAsPricingOptionId as br, formatDateTime as bt, planTurningOnCourses as c, isPublicEventPricingOptionDisplayable as cn, parseApiKeyId as cr, locationValueSchema as ct, areConfiguredBookingVerticalConfigsEqual as d, publicEventPricingOptions as dn, unsafeAsSiteId as dr, projectPublicLocation as dt, scheduleBookingReasonCodes as en, unsafeAsUploadSessionId as er, parsePublicContactDetails as et, canonicalizeConfiguredBookingVerticalConfig as f, publicEventPricingStrategy as fn, unsafeAsUserId as fr, publicLocationSchema as ft, DEFAULT_EVENT_TYPE_PRESETS as g, fromArray as gn, unsafeAsEventInstanceId as gr, mapDrawingSchema as gt, resolveSiteVerticalBookingConfig as h, resolvePricingOptionsPriceDisplay as hn, unsafeAsEventCategoryId as hr, trimmedStringOrNull as ht, isRecord as i, parsePageSurfaceSubject as in, unsafeAsOrderPaymentPlanId as ir, SENSITIVE_COLLECTION_MODES as it, resolveWholeSeriesRunLifecycle as j, unsafeAsDemoCapability as jn, formatLocalScheduleTime as jt, orderedLiveRunSessions as k, formatDurationUnitLabel as kn, compareLocalScheduleDates as kt, resolveEventCatalogue as l, publicEventPricingCurrency as ln, parseSiteId as lr, normalizeLocationAddressText as lt, parseVerticalPresetId as m, resolveExactOrFreePriceDisplay as mn, parseRetiredCourseId as mr, isPresent as mt, OFFLINE_PAYMENT_METHODS as n, resolveFlexibleBalanceInitialPaymentCents as nn, unsafeAsCheckoutLineId as nr, assertAllowedPublicUrl as nt, creditProductUnitNoun as o, formatBookingPriceDisplay as on, parsePageId as or, stableJsonStringify as ot, parseVerticalId as p, publicEventPricingType as pn, parseEventSeriesId as pr, toLocationCoordinates as pt, footerLayoutForLookId as q, unsafeAsOriginalFilename as qn, addIntervalPreservingMonthAnchor as qt, committedWriteProofSchema as r, deriveTotalTicketQuantity as rn, unsafeAsOrderFlexibleBalanceContractId as rr, SENSITIVE_COLLECTION_CONFIRMATION_VERSION as rt, formatCreditProductUnits as s, formatEventPricing as sn, unsafeAsSiteFontId as sr, locationMapLinks as st, isEventOccurrenceRouteSegment as t, resolveFlexibleBalanceDueAt as tn, unsafeAsProductId as tr, parseWeeklyOpeningHours as tt, NAVIGATION_LOCATIONS as u, publicEventPricingDisplay as un, parseUserId as ur, parseLocationValue as ut, ORDINARY_EVENT_PRESET_VALUES as v, mapReadonlyNonEmptyArray as vn, unsafeAsEventSeriesId as vr, formatDate as vt, isPublicReadEndpoint as w, unsafeAsNonNegativeCents as wn, inferSiteDateLocale as wt, PUBLIC_AVAILABILITY_FRESHNESS_SECONDS as x, parsePositiveCents as xn, err as xr, formatDateTimeRange as xt, SURFACE_EVENT_PRESET_VALUES as y, isNonNegativeWholeCents as yn, unsafeAsOccurrenceId as yr, formatDateRange as yt, parseMailingListRuntimeContext as z, parseDatedOfferingCapacityHoldAuditRef as zn, resolveBookingTimeZoneId as zt };
11361
+ export { planMailingListChoicePresentation as $, unsafeAsPositiveSeconds as $n, getBookingInstalmentPlanIntervalCount as $t, firstLiveRunSessionStartMs as A, formatCurrencyAmount as An, buildBookingUtcDateWindow as At, parseMailingListContentVersionId as B, parseMembershipId as Bn, parseLocalScheduleTime as Bt, PUBLIC_AVAILABILITY_FRESHNESS_SECONDS as C, isNonNegativeWholeCents as Cn, unsafeAsOccurrenceId as Cr, formatDateTime as Ct, publicReadBatchFreshnessSeconds as D, toNonNegativeCents as Dn, blockInteractionContextSchema as Dr, inferSiteDateLocale as Dt, isPublicReadEndpoint as E, toCents as En, ok as Er, formatTimeRange as Et, createSecret as F, unsafeAsDemoCapability as Fn, getBookingLocalDateKey as Ft, parseMailingListGlobalForm as G, unsafeAsBookingSessionId as Gn, parseUtcIsoDateTimeString as Gt, parseMailingListRuntimeContext as H, unsafeAsPassId as Hn, resolveBookingTimeZoneId as Ht, exposeSecret as I, unsafeAsAppointmentResourceId as In, getLocalScheduleDate as It, parseMailingListProviderScope as J, unsafeAsDetectedMimeType as Jn, validateBookingPaymentOptionKinds as Jt, DEFAULT_MAILING_LIST_PRIVACY_NOTE as K, parseMediaAssetId as Kn, toUtcIsoDateTimeString as Kt, parseManagementKey as L, unsafeAsStaffMemberId as Ln, getLocalScheduleTime as Lt, orderedLiveRunSessions as M, assertNever as Mn, compareLocalScheduleDates as Mt, resolveWholeSeriesBookingPhase as N, formatDurationUnitLabel as Nn, formatLocalScheduleDate as Nt, publicReadFreshnessSeconds as O, unsafeAsNonNegativeCents as On, resolveBookingDisplayContext as Ot, resolveWholeSeriesRunLifecycle as P, unsafeAsBookingRequirementId as Pn, formatLocalScheduleTime as Pt, DEFAULT_MAILING_LIST_TARGETING as Q, unsafeAsPositiveByteCount as Qn, getBookingInstalmentDepositRefundability as Qt, slugify as R, parseCustomerId as Rn, localScheduleTimePattern as Rt, WHOLE_SERIES_EVENT_PRESET_VALUES as S, mapReadonlyNonEmptyArray as Sn, unsafeAsEventSeriesId as Sr, formatDateRange as St, getPublicReadCachePolicy as T, parsePositiveCents as Tn, err as Tr, formatTime as Tt, assessMailingListTargeting as U, parseDatedOfferingCapacityHoldAuditRef as Un, toBookingTimeZone as Ut, parseMailingListSignedSourceToken as V, unsafeAsEntitlementId as Vn, resolveBookingBusinessTimeZone as Vt, parseConfiguredMailingListProvider as W, parseDatedOfferingCapacityHoldId as Wn, parseBookingTimeZone as Wt, footerLayoutForLookId as X, unsafeAsMediaAssetId as Xn, addIntervalPreservingMonthAnchor as Xt, parseFooterCompositionV1 as Y, unsafeAsFileChecksumSha256 as Yn, isLiveOrderInstalmentPlanStatus as Yt, parseMailingListPlacementTargeting as Z, unsafeAsOriginalFilename as Zn, clampConfiguredAmount as Zt, resolveSiteVerticalBookingConfig as _, publicEventPricingType as _n, parseEventSeriesId as _r, isPresent as _t, authoredValuesEqual as a, resolveFlexibleBalanceDueAt as an, unsafeAsProductId as ar, assertAllowedPublicUrl as at, ORDINARY_EVENT_PRESET_VALUES as b, fromArray as bn, unsafeAsEventInstanceId as br, selectCategoryView as bt, formatCreditProductUnits as c, parsePageSurfaceSubject as cn, unsafeAsOrderPaymentPlanId as cr, decideLocationSave as ct, withBookingModulesForSelectionChange as d, formatEventPricing as dn, unsafeAsSiteFontId as dr, locationValueSchema as dt, getBookingInstalmentProtectedDepositAmountCents as en, unsafeAsSafeDownloadFilename as er, isCanonicalRichTextDoc as et, NAVIGATION_LOCATIONS as f, isPublicEventPricingOptionDisplayable as fn, parseApiKeyId as fr, normalizeLocationAddressText as ft, parseVerticalPresetId as g, publicEventPricingStrategy as gn, unsafeAsUserId as gr, toLocationCoordinates as gt, parseVerticalId as h, publicEventPricingOptions as hn, unsafeAsSiteId as hr, publicLocationSchema as ht, isRecord as i, scheduleBookingReasonCodes as in, unsafeAsUploadSessionId as ir, parseWeeklyOpeningHours as it, nextLiveRunSessionStartMs as j, parseCurrencyCode as jn, addLocalScheduleDays as jt, CANCELLED_SESSION_STATUS as k, unsafeAsPositiveCents as kn, toScheduledBookingDateTime as kt, planTurningOnCourses as l, EVENT_PRESET_VOCABULARY as ln, parseEditorSessionGeneration as lr, stableJsonStringify as lt, canonicalizeConfiguredBookingVerticalConfig as m, publicEventPricingDisplay as mn, parseUserId as mr, projectPublicLocation as mt, OFFLINE_PAYMENT_METHODS as n, splitAmountWithRemainderInFirst as nn, unsafeAsStorageBucketName as nr, formatOpeningHoursRows as nt, creditProductUnitNoun as o, resolveFlexibleBalanceInitialPaymentCents as on, unsafeAsCheckoutLineId as or, SENSITIVE_COLLECTION_CONFIRMATION_VERSION as ot, areConfiguredBookingVerticalConfigsEqual as p, publicEventPricingCurrency as pn, parseSiteId as pr, parseLocationValue as pt, DEFAULT_MAILING_LIST_SUCCESS_MESSAGE as q, unsafeAsDeclaredMimeType as qn, BOOKING_COURSE_INSTALMENT_DEADLINES as qt, committedWriteProofSchema as r, businessCancellationRefusalCodes as rn, unsafeAsStoragePath as rr, parsePublicContactDetails as rt, formatCreditProductPayment as s, deriveTotalTicketQuantity as sn, unsafeAsOrderFlexibleBalanceContractId as sr, SENSITIVE_COLLECTION_MODES as st, isEventOccurrenceRouteSegment as t, omitZeroAmountFutureRows as tn, unsafeAsSiteScopedStoragePath as tr, richTextHasText as tt, resolveEventCatalogue as u, formatBookingPriceDisplay as un, parsePageId as ur, locationMapLinks as ut, DEFAULT_EVENT_TYPE_PRESETS as v, resolveExactOrFreePriceDisplay as vn, parseRetiredCourseId as vr, trimmedStringOrNull as vt, PUBLIC_CONTENT_FRESHNESS_SECONDS as w, parseNonNegativeCents as wn, unsafeAsPricingOptionId as wr, formatDateTimeRange as wt, SURFACE_EVENT_PRESET_VALUES as x, mapNonEmptyArray as xn, unsafeAsEventOfferingId as xr, formatDate as xt, EVENT_PRESET_VALUES as y, resolvePricingOptionsPriceDisplay as yn, unsafeAsEventCategoryId as yr, mapDrawingSchema as yt, parseMailingListBlockId as z, parseSiteTermsVersionId as zn, parseBookingLocalDate as zt };
package/dist/testing.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import "./sdk-event-upsert-D6oZBDR5.mjs";
3
- import "./src-gbODrFjm.mjs";
4
- import { G as syncLocalMediaForPull, Gt as applyPushConfigPlan, Jt as preparePushConfigTarget, W as syncLocalMediaForPush, at as readEntries, ht as writeMediaManifest, kn as createOutput, o as executeEntryCommandPlanAsSyncResult, t as compileEntryPushCommands, z as calculateEntryDiffs } from "./entryCommands-KmqgJ44o.mjs";
5
- import "./load-config-C_QmGbxS.mjs";
2
+ import "./sdk-event-upsert-B3Ln6jqq.mjs";
3
+ import "./src-wXdYu3yt.mjs";
4
+ import { G as syncLocalMediaForPull, Gt as applyPushConfigPlan, Jt as preparePushConfigTarget, W as syncLocalMediaForPush, at as readEntries, ht as writeMediaManifest, kn as createOutput, o as executeEntryCommandPlanAsSyncResult, t as compileEntryPushCommands, z as calculateEntryDiffs } from "./entryCommands-B2kELFEc.mjs";
5
+ import "./load-config-CTuNN3xv.mjs";
6
6
 
7
7
  export { applyPushConfigPlan, calculateEntryDiffs, compileEntryPushCommands, createOutput, executeEntryCommandPlanAsSyncResult, preparePushConfigTarget, readEntries, syncLocalMediaForPull, syncLocalMediaForPush, writeMediaManifest };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "riverbankcms",
3
- "version": "0.32.1",
3
+ "version": "0.32.2",
4
4
  "description": "Riverbank CMS command-line tools for SDK site developers",
5
5
  "bin": {
6
6
  "riverbankcms": "dist/cli/index.mjs"
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env node
2
- import { t as loadConfigFile } from "./load-config-C_QmGbxS.mjs";
3
-
4
- export { loadConfigFile };