riverbankcms 0.31.0 → 0.31.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 +10732 -6116
- package/dist/{entryCommands-gu5RjKp2.mjs → entryCommands-BnfJSvqs.mjs} +1100 -397
- package/dist/eventUpsertInputSchema-NGbAnXH1.mjs +108 -0
- package/dist/load-config-B-bx73AK.mjs +4 -0
- package/dist/{load-config-D32BDh2g.mjs → load-config-CMeJVHDQ.mjs} +2 -2
- package/dist/{plan-DajnV46R.mjs → plan-CiwCwXPF.mjs} +1 -1
- package/dist/scaffold/index.mjs +2 -2
- package/dist/sdk-event-upsert-BMYgDeSe.mjs +35556 -0
- package/dist/{src-CevC_tvx.mjs → src-BXMUcFYN.mjs} +510 -86
- package/dist/testing.mjs +4 -4
- package/package.json +1 -1
- package/dist/eventUpsertInputSchema-DoD-B321.mjs +0 -4646
- package/dist/load-config-C2eEZ3Kj.mjs +0 -4
- package/dist/sdk-event-upsert-BC_MyWOx.mjs +0 -15673
|
@@ -68,6 +68,7 @@ const parseRetiredCourseId = (value) => parseUuidBrand(value, asRetiredCourseId)
|
|
|
68
68
|
const parseAttendeeId = (value) => parseUuidBrand(value, unsafeAsAttendeeId);
|
|
69
69
|
const parseEventRegistrationCommandId = (value) => parseUuidBrand(value, unsafeAsEventRegistrationCommandId);
|
|
70
70
|
const parseEventRegistrationCommandRowId = (value) => parseUuidBrand(value, unsafeAsEventRegistrationCommandRowId);
|
|
71
|
+
const parseEventCategoryId = (value) => parseUuidBrand(value, unsafeAsEventCategoryId);
|
|
71
72
|
const parseEventSeriesId = (value) => parseUuidBrand(value, unsafeAsEventSeriesId);
|
|
72
73
|
const parseEventSeriesRegistrationId = (value) => parseUuidBrand(value, unsafeAsEventSeriesRegistrationId);
|
|
73
74
|
|
|
@@ -160,7 +161,6 @@ const unsafeAsDatedOfferingCapacityHoldAuditRef = (value) => value;
|
|
|
160
161
|
const unsafeAsDatedOfferingRevocationAuditEventId = (value) => value;
|
|
161
162
|
const unsafeAsDatedOfferingWaitlistCapacityEffectId = (value) => value;
|
|
162
163
|
const unsafeAsDatedOfferingWaitlistCapacityEffectClaimToken = (value) => value;
|
|
163
|
-
const unsafeAsDatedOfferingRunCancellationOperationId = (value) => value;
|
|
164
164
|
const unsafeAsWaitlistEntryId = (id) => id;
|
|
165
165
|
const unsafeAsWaitlistHoldId = (id) => id;
|
|
166
166
|
const parseDatedOfferingCapacityHoldId = (value) => parseUuidBrand(value, unsafeAsDatedOfferingCapacityHoldId);
|
|
@@ -168,7 +168,6 @@ const parseDatedOfferingCapacityHoldAuditRef = (value) => parseUuidBrand(value,
|
|
|
168
168
|
const parseDatedOfferingRevocationAuditEventId = (value) => parseUuidBrand(value, unsafeAsDatedOfferingRevocationAuditEventId);
|
|
169
169
|
const parseDatedOfferingWaitlistCapacityEffectId = (value) => parseUuidBrand(value, unsafeAsDatedOfferingWaitlistCapacityEffectId);
|
|
170
170
|
const parseDatedOfferingWaitlistCapacityEffectClaimToken = (value) => parseUuidBrand(value, unsafeAsDatedOfferingWaitlistCapacityEffectClaimToken);
|
|
171
|
-
const parseDatedOfferingRunCancellationOperationId = (value) => parseUuidBrand(value, unsafeAsDatedOfferingRunCancellationOperationId);
|
|
172
171
|
|
|
173
172
|
//#endregion
|
|
174
173
|
//#region ../core/src/branded/entitlements.ts
|
|
@@ -204,15 +203,13 @@ const parseSiteTermsAgreementId = (value) => parseUuidBrand(value, unsafeAsSiteT
|
|
|
204
203
|
const unsafeAsAppointmentId = (id) => id;
|
|
205
204
|
const unsafeAsAppointmentServiceId = (id) => id;
|
|
206
205
|
const unsafeAsAppointmentResourceId = (id) => id;
|
|
207
|
-
const unsafeAsAppointmentReservationId = (id) => id;
|
|
208
|
-
const unsafeAsAppointmentReservationRunId = (id) => id;
|
|
209
206
|
const unsafeAsAppointmentPaymentRequestId = (id) => id;
|
|
210
207
|
const unsafeAsStaffMemberId = (id) => id;
|
|
211
208
|
const parseAppointmentId = (value) => parseUuidBrand(value, unsafeAsAppointmentId);
|
|
212
209
|
const parseAppointmentServiceId = (value) => parseUuidBrand(value, unsafeAsAppointmentServiceId);
|
|
213
210
|
const parseAppointmentResourceId = (value) => parseUuidBrand(value, unsafeAsAppointmentResourceId);
|
|
214
|
-
const
|
|
215
|
-
const
|
|
211
|
+
const unsafeAsClientArrangementId = (id) => id;
|
|
212
|
+
const parseClientArrangementId = (value) => parseUuidBrand(value, unsafeAsClientArrangementId);
|
|
216
213
|
|
|
217
214
|
//#endregion
|
|
218
215
|
//#region ../core/src/branded/calendar.ts
|
|
@@ -1388,8 +1385,8 @@ function formatBookingPriceDisplay(display, options = {}) {
|
|
|
1388
1385
|
case "free": return "Free";
|
|
1389
1386
|
case "exact": return formatCurrencyAmount(display.amount, display.currency, options);
|
|
1390
1387
|
case "from": return `From ${formatCurrencyAmount(display.amount, display.currency, options)}`;
|
|
1391
|
-
case "range": return `${formatCurrencyAmount(display.minAmount, display.currency, options)}
|
|
1392
|
-
case "mixed": return display.paidToAmount > display.paidFromAmount ? `Free / ${formatCurrencyAmount(display.paidFromAmount, display.currency, options)}
|
|
1388
|
+
case "range": return `${formatCurrencyAmount(display.minAmount, display.currency, options)}–${formatCurrencyAmount(display.maxAmount, display.currency, options)}`;
|
|
1389
|
+
case "mixed": return display.paidToAmount > display.paidFromAmount ? `Free / ${formatCurrencyAmount(display.paidFromAmount, display.currency, options)}–${formatCurrencyAmount(display.paidToAmount, display.currency, options)}` : `Free / ${formatCurrencyAmount(display.paidFromAmount, display.currency, options)}`;
|
|
1393
1390
|
case "unavailable": return "Pricing unavailable";
|
|
1394
1391
|
case "external": return display.label;
|
|
1395
1392
|
default: return assertNever(display);
|
|
@@ -1400,6 +1397,46 @@ function formatEventPricing(pricing, options = {}) {
|
|
|
1400
1397
|
return formatBookingPriceDisplay(publicEventPricingDisplay(pricing), options);
|
|
1401
1398
|
}
|
|
1402
1399
|
|
|
1400
|
+
//#endregion
|
|
1401
|
+
//#region ../core/src/event-preset-vocabulary.ts
|
|
1402
|
+
const EVENT_PRESET_VOCABULARY = {
|
|
1403
|
+
event: {
|
|
1404
|
+
label: "Event",
|
|
1405
|
+
pluralLabel: "Events",
|
|
1406
|
+
description: "Any event, repeating or manually dated, that does not fit the other categories."
|
|
1407
|
+
},
|
|
1408
|
+
class: {
|
|
1409
|
+
label: "Class",
|
|
1410
|
+
pluralLabel: "Classes",
|
|
1411
|
+
description: "Regular scheduled classes and group sessions."
|
|
1412
|
+
},
|
|
1413
|
+
course: {
|
|
1414
|
+
label: "Course",
|
|
1415
|
+
pluralLabel: "Courses",
|
|
1416
|
+
description: "A fixed set of dates that people book together."
|
|
1417
|
+
},
|
|
1418
|
+
term: {
|
|
1419
|
+
label: "Term",
|
|
1420
|
+
pluralLabel: "Terms",
|
|
1421
|
+
description: "A fixed term of sessions that people book together."
|
|
1422
|
+
},
|
|
1423
|
+
workshop: {
|
|
1424
|
+
label: "Workshop",
|
|
1425
|
+
pluralLabel: "Workshops",
|
|
1426
|
+
description: "One-off workshops, day sessions, or special events."
|
|
1427
|
+
},
|
|
1428
|
+
retreat: {
|
|
1429
|
+
label: "Retreat",
|
|
1430
|
+
pluralLabel: "Retreats",
|
|
1431
|
+
description: "Multi-day or residential immersive experiences."
|
|
1432
|
+
},
|
|
1433
|
+
performance: {
|
|
1434
|
+
label: "Performance",
|
|
1435
|
+
pluralLabel: "Performances",
|
|
1436
|
+
description: "Audience-facing shows, concerts, recitals, or showcases."
|
|
1437
|
+
}
|
|
1438
|
+
};
|
|
1439
|
+
|
|
1403
1440
|
//#endregion
|
|
1404
1441
|
//#region ../core/src/event-page-surface-subject.ts
|
|
1405
1442
|
function createEventSeriesPageSurfaceSubject(eventSeriesId, bookingScope, eventDestinationMode) {
|
|
@@ -1526,6 +1563,83 @@ function parseEventSeriesIdList(values) {
|
|
|
1526
1563
|
function isRecord$10(value) {
|
|
1527
1564
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1528
1565
|
}
|
|
1566
|
+
/**
|
|
1567
|
+
* The offering-kind label a page surface's subject settles on its own, such as
|
|
1568
|
+
* "Course" for a whole-series run's page. Uses the platform vocabulary that
|
|
1569
|
+
* lists and the booking flow use. An ordinary series or an offering page
|
|
1570
|
+
* doesn't say which preset it belongs to, so it has no label here and the
|
|
1571
|
+
* template's own default stands.
|
|
1572
|
+
*/
|
|
1573
|
+
function offeringLabelForPageSurfaceSubject(subject) {
|
|
1574
|
+
if (subject?.kind !== "eventSeries") return null;
|
|
1575
|
+
return subject.bookingScope === "whole_series" ? EVENT_PRESET_VOCABULARY.course.label : null;
|
|
1576
|
+
}
|
|
1577
|
+
|
|
1578
|
+
//#endregion
|
|
1579
|
+
//#region ../core/src/page-surface-subject.ts
|
|
1580
|
+
function parsePageSurfaceSubjectRef(row) {
|
|
1581
|
+
switch (row.subjectType) {
|
|
1582
|
+
case "event_series": {
|
|
1583
|
+
const id = parseEventSeriesId(row.subjectId);
|
|
1584
|
+
return id.ok ? ok({
|
|
1585
|
+
type: row.subjectType,
|
|
1586
|
+
eventSeriesId: id.value
|
|
1587
|
+
}) : err({
|
|
1588
|
+
kind: "invalidSubjectId",
|
|
1589
|
+
error: id.error
|
|
1590
|
+
});
|
|
1591
|
+
}
|
|
1592
|
+
case "event_offering": {
|
|
1593
|
+
const id = parseEventOfferingId(row.subjectId);
|
|
1594
|
+
return id.ok ? ok({
|
|
1595
|
+
type: row.subjectType,
|
|
1596
|
+
eventOfferingId: id.value
|
|
1597
|
+
}) : err({
|
|
1598
|
+
kind: "invalidSubjectId",
|
|
1599
|
+
error: id.error
|
|
1600
|
+
});
|
|
1601
|
+
}
|
|
1602
|
+
case "appointment_service": {
|
|
1603
|
+
const id = parseAppointmentServiceId(row.subjectId);
|
|
1604
|
+
return id.ok ? ok({
|
|
1605
|
+
type: row.subjectType,
|
|
1606
|
+
appointmentServiceId: id.value
|
|
1607
|
+
}) : err({
|
|
1608
|
+
kind: "invalidSubjectId",
|
|
1609
|
+
error: id.error
|
|
1610
|
+
});
|
|
1611
|
+
}
|
|
1612
|
+
default: return err({
|
|
1613
|
+
kind: "unsupportedSubject",
|
|
1614
|
+
subjectType: row.subjectType
|
|
1615
|
+
});
|
|
1616
|
+
}
|
|
1617
|
+
}
|
|
1618
|
+
function parsePageSurfaceSubject(value) {
|
|
1619
|
+
if (typeof value !== "object" || value === null || !("kind" in value) || value.kind !== "appointmentService") {
|
|
1620
|
+
return parseEventPageSurfaceSubject(value);
|
|
1621
|
+
}
|
|
1622
|
+
const id = parseAppointmentServiceId("appointmentServiceId" in value ? value.appointmentServiceId : undefined);
|
|
1623
|
+
if (!id.ok) return err({
|
|
1624
|
+
kind: "invalidAppointmentServiceId",
|
|
1625
|
+
error: id.error
|
|
1626
|
+
});
|
|
1627
|
+
return ok({
|
|
1628
|
+
kind: "appointmentService",
|
|
1629
|
+
appointmentServiceId: id.value,
|
|
1630
|
+
...servicePageDestination(value),
|
|
1631
|
+
..."noindex" in value && value.noindex === true ? { noindex: true } : {}
|
|
1632
|
+
});
|
|
1633
|
+
}
|
|
1634
|
+
/** Parse the renderer choice once at the wire boundary. */
|
|
1635
|
+
function servicePageDestination(value) {
|
|
1636
|
+
if (!("serviceDestinationMode" in value)) return {};
|
|
1637
|
+
const mode = value.serviceDestinationMode;
|
|
1638
|
+
return mode === "cms-managed" || mode === "system-managed" ? { serviceDestinationMode: mode } : {};
|
|
1639
|
+
}
|
|
1640
|
+
function toPageSurfaceSubjectWire(subject) {
|
|
1641
|
+
return subject;
|
|
1642
|
+
}
|
|
1529
1643
|
|
|
1530
1644
|
//#endregion
|
|
1531
1645
|
//#region ../core/src/ticket-quantity.ts
|
|
@@ -6478,6 +6592,10 @@ function setFooterSectionSelected(composition, sectionId, selected) {
|
|
|
6478
6592
|
} : section)
|
|
6479
6593
|
});
|
|
6480
6594
|
}
|
|
6595
|
+
function isFooterMenuShown(composition, location) {
|
|
6596
|
+
const kind = location === "footer" ? "navigation" : "legal-navigation";
|
|
6597
|
+
return composition.sections.some((section) => section.kind === kind && section.selected);
|
|
6598
|
+
}
|
|
6481
6599
|
function parseFooterEngagementSection(value) {
|
|
6482
6600
|
const parsed = parseFooterSection(value, 0);
|
|
6483
6601
|
if (!parsed.ok) return parsed;
|
|
@@ -6590,7 +6708,7 @@ const defaultSections = (legacy, options) => {
|
|
|
6590
6708
|
id: unsafeAsFooterModuleId("legal-navigation"),
|
|
6591
6709
|
kind: "legal-navigation",
|
|
6592
6710
|
heading: null,
|
|
6593
|
-
selected:
|
|
6711
|
+
selected: footerVisible,
|
|
6594
6712
|
source: {
|
|
6595
6713
|
kind: "menu-role",
|
|
6596
6714
|
role: "legal-policy"
|
|
@@ -7492,6 +7610,12 @@ function toMailingListPublicSignupResponse(result) {
|
|
|
7492
7610
|
if (result.error.tag === "subscriber_suppressed") {
|
|
7493
7611
|
return { tag: "confirmation_required" };
|
|
7494
7612
|
}
|
|
7613
|
+
if (result.error.tag === "ip_blocked") {
|
|
7614
|
+
return {
|
|
7615
|
+
tag: "unavailable",
|
|
7616
|
+
reason: "authentication_failed"
|
|
7617
|
+
};
|
|
7618
|
+
}
|
|
7495
7619
|
return result.error.tag === "uncertain" ? {
|
|
7496
7620
|
tag: "uncertain",
|
|
7497
7621
|
reason: result.error.reason
|
|
@@ -8187,6 +8311,16 @@ function generateUuidV4(cryptoSource = globalThis.crypto) {
|
|
|
8187
8311
|
const hex = Array.from(bytes, (byte) => byte.toString(16).padStart(2, "0"));
|
|
8188
8312
|
return `${hex.slice(0, 4).join("")}-${hex.slice(4, 6).join("")}-${hex.slice(6, 8).join("")}-${hex.slice(8, 10).join("")}-${hex.slice(10).join("")}`;
|
|
8189
8313
|
}
|
|
8314
|
+
/** RFC 9562 UUIDv5: namespace UUID bytes followed by the UTF-8 name, hashed with SHA-1. */
|
|
8315
|
+
async function generateUuidV5(namespace, name) {
|
|
8316
|
+
const hex = namespace.replace(/-/g, "");
|
|
8317
|
+
const namespaceBytes = Array.from({ length: 16 }, (_, index) => Number.parseInt(hex.slice(index * 2, index * 2 + 2), 16));
|
|
8318
|
+
const input = Uint8Array.from([...namespaceBytes, ...new TextEncoder().encode(name)]);
|
|
8319
|
+
const digest = new Uint8Array(await crypto.subtle.digest("SHA-1", input));
|
|
8320
|
+
const bytes = Array.from(digest.slice(0, 16), (byte, index) => index === 6 ? byte & 15 | 80 : index === 8 ? byte & 63 | 128 : byte);
|
|
8321
|
+
const result = bytes.map((byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
8322
|
+
return `${result.slice(0, 8)}-${result.slice(8, 12)}-${result.slice(12, 16)}-${result.slice(16, 20)}-${result.slice(20)}`;
|
|
8323
|
+
}
|
|
8190
8324
|
|
|
8191
8325
|
//#endregion
|
|
8192
8326
|
//#region ../core/src/secret.ts
|
|
@@ -8268,8 +8402,7 @@ function failInvalidSecret() {
|
|
|
8268
8402
|
const SITE_ROUTE_NODE_TYPES = [
|
|
8269
8403
|
"page",
|
|
8270
8404
|
"content_entry",
|
|
8271
|
-
"page_surface"
|
|
8272
|
-
"appointment_service"
|
|
8405
|
+
"page_surface"
|
|
8273
8406
|
];
|
|
8274
8407
|
function parseSiteRouteTarget(input) {
|
|
8275
8408
|
if (typeof input.nodeType !== "string") {
|
|
@@ -8309,16 +8442,6 @@ function parseSiteRouteTarget(input) {
|
|
|
8309
8442
|
error: surfaceId.error
|
|
8310
8443
|
});
|
|
8311
8444
|
}
|
|
8312
|
-
case "appointment_service": {
|
|
8313
|
-
const serviceId = parseAppointmentServiceId(input.nodeId);
|
|
8314
|
-
return serviceId.ok ? ok({
|
|
8315
|
-
kind: "appointmentService",
|
|
8316
|
-
serviceId: serviceId.value
|
|
8317
|
-
}) : err({
|
|
8318
|
-
kind: "invalid-appointment-service-id",
|
|
8319
|
-
error: serviceId.error
|
|
8320
|
-
});
|
|
8321
|
-
}
|
|
8322
8445
|
default: return err({
|
|
8323
8446
|
kind: "unsupported-node-type",
|
|
8324
8447
|
nodeType: input.nodeType
|
|
@@ -8330,7 +8453,6 @@ function siteRouteTargetNodeType(target) {
|
|
|
8330
8453
|
case "page": return "page";
|
|
8331
8454
|
case "contentEntry": return "content_entry";
|
|
8332
8455
|
case "pageSurface": return "page_surface";
|
|
8333
|
-
case "appointmentService": return "appointment_service";
|
|
8334
8456
|
default: return assertNever(target);
|
|
8335
8457
|
}
|
|
8336
8458
|
}
|
|
@@ -8339,7 +8461,6 @@ function foldSiteRouteTarget(target, cases) {
|
|
|
8339
8461
|
case "page": return cases.page(target.pageId);
|
|
8340
8462
|
case "contentEntry": return cases.contentEntry(target.entryId);
|
|
8341
8463
|
case "pageSurface": return cases.pageSurface(target.surfaceId);
|
|
8342
|
-
case "appointmentService": return cases.appointmentService(target.serviceId);
|
|
8343
8464
|
default: return assertNever(target);
|
|
8344
8465
|
}
|
|
8345
8466
|
}
|
|
@@ -8463,9 +8584,10 @@ function resolveWholeSeriesPaymentDates(input) {
|
|
|
8463
8584
|
//#region ../core/src/public-read-cache-contract.ts
|
|
8464
8585
|
const PUBLIC_AVAILABILITY_FRESHNESS_SECONDS = 60;
|
|
8465
8586
|
const PUBLIC_CONTENT_FRESHNESS_SECONDS = 3600;
|
|
8466
|
-
function availability(transport) {
|
|
8587
|
+
function availability(fetchTags, transport) {
|
|
8467
8588
|
return {
|
|
8468
8589
|
kind: "live",
|
|
8590
|
+
fetchTags,
|
|
8469
8591
|
reason: "booking_correctness",
|
|
8470
8592
|
freshness: "availability",
|
|
8471
8593
|
transport
|
|
@@ -8474,6 +8596,7 @@ function availability(transport) {
|
|
|
8474
8596
|
function content(tags, transport = "direct") {
|
|
8475
8597
|
return {
|
|
8476
8598
|
kind: "tagged",
|
|
8599
|
+
fetchTags: tags,
|
|
8477
8600
|
tags,
|
|
8478
8601
|
freshness: "content",
|
|
8479
8602
|
transport
|
|
@@ -8483,23 +8606,28 @@ function content(tags, transport = "direct") {
|
|
|
8483
8606
|
const PUBLIC_READ_CACHE_POLICIES = {
|
|
8484
8607
|
listPublishedEntries: content(["published_content"]),
|
|
8485
8608
|
getPublishedEntryPreview: content(["published_content"]),
|
|
8486
|
-
listPublicEvents: availability("direct"),
|
|
8487
|
-
listPublicEventCalendarWindow: availability("direct"),
|
|
8488
|
-
listPublicRecurringSchedule: availability("batch_only"),
|
|
8489
|
-
getPublicEventDetails: availability(
|
|
8490
|
-
|
|
8609
|
+
listPublicEvents: availability(["public_events", "public_event_filters"], "direct"),
|
|
8610
|
+
listPublicEventCalendarWindow: availability(["public_events", "public_event_filters"], "direct"),
|
|
8611
|
+
listPublicRecurringSchedule: availability(["public_events", "public_event_filters"], "batch_only"),
|
|
8612
|
+
getPublicEventDetails: availability([
|
|
8613
|
+
"public_events",
|
|
8614
|
+
"public_event_filters",
|
|
8615
|
+
"public_passes",
|
|
8616
|
+
"public_memberships"
|
|
8617
|
+
], "batch_only"),
|
|
8618
|
+
resolveEventSubroute: availability(["public_events", "public_event_filters"], "direct"),
|
|
8491
8619
|
listPublicRouteCandidates: content(["published_content"], "batch_only"),
|
|
8492
8620
|
listPublicTeamMembers: content(["public_team_members"]),
|
|
8493
|
-
listPublicProducts: availability("direct"),
|
|
8494
|
-
listPublicPasses: availability("direct"),
|
|
8495
|
-
listPublicMemberships: availability("direct"),
|
|
8621
|
+
listPublicProducts: availability(["public_products"], "direct"),
|
|
8622
|
+
listPublicPasses: availability(["public_passes"], "direct"),
|
|
8623
|
+
listPublicMemberships: availability(["public_memberships"], "direct"),
|
|
8496
8624
|
getPublicFormById: content(["site_forms"]),
|
|
8497
|
-
getPublicBookingServices: availability("direct"),
|
|
8498
|
-
getPublicBookingService: availability("direct"),
|
|
8499
|
-
getPublicBookingResourcesReference: availability("direct"),
|
|
8500
|
-
getPublicBookingAvailableDates: availability("direct"),
|
|
8501
|
-
getPublicBookingAvailableSlots: availability("direct"),
|
|
8502
|
-
getPublicWeeklySlotAvailability: availability("direct"),
|
|
8625
|
+
getPublicBookingServices: availability(["public_booking_services"], "direct"),
|
|
8626
|
+
getPublicBookingService: availability(["public_booking_services"], "direct"),
|
|
8627
|
+
getPublicBookingResourcesReference: availability(["public_booking_services"], "direct"),
|
|
8628
|
+
getPublicBookingAvailableDates: availability(["public_booking_services", "public_booking_availability"], "direct"),
|
|
8629
|
+
getPublicBookingAvailableSlots: availability(["public_booking_services", "public_booking_availability"], "direct"),
|
|
8630
|
+
getPublicWeeklySlotAvailability: availability(["public_booking_services", "public_booking_availability"], "direct"),
|
|
8503
8631
|
listPublicForms: content(["site_forms"]),
|
|
8504
8632
|
checkRedirect: content([]),
|
|
8505
8633
|
getPublicRoutableContent: content(["published_content"]),
|
|
@@ -8680,6 +8808,11 @@ const VERTICAL_DEFINITIONS = [
|
|
|
8680
8808
|
label: "Theatre or performing arts school",
|
|
8681
8809
|
description: "Classes, terms, workshops, performances, and lessons."
|
|
8682
8810
|
},
|
|
8811
|
+
{
|
|
8812
|
+
id: "arts_crafts",
|
|
8813
|
+
label: "Arts and crafts",
|
|
8814
|
+
description: "Pottery, painting, printmaking and making classes, courses and workshops."
|
|
8815
|
+
},
|
|
8683
8816
|
{
|
|
8684
8817
|
id: "community_wellbeing",
|
|
8685
8818
|
label: "Community or wellbeing centre",
|
|
@@ -8764,6 +8897,10 @@ const VERTICAL_BOOKING_PRESETS = [
|
|
|
8764
8897
|
verticalBookingPreset("performing_arts_school.workshops", "performing_arts_school", "workshop", "Workshop", "Workshops", "One-off workshops, masterclasses, or intensives."),
|
|
8765
8898
|
verticalBookingPreset("performing_arts_school.performances", "performing_arts_school", "performance", "Performance", "Performances", "Shows, showcases, productions, or ticketed performances."),
|
|
8766
8899
|
verticalBookingPreset("performing_arts_school.lessons", "performing_arts_school", "appointment", "Lesson", "Lessons", "One-to-one lessons, coaching, or audition prep."),
|
|
8900
|
+
verticalBookingPreset("arts_crafts.classes", "arts_crafts", "class", "Class", "Classes", "Regular weekly classes and open studio sessions."),
|
|
8901
|
+
verticalBookingPreset("arts_crafts.courses", "arts_crafts", "course", "Course", "Courses", "Multi-week courses that build a skill from the start."),
|
|
8902
|
+
verticalBookingPreset("arts_crafts.workshops", "arts_crafts", "workshop", "Workshop", "Workshops", "One-off workshops, taster sessions and make-and-take days."),
|
|
8903
|
+
verticalBookingPreset("arts_crafts.private_sessions", "arts_crafts", "appointment", "Private session", "Private sessions", "One-to-one tuition or small private group sessions."),
|
|
8767
8904
|
verticalBookingPreset("community_wellbeing.classes", "community_wellbeing", "class", "Class", "Classes", "Regular groups, sessions, practices, or weekly activities."),
|
|
8768
8905
|
verticalBookingPreset("community_wellbeing.workshops", "community_wellbeing", "workshop", "Workshop", "Workshops", "One-off workshops, talks, events, or gatherings."),
|
|
8769
8906
|
verticalBookingPreset("community_wellbeing.courses", "community_wellbeing", "course", "Course", "Courses", "Fixed-schedule courses, study groups, or multi-session programmes."),
|
|
@@ -8778,6 +8915,7 @@ const DEFAULT_ONBOARDING_PRESET_ID_BY_VERTICAL = {
|
|
|
8778
8915
|
yoga_wellness: null,
|
|
8779
8916
|
fitness_pt: null,
|
|
8780
8917
|
dance_school: null,
|
|
8918
|
+
arts_crafts: null,
|
|
8781
8919
|
physiotherapy_physical_health: "physiotherapy_physical_health.appointments",
|
|
8782
8920
|
massage_bodywork: "massage_bodywork.treatments",
|
|
8783
8921
|
therapist_practitioner: null,
|
|
@@ -9209,7 +9347,7 @@ const NAVIGATION_LOCATION_DESCRIPTORS = {
|
|
|
9209
9347
|
legal: {
|
|
9210
9348
|
location: "legal",
|
|
9211
9349
|
label: "Legal links",
|
|
9212
|
-
description: "Smaller footer
|
|
9350
|
+
description: "Smaller links at the bottom of your footer, for privacy, terms and other policies."
|
|
9213
9351
|
}
|
|
9214
9352
|
};
|
|
9215
9353
|
function isNavigationLocation(value) {
|
|
@@ -9257,46 +9395,6 @@ const PORTAL_NAV_DEFAULT_LABELS = {
|
|
|
9257
9395
|
loggedIn: "My account"
|
|
9258
9396
|
};
|
|
9259
9397
|
|
|
9260
|
-
//#endregion
|
|
9261
|
-
//#region ../core/src/event-preset-vocabulary.ts
|
|
9262
|
-
const EVENT_PRESET_VOCABULARY = {
|
|
9263
|
-
event: {
|
|
9264
|
-
label: "Event",
|
|
9265
|
-
pluralLabel: "Events",
|
|
9266
|
-
description: "Any event, repeating or manually dated, that does not fit the other categories."
|
|
9267
|
-
},
|
|
9268
|
-
class: {
|
|
9269
|
-
label: "Class",
|
|
9270
|
-
pluralLabel: "Classes",
|
|
9271
|
-
description: "Regular scheduled classes and group sessions."
|
|
9272
|
-
},
|
|
9273
|
-
course: {
|
|
9274
|
-
label: "Course",
|
|
9275
|
-
pluralLabel: "Courses",
|
|
9276
|
-
description: "A fixed set of dates that people book together."
|
|
9277
|
-
},
|
|
9278
|
-
term: {
|
|
9279
|
-
label: "Term",
|
|
9280
|
-
pluralLabel: "Terms",
|
|
9281
|
-
description: "A fixed term of sessions that people book together."
|
|
9282
|
-
},
|
|
9283
|
-
workshop: {
|
|
9284
|
-
label: "Workshop",
|
|
9285
|
-
pluralLabel: "Workshops",
|
|
9286
|
-
description: "One-off workshops, day sessions, or special events."
|
|
9287
|
-
},
|
|
9288
|
-
retreat: {
|
|
9289
|
-
label: "Retreat",
|
|
9290
|
-
pluralLabel: "Retreats",
|
|
9291
|
-
description: "Multi-day or residential immersive experiences."
|
|
9292
|
-
},
|
|
9293
|
-
performance: {
|
|
9294
|
-
label: "Performance",
|
|
9295
|
-
pluralLabel: "Performances",
|
|
9296
|
-
description: "Audience-facing shows, concerts, recitals, or showcases."
|
|
9297
|
-
}
|
|
9298
|
-
};
|
|
9299
|
-
|
|
9300
9398
|
//#endregion
|
|
9301
9399
|
//#region ../core/src/event-catalogue.ts
|
|
9302
9400
|
/** Accepts validated settings; defaults and raw configuration parsing belong to the caller. */
|
|
@@ -9332,6 +9430,211 @@ function eventCatalogueChoices(catalogue) {
|
|
|
9332
9430
|
}];
|
|
9333
9431
|
}
|
|
9334
9432
|
|
|
9433
|
+
//#endregion
|
|
9434
|
+
//#region ../core/src/business-vocabulary.ts
|
|
9435
|
+
const person = (singular, plural) => ({
|
|
9436
|
+
singular,
|
|
9437
|
+
plural
|
|
9438
|
+
});
|
|
9439
|
+
const GENERIC_BUSINESS_VOCABULARY = {
|
|
9440
|
+
person: person("practitioner", "practitioners"),
|
|
9441
|
+
offeringsExample: "weekly classes, one-to-one sessions and the occasional workshop"
|
|
9442
|
+
};
|
|
9443
|
+
const BUSINESS_VOCABULARY_BY_VERTICAL = {
|
|
9444
|
+
yoga_wellness: {
|
|
9445
|
+
person: person("teacher", "teachers"),
|
|
9446
|
+
offeringsExample: "weekly yoga classes, a beginners' course and the occasional retreat"
|
|
9447
|
+
},
|
|
9448
|
+
fitness_pt: {
|
|
9449
|
+
person: person("trainer", "trainers"),
|
|
9450
|
+
offeringsExample: "one-to-one personal training, small-group strength classes and six-week programmes"
|
|
9451
|
+
},
|
|
9452
|
+
dance_school: {
|
|
9453
|
+
person: person("teacher", "teachers"),
|
|
9454
|
+
offeringsExample: "weekly ballet and tap classes, holiday workshops and private lessons"
|
|
9455
|
+
},
|
|
9456
|
+
physiotherapy_physical_health: {
|
|
9457
|
+
person: person("practitioner", "practitioners"),
|
|
9458
|
+
offeringsExample: "assessments, follow-up treatments and a weekly back-care class"
|
|
9459
|
+
},
|
|
9460
|
+
massage_bodywork: {
|
|
9461
|
+
person: person("therapist", "therapists"),
|
|
9462
|
+
offeringsExample: "sports and deep tissue massage, and the occasional workshop"
|
|
9463
|
+
},
|
|
9464
|
+
therapist_practitioner: {
|
|
9465
|
+
person: person("practitioner", "practitioners"),
|
|
9466
|
+
offeringsExample: "one-to-one sessions, first consultations and a monthly group"
|
|
9467
|
+
},
|
|
9468
|
+
beauty_spa: {
|
|
9469
|
+
person: person("therapist", "therapists"),
|
|
9470
|
+
offeringsExample: "facials, massage and seasonal spa days"
|
|
9471
|
+
},
|
|
9472
|
+
consultant_coach: {
|
|
9473
|
+
person: person("coach", "coaches"),
|
|
9474
|
+
offeringsExample: "one-to-one coaching calls, half-day workshops and a group programme"
|
|
9475
|
+
},
|
|
9476
|
+
training_provider: {
|
|
9477
|
+
person: person("trainer", "trainers"),
|
|
9478
|
+
offeringsExample: "first aid courses, refresher days and on-site training"
|
|
9479
|
+
},
|
|
9480
|
+
retreat_centre: {
|
|
9481
|
+
person: person("facilitator", "facilitators"),
|
|
9482
|
+
offeringsExample: "weekend retreats, day workshops and drop-in classes"
|
|
9483
|
+
},
|
|
9484
|
+
music_school: {
|
|
9485
|
+
person: person("teacher", "teachers"),
|
|
9486
|
+
offeringsExample: "piano and guitar lessons, group classes and end-of-term concerts"
|
|
9487
|
+
},
|
|
9488
|
+
voice_singing: {
|
|
9489
|
+
person: person("teacher", "teachers"),
|
|
9490
|
+
offeringsExample: "a weekly community choir, one-to-one singing lessons and workshops"
|
|
9491
|
+
},
|
|
9492
|
+
performing_arts_school: {
|
|
9493
|
+
person: person("teacher", "teachers"),
|
|
9494
|
+
offeringsExample: "weekly drama classes, holiday workshops and an end-of-term show"
|
|
9495
|
+
},
|
|
9496
|
+
arts_crafts: {
|
|
9497
|
+
person: person("tutor", "tutors"),
|
|
9498
|
+
offeringsExample: "a weekly wheel-throwing class, a six-week printmaking course and Saturday taster workshops"
|
|
9499
|
+
},
|
|
9500
|
+
community_wellbeing: {
|
|
9501
|
+
person: person("facilitator", "facilitators"),
|
|
9502
|
+
offeringsExample: "a weekly walking group, wellbeing workshops and drop-in support sessions"
|
|
9503
|
+
},
|
|
9504
|
+
venue_event_space: {
|
|
9505
|
+
person: null,
|
|
9506
|
+
offeringsExample: "room hire, community events and regular classes run by local teachers"
|
|
9507
|
+
}
|
|
9508
|
+
};
|
|
9509
|
+
/** A site with no business type set gets the generic vocabulary. */
|
|
9510
|
+
function resolveBusinessVocabulary(verticalId) {
|
|
9511
|
+
return verticalId ? BUSINESS_VOCABULARY_BY_VERTICAL[verticalId] : GENERIC_BUSINESS_VOCABULARY;
|
|
9512
|
+
}
|
|
9513
|
+
/** "Our trainers", or "The team" where nobody leads sessions or the type is unknown. */
|
|
9514
|
+
function businessTeamPageTitle(verticalId) {
|
|
9515
|
+
const people = verticalId ? BUSINESS_VOCABULARY_BY_VERTICAL[verticalId].person : null;
|
|
9516
|
+
return people === null ? "The team" : `Our ${people.plural}`;
|
|
9517
|
+
}
|
|
9518
|
+
/**
|
|
9519
|
+
* Example names for an offering, by business preset, written as
|
|
9520
|
+
* "e.g., First, Second". Presets without one fall back to their caller's
|
|
9521
|
+
* generic example.
|
|
9522
|
+
*/
|
|
9523
|
+
const TITLE_EXAMPLE_BY_PRESET = {
|
|
9524
|
+
"yoga_wellness.classes": "e.g., Tuesday Evening Flow, Beginners Yoga",
|
|
9525
|
+
"fitness_pt.group_training": "e.g., Tuesday Strength Club, Saturday HIIT",
|
|
9526
|
+
"fitness_pt.personal_training": "e.g., Personal Training Session, Movement Assessment",
|
|
9527
|
+
"fitness_pt.programmes": "e.g., 6-Week Strength Programme, Couch to 5K",
|
|
9528
|
+
"fitness_pt.workshops": "e.g., Kettlebell Foundations, Mobility Workshop",
|
|
9529
|
+
"fitness_pt.retreats": "e.g., Peak Fitness Weekend, Strength and Recovery Retreat",
|
|
9530
|
+
"dance_school.classes": "e.g., Junior Ballet, Adult Tap Beginners",
|
|
9531
|
+
"dance_school.terms": "e.g., Junior Ballet Spring Term, Adult Jazz Term",
|
|
9532
|
+
"dance_school.workshops": "e.g., Contemporary Intensive, Tap Masterclass",
|
|
9533
|
+
"dance_school.private_lessons": "e.g., Private Ballet Lesson, Audition Coaching",
|
|
9534
|
+
"dance_school.shows": "e.g., Winter Showcase, Summer Recital",
|
|
9535
|
+
"arts_crafts.classes": "e.g., Tuesday Evening Wheel Throwing, Open Studio",
|
|
9536
|
+
"arts_crafts.courses": "e.g., Six-Week Beginners Pottery, Lino Printing Course",
|
|
9537
|
+
"arts_crafts.workshops": "e.g., Make a Mug in a Day, Watercolour Taster",
|
|
9538
|
+
"arts_crafts.private_sessions": "e.g., One-to-One Wheel Lesson, Private Group Session",
|
|
9539
|
+
"physiotherapy_physical_health.appointments": "e.g., Initial Assessment, Follow-Up Appointment",
|
|
9540
|
+
"physiotherapy_physical_health.rehab_classes": "e.g., Weekly Back Care, Mobility and Strength Class",
|
|
9541
|
+
"physiotherapy_physical_health.workshops": "e.g., Running Injury Prevention, Everyday Back Care",
|
|
9542
|
+
"massage_bodywork.treatments": "e.g., 60-Minute Massage, Initial Bodywork Session",
|
|
9543
|
+
"massage_bodywork.group_sessions": "e.g., Weekly Self-Massage, Somatic Movement Group",
|
|
9544
|
+
"massage_bodywork.workshops": "e.g., Introduction to Self-Massage, Restorative Bodywork Workshop",
|
|
9545
|
+
"therapist_practitioner.appointments": "e.g., Initial Consultation, Follow-Up Session",
|
|
9546
|
+
"therapist_practitioner.workshops": "e.g., Managing Stress Workshop, Breathwork Evening",
|
|
9547
|
+
"therapist_practitioner.retreats": "e.g., Rest and Reset Weekend, Wellbeing Retreat",
|
|
9548
|
+
"beauty_spa.appointments": "e.g., Skin Consultation, Signature Facial",
|
|
9549
|
+
"beauty_spa.workshops": "e.g., Skincare Workshop, Makeup Masterclass",
|
|
9550
|
+
"consultant_coach.appointments": "e.g., Discovery Call, Strategy Session",
|
|
9551
|
+
"consultant_coach.workshops": "e.g., Planning Workshop, Leadership Strategy Day",
|
|
9552
|
+
"consultant_coach.courses": "e.g., 6-Week Coaching Cohort, Foundations Course",
|
|
9553
|
+
"consultant_coach.retreats": "e.g., Leadership Retreat, Creative Reset Weekend",
|
|
9554
|
+
"training_provider.courses": "e.g., First Aid at Work, Leadership Essentials",
|
|
9555
|
+
"training_provider.workshops": "e.g., Safeguarding Workshop, Excel Masterclass",
|
|
9556
|
+
"training_provider.appointments": "e.g., Skills Assessment, Mentoring Session",
|
|
9557
|
+
"retreat_centre.retreats": "e.g., Autumn Residential Retreat, Silent Weekend",
|
|
9558
|
+
"retreat_centre.workshops": "e.g., Breathwork Day Retreat, Full Moon Ceremony",
|
|
9559
|
+
"retreat_centre.classes": "e.g., Weekly Guided Meditation, Morning Yoga",
|
|
9560
|
+
"retreat_centre.courses": "e.g., Mindfulness Course, Seasonal Practice Programme",
|
|
9561
|
+
"retreat_centre.appointments": "e.g., Private Therapy Session, One-to-One Consultation",
|
|
9562
|
+
"music_school.lessons": "e.g., Piano Lesson, Vocal Coaching",
|
|
9563
|
+
"music_school.classes": "e.g., Beginner Guitar Group, Junior Choir",
|
|
9564
|
+
"music_school.terms": "e.g., Spring Piano Term, Junior Choir Term",
|
|
9565
|
+
"music_school.workshops": "e.g., Songwriting Workshop, Jazz Improvisation Day",
|
|
9566
|
+
"music_school.performances": "e.g., Winter Concert, Student Recital",
|
|
9567
|
+
"voice_singing.lessons": "e.g., Voice Session, Singing Lesson",
|
|
9568
|
+
"voice_singing.classes": "e.g., Weekly Singing Circle, Community Choir",
|
|
9569
|
+
"voice_singing.terms": "e.g., Spring Choir Term, 6-Week Voice Journey",
|
|
9570
|
+
"voice_singing.workshops": "e.g., Free Your Voice Workshop, Devotional Singing Evening",
|
|
9571
|
+
"voice_singing.performances": "e.g., Winter Choir Sharing, Community Song Evening",
|
|
9572
|
+
"performing_arts_school.classes": "e.g., Musical Theatre Class, Junior Drama",
|
|
9573
|
+
"performing_arts_school.terms": "e.g., Spring Drama Term, Musical Theatre Term",
|
|
9574
|
+
"performing_arts_school.workshops": "e.g., Acting Intensive, Screen Audition Workshop",
|
|
9575
|
+
"performing_arts_school.performances": "e.g., Summer Showcase, End-of-Term Production",
|
|
9576
|
+
"performing_arts_school.lessons": "e.g., Private Acting Lesson, Audition Coaching",
|
|
9577
|
+
"community_wellbeing.classes": "e.g., Weekly Meditation Group, Community Yoga",
|
|
9578
|
+
"community_wellbeing.workshops": "e.g., Community Wellbeing Workshop, Grief Support Day",
|
|
9579
|
+
"community_wellbeing.courses": "e.g., Mindfulness Course, Peer Support Programme",
|
|
9580
|
+
"community_wellbeing.appointments": "e.g., Support Session, Initial Consultation",
|
|
9581
|
+
"community_wellbeing.retreats": "e.g., Community Retreat Weekend, Rest and Reflect Retreat"
|
|
9582
|
+
};
|
|
9583
|
+
function verticalPresetTitleExample(presetId) {
|
|
9584
|
+
return TITLE_EXAMPLE_BY_PRESET[presetId] ?? null;
|
|
9585
|
+
}
|
|
9586
|
+
|
|
9587
|
+
//#endregion
|
|
9588
|
+
//#region ../core/src/credit-product-nouns.ts
|
|
9589
|
+
const CREDIT_PRODUCT_NOUNS = {
|
|
9590
|
+
event_pass: {
|
|
9591
|
+
product: {
|
|
9592
|
+
singular: "pass",
|
|
9593
|
+
plural: "passes"
|
|
9594
|
+
},
|
|
9595
|
+
productTitle: {
|
|
9596
|
+
singular: "Pass",
|
|
9597
|
+
plural: "Passes"
|
|
9598
|
+
},
|
|
9599
|
+
unit: {
|
|
9600
|
+
singular: "class",
|
|
9601
|
+
plural: "classes"
|
|
9602
|
+
}
|
|
9603
|
+
},
|
|
9604
|
+
appointment_package: {
|
|
9605
|
+
product: {
|
|
9606
|
+
singular: "package",
|
|
9607
|
+
plural: "packages"
|
|
9608
|
+
},
|
|
9609
|
+
productTitle: {
|
|
9610
|
+
singular: "Package",
|
|
9611
|
+
plural: "Packages"
|
|
9612
|
+
},
|
|
9613
|
+
unit: {
|
|
9614
|
+
singular: "session",
|
|
9615
|
+
plural: "sessions"
|
|
9616
|
+
}
|
|
9617
|
+
}
|
|
9618
|
+
};
|
|
9619
|
+
function creditProductNouns(useCase) {
|
|
9620
|
+
return CREDIT_PRODUCT_NOUNS[useCase];
|
|
9621
|
+
}
|
|
9622
|
+
function countedNoun(noun, count) {
|
|
9623
|
+
return count === 1 ? noun.singular : noun.plural;
|
|
9624
|
+
}
|
|
9625
|
+
/** "class" or "classes", to follow a number the caller formats. */
|
|
9626
|
+
function creditProductUnitNoun(useCase, count) {
|
|
9627
|
+
return countedNoun(CREDIT_PRODUCT_NOUNS[useCase].unit, count);
|
|
9628
|
+
}
|
|
9629
|
+
/** "1 class", "4 sessions". */
|
|
9630
|
+
function formatCreditProductUnits(useCase, count) {
|
|
9631
|
+
return `${count} ${creditProductUnitNoun(useCase, count)}`;
|
|
9632
|
+
}
|
|
9633
|
+
/** "4 of 10 sessions left". */
|
|
9634
|
+
function formatCreditProductBalance(useCase, balance) {
|
|
9635
|
+
return `${balance.remaining} of ${balance.total} ${creditProductUnitNoun(useCase, balance.total)} left`;
|
|
9636
|
+
}
|
|
9637
|
+
|
|
9335
9638
|
//#endregion
|
|
9336
9639
|
//#region ../core/src/patch/index.ts
|
|
9337
9640
|
function settableFrom(wireValue) {
|
|
@@ -9400,7 +9703,8 @@ const APPOINTMENT_REQUEST_OUTCOME_VALUES = [
|
|
|
9400
9703
|
const APPOINTMENT_REQUEST_NOTICE_KIND_VALUES = [
|
|
9401
9704
|
"received",
|
|
9402
9705
|
"confirmed",
|
|
9403
|
-
"declined"
|
|
9706
|
+
"declined",
|
|
9707
|
+
"lapsed"
|
|
9404
9708
|
];
|
|
9405
9709
|
function parseAppointmentStatus(value) {
|
|
9406
9710
|
const status = APPOINTMENT_STATUS_VALUES.find((status$1) => status$1 === value);
|
|
@@ -10225,11 +10529,6 @@ const EMAIL_DEFINITIONS = {
|
|
|
10225
10529
|
perEvent: false,
|
|
10226
10530
|
templateStorage: true
|
|
10227
10531
|
},
|
|
10228
|
-
pass_purchase_confirmation: {
|
|
10229
|
-
wording: "editable",
|
|
10230
|
-
perEvent: false,
|
|
10231
|
-
templateStorage: true
|
|
10232
|
-
},
|
|
10233
10532
|
membership_purchase_confirmation: {
|
|
10234
10533
|
wording: "editable",
|
|
10235
10534
|
perEvent: false,
|
|
@@ -10365,6 +10664,16 @@ const EMAIL_DEFINITIONS = {
|
|
|
10365
10664
|
perEvent: false,
|
|
10366
10665
|
templateStorage: true
|
|
10367
10666
|
},
|
|
10667
|
+
appointment_request_lapsed: {
|
|
10668
|
+
wording: "editable",
|
|
10669
|
+
perEvent: false,
|
|
10670
|
+
templateStorage: true
|
|
10671
|
+
},
|
|
10672
|
+
appointment_team_request_lapsed: {
|
|
10673
|
+
wording: "fixed",
|
|
10674
|
+
perEvent: false,
|
|
10675
|
+
templateStorage: false
|
|
10676
|
+
},
|
|
10368
10677
|
appointment_request_declined: {
|
|
10369
10678
|
wording: "editable",
|
|
10370
10679
|
perEvent: false,
|
|
@@ -10416,6 +10725,16 @@ const EMAIL_DEFINITIONS = {
|
|
|
10416
10725
|
perEvent: false,
|
|
10417
10726
|
templateStorage: true
|
|
10418
10727
|
},
|
|
10728
|
+
arrangement_sessions_booked: {
|
|
10729
|
+
wording: "editable",
|
|
10730
|
+
perEvent: false,
|
|
10731
|
+
templateStorage: true
|
|
10732
|
+
},
|
|
10733
|
+
arrangement_sessions_changed: {
|
|
10734
|
+
wording: "editable",
|
|
10735
|
+
perEvent: false,
|
|
10736
|
+
templateStorage: true
|
|
10737
|
+
},
|
|
10419
10738
|
event_waitlist_join_confirmation: {
|
|
10420
10739
|
wording: "editable",
|
|
10421
10740
|
perEvent: false,
|
|
@@ -10551,6 +10870,11 @@ const EMAIL_DEFINITIONS = {
|
|
|
10551
10870
|
perEvent: false,
|
|
10552
10871
|
templateStorage: false
|
|
10553
10872
|
},
|
|
10873
|
+
domain_renewal_disabled: {
|
|
10874
|
+
wording: "fixed",
|
|
10875
|
+
perEvent: false,
|
|
10876
|
+
templateStorage: false
|
|
10877
|
+
},
|
|
10554
10878
|
billing_payment_issue: {
|
|
10555
10879
|
wording: "fixed",
|
|
10556
10880
|
perEvent: false,
|
|
@@ -10775,4 +11099,104 @@ function decideBookingEmbedChange(current, change) {
|
|
|
10775
11099
|
}
|
|
10776
11100
|
|
|
10777
11101
|
//#endregion
|
|
10778
|
-
|
|
11102
|
+
//#region ../core/src/ownerAppointmentTime.ts
|
|
11103
|
+
/** Owners may waive public rules, but cannot waive real clashes or book into the past. */
|
|
11104
|
+
function decideOwnerAppointmentTime(proposed, rules, nowMs) {
|
|
11105
|
+
const start = Date.parse(proposed.startAt);
|
|
11106
|
+
const end = Date.parse(proposed.endAt);
|
|
11107
|
+
if (end <= start || !Number.isFinite(start) || !Number.isFinite(end) || end - start !== rules.service.durationMinutes * 6e4) {
|
|
11108
|
+
return {
|
|
11109
|
+
kind: "refused",
|
|
11110
|
+
reason: "invalid_time"
|
|
11111
|
+
};
|
|
11112
|
+
}
|
|
11113
|
+
if (start < nowMs - 3 * 6e4) return {
|
|
11114
|
+
kind: "refused",
|
|
11115
|
+
reason: "past"
|
|
11116
|
+
};
|
|
11117
|
+
const overlaps$1 = (window, from = start, to = end) => from < Date.parse(window.endAt) && to > Date.parse(window.startAt);
|
|
11118
|
+
if (rules.reservations.some((window) => overlaps$1(window))) return {
|
|
11119
|
+
kind: "refused",
|
|
11120
|
+
reason: "reservation_overlap"
|
|
11121
|
+
};
|
|
11122
|
+
if (rules.appointments.some((window) => overlaps$1(window))) return {
|
|
11123
|
+
kind: "refused",
|
|
11124
|
+
reason: "appointment_overlap"
|
|
11125
|
+
};
|
|
11126
|
+
const occupiedStart = start - rules.service.prepMinutes * 6e4;
|
|
11127
|
+
const occupiedEnd = end + rules.service.cleanupMinutes * 6e4;
|
|
11128
|
+
const breaks = {
|
|
11129
|
+
working_hours: !isOwnerWorkingTime(start, end, rules),
|
|
11130
|
+
minimum_notice: start < nowMs + rules.bookingNotice.minLeadMinutes * 6e4,
|
|
11131
|
+
booking_window: rules.bookingNotice.maxBookingNoticeMinutes !== null && start > nowMs + rules.bookingNotice.maxBookingNoticeMinutes * 6e4,
|
|
11132
|
+
buffer: rules.occupiedWindows.some((window) => overlaps$1(window, occupiedStart, occupiedEnd)),
|
|
11133
|
+
closure: rules.closures.some((window) => overlaps$1(window, occupiedStart, occupiedEnd)),
|
|
11134
|
+
google_busy: rules.googleBusy.some((window) => overlaps$1(window, occupiedStart, occupiedEnd))
|
|
11135
|
+
};
|
|
11136
|
+
return {
|
|
11137
|
+
kind: "allowed",
|
|
11138
|
+
ruleBreaks: Object.keys(breaks).filter((key) => breaks[key])
|
|
11139
|
+
};
|
|
11140
|
+
}
|
|
11141
|
+
function isOwnerWorkingTime(start, end, rules) {
|
|
11142
|
+
return Boolean(rules.workingStarts?.some((value) => Date.parse(value) === start)) || rules.workingWindows.some((window) => start >= Date.parse(window.startAt) && end <= Date.parse(window.endAt));
|
|
11143
|
+
}
|
|
11144
|
+
const OWNER_APPOINTMENT_RULE_COPY = {
|
|
11145
|
+
working_hours: "Outside working hours",
|
|
11146
|
+
minimum_notice: "Sooner than your minimum notice",
|
|
11147
|
+
booking_window: "Further ahead than you take bookings",
|
|
11148
|
+
buffer: "Too close to another appointment",
|
|
11149
|
+
closure: "During a closure or time off",
|
|
11150
|
+
google_busy: "Busy in Google Calendar"
|
|
11151
|
+
};
|
|
11152
|
+
const OWNER_APPOINTMENT_GOOGLE_UNAVAILABLE_COPY = "We couldn’t check Google Calendar, so this time might clash with something there.";
|
|
11153
|
+
const OWNER_APPOINTMENT_REFUSAL_COPY = {
|
|
11154
|
+
nonexistent_time: "The clocks go forward on this date, so that time is skipped. Choose another time.",
|
|
11155
|
+
invalid_time: "Choose a valid time for this service.",
|
|
11156
|
+
past: "That time has already passed.",
|
|
11157
|
+
appointment_overlap: "This practitioner already has an appointment at this time.",
|
|
11158
|
+
reservation_overlap: "This time is held for another client’s regular session."
|
|
11159
|
+
};
|
|
11160
|
+
|
|
11161
|
+
//#endregion
|
|
11162
|
+
//#region ../core/src/ownerLocalStartAt.ts
|
|
11163
|
+
/** Owner-entered clock times must survive conversion without silently moving forward. */
|
|
11164
|
+
function ownerLocalStartAt(date, time, timezone) {
|
|
11165
|
+
try {
|
|
11166
|
+
const localDate = parseBookingLocalDate(date);
|
|
11167
|
+
const localTime = parseLocalScheduleTime(time);
|
|
11168
|
+
const zone = requireBookingTimeZone(timezone);
|
|
11169
|
+
const target = Date.UTC(localDate.year, localDate.month - 1, localDate.day, localTime.hour, localTime.minute, localTime.second);
|
|
11170
|
+
const converted = localScheduleDateTimeToUtcDate(localDate, localTime, zone);
|
|
11171
|
+
if (localClockMs(converted, zone) !== target) return { kind: "nonexistent" };
|
|
11172
|
+
const candidates = [
|
|
11173
|
+
-1,
|
|
11174
|
+
0,
|
|
11175
|
+
1
|
|
11176
|
+
].map((days) => {
|
|
11177
|
+
const probe = new Date(converted.getTime() + days * 864e5);
|
|
11178
|
+
return new Date(probe.getTime() + target - localClockMs(probe, zone));
|
|
11179
|
+
}).filter((candidate$1) => localClockMs(candidate$1, zone) === target);
|
|
11180
|
+
return {
|
|
11181
|
+
kind: "ok",
|
|
11182
|
+
startAt: new Date(Math.min(...candidates.map((candidate$1) => candidate$1.getTime()))).toISOString()
|
|
11183
|
+
};
|
|
11184
|
+
} catch {
|
|
11185
|
+
return { kind: "invalid" };
|
|
11186
|
+
}
|
|
11187
|
+
}
|
|
11188
|
+
function localClockMs(instant, timezone) {
|
|
11189
|
+
const date = getLocalScheduleDate(instant, timezone);
|
|
11190
|
+
const time = getLocalScheduleTime(instant, timezone);
|
|
11191
|
+
return Date.UTC(date.year, date.month - 1, date.day, time.hour, time.minute, time.second);
|
|
11192
|
+
}
|
|
11193
|
+
|
|
11194
|
+
//#endregion
|
|
11195
|
+
//#region ../core/src/event-occurrence-route-segment.ts
|
|
11196
|
+
/** Date and UUID segments are reserved by the event-occurrence route. */
|
|
11197
|
+
function isEventOccurrenceRouteSegment(segment) {
|
|
11198
|
+
return /^(?:\d{4}-\d{2}-\d{2}|[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12})$/i.test(segment);
|
|
11199
|
+
}
|
|
11200
|
+
|
|
11201
|
+
//#endregion
|
|
11202
|
+
export { parseWeeklyOpeningHours as $, unsafeAsUploadSessionId as $n, businessCancellationRefusalCodes as $t, resolveWholeSeriesRunLifecycle as A, unsafeAsDemoCapability as An, getLocalScheduleDate as At, parseConfiguredMailingListProvider as B, unsafeAsBookingSessionId as Bn, toUtcIsoDateTimeString as Bt, isPublicReadEndpoint as C, unsafeAsNonNegativeCents as Cn, resolveBookingDisplayContext as Ct, nextLiveRunSessionStartMs as D, assertNever as Dn, formatLocalScheduleDate as Dt, firstLiveRunSessionStartMs as E, parseCurrencyCode as En, compareLocalScheduleDates as Et, parseMailingListBlockId as F, parseMembershipId as Fn, resolveBookingBusinessTimeZone as Ft, parseFooterCompositionV1 as G, unsafeAsMediaAssetId as Gn, isSettleableOrderInstalmentPlanStatus as Gt, DEFAULT_MAILING_LIST_PRIVACY_NOTE as H, unsafeAsDeclaredMimeType as Hn, validateBookingPaymentOptionKinds as Ht, parseMailingListContentVersionId as I, unsafeAsEntitlementId as In, resolveBookingTimeZoneId as It, DEFAULT_MAILING_LIST_TARGETING as J, unsafeAsPositiveSeconds as Jn, getBookingInstalmentDepositRefundability as Jt, footerNavigationLayouts as K, unsafeAsOriginalFilename as Kn, addIntervalPreservingMonthAnchor as Kt, parseMailingListSignedSourceToken as L, unsafeAsPassId as Ln, toBookingTimeZone as Lt, exposeSecret as M, unsafeAsStaffMemberId as Mn, localScheduleTimePattern as Mt, parseManagementKey as N, parseCustomerId as Nn, parseBookingLocalDate as Nt, orderedLiveRunSessions as O, formatDurationUnitLabel as On, formatLocalScheduleTime as Ot, slugify as P, parseSiteTermsVersionId as Pn, parseLocalScheduleTime as Pt, parsePublicContactDetails as Q, unsafeAsStoragePath as Qn, splitAmountWithRemainderInFirst as Qt, parseMailingListRuntimeContext as R, parseDatedOfferingCapacityHoldAuditRef as Rn, parseBookingTimeZone as Rt, getPublicReadCachePolicy as S, toNonNegativeCents as Sn, inferSiteDateLocale as St, CANCELLED_SESSION_STATUS as T, formatCurrencyAmount as Tn, buildBookingUtcDateWindow as Tt, DEFAULT_MAILING_LIST_SUCCESS_MESSAGE as U, unsafeAsDetectedMimeType as Un, isLiveOrderInstalmentPlanStatus as Ut, parseMailingListGlobalForm as V, parseMediaAssetId as Vn, BOOKING_COURSE_INSTALMENT_DEADLINES as Vt, parseMailingListProviderScope as W, unsafeAsFileChecksumSha256 as Wn, isSettleableFlexibleBalanceContractStatus as Wt, isCanonicalRichTextDoc as X, unsafeAsSiteScopedStoragePath as Xn, getBookingInstalmentProtectedDepositAmountCents as Xt, planMailingListChoicePresentation as Y, unsafeAsSafeDownloadFilename as Yn, getBookingInstalmentPlanIntervalCount as Yt, formatOpeningHoursRows as Z, unsafeAsStorageBucketName as Zn, omitZeroAmountFutureRows as Zt, ORDINARY_EVENT_PRESET_VALUES as _, mapReadonlyNonEmptyArray as _n, unsafeAsPricingOptionId as _r, formatDateRange as _t, authoredValuesEqual as a, EVENT_PRESET_VOCABULARY as an, parseApiKeyId as ar, locationMapLinks as at, PUBLIC_AVAILABILITY_FRESHNESS_SECONDS as b, parsePositiveCents as bn, blockInteractionContextSchema as br, formatTime as bt, resolveEventCatalogue as c, isPublicEventPricingOptionDisplayable as cn, unsafeAsSiteId as cr, parseLocationValue as ct, canonicalizeConfiguredBookingVerticalConfig as d, publicEventPricingOptions as dn, parseRetiredCourseId as dr, toLocationCoordinates as dt, scheduleBookingReasonCodes as en, unsafeAsProductId as er, assertAllowedPublicUrl as et, parseVerticalId as f, publicEventPricingType as fn, unsafeAsEventCategoryId as fr, isPresent as ft, EVENT_PRESET_VALUES as g, mapNonEmptyArray as gn, unsafeAsOccurrenceId as gr, formatDate as gt, DEFAULT_EVENT_TYPE_PRESETS as h, fromArray as hn, unsafeAsEventSeriesId as hr, selectCategoryView as ht, isRecord as i, parsePageSurfaceSubject as in, unsafeAsSiteFontId as ir, stableJsonStringify as it, createSecret as j, unsafeAsAppointmentResourceId as jn, getLocalScheduleTime as jt, resolveWholeSeriesBookingPhase as k, unsafeAsBookingRequirementId as kn, getBookingLocalDateKey as kt, NAVIGATION_LOCATIONS as l, publicEventPricingCurrency as ln, unsafeAsUserId as lr, projectPublicLocation as lt, resolveSiteVerticalBookingConfig as m, resolvePricingOptionsPriceDisplay as mn, unsafeAsEventOfferingId as mr, mapDrawingSchema as mt, OFFLINE_PAYMENT_METHODS as n, resolveFlexibleBalanceInitialPaymentCents as nn, parseEditorSessionGeneration as nr, SENSITIVE_COLLECTION_MODES as nt, creditProductUnitNoun as o, formatBookingPriceDisplay as on, parseSiteId as or, locationValueSchema as ot, parseVerticalPresetId as p, resolveExactOrFreePriceDisplay as pn, unsafeAsEventInstanceId as pr, trimmedStringOrNull as pt, parseMailingListPlacementTargeting as q, unsafeAsPositiveByteCount as qn, clampConfiguredAmount as qt, committedWriteProofSchema as r, deriveTotalTicketQuantity as rn, parsePageId as rr, decideLocationSave as rt, formatCreditProductUnits as s, formatEventPricing as sn, parseUserId as sr, normalizeLocationAddressText as st, isEventOccurrenceRouteSegment as t, resolveFlexibleBalanceDueAt as tn, unsafeAsCheckoutLineId as tr, SENSITIVE_COLLECTION_CONFIRMATION_VERSION as tt, areConfiguredBookingVerticalConfigsEqual as u, publicEventPricingDisplay as un, parseEventSeriesId as ur, publicLocationSchema as ut, SURFACE_EVENT_PRESET_VALUES as v, isNonNegativeWholeCents as vn, err as vr, formatDateTime as vt, publicReadFreshnessSeconds as w, unsafeAsPositiveCents as wn, toScheduledBookingDateTime as wt, PUBLIC_CONTENT_FRESHNESS_SECONDS as x, toCents as xn, formatTimeRange as xt, WHOLE_SERIES_EVENT_PRESET_VALUES as y, parseNonNegativeCents as yn, ok as yr, formatDateTimeRange as yt, assessMailingListTargeting as z, parseDatedOfferingCapacityHoldId as zn, parseUtcIsoDateTimeString as zt };
|