riverbankcms 0.31.0 → 0.31.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/acceptance/matrix.mjs +3 -3
- package/dist/cli/index.mjs +5164 -3578
- package/dist/{entryCommands-gu5RjKp2.mjs → entryCommands-CYEpLRXI.mjs} +911 -409
- package/dist/{eventUpsertInputSchema-DoD-B321.mjs → eventUpsertInputSchema-CGmm5o_I.mjs} +2962 -2089
- package/dist/load-config-B_kPvIxz.mjs +4 -0
- package/dist/{load-config-D32BDh2g.mjs → load-config-DIyqYeRP.mjs} +2 -2
- package/dist/{plan-DajnV46R.mjs → plan-D5NfiRLe.mjs} +1 -1
- package/dist/scaffold/index.mjs +2 -2
- package/dist/{sdk-event-upsert-BC_MyWOx.mjs → sdk-event-upsert-0U4hsDpo.mjs} +31 -16
- package/dist/{src-CevC_tvx.mjs → src-exrglXYU.mjs} +339 -42
- package/dist/testing.mjs +4 -4
- package/package.json +1 -1
- package/dist/load-config-C2eEZ3Kj.mjs +0 -4
|
@@ -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
|
|
|
@@ -204,15 +205,13 @@ const parseSiteTermsAgreementId = (value) => parseUuidBrand(value, unsafeAsSiteT
|
|
|
204
205
|
const unsafeAsAppointmentId = (id) => id;
|
|
205
206
|
const unsafeAsAppointmentServiceId = (id) => id;
|
|
206
207
|
const unsafeAsAppointmentResourceId = (id) => id;
|
|
207
|
-
const unsafeAsAppointmentReservationId = (id) => id;
|
|
208
|
-
const unsafeAsAppointmentReservationRunId = (id) => id;
|
|
209
208
|
const unsafeAsAppointmentPaymentRequestId = (id) => id;
|
|
210
209
|
const unsafeAsStaffMemberId = (id) => id;
|
|
211
210
|
const parseAppointmentId = (value) => parseUuidBrand(value, unsafeAsAppointmentId);
|
|
212
211
|
const parseAppointmentServiceId = (value) => parseUuidBrand(value, unsafeAsAppointmentServiceId);
|
|
213
212
|
const parseAppointmentResourceId = (value) => parseUuidBrand(value, unsafeAsAppointmentResourceId);
|
|
214
|
-
const
|
|
215
|
-
const
|
|
213
|
+
const unsafeAsClientArrangementId = (id) => id;
|
|
214
|
+
const parseClientArrangementId = (value) => parseUuidBrand(value, unsafeAsClientArrangementId);
|
|
216
215
|
|
|
217
216
|
//#endregion
|
|
218
217
|
//#region ../core/src/branded/calendar.ts
|
|
@@ -1527,6 +1526,72 @@ function isRecord$10(value) {
|
|
|
1527
1526
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1528
1527
|
}
|
|
1529
1528
|
|
|
1529
|
+
//#endregion
|
|
1530
|
+
//#region ../core/src/page-surface-subject.ts
|
|
1531
|
+
function parsePageSurfaceSubjectRef(row) {
|
|
1532
|
+
switch (row.subjectType) {
|
|
1533
|
+
case "event_series": {
|
|
1534
|
+
const id = parseEventSeriesId(row.subjectId);
|
|
1535
|
+
return id.ok ? ok({
|
|
1536
|
+
type: row.subjectType,
|
|
1537
|
+
eventSeriesId: id.value
|
|
1538
|
+
}) : err({
|
|
1539
|
+
kind: "invalidSubjectId",
|
|
1540
|
+
error: id.error
|
|
1541
|
+
});
|
|
1542
|
+
}
|
|
1543
|
+
case "event_offering": {
|
|
1544
|
+
const id = parseEventOfferingId(row.subjectId);
|
|
1545
|
+
return id.ok ? ok({
|
|
1546
|
+
type: row.subjectType,
|
|
1547
|
+
eventOfferingId: id.value
|
|
1548
|
+
}) : err({
|
|
1549
|
+
kind: "invalidSubjectId",
|
|
1550
|
+
error: id.error
|
|
1551
|
+
});
|
|
1552
|
+
}
|
|
1553
|
+
case "appointment_service": {
|
|
1554
|
+
const id = parseAppointmentServiceId(row.subjectId);
|
|
1555
|
+
return id.ok ? ok({
|
|
1556
|
+
type: row.subjectType,
|
|
1557
|
+
appointmentServiceId: id.value
|
|
1558
|
+
}) : err({
|
|
1559
|
+
kind: "invalidSubjectId",
|
|
1560
|
+
error: id.error
|
|
1561
|
+
});
|
|
1562
|
+
}
|
|
1563
|
+
default: return err({
|
|
1564
|
+
kind: "unsupportedSubject",
|
|
1565
|
+
subjectType: row.subjectType
|
|
1566
|
+
});
|
|
1567
|
+
}
|
|
1568
|
+
}
|
|
1569
|
+
function parsePageSurfaceSubject(value) {
|
|
1570
|
+
if (typeof value !== "object" || value === null || !("kind" in value) || value.kind !== "appointmentService") {
|
|
1571
|
+
return parseEventPageSurfaceSubject(value);
|
|
1572
|
+
}
|
|
1573
|
+
const id = parseAppointmentServiceId("appointmentServiceId" in value ? value.appointmentServiceId : undefined);
|
|
1574
|
+
if (!id.ok) return err({
|
|
1575
|
+
kind: "invalidAppointmentServiceId",
|
|
1576
|
+
error: id.error
|
|
1577
|
+
});
|
|
1578
|
+
return ok({
|
|
1579
|
+
kind: "appointmentService",
|
|
1580
|
+
appointmentServiceId: id.value,
|
|
1581
|
+
...servicePageDestination(value),
|
|
1582
|
+
..."noindex" in value && value.noindex === true ? { noindex: true } : {}
|
|
1583
|
+
});
|
|
1584
|
+
}
|
|
1585
|
+
/** Parse the renderer choice once at the wire boundary. */
|
|
1586
|
+
function servicePageDestination(value) {
|
|
1587
|
+
if (!("serviceDestinationMode" in value)) return {};
|
|
1588
|
+
const mode = value.serviceDestinationMode;
|
|
1589
|
+
return mode === "cms-managed" || mode === "system-managed" ? { serviceDestinationMode: mode } : {};
|
|
1590
|
+
}
|
|
1591
|
+
function toPageSurfaceSubjectWire(subject) {
|
|
1592
|
+
return subject;
|
|
1593
|
+
}
|
|
1594
|
+
|
|
1530
1595
|
//#endregion
|
|
1531
1596
|
//#region ../core/src/ticket-quantity.ts
|
|
1532
1597
|
function toPositiveTicketQuantity(value) {
|
|
@@ -6478,6 +6543,10 @@ function setFooterSectionSelected(composition, sectionId, selected) {
|
|
|
6478
6543
|
} : section)
|
|
6479
6544
|
});
|
|
6480
6545
|
}
|
|
6546
|
+
function isFooterMenuShown(composition, location) {
|
|
6547
|
+
const kind = location === "footer" ? "navigation" : "legal-navigation";
|
|
6548
|
+
return composition.sections.some((section) => section.kind === kind && section.selected);
|
|
6549
|
+
}
|
|
6481
6550
|
function parseFooterEngagementSection(value) {
|
|
6482
6551
|
const parsed = parseFooterSection(value, 0);
|
|
6483
6552
|
if (!parsed.ok) return parsed;
|
|
@@ -6590,7 +6659,7 @@ const defaultSections = (legacy, options) => {
|
|
|
6590
6659
|
id: unsafeAsFooterModuleId("legal-navigation"),
|
|
6591
6660
|
kind: "legal-navigation",
|
|
6592
6661
|
heading: null,
|
|
6593
|
-
selected:
|
|
6662
|
+
selected: footerVisible,
|
|
6594
6663
|
source: {
|
|
6595
6664
|
kind: "menu-role",
|
|
6596
6665
|
role: "legal-policy"
|
|
@@ -7492,6 +7561,12 @@ function toMailingListPublicSignupResponse(result) {
|
|
|
7492
7561
|
if (result.error.tag === "subscriber_suppressed") {
|
|
7493
7562
|
return { tag: "confirmation_required" };
|
|
7494
7563
|
}
|
|
7564
|
+
if (result.error.tag === "ip_blocked") {
|
|
7565
|
+
return {
|
|
7566
|
+
tag: "unavailable",
|
|
7567
|
+
reason: "authentication_failed"
|
|
7568
|
+
};
|
|
7569
|
+
}
|
|
7495
7570
|
return result.error.tag === "uncertain" ? {
|
|
7496
7571
|
tag: "uncertain",
|
|
7497
7572
|
reason: result.error.reason
|
|
@@ -8187,6 +8262,16 @@ function generateUuidV4(cryptoSource = globalThis.crypto) {
|
|
|
8187
8262
|
const hex = Array.from(bytes, (byte) => byte.toString(16).padStart(2, "0"));
|
|
8188
8263
|
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
8264
|
}
|
|
8265
|
+
/** RFC 9562 UUIDv5: namespace UUID bytes followed by the UTF-8 name, hashed with SHA-1. */
|
|
8266
|
+
async function generateUuidV5(namespace, name) {
|
|
8267
|
+
const hex = namespace.replace(/-/g, "");
|
|
8268
|
+
const namespaceBytes = Array.from({ length: 16 }, (_, index) => Number.parseInt(hex.slice(index * 2, index * 2 + 2), 16));
|
|
8269
|
+
const input = Uint8Array.from([...namespaceBytes, ...new TextEncoder().encode(name)]);
|
|
8270
|
+
const digest = new Uint8Array(await crypto.subtle.digest("SHA-1", input));
|
|
8271
|
+
const bytes = Array.from(digest.slice(0, 16), (byte, index) => index === 6 ? byte & 15 | 80 : index === 8 ? byte & 63 | 128 : byte);
|
|
8272
|
+
const result = bytes.map((byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
8273
|
+
return `${result.slice(0, 8)}-${result.slice(8, 12)}-${result.slice(12, 16)}-${result.slice(16, 20)}-${result.slice(20)}`;
|
|
8274
|
+
}
|
|
8190
8275
|
|
|
8191
8276
|
//#endregion
|
|
8192
8277
|
//#region ../core/src/secret.ts
|
|
@@ -8268,8 +8353,7 @@ function failInvalidSecret() {
|
|
|
8268
8353
|
const SITE_ROUTE_NODE_TYPES = [
|
|
8269
8354
|
"page",
|
|
8270
8355
|
"content_entry",
|
|
8271
|
-
"page_surface"
|
|
8272
|
-
"appointment_service"
|
|
8356
|
+
"page_surface"
|
|
8273
8357
|
];
|
|
8274
8358
|
function parseSiteRouteTarget(input) {
|
|
8275
8359
|
if (typeof input.nodeType !== "string") {
|
|
@@ -8309,16 +8393,6 @@ function parseSiteRouteTarget(input) {
|
|
|
8309
8393
|
error: surfaceId.error
|
|
8310
8394
|
});
|
|
8311
8395
|
}
|
|
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
8396
|
default: return err({
|
|
8323
8397
|
kind: "unsupported-node-type",
|
|
8324
8398
|
nodeType: input.nodeType
|
|
@@ -8330,7 +8404,6 @@ function siteRouteTargetNodeType(target) {
|
|
|
8330
8404
|
case "page": return "page";
|
|
8331
8405
|
case "contentEntry": return "content_entry";
|
|
8332
8406
|
case "pageSurface": return "page_surface";
|
|
8333
|
-
case "appointmentService": return "appointment_service";
|
|
8334
8407
|
default: return assertNever(target);
|
|
8335
8408
|
}
|
|
8336
8409
|
}
|
|
@@ -8339,7 +8412,6 @@ function foldSiteRouteTarget(target, cases) {
|
|
|
8339
8412
|
case "page": return cases.page(target.pageId);
|
|
8340
8413
|
case "contentEntry": return cases.contentEntry(target.entryId);
|
|
8341
8414
|
case "pageSurface": return cases.pageSurface(target.surfaceId);
|
|
8342
|
-
case "appointmentService": return cases.appointmentService(target.serviceId);
|
|
8343
8415
|
default: return assertNever(target);
|
|
8344
8416
|
}
|
|
8345
8417
|
}
|
|
@@ -8463,9 +8535,10 @@ function resolveWholeSeriesPaymentDates(input) {
|
|
|
8463
8535
|
//#region ../core/src/public-read-cache-contract.ts
|
|
8464
8536
|
const PUBLIC_AVAILABILITY_FRESHNESS_SECONDS = 60;
|
|
8465
8537
|
const PUBLIC_CONTENT_FRESHNESS_SECONDS = 3600;
|
|
8466
|
-
function availability(transport) {
|
|
8538
|
+
function availability(fetchTags, transport) {
|
|
8467
8539
|
return {
|
|
8468
8540
|
kind: "live",
|
|
8541
|
+
fetchTags,
|
|
8469
8542
|
reason: "booking_correctness",
|
|
8470
8543
|
freshness: "availability",
|
|
8471
8544
|
transport
|
|
@@ -8474,6 +8547,7 @@ function availability(transport) {
|
|
|
8474
8547
|
function content(tags, transport = "direct") {
|
|
8475
8548
|
return {
|
|
8476
8549
|
kind: "tagged",
|
|
8550
|
+
fetchTags: tags,
|
|
8477
8551
|
tags,
|
|
8478
8552
|
freshness: "content",
|
|
8479
8553
|
transport
|
|
@@ -8483,23 +8557,28 @@ function content(tags, transport = "direct") {
|
|
|
8483
8557
|
const PUBLIC_READ_CACHE_POLICIES = {
|
|
8484
8558
|
listPublishedEntries: content(["published_content"]),
|
|
8485
8559
|
getPublishedEntryPreview: content(["published_content"]),
|
|
8486
|
-
listPublicEvents: availability("direct"),
|
|
8487
|
-
listPublicEventCalendarWindow: availability("direct"),
|
|
8488
|
-
listPublicRecurringSchedule: availability("batch_only"),
|
|
8489
|
-
getPublicEventDetails: availability(
|
|
8490
|
-
|
|
8560
|
+
listPublicEvents: availability(["public_events", "public_event_filters"], "direct"),
|
|
8561
|
+
listPublicEventCalendarWindow: availability(["public_events", "public_event_filters"], "direct"),
|
|
8562
|
+
listPublicRecurringSchedule: availability(["public_events", "public_event_filters"], "batch_only"),
|
|
8563
|
+
getPublicEventDetails: availability([
|
|
8564
|
+
"public_events",
|
|
8565
|
+
"public_event_filters",
|
|
8566
|
+
"public_passes",
|
|
8567
|
+
"public_memberships"
|
|
8568
|
+
], "batch_only"),
|
|
8569
|
+
resolveEventSubroute: availability(["public_events", "public_event_filters"], "direct"),
|
|
8491
8570
|
listPublicRouteCandidates: content(["published_content"], "batch_only"),
|
|
8492
8571
|
listPublicTeamMembers: content(["public_team_members"]),
|
|
8493
|
-
listPublicProducts: availability("direct"),
|
|
8494
|
-
listPublicPasses: availability("direct"),
|
|
8495
|
-
listPublicMemberships: availability("direct"),
|
|
8572
|
+
listPublicProducts: availability(["public_products"], "direct"),
|
|
8573
|
+
listPublicPasses: availability(["public_passes"], "direct"),
|
|
8574
|
+
listPublicMemberships: availability(["public_memberships"], "direct"),
|
|
8496
8575
|
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"),
|
|
8576
|
+
getPublicBookingServices: availability(["public_booking_services"], "direct"),
|
|
8577
|
+
getPublicBookingService: availability(["public_booking_services"], "direct"),
|
|
8578
|
+
getPublicBookingResourcesReference: availability(["public_booking_services"], "direct"),
|
|
8579
|
+
getPublicBookingAvailableDates: availability(["public_booking_services", "public_booking_availability"], "direct"),
|
|
8580
|
+
getPublicBookingAvailableSlots: availability(["public_booking_services", "public_booking_availability"], "direct"),
|
|
8581
|
+
getPublicWeeklySlotAvailability: availability(["public_booking_services", "public_booking_availability"], "direct"),
|
|
8503
8582
|
listPublicForms: content(["site_forms"]),
|
|
8504
8583
|
checkRedirect: content([]),
|
|
8505
8584
|
getPublicRoutableContent: content(["published_content"]),
|
|
@@ -9209,7 +9288,7 @@ const NAVIGATION_LOCATION_DESCRIPTORS = {
|
|
|
9209
9288
|
legal: {
|
|
9210
9289
|
location: "legal",
|
|
9211
9290
|
label: "Legal links",
|
|
9212
|
-
description: "Smaller footer
|
|
9291
|
+
description: "Smaller links at the bottom of your footer, for privacy, terms and other policies."
|
|
9213
9292
|
}
|
|
9214
9293
|
};
|
|
9215
9294
|
function isNavigationLocation(value) {
|
|
@@ -9332,6 +9411,203 @@ function eventCatalogueChoices(catalogue) {
|
|
|
9332
9411
|
}];
|
|
9333
9412
|
}
|
|
9334
9413
|
|
|
9414
|
+
//#endregion
|
|
9415
|
+
//#region ../core/src/business-vocabulary.ts
|
|
9416
|
+
const person = (singular, plural) => ({
|
|
9417
|
+
singular,
|
|
9418
|
+
plural
|
|
9419
|
+
});
|
|
9420
|
+
const GENERIC_BUSINESS_VOCABULARY = {
|
|
9421
|
+
person: person("practitioner", "practitioners"),
|
|
9422
|
+
offeringsExample: "weekly classes, one-to-one sessions and the occasional workshop"
|
|
9423
|
+
};
|
|
9424
|
+
const BUSINESS_VOCABULARY_BY_VERTICAL = {
|
|
9425
|
+
yoga_wellness: {
|
|
9426
|
+
person: person("teacher", "teachers"),
|
|
9427
|
+
offeringsExample: "weekly yoga classes, a beginners' course and the occasional retreat"
|
|
9428
|
+
},
|
|
9429
|
+
fitness_pt: {
|
|
9430
|
+
person: person("trainer", "trainers"),
|
|
9431
|
+
offeringsExample: "one-to-one personal training, small-group strength classes and six-week programmes"
|
|
9432
|
+
},
|
|
9433
|
+
dance_school: {
|
|
9434
|
+
person: person("teacher", "teachers"),
|
|
9435
|
+
offeringsExample: "weekly ballet and tap classes, holiday workshops and private lessons"
|
|
9436
|
+
},
|
|
9437
|
+
physiotherapy_physical_health: {
|
|
9438
|
+
person: person("practitioner", "practitioners"),
|
|
9439
|
+
offeringsExample: "assessments, follow-up treatments and a weekly back-care class"
|
|
9440
|
+
},
|
|
9441
|
+
massage_bodywork: {
|
|
9442
|
+
person: person("therapist", "therapists"),
|
|
9443
|
+
offeringsExample: "sports and deep tissue massage, and the occasional workshop"
|
|
9444
|
+
},
|
|
9445
|
+
therapist_practitioner: {
|
|
9446
|
+
person: person("practitioner", "practitioners"),
|
|
9447
|
+
offeringsExample: "one-to-one sessions, first consultations and a monthly group"
|
|
9448
|
+
},
|
|
9449
|
+
beauty_spa: {
|
|
9450
|
+
person: person("therapist", "therapists"),
|
|
9451
|
+
offeringsExample: "facials, massage and seasonal spa days"
|
|
9452
|
+
},
|
|
9453
|
+
consultant_coach: {
|
|
9454
|
+
person: person("coach", "coaches"),
|
|
9455
|
+
offeringsExample: "one-to-one coaching calls, half-day workshops and a group programme"
|
|
9456
|
+
},
|
|
9457
|
+
training_provider: {
|
|
9458
|
+
person: person("trainer", "trainers"),
|
|
9459
|
+
offeringsExample: "first aid courses, refresher days and on-site training"
|
|
9460
|
+
},
|
|
9461
|
+
retreat_centre: {
|
|
9462
|
+
person: person("facilitator", "facilitators"),
|
|
9463
|
+
offeringsExample: "weekend retreats, day workshops and drop-in classes"
|
|
9464
|
+
},
|
|
9465
|
+
music_school: {
|
|
9466
|
+
person: person("teacher", "teachers"),
|
|
9467
|
+
offeringsExample: "piano and guitar lessons, group classes and end-of-term concerts"
|
|
9468
|
+
},
|
|
9469
|
+
voice_singing: {
|
|
9470
|
+
person: person("teacher", "teachers"),
|
|
9471
|
+
offeringsExample: "a weekly community choir, one-to-one singing lessons and workshops"
|
|
9472
|
+
},
|
|
9473
|
+
performing_arts_school: {
|
|
9474
|
+
person: person("teacher", "teachers"),
|
|
9475
|
+
offeringsExample: "weekly drama classes, holiday workshops and an end-of-term show"
|
|
9476
|
+
},
|
|
9477
|
+
community_wellbeing: {
|
|
9478
|
+
person: person("facilitator", "facilitators"),
|
|
9479
|
+
offeringsExample: "a weekly walking group, wellbeing workshops and drop-in support sessions"
|
|
9480
|
+
},
|
|
9481
|
+
venue_event_space: {
|
|
9482
|
+
person: null,
|
|
9483
|
+
offeringsExample: "room hire, community events and regular classes run by local teachers"
|
|
9484
|
+
}
|
|
9485
|
+
};
|
|
9486
|
+
/** A site with no business type set gets the generic vocabulary. */
|
|
9487
|
+
function resolveBusinessVocabulary(verticalId) {
|
|
9488
|
+
return verticalId ? BUSINESS_VOCABULARY_BY_VERTICAL[verticalId] : GENERIC_BUSINESS_VOCABULARY;
|
|
9489
|
+
}
|
|
9490
|
+
/** "Our trainers", or "The team" where nobody leads sessions or the type is unknown. */
|
|
9491
|
+
function businessTeamPageTitle(verticalId) {
|
|
9492
|
+
const people = verticalId ? BUSINESS_VOCABULARY_BY_VERTICAL[verticalId].person : null;
|
|
9493
|
+
return people === null ? "The team" : `Our ${people.plural}`;
|
|
9494
|
+
}
|
|
9495
|
+
/**
|
|
9496
|
+
* Example names for an offering, by business preset, written as
|
|
9497
|
+
* "e.g., First, Second". Presets without one fall back to their caller's
|
|
9498
|
+
* generic example.
|
|
9499
|
+
*/
|
|
9500
|
+
const TITLE_EXAMPLE_BY_PRESET = {
|
|
9501
|
+
"yoga_wellness.classes": "e.g., Tuesday Evening Flow, Beginners Yoga",
|
|
9502
|
+
"fitness_pt.group_training": "e.g., Tuesday Strength Club, Saturday HIIT",
|
|
9503
|
+
"fitness_pt.personal_training": "e.g., Personal Training Session, Movement Assessment",
|
|
9504
|
+
"fitness_pt.programmes": "e.g., 6-Week Strength Programme, Couch to 5K",
|
|
9505
|
+
"fitness_pt.workshops": "e.g., Kettlebell Foundations, Mobility Workshop",
|
|
9506
|
+
"fitness_pt.retreats": "e.g., Peak Fitness Weekend, Strength and Recovery Retreat",
|
|
9507
|
+
"dance_school.classes": "e.g., Junior Ballet, Adult Tap Beginners",
|
|
9508
|
+
"dance_school.terms": "e.g., Junior Ballet Spring Term, Adult Jazz Term",
|
|
9509
|
+
"dance_school.workshops": "e.g., Contemporary Intensive, Tap Masterclass",
|
|
9510
|
+
"dance_school.private_lessons": "e.g., Private Ballet Lesson, Audition Coaching",
|
|
9511
|
+
"dance_school.shows": "e.g., Winter Showcase, Summer Recital",
|
|
9512
|
+
"physiotherapy_physical_health.appointments": "e.g., Initial Assessment, Follow-Up Appointment",
|
|
9513
|
+
"physiotherapy_physical_health.rehab_classes": "e.g., Weekly Back Care, Mobility and Strength Class",
|
|
9514
|
+
"physiotherapy_physical_health.workshops": "e.g., Running Injury Prevention, Everyday Back Care",
|
|
9515
|
+
"massage_bodywork.treatments": "e.g., 60-Minute Massage, Initial Bodywork Session",
|
|
9516
|
+
"massage_bodywork.group_sessions": "e.g., Weekly Self-Massage, Somatic Movement Group",
|
|
9517
|
+
"massage_bodywork.workshops": "e.g., Introduction to Self-Massage, Restorative Bodywork Workshop",
|
|
9518
|
+
"therapist_practitioner.appointments": "e.g., Initial Consultation, Follow-Up Session",
|
|
9519
|
+
"therapist_practitioner.workshops": "e.g., Managing Stress Workshop, Breathwork Evening",
|
|
9520
|
+
"therapist_practitioner.retreats": "e.g., Rest and Reset Weekend, Wellbeing Retreat",
|
|
9521
|
+
"beauty_spa.appointments": "e.g., Skin Consultation, Signature Facial",
|
|
9522
|
+
"beauty_spa.workshops": "e.g., Skincare Workshop, Makeup Masterclass",
|
|
9523
|
+
"consultant_coach.appointments": "e.g., Discovery Call, Strategy Session",
|
|
9524
|
+
"consultant_coach.workshops": "e.g., Planning Workshop, Leadership Strategy Day",
|
|
9525
|
+
"consultant_coach.courses": "e.g., 6-Week Coaching Cohort, Foundations Course",
|
|
9526
|
+
"consultant_coach.retreats": "e.g., Leadership Retreat, Creative Reset Weekend",
|
|
9527
|
+
"training_provider.courses": "e.g., First Aid at Work, Leadership Essentials",
|
|
9528
|
+
"training_provider.workshops": "e.g., Safeguarding Workshop, Excel Masterclass",
|
|
9529
|
+
"training_provider.appointments": "e.g., Skills Assessment, Mentoring Session",
|
|
9530
|
+
"retreat_centre.retreats": "e.g., Autumn Residential Retreat, Silent Weekend",
|
|
9531
|
+
"retreat_centre.workshops": "e.g., Breathwork Day Retreat, Full Moon Ceremony",
|
|
9532
|
+
"retreat_centre.classes": "e.g., Weekly Guided Meditation, Morning Yoga",
|
|
9533
|
+
"retreat_centre.courses": "e.g., Mindfulness Course, Seasonal Practice Programme",
|
|
9534
|
+
"retreat_centre.appointments": "e.g., Private Therapy Session, One-to-One Consultation",
|
|
9535
|
+
"music_school.lessons": "e.g., Piano Lesson, Vocal Coaching",
|
|
9536
|
+
"music_school.classes": "e.g., Beginner Guitar Group, Junior Choir",
|
|
9537
|
+
"music_school.terms": "e.g., Spring Piano Term, Junior Choir Term",
|
|
9538
|
+
"music_school.workshops": "e.g., Songwriting Workshop, Jazz Improvisation Day",
|
|
9539
|
+
"music_school.performances": "e.g., Winter Concert, Student Recital",
|
|
9540
|
+
"voice_singing.lessons": "e.g., Voice Session, Singing Lesson",
|
|
9541
|
+
"voice_singing.classes": "e.g., Weekly Singing Circle, Community Choir",
|
|
9542
|
+
"voice_singing.terms": "e.g., Spring Choir Term, 6-Week Voice Journey",
|
|
9543
|
+
"voice_singing.workshops": "e.g., Free Your Voice Workshop, Devotional Singing Evening",
|
|
9544
|
+
"voice_singing.performances": "e.g., Winter Choir Sharing, Community Song Evening",
|
|
9545
|
+
"performing_arts_school.classes": "e.g., Musical Theatre Class, Junior Drama",
|
|
9546
|
+
"performing_arts_school.terms": "e.g., Spring Drama Term, Musical Theatre Term",
|
|
9547
|
+
"performing_arts_school.workshops": "e.g., Acting Intensive, Screen Audition Workshop",
|
|
9548
|
+
"performing_arts_school.performances": "e.g., Summer Showcase, End-of-Term Production",
|
|
9549
|
+
"performing_arts_school.lessons": "e.g., Private Acting Lesson, Audition Coaching",
|
|
9550
|
+
"community_wellbeing.classes": "e.g., Weekly Meditation Group, Community Yoga",
|
|
9551
|
+
"community_wellbeing.workshops": "e.g., Community Wellbeing Workshop, Grief Support Day",
|
|
9552
|
+
"community_wellbeing.courses": "e.g., Mindfulness Course, Peer Support Programme",
|
|
9553
|
+
"community_wellbeing.appointments": "e.g., Support Session, Initial Consultation",
|
|
9554
|
+
"community_wellbeing.retreats": "e.g., Community Retreat Weekend, Rest and Reflect Retreat"
|
|
9555
|
+
};
|
|
9556
|
+
function verticalPresetTitleExample(presetId) {
|
|
9557
|
+
return TITLE_EXAMPLE_BY_PRESET[presetId] ?? null;
|
|
9558
|
+
}
|
|
9559
|
+
|
|
9560
|
+
//#endregion
|
|
9561
|
+
//#region ../core/src/credit-product-nouns.ts
|
|
9562
|
+
const CREDIT_PRODUCT_NOUNS = {
|
|
9563
|
+
event_pass: {
|
|
9564
|
+
product: {
|
|
9565
|
+
singular: "pass",
|
|
9566
|
+
plural: "passes"
|
|
9567
|
+
},
|
|
9568
|
+
productTitle: {
|
|
9569
|
+
singular: "Pass",
|
|
9570
|
+
plural: "Passes"
|
|
9571
|
+
},
|
|
9572
|
+
unit: {
|
|
9573
|
+
singular: "class",
|
|
9574
|
+
plural: "classes"
|
|
9575
|
+
}
|
|
9576
|
+
},
|
|
9577
|
+
appointment_package: {
|
|
9578
|
+
product: {
|
|
9579
|
+
singular: "package",
|
|
9580
|
+
plural: "packages"
|
|
9581
|
+
},
|
|
9582
|
+
productTitle: {
|
|
9583
|
+
singular: "Package",
|
|
9584
|
+
plural: "Packages"
|
|
9585
|
+
},
|
|
9586
|
+
unit: {
|
|
9587
|
+
singular: "session",
|
|
9588
|
+
plural: "sessions"
|
|
9589
|
+
}
|
|
9590
|
+
}
|
|
9591
|
+
};
|
|
9592
|
+
function creditProductNouns(useCase) {
|
|
9593
|
+
return CREDIT_PRODUCT_NOUNS[useCase];
|
|
9594
|
+
}
|
|
9595
|
+
function countedNoun(noun, count) {
|
|
9596
|
+
return count === 1 ? noun.singular : noun.plural;
|
|
9597
|
+
}
|
|
9598
|
+
/** "class" or "classes", to follow a number the caller formats. */
|
|
9599
|
+
function creditProductUnitNoun(useCase, count) {
|
|
9600
|
+
return countedNoun(CREDIT_PRODUCT_NOUNS[useCase].unit, count);
|
|
9601
|
+
}
|
|
9602
|
+
/** "1 class", "4 sessions". */
|
|
9603
|
+
function formatCreditProductUnits(useCase, count) {
|
|
9604
|
+
return `${count} ${creditProductUnitNoun(useCase, count)}`;
|
|
9605
|
+
}
|
|
9606
|
+
/** "4 of 10 sessions left". */
|
|
9607
|
+
function formatCreditProductBalance(useCase, balance) {
|
|
9608
|
+
return `${balance.remaining} of ${balance.total} ${creditProductUnitNoun(useCase, balance.total)} left`;
|
|
9609
|
+
}
|
|
9610
|
+
|
|
9335
9611
|
//#endregion
|
|
9336
9612
|
//#region ../core/src/patch/index.ts
|
|
9337
9613
|
function settableFrom(wireValue) {
|
|
@@ -9400,7 +9676,8 @@ const APPOINTMENT_REQUEST_OUTCOME_VALUES = [
|
|
|
9400
9676
|
const APPOINTMENT_REQUEST_NOTICE_KIND_VALUES = [
|
|
9401
9677
|
"received",
|
|
9402
9678
|
"confirmed",
|
|
9403
|
-
"declined"
|
|
9679
|
+
"declined",
|
|
9680
|
+
"lapsed"
|
|
9404
9681
|
];
|
|
9405
9682
|
function parseAppointmentStatus(value) {
|
|
9406
9683
|
const status = APPOINTMENT_STATUS_VALUES.find((status$1) => status$1 === value);
|
|
@@ -10225,11 +10502,6 @@ const EMAIL_DEFINITIONS = {
|
|
|
10225
10502
|
perEvent: false,
|
|
10226
10503
|
templateStorage: true
|
|
10227
10504
|
},
|
|
10228
|
-
pass_purchase_confirmation: {
|
|
10229
|
-
wording: "editable",
|
|
10230
|
-
perEvent: false,
|
|
10231
|
-
templateStorage: true
|
|
10232
|
-
},
|
|
10233
10505
|
membership_purchase_confirmation: {
|
|
10234
10506
|
wording: "editable",
|
|
10235
10507
|
perEvent: false,
|
|
@@ -10365,6 +10637,16 @@ const EMAIL_DEFINITIONS = {
|
|
|
10365
10637
|
perEvent: false,
|
|
10366
10638
|
templateStorage: true
|
|
10367
10639
|
},
|
|
10640
|
+
appointment_request_lapsed: {
|
|
10641
|
+
wording: "editable",
|
|
10642
|
+
perEvent: false,
|
|
10643
|
+
templateStorage: true
|
|
10644
|
+
},
|
|
10645
|
+
appointment_team_request_lapsed: {
|
|
10646
|
+
wording: "fixed",
|
|
10647
|
+
perEvent: false,
|
|
10648
|
+
templateStorage: false
|
|
10649
|
+
},
|
|
10368
10650
|
appointment_request_declined: {
|
|
10369
10651
|
wording: "editable",
|
|
10370
10652
|
perEvent: false,
|
|
@@ -10416,6 +10698,16 @@ const EMAIL_DEFINITIONS = {
|
|
|
10416
10698
|
perEvent: false,
|
|
10417
10699
|
templateStorage: true
|
|
10418
10700
|
},
|
|
10701
|
+
arrangement_sessions_booked: {
|
|
10702
|
+
wording: "editable",
|
|
10703
|
+
perEvent: false,
|
|
10704
|
+
templateStorage: true
|
|
10705
|
+
},
|
|
10706
|
+
arrangement_sessions_changed: {
|
|
10707
|
+
wording: "editable",
|
|
10708
|
+
perEvent: false,
|
|
10709
|
+
templateStorage: true
|
|
10710
|
+
},
|
|
10419
10711
|
event_waitlist_join_confirmation: {
|
|
10420
10712
|
wording: "editable",
|
|
10421
10713
|
perEvent: false,
|
|
@@ -10551,6 +10843,11 @@ const EMAIL_DEFINITIONS = {
|
|
|
10551
10843
|
perEvent: false,
|
|
10552
10844
|
templateStorage: false
|
|
10553
10845
|
},
|
|
10846
|
+
domain_renewal_disabled: {
|
|
10847
|
+
wording: "fixed",
|
|
10848
|
+
perEvent: false,
|
|
10849
|
+
templateStorage: false
|
|
10850
|
+
},
|
|
10554
10851
|
billing_payment_issue: {
|
|
10555
10852
|
wording: "fixed",
|
|
10556
10853
|
perEvent: false,
|
|
@@ -10775,4 +11072,4 @@ function decideBookingEmbedChange(current, change) {
|
|
|
10775
11072
|
}
|
|
10776
11073
|
|
|
10777
11074
|
//#endregion
|
|
10778
|
-
export {
|
|
11075
|
+
export { parseWeeklyOpeningHours as $, unsafeAsProductId as $n, businessCancellationRefusalCodes as $t, resolveWholeSeriesRunLifecycle as A, unsafeAsAppointmentResourceId as An, getLocalScheduleDate as At, parseConfiguredMailingListProvider as B, parseMediaAssetId as Bn, toUtcIsoDateTimeString as Bt, isPublicReadEndpoint as C, unsafeAsPositiveCents as Cn, resolveBookingDisplayContext as Ct, nextLiveRunSessionStartMs as D, formatDurationUnitLabel as Dn, formatLocalScheduleDate as Dt, firstLiveRunSessionStartMs as E, assertNever as En, compareLocalScheduleDates as Et, parseMailingListBlockId as F, unsafeAsEntitlementId as Fn, resolveBookingBusinessTimeZone as Ft, parseFooterCompositionV1 as G, unsafeAsOriginalFilename as Gn, isSettleableOrderInstalmentPlanStatus as Gt, DEFAULT_MAILING_LIST_PRIVACY_NOTE as H, unsafeAsDetectedMimeType as Hn, validateBookingPaymentOptionKinds as Ht, parseMailingListContentVersionId as I, unsafeAsPassId as In, resolveBookingTimeZoneId as It, DEFAULT_MAILING_LIST_TARGETING as J, unsafeAsSafeDownloadFilename as Jn, getBookingInstalmentDepositRefundability as Jt, footerNavigationLayouts as K, unsafeAsPositiveByteCount as Kn, addIntervalPreservingMonthAnchor as Kt, parseMailingListSignedSourceToken as L, parseDatedOfferingCapacityHoldAuditRef as Ln, toBookingTimeZone as Lt, exposeSecret as M, parseCustomerId as Mn, localScheduleTimePattern as Mt, parseManagementKey as N, parseSiteTermsVersionId as Nn, parseBookingLocalDate as Nt, orderedLiveRunSessions as O, unsafeAsBookingRequirementId as On, formatLocalScheduleTime as Ot, slugify as P, parseMembershipId as Pn, parseLocalScheduleTime as Pt, parsePublicContactDetails as Q, unsafeAsUploadSessionId as Qn, splitAmountWithRemainderInFirst as Qt, parseMailingListRuntimeContext as R, parseDatedOfferingCapacityHoldId as Rn, parseBookingTimeZone as Rt, getPublicReadCachePolicy as S, unsafeAsNonNegativeCents as Sn, inferSiteDateLocale as St, CANCELLED_SESSION_STATUS as T, parseCurrencyCode as Tn, buildBookingUtcDateWindow as Tt, DEFAULT_MAILING_LIST_SUCCESS_MESSAGE as U, unsafeAsFileChecksumSha256 as Un, isLiveOrderInstalmentPlanStatus as Ut, parseMailingListGlobalForm as V, unsafeAsDeclaredMimeType as Vn, BOOKING_COURSE_INSTALMENT_DEADLINES as Vt, parseMailingListProviderScope as W, unsafeAsMediaAssetId as Wn, isSettleableFlexibleBalanceContractStatus as Wt, isCanonicalRichTextDoc as X, unsafeAsStorageBucketName as Xn, getBookingInstalmentProtectedDepositAmountCents as Xt, planMailingListChoicePresentation as Y, unsafeAsSiteScopedStoragePath as Yn, getBookingInstalmentPlanIntervalCount as Yt, formatOpeningHoursRows as Z, unsafeAsStoragePath as Zn, omitZeroAmountFutureRows as Zt, ORDINARY_EVENT_PRESET_VALUES as _, isNonNegativeWholeCents as _n, err as _r, formatDateRange as _t, creditProductUnitNoun as a, formatBookingPriceDisplay as an, parseSiteId as ar, locationMapLinks as at, PUBLIC_AVAILABILITY_FRESHNESS_SECONDS as b, toCents as bn, formatTime as bt, EVENT_PRESET_VOCABULARY as c, publicEventPricingCurrency as cn, unsafeAsUserId as cr, parseLocationValue as ct, canonicalizeConfiguredBookingVerticalConfig as d, publicEventPricingType as dn, unsafeAsEventCategoryId as dr, toLocationCoordinates as dt, scheduleBookingReasonCodes as en, unsafeAsCheckoutLineId as er, assertAllowedPublicUrl as et, parseVerticalId as f, resolveExactOrFreePriceDisplay as fn, unsafeAsEventInstanceId as fr, isPresent as ft, EVENT_PRESET_VALUES as g, mapReadonlyNonEmptyArray as gn, unsafeAsPricingOptionId as gr, formatDate as gt, DEFAULT_EVENT_TYPE_PRESETS as h, mapNonEmptyArray as hn, unsafeAsOccurrenceId as hr, selectCategoryView as ht, authoredValuesEqual as i, parsePageSurfaceSubject as in, parseApiKeyId as ir, stableJsonStringify as it, createSecret as j, unsafeAsStaffMemberId as jn, getLocalScheduleTime as jt, resolveWholeSeriesBookingPhase as k, unsafeAsDemoCapability as kn, getBookingLocalDateKey as kt, NAVIGATION_LOCATIONS as l, publicEventPricingDisplay as ln, parseEventSeriesId as lr, projectPublicLocation as lt, resolveSiteVerticalBookingConfig as m, fromArray as mn, unsafeAsEventSeriesId as mr, mapDrawingSchema as mt, committedWriteProofSchema as n, resolveFlexibleBalanceInitialPaymentCents as nn, parsePageId as nr, SENSITIVE_COLLECTION_MODES as nt, formatCreditProductUnits as o, formatEventPricing as on, parseUserId as or, locationValueSchema as ot, parseVerticalPresetId as p, resolvePricingOptionsPriceDisplay as pn, unsafeAsEventOfferingId as pr, trimmedStringOrNull as pt, parseMailingListPlacementTargeting as q, unsafeAsPositiveSeconds as qn, clampConfiguredAmount as qt, isRecord as r, deriveTotalTicketQuantity as rn, unsafeAsSiteFontId as rr, decideLocationSave as rt, resolveEventCatalogue as s, isPublicEventPricingOptionDisplayable as sn, unsafeAsSiteId as sr, normalizeLocationAddressText as st, OFFLINE_PAYMENT_METHODS as t, resolveFlexibleBalanceDueAt as tn, parseEditorSessionGeneration as tr, SENSITIVE_COLLECTION_CONFIRMATION_VERSION as tt, areConfiguredBookingVerticalConfigsEqual as u, publicEventPricingOptions as un, parseRetiredCourseId as ur, publicLocationSchema as ut, SURFACE_EVENT_PRESET_VALUES as v, parseNonNegativeCents as vn, ok as vr, formatDateTime as vt, publicReadFreshnessSeconds as w, formatCurrencyAmount as wn, toScheduledBookingDateTime as wt, PUBLIC_CONTENT_FRESHNESS_SECONDS as x, toNonNegativeCents as xn, formatTimeRange as xt, WHOLE_SERIES_EVENT_PRESET_VALUES as y, parsePositiveCents as yn, blockInteractionContextSchema as yr, formatDateTimeRange as yt, assessMailingListTargeting as z, unsafeAsBookingSessionId as zn, parseUtcIsoDateTimeString 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 { G as syncLocalMediaForPull, Gt as applyPushConfigPlan, Jt as preparePushConfigTarget, Mn as createOutput, W as syncLocalMediaForPush, at as readEntries, ht as writeMediaManifest, o as executeEntryCommandPlanAsSyncResult, t as compileEntryPushCommands, z as calculateEntryDiffs } from "./entryCommands-
|
|
5
|
-
import "./load-config-
|
|
2
|
+
import "./sdk-event-upsert-0U4hsDpo.mjs";
|
|
3
|
+
import "./src-exrglXYU.mjs";
|
|
4
|
+
import { G as syncLocalMediaForPull, Gt as applyPushConfigPlan, Jt as preparePushConfigTarget, Mn as createOutput, W as syncLocalMediaForPush, at as readEntries, ht as writeMediaManifest, o as executeEntryCommandPlanAsSyncResult, t as compileEntryPushCommands, z as calculateEntryDiffs } from "./entryCommands-CYEpLRXI.mjs";
|
|
5
|
+
import "./load-config-DIyqYeRP.mjs";
|
|
6
6
|
|
|
7
7
|
export { applyPushConfigPlan, calculateEntryDiffs, compileEntryPushCommands, createOutput, executeEntryCommandPlanAsSyncResult, preparePushConfigTarget, readEntries, syncLocalMediaForPull, syncLocalMediaForPush, writeMediaManifest };
|
package/package.json
CHANGED