riverbankcms 0.37.0 → 0.38.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.
@@ -163,6 +163,7 @@ const unsafeAsDatedOfferingWaitlistCapacityEffectId = (value) => value;
163
163
  const unsafeAsDatedOfferingWaitlistCapacityEffectClaimToken = (value) => value;
164
164
  const unsafeAsWaitlistEntryId = (id) => id;
165
165
  const unsafeAsWaitlistHoldId = (id) => id;
166
+ const parseWaitlistEntryId = (value) => parseUuidBrand(value, unsafeAsWaitlistEntryId);
166
167
  const parseDatedOfferingCapacityHoldId = (value) => parseUuidBrand(value, unsafeAsDatedOfferingCapacityHoldId);
167
168
  const parseDatedOfferingCapacityHoldAuditRef = (value) => parseUuidBrand(value, unsafeAsDatedOfferingCapacityHoldAuditRef);
168
169
  const parseDatedOfferingRevocationAuditEventId = (value) => parseUuidBrand(value, unsafeAsDatedOfferingRevocationAuditEventId);
@@ -176,6 +177,7 @@ const unsafeAsPassId = (id) => id;
176
177
  const unsafeAsMembershipId = (id) => id;
177
178
  const unsafeAsCustomerPassId = (id) => id;
178
179
  const unsafeAsCustomerMembershipId = (id) => id;
180
+ const parseEntitlementId = (value) => parseUuidBrand(value, unsafeAsEntitlementId);
179
181
  const parsePassId = (value) => parseUuidBrand(value, unsafeAsPassId);
180
182
  const parseMembershipId = (value) => parseUuidBrand(value, unsafeAsMembershipId);
181
183
  const parseCustomerPassId = (value) => parseUuidBrand(value, unsafeAsCustomerPassId);
@@ -669,11 +671,11 @@ const CURRENCY_LOCALE_BY_CODE = {
669
671
  function resolveCurrencyLocale(currencyCode, override) {
670
672
  return override ?? CURRENCY_LOCALE_BY_CODE[currencyCode] ?? "en";
671
673
  }
672
- function fractionDigitsFor(decimals, exactFormatter, amount) {
674
+ function fractionDigitsFor(decimals, exactFormatter, amount$1) {
673
675
  switch (decimals) {
674
676
  case "exact": return {};
675
677
  case "auto": {
676
- const fraction = exactFormatter.formatToParts(amount).find((part) => part.type === "fraction")?.value;
678
+ const fraction = exactFormatter.formatToParts(amount$1).find((part) => part.type === "fraction")?.value;
677
679
  const zeroFraction = exactFormatter.formatToParts(0).find((part) => part.type === "fraction")?.value;
678
680
  return fraction === zeroFraction ? {
679
681
  minimumFractionDigits: 0,
@@ -702,7 +704,7 @@ function formatCurrencyAmount(amountCents, currency, options) {
702
704
  * `formatCurrencyAmount` for an amount already in MAJOR units (29.99 = £29.99),
703
705
  * such as a registrar price. Prefer minor units everywhere else.
704
706
  */
705
- function formatCurrencyMajorUnits(amount, currency, options) {
707
+ function formatCurrencyMajorUnits(amount$1, currency, options) {
706
708
  const currencyCode = currency.toUpperCase();
707
709
  const locale = resolveCurrencyLocale(currencyCode, options?.locale);
708
710
  try {
@@ -713,10 +715,10 @@ function formatCurrencyMajorUnits(amount, currency, options) {
713
715
  return new Intl.NumberFormat(locale, {
714
716
  style: "currency",
715
717
  currency: currencyCode,
716
- ...fractionDigitsFor(options?.decimals ?? "exact", exactFormatter, amount)
717
- }).format(amount);
718
+ ...fractionDigitsFor(options?.decimals ?? "exact", exactFormatter, amount$1)
719
+ }).format(amount$1);
718
720
  } catch {
719
- return `${amount.toFixed(2)} ${currencyCode}`;
721
+ return `${amount$1.toFixed(2)} ${currencyCode}`;
720
722
  }
721
723
  }
722
724
  /** Gift-card copy retains pence only when the amount has a fractional part. */
@@ -801,14 +803,14 @@ function parseFiniteMoneyAmount(value, options) {
801
803
  if (normalized.length === 0) {
802
804
  return err({ kind: "empty" });
803
805
  }
804
- const amount = Number(normalized);
805
- if (!Number.isFinite(amount)) {
806
+ const amount$1 = Number(normalized);
807
+ if (!Number.isFinite(amount$1)) {
806
808
  return err({ kind: "invalid-number" });
807
809
  }
808
- return ok(amount);
810
+ return ok(amount$1);
809
811
  }
810
- function roundMoneyAmountToCents(amount) {
811
- return Math.round(amount * 100);
812
+ function roundMoneyAmountToCents(amount$1) {
813
+ return Math.round(amount$1 * 100);
812
814
  }
813
815
  function parsePositiveMoneyInputToCents(value, options = {}) {
814
816
  const parsed = parseFiniteMoneyAmount(value, options);
@@ -1014,7 +1016,7 @@ function parseFreePricing(input, currency) {
1014
1016
  });
1015
1017
  }
1016
1018
  function parseSinglePricing(input, currency) {
1017
- const amount = typeof input.singlePriceAmount === "number" ? parsePositiveCents(input.singlePriceAmount) : err({ kind: "invalid-number" });
1019
+ const amount$1 = typeof input.singlePriceAmount === "number" ? parsePositiveCents(input.singlePriceAmount) : err({ kind: "invalid-number" });
1018
1020
  const issues = [
1019
1021
  ...unexpectedValues(input, [
1020
1022
  "slidingMinAmount",
@@ -1022,23 +1024,23 @@ function parseSinglePricing(input, currency) {
1022
1024
  "slidingSuggestedAmount"
1023
1025
  ]),
1024
1026
  ...invalidOptionsIssue(input.options),
1025
- ...amount.ok ? [] : [{
1027
+ ...amount$1.ok ? [] : [{
1026
1028
  kind: "invalid_amount",
1027
1029
  field: "singlePriceAmount",
1028
- error: amount.error
1030
+ error: amount$1.error
1029
1031
  }]
1030
1032
  ];
1031
1033
  const nonEmptyIssues = fromReadonlyArray(issues);
1032
1034
  if (nonEmptyIssues.ok) return err(nonEmptyIssues.value);
1033
- if (!amount.ok) return err(oneIssue({
1035
+ if (!amount$1.ok) return err(oneIssue({
1034
1036
  kind: "invalid_amount",
1035
1037
  field: "singlePriceAmount",
1036
- error: amount.error
1038
+ error: amount$1.error
1037
1039
  }));
1038
1040
  return ok({
1039
1041
  kind: "single",
1040
1042
  currency,
1041
- amount: amount.value
1043
+ amount: amount$1.value
1042
1044
  });
1043
1045
  }
1044
1046
  function parseRawPricingOption(raw, index) {
@@ -1308,8 +1310,8 @@ function resolvePricingOptionSaleWindowState(option, now) {
1308
1310
  }
1309
1311
  return "open";
1310
1312
  }
1311
- function resolveExactOrFreePriceDisplay(amount, currency) {
1312
- const resolvedAmount = amount ?? 0;
1313
+ function resolveExactOrFreePriceDisplay(amount$1, currency) {
1314
+ const resolvedAmount = amount$1 ?? 0;
1313
1315
  return resolvedAmount > 0 ? {
1314
1316
  kind: "exact",
1315
1317
  amount: resolvedAmount,
@@ -1344,7 +1346,7 @@ function amountRangeDisplay(amounts, currency) {
1344
1346
  };
1345
1347
  }
1346
1348
  if (minAmount === 0) {
1347
- const paidAmounts = amounts.filter((amount) => amount > 0);
1349
+ const paidAmounts = amounts.filter((amount$1) => amount$1 > 0);
1348
1350
  return {
1349
1351
  kind: "mixed",
1350
1352
  paidFromAmount: Math.min(...paidAmounts),
@@ -2683,6 +2685,26 @@ function addRefundDestinationAmounts(a, b) {
2683
2685
  creditCents: a.creditCents + b.creditCents
2684
2686
  };
2685
2687
  }
2688
+ /** Each destination's remaining amount across funding lines. */
2689
+ function fundingDestinationAmounts(funding) {
2690
+ return funding.reduce((sum, line$1) => addRefundDestinationAmounts(sum, refundDestinationAmounts(line$1.destination, Math.max(0, line$1.remainingCents))), refundDestinationAmounts("card", 0));
2691
+ }
2692
+ function decideRefundDestination(facts) {
2693
+ if (facts.refundRail === "credit") return "credit";
2694
+ const hasLast4 = facts.last4 !== null && facts.last4.trim() !== "";
2695
+ if (facts.viaProvider === true || hasLast4 || facts.paidRail === "provider") return "card";
2696
+ if (facts.viaProvider === null && facts.paidRail === null) return "as_paid";
2697
+ return "direct";
2698
+ }
2699
+ /** The one reading of destination amounts as what a customer is told. */
2700
+ function refundDestinationKind(amounts) {
2701
+ const toPayment = amounts.cardCents + amounts.directCents > 0;
2702
+ if (amounts.creditCents > 0) return toPayment ? "card_and_site_credit" : "site_credit";
2703
+ return "card";
2704
+ }
2705
+ function refundRecipient(bookingCustomerId, payingCustomerId) {
2706
+ return bookingCustomerId === payingCustomerId ? "you" : "original_buyer";
2707
+ }
2686
2708
  function hasDirectRefundFunding(funding) {
2687
2709
  return funding?.some((line$1) => line$1.destination === "direct" && line$1.remainingCents > 0) ?? false;
2688
2710
  }
@@ -2746,12 +2768,17 @@ const businessCancellationRefusalCopy = {
2746
2768
  //#region ../core/src/cancellation-kept-copy.ts
2747
2769
  /**
2748
2770
  * What the client paid and won't get back, from what the cancellation plan
2749
- * promised and whether a refund went through. A refund it promised that didn't
2750
- * happen can only be sorted out by the business. Credit it promised and didn't
2751
- * put back was already refunded another way, so there's nothing to say about it.
2771
+ * promised and whether a refund went through. A refund that went through
2772
+ * keeps only the part the plan said wasn't refundable. A refund it promised
2773
+ * that didn't happen can only be sorted out by the business. Credit it
2774
+ * promised and didn't put back was already refunded another way, so there's
2775
+ * nothing to say about it.
2752
2776
  */
2753
2777
  function moneyKeptByCancellation(outcome, refunded) {
2754
- if (refunded) return null;
2778
+ if (refunded) return outcome.kind === "refund" && outcome.keptDeposit !== undefined ? {
2779
+ kind: "kept_part",
2780
+ money: outcome.keptDeposit
2781
+ } : null;
2755
2782
  switch (outcome.kind) {
2756
2783
  case "keep_money":
2757
2784
  case "keep_credit":
@@ -2775,18 +2802,172 @@ function keepReasonClause(reason, context) {
2775
2802
  return business !== null ? `${business} doesn't refund cancelled ${context.booking}s` : `cancelled ${context.booking}s aren't refunded`;
2776
2803
  }
2777
2804
  case "non_refundable_deposit": return "the deposit isn't refundable";
2805
+ case "already_started": return "it's already started";
2778
2806
  }
2779
2807
  }
2780
- function credits(count, context) {
2781
- const noun = context.booking === "appointment" ? "package credit" : "pass credit";
2782
- return count === 1 ? noun : `${count} ${noun}s`;
2808
+ function passCredits(count) {
2809
+ return count === 1 ? "pass credit" : `${count} pass credits`;
2810
+ }
2811
+ /** "This session" or "These 2 sessions": a package's sessions are what the client sees counted down. */
2812
+ function packageSessions(count) {
2813
+ return count === 1 ? "This session" : `These ${count} sessions`;
2814
+ }
2815
+ /** Credit kept by a cancellation: an appointment talks about the package's session, anything else the pass credit. */
2816
+ function keptCreditSentence(count, because, context) {
2817
+ if (context.booking === "appointment") return `${packageSessions(count)} won't be returned to your package, ${because}.`;
2818
+ return context.recipient === "you" ? `You won't get your ${passCredits(count)} back, ${because}.` : `The ${passCredits(count)} used for this booking won't go back, ${because}.`;
2783
2819
  }
2784
- /** "You won't get your £10.00 back, because it's less than 2 days until it starts." */
2820
+ /** Credit a cancellation would put back, with its cut-off when there is one. */
2821
+ function creditBackSentence(count, until, context) {
2822
+ if (context.booking === "appointment") {
2823
+ return `${packageSessions(count)} ${count === 1 ? "goes" : "go"} back to your package${until}.`;
2824
+ }
2825
+ return `You'll get your ${passCredits(count)} back${until}.`;
2826
+ }
2827
+ /** "You won't get your £10 back, because it's less than 2 days until it starts." */
2785
2828
  function cancellationKeptSentence(kept, context) {
2829
+ const because = (reason) => `because ${keepReasonClause(reason, context)}`;
2830
+ const business = named(context.businessName) ?? "the business";
2786
2831
  switch (kept.kind) {
2787
- case "keep_money": return `You won't get your ${formatCurrencyAmount(kept.money.amountCents, kept.money.currency)} back, because ${keepReasonClause(kept.reason, context)}.`;
2788
- case "keep_credit": return `You won't get your ${credits(kept.credits, context)} back, because ${keepReasonClause(kept.reason, context)}.`;
2789
- case "contact_business": return `Your ${formatCurrencyAmount(kept.money.amountCents, kept.money.currency)} can't be refunded online, so please contact ${named(context.businessName) ?? "the business"} about it.`;
2832
+ case "keep_money": return context.recipient === "you" ? `You won't get your ${amount(kept.money)} back, ${because(kept.reason)}.` : `The ${amount(kept.money)} paid for this booking won't be refunded, ${because(kept.reason)}.`;
2833
+ case "keep_credit": return keptCreditSentence(kept.credits, because(kept.reason), context);
2834
+ case "contact_business": return context.recipient === "you" ? `Your ${amount(kept.money)} can't be refunded online, so please contact ${business} about it.` : `The ${amount(kept.money)} paid for this booking can't be refunded online, so please contact ${business} about it.`;
2835
+ case "kept_part": return keptPartSentence(kept.money, context);
2836
+ }
2837
+ }
2838
+ /** How long a card refund takes to show, said the same way before and after. */
2839
+ const CARD_REFUND_TIME = "Banks usually take 5 to 10 working days to show it.";
2840
+ const CARD_PART_REFUND_TIME = "Banks usually take 5 to 10 working days to show the card part.";
2841
+ const ORIGINAL_BUYER = "the person who paid for this booking";
2842
+ /** Money in a sentence: whole pounds drop the pence ("£320", "£12.50"), as the portal's other money lines do. */
2843
+ function amount(money) {
2844
+ return formatCurrencyAmount(money.amountCents, money.currency, { decimals: "auto" });
2845
+ }
2846
+ /**
2847
+ * The part of a refund the business keeps, said wherever someone confirms
2848
+ * one. It never calls that part "the deposit": the customer's first payment
2849
+ * is often called a deposit too, and the two needn't be the same amount.
2850
+ * Null when a refund keeps nothing.
2851
+ */
2852
+ function cancellationKeptDepositSentence(outcome, context) {
2853
+ if (outcome.kind !== "refund" || outcome.keptDeposit === undefined) return null;
2854
+ return keptPartSentence(outcome.keptDeposit, context);
2855
+ }
2856
+ /** "Hollow Oak keeps £100 of what you've paid, as that part isn't refundable.", before they cancel and after. */
2857
+ function keptPartSentence(money, context) {
2858
+ const business = named(context.businessName) ?? "The business";
2859
+ const paid = context.recipient === "you" ? "what you've paid" : "what was paid";
2860
+ return `${business} keeps ${amount(money)} of ${paid}, as that part isn't refundable.`;
2861
+ }
2862
+ /** The cut-off as a moment this reader can read, or null when there's none or it can't be said. */
2863
+ function untilMoment(until, context) {
2864
+ return until === undefined ? null : context.moment?.(until) ?? null;
2865
+ }
2866
+ /** " if you cancel before 6pm on Tuesday 18 November", or nothing when there's no cut-off to say. */
2867
+ function untilClause(until, context) {
2868
+ const moment = untilMoment(until, context);
2869
+ return moment === null ? "" : ` if you cancel before ${moment}`;
2870
+ }
2871
+ /**
2872
+ * Where a refund goes and how long it takes to show, for someone who has
2873
+ * just been told a refund is coming (to them, or to whoever paid).
2874
+ */
2875
+ function refundDestinationSentence(to, recipient) {
2876
+ const card = recipient === "you" ? "the card you paid with" : "the card they paid with";
2877
+ const account = recipient === "you" ? "your account" : "their account";
2878
+ switch (to) {
2879
+ case "card": return `It goes back to ${card}. ${CARD_REFUND_TIME}`;
2880
+ case "site_credit": return `It goes back as credit on ${account}.`;
2881
+ case "card_and_site_credit": return `Part goes back to ${card} and part as credit on ${account}. ${CARD_PART_REFUND_TIME}`;
2882
+ }
2883
+ }
2884
+ /**
2885
+ * A refund preview in two parts, for a page that shows the figure on its own:
2886
+ * `reason` says why money comes back (without the refund's figure or where it
2887
+ * goes, and with the part the business keeps, if any), `destination` where it
2888
+ * goes and how long it takes. The one-sentence preview is built from the same destination.
2889
+ */
2890
+ function cancellationRefundParts(outcome, context) {
2891
+ const moment = untilMoment(outcome.until, context);
2892
+ const gets = context.recipient === "you" ? "you'll get a refund" : `${ORIGINAL_BUYER} will get a refund`;
2893
+ const why = moment !== null ? `You're cancelling before ${moment}, so ${gets}.` : context.recipient === "you" ? "You'll get a refund if you cancel." : `If you cancel, ${gets}.`;
2894
+ const reason = [why, cancellationKeptDepositSentence(outcome, context)].filter((part) => part !== null).join(" ");
2895
+ return {
2896
+ reason,
2897
+ destination: refundDestinationSentence(outcome.to, context.recipient)
2898
+ };
2899
+ }
2900
+ function refundPreviewSentence(outcome, context) {
2901
+ const deposit = cancellationKeptDepositSentence(outcome, context);
2902
+ const until = untilClause(outcome.until, context);
2903
+ const lead = context.recipient === "you" ? `You'll get ${amount(outcome.money)} back${until}.` : `${capitalise(ORIGINAL_BUYER)} will get ${amount(outcome.money)} back${until}.`;
2904
+ return [
2905
+ lead,
2906
+ refundDestinationSentence(outcome.to, context.recipient),
2907
+ deposit
2908
+ ].filter((part) => part !== null).join(" ");
2909
+ }
2910
+ function capitalise(text) {
2911
+ return text.charAt(0).toUpperCase() + text.slice(1);
2912
+ }
2913
+ /**
2914
+ * What cancelling would do with the client's money, said before they confirm:
2915
+ * the refund and where it goes (and until when, given a way to say the
2916
+ * moment), credit put back, or what they won't get back. Null when nothing
2917
+ * was paid.
2918
+ */
2919
+ function cancellationMoneySentence(outcome, context) {
2920
+ switch (outcome.kind) {
2921
+ case "nothing_to_return": return null;
2922
+ case "refund": return refundPreviewSentence(outcome, context);
2923
+ case "credit_back": return creditBackSentence(outcome.credits, untilClause(outcome.until, context), context);
2924
+ case "keep_money":
2925
+ case "keep_credit":
2926
+ case "contact_business": return cancellationKeptSentence(outcome, context);
2927
+ }
2928
+ }
2929
+ function originalBuyerRefundSentence(money) {
2930
+ const paid = money.amount === null ? "the payment" : amount(money.amount);
2931
+ switch (money.to) {
2932
+ case "card": return `We've refunded ${paid} to ${ORIGINAL_BUYER}, on the card they paid with. ${CARD_REFUND_TIME}`;
2933
+ case "site_credit": return `We've put ${paid} back as credit on the account of ${ORIGINAL_BUYER}.`;
2934
+ case "card_and_site_credit": return `We've refunded ${paid} to ${ORIGINAL_BUYER}, partly on the card they paid with and partly as credit on their account. ${CARD_PART_REFUND_TIME}`;
2935
+ case "direct": return `${capitalise(paid)} has been given back directly to ${ORIGINAL_BUYER}.`;
2936
+ case "as_paid": return `We've refunded ${paid} to ${ORIGINAL_BUYER}, the way they paid.`;
2937
+ case "as_paid_and_site_credit": return `We've refunded ${paid} to ${ORIGINAL_BUYER}, partly the way they paid and partly as credit on their account.`;
2938
+ }
2939
+ }
2940
+ function ownRefundSentence(money, cardEnding) {
2941
+ const paid = money.amount === null ? "your payment" : amount(money.amount);
2942
+ const ending = cardEnding !== null && cardEnding.trim() !== "" ? cardEnding : null;
2943
+ const card = ending === null ? "the card you paid with" : `your card ending ${ending}`;
2944
+ switch (money.to) {
2945
+ case "card": return `We've refunded ${paid} to ${card}. ${CARD_REFUND_TIME}`;
2946
+ case "site_credit": return `We've put ${paid} back as credit on your account.`;
2947
+ case "card_and_site_credit": return `We've refunded ${paid}, partly to ${card} and partly as credit on your account. ${CARD_PART_REFUND_TIME}`;
2948
+ case "direct": return `${capitalise(paid)} has been given back to you directly.`;
2949
+ case "as_paid": return `We've refunded ${paid} the way you paid.`;
2950
+ case "as_paid_and_site_credit": return `We've refunded ${paid}, partly the way you paid and partly as credit on your account.`;
2951
+ }
2952
+ }
2953
+ /**
2954
+ * Money that has gone back, said to the reader: their own refund (naming
2955
+ * their card's ending when given one) or one that went to whoever paid for a
2956
+ * booking given to them, whose card is never named.
2957
+ */
2958
+ function refundedMoneySentence(money, cardEnding) {
2959
+ return money.recipient === "original_buyer" ? originalBuyerRefundSentence(money) : ownRefundSentence(money, cardEnding);
2960
+ }
2961
+ /** A refund that went through but is still being settled, so where it lands isn't said yet. */
2962
+ function refundProcessingSentence(money, recipient) {
2963
+ return recipient === "you" ? `We're processing your refund of ${amount(money)}.` : `We're processing a refund of ${amount(money)} to ${ORIGINAL_BUYER}.`;
2964
+ }
2965
+ function cancelledMoneySentence(money, context) {
2966
+ switch (money.kind) {
2967
+ case "refunded": return refundedMoneySentence(money, context.cardEnding);
2968
+ case "credit_restored": return context.booking === "appointment" ? "We've returned the session to your package." : "We've put your pass credit back.";
2969
+ case "refund_failed": return `The refund didn't go through, so please contact ${named(context.businessName) ?? "the business"} about it.`;
2970
+ case "none": return null;
2790
2971
  }
2791
2972
  }
2792
2973
 
@@ -9387,7 +9568,7 @@ const NAVIGATION_LOCATION_DESCRIPTORS = {
9387
9568
  legal: {
9388
9569
  location: "legal",
9389
9570
  label: "Legal links",
9390
- description: "Smaller links at the bottom of your footer, for privacy, terms and other policies."
9571
+ description: "Smaller links at the bottom of your footer, for terms and other policies. Your published privacy policy and booking terms are linked there automatically."
9391
9572
  }
9392
9573
  };
9393
9574
  function isNavigationLocation(value) {
@@ -10723,6 +10904,24 @@ function usesPersistedRiverbankTheme(mode) {
10723
10904
  return mode !== "headless_full";
10724
10905
  }
10725
10906
 
10907
+ //#endregion
10908
+ //#region ../core/src/booking-context-ref.ts
10909
+ function doesBookingContextRefMatch(left, right) {
10910
+ switch (left.tag) {
10911
+ case "appointment": return right.tag === "appointment" && right.appointmentId === left.appointmentId;
10912
+ case "event_attendee": return right.tag === "event_attendee" && right.attendeeId === left.attendeeId;
10913
+ case "event_series_registration": return right.tag === "event_series_registration" && right.registrationId === left.registrationId;
10914
+ }
10915
+ }
10916
+ /** The raw id a booking's reference carries. Callers never choose among nullable columns. */
10917
+ function bookingContextId(ref) {
10918
+ switch (ref.tag) {
10919
+ case "appointment": return ref.appointmentId;
10920
+ case "event_attendee": return ref.attendeeId;
10921
+ case "event_series_registration": return ref.registrationId;
10922
+ }
10923
+ }
10924
+
10726
10925
  //#endregion
10727
10926
  //#region ../core/src/email-vocabulary.ts
10728
10927
  /** Shared email identities. No renderer, dashboard or private email-package dependency. */
@@ -11260,8 +11459,8 @@ function managedBalanceText(summary, context) {
11260
11459
  return summary.amountPaidCents > 0 ? `${formatCurrencyAmount(summary.amountPaidCents, summary.currency)} paid, ${due}` : due;
11261
11460
  }
11262
11461
  /** Zero and unavailable counts do not describe credits consumed. */
11263
- function hasUsedPassCredits(credits$1) {
11264
- return credits$1 !== undefined && credits$1 !== 0 && !Number.isNaN(credits$1);
11462
+ function hasUsedPassCredits(credits) {
11463
+ return credits !== undefined && credits !== 0 && !Number.isNaN(credits);
11265
11464
  }
11266
11465
  /** Older stored emails have no balance; zero is a known balance, not missing data. */
11267
11466
  function remainingPassCredits(summary) {
@@ -11661,4 +11860,4 @@ function isEventOccurrenceRouteSegment(segment) {
11661
11860
  }
11662
11861
 
11663
11862
  //#endregion
11664
- export { parseFooterCompositionV1 as $, unsafeAsPassId as $n, inferSiteDateLocale as $t, publicReadBatchFreshnessSeconds as A, fromArray as An, parseRetiredCourseId as Ar, addIntervalPreservingMonthAnchor as At, exposeSecret as B, formatCurrencyAmount as Bn, resolveFlexibleBalanceInitialPaymentCents as Bt, ORDINARY_EVENT_PRESET_VALUES as C, publicEventPricingCurrency as Cn, unsafeAsSiteFontId as Cr, trimmedStringOrNull as Ct, PUBLIC_CONTENT_FRESHNESS_SECONDS as D, publicEventPricingType as Dn, unsafeAsSiteId as Dr, BOOKING_COURSE_INSTALMENT_DEADLINES as Dt, PUBLIC_AVAILABILITY_FRESHNESS_SECONDS as E, publicEventPricingStrategy as En, parseUserId as Er, buildBookingUtcDateWindow as Et, orderedLiveRunSessions as F, parsePositiveCents as Fn, unsafeAsPricingOptionId as Fr, omitZeroAmountFutureRows as Ft, parseMailingListSignedSourceToken as G, unsafeAsDemoCapability as Gn, formatBookingCutOffHours as Gt, slugify as H, assertNever as Hn, MAX_BOOKING_CUT_OFF_HOURS as Ht, resolveWholeSeriesBookingPhase as I, toCents as In, err as Ir, splitAmountWithRemainderInFirst as It, parseConfiguredMailingListProvider as J, unsafeAsStaffMemberId as Jn, formatDateRange as Jt, parseMailingListRuntimeContext as K, unsafeAsContentEntryId as Kn, hasBookingClosed as Kt, resolveWholeSeriesPaymentDates as L, toNonNegativeCents as Ln, ok as Lr, businessCancellationRefusalCodes as Lt, CANCELLED_SESSION_STATUS as M, mapReadonlyNonEmptyArray as Mn, unsafeAsEventOfferingId as Mr, getBookingInstalmentDepositRefundability as Mt, firstLiveRunSessionStartMs as N, isNonNegativeWholeCents as Nn, unsafeAsEventSeriesId as Nr, getBookingInstalmentPlanIntervalCount as Nt, getPublicReadCachePolicy as O, resolveExactOrFreePriceDisplay as On, unsafeAsUserId as Or, validateBookingPaymentOptionKinds as Ot, nextLiveRunSessionStartMs as P, parseNonNegativeCents as Pn, unsafeAsOccurrenceId as Pr, getBookingInstalmentProtectedDepositAmountCents as Pt, parseMailingListProviderScope as Q, unsafeAsEntitlementId as Qn, formatTimeRange as Qt, resolveWholeSeriesRunLifecycle as R, unsafeAsNonNegativeCents as Rn, blockInteractionContextSchema as Rr, scheduleBookingReasonCodes as Rt, EVENT_PRESET_VALUES as S, isPublicEventPricingOptionDisplayable as Sn, unsafeAsPageSurfaceId as Sr, isPresent as St, WHOLE_SERIES_EVENT_PRESET_VALUES as T, publicEventPricingOptions as Tn, parseSiteId as Tr, selectCategoryView as Tt, parseMailingListBlockId as U, formatDurationUnitLabel as Un, bookingCutOffHoursBetween as Ut, parseManagementKey as V, parseCurrencyCode as Vn, deriveTotalTicketQuantity as Vt, parseMailingListContentVersionId as W, unsafeAsBookingRequirementId as Wn, formatBookingClosedTime as Wt, DEFAULT_MAILING_LIST_PRIVACY_NOTE as X, parseSiteTermsVersionId as Xn, formatDateTimeRange as Xt, parseMailingListGlobalForm as Y, parseCustomerId as Yn, formatDateTime as Yt, DEFAULT_MAILING_LIST_SUCCESS_MESSAGE as Z, parseMembershipId as Zn, formatTime as Zt, canonicalizeConfiguredBookingVerticalConfig as _, parseBookingTimeZone as _n, unsafeAsCheckoutLineId as _r, normalizeLocationAddressText as _t, authoredValuesEqual as a, formatLocalScheduleTime as an, unsafeAsDetectedMimeType as ar, richTextHasText as at, resolveSiteVerticalBookingConfig as b, formatBookingPriceDisplay as bn, unsafeAsOrderPaymentReceiptId as br, publicLocationSchema as bt, STAFF_OPERATIONAL_CAPABILITIES as c, getLocalScheduleTime as cn, unsafeAsOriginalFilename as cr, parseWeeklyOpeningHours as ct, formatCreditProductUnits as d, parseLocalScheduleTime as dn, unsafeAsSafeDownloadFilename as dr, SENSITIVE_COLLECTION_MODES as dt, resolveBookingDisplayContext as en, parseDatedOfferingCapacityHoldAuditRef as er, footerLayoutForLookId as et, planTurningOnCourses as f, parseUtcIsoDateTimeString as fn, unsafeAsSiteScopedStoragePath as fr, decideLocationSave as ft, areConfiguredBookingVerticalConfigsEqual as g, toBookingTimeZone as gn, unsafeAsProductId as gr, locationValueSchema as gt, NAVIGATION_LOCATIONS as h, resolveBookingTimeZoneId as hn, unsafeAsUploadSessionId as hr, EVENT_ADDRESS_AFTER_BOOKING_LABEL as ht, isRecord as i, formatLocalScheduleDate as in, unsafeAsDeclaredMimeType as ir, isCanonicalRichTextDoc as it, publicReadFreshnessSeconds as j, mapNonEmptyArray as jn, unsafeAsEventCategoryId as jr, clampConfiguredAmount as jt, isPublicReadEndpoint as k, resolvePricingOptionsPriceDisplay as kn, parseEventSeriesId as kr, isLiveOrderInstalmentPlanStatus as kt, creditProductUnitNoun as l, localScheduleTimePattern as ln, unsafeAsPositiveByteCount as lr, assertAllowedPublicUrl as lt, withBookingModulesForSelectionChange as m, resolveBookingBusinessTimeZone as mn, unsafeAsStoragePath as mr, locationMapLinks as mt, OFFLINE_PAYMENT_METHODS as n, addLocalScheduleDays as nn, unsafeAsBookingSessionId as nr, DEFAULT_MAILING_LIST_TARGETING as nt, applyClearable as o, getBookingLocalDateKey as on, unsafeAsFileChecksumSha256 as or, formatOpeningHoursRows as ot, resolveEventCatalogue as p, toUtcIsoDateTimeString as pn, unsafeAsStorageBucketName as pr, stableJsonStringify as pt, assessMailingListTargeting as q, unsafeAsAppointmentResourceId as qn, formatDate as qt, committedWriteProofSchema as r, compareLocalScheduleDates as rn, parseMediaAssetId as rr, planMailingListChoicePresentation as rt, clearableFrom as s, getLocalScheduleDate as sn, unsafeAsMediaAssetId as sr, parsePublicContactDetails as st, isEventOccurrenceRouteSegment as t, toScheduledBookingDateTime as tn, parseDatedOfferingCapacityHoldId as tr, parseMailingListPlacementTargeting as tt, formatCreditProductPayment as u, parseBookingLocalDate as un, unsafeAsPositiveSeconds as ur, SENSITIVE_COLLECTION_CONFIRMATION_VERSION as ut, parseVerticalId as v, parsePageSurfaceSubject as vn, unsafeAsOrderFlexibleBalanceContractId as vr, parseLocationValue as vt, SURFACE_EVENT_PRESET_VALUES as w, publicEventPricingDisplay as wn, parseApiKeyId as wr, mapDrawingSchema as wt, DEFAULT_EVENT_TYPE_PRESETS as x, formatEventPricing as xn, parseEditorSessionGeneration as xr, toLocationCoordinates as xt, parseVerticalPresetId as y, EVENT_PRESET_VOCABULARY as yn, unsafeAsOrderPaymentPlanId as yr, projectPublicLocation as yt, createSecret as z, unsafeAsPositiveCents as zn, resolveFlexibleBalanceDueAt as zt };
11863
+ export { DEFAULT_MAILING_LIST_SUCCESS_MESSAGE as $, parseCustomerId as $n, formatTime as $t, getPublicReadCachePolicy as A, resolveExactOrFreePriceDisplay as An, unsafeAsPageSurfaceId as Ar, validateBookingPaymentOptionKinds as At, resolveWholeSeriesRunLifecycle as B, unsafeAsNonNegativeCents as Bn, parseRetiredCourseId as Br, scheduleBookingReasonCodes as Bt, DEFAULT_EVENT_TYPE_PRESETS as C, formatEventPricing as Cn, parseOrderId as Cr, toLocationCoordinates as Ct, WHOLE_SERIES_EVENT_PRESET_VALUES as D, publicEventPricingOptions as Dn, unsafeAsOrderPaymentPlanId as Dr, selectCategoryView as Dt, SURFACE_EVENT_PRESET_VALUES as E, publicEventPricingDisplay as En, unsafeAsOrderFlexibleBalanceContractId as Er, mapDrawingSchema as Et, firstLiveRunSessionStartMs as F, isNonNegativeWholeCents as Fn, unsafeAsSiteId as Fr, getBookingInstalmentPlanIntervalCount as Ft, parseMailingListBlockId as G, formatDurationUnitLabel as Gn, unsafeAsPricingOptionId as Gr, bookingCutOffHoursBetween as Gt, exposeSecret as H, formatCurrencyAmount as Hn, unsafeAsEventOfferingId as Hr, resolveFlexibleBalanceInitialPaymentCents as Ht, nextLiveRunSessionStartMs as I, parseNonNegativeCents as In, unsafeAsUserId as Ir, getBookingInstalmentProtectedDepositAmountCents as It, parseMailingListRuntimeContext as J, unsafeAsContentEntryId as Jn, blockInteractionContextSchema as Jr, hasBookingClosed as Jt, parseMailingListContentVersionId as K, unsafeAsBookingRequirementId as Kn, err as Kr, formatBookingClosedTime as Kt, orderedLiveRunSessions as L, parsePositiveCents as Ln, parseAttendeeId as Lr, omitZeroAmountFutureRows as Lt, publicReadBatchFreshnessSeconds as M, fromArray as Mn, parseApiKeyId as Mr, addIntervalPreservingMonthAnchor as Mt, publicReadFreshnessSeconds as N, mapNonEmptyArray as Nn, parseSiteId as Nr, clampConfiguredAmount as Nt, PUBLIC_AVAILABILITY_FRESHNESS_SECONDS as O, publicEventPricingStrategy as On, unsafeAsOrderPaymentReceiptId as Or, buildBookingUtcDateWindow as Ot, CANCELLED_SESSION_STATUS as P, mapReadonlyNonEmptyArray as Pn, parseUserId as Pr, getBookingInstalmentDepositRefundability as Pt, DEFAULT_MAILING_LIST_PRIVACY_NOTE as Q, unsafeAsStaffMemberId as Qn, formatDateTimeRange as Qt, resolveWholeSeriesBookingPhase as R, toCents as Rn, parseEventSeriesId as Rr, splitAmountWithRemainderInFirst as Rt, resolveSiteVerticalBookingConfig as S, formatBookingPriceDisplay as Sn, unsafeAsProductId as Sr, publicLocationSchema as St, ORDINARY_EVENT_PRESET_VALUES as T, publicEventPricingCurrency as Tn, unsafeAsCheckoutLineId as Tr, trimmedStringOrNull as Tt, parseManagementKey as U, parseCurrencyCode as Un, unsafeAsEventSeriesId as Ur, deriveTotalTicketQuantity as Ut, createSecret as V, unsafeAsPositiveCents as Vn, unsafeAsEventCategoryId as Vr, resolveFlexibleBalanceDueAt as Vt, slugify as W, assertNever as Wn, unsafeAsOccurrenceId as Wr, MAX_BOOKING_CUT_OFF_HOURS as Wt, parseConfiguredMailingListProvider as X, parseClientArrangementId as Xn, formatDateRange as Xt, assessMailingListTargeting as Y, parseAppointmentId as Yn, formatDate as Yt, parseMailingListGlobalForm as Z, unsafeAsAppointmentResourceId as Zn, formatDateTime as Zt, NAVIGATION_LOCATIONS as _, resolveBookingTimeZoneId as _n, unsafeAsSafeDownloadFilename as _r, EVENT_ADDRESS_AFTER_BOOKING_LABEL as _t, isRecord as a, compareLocalScheduleDates as an, parseDatedOfferingCapacityHoldAuditRef as ar, planMailingListChoicePresentation as at, parseVerticalId as b, parsePageSurfaceSubject as bn, unsafeAsStoragePath as br, parseLocationValue as bt, applyClearable as c, getBookingLocalDateKey as cn, unsafeAsBookingSessionId as cr, formatOpeningHoursRows as ct, creditProductUnitNoun as d, localScheduleTimePattern as dn, unsafeAsDetectedMimeType as dr, assertAllowedPublicUrl as dt, formatTimeRange as en, parseSiteTermsVersionId as er, parseMailingListProviderScope as et, formatCreditProductPayment as f, parseBookingLocalDate as fn, unsafeAsFileChecksumSha256 as fr, SENSITIVE_COLLECTION_CONFIRMATION_VERSION as ft, withBookingModulesForSelectionChange as g, resolveBookingBusinessTimeZone as gn, unsafeAsPositiveSeconds as gr, locationMapLinks as gt, resolveEventCatalogue as h, toUtcIsoDateTimeString as hn, unsafeAsPositiveByteCount as hr, stableJsonStringify as ht, committedWriteProofSchema as i, addLocalScheduleDays as in, unsafeAsPassId as ir, DEFAULT_MAILING_LIST_TARGETING as it, isPublicReadEndpoint as j, resolvePricingOptionsPriceDisplay as jn, unsafeAsSiteFontId as jr, isLiveOrderInstalmentPlanStatus as jt, PUBLIC_CONTENT_FRESHNESS_SECONDS as k, publicEventPricingType as kn, parseEditorSessionGeneration as kr, BOOKING_COURSE_INSTALMENT_DEADLINES as kt, clearableFrom as l, getLocalScheduleDate as ln, parseMediaAssetId as lr, parsePublicContactDetails as lt, planTurningOnCourses as m, parseUtcIsoDateTimeString as mn, unsafeAsOriginalFilename as mr, decideLocationSave as mt, OFFLINE_PAYMENT_METHODS as n, resolveBookingDisplayContext as nn, parseMembershipId as nr, footerLayoutForLookId as nt, authoredValuesEqual as o, formatLocalScheduleDate as on, parseDatedOfferingCapacityHoldId as or, isCanonicalRichTextDoc as ot, formatCreditProductUnits as p, parseLocalScheduleTime as pn, unsafeAsMediaAssetId as pr, SENSITIVE_COLLECTION_MODES as pt, parseMailingListSignedSourceToken as q, unsafeAsDemoCapability as qn, ok as qr, formatBookingCutOffHours as qt, bookingContextId as r, toScheduledBookingDateTime as rn, unsafeAsEntitlementId as rr, parseMailingListPlacementTargeting as rt, APPOINTMENT_REQUEST_OUTCOME_VALUES as s, formatLocalScheduleTime as sn, parseWaitlistEntryId as sr, richTextHasText as st, isEventOccurrenceRouteSegment as t, inferSiteDateLocale as tn, parseEntitlementId as tr, parseFooterCompositionV1 as tt, STAFF_OPERATIONAL_CAPABILITIES as u, getLocalScheduleTime as un, unsafeAsDeclaredMimeType as ur, parseWeeklyOpeningHours as ut, areConfiguredBookingVerticalConfigsEqual as v, toBookingTimeZone as vn, unsafeAsSiteScopedStoragePath as vr, locationValueSchema as vt, EVENT_PRESET_VALUES as w, isPublicEventPricingOptionDisplayable as wn, parseOrderPaymentReceiptId as wr, isPresent as wt, parseVerticalPresetId as x, EVENT_PRESET_VOCABULARY as xn, unsafeAsUploadSessionId as xr, projectPublicLocation as xt, canonicalizeConfiguredBookingVerticalConfig as y, parseBookingTimeZone as yn, unsafeAsStorageBucketName as yr, normalizeLocationAddressText as yt, resolveWholeSeriesPaymentDates as z, toNonNegativeCents as zn, parseEventSeriesRegistrationId as zr, businessCancellationRefusalCodes as zt };
package/dist/testing.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import "./sdk-event-upsert-BL6uAz53.mjs";
3
- import "./src-ClX_VLD6.mjs";
4
- import { Dn as createOutput, R as calculateEntryDiffs, U as syncLocalMediaForPush, W as syncLocalMediaForPull, Wt as applyPushConfigPlan, it as readEntries, mt as writeMediaManifest, o as executeEntryCommandPlanAsSyncResult, qt as preparePushConfigTarget, t as compileEntryPushCommands } from "./entryCommands-CXGj-eca.mjs";
5
- import "./load-config-Bhh-kYhx.mjs";
2
+ import "./sdk-event-upsert-78zikPNp.mjs";
3
+ import "./src-e6JfJMDt.mjs";
4
+ import { Dn as createOutput, R as calculateEntryDiffs, U as syncLocalMediaForPush, W as syncLocalMediaForPull, Wt as applyPushConfigPlan, it as readEntries, mt as writeMediaManifest, o as executeEntryCommandPlanAsSyncResult, qt as preparePushConfigTarget, t as compileEntryPushCommands } from "./entryCommands-CINe1Vw0.mjs";
5
+ import "./load-config-Dl_o53yP.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.37.0",
3
+ "version": "0.38.1",
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-Bhh-kYhx.mjs";
3
-
4
- export { loadConfigFile };