riverbankcms 0.21.0 → 0.22.1

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.
@@ -603,13 +603,17 @@ const CURRENCY_LOCALE_BY_CODE = {
603
603
  function resolveCurrencyLocale(currencyCode, override) {
604
604
  return override ?? CURRENCY_LOCALE_BY_CODE[currencyCode] ?? "en";
605
605
  }
606
- function fractionDigitsFor(decimals, exactFormatter) {
606
+ function fractionDigitsFor(decimals, exactFormatter, amount) {
607
607
  switch (decimals) {
608
608
  case "exact": return {};
609
- case "auto": return {
610
- minimumFractionDigits: 0,
611
- maximumFractionDigits: exactFormatter.resolvedOptions().maximumFractionDigits
612
- };
609
+ case "auto": {
610
+ const fraction = exactFormatter.formatToParts(amount).find((part) => part.type === "fraction")?.value;
611
+ const zeroFraction = exactFormatter.formatToParts(0).find((part) => part.type === "fraction")?.value;
612
+ return fraction === zeroFraction ? {
613
+ minimumFractionDigits: 0,
614
+ maximumFractionDigits: exactFormatter.resolvedOptions().maximumFractionDigits
615
+ } : {};
616
+ }
613
617
  case "whole": return {
614
618
  minimumFractionDigits: 0,
615
619
  maximumFractionDigits: 0
@@ -643,12 +647,19 @@ function formatCurrencyMajorUnits(amount, currency, options) {
643
647
  return new Intl.NumberFormat(locale, {
644
648
  style: "currency",
645
649
  currency: currencyCode,
646
- ...fractionDigitsFor(options?.decimals ?? "exact", exactFormatter)
650
+ ...fractionDigitsFor(options?.decimals ?? "exact", exactFormatter, amount)
647
651
  }).format(amount);
648
652
  } catch {
649
653
  return `${amount.toFixed(2)} ${currencyCode}`;
650
654
  }
651
655
  }
656
+ /** Gift-card copy retains pence only when the amount has a fractional part. */
657
+ function formatGiftCardAmountLabel(amountCents, currency = "GBP") {
658
+ return formatCurrencyAmount(amountCents, currency, {
659
+ locale: "en-GB",
660
+ decimals: amountCents % 100 === 0 ? "whole" : "exact"
661
+ });
662
+ }
652
663
 
653
664
  //#endregion
654
665
  //#region ../core/src/money-input.ts
@@ -1349,7 +1360,8 @@ function createEventOfferingPageSurfaceSubject(eventOfferingId, input) {
1349
1360
  const identity = {
1350
1361
  kind: "eventOffering",
1351
1362
  eventOfferingId,
1352
- catalogueEventSeriesIds: input.catalogueEventSeriesIds
1363
+ catalogueEventSeriesIds: input.catalogueEventSeriesIds,
1364
+ ...input.detailAdmission ? { detailAdmission: input.detailAdmission } : {}
1353
1365
  };
1354
1366
  return input.bookingScope === "whole_series" ? {
1355
1367
  ...identity,
@@ -1375,57 +1387,60 @@ function parseEventPageSurfaceDestinationMode(value) {
1375
1387
  function parseEventPageSurfaceSubject(value) {
1376
1388
  if (!isRecord$9(value)) return err({ kind: "notObject" });
1377
1389
  switch (value.kind) {
1378
- case "eventSeries": {
1379
- const eventSeriesId = parseEventSeriesId(value.eventSeriesId);
1380
- if (!eventSeriesId.ok) {
1381
- return err({
1382
- kind: "invalidEventSeriesId",
1383
- error: eventSeriesId.error
1384
- });
1385
- }
1386
- if (value.bookingScope !== "single_occurrence" && value.bookingScope !== "whole_series") {
1387
- return err({
1388
- kind: "invalidEventSeriesBookingScope",
1389
- bookingScope: value.bookingScope
1390
- });
1391
- }
1392
- return ok(createEventSeriesPageSurfaceSubject(eventSeriesId.value, value.bookingScope, parseEventPageSurfaceDestinationMode(value.eventDestinationMode)));
1393
- }
1394
- case "eventOffering": {
1395
- const eventOfferingId = parseEventOfferingId(value.eventOfferingId);
1396
- if (!eventOfferingId.ok) {
1397
- return err({
1398
- kind: "invalidEventOfferingId",
1399
- error: eventOfferingId.error
1400
- });
1401
- }
1402
- if (!Array.isArray(value.catalogueEventSeriesIds)) {
1403
- return err({
1404
- kind: "invalidEventOfferingCatalogue",
1405
- catalogue: value.catalogueEventSeriesIds
1406
- });
1407
- }
1408
- if (value.bookingScope !== "single_occurrence" && value.bookingScope !== "whole_series") {
1409
- return err({
1410
- kind: "invalidEventOfferingBookingScope",
1411
- bookingScope: value.bookingScope
1412
- });
1413
- }
1414
- const parsedCatalogueIds = parseEventSeriesIdList(value.catalogueEventSeriesIds);
1415
- if (!parsedCatalogueIds.ok) return parsedCatalogueIds;
1416
- const eventDestinationMode = parseEventPageSurfaceDestinationMode(value.eventDestinationMode);
1417
- return ok(createEventOfferingPageSurfaceSubject(eventOfferingId.value, {
1418
- catalogueEventSeriesIds: parsedCatalogueIds.value,
1419
- bookingScope: value.bookingScope,
1420
- ...eventDestinationMode ? { eventDestinationMode } : {}
1421
- }));
1422
- }
1390
+ case "eventSeries": return parseEventSeriesPageSurfaceSubject(value);
1391
+ case "eventOffering": return parseEventOfferingPageSurfaceSubject(value);
1423
1392
  default: return err({
1424
1393
  kind: "unsupportedSubject",
1425
1394
  subjectKind: value.kind
1426
1395
  });
1427
1396
  }
1428
1397
  }
1398
+ function parseEventSeriesPageSurfaceSubject(value) {
1399
+ const eventSeriesId = parseEventSeriesId(value.eventSeriesId);
1400
+ if (!eventSeriesId.ok) {
1401
+ return err({
1402
+ kind: "invalidEventSeriesId",
1403
+ error: eventSeriesId.error
1404
+ });
1405
+ }
1406
+ if (value.bookingScope !== "single_occurrence" && value.bookingScope !== "whole_series") {
1407
+ return err({
1408
+ kind: "invalidEventSeriesBookingScope",
1409
+ bookingScope: value.bookingScope
1410
+ });
1411
+ }
1412
+ return ok(createEventSeriesPageSurfaceSubject(eventSeriesId.value, value.bookingScope, parseEventPageSurfaceDestinationMode(value.eventDestinationMode)));
1413
+ }
1414
+ function parseEventOfferingPageSurfaceSubject(value) {
1415
+ const eventOfferingId = parseEventOfferingId(value.eventOfferingId);
1416
+ if (!eventOfferingId.ok) {
1417
+ return err({
1418
+ kind: "invalidEventOfferingId",
1419
+ error: eventOfferingId.error
1420
+ });
1421
+ }
1422
+ if (!Array.isArray(value.catalogueEventSeriesIds)) {
1423
+ return err({
1424
+ kind: "invalidEventOfferingCatalogue",
1425
+ catalogue: value.catalogueEventSeriesIds
1426
+ });
1427
+ }
1428
+ if (value.bookingScope !== "single_occurrence" && value.bookingScope !== "whole_series") {
1429
+ return err({
1430
+ kind: "invalidEventOfferingBookingScope",
1431
+ bookingScope: value.bookingScope
1432
+ });
1433
+ }
1434
+ const parsedCatalogueIds = parseEventSeriesIdList(value.catalogueEventSeriesIds);
1435
+ if (!parsedCatalogueIds.ok) return parsedCatalogueIds;
1436
+ const eventDestinationMode = parseEventPageSurfaceDestinationMode(value.eventDestinationMode);
1437
+ return ok(createEventOfferingPageSurfaceSubject(eventOfferingId.value, {
1438
+ catalogueEventSeriesIds: parsedCatalogueIds.value,
1439
+ ...value.detailAdmission === "own-page" ? { detailAdmission: "own-page" } : {},
1440
+ bookingScope: value.bookingScope,
1441
+ ...eventDestinationMode ? { eventDestinationMode } : {}
1442
+ }));
1443
+ }
1429
1444
  function toEventPageSurfaceSubjectWire(subject) {
1430
1445
  return subject;
1431
1446
  }
@@ -2398,7 +2413,7 @@ function resolveBookingDisplayContext(input) {
2398
2413
  locale: input.locale,
2399
2414
  timeZone: input.sessionTimeZone
2400
2415
  },
2401
- zone: input.surface === "email" && input.isOnline || input.sessionTimeZone !== input.siteTimeZone ? "always" : "omit"
2416
+ zone: input.surface !== "dashboard" && input.isOnline || input.sessionTimeZone !== input.siteTimeZone ? "always" : "omit"
2402
2417
  };
2403
2418
  }
2404
2419
  const SDK_STANDARD_TIME_FORMAT = {
@@ -2592,11 +2607,29 @@ function formatTimeAgo(value, now, context) {
2592
2607
  function formatTimeUntil(value, now, context) {
2593
2608
  return formatRelative(value, now, context, "future");
2594
2609
  }
2610
+ const DATE_STYLE_PARTS = {
2611
+ numeric: {
2612
+ day: "2-digit",
2613
+ month: "2-digit"
2614
+ },
2615
+ short: {
2616
+ day: "numeric",
2617
+ month: "short"
2618
+ },
2619
+ long: {
2620
+ day: "numeric",
2621
+ month: "long"
2622
+ },
2623
+ omit: {
2624
+ day: undefined,
2625
+ month: undefined
2626
+ }
2627
+ };
2595
2628
  function dateFormat(options) {
2596
- const style = options.date ?? "long";
2597
2629
  return {
2598
- day: style === "omit" || options.day === "omit" ? undefined : style === "numeric" ? "2-digit" : "numeric",
2599
- month: style === "omit" ? undefined : style === "numeric" ? "2-digit" : style,
2630
+ ...DATE_STYLE_PARTS[options.date ?? "long"],
2631
+ ...options.day ? { day: options.day === "omit" ? undefined : options.day } : {},
2632
+ ...options.month === "omit" ? { month: undefined } : {},
2600
2633
  ...options.year === "omit" ? {} : { year: "numeric" },
2601
2634
  ...options.weekday ? { weekday: options.weekday } : {}
2602
2635
  };
@@ -3314,6 +3347,7 @@ function valueStatus(sync) {
3314
3347
  if (sync.local.kind === "pristine") return "saved";
3315
3348
  switch (sync.local.request.kind) {
3316
3349
  case "idle":
3350
+ case "reserved":
3317
3351
  case "abandoned": return "unsaved";
3318
3352
  case "in-flight": return "saving";
3319
3353
  case "failed": return "failed";
@@ -4192,6 +4226,28 @@ function parseOpeningHoursDay(value, expectedWeekday, index) {
4192
4226
  intervals: [first, ...rest]
4193
4227
  });
4194
4228
  }
4229
+ function parseOpeningHoursWeek(rawDays) {
4230
+ const parsedDays = publicProfileWeekdays.map((weekday, index) => parseOpeningHoursDay(rawDays[index], weekday, index));
4231
+ const failed = parsedDays.find((day) => !day.ok);
4232
+ if (failed !== undefined) return failed;
4233
+ const [monday, tuesday, wednesday, thursday, friday, saturday, sunday] = parsedDays.flatMap((day) => day.ok ? [day.value] : []);
4234
+ if (monday === undefined || tuesday === undefined || wednesday === undefined || thursday === undefined || friday === undefined || saturday === undefined || sunday === undefined) {
4235
+ return err({
4236
+ code: "invalid_weekdays",
4237
+ path: "openingHours.days",
4238
+ message: "Opening hours are incomplete."
4239
+ });
4240
+ }
4241
+ return ok([
4242
+ monday,
4243
+ tuesday,
4244
+ wednesday,
4245
+ thursday,
4246
+ friday,
4247
+ saturday,
4248
+ sunday
4249
+ ]);
4250
+ }
4195
4251
  function parseWeeklyOpeningHours(value) {
4196
4252
  if (!isRecord$8(value) || !Array.isArray(value.days) || value.days.length !== publicProfileWeekdays.length) {
4197
4253
  return err({
@@ -4202,31 +4258,20 @@ function parseWeeklyOpeningHours(value) {
4202
4258
  }
4203
4259
  const timeZone = parsePublicProfileTimeZone(value.timeZone);
4204
4260
  if (!timeZone.ok) return timeZone;
4205
- const days = [];
4206
- for (const [index, weekday] of publicProfileWeekdays.entries()) {
4207
- const day = parseOpeningHoursDay(value.days[index], weekday, index);
4208
- if (!day.ok) return day;
4209
- days.push(day.value);
4210
- }
4211
- const [monday, tuesday, wednesday, thursday, friday, saturday, sunday] = days;
4212
- if (monday === undefined || tuesday === undefined || wednesday === undefined || thursday === undefined || friday === undefined || saturday === undefined || sunday === undefined) {
4261
+ const note = value.note === undefined || value.note === null ? null : trimmedOptionalString(value.note);
4262
+ if (note === undefined) {
4213
4263
  return err({
4214
- code: "invalid_weekdays",
4215
- path: "openingHours.days",
4216
- message: "Opening hours are incomplete."
4264
+ code: "invalid_shape",
4265
+ path: "openingHours.note",
4266
+ message: "The opening hours note must be text."
4217
4267
  });
4218
4268
  }
4269
+ const days = parseOpeningHoursWeek(value.days);
4270
+ if (!days.ok) return days;
4219
4271
  return ok({
4220
4272
  timeZone: timeZone.value,
4221
- days: [
4222
- monday,
4223
- tuesday,
4224
- wednesday,
4225
- thursday,
4226
- friday,
4227
- saturday,
4228
- sunday
4229
- ]
4273
+ ...note !== null ? { note } : {},
4274
+ days: days.value
4230
4275
  });
4231
4276
  }
4232
4277
  function parseSocialLinkId(value, path) {
@@ -4472,6 +4517,50 @@ function emptyPublicProfile() {
4472
4517
  };
4473
4518
  }
4474
4519
 
4520
+ //#endregion
4521
+ //#region ../core/src/opening-hours.ts
4522
+ const openingHoursWeekdayLabels = {
4523
+ monday: "Monday",
4524
+ tuesday: "Tuesday",
4525
+ wednesday: "Wednesday",
4526
+ thursday: "Thursday",
4527
+ friday: "Friday",
4528
+ saturday: "Saturday",
4529
+ sunday: "Sunday"
4530
+ };
4531
+ function formatOpeningHoursTime(value) {
4532
+ const time = parseLocalScheduleTime(value);
4533
+ return formatBookingCompactEnglishTime(toScheduledBookingDateTime({
4534
+ startsAt: new Date(Date.UTC(2e3, 0, 1, time.hour, time.minute)).toISOString(),
4535
+ timeZone: "UTC",
4536
+ locale: "en-GB"
4537
+ }));
4538
+ }
4539
+ function formatDayHours(day) {
4540
+ return day.kind === "closed" ? "Closed" : day.intervals.map((interval) => `${formatOpeningHoursTime(interval.opensAt)} to ${formatOpeningHoursTime(interval.closesAt)}`).join(", ");
4541
+ }
4542
+ function weekdayRangeLabel(weekdays) {
4543
+ const first = weekdays[0];
4544
+ const last = weekdays[weekdays.length - 1];
4545
+ if (!first || !last) return "";
4546
+ return first === last ? openingHoursWeekdayLabels[first] : `${openingHoursWeekdayLabels[first]} to ${openingHoursWeekdayLabels[last]}`;
4547
+ }
4548
+ /** Monday-first table rows; only adjacent days with identical ranges are grouped. */
4549
+ function formatOpeningHoursRows(hours) {
4550
+ return (hours?.days ?? []).reduce((rows, day) => {
4551
+ const text = formatDayHours(day);
4552
+ const previous = rows[rows.length - 1];
4553
+ const weekdays = previous?.kind === day.kind && previous.hours === text ? [...previous.weekdays, day.weekday] : [day.weekday];
4554
+ const row = {
4555
+ kind: day.kind,
4556
+ weekdays,
4557
+ label: weekdayRangeLabel(weekdays),
4558
+ hours: text
4559
+ };
4560
+ return weekdays.length > 1 ? [...rows.slice(0, -1), row] : [...rows, row];
4561
+ }, []);
4562
+ }
4563
+
4475
4564
  //#endregion
4476
4565
  //#region ../core/src/public-experience.ts
4477
4566
  const PUBLIC_EXPERIENCES = ["website", "hosted_booking"];
@@ -8282,4 +8371,104 @@ function mergeBag(stored, patch, options) {
8282
8371
  }
8283
8372
 
8284
8373
  //#endregion
8285
- export { formatLocalScheduleTime as $, parseEventSeriesId as $t, DEFAULT_MAILING_LIST_SUCCESS_MESSAGE as A, unsafeAsSiteScopedStoragePath as An, publicEventPricingDisplay as At, isPresent as B, parsePositiveCents as Bt, stableJsonStringify as C, unsafeAsPositiveByteCount as Cn, resolveFlexibleBalanceInitialPaymentCents as Ct, parseMailingListSignedSourceToken as D, unsafeAsSafeDownloadFilename as Dn, formatEventPricing as Dt, parseMailingListContentVersionId as E, unsafeAsProductId as En, formatBookingPriceDisplay as Et, DEFAULT_MAILING_LIST_TARGETING as F, unsafeAsUserId as Fn, fromArray as Ft, formatDateRange as G, formatCurrencyAmount as Gt, toLocationCoordinates as H, toNonNegativeCents as Ht, planMailingListChoicePresentation as I, err as In, mapNonEmptyArray as It, buildBookingUtcDateWindow as J, formatDurationUnitLabel as Jt, formatDateTimeRange as K, parseCurrencyCode as Kt, isCanonicalRichTextDoc as L, ok as Ln, mapReadonlyNonEmptyArray as Lt, parseFooterCompositionV1 as M, unsafeAsStorageBucketName as Mn, publicEventPricingType as Mt, footerNavigationLayouts as N, unsafeAsStoragePath as Nn, resolveExactOrFreePriceDisplay as Nt, parseMailingListRuntimeContext as O, unsafeAsSiteFontId as On, isPublicEventPricingOptionDisplayable as Ot, parseMailingListPlacementTargeting as P, unsafeAsUploadSessionId as Pn, resolvePricingOptionsPriceDisplay as Pt, formatLocalScheduleDate as Q, parseDatedOfferingCapacityHoldId as Qt, parsePublicContactDetails as R, isNonNegativeWholeCents as Rt, parseManagementKey as S, unsafeAsPassId as Sn, resolveFlexibleBalanceDueAt as St, parseMailingListBlockId as T, unsafeAsPricingOptionId as Tn, parseEventPageSurfaceSubject as Tt, selectCategoryView as U, unsafeAsNonNegativeCents as Ut, normalizeLocationAddressText as V, toCents as Vt, formatDate as W, unsafeAsPositiveCents as Wt, formatBookingDateParts as X, parseCustomerId as Xt, formatBookingDate as Y, parseApiKeyId as Yt, formatBookingTime as Z, parseDatedOfferingCapacityHoldAuditRef as Zt, orderedLiveRunSessions as _, unsafeAsEventSeriesId as _n, getBookingInstalmentDepositRefundability as _t, canonicalizeConfiguredBookingVerticalConfig as a, parseSiteTermsVersionId as an, resolveBookingBusinessTimeZone as at, createSecret as b, unsafeAsOccurrenceId as bn, omitZeroAmountFutureRows as bt, resolveSiteVerticalBookingConfig as c, unsafeAsBookingRequirementId as cn, toScheduledBookingDateTime as ct, ORDINARY_EVENT_PRESET_VALUES as d, unsafeAsDeclaredMimeType as dn, validateBookingPaymentOptionKinds as dt, parseMediaAssetId as en, getBookingLocalDateKey as et, SURFACE_EVENT_PRESET_VALUES as f, unsafeAsDemoCapability as fn, isLiveOrderInstalmentPlanStatus as ft, nextLiveRunSessionStartMs as g, unsafeAsEventOfferingId as gn, clampConfiguredAmount as gt, CANCELLED_SESSION_STATUS as h, unsafeAsEventInstanceId as hn, addIntervalPreservingMonthAnchor as ht, areConfiguredBookingVerticalConfigsEqual as i, parseSiteId as in, parseUtcIsoDateTimeString as it, parseMailingListProviderScope as j, unsafeAsStaffMemberId as jn, publicEventPricingOptions as jt, assessMailingListTargeting as k, unsafeAsSiteId as kn, publicEventPricingCurrency as kt, DEFAULT_EVENT_TYPE_PRESETS as l, unsafeAsBookingSessionId as ln, toUtcIsoDateTimeString as lt, publicReadFreshnessSeconds as m, unsafeAsEntitlementId as mn, isSettleableOrderInstalmentPlanStatus as mt, EVENT_PRESET_VOCABULARY as n, parsePageId as nn, getLocalScheduleTime as nt, parseVerticalId as o, parseUserId as on, toBookingTimeZone as ot, WHOLE_SERIES_EVENT_PRESET_VALUES as p, unsafeAsDetectedMimeType as pn, isSettleableFlexibleBalanceContractStatus as pt, inferSiteDateLocale as q, assertNever as qt, NAVIGATION_LOCATIONS as r, parseRetiredCourseId as rn, localScheduleTimePattern as rt, parseVerticalPresetId as s, unsafeAsAppointmentResourceId as sn, toScheduledBookingDateRange as st, resolveEventCatalogue as t, parseMembershipId as tn, getLocalScheduleDate as tt, EVENT_PRESET_VALUES as u, unsafeAsCheckoutLineId as un, parseBookingTimeZone as ut, resolveWholeSeriesBookingPhase as v, unsafeAsFileChecksumSha256 as vn, getBookingInstalmentPlanIntervalCount as vt, slugify as w, unsafeAsPositiveSeconds as wn, deriveTotalTicketQuantity as wt, exposeSecret as x, unsafeAsOriginalFilename as xn, splitAmountWithRemainderInFirst as xt, resolveWholeSeriesRunLifecycle as y, unsafeAsMediaAssetId as yn, getBookingInstalmentProtectedDepositAmountCents as yt, assertAllowedPublicUrl as z, parseNonNegativeCents as zt };
8374
+ //#region ../core/src/appointment-lifecycle.ts
8375
+ const APPOINTMENT_STATUS_VALUES = [
8376
+ "requested",
8377
+ "pending",
8378
+ "confirmed",
8379
+ "cancelled",
8380
+ "no_show"
8381
+ ];
8382
+ const APPOINTMENT_REQUEST_OUTCOME_VALUES = [
8383
+ "approved",
8384
+ "declined",
8385
+ "lapsed",
8386
+ "withdrawn"
8387
+ ];
8388
+ const APPOINTMENT_REQUEST_NOTICE_KIND_VALUES = [
8389
+ "received",
8390
+ "confirmed",
8391
+ "declined"
8392
+ ];
8393
+ function parseAppointmentStatus(value) {
8394
+ const status = APPOINTMENT_STATUS_VALUES.find((status$1) => status$1 === value);
8395
+ if (status === undefined) throw new Error("Unexpected appointment status");
8396
+ return status;
8397
+ }
8398
+ function parseAppointmentRequestOutcome(value) {
8399
+ if (value === null) return null;
8400
+ const outcome = APPOINTMENT_REQUEST_OUTCOME_VALUES.find((outcome$1) => outcome$1 === value);
8401
+ if (outcome === undefined) throw new Error("Unexpected appointment request outcome");
8402
+ return outcome;
8403
+ }
8404
+ function parseAppointmentRequestNoticeKind(value) {
8405
+ const kind = APPOINTMENT_REQUEST_NOTICE_KIND_VALUES.find((kind$1) => kind$1 === value);
8406
+ if (kind === undefined) throw new Error("Unexpected appointment request notice kind");
8407
+ return kind;
8408
+ }
8409
+ const APPOINTMENT_HISTORY_STATUS_VALUES = [
8410
+ "requested",
8411
+ "no_show",
8412
+ "scheduled",
8413
+ "pending",
8414
+ "confirmed",
8415
+ "cancelled"
8416
+ ];
8417
+ function parseAppointmentHistoryStatus(value) {
8418
+ const status = APPOINTMENT_HISTORY_STATUS_VALUES.find((status$1) => status$1 === value);
8419
+ if (status === undefined) throw new Error("Unexpected appointment history status");
8420
+ return status;
8421
+ }
8422
+ const appointmentStatusLabels = {
8423
+ requested: "Waiting for approval",
8424
+ pending: "Awaiting payment",
8425
+ confirmed: "Confirmed",
8426
+ cancelled: "Cancelled",
8427
+ no_show: "No show"
8428
+ };
8429
+ /** Current appointment wording shared by dashboard and customer surfaces. */
8430
+ function appointmentStatusLabel(status) {
8431
+ return appointmentStatusLabels[status];
8432
+ }
8433
+
8434
+ //#endregion
8435
+ //#region ../core/src/gift-expiry.ts
8436
+ /** Gifts expire at an exclusive boundary; vouchers include their end instant. */
8437
+ function formatGiftExpiryDate(expiresAt, context, kind = "gift_card") {
8438
+ const instant = toUtcIsoDateTimeString(expiresAt);
8439
+ const lastValidInstant = kind === "gift_card" ? toUtcIsoDateTimeString(new Date(Date.parse(instant) - 1).toISOString()) : instant;
8440
+ return formatDate({
8441
+ kind: "instant",
8442
+ value: lastValidInstant
8443
+ }, {
8444
+ timeZone: resolveBookingTimeZoneId(context.siteTimezone),
8445
+ locale: context.locale
8446
+ }, { date: "long" });
8447
+ }
8448
+
8449
+ //#endregion
8450
+ //#region ../core/src/site-visibility.ts
8451
+ function isSitePubliclyAvailable(billingPausedAt) {
8452
+ return billingPausedAt == null || billingPausedAt.length === 0;
8453
+ }
8454
+ function isSiteLaunched(launchedAt) {
8455
+ return typeof launchedAt === "string" && launchedAt.length > 0;
8456
+ }
8457
+ function resolvePublicSiteVisibility(input) {
8458
+ if (input.isPreviewAttempt) {
8459
+ return "live";
8460
+ }
8461
+ if (!isSiteLaunched(input.launchedAt) && input.allowUnlaunchedDevAccess !== true) {
8462
+ return "prelaunch";
8463
+ }
8464
+ if (input.publiclyAvailable === false) {
8465
+ return "maintenance";
8466
+ }
8467
+ if (input.maintenanceModeEnabled) {
8468
+ return "maintenance";
8469
+ }
8470
+ return "live";
8471
+ }
8472
+
8473
+ //#endregion
8474
+ export { resolveBookingDisplayContext as $, formatDurationUnitLabel as $t, DEFAULT_MAILING_LIST_SUCCESS_MESSAGE as A, unsafeAsPricingOptionId as An, parseEventPageSurfaceSubject as At, parseWeeklyOpeningHours as B, unsafeAsUserId as Bn, fromArray as Bt, stableJsonStringify as C, unsafeAsFileChecksumSha256 as Cn, getBookingInstalmentPlanIntervalCount as Ct, parseMailingListSignedSourceToken as D, unsafeAsPassId as Dn, resolveFlexibleBalanceDueAt as Dt, parseMailingListContentVersionId as E, unsafeAsOriginalFilename as En, splitAmountWithRemainderInFirst as Et, DEFAULT_MAILING_LIST_TARGETING as F, unsafeAsSiteScopedStoragePath as Fn, publicEventPricingDisplay as Ft, selectCategoryView as G, parsePositiveCents as Gt, isPresent as H, ok as Hn, mapReadonlyNonEmptyArray as Ht, planMailingListChoicePresentation as I, unsafeAsStaffMemberId as In, publicEventPricingOptions as It, formatDateTime as J, unsafeAsNonNegativeCents as Jt, formatDate as K, toCents as Kt, isCanonicalRichTextDoc as L, unsafeAsStorageBucketName as Ln, publicEventPricingType as Lt, parseFooterCompositionV1 as M, unsafeAsSafeDownloadFilename as Mn, formatEventPricing as Mt, footerNavigationLayouts as N, unsafeAsSiteFontId as Nn, isPublicEventPricingOptionDisplayable as Nt, parseMailingListRuntimeContext as O, unsafeAsPositiveByteCount as On, resolveFlexibleBalanceInitialPaymentCents as Ot, parseMailingListPlacementTargeting as P, unsafeAsSiteId as Pn, publicEventPricingCurrency as Pt, inferSiteDateLocale as Q, assertNever as Qt, formatOpeningHoursRows as R, unsafeAsStoragePath as Rn, resolveExactOrFreePriceDisplay as Rt, parseManagementKey as S, unsafeAsEventSeriesId as Sn, getBookingInstalmentDepositRefundability as St, parseMailingListBlockId as T, unsafeAsOccurrenceId as Tn, omitZeroAmountFutureRows as Tt, normalizeLocationAddressText as U, isNonNegativeWholeCents as Ut, assertAllowedPublicUrl as V, err as Vn, mapNonEmptyArray as Vt, toLocationCoordinates as W, parseNonNegativeCents as Wt, formatTime as X, formatCurrencyAmount as Xt, formatDateTimeRange as Y, unsafeAsPositiveCents as Yt, formatTimeRange as Z, parseCurrencyCode as Zt, orderedLiveRunSessions as _, unsafeAsDemoCapability as _n, isLiveOrderInstalmentPlanStatus as _t, canonicalizeConfiguredBookingVerticalConfig as a, parseMediaAssetId as an, getLocalScheduleDate as at, createSecret as b, unsafeAsEventInstanceId as bn, addIntervalPreservingMonthAnchor as bt, resolveSiteVerticalBookingConfig as c, parseRetiredCourseId as cn, parseBookingLocalDate as ct, ORDINARY_EVENT_PRESET_VALUES as d, parseUserId as dn, resolveBookingTimeZoneId as dt, parseApiKeyId as en, buildBookingUtcDateWindow as et, SURFACE_EVENT_PRESET_VALUES as f, unsafeAsAppointmentResourceId as fn, toBookingTimeZone as ft, nextLiveRunSessionStartMs as g, unsafeAsDeclaredMimeType as gn, validateBookingPaymentOptionKinds as gt, CANCELLED_SESSION_STATUS as h, unsafeAsCheckoutLineId as hn, parseBookingTimeZone as ht, areConfiguredBookingVerticalConfigsEqual as i, parseEventSeriesId as in, getBookingLocalDateKey as it, parseMailingListProviderScope as j, unsafeAsProductId as jn, formatBookingPriceDisplay as jt, assessMailingListTargeting as k, unsafeAsPositiveSeconds as kn, deriveTotalTicketQuantity as kt, DEFAULT_EVENT_TYPE_PRESETS as l, parseSiteId as ln, parseUtcIsoDateTimeString as lt, publicReadFreshnessSeconds as m, unsafeAsBookingSessionId as mn, toUtcIsoDateTimeString as mt, EVENT_PRESET_VOCABULARY as n, parseDatedOfferingCapacityHoldAuditRef as nn, formatLocalScheduleDate as nt, parseVerticalId as o, parseMembershipId as on, getLocalScheduleTime as ot, WHOLE_SERIES_EVENT_PRESET_VALUES as p, unsafeAsBookingRequirementId as pn, toScheduledBookingDateTime as pt, formatDateRange as q, toNonNegativeCents as qt, NAVIGATION_LOCATIONS as r, parseDatedOfferingCapacityHoldId as rn, formatLocalScheduleTime as rt, parseVerticalPresetId as s, parsePageId as sn, localScheduleTimePattern as st, resolveEventCatalogue as t, parseCustomerId as tn, compareLocalScheduleDates as tt, EVENT_PRESET_VALUES as u, parseSiteTermsVersionId as un, resolveBookingBusinessTimeZone as ut, resolveWholeSeriesBookingPhase as v, unsafeAsDetectedMimeType as vn, isSettleableFlexibleBalanceContractStatus as vt, slugify as w, unsafeAsMediaAssetId as wn, getBookingInstalmentProtectedDepositAmountCents as wt, exposeSecret as x, unsafeAsEventOfferingId as xn, clampConfiguredAmount as xt, resolveWholeSeriesRunLifecycle as y, unsafeAsEntitlementId as yn, isSettleableOrderInstalmentPlanStatus as yt, parsePublicContactDetails as z, unsafeAsUploadSessionId as zn, resolvePricingOptionsPriceDisplay as zt };
package/dist/testing.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import "./sdk-event-upsert-CrOuJrxo.mjs";
3
- import "./src-BENi4Q5k.mjs";
4
- import { An as createOutput, H as syncLocalMediaForPush, Ht as preparePushConfigTarget, L as calculateEntryDiffs, U as syncLocalMediaForPull, o as executeEntryCommandPlanAsSyncResult, pt as writeMediaManifest, rt as readEntries, t as compileEntryPushCommands, zt as applyPushConfigPlan } from "./entryCommands-DSQZqznu.mjs";
5
- import "./load-config-B68gtN45.mjs";
2
+ import "./sdk-event-upsert-B3gflo1K.mjs";
3
+ import "./src-RfhyMOpX.mjs";
4
+ import { Bt as preparePushConfigTarget, G as syncLocalMediaForPull, Lt as applyPushConfigPlan, Mn as createOutput, W as syncLocalMediaForPush, at as readEntries, ht as writeMediaManifest, o as executeEntryCommandPlanAsSyncResult, t as compileEntryPushCommands, z as calculateEntryDiffs } from "./entryCommands-Bu-z9kxb.mjs";
5
+ import "./load-config-pAPKpeE0.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.21.0",
3
+ "version": "0.22.1",
4
4
  "description": "Riverbank CMS command-line tools for SDK site developers",
5
5
  "bin": {
6
6
  "riverbankcms": "dist/cli/index.mjs"
@@ -43,7 +43,7 @@
43
43
  "zod": "^4.3.6"
44
44
  },
45
45
  "peerDependencies": {
46
- "@riverbankcms/sdk": ">=0.156.0 <1.0.0"
46
+ "@riverbankcms/sdk": ">=0.157.0 <1.0.0"
47
47
  },
48
48
  "optionalDependencies": {
49
49
  "@napi-rs/keyring": "1.3.0"
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env node
2
- import { t as loadConfigFile } from "./load-config-B68gtN45.mjs";
3
-
4
- export { loadConfigFile };