riverbankcms 0.36.0 → 0.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/acceptance/matrix.mjs +3 -3
- package/dist/cli/index.mjs +6849 -3337
- package/dist/cli/init-docs/content/getting-started.md +10 -10
- package/dist/{entryCommands-Cx1aj859.mjs → entryCommands-Db_o9w2r.mjs} +5179 -1336
- package/dist/{eventUpsertInputSchema-Dj2LtxCt.mjs → eventUpsertInputSchema-CHMFsN8M.mjs} +2 -2
- package/dist/load-config-CkNUO_cn.mjs +4 -0
- package/dist/{load-config-k3XF8V97.mjs → load-config-aVpLIpK_.mjs} +2 -2
- package/dist/{plan-D-bOngd3.mjs → plan-CNisrgzZ.mjs} +9 -12
- package/dist/scaffold/index.mjs +2 -2
- package/dist/{sdk-event-upsert-n4in1E4v.mjs → sdk-event-upsert-CLqEh-D2.mjs} +207 -125
- package/dist/{src-DHIn60_q.mjs → src-CE4CDO3T.mjs} +396 -29
- package/dist/testing.mjs +4 -4
- package/package.json +1 -1
- package/dist/load-config-D7f6MXJV.mjs +0 -4
|
@@ -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
|
}
|
|
@@ -2718,6 +2740,7 @@ const scheduleBookingReasonCodes = [
|
|
|
2718
2740
|
"target_not_bookable",
|
|
2719
2741
|
"target_changed",
|
|
2720
2742
|
"already_booked_on_target",
|
|
2743
|
+
"has_room",
|
|
2721
2744
|
"no_replacement_in_week",
|
|
2722
2745
|
"changed_after_review",
|
|
2723
2746
|
"added_after_review",
|
|
@@ -2735,12 +2758,219 @@ const businessCancellationRefusalCodes = [
|
|
|
2735
2758
|
const businessCancellationRefusalCopy = {
|
|
2736
2759
|
review_changed: "Bookings have changed since you reviewed this schedule. Review the changes again before saving.",
|
|
2737
2760
|
not_found: "One of these dates could not be found. Refresh the dates and review your changes again.",
|
|
2738
|
-
payment_in_progress: "A payment is still
|
|
2761
|
+
payment_in_progress: "A payment for one of these bookings is still going through. This usually clears within a day, so please try again later. If it's still showing tomorrow, contact us and we'll sort it out.",
|
|
2739
2762
|
payment_check_unavailable: "We could not check a payment for one of these bookings. Review the cancellation again later, or contact us for help.",
|
|
2740
2763
|
partial_payment_terms: "One of these bookings shares a payment arrangement with another booking. Cancel the bookings together or contact us for help.",
|
|
2741
2764
|
settlement_not_allowed: "A refund choice can't be used any more: account credit may have been turned off, or how a booking was paid has changed. Review the cancellation again and choose again."
|
|
2742
2765
|
};
|
|
2743
2766
|
|
|
2767
|
+
//#endregion
|
|
2768
|
+
//#region ../core/src/cancellation-kept-copy.ts
|
|
2769
|
+
/**
|
|
2770
|
+
* What the client paid and won't get back, from what the cancellation plan
|
|
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.
|
|
2776
|
+
*/
|
|
2777
|
+
function moneyKeptByCancellation(outcome, refunded) {
|
|
2778
|
+
if (refunded) return outcome.kind === "refund" && outcome.keptDeposit !== undefined ? {
|
|
2779
|
+
kind: "kept_part",
|
|
2780
|
+
money: outcome.keptDeposit
|
|
2781
|
+
} : null;
|
|
2782
|
+
switch (outcome.kind) {
|
|
2783
|
+
case "keep_money":
|
|
2784
|
+
case "keep_credit":
|
|
2785
|
+
case "contact_business": return outcome;
|
|
2786
|
+
case "refund": return {
|
|
2787
|
+
kind: "contact_business",
|
|
2788
|
+
money: outcome.money
|
|
2789
|
+
};
|
|
2790
|
+
case "credit_back":
|
|
2791
|
+
case "nothing_to_return": return null;
|
|
2792
|
+
}
|
|
2793
|
+
}
|
|
2794
|
+
function named(businessName) {
|
|
2795
|
+
return businessName !== null && businessName !== undefined && businessName.trim() !== "" ? businessName : null;
|
|
2796
|
+
}
|
|
2797
|
+
function keepReasonClause(reason, context) {
|
|
2798
|
+
switch (reason.kind) {
|
|
2799
|
+
case "cutoff_passed": return `it's less than ${formatCancellationCutoffSpan(reason.cutoffHours)} until it starts`;
|
|
2800
|
+
case "never_refunded": {
|
|
2801
|
+
const business = named(context.businessName);
|
|
2802
|
+
return business !== null ? `${business} doesn't refund cancelled ${context.booking}s` : `cancelled ${context.booking}s aren't refunded`;
|
|
2803
|
+
}
|
|
2804
|
+
case "non_refundable_deposit": return "the deposit isn't refundable";
|
|
2805
|
+
case "already_started": return "it's already started";
|
|
2806
|
+
}
|
|
2807
|
+
}
|
|
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}.`;
|
|
2819
|
+
}
|
|
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." */
|
|
2828
|
+
function cancellationKeptSentence(kept, context) {
|
|
2829
|
+
const because = (reason) => `because ${keepReasonClause(reason, context)}`;
|
|
2830
|
+
const business = named(context.businessName) ?? "the business";
|
|
2831
|
+
switch (kept.kind) {
|
|
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;
|
|
2971
|
+
}
|
|
2972
|
+
}
|
|
2973
|
+
|
|
2744
2974
|
//#endregion
|
|
2745
2975
|
//#region ../core/src/booking-instalments.ts
|
|
2746
2976
|
function isDepositBearingBookingInstalmentPlan(plan) {
|
|
@@ -9646,7 +9876,7 @@ function resolveBusinessVocabulary(verticalId) {
|
|
|
9646
9876
|
}
|
|
9647
9877
|
/** What the dashboard calls the person where the business type names nobody. */
|
|
9648
9878
|
const TEAM_MEMBER_NOUN = person("team member", "team members");
|
|
9649
|
-
const indefiniteArticle = (word) => /^[aeiou]/i.test(word) ? "an" : "a";
|
|
9879
|
+
const indefiniteArticle = (word) => /^(honest|honour|hour|heir)/i.test(word) ? "an" : /^(uni([^nmd]|$)|use|user|euro|one|once)/i.test(word) ? "a" : /^[aeiou]/i.test(word) ? "an" : "a";
|
|
9650
9880
|
function businessPersonPhrases(noun) {
|
|
9651
9881
|
const withArticle = `${indefiniteArticle(noun.singular)} ${noun.singular}`;
|
|
9652
9882
|
return {
|
|
@@ -10674,6 +10904,24 @@ function usesPersistedRiverbankTheme(mode) {
|
|
|
10674
10904
|
return mode !== "headless_full";
|
|
10675
10905
|
}
|
|
10676
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
|
+
|
|
10677
10925
|
//#endregion
|
|
10678
10926
|
//#region ../core/src/email-vocabulary.ts
|
|
10679
10927
|
/** Shared email identities. No renderer, dashboard or private email-package dependency. */
|
|
@@ -10733,6 +10981,11 @@ const EMAIL_DEFINITIONS = {
|
|
|
10733
10981
|
perEvent: false,
|
|
10734
10982
|
templateStorage: true
|
|
10735
10983
|
},
|
|
10984
|
+
event_room_changed: {
|
|
10985
|
+
wording: "editable",
|
|
10986
|
+
perEvent: false,
|
|
10987
|
+
templateStorage: true
|
|
10988
|
+
},
|
|
10736
10989
|
event_booking_ticket_changed_admin: {
|
|
10737
10990
|
wording: "editable",
|
|
10738
10991
|
perEvent: false,
|
|
@@ -10903,12 +11156,6 @@ const EMAIL_DEFINITIONS = {
|
|
|
10903
11156
|
perEvent: false,
|
|
10904
11157
|
templateStorage: true
|
|
10905
11158
|
},
|
|
10906
|
-
bundle_booking_confirmation: {
|
|
10907
|
-
wording: "shared",
|
|
10908
|
-
sharesWordingWith: "event_confirmation",
|
|
10909
|
-
perEvent: false,
|
|
10910
|
-
templateStorage: true
|
|
10911
|
-
},
|
|
10912
11159
|
appointment_rescheduled_customer: {
|
|
10913
11160
|
wording: "editable",
|
|
10914
11161
|
perEvent: false,
|
|
@@ -11187,6 +11434,126 @@ function isEventEmailTemplateType(value) {
|
|
|
11187
11434
|
return EVENT_EMAIL_TEMPLATE_TYPES.some((key) => key === value);
|
|
11188
11435
|
}
|
|
11189
11436
|
|
|
11437
|
+
//#endregion
|
|
11438
|
+
//#region ../core/src/booking-payment-copy.ts
|
|
11439
|
+
function siteDay(dueAt, context) {
|
|
11440
|
+
const parsed = parseUtcIsoDateTimeString(dueAt);
|
|
11441
|
+
return parsed.ok ? formatDate({
|
|
11442
|
+
kind: "instant",
|
|
11443
|
+
value: parsed.value
|
|
11444
|
+
}, {
|
|
11445
|
+
timeZone: context.siteTimezone,
|
|
11446
|
+
locale: context.locale
|
|
11447
|
+
}) : null;
|
|
11448
|
+
}
|
|
11449
|
+
/** Balance deadlines name their payable instant's site-local calendar day. */
|
|
11450
|
+
function formatManagedBalanceDueText(dueAt, context) {
|
|
11451
|
+
const date = dueAt === null ? null : siteDay(dueAt, context);
|
|
11452
|
+
return date === null ? "Remaining balance due before the due date" : `Remaining balance due by ${date}`;
|
|
11453
|
+
}
|
|
11454
|
+
/** "£20.00 paid, £80.00 due by 5 Dec 2026", for a balance the client pays on the site later. */
|
|
11455
|
+
function managedBalanceText(summary, context) {
|
|
11456
|
+
const outstanding = formatCurrencyAmount(summary.amountOutstandingCents, summary.currency);
|
|
11457
|
+
const date = summary.dueAt === null ? null : siteDay(summary.dueAt, context);
|
|
11458
|
+
const due = date === null ? `${outstanding} still to pay` : `${outstanding} due by ${date}`;
|
|
11459
|
+
return summary.amountPaidCents > 0 ? `${formatCurrencyAmount(summary.amountPaidCents, summary.currency)} paid, ${due}` : due;
|
|
11460
|
+
}
|
|
11461
|
+
/** Zero and unavailable counts do not describe credits consumed. */
|
|
11462
|
+
function hasUsedPassCredits(credits) {
|
|
11463
|
+
return credits !== undefined && credits !== 0 && !Number.isNaN(credits);
|
|
11464
|
+
}
|
|
11465
|
+
/** Older stored emails have no balance; zero is a known balance, not missing data. */
|
|
11466
|
+
function remainingPassCredits(summary) {
|
|
11467
|
+
return summary.passCreditsRemaining === undefined ? "" : ` (${summary.passCreditsRemaining} left)`;
|
|
11468
|
+
}
|
|
11469
|
+
function withDiscount(payment, text) {
|
|
11470
|
+
if (payment?.discount === undefined) return text;
|
|
11471
|
+
const discount = `Discount code ${payment.discount.code}: ${formatCurrencyAmount(payment.discount.savingCents, payment.discount.currency)} off`;
|
|
11472
|
+
return text !== null && text.length > 0 ? `${text}. ${discount}` : discount;
|
|
11473
|
+
}
|
|
11474
|
+
/** The plain payment row, as the business's notifications and the older email layout say it. */
|
|
11475
|
+
function formatConfirmationEmailPaymentInfo(summary, context) {
|
|
11476
|
+
return withDiscount(summary, baseConfirmationEmailPaymentInfo(summary, context));
|
|
11477
|
+
}
|
|
11478
|
+
function baseConfirmationEmailPaymentInfo(summary, context) {
|
|
11479
|
+
if (summary === undefined) return null;
|
|
11480
|
+
switch (summary.kind) {
|
|
11481
|
+
case "free":
|
|
11482
|
+
case "waived": return null;
|
|
11483
|
+
case "manual_due": return `${formatCurrencyAmount(summary.amountDueCents, summary.currency)} to be paid directly`;
|
|
11484
|
+
case "managed_balance_due": return managedBalanceText(summary, context);
|
|
11485
|
+
case "pass":
|
|
11486
|
+
if (!hasText(summary.passName)) return null;
|
|
11487
|
+
return (hasUsedPassCredits(summary.passCreditsUsed) ? `${summary.passName} (${summary.passCreditsUsed} credit${summary.passCreditsUsed === 1 ? "" : "s"} used)` : summary.passName) + remainingPassCredits(summary);
|
|
11488
|
+
case "membership": return `${summary.membershipName ?? "Membership"} membership`;
|
|
11489
|
+
case "monetary":
|
|
11490
|
+
if (summary.amountOutstandingCents == null || summary.amountOutstandingCents === 0) {
|
|
11491
|
+
return formatCurrencyAmount(summary.amountPaidCents, summary.currency);
|
|
11492
|
+
}
|
|
11493
|
+
return `${formatCurrencyAmount(summary.amountPaidCents, summary.currency)} paid. ${formatCurrencyAmount(summary.amountOutstandingCents, summary.currency)} remaining${hasText(summary.dueAt) ? ` — ${formatManagedBalanceDueText(summary.dueAt, context)}` : ""}`;
|
|
11494
|
+
}
|
|
11495
|
+
return assertNever(summary);
|
|
11496
|
+
}
|
|
11497
|
+
/** How a paid booking was paid, as the customer shell's Payment row says it. */
|
|
11498
|
+
function paidWith(method) {
|
|
11499
|
+
switch (method) {
|
|
11500
|
+
case "stripe": return "by card";
|
|
11501
|
+
case "store_credit": return "with your account credit";
|
|
11502
|
+
case "mixed": return "by card and account credit";
|
|
11503
|
+
case "manual": return "";
|
|
11504
|
+
}
|
|
11505
|
+
}
|
|
11506
|
+
/** What's owed outside the site, and what was paid already: nothing either way says arrival. */
|
|
11507
|
+
function directBalance(summary) {
|
|
11508
|
+
if (summary?.kind === "manual_due") return {
|
|
11509
|
+
paidCents: 0,
|
|
11510
|
+
owedCents: summary.amountDueCents,
|
|
11511
|
+
currency: summary.currency
|
|
11512
|
+
};
|
|
11513
|
+
if (summary?.kind !== "monetary" || summary.paymentMethod !== "manual" || (summary.amountOutstandingCents ?? 0) === 0) return null;
|
|
11514
|
+
return {
|
|
11515
|
+
paidCents: summary.amountPaidCents,
|
|
11516
|
+
owedCents: summary.amountOutstandingCents ?? 0,
|
|
11517
|
+
currency: summary.currency
|
|
11518
|
+
};
|
|
11519
|
+
}
|
|
11520
|
+
/** A balance agreed outside the system has no link or portal payment, so say who it goes to. */
|
|
11521
|
+
function directBalanceSentence(summary, context) {
|
|
11522
|
+
const balance = directBalance(summary);
|
|
11523
|
+
if (balance === null) return null;
|
|
11524
|
+
const owed = formatCurrencyAmount(balance.owedCents, balance.currency);
|
|
11525
|
+
const paid = balance.paidCents > 0 ? `${formatCurrencyAmount(balance.paidCents, balance.currency)} paid. ` : "";
|
|
11526
|
+
const business = hasText(context.siteTitle) ? context.siteTitle : "the business";
|
|
11527
|
+
const questions = context.surface === "email" ? " If you have any questions, just reply to this email." : "";
|
|
11528
|
+
return `${paid}${owed} to pay directly to ${business}.${questions}`;
|
|
11529
|
+
}
|
|
11530
|
+
/** Whether the payment owes the client a direct-balance sentence, which every layout says the same way. */
|
|
11531
|
+
function formatDirectBalancePaymentSentence(summary, context) {
|
|
11532
|
+
const direct = directBalanceSentence(summary, context);
|
|
11533
|
+
return direct === null ? null : withDiscount(summary, direct);
|
|
11534
|
+
}
|
|
11535
|
+
/** Customer payment copy shared by built-in confirmations, editable wording and the success page. */
|
|
11536
|
+
function formatBookingPaymentSentence(summary, context) {
|
|
11537
|
+
return withDiscount(summary, baseBookingPaymentSentence(summary, context));
|
|
11538
|
+
}
|
|
11539
|
+
function baseBookingPaymentSentence(summary, context) {
|
|
11540
|
+
if (summary === undefined) return null;
|
|
11541
|
+
const direct = directBalanceSentence(summary, context);
|
|
11542
|
+
if (direct !== null) return direct;
|
|
11543
|
+
switch (summary.kind) {
|
|
11544
|
+
case "free": return "Free";
|
|
11545
|
+
case "waived": return "Nothing to pay";
|
|
11546
|
+
case "pass":
|
|
11547
|
+
if (!hasText(summary.passName)) return null;
|
|
11548
|
+
return `Paid with your ${summary.passName}${context.passNoun ? ` ${context.passNoun}` : ""}${remainingPassCredits(summary)}`;
|
|
11549
|
+
case "membership": return hasText(summary.membershipName) ? `Included in your ${summary.membershipName} membership` : "Included in your membership";
|
|
11550
|
+
case "monetary": return summary.amountOutstandingCents == null || summary.amountOutstandingCents === 0 ? `Paid ${formatCurrencyAmount(summary.amountPaidCents, summary.currency, { decimals: "auto" })}${paidWith(summary.paymentMethod) ? ` ${paidWith(summary.paymentMethod)}` : ""}` : baseConfirmationEmailPaymentInfo(summary, context);
|
|
11551
|
+
case "manual_due": return null;
|
|
11552
|
+
case "managed_balance_due": return managedBalanceText(summary, context);
|
|
11553
|
+
}
|
|
11554
|
+
return assertNever(summary);
|
|
11555
|
+
}
|
|
11556
|
+
|
|
11190
11557
|
//#endregion
|
|
11191
11558
|
//#region ../core/src/editor-value-ownership.ts
|
|
11192
11559
|
/** Captured editor payloads are deeply immutable; caller-owned inputs are never frozen in place. */
|
|
@@ -11493,4 +11860,4 @@ function isEventOccurrenceRouteSegment(segment) {
|
|
|
11493
11860
|
}
|
|
11494
11861
|
|
|
11495
11862
|
//#endregion
|
|
11496
|
-
export {
|
|
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-
|
|
3
|
-
import "./src-
|
|
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-
|
|
5
|
-
import "./load-config-
|
|
2
|
+
import "./sdk-event-upsert-CLqEh-D2.mjs";
|
|
3
|
+
import "./src-CE4CDO3T.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-Db_o9w2r.mjs";
|
|
5
|
+
import "./load-config-aVpLIpK_.mjs";
|
|
6
6
|
|
|
7
7
|
export { applyPushConfigPlan, calculateEntryDiffs, compileEntryPushCommands, createOutput, executeEntryCommandPlanAsSyncResult, preparePushConfigTarget, readEntries, syncLocalMediaForPull, syncLocalMediaForPush, writeMediaManifest };
|
package/package.json
CHANGED