riverbankcms 0.38.0 → 0.38.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/acceptance/matrix.mjs +3 -3
- package/dist/cli/index.mjs +52040 -39758
- package/dist/cli/init-docs/content/workflow-custom-block.md +47 -2
- package/dist/{entryCommands-Db_o9w2r.mjs → entryCommands-C75BmINB.mjs} +1477 -242
- package/dist/{eventUpsertInputSchema-CHMFsN8M.mjs → eventUpsertInputSchema-BJaQ0cGf.mjs} +2 -2
- package/dist/{load-config-aVpLIpK_.mjs → load-config-BQtsKco-.mjs} +2 -2
- package/dist/load-config-DiH7PZ_y.mjs +4 -0
- package/dist/{plan-CNisrgzZ.mjs → plan-D8WICa9M.mjs} +1 -1
- package/dist/scaffold/index.mjs +2 -2
- package/dist/{sdk-event-upsert-CLqEh-D2.mjs → sdk-event-upsert-CdBZDquG.mjs} +566 -42
- package/dist/{src-CE4CDO3T.mjs → src-CnUjAAn9.mjs} +33 -6
- package/dist/testing.mjs +4 -4
- package/package.json +1 -1
- package/dist/load-config-CkNUO_cn.mjs +0 -4
|
@@ -3840,6 +3840,17 @@ function trimmedStringOrNull(value) {
|
|
|
3840
3840
|
function capitalize(str) {
|
|
3841
3841
|
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
3842
3842
|
}
|
|
3843
|
+
/**
|
|
3844
|
+
* The same words with a lower-case first letter, for a label or sentence
|
|
3845
|
+
* used mid-sentence: "Refunds and transfers" → "refunds and transfers",
|
|
3846
|
+
* "People can move…" → "people can move…". A leading acronym stays as it is
|
|
3847
|
+
* ("QR tickets").
|
|
3848
|
+
*/
|
|
3849
|
+
function lowerFirstLetter(text) {
|
|
3850
|
+
const [first = "", second = ""] = text;
|
|
3851
|
+
const startsWithAcronym = second !== "" && second !== second.toLocaleLowerCase("en-GB");
|
|
3852
|
+
return startsWithAcronym ? text : first.toLocaleLowerCase("en-GB") + text.slice(first.length);
|
|
3853
|
+
}
|
|
3843
3854
|
|
|
3844
3855
|
//#endregion
|
|
3845
3856
|
//#region ../core/src/location.ts
|
|
@@ -9568,7 +9579,7 @@ const NAVIGATION_LOCATION_DESCRIPTORS = {
|
|
|
9568
9579
|
legal: {
|
|
9569
9580
|
location: "legal",
|
|
9570
9581
|
label: "Legal links",
|
|
9571
|
-
description: "Smaller links at the bottom of your footer, for
|
|
9582
|
+
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."
|
|
9572
9583
|
}
|
|
9573
9584
|
};
|
|
9574
9585
|
function isNavigationLocation(value) {
|
|
@@ -11156,6 +11167,11 @@ const EMAIL_DEFINITIONS = {
|
|
|
11156
11167
|
perEvent: false,
|
|
11157
11168
|
templateStorage: true
|
|
11158
11169
|
},
|
|
11170
|
+
appointment_service_changed_customer: {
|
|
11171
|
+
wording: "editable",
|
|
11172
|
+
perEvent: false,
|
|
11173
|
+
templateStorage: true
|
|
11174
|
+
},
|
|
11159
11175
|
appointment_rescheduled_customer: {
|
|
11160
11176
|
wording: "editable",
|
|
11161
11177
|
perEvent: false,
|
|
@@ -11732,8 +11748,12 @@ function googleBusy(check) {
|
|
|
11732
11748
|
function googleCalendarWarning(check) {
|
|
11733
11749
|
return check.kind === "unchecked" ? check.warning : null;
|
|
11734
11750
|
}
|
|
11751
|
+
/** Whether a start has passed, allowing a few minutes for a booking made as the session begins. */
|
|
11752
|
+
function appointmentStartHasPassed(startAt, nowMs) {
|
|
11753
|
+
return Date.parse(startAt) < nowMs - 3 * 6e4;
|
|
11754
|
+
}
|
|
11735
11755
|
/** Owners may waive public rules, but cannot waive real clashes or book into the past. */
|
|
11736
|
-
function decideOwnerAppointmentTime(proposed, rules, nowMs) {
|
|
11756
|
+
function decideOwnerAppointmentTime(proposed, rules, nowMs, existingStartAt) {
|
|
11737
11757
|
const start = Date.parse(proposed.startAt);
|
|
11738
11758
|
const end = Date.parse(proposed.endAt);
|
|
11739
11759
|
if (end <= start || !Number.isFinite(start) || !Number.isFinite(end) || end - start !== rules.service.durationMinutes * 6e4) {
|
|
@@ -11742,7 +11762,7 @@ function decideOwnerAppointmentTime(proposed, rules, nowMs) {
|
|
|
11742
11762
|
reason: "invalid_time"
|
|
11743
11763
|
};
|
|
11744
11764
|
}
|
|
11745
|
-
if (
|
|
11765
|
+
if (appointmentStartHasPassed(proposed.startAt, nowMs)) return {
|
|
11746
11766
|
kind: "refused",
|
|
11747
11767
|
reason: "past"
|
|
11748
11768
|
};
|
|
@@ -11759,8 +11779,7 @@ function decideOwnerAppointmentTime(proposed, rules, nowMs) {
|
|
|
11759
11779
|
const occupiedEnd = end + rules.service.cleanupMinutes * 6e4;
|
|
11760
11780
|
const breaks = {
|
|
11761
11781
|
working_hours: !fitsWorkingTimes(proposed, rules),
|
|
11762
|
-
|
|
11763
|
-
booking_window: rules.bookingNotice.maxBookingNoticeMinutes !== null && start > nowMs + rules.bookingNotice.maxBookingNoticeMinutes * 6e4,
|
|
11782
|
+
...noticeRuleBreaks(start, rules.bookingNotice, nowMs, existingStartAt),
|
|
11764
11783
|
buffer: rules.occupiedWindows.some((window) => overlaps$1(window, occupiedStart, occupiedEnd)),
|
|
11765
11784
|
closure: rules.closures.some((window) => overlaps$1(window, occupiedStart, occupiedEnd)),
|
|
11766
11785
|
google_busy: googleBusy(rules.googleCalendar).some((window) => overlaps$1(window, occupiedStart, occupiedEnd))
|
|
@@ -11771,6 +11790,14 @@ function decideOwnerAppointmentTime(proposed, rules, nowMs) {
|
|
|
11771
11790
|
googleCalendarWarning: googleCalendarWarning(rules.googleCalendar)
|
|
11772
11791
|
};
|
|
11773
11792
|
}
|
|
11793
|
+
/** Booking notice applies to a new start; changing the occupied length leaves an existing start agreed. */
|
|
11794
|
+
function noticeRuleBreaks(start, notice, nowMs, existingStartAt) {
|
|
11795
|
+
const keepsStart = existingStartAt !== undefined && Date.parse(existingStartAt) === start;
|
|
11796
|
+
return {
|
|
11797
|
+
minimum_notice: !keepsStart && start < nowMs + notice.minLeadMinutes * 6e4,
|
|
11798
|
+
booking_window: !keepsStart && notice.maxBookingNoticeMinutes !== null && start > nowMs + notice.maxBookingNoticeMinutes * 6e4
|
|
11799
|
+
};
|
|
11800
|
+
}
|
|
11774
11801
|
function regularRefusalFromBreaks(breaks) {
|
|
11775
11802
|
if (breaks.includes("closure")) return "closure";
|
|
11776
11803
|
if (breaks.includes("working_hours")) return "outside_hours";
|
|
@@ -11860,4 +11887,4 @@ function isEventOccurrenceRouteSegment(segment) {
|
|
|
11860
11887
|
}
|
|
11861
11888
|
|
|
11862
11889
|
//#endregion
|
|
11863
|
-
export {
|
|
11890
|
+
export { DEFAULT_MAILING_LIST_PRIVACY_NOTE as $, parseClientArrangementId as $n, formatDateTimeRange as $t, PUBLIC_RENDERED_AVAILABILITY_FRESHNESS_SECONDS as A, publicEventPricingType as An, unsafeAsOrderFlexibleBalanceContractId as Ar, BOOKING_COURSE_INSTALMENT_DEADLINES as At, resolveWholeSeriesPaymentDates as B, toNonNegativeCents as Bn, unsafeAsUserId as Br, businessCancellationRefusalCodes as Bt, DEFAULT_EVENT_TYPE_PRESETS as C, formatBookingPriceDisplay as Cn, unsafeAsStorageBucketName as Cr, publicLocationSchema as Ct, WHOLE_SERIES_EVENT_PRESET_VALUES as D, publicEventPricingDisplay as Dn, parseOrderId as Dr, mapDrawingSchema as Dt, SURFACE_EVENT_PRESET_VALUES as E, publicEventPricingCurrency as En, unsafeAsProductId as Er, trimmedStringOrNull as Et, CANCELLED_SESSION_STATUS as F, mapReadonlyNonEmptyArray as Fn, unsafeAsSiteFontId as Fr, getBookingInstalmentDepositRefundability as Ft, slugify as G, assertNever as Gn, unsafeAsEventCategoryId as Gr, MAX_BOOKING_CUT_OFF_HOURS as Gt, createSecret as H, unsafeAsPositiveCents as Hn, parseEventSeriesId as Hr, resolveFlexibleBalanceDueAt as Ht, firstLiveRunSessionStartMs as I, isNonNegativeWholeCents as In, parseApiKeyId as Ir, getBookingInstalmentPlanIntervalCount as It, parseMailingListSignedSourceToken as J, unsafeAsGiftingInstrumentId as Jn, unsafeAsOccurrenceId as Jr, formatBookingCutOffHours as Jt, parseMailingListBlockId as K, formatDurationUnitLabel as Kn, unsafeAsEventOfferingId as Kr, bookingCutOffHoursBetween as Kt, nextLiveRunSessionStartMs as L, parseNonNegativeCents as Ln, parseSiteId as Lr, getBookingInstalmentProtectedDepositAmountCents as Lt, isPublicReadEndpoint as M, resolvePricingOptionsPriceDisplay as Mn, unsafeAsOrderPaymentReceiptId as Mr, isLiveOrderInstalmentPlanStatus as Mt, publicReadBatchFreshnessSeconds as N, fromArray as Nn, parseEditorSessionGeneration as Nr, addIntervalPreservingMonthAnchor as Nt, PUBLIC_AVAILABILITY_FRESHNESS_SECONDS as O, publicEventPricingOptions as On, parseOrderPaymentReceiptId as Or, selectCategoryView as Ot, publicReadFreshnessSeconds as P, mapNonEmptyArray as Pn, unsafeAsPageSurfaceId as Pr, clampConfiguredAmount as Pt, parseMailingListGlobalForm as Q, parseAppointmentId as Qn, blockInteractionContextSchema as Qr, formatDateTime as Qt, orderedLiveRunSessions as R, parsePositiveCents as Rn, parseUserId as Rr, omitZeroAmountFutureRows as Rt, resolveSiteVerticalBookingConfig as S, EVENT_PRESET_VOCABULARY as Sn, unsafeAsSiteScopedStoragePath as Sr, projectPublicLocation as St, ORDINARY_EVENT_PRESET_VALUES as T, isPublicEventPricingOptionDisplayable as Tn, unsafeAsUploadSessionId as Tr, isPresent as Tt, exposeSecret as U, formatCurrencyAmount as Un, parseEventSeriesRegistrationId as Ur, resolveFlexibleBalanceInitialPaymentCents as Ut, resolveWholeSeriesRunLifecycle as V, unsafeAsNonNegativeCents as Vn, parseAttendeeId as Vr, scheduleBookingReasonCodes as Vt, parseManagementKey as W, parseCurrencyCode as Wn, parseRetiredCourseId as Wr, deriveTotalTicketQuantity as Wt, assessMailingListTargeting as X, unsafeAsDemoCapability as Xn, err as Xr, formatDate as Xt, parseMailingListRuntimeContext as Y, unsafeAsGiftingOfferId as Yn, unsafeAsPricingOptionId as Yr, hasBookingClosed as Yt, parseConfiguredMailingListProvider as Z, unsafeAsContentEntryId as Zn, ok as Zr, formatDateRange as Zt, NAVIGATION_LOCATIONS as _, resolveBookingBusinessTimeZone as _n, unsafeAsMediaAssetId as _r, locationMapLinks as _t, isRecord as a, addLocalScheduleDays as an, parseEntitlementId as ar, DEFAULT_MAILING_LIST_TARGETING as at, parseVerticalId as b, parseBookingTimeZone as bn, unsafeAsPositiveSeconds as br, normalizeLocationAddressText as bt, applyClearable as c, formatLocalScheduleTime as cn, unsafeAsPassId as cr, richTextHasText as ct, creditProductUnitNoun as d, getLocalScheduleTime as dn, parseWaitlistEntryId as dr, parseWeeklyOpeningHours as dt, formatTime as en, unsafeAsAppointmentResourceId as er, DEFAULT_MAILING_LIST_SUCCESS_MESSAGE as et, formatCreditProductPayment as f, localScheduleTimePattern as fn, unsafeAsBookingSessionId as fr, assertAllowedPublicUrl as ft, withBookingModulesForSelectionChange as g, toUtcIsoDateTimeString as gn, unsafeAsFileChecksumSha256 as gr, stableJsonStringify as gt, resolveEventCatalogue as h, parseUtcIsoDateTimeString as hn, unsafeAsDetectedMimeType as hr, decideLocationSave as ht, committedWriteProofSchema as i, toScheduledBookingDateTime as in, unsafeAsCustomerId as ir, parseMailingListPlacementTargeting as it, getPublicReadCachePolicy as j, resolveExactOrFreePriceDisplay as jn, unsafeAsOrderPaymentPlanId as jr, validateBookingPaymentOptionKinds as jt, PUBLIC_CONTENT_FRESHNESS_SECONDS as k, publicEventPricingStrategy as kn, unsafeAsCheckoutLineId as kr, buildBookingUtcDateWindow as kt, clearableFrom as l, getBookingLocalDateKey as ln, parseDatedOfferingCapacityHoldAuditRef as lr, formatOpeningHoursRows as lt, planTurningOnCourses as m, parseLocalScheduleTime as mn, unsafeAsDeclaredMimeType as mr, SENSITIVE_COLLECTION_MODES as mt, OFFLINE_PAYMENT_METHODS as n, inferSiteDateLocale as nn, parseCustomerId as nr, parseFooterCompositionV1 as nt, authoredValuesEqual as o, compareLocalScheduleDates as on, parseMembershipId as or, planMailingListChoicePresentation as ot, formatCreditProductUnits as p, parseBookingLocalDate as pn, parseMediaAssetId as pr, SENSITIVE_COLLECTION_CONFIRMATION_VERSION as pt, parseMailingListContentVersionId as q, unsafeAsBookingRequirementId as qn, unsafeAsEventSeriesId as qr, formatBookingClosedTime as qt, bookingContextId as r, resolveBookingDisplayContext as rn, parseSiteTermsVersionId as rr, footerLayoutForLookId as rt, APPOINTMENT_REQUEST_OUTCOME_VALUES as s, formatLocalScheduleDate as sn, unsafeAsEntitlementId as sr, isCanonicalRichTextDoc as st, isEventOccurrenceRouteSegment as t, formatTimeRange as tn, unsafeAsStaffMemberId as tr, parseMailingListProviderScope as tt, STAFF_OPERATIONAL_CAPABILITIES as u, getLocalScheduleDate as un, parseDatedOfferingCapacityHoldId as ur, parsePublicContactDetails as ut, areConfiguredBookingVerticalConfigsEqual as v, resolveBookingTimeZoneId as vn, unsafeAsOriginalFilename as vr, EVENT_ADDRESS_AFTER_BOOKING_LABEL as vt, EVENT_PRESET_VALUES as w, formatEventPricing as wn, unsafeAsStoragePath as wr, toLocationCoordinates as wt, parseVerticalPresetId as x, parsePageSurfaceSubject as xn, unsafeAsSafeDownloadFilename as xr, parseLocationValue as xt, canonicalizeConfiguredBookingVerticalConfig as y, toBookingTimeZone as yn, unsafeAsPositiveByteCount as yr, locationValueSchema as yt, resolveWholeSeriesBookingPhase as z, toCents as zn, unsafeAsSiteId as zr, splitAmountWithRemainderInFirst 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-CdBZDquG.mjs";
|
|
3
|
+
import "./src-CnUjAAn9.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-C75BmINB.mjs";
|
|
5
|
+
import "./load-config-BQtsKco-.mjs";
|
|
6
6
|
|
|
7
7
|
export { applyPushConfigPlan, calculateEntryDiffs, compileEntryPushCommands, createOutput, executeEntryCommandPlanAsSyncResult, preparePushConfigTarget, readEntries, syncLocalMediaForPull, syncLocalMediaForPush, writeMediaManifest };
|
package/package.json
CHANGED