riverbankcms 0.32.0 → 0.32.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.
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import { $n as headerStyleIdValues, At as getMimeType, Bt as footerPreferencesSchema, Cr as makeBoundaryId, Et as slugifyMediaIdentifier, Ft as MAX_MANAGEMENT_MEDIA_UPLOAD_BYTES, I as footerModeSchema, Ir as createSiteCommandSiteRef, Jn as asHeaderLayoutId, Kn as SUPPORTED_LOADER_ENDPOINTS, Mt as normalizeAmbiguousStoragePathForSite, Nn as RESOLVED_INTERNAL_LINK_ENTITY_TYPES, Or as createCommandRef, Pt as FILE_SIZE_LIMITS, Qn as headerLayoutIdValues, Sn as eventBookingOfferIntentSchema, Sr as asSiteStyleId, St as buildMediaIdentifierFromFilename, Tt as resolveMediaIdentifier, Un as ICON_PICKER_PRESETS, V as themeSchema, Xt as buttonStyleSelectionSchema, Yn as asHeaderStyleId, Zn as footerLookIdValues, _r as asDesignBoundaryId, at as parseAspectRatioValue, b as getSiteCommandMetadata, bt as mediaTypeDiscriminants, ct as getDirectImageUrlForSiteScopedPath, fr as asAppearancePresetId, gr as asDesignBlockId, h as parseAndPlanCommandBatchForTypes, k as headerPreferencesSchema, kr as createContentEntryRef, kt as getExtensionForMimeType, l as resolvePageUpsertSeo, m as createDryRunReport, n as sdkCourseBookingSettingsSchema, p as stableStringify, qn as asFooterLookId, r as sdkEventOccurrenceInputSchema, rr as SYSTEM_BLOCK_KINDS, s as eventVisibilitySchema, v as evaluateSiteCommandBatchExposure, vt as PUBLIC_FILE_FIELD_KINDS, w as entryIdentifierForCommand, wr as bookingQuestionAttachmentSchema, xn as require_dist, xr as asPageFlowPresetId, y as evaluateSiteCommandExposure, yt as isDisplayMediaKind, zr as slugPart } from "./sdk-event-upsert-SodZay6g.mjs";
3
- import { $t as businessCancellationRefusalCodes, At as formatLocalScheduleDate, Bn as parseDatedOfferingCapacityHoldId, C as getPublicReadCachePolicy, Cn as toNonNegativeCents, Dn as parseCurrencyCode, En as formatCurrencyAmount, G as parseMailingListProviderScope, Gt as validateBookingPaymentOptionKinds, In as parseMembershipId, It as parseBookingLocalDate, Jt as clampConfiguredAmount, K as parseFooterCompositionV1, Kt as isLiveOrderInstalmentPlanStatus, M as createSecret, Mn as unsafeAsAppointmentResourceId, N as exposeSecret, Nn as unsafeAsStaffMemberId, Nt as getLocalScheduleDate, On as assertNever, Ot as addLocalScheduleDays, P as parseManagementKey, Pn as parseCustomerId, Qt as splitAmountWithRemainderInFirst, Rn as unsafeAsPassId, S as PUBLIC_CONTENT_FRESHNESS_SECONDS, Sn as toCents, Sr as ok, T as publicReadFreshnessSeconds, Tn as unsafeAsPositiveCents, Ut as toUtcIsoDateTimeString, Yt as getBookingInstalmentDepositRefundability, Zt as omitZeroAmountFutureRows, _ as EVENT_PRESET_VALUES, _r as unsafeAsEventOfferingId, ar as parseEditorSessionGeneration, bn as parseNonNegativeCents, br as unsafeAsPricingOptionId, c as planTurningOnCourses, cr as parseApiKeyId, ct as locationValueSchema, d as areConfiguredBookingVerticalConfigsEqual, en as scheduleBookingReasonCodes, f as canonicalizeConfiguredBookingVerticalConfig, ft as publicLocationSchema, g as DEFAULT_EVENT_TYPE_PRESETS, gn as fromArray, gr as unsafeAsEventInstanceId, h as resolveSiteVerticalBookingConfig, ht as trimmedStringOrNull, ir as unsafeAsOrderPaymentPlanId, l as resolveEventCatalogue, lr as parseSiteId, m as parseVerticalPresetId, mr as parseRetiredCourseId, n as OFFLINE_PAYMENT_METHODS, nn as resolveFlexibleBalanceInitialPaymentCents, nr as unsafeAsCheckoutLineId, nt as assertAllowedPublicUrl, or as parsePageId, ot as stableJsonStringify, p as parseVerticalId, pr as parseEventSeriesId, qt as addIntervalPreservingMonthAnchor, r as committedWriteProofSchema, rr as unsafeAsOrderFlexibleBalanceContractId, tn as resolveFlexibleBalanceDueAt, ur as parseUserId, vr as unsafeAsEventSeriesId, vt as formatDate, w as isPublicReadEndpoint, wn as unsafeAsNonNegativeCents, x as PUBLIC_AVAILABILITY_FRESHNESS_SECONDS, xn as parsePositiveCents, xr as err, y as SURFACE_EVENT_PRESET_VALUES, yn as isNonNegativeWholeCents$1, yr as unsafeAsOccurrenceId, zn as parseDatedOfferingCapacityHoldAuditRef, zt as resolveBookingTimeZoneId } from "./src-CVyy-M-N.mjs";
4
- import { n as CliSdkPeerError, t as loadConfigFile } from "./load-config-CfL4ZWC8.mjs";
2
+ import { $n as headerStyleIdValues, At as getMimeType, Bt as footerPreferencesSchema, Cr as makeBoundaryId, Et as slugifyMediaIdentifier, Ft as MAX_MANAGEMENT_MEDIA_UPLOAD_BYTES, I as footerModeSchema, Ir as createSiteCommandSiteRef, Jn as asHeaderLayoutId, Kn as SUPPORTED_LOADER_ENDPOINTS, Mt as normalizeAmbiguousStoragePathForSite, Nn as RESOLVED_INTERNAL_LINK_ENTITY_TYPES, Or as createCommandRef, Pt as FILE_SIZE_LIMITS, Qn as headerLayoutIdValues, Sn as eventBookingOfferIntentSchema, Sr as asSiteStyleId, St as buildMediaIdentifierFromFilename, Tt as resolveMediaIdentifier, Un as ICON_PICKER_PRESETS, V as themeSchema, Xt as buttonStyleSelectionSchema, Yn as asHeaderStyleId, Zn as footerLookIdValues, _r as asDesignBoundaryId, at as parseAspectRatioValue, b as getSiteCommandMetadata, bt as mediaTypeDiscriminants, ct as getDirectImageUrlForSiteScopedPath, fr as asAppearancePresetId, gr as asDesignBlockId, h as parseAndPlanCommandBatchForTypes, k as headerPreferencesSchema, kr as createContentEntryRef, kt as getExtensionForMimeType, l as resolvePageUpsertSeo, m as createDryRunReport, n as sdkCourseBookingSettingsSchema, p as stableStringify, qn as asFooterLookId, r as sdkEventOccurrenceInputSchema, rr as SYSTEM_BLOCK_KINDS, s as eventVisibilitySchema, v as evaluateSiteCommandBatchExposure, vt as PUBLIC_FILE_FIELD_KINDS, w as entryIdentifierForCommand, wr as bookingQuestionAttachmentSchema, xn as require_dist, xr as asPageFlowPresetId, y as evaluateSiteCommandExposure, yt as isDisplayMediaKind, zr as slugPart } from "./sdk-event-upsert-B3Ln6jqq.mjs";
3
+ import { An as formatCurrencyAmount, Bn as parseMembershipId, C as PUBLIC_AVAILABILITY_FRESHNESS_SECONDS, Cn as isNonNegativeWholeCents$1, Cr as unsafeAsOccurrenceId, D as publicReadBatchFreshnessSeconds, Dn as toNonNegativeCents, E as isPublicReadEndpoint, En as toCents, Er as ok, F as createSecret, Hn as unsafeAsPassId, Ht as resolveBookingTimeZoneId, I as exposeSecret, In as unsafeAsAppointmentResourceId, It as getLocalScheduleDate, J as parseMailingListProviderScope, Jt as validateBookingPaymentOptionKinds, Kt as toUtcIsoDateTimeString, L as parseManagementKey, Ln as unsafeAsStaffMemberId, Mn as assertNever, Nt as formatLocalScheduleDate, O as publicReadFreshnessSeconds, On as unsafeAsNonNegativeCents, Qt as getBookingInstalmentDepositRefundability, Rn as parseCustomerId, Sr as unsafeAsEventSeriesId, T as getPublicReadCachePolicy, Tn as parsePositiveCents, Tr as err, Un as parseDatedOfferingCapacityHoldAuditRef, Wn as parseDatedOfferingCapacityHoldId, Xt as addIntervalPreservingMonthAnchor, Y as parseFooterCompositionV1, Yt as isLiveOrderInstalmentPlanStatus, Zt as clampConfiguredAmount, _ as resolveSiteVerticalBookingConfig, _r as parseEventSeriesId, an as resolveFlexibleBalanceDueAt, at as assertAllowedPublicUrl, bn as fromArray, br as unsafeAsEventInstanceId, cr as unsafeAsOrderPaymentPlanId, d as withBookingModulesForSelectionChange, dt as locationValueSchema, fr as parseApiKeyId, g as parseVerticalPresetId, h as parseVerticalId, ht as publicLocationSchema, in as scheduleBookingReasonCodes, jn as parseCurrencyCode, jt as addLocalScheduleDays, kn as unsafeAsPositiveCents, l as planTurningOnCourses, lr as parseEditorSessionGeneration, lt as stableJsonStringify, m as canonicalizeConfiguredBookingVerticalConfig, mr as parseUserId, n as OFFLINE_PAYMENT_METHODS, nn as splitAmountWithRemainderInFirst, on as resolveFlexibleBalanceInitialPaymentCents, or as unsafeAsCheckoutLineId, p as areConfiguredBookingVerticalConfigsEqual, pr as parseSiteId, r as committedWriteProofSchema, rn as businessCancellationRefusalCodes, sr as unsafeAsOrderFlexibleBalanceContractId, tn as omitZeroAmountFutureRows, u as resolveEventCatalogue, ur as parsePageId, v as DEFAULT_EVENT_TYPE_PRESETS, vr as parseRetiredCourseId, vt as trimmedStringOrNull, w as PUBLIC_CONTENT_FRESHNESS_SECONDS, wn as parseNonNegativeCents, wr as unsafeAsPricingOptionId, x as SURFACE_EVENT_PRESET_VALUES, xr as unsafeAsEventOfferingId, xt as formatDate, y as EVENT_PRESET_VALUES, zt as parseBookingLocalDate } from "./src-wXdYu3yt.mjs";
4
+ import { n as CliSdkPeerError, t as loadConfigFile } from "./load-config-CTuNN3xv.mjs";
5
5
  import { Command } from "commander";
6
6
  import { safeParse, z } from "zod";
7
7
  import { AsyncLocalStorage } from "node:async_hooks";
@@ -1603,16 +1603,23 @@ function buildPublicReadFetchTags(endpoint, params) {
1603
1603
  function buildPublicReadMemoryCacheTags(endpoint, params) {
1604
1604
  return getPublicReadCachePolicy(endpoint).kind === "live" ? [] : buildPublicReadFetchTags(endpoint, params);
1605
1605
  }
1606
- /** A transport batch inherits every dependency and its shortest freshness budget. */
1607
- function buildPublicReadFetchPolicy(siteId, reads) {
1606
+ function buildFetchPolicy(siteId, reads, freshnessSeconds) {
1608
1607
  return {
1609
1608
  tags: normalizeRevalidateTags(reads.flatMap(({ endpoint, params }) => isPublicReadEndpoint(endpoint) ? buildPublicReadFetchTags(endpoint, {
1610
1609
  ...params,
1611
1610
  siteId
1612
1611
  }) : buildCacheReadTags([], { siteId }))),
1613
- revalidate: Math.min(PUBLIC_CONTENT_FRESHNESS_SECONDS, ...reads.map(({ endpoint }) => isPublicReadEndpoint(endpoint) ? publicReadFreshnessSeconds(endpoint) : PUBLIC_AVAILABILITY_FRESHNESS_SECONDS))
1612
+ revalidate: Math.min(PUBLIC_CONTENT_FRESHNESS_SECONDS, ...reads.map(({ endpoint }) => isPublicReadEndpoint(endpoint) ? freshnessSeconds(endpoint) : PUBLIC_AVAILABILITY_FRESHNESS_SECONDS))
1614
1613
  };
1615
1614
  }
1615
+ /** A direct GET passes through the CDN, so what it stores keeps the short budget. */
1616
+ function buildPublicReadFetchPolicy(siteId, reads) {
1617
+ return buildFetchPolicy(siteId, reads, publicReadFreshnessSeconds);
1618
+ }
1619
+ /** A transport batch inherits every dependency and its shortest freshness budget. */
1620
+ function buildPublicReadBatchFetchPolicy(siteId, reads) {
1621
+ return buildFetchPolicy(siteId, reads, publicReadBatchFreshnessSeconds);
1622
+ }
1616
1623
 
1617
1624
  //#endregion
1618
1625
  //#region ../api/src/sdkEntryReadEndpoints.ts
@@ -2222,6 +2229,42 @@ const APPOINTMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
2222
2229
  "server:internal_error"
2223
2230
  ]
2224
2231
  },
2232
+ updateOwnTrainerProfile: {
2233
+ path: "/sites/{siteId}/bookings/my-trainer-profile",
2234
+ method: "PUT",
2235
+ auth: "user",
2236
+ responseKind: "json",
2237
+ errors: [
2238
+ "validation:invalid_input",
2239
+ "auth:forbidden",
2240
+ "resource:not_found",
2241
+ "server:internal_error"
2242
+ ]
2243
+ },
2244
+ createOwnTrainerPhotoUploadUrl: {
2245
+ path: "/sites/{siteId}/bookings/my-trainer-profile/photo/upload-url",
2246
+ method: "POST",
2247
+ tags: ["media"],
2248
+ auth: "user",
2249
+ responseKind: "json",
2250
+ errors: [
2251
+ "validation:invalid_input",
2252
+ "auth:forbidden",
2253
+ "server:internal_error"
2254
+ ]
2255
+ },
2256
+ finalizeOwnTrainerPhotoUpload: {
2257
+ path: "/sites/{siteId}/bookings/my-trainer-profile/photo/finalize",
2258
+ method: "POST",
2259
+ tags: ["media"],
2260
+ auth: "user",
2261
+ responseKind: "json",
2262
+ errors: [
2263
+ "validation:invalid_input",
2264
+ "auth:forbidden",
2265
+ "server:internal_error"
2266
+ ]
2267
+ },
2225
2268
  createTeamMemberProfile: {
2226
2269
  path: "/sites/{siteId}/bookings/resources/{resourceId}/profile",
2227
2270
  method: "POST",
@@ -2858,6 +2901,18 @@ const EVENT_SERIES_REGISTRATION_ENDPOINT_DEFINITIONS = defineEndpointDefinitions
2858
2901
  "server:internal_error"
2859
2902
  ]
2860
2903
  },
2904
+ findTransferRecipient: {
2905
+ path: "/sites/{siteId}/bookings/transfer-recipient",
2906
+ method: "POST",
2907
+ auth: "user",
2908
+ responseKind: "json",
2909
+ demoMutation: DEMO_MUTATION_ALLOWED,
2910
+ errors: [
2911
+ "validation:invalid_input",
2912
+ "auth:forbidden",
2913
+ "server:internal_error"
2914
+ ]
2915
+ },
2861
2916
  correctBookingCheckIn: {
2862
2917
  path: "/sites/{siteId}/bookings/attendees/{attendeeId}/check-in",
2863
2918
  method: "PATCH",
@@ -3935,6 +3990,22 @@ const publicVenueMapLocationSchema = publicLocationSchema.unwrap().extend({
3935
3990
  addressWithBooking: z.boolean().optional()
3936
3991
  }).readonly();
3937
3992
 
3993
+ //#endregion
3994
+ //#region ../site-contracts/src/siteData/mapLocation.ts
3995
+ /** Site and preview authority belong to transport, never to the selected source. */
3996
+ const publicMapLocationParamsSchema = z.discriminatedUnion("source", [z.object({
3997
+ source: z.literal("venue"),
3998
+ venueId: z.string().uuid()
3999
+ }), z.object({ source: z.literal("business_address") })]);
4000
+ const publicMapLocationResultSchema = z.discriminatedUnion("kind", [
4001
+ z.object({
4002
+ kind: z.literal("shown"),
4003
+ location: publicVenueMapLocationSchema
4004
+ }),
4005
+ z.object({ kind: z.literal("hidden") }),
4006
+ z.object({ kind: z.literal("not_found") })
4007
+ ]);
4008
+
3938
4009
  //#endregion
3939
4010
  //#region ../site-contracts/src/siteData/eventVocabulary.ts
3940
4011
  const eventCalendarDisplayModeValues = [
@@ -5691,8 +5762,8 @@ function refundAmountOutcome(input, requestedAmountCents) {
5691
5762
 
5692
5763
  //#endregion
5693
5764
  //#region ../commerce/src/purchase/confirmationPaymentSchema.ts
5694
- const settledBalanceSchema = z.strictObject({ kind: z.literal("settled") });
5695
- const dueBalanceSchema = z.strictObject({
5765
+ const settledBalanceSchema = z.object({ kind: z.literal("settled") });
5766
+ const dueBalanceSchema = z.object({
5696
5767
  kind: z.literal("due"),
5697
5768
  amountCents: z.number().int().positive().transform((value, ctx) => {
5698
5769
  const cents$2 = parsePositiveCents(value);
@@ -5711,37 +5782,50 @@ const moneyFields = {
5711
5782
  amountPaidCents: z.number().int().nonnegative().transform(toNonNegativeCents),
5712
5783
  currency: currencySchema
5713
5784
  };
5785
+ const discountFields = { discount: z.object({
5786
+ code: z.string().min(1),
5787
+ savingCents: z.number().int().positive(),
5788
+ currency: currencySchema
5789
+ }).optional() };
5714
5790
  const confirmationPaymentSchema = z.discriminatedUnion("kind", [
5715
- z.strictObject({
5791
+ z.object({
5792
+ ...discountFields,
5716
5793
  kind: z.literal("free"),
5717
5794
  balance: settledBalanceSchema
5718
5795
  }),
5719
- z.strictObject({
5796
+ z.object({
5797
+ ...discountFields,
5720
5798
  kind: z.literal("waived"),
5721
5799
  balance: settledBalanceSchema
5722
5800
  }),
5723
- z.strictObject({
5801
+ z.object({
5802
+ ...discountFields,
5724
5803
  kind: z.literal("pass"),
5725
5804
  passName: z.string().nullable(),
5726
5805
  passCreditsUsed: z.number().int().positive().nullable(),
5806
+ passCreditsRemaining: z.number().int().nonnegative().optional(),
5727
5807
  balance: settledBalanceSchema
5728
5808
  }),
5729
- z.strictObject({
5809
+ z.object({
5810
+ ...discountFields,
5730
5811
  kind: z.literal("membership"),
5731
5812
  membershipName: z.string().nullable(),
5732
5813
  balance: settledBalanceSchema
5733
5814
  }),
5734
- z.strictObject({
5815
+ z.object({
5816
+ ...discountFields,
5735
5817
  kind: z.literal("manual_due"),
5736
5818
  currency: currencySchema,
5737
5819
  balance: dueBalanceSchema
5738
5820
  }),
5739
- z.strictObject({
5821
+ z.object({
5822
+ ...discountFields,
5740
5823
  kind: z.literal("managed_balance_due"),
5741
5824
  ...moneyFields,
5742
5825
  balance: dueBalanceSchema
5743
5826
  }),
5744
- z.strictObject({
5827
+ z.object({
5828
+ ...discountFields,
5745
5829
  kind: z.literal("monetary"),
5746
5830
  ...moneyFields,
5747
5831
  paymentMethod: z.enum([
@@ -5937,6 +6021,7 @@ function buildConfirmationPaymentCandidate(input) {
5937
6021
  kind: "pass",
5938
6022
  passName: input.passName ?? null,
5939
6023
  passCreditsUsed: input.passCreditsUsed ?? null,
6024
+ ...input.passCreditsRemaining !== undefined ? { passCreditsRemaining: input.passCreditsRemaining } : {},
5940
6025
  balance: { kind: "settled" }
5941
6026
  });
5942
6027
  case "membership": return ok({
@@ -5968,7 +6053,8 @@ function buildNonMonetaryConfirmationEmailPaymentSummary(options) {
5968
6053
  case "pass": return {
5969
6054
  kind: "pass",
5970
6055
  passName: options.passName,
5971
- passCreditsUsed: options.passCreditsUsed
6056
+ passCreditsUsed: options.passCreditsUsed,
6057
+ ...options.passCreditsRemaining !== undefined ? { passCreditsRemaining: options.passCreditsRemaining } : {}
5972
6058
  };
5973
6059
  case "membership": return {
5974
6060
  kind: "membership",
@@ -5990,13 +6076,20 @@ function buildMonetaryConfirmationEmailPaymentSummary(options) {
5990
6076
  }
5991
6077
  /** Email copy projection; this function never decides settlement. */
5992
6078
  function toConfirmationEmailPaymentSummary(payment) {
6079
+ return {
6080
+ ...projectConfirmationEmailPaymentSummary(payment),
6081
+ ...payment.discount ? { discount: payment.discount } : {}
6082
+ };
6083
+ }
6084
+ function projectConfirmationEmailPaymentSummary(payment) {
5993
6085
  switch (payment.kind) {
5994
6086
  case "free": return { kind: "free" };
5995
6087
  case "waived": return { kind: "waived" };
5996
6088
  case "pass": return {
5997
6089
  kind: "pass",
5998
6090
  passName: payment.passName ?? undefined,
5999
- passCreditsUsed: payment.passCreditsUsed ?? undefined
6091
+ passCreditsUsed: payment.passCreditsUsed ?? undefined,
6092
+ ...payment.passCreditsRemaining !== undefined ? { passCreditsRemaining: payment.passCreditsRemaining } : {}
6000
6093
  };
6001
6094
  case "membership": return {
6002
6095
  kind: "membership",
@@ -6641,26 +6734,14 @@ function planPassItem(item, input) {
6641
6734
  } : noActions();
6642
6735
  }
6643
6736
  function planMembershipItem(item, input) {
6644
- if (hasMembershipBundleFulfillment(item.metadata)) {
6645
- if (!item.eventAttendeeId) return {
6646
- actions: [],
6647
- warnings: [{
6648
- kind: "missing_event_attendee_id",
6649
- orderId: item.orderId,
6650
- orderItemId: item.id
6651
- }]
6652
- };
6653
- const facts = input.bookingFacts.get(item.eventAttendeeId);
6654
- return facts ? {
6655
- warnings: [],
6656
- actions: [{
6657
- kind: "send_membership_bundle_confirmation",
6658
- facts,
6659
- metadata: item.metadata
6660
- }]
6661
- } : noActions();
6662
- }
6663
- if (!item.customerMembershipId) return {
6737
+ const activation = item.customerMembershipId ? {
6738
+ warnings: [],
6739
+ actions: [{
6740
+ kind: "send_membership_activation",
6741
+ customerMembershipId: item.customerMembershipId,
6742
+ amountPaidCents: settledOrderItemTotalCents(item)
6743
+ }]
6744
+ } : {
6664
6745
  actions: [],
6665
6746
  warnings: [{
6666
6747
  kind: "missing_customer_membership_id",
@@ -6668,14 +6749,24 @@ function planMembershipItem(item, input) {
6668
6749
  orderItemId: item.id
6669
6750
  }]
6670
6751
  };
6671
- return {
6672
- warnings: [],
6673
- actions: [{
6674
- kind: "send_membership_activation",
6675
- customerMembershipId: item.customerMembershipId,
6676
- amountPaidCents: settledOrderItemTotalCents(item)
6752
+ if (!hasMembershipBundleFulfillment(item.metadata)) return activation;
6753
+ if (!item.eventAttendeeId) return {
6754
+ ...activation,
6755
+ warnings: [...activation.warnings, {
6756
+ kind: "missing_event_attendee_id",
6757
+ orderId: item.orderId,
6758
+ orderItemId: item.id
6677
6759
  }]
6678
6760
  };
6761
+ const facts = input.bookingFacts.get(item.eventAttendeeId);
6762
+ return facts ? {
6763
+ ...activation,
6764
+ actions: [...activation.actions, {
6765
+ kind: "send_membership_bundle_confirmation",
6766
+ facts,
6767
+ metadata: item.metadata
6768
+ }]
6769
+ } : activation;
6679
6770
  }
6680
6771
  function planItem(item, input) {
6681
6772
  switch (item.kind) {
@@ -8415,6 +8506,11 @@ const eventRegistrationErrors = {
8415
8506
  message: "Booking is currently closed for this event. Please contact the organiser if you’d like to find out more.",
8416
8507
  action: "none"
8417
8508
  },
8509
+ siteNotTakingBookings: {
8510
+ endsCommand: false,
8511
+ message: "This business isn’t taking online bookings right now. Please contact them if you’d like to book.",
8512
+ action: "none"
8513
+ },
8418
8514
  paymentInvestigationRequired: {
8419
8515
  endsCommand: false,
8420
8516
  message: "We still can’t confirm your payment. Please don’t make another payment. Contact the organiser so they can check your booking.",
@@ -8604,10 +8700,14 @@ function discountCodeAppliesTo(code, scopes, context, now) {
8604
8700
  membership: code.appliesToMemberships,
8605
8701
  product: code.appliesToProducts
8606
8702
  }[context.type];
8607
- return enabled && code.isActive && isWithinDiscountWindow(code, now) && matchesDiscountContext(code, scopes, context);
8703
+ return enabled && discountCodeAvailabilityMessage(code, now) === null && matchesDiscountContext(code, scopes, context);
8608
8704
  }
8609
- function isWithinDiscountWindow(code, now) {
8610
- return !(code.startsAt !== null && code.startsAt > now) && !(code.endsAt !== null && code.endsAt < now);
8705
+ /** Public refusal wording also owns the lifecycle check used by applicability. */
8706
+ function discountCodeAvailabilityMessage(code, now) {
8707
+ if (!code.isActive) return "We don't recognise that code.";
8708
+ if (code.startsAt !== null && code.startsAt > now) return "This code isn't active yet.";
8709
+ if (code.endsAt !== null && code.endsAt < now) return "This code has ended.";
8710
+ return null;
8611
8711
  }
8612
8712
  function matchesDiscountContext(code, scopes, context) {
8613
8713
  switch (context.type) {
@@ -9496,22 +9596,27 @@ function describeOrderPayment(position, audience, format) {
9496
9596
 
9497
9597
  //#endregion
9498
9598
  //#region ../site-contracts/src/siteData/eventCheckout.ts
9599
+ /**
9600
+ * What a browser or SDK decodes. Unknown fields are ignored, so the server can add a
9601
+ * field without breaking bundles already deployed. Bundles up to sdk-v0.169.1 were
9602
+ * strict: eventBookingResponseForClient keeps their responses to the shape they know.
9603
+ */
9499
9604
  const uuid = z.string().uuid();
9500
9605
  const eventRegistrationStatusReferenceSchema = z.discriminatedUnion("scope", [z.object({
9501
9606
  scope: z.literal("occurrence"),
9502
9607
  attendeeId: uuid
9503
- }).strict(), z.object({
9608
+ }), z.object({
9504
9609
  scope: z.literal("wholeSeries"),
9505
9610
  registrationId: uuid
9506
- }).strict()]);
9611
+ })]);
9507
9612
  const eventRegistrationPaymentSubjectSchema = z.discriminatedUnion("scope", [z.object({
9508
9613
  scope: z.literal("occurrence"),
9509
9614
  submissionId: uuid,
9510
9615
  attendeeId: uuid
9511
- }).strict(), z.object({
9616
+ }), z.object({
9512
9617
  scope: z.literal("wholeSeries"),
9513
9618
  submissionId: uuid
9514
- }).strict()]);
9619
+ })]);
9515
9620
  const identityFields = {
9516
9621
  submissionId: uuid,
9517
9622
  seriesId: uuid,
@@ -9522,15 +9627,15 @@ const confirmedBookingIdentitySchema = z.discriminatedUnion("scope", [z.object({
9522
9627
  attendeeId: uuid,
9523
9628
  occurrenceId: uuid,
9524
9629
  ...identityFields
9525
- }).strict(), z.object({
9630
+ }), z.object({
9526
9631
  scope: z.literal("wholeSeries"),
9527
9632
  registrationId: uuid,
9528
9633
  ...identityFields
9529
- }).strict()]);
9634
+ })]);
9530
9635
  const bookedTicketLineSchema = z.object({
9531
9636
  label: z.string().min(1),
9532
9637
  quantity: z.number().int().positive()
9533
- }).strict();
9638
+ });
9534
9639
  const arrivalFields = { arrivalVenues: z.record(uuid, z.string()).optional() };
9535
9640
  const eventBookingOutcomeSchema = z.discriminatedUnion("kind", [z.object({
9536
9641
  kind: z.literal("detailsAvailable"),
@@ -9538,16 +9643,16 @@ const eventBookingOutcomeSchema = z.discriminatedUnion("kind", [z.object({
9538
9643
  ticketLines: z.tuple([bookedTicketLineSchema]).rest(bookedTicketLineSchema).readonly(),
9539
9644
  payment: confirmationPaymentSchema,
9540
9645
  ...arrivalFields
9541
- }).strict(), z.object({
9646
+ }), z.object({
9542
9647
  kind: z.literal("detailsUnavailable"),
9543
9648
  identity: confirmedBookingIdentitySchema,
9544
9649
  ...arrivalFields
9545
- }).strict()]);
9650
+ })]);
9546
9651
  const priceReductionSummarySchema = z.object({
9547
9652
  kind: z.enum(["discount_code", "combination_price"]),
9548
9653
  label: z.string(),
9549
9654
  amountCents: z.number().int().nonnegative()
9550
- }).strict();
9655
+ });
9551
9656
  const eventEmbeddedCheckoutSchema = z.object({
9552
9657
  priceReductions: z.tuple([priceReductionSummarySchema]).rest(priceReductionSummarySchema).readonly().optional(),
9553
9658
  kind: z.literal("embedded"),
@@ -9559,11 +9664,11 @@ const eventEmbeddedCheckoutSchema = z.object({
9559
9664
  kind: z.literal("connect"),
9560
9665
  publishableKey: z.string().min(1),
9561
9666
  accountId: z.string().min(1)
9562
- }).strict(), z.object({
9667
+ }), z.object({
9563
9668
  kind: z.literal("direct"),
9564
9669
  publishableKey: z.string().min(1)
9565
- }).strict()])
9566
- }).strict();
9670
+ })])
9671
+ });
9567
9672
  const decorations = {
9568
9673
  mailingListSignupNote: z.enum(["confirmation_required", "not_confirmed"]).optional(),
9569
9674
  demoBookingPass: z.string().optional()
@@ -9571,7 +9676,7 @@ const decorations = {
9571
9676
  const eventRegistrationSummarySchema = z.object({
9572
9677
  message: z.string(),
9573
9678
  passCreditsRemaining: z.number().int().nonnegative().optional()
9574
- }).strict();
9679
+ });
9575
9680
  const bookingOutcomesSchema = z.tuple([eventBookingOutcomeSchema]).rest(eventBookingOutcomeSchema).readonly().refine((outcomes) => outcomes.length <= MAX_EVENT_BOOKING_SELECTION_ITEMS, "Too many booking outcomes");
9576
9681
  const bookingReferencesSchema = z.tuple([eventRegistrationStatusReferenceSchema]).rest(eventRegistrationStatusReferenceSchema).readonly().refine((references) => references.length <= MAX_EVENT_BOOKING_SELECTION_ITEMS, "Too many booking references");
9577
9682
  const registrationIdsSchema = z.tuple([uuid]).rest(uuid).readonly().refine((ids) => ids.length <= MAX_EVENT_BOOKING_SELECTION_ITEMS, "Too many registrations");
@@ -9582,7 +9687,7 @@ const eventRegisterResponseSchema = z.discriminatedUnion("kind", [
9582
9687
  outcomes: bookingOutcomesSchema.optional(),
9583
9688
  summary: eventRegistrationSummarySchema,
9584
9689
  ...decorations
9585
- }).strict(),
9690
+ }),
9586
9691
  z.object({
9587
9692
  kind: z.literal("checkoutRequired"),
9588
9693
  reference: eventRegistrationStatusReferenceSchema,
@@ -9590,28 +9695,28 @@ const eventRegisterResponseSchema = z.discriminatedUnion("kind", [
9590
9695
  checkout: eventEmbeddedCheckoutSchema,
9591
9696
  submissionId: uuid,
9592
9697
  ...decorations
9593
- }).strict(),
9698
+ }),
9594
9699
  z.object({
9595
9700
  kind: z.literal("paymentStatusRequired"),
9596
9701
  subject: eventRegistrationPaymentSubjectSchema,
9597
9702
  ...decorations
9598
- }).strict(),
9703
+ }),
9599
9704
  z.object({
9600
9705
  kind: z.literal("waitlisted"),
9601
9706
  waitlist: z.object({
9602
9707
  reference: z.union([z.object({
9603
9708
  scope: z.literal("occurrence"),
9604
9709
  attendeeId: uuid
9605
- }).strict(), z.object({
9710
+ }), z.object({
9606
9711
  scope: z.enum(["occurrence", "wholeSeries"]),
9607
9712
  waitlistEntryId: uuid
9608
- }).strict()]),
9713
+ })]),
9609
9714
  position: z.number().int().nonnegative().nullable(),
9610
9715
  message: z.string(),
9611
9716
  emailFollowupMessage: z.string().optional()
9612
- }).strict(),
9717
+ }),
9613
9718
  ...decorations
9614
- }).strict()
9719
+ })
9615
9720
  ]).superRefine((response, ctx) => {
9616
9721
  if (response.kind === "bookingComplete") validateOutcomeList(response, ctx);
9617
9722
  if (response.kind === "checkoutRequired") validateReferenceList(response, ctx);
@@ -9621,37 +9726,37 @@ const checkoutStatusArms = [
9621
9726
  kind: z.literal("resolved"),
9622
9727
  outcome: eventBookingOutcomeSchema,
9623
9728
  outcomes: bookingOutcomesSchema.optional()
9624
- }).strict().superRefine(validateOutcomeList),
9625
- z.object({ kind: z.literal("abandoned") }).strict(),
9626
- z.object({ kind: z.literal("reconciliationRequired") }).strict(),
9729
+ }).superRefine(validateOutcomeList),
9730
+ z.object({ kind: z.literal("abandoned") }),
9731
+ z.object({ kind: z.literal("reconciliationRequired") }),
9627
9732
  z.object({
9628
9733
  kind: z.literal("paymentProcessing"),
9629
9734
  recoverableUntil: z.string().optional()
9630
- }).strict(),
9735
+ }),
9631
9736
  z.object({
9632
9737
  kind: z.literal("paymentAvailable"),
9633
9738
  references: bookingReferencesSchema.optional(),
9634
9739
  checkout: eventEmbeddedCheckoutSchema,
9635
9740
  recoverableUntil: z.string().optional()
9636
- }).strict(),
9741
+ }),
9637
9742
  z.object({
9638
9743
  kind: z.literal("paymentRetryAvailable"),
9639
9744
  place: z.enum(["held", "released"])
9640
- }).strict(),
9745
+ }),
9641
9746
  z.object({
9642
9747
  kind: z.literal("paymentCheckUnavailable"),
9643
9748
  recoverableUntil: z.string().optional()
9644
- }).strict(),
9645
- z.object({ kind: z.literal("paymentAssistanceRequired") }).strict()
9749
+ }),
9750
+ z.object({ kind: z.literal("paymentAssistanceRequired") })
9646
9751
  ];
9647
9752
  const eventCheckoutReturnResponseSchema = z.discriminatedUnion("kind", [
9648
9753
  z.object({
9649
9754
  kind: z.literal("checkout"),
9650
9755
  subject: eventRegistrationPaymentSubjectSchema,
9651
9756
  outcome: z.discriminatedUnion("kind", checkoutStatusArms)
9652
- }).strict(),
9653
- z.object({ kind: z.literal("notFound") }).strict(),
9654
- z.object({ kind: z.literal("reconciliationRequired") }).strict()
9757
+ }),
9758
+ z.object({ kind: z.literal("notFound") }),
9759
+ z.object({ kind: z.literal("reconciliationRequired") })
9655
9760
  ]).superRefine((response, ctx) => {
9656
9761
  if (response.kind !== "checkout" || response.outcome.kind !== "resolved") return;
9657
9762
  if (!identityMatchesSubject(response.outcome.outcome.identity, response.subject)) {
@@ -9669,21 +9774,21 @@ const eventCheckoutResponseSchema = z.union([
9669
9774
  scope: z.literal("occurrence"),
9670
9775
  outcome: eventBookingOutcomeSchema,
9671
9776
  ...checkoutDecorations
9672
- }).strict(),
9777
+ }),
9673
9778
  z.object({
9674
9779
  kind: z.literal("completed"),
9675
9780
  scope: z.literal("wholeSeries"),
9676
9781
  outcome: eventBookingOutcomeSchema,
9677
9782
  outcomes: bookingOutcomesSchema.optional(),
9678
9783
  ...checkoutDecorations
9679
- }).strict(),
9784
+ }),
9680
9785
  z.object({
9681
9786
  kind: z.literal("checkoutRequired"),
9682
9787
  scope: z.literal("occurrence"),
9683
9788
  attendeeId: uuid,
9684
9789
  checkout: eventEmbeddedCheckoutSchema,
9685
9790
  ...checkoutDecorations
9686
- }).strict(),
9791
+ }),
9687
9792
  z.object({
9688
9793
  kind: z.literal("checkoutRequired"),
9689
9794
  scope: z.literal("wholeSeries"),
@@ -9693,14 +9798,14 @@ const eventCheckoutResponseSchema = z.union([
9693
9798
  checkout: eventEmbeddedCheckoutSchema,
9694
9799
  recoverableUntil: z.string().optional(),
9695
9800
  ...checkoutDecorations
9696
- }).strict(),
9801
+ }),
9697
9802
  z.object({
9698
9803
  scope: z.literal("wholeSeries"),
9699
9804
  status: z.literal("paymentStatusRequired"),
9700
9805
  checkoutAttemptId: uuid,
9701
9806
  recoverableUntil: z.string().optional(),
9702
9807
  ...checkoutDecorations
9703
- }).strict(),
9808
+ }),
9704
9809
  z.object({
9705
9810
  scope: z.literal("wholeSeries"),
9706
9811
  status: z.literal("waitlist"),
@@ -9708,7 +9813,7 @@ const eventCheckoutResponseSchema = z.union([
9708
9813
  waitlistPosition: z.number().int().nonnegative().nullable(),
9709
9814
  alreadyRegistered: z.boolean().optional(),
9710
9815
  ...checkoutDecorations
9711
- }).strict()
9816
+ })
9712
9817
  ]).superRefine((response, ctx) => {
9713
9818
  if (!("kind" in response)) return;
9714
9819
  if (response.kind === "completed") {
@@ -11276,6 +11381,18 @@ const BOOKING_PEOPLE_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
11276
11381
  "server:internal_error"
11277
11382
  ]
11278
11383
  },
11384
+ exportPersonDataReadable: {
11385
+ path: "/sites/{siteId}/bookings/people/{personId}/export.html",
11386
+ method: "GET",
11387
+ auth: "user",
11388
+ responseKind: "blob",
11389
+ tags: ["site-{siteId}", "customers-{siteId}"],
11390
+ errors: [
11391
+ "auth:forbidden",
11392
+ "resource:not_found",
11393
+ "server:internal_error"
11394
+ ]
11395
+ },
11279
11396
  lookupBookingPersonByEmail: {
11280
11397
  path: "/sites/{siteId}/bookings/people/lookup-email",
11281
11398
  method: "POST",
@@ -11288,6 +11405,18 @@ const BOOKING_PEOPLE_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
11288
11405
  "server:internal_error"
11289
11406
  ]
11290
11407
  },
11408
+ addStaffClient: {
11409
+ path: "/sites/{siteId}/bookings/people/add-client",
11410
+ method: "POST",
11411
+ tags: ["site-{siteId}", "customers-{siteId}"],
11412
+ auth: "user",
11413
+ responseKind: "json",
11414
+ errors: [
11415
+ "auth:forbidden",
11416
+ "validation:invalid_input",
11417
+ "server:internal_error"
11418
+ ]
11419
+ },
11291
11420
  getBookingPerson: {
11292
11421
  path: "/sites/{siteId}/bookings/people/{personId}",
11293
11422
  method: "GET",
@@ -11794,18 +11923,6 @@ const ENDPOINT_DEFINITIONS = {
11794
11923
  "server:internal_error"
11795
11924
  ]
11796
11925
  },
11797
- turnOnCourses: {
11798
- path: "/sites/{siteId}/bookings/settings/courses",
11799
- method: "POST",
11800
- tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteBookingSettings],
11801
- auth: "user",
11802
- responseKind: "json",
11803
- errors: [
11804
- "auth:forbidden",
11805
- "resource:conflict",
11806
- "server:internal_error"
11807
- ]
11808
- },
11809
11926
  sendTestEmail: {
11810
11927
  path: "/sites/{siteId}/settings/emails/test",
11811
11928
  method: "POST",
@@ -13203,6 +13320,19 @@ const ENDPOINT_DEFINITIONS = {
13203
13320
  ],
13204
13321
  responseKind: "json"
13205
13322
  },
13323
+ accountUpdateName: {
13324
+ path: "/account/name",
13325
+ method: "POST",
13326
+ tags: ["account"],
13327
+ auth: "user",
13328
+ errors: [
13329
+ "auth:unauthenticated",
13330
+ "auth:forbidden",
13331
+ "validation:invalid_input",
13332
+ "server:internal_error"
13333
+ ],
13334
+ responseKind: "json"
13335
+ },
13206
13336
  accountDismissTwoStepPrompt: {
13207
13337
  path: "/account/two-step-prompt/dismiss",
13208
13338
  method: "POST",
@@ -15582,6 +15712,7 @@ const ENDPOINT_DEFINITIONS = {
15582
15712
  responseKind: "json",
15583
15713
  errors: [
15584
15714
  "validation:invalid_input",
15715
+ "auth:forbidden",
15585
15716
  "resource:already_exists",
15586
15717
  "server:internal_error"
15587
15718
  ]
@@ -17186,7 +17317,7 @@ const BookingVerticalConfigSchema = z.object({
17186
17317
  //#region ../api/src/sdkBookingVerticalSchemas.ts
17187
17318
  const sdkConfiguredBookingVerticalConfigSchema = z.object({
17188
17319
  verticalId: VerticalIdSchema,
17189
- selectedPresetIds: z.tuple([VerticalPresetIdSchema]).rest(VerticalPresetIdSchema)
17320
+ selectedPresetIds: z.array(VerticalPresetIdSchema)
17190
17321
  }).transform((config, context) => {
17191
17322
  const canonical = canonicalizeConfiguredBookingVerticalConfig(config);
17192
17323
  if (canonical.ok) return canonical.config;
@@ -17225,9 +17356,6 @@ const sdkVerticalConfigIssueSchema = z.discriminatedUnion("code", [
17225
17356
  z.object({ code: z.literal("future_preset_selected") })
17226
17357
  ]);
17227
17358
  const sdkBookingSettingsWarningSchema = z.discriminatedUnion("code", [z.object({
17228
- code: z.literal("booking_module_disabled"),
17229
- module: z.enum(["appointments", "events"])
17230
- }), z.object({
17231
17359
  code: z.literal("replaced_invalid_current_config"),
17232
17360
  issues: z.array(sdkVerticalConfigIssueSchema)
17233
17361
  })]);
@@ -17514,7 +17642,8 @@ const pageDesignBoundaryTreatmentSchema = z.discriminatedUnion("kind", [
17514
17642
  "medium",
17515
17643
  "large"
17516
17644
  ]),
17517
- echo: z.literal(true).optional()
17645
+ echo: z.literal(true).optional(),
17646
+ bulge: z.literal(true).optional()
17518
17647
  }).strict(),
17519
17648
  z.object({
17520
17649
  kind: z.literal("angle-edge"),
@@ -18292,6 +18421,19 @@ const BOOKING_SETTINGS_SECTION_LABELS = {
18292
18421
  appointments: "Appointments",
18293
18422
  messages: "Messages"
18294
18423
  };
18424
+ /**
18425
+ * The settings tabs a site sees, in order. Events and Appointments only appear
18426
+ * while that module is on; the sidebar and the tab bar both read this.
18427
+ */
18428
+ function visibleBookingSettingsSections(modules) {
18429
+ return [
18430
+ "basics",
18431
+ "payments",
18432
+ ...modules.events ? ["events"] : [],
18433
+ ...modules.appointments ? ["appointments"] : [],
18434
+ "messages"
18435
+ ];
18436
+ }
18295
18437
  const BOOKING_SETTINGS_SECTION_KEYS = {
18296
18438
  basics: [
18297
18439
  "modules",
@@ -18837,7 +18979,7 @@ function applyBookingSettingsSectionUpdate(settings, update) {
18837
18979
  };
18838
18980
  }
18839
18981
  function applyBookingSettingsSectionUpdates(settings, updates) {
18840
- return updates.reduce(applyBookingSettingsSectionUpdate, settings);
18982
+ return withBookingModulesForSelectionChange(settings, updates.reduce(applyBookingSettingsSectionUpdate, settings));
18841
18983
  }
18842
18984
  /** Normalize optional wire defaults once before projecting operational Event policy. */
18843
18985
  function resolveBookingSettingsEventCatalogue(settings) {
@@ -22098,11 +22240,8 @@ function suggestionForManagementError(error) {
22098
22240
  */
22099
22241
  function getSuggestionForHttpError(error) {
22100
22242
  const { statusCode, code, details } = error;
22101
- if (statusCode === 400 && hasFieldErrors$1(details)) {
22102
- return "Config validation failed. Review the field errors above.";
22103
- }
22104
- if (statusCode === 400) {
22105
- return "Request validation failed. Check the error details above.";
22243
+ if (statusCode === 400 || statusCode === 422) {
22244
+ return hasFieldErrors$1(details) ? "Config validation failed. Review the field errors above." : "Request validation failed. Check the error details above.";
22106
22245
  }
22107
22246
  if (statusCode === 401) {
22108
22247
  return errorSuggestions["sdk:unauthorized"];
@@ -24023,7 +24162,7 @@ function resolveBatchReadFetchPolicy(params, body) {
24023
24162
  if (params?.stage === "preview" || typeof params?.siteId !== "string") return null;
24024
24163
  const parsed = batchReadPolicyBodySchema.safeParse(body);
24025
24164
  if (!parsed.success) return null;
24026
- return buildPublicReadFetchPolicy(params.siteId, parsed.data.requests);
24165
+ return buildPublicReadBatchFetchPolicy(params.siteId, parsed.data.requests);
24027
24166
  }
24028
24167
  function batchReadRequestOptions(params, body, options) {
24029
24168
  if (options.cache === "no-store") return options;
@@ -26477,7 +26616,7 @@ const SETTINGS_SURFACE_POLICIES = {
26477
26616
  surfaceId: "settings.bookings",
26478
26617
  navVisibilityPolicy: administratorPolicy,
26479
26618
  pageAccessPolicy: administratorPolicy,
26480
- actionIds: ["bookings.updateSettings", "bookings.turnOnCourses"]
26619
+ actionIds: ["bookings.updateSettings"]
26481
26620
  },
26482
26621
  "settings.redirects": {
26483
26622
  surfaceId: "settings.redirects",
@@ -26565,7 +26704,6 @@ const SETTINGS_SURFACE_POLICIES = {
26565
26704
  const SETTINGS_ACTION_POLICIES = {
26566
26705
  "privacy.update": administratorPolicy,
26567
26706
  "bookings.updateSettings": editorPolicy,
26568
- "bookings.turnOnCourses": editorPolicy,
26569
26707
  "emails.read": editorPolicy,
26570
26708
  "emails.update": administratorPolicy,
26571
26709
  "emails.updateSendSetting": editorPolicy,
@@ -26621,7 +26759,8 @@ const DASHBOARD_SETTINGS_NAV_GROUPS = [
26621
26759
  "newsletter",
26622
26760
  "analytics"
26623
26761
  ],
26624
- stage: "ga"
26762
+ stage: "ga",
26763
+ sidebar: "websites_only"
26625
26764
  },
26626
26765
  {
26627
26766
  id: "settings.general",
@@ -26704,20 +26843,8 @@ const DASHBOARD_SETTINGS_NAV_GROUPS = [
26704
26843
  "otf",
26705
26844
  "upload"
26706
26845
  ],
26707
- stage: "ga"
26708
- },
26709
- {
26710
- id: "settings.bookings",
26711
- label: "Bookings",
26712
- keywords: [
26713
- "bookings",
26714
- "appointments",
26715
- "events",
26716
- "classes",
26717
- "enable",
26718
- "disable"
26719
- ],
26720
- stage: "ga"
26846
+ stage: "ga",
26847
+ sidebar: "websites_only"
26721
26848
  },
26722
26849
  {
26723
26850
  id: "settings.redirects",
@@ -26729,7 +26856,8 @@ const DASHBOARD_SETTINGS_NAV_GROUPS = [
26729
26856
  "301",
26730
26857
  "302"
26731
26858
  ],
26732
- stage: "ga"
26859
+ stage: "ga",
26860
+ sidebar: "websites_only"
26733
26861
  },
26734
26862
  {
26735
26863
  id: "settings.emails",
@@ -26764,7 +26892,8 @@ const DASHBOARD_SETTINGS_NAV_GROUPS = [
26764
26892
  "industry",
26765
26893
  "goals"
26766
26894
  ],
26767
- stage: "internal"
26895
+ stage: "internal",
26896
+ sidebar: "never"
26768
26897
  },
26769
26898
  {
26770
26899
  id: "settings.ai.brandGuidelines",
@@ -26778,7 +26907,8 @@ const DASHBOARD_SETTINGS_NAV_GROUPS = [
26778
26907
  "guidelines",
26779
26908
  "writing"
26780
26909
  ],
26781
- stage: "internal"
26910
+ stage: "internal",
26911
+ sidebar: "never"
26782
26912
  },
26783
26913
  {
26784
26914
  id: "settings.ai.iconStyleGuide",
@@ -26791,7 +26921,8 @@ const DASHBOARD_SETTINGS_NAV_GROUPS = [
26791
26921
  "generation",
26792
26922
  "visual"
26793
26923
  ],
26794
- stage: "internal"
26924
+ stage: "internal",
26925
+ sidebar: "never"
26795
26926
  }
26796
26927
  ]
26797
26928
  },
@@ -26833,7 +26964,8 @@ const DASHBOARD_SETTINGS_NAV_GROUPS = [
26833
26964
  "headless",
26834
26965
  "developer"
26835
26966
  ],
26836
- stage: "ga"
26967
+ stage: "ga",
26968
+ sidebar: "websites_only"
26837
26969
  },
26838
26970
  {
26839
26971
  id: "settings.logs",
@@ -26844,7 +26976,8 @@ const DASHBOARD_SETTINGS_NAV_GROUPS = [
26844
26976
  "errors",
26845
26977
  "diagnostics"
26846
26978
  ],
26847
- stage: "ga"
26979
+ stage: "ga",
26980
+ sidebar: "websites_only"
26848
26981
  },
26849
26982
  {
26850
26983
  id: "settings.apiKeys",
@@ -26857,7 +26990,8 @@ const DASHBOARD_SETTINGS_NAV_GROUPS = [
26857
26990
  "content",
26858
26991
  "sdk"
26859
26992
  ],
26860
- stage: "ga"
26993
+ stage: "ga",
26994
+ sidebar: "websites_only"
26861
26995
  },
26862
26996
  {
26863
26997
  id: "settings.backup",
@@ -26870,7 +27004,8 @@ const DASHBOARD_SETTINGS_NAV_GROUPS = [
26870
27004
  "download",
26871
27005
  "zip"
26872
27006
  ],
26873
- stage: "ga"
27007
+ stage: "ga",
27008
+ sidebar: "websites_only"
26874
27009
  }
26875
27010
  ]
26876
27011
  }
@@ -26878,7 +27013,6 @@ const DASHBOARD_SETTINGS_NAV_GROUPS = [
26878
27013
  const hiddenDemoSettingsNavSurfaceIds = [
26879
27014
  "settings.features",
26880
27015
  "settings.domains",
26881
- "settings.bookings",
26882
27016
  "settings.emails",
26883
27017
  "settings.team",
26884
27018
  "settings.billing",
@@ -26893,38 +27027,37 @@ function isFeatureEnabled(ctx, flag) {
26893
27027
  function isDemoSettingsNavSurfaceVisible(mode, surfaceId) {
26894
27028
  return !isDemoDashboardUiRestricted(mode) || !hiddenDemoSettingsNavIds.has(surfaceId);
26895
27029
  }
26896
- const DASHBOARD_SETTINGS_DANGER_ITEM = {
26897
- id: "settings.danger",
26898
- label: "Delete site",
26899
- keywords: [
26900
- "delete",
26901
- "danger",
26902
- "remove"
26903
- ]
26904
- };
27030
+ function isListedInSidebar(ctx, sidebar) {
27031
+ if (sidebar === "never") return false;
27032
+ return sidebar !== "websites_only" || ctx.isHostedBookingPage !== true;
27033
+ }
27034
+ /** Who can delete a site: its owner, and not on a demo. The one owner of this rule. */
27035
+ function canDeleteSite(ctx) {
27036
+ return ctx.role === "owner" && !isDemoDashboardUiRestricted(ctx.demoUiMode ?? "standard");
27037
+ }
26905
27038
  function buildDashboardSettingsNavPlan(ctx) {
26906
27039
  const visibility = extractSdkDashboardNavVisibilityConfigForRole(ctx.sdkConfig, "settingsNav", ctx.role);
26907
- const groups = DASHBOARD_SETTINGS_NAV_GROUPS.map((group) => {
26908
- const items = group.items.filter((item) => isFeatureEnabled(ctx, item.featureFlag)).filter((item) => isDemoSettingsNavSurfaceVisible(ctx.demoUiMode ?? "standard", item.id)).filter((item) => isNavItemVisible({
26909
- id: item.id,
26910
- role: ctx.role ?? null,
26911
- stage: item.stage,
26912
- minRole: getRolePolicyMinimumRole(getSettingsSurfaceNavPolicy(item.id)),
26913
- config: visibility
26914
- })).map((item) => ({
26915
- id: item.id,
26916
- label: item.label,
26917
- keywords: item.keywords
26918
- }));
26919
- return {
26920
- label: group.label,
26921
- items
26922
- };
26923
- }).filter((group) => group.items.length > 0);
26924
- const dangerItem = ctx.role === "owner" && !isDemoDashboardUiRestricted(ctx.demoUiMode ?? "standard") ? DASHBOARD_SETTINGS_DANGER_ITEM : undefined;
27040
+ const visibleItems = (items) => items.filter((item) => isFeatureEnabled(ctx, item.featureFlag)).filter((item) => isDemoSettingsNavSurfaceVisible(ctx.demoUiMode ?? "standard", item.id)).filter((item) => isNavItemVisible({
27041
+ id: item.id,
27042
+ role: ctx.role ?? null,
27043
+ stage: item.stage,
27044
+ minRole: getRolePolicyMinimumRole(getSettingsSurfaceNavPolicy(item.id)),
27045
+ config: visibility
27046
+ }));
27047
+ const toPlan = (item) => ({
27048
+ id: item.id,
27049
+ label: item.label,
27050
+ keywords: item.keywords
27051
+ });
27052
+ const groups = DASHBOARD_SETTINGS_NAV_GROUPS.map((group) => ({
27053
+ label: group.label,
27054
+ items: visibleItems(group.items).filter((item) => isListedInSidebar(ctx, item.sidebar)).map(toPlan)
27055
+ })).filter((group) => group.items.length > 0);
27056
+ const unlisted = DASHBOARD_SETTINGS_NAV_GROUPS.flatMap((group) => visibleItems(group.items)).filter((item) => !isListedInSidebar(ctx, item.sidebar)).map(toPlan);
26925
27057
  return {
26926
27058
  groups,
26927
- ...dangerItem ? { dangerItem } : {}
27059
+ unlisted,
27060
+ canDeleteSite: canDeleteSite(ctx)
26928
27061
  };
26929
27062
  }
26930
27063
 
@@ -26935,13 +27068,22 @@ function buildDashboardTeamMemberNavPlan(ctx) {
26935
27068
  return [
26936
27069
  ...hasAppointmentStaffAccess(ctx.staffScope) ? buildAppointmentStaffNavPlan(ownResourceId) : ownResourceId ? [{
26937
27070
  id: "team.availability",
26938
- label: "My Hours and Calendars",
27071
+ label: "Your hours and details",
26939
27072
  destination: {
26940
27073
  kind: "appointment_resource_calendar",
26941
27074
  resourceId: ownResourceId
26942
27075
  }
26943
27076
  }] : [],
26944
- ...hasPackageStaffAccess(ctx.staffScope) ? packageStaffNavPlan : [],
27077
+ ...hasPackageStaffAccess(ctx.staffScope) ? [{
27078
+ id: "team.packages",
27079
+ label: "Packages",
27080
+ destination: { kind: "booking_products" }
27081
+ }] : [],
27082
+ ...hasPackageStaffAccess(ctx.staffScope) || hasAppointmentStaffAccess(ctx.staffScope) ? [{
27083
+ id: "team.clients",
27084
+ label: "My Clients",
27085
+ destination: { kind: "booking_people" }
27086
+ }] : [],
26945
27087
  ...hasEventOpsAccess(ctx.staffScope) ? [{
26946
27088
  id: "team.eventOps",
26947
27089
  label: "Event Ops",
@@ -26949,16 +27091,6 @@ function buildDashboardTeamMemberNavPlan(ctx) {
26949
27091
  }] : []
26950
27092
  ];
26951
27093
  }
26952
- /** Packages access opens the trainer's packages and their own clients. */
26953
- const packageStaffNavPlan = [{
26954
- id: "team.packages",
26955
- label: "Packages",
26956
- destination: { kind: "booking_products" }
26957
- }, {
26958
- id: "team.clients",
26959
- label: "My Clients",
26960
- destination: { kind: "booking_people" }
26961
- }];
26962
27094
  function buildAppointmentStaffNavPlan(resourceId) {
26963
27095
  return [{
26964
27096
  id: "team.calendar",
@@ -26966,7 +27098,7 @@ function buildAppointmentStaffNavPlan(resourceId) {
26966
27098
  destination: { kind: "appointments_calendar" }
26967
27099
  }, {
26968
27100
  id: "team.availability",
26969
- label: "My Hours and Calendars",
27101
+ label: "Your hours and details",
26970
27102
  destination: resourceId ? {
26971
27103
  kind: "appointment_resource_availability",
26972
27104
  resourceId
@@ -27431,7 +27563,7 @@ function buildDashboardBookingsNavPlan(modules, ctx, catalogue) {
27431
27563
  return buildStaffScopedBookingsNavPlan(policy);
27432
27564
  }
27433
27565
  const hasEnabledModules = modules.appointments || modules.events;
27434
- const groups = [buildOverviewNavGroup(hasEnabledModules)];
27566
+ const groups = glanceGroups(hasEnabledModules, ctx.publicExperience);
27435
27567
  groups.push({
27436
27568
  label: "Events",
27437
27569
  items: modules.events ? [
@@ -27459,7 +27591,10 @@ function buildDashboardBookingsNavPlan(modules, ctx, catalogue) {
27459
27591
  }
27460
27592
  ] : [{
27461
27593
  label: "Enable events",
27462
- destination: { kind: "settings_bookings" },
27594
+ destination: {
27595
+ kind: "booking_settings",
27596
+ section: "basics"
27597
+ },
27463
27598
  keywords: [
27464
27599
  "enable",
27465
27600
  "setup",
@@ -27469,68 +27604,105 @@ function buildDashboardBookingsNavPlan(modules, ctx, catalogue) {
27469
27604
  ]
27470
27605
  }]
27471
27606
  });
27472
- if (policy.appointments.kind === "active") {
27607
+ const appointmentsGroup = buildAppointmentsNavGroup(policy.appointments, ctx.soloSite === true);
27608
+ if (appointmentsGroup) groups.push(appointmentsGroup);
27609
+ if (hasEnabledModules) {
27473
27610
  groups.push({
27474
- label: "Appointments",
27475
- items: [
27476
- {
27477
- label: "Appointments",
27478
- destination: { kind: "appointments_calendar" },
27479
- keywords: [
27480
- "appointments",
27481
- "schedule",
27482
- "bookings"
27483
- ]
27484
- },
27485
- {
27486
- label: "Services",
27487
- destination: { kind: "appointment_services" },
27488
- keywords: [
27489
- "offerings",
27490
- "packages",
27491
- "types"
27492
- ]
27493
- },
27494
- {
27495
- label: policy.appointments.resourceLabel,
27496
- destination: { kind: "appointment_resources" },
27497
- keywords: [
27498
- "staff",
27499
- "practitioners",
27500
- "coaches",
27501
- "providers",
27502
- "resources"
27503
- ]
27504
- },
27505
- ...policy.appointments.soloAvailabilityResourceId ? [{
27506
- label: "My availability",
27507
- destination: {
27508
- kind: "appointment_resource_availability",
27509
- resourceId: policy.appointments.soloAvailabilityResourceId
27510
- },
27511
- keywords: [
27512
- "hours",
27513
- "unavailable",
27514
- "scheduling"
27515
- ]
27516
- }] : [],
27517
- {
27518
- label: "Forms",
27519
- destination: { kind: "booking_forms" },
27520
- keywords: [
27521
- "intake",
27522
- "custom fields",
27523
- "questionnaire"
27524
- ]
27525
- }
27526
- ]
27611
+ label: "Products",
27612
+ items: [bookingProductsItem(modules), ...buildSellingProductsNavItems(ctx)]
27613
+ }, {
27614
+ label: "People",
27615
+ items: [{
27616
+ label: "People",
27617
+ destination: { kind: "booking_people" },
27618
+ keywords: [
27619
+ "customers",
27620
+ "clients",
27621
+ "members",
27622
+ "attendees",
27623
+ "contacts",
27624
+ "guests"
27625
+ ]
27626
+ }]
27627
+ }, {
27628
+ label: "Settings",
27629
+ items: [buildBookingSettingsNavItem(modules)]
27527
27630
  });
27528
- } else if (policy.appointments.kind === "owner_setup") {
27529
- groups.push({
27631
+ if (!(ctx.soloSite && policy.appointments.kind === "active")) {
27632
+ groups.push({
27633
+ label: "Availability",
27634
+ items: [closuresNavItem(ctx.soloSite === true)]
27635
+ });
27636
+ }
27637
+ }
27638
+ return groups;
27639
+ }
27640
+ const BOOKING_SETTINGS_SECTION_KEYWORDS = {
27641
+ basics: [
27642
+ "defaults",
27643
+ "timezone",
27644
+ "profile",
27645
+ "calendar",
27646
+ "waitlists"
27647
+ ],
27648
+ payments: [
27649
+ "currency",
27650
+ "payments",
27651
+ "refunds",
27652
+ "money",
27653
+ "payment options"
27654
+ ],
27655
+ events: [
27656
+ "event defaults",
27657
+ "ticketing",
27658
+ "registration",
27659
+ "categories",
27660
+ "event policies"
27661
+ ],
27662
+ appointments: [
27663
+ "appointment defaults",
27664
+ "notice",
27665
+ "rescheduling",
27666
+ "policies"
27667
+ ],
27668
+ messages: [
27669
+ "emails",
27670
+ "notifications",
27671
+ "reminders",
27672
+ "feedback",
27673
+ "follow-up"
27674
+ ]
27675
+ };
27676
+ /** One sidebar link to the settings area; search still finds each section inside it. */
27677
+ function buildBookingSettingsNavItem(modules) {
27678
+ const sections = visibleBookingSettingsSections(modules);
27679
+ return {
27680
+ label: "Settings",
27681
+ destination: {
27682
+ kind: "booking_settings",
27683
+ section: "basics"
27684
+ },
27685
+ keywords: sections.flatMap((section) => [BOOKING_SETTINGS_SECTION_LABELS[section], ...BOOKING_SETTINGS_SECTION_KEYWORDS[section]]),
27686
+ tabs: sections.map((section) => ({
27687
+ label: BOOKING_SETTINGS_SECTION_LABELS[section],
27688
+ destination: {
27689
+ kind: "booking_settings",
27690
+ section
27691
+ }
27692
+ }))
27693
+ };
27694
+ }
27695
+ function buildAppointmentsNavGroup(policy, soloSite) {
27696
+ if (policy.kind === "hidden") return null;
27697
+ if (policy.kind === "owner_setup") {
27698
+ return {
27530
27699
  label: "Appointments",
27531
27700
  items: [{
27532
27701
  label: "Enable appointments",
27533
- destination: { kind: "settings_bookings" },
27702
+ destination: {
27703
+ kind: "booking_settings",
27704
+ section: "basics"
27705
+ },
27534
27706
  keywords: [
27535
27707
  "enable",
27536
27708
  "setup",
@@ -27539,121 +27711,92 @@ function buildDashboardBookingsNavPlan(modules, ctx, catalogue) {
27539
27711
  "get started"
27540
27712
  ]
27541
27713
  }]
27542
- });
27714
+ };
27543
27715
  }
27544
- if (hasEnabledModules) {
27545
- const settingsItems = [
27716
+ return {
27717
+ label: "Appointments",
27718
+ items: [
27546
27719
  {
27547
- label: "Booking basics",
27548
- destination: {
27549
- kind: "booking_settings",
27550
- section: "basics"
27551
- },
27720
+ label: "Appointments",
27721
+ destination: { kind: "appointments_calendar" },
27552
27722
  keywords: [
27553
- "defaults",
27554
- "timezone",
27555
- "profile",
27556
- "calendar",
27557
- "waitlists"
27723
+ "appointments",
27724
+ "schedule",
27725
+ "bookings"
27558
27726
  ]
27559
27727
  },
27560
27728
  {
27561
- label: "Payments",
27562
- destination: {
27563
- kind: "booking_settings",
27564
- section: "payments"
27565
- },
27729
+ label: "Services",
27730
+ destination: { kind: "appointment_services" },
27566
27731
  keywords: [
27567
- "currency",
27568
- "payments",
27569
- "refunds",
27570
- "money",
27571
- "payment options"
27732
+ "offerings",
27733
+ "packages",
27734
+ "types"
27572
27735
  ]
27573
27736
  },
27574
- ...modules.events ? [{
27575
- label: "Events",
27576
- destination: {
27577
- kind: "booking_settings",
27578
- section: "events"
27579
- },
27737
+ {
27738
+ label: policy.resourceLabel,
27739
+ destination: { kind: "appointment_resources" },
27580
27740
  keywords: [
27581
- "event defaults",
27582
- "ticketing",
27583
- "registration",
27584
- "categories",
27585
- "event policies"
27741
+ "staff",
27742
+ "practitioners",
27743
+ "coaches",
27744
+ "providers",
27745
+ "resources"
27586
27746
  ]
27587
- }] : [],
27588
- ...modules.appointments ? [{
27589
- label: "Appointments",
27747
+ },
27748
+ ...policy.soloAvailabilityResourceId ? [{
27749
+ label: "My availability",
27590
27750
  destination: {
27591
- kind: "booking_settings",
27592
- section: "appointments"
27751
+ kind: "appointment_resource_availability",
27752
+ resourceId: policy.soloAvailabilityResourceId
27593
27753
  },
27594
27754
  keywords: [
27595
- "appointment defaults",
27596
- "notice",
27597
- "rescheduling",
27598
- "policies"
27755
+ "hours",
27756
+ "unavailable",
27757
+ "scheduling"
27599
27758
  ]
27600
27759
  }] : [],
27760
+ ...soloSite ? [closuresNavItem(true)] : [],
27601
27761
  {
27602
- label: "Messages",
27603
- destination: {
27604
- kind: "booking_settings",
27605
- section: "messages"
27606
- },
27762
+ label: "Forms",
27763
+ destination: { kind: "booking_forms" },
27607
27764
  keywords: [
27608
- "emails",
27609
- "notifications",
27610
- "reminders",
27611
- "feedback",
27612
- "follow-up"
27765
+ "intake",
27766
+ "custom fields",
27767
+ "questionnaire"
27613
27768
  ]
27614
27769
  }
27615
- ];
27616
- groups.push({
27617
- label: "Products",
27618
- items: [bookingProductsItem, ...buildSellingProductsNavItems(ctx)]
27619
- }, {
27620
- label: "People",
27621
- items: [{
27622
- label: "People",
27623
- destination: { kind: "booking_people" },
27624
- keywords: [
27625
- "customers",
27626
- "clients",
27627
- "members",
27628
- "attendees",
27629
- "contacts",
27630
- "guests"
27631
- ]
27632
- }]
27633
- }, {
27634
- label: "Settings",
27635
- items: settingsItems
27636
- }, {
27637
- label: "Availability",
27638
- items: [{
27639
- label: "Closures",
27640
- destination: { kind: "booking_closures" },
27641
- keywords: [
27642
- "holidays",
27643
- "blackouts",
27644
- "days off",
27645
- "pause bookings"
27646
- ]
27647
- }]
27648
- });
27649
- }
27650
- return groups;
27770
+ ]
27771
+ };
27772
+ }
27773
+ /** "Time off" for one person, "Closures" for a business with a team; search finds either. */
27774
+ function closuresNavItem(solo) {
27775
+ return {
27776
+ label: solo ? "Time off" : "Closures",
27777
+ destination: { kind: "booking_closures" },
27778
+ keywords: [
27779
+ "closures",
27780
+ "time off",
27781
+ "holiday",
27782
+ "holidays",
27783
+ "away",
27784
+ "blackouts",
27785
+ "days off",
27786
+ "pause bookings"
27787
+ ]
27788
+ };
27651
27789
  }
27652
27790
  /** At a glance: the bookings Overview, and the Timetable once anything can be booked. */
27653
- function buildOverviewNavGroup(hasEnabledModules) {
27791
+ /** A booking page with no modules has nothing here, so the group goes rather than sitting empty. */
27792
+ function glanceGroups(hasEnabledModules, publicExperience) {
27793
+ const group = buildOverviewNavGroup(hasEnabledModules, publicExperience);
27794
+ return group.items.length > 0 ? [group] : [];
27795
+ }
27796
+ function buildOverviewNavGroup(hasEnabledModules, publicExperience) {
27654
27797
  return {
27655
27798
  label: "At a glance",
27656
- items: [{
27799
+ items: [...publicExperience === "hosted_booking" ? [] : [{
27657
27800
  label: "Overview",
27658
27801
  destination: { kind: "bookings_dashboard" },
27659
27802
  keywords: [
@@ -27661,7 +27804,7 @@ function buildOverviewNavGroup(hasEnabledModules) {
27661
27804
  "summary",
27662
27805
  "activity"
27663
27806
  ]
27664
- }, ...hasEnabledModules ? [{
27807
+ }], ...hasEnabledModules ? [{
27665
27808
  label: "Timetable",
27666
27809
  destination: { kind: "timetable" },
27667
27810
  keywords: [
@@ -27676,8 +27819,18 @@ function buildOverviewNavGroup(hasEnabledModules) {
27676
27819
  };
27677
27820
  }
27678
27821
  function buildStaffScopedBookingsNavPlan(policy) {
27679
- return [...policy.appointments.kind === "calendar" ? [buildStaffAppointmentsNavGroup(policy.appointments.ownResourceId)] : [], ...policy.packages ? [staffPackagesNavGroup] : []];
27822
+ return [...policy.appointments.kind === "calendar" ? [buildStaffAppointmentsNavGroup(policy.appointments.ownResourceId, !policy.packages)] : [], ...policy.packages ? [staffPackagesNavGroup] : []];
27680
27823
  }
27824
+ const staffClientsNavItem = {
27825
+ label: "My Clients",
27826
+ destination: { kind: "booking_people" },
27827
+ keywords: [
27828
+ "clients",
27829
+ "customers",
27830
+ "people",
27831
+ "sessions left"
27832
+ ]
27833
+ };
27681
27834
  const staffPackagesNavGroup = {
27682
27835
  label: "Packages",
27683
27836
  items: [{
@@ -27689,18 +27842,9 @@ const staffPackagesNavGroup = {
27689
27842
  "bundles",
27690
27843
  "sell"
27691
27844
  ]
27692
- }, {
27693
- label: "My Clients",
27694
- destination: { kind: "booking_people" },
27695
- keywords: [
27696
- "clients",
27697
- "customers",
27698
- "people",
27699
- "sessions left"
27700
- ]
27701
- }]
27845
+ }, staffClientsNavItem]
27702
27846
  };
27703
- function buildStaffAppointmentsNavGroup(ownResourceId) {
27847
+ function buildStaffAppointmentsNavGroup(ownResourceId, includeClients) {
27704
27848
  const appointmentItems = [{
27705
27849
  label: "Appointments",
27706
27850
  destination: { kind: "appointments_calendar" },
@@ -27712,7 +27856,7 @@ function buildStaffAppointmentsNavGroup(ownResourceId) {
27712
27856
  }];
27713
27857
  if (ownResourceId) {
27714
27858
  appointmentItems.push({
27715
- label: "My Hours and Calendars",
27859
+ label: "Your hours and details",
27716
27860
  destination: {
27717
27861
  kind: "appointment_resource_availability",
27718
27862
  resourceId: ownResourceId
@@ -27731,11 +27875,16 @@ function buildStaffAppointmentsNavGroup(ownResourceId) {
27731
27875
  }
27732
27876
  return {
27733
27877
  label: "Appointments",
27734
- items: appointmentItems
27878
+ items: includeClients ? [...appointmentItems, staffClientsNavItem] : appointmentItems
27735
27879
  };
27736
27880
  }
27737
- const bookingProductsItem = {
27738
- label: "Passes, packages & memberships",
27881
+ /** The same name the page itself uses, for the kinds this site can sell. */
27882
+ function bookingProductsLabel(modules) {
27883
+ if (modules.events && modules.appointments) return "Passes, packages & memberships";
27884
+ return modules.appointments ? "Packages" : "Passes & memberships";
27885
+ }
27886
+ const bookingProductsItem = (modules) => ({
27887
+ label: bookingProductsLabel(modules),
27739
27888
  destination: { kind: "booking_products" },
27740
27889
  keywords: [
27741
27890
  "passes",
@@ -27748,7 +27897,7 @@ const bookingProductsItem = {
27748
27897
  "recurring",
27749
27898
  "unlimited"
27750
27899
  ]
27751
- };
27900
+ });
27752
27901
  function buildEventNavItems(catalogue) {
27753
27902
  const entries = catalogue.source === "generic" ? catalogue.entries.filter(({ preset }) => preset === "course") : catalogue.entries;
27754
27903
  return [
@@ -34255,4 +34404,4 @@ function optionalTitle(data) {
34255
34404
  }
34256
34405
 
34257
34406
  //#endregion
34258
- export { normalizeMediaValueToIdentifierOnly as $, resolveRepeaterGridSpanFieldId as $n, ApiEnvelopeError as $r, bindRequestTimeout as $t, formatDiffDetail as A, getEnvPrefix as An, getStripeMinimumChargeRequirement as Ar, navigationIdentity as At, buildFieldChanges as B, NodeSchema as Bn, publicProductSchema as Br, ACCOUNT_SITE_LIST_LIMIT_MIN as Bt, reportFromOutcomes as C, requireEnvironmentWriteAuthorization as Cn, unsafeAsPositiveCheckoutQuantity as Cr, fileExists$1 as Ct, normalizeRemoteHomepageReference as D, transportSuggestion as Dn, repriceBookingCollectionOptions as Dr, writeJsonFileAtomic as Dt, createEmptySyncResult as E, formatError as En, isBookingCollectionEquivalentToUpfront as Er, writeJsonFile$1 as Et, calculatePullDiff as F, createManagementClient as Fn, eventCalendarListLayoutCompatibleDisplayModeValues as Fr, AccountApiMalformedResponseError as Ft, syncLocalMediaForPull as G, blockContentSourceSchema as Gn, calendarMonthWindowSchema as Gr, applyPushConfigPlan as Gt, formatFieldPath as H, bindingSchema as Hn, purchasablePublicPassProductSchema as Hr, ACCOUNT_SITE_TITLE_MAX_LENGTH as Ht, buildJsonDiff as I, cardListBlockParts as In, eventCalendarListLayoutValues as Ir, createBearerAccountApi as It, admitBinaryWriteDestination as J, MAX_REPEATER_GRID_COLUMNS as Jn, eventSurfacePresetValues as Jr, preparePushConfigTarget as Jt, applyLocalMediaPush as K, blockRequiredFeatureSchema as Kn, calendarSourceCursorSchema as Kr, createPushConfigCommand as Kt, hasPageOperations as L, cardListFamilyBlocks as Ln, publicVenueMapLocationSchema as Lr, ACCOUNT_SITE_CURSOR_MAX_LENGTH as Lt, hasPendingChanges as M, isLocalConfigured as Mn, MAX_EVENT_BOOKING_SELECTION_ITEMS as Mr, convertPulledFooterToLocal as Mt, findChangedFieldsWithValues as N, isRemoteConfigured as Nn, eventCalendarDefaultViewValues as Nr, convertPulledNavigationToLocal as Nt, calculateDiff as O, CliExit as On, resolveAvailableBookingCollectionOptions as Or, isMediaValue as Ot, formatHumanDiff as P, loadSdkEnvironment as Pn, eventCalendarDisplayModeValues as Pr, convertPulledPagesToLocal as Pt, normalizeMediaIdentifierInput as Q, resolveRepeaterGridRowFieldId as Qn, publicEventLoaderQuerySchemaShape as Qr, mapEnvironmentExecutionOutcomesJson as Qt, pageMetadataForUpsert as R, cardListKnobBlocks as Rn, publicMembershipProductSchema as Rr, ACCOUNT_SITE_LIST_LIMIT_DEFAULT as Rt, planCliCommandBatchForBindings as S, planEnvironmentWriteAuthorization as Sn, checkoutCopy as Sr, ensureDir$1 as St, executeResidualSettingsSyncPlan as T, ErrorCodes as Tn, planFlexibleBalanceCreditFirst as Tr, readJsonFile as Tt, revalidateLocalMediaPushPlan as U, DEFAULT_MEDIA_FIELD_KINDS as Un, CALENDAR_SSR_PAGE_SIZE as Ur, navigationCommandItemToManagementInput as Ut, formatFieldChange as V, NodeTreeSchema as Vn, purchasablePublicMembershipProductSchema as Vr, ACCOUNT_SITE_SEARCH_MAX_LENGTH as Vt, syncLocalMediaForPush as W, blockCategoryEnum as Wn, calendarMonthDate as Wr, normalizeNavigationConfigItemForCommand as Wt, writeBinaryFileAtomic as X, parseRepeaterGridInteger as Xn, monthNumber as Xr, createBearerAPIClient as Xt, readStableBinaryFile as Y, isAcceptedRepeaterGridSpan as Yn, eventSurfaceScopeValues as Yr, revalidatePushConfigPlan as Yt, sha256 as Z, resolveRepeaterGridColumnFieldId as Zn, normalizeCalendarFilterId as Zr, deriveCmsApiUrlFromDashboardUrl as Zt, commandExecutionToReport as _, withErrorHandling as _n, decideSelectionAttendance as _r, metadataFilePath as _t, executeEntryCommandPlanAsReport as a, getOutputContext as an, ApiRequestError as ar, readEntries as at, executeCompiledCliCommandPlanAsReport as b, parseEnvironmentSelection as bn, nextCombinationHint as br, writeMetadataFile as bt, titleFromEntryData as c, managementClientConfigFor as cn, linkPayloadSchema as cr, readEventsMeta as ct, unsafeAsCliEntryIdentifier as d, parseJsonData as dn, pageDesignIntentSchemaVersion as dr, readNavigationMeta as dt, unwrapResponse as ei, confirmAction as en, visibilityLevels as er, walkLocalContentMedia as et, unsafeAsCliFormSlug as f, parsePaginationOptions as fn, sdkConfiguredBookingVerticalConfigSchema as fr, readPagesMeta as ft, commandCompileFailureToReport as g, withConfirmation as gn, INCOMPATIBLE_ATTENDANCE_MESSAGE as gr, ensureMetadataDir as gt, mutationCounterForEffect as h, withCommandContext as hn, eventBookingConsentContentKey as hr, writeMediaManifest as ht, entrySiteCommandTypes as i, formatDateShort as in, isRecord$5 as ir, findLegacyEntryFiles as it, formatDiffSummary as j, getEnvironmentDebugInfo as jn, getBookingLaterInstalments as jr, navigationIdentityMap as jt, calculateFooterDiff as k, createOutput as kn, resolveBookingCollectionOptionFacts as kr, duplicateNavigationIdentityMessage as kt, unsafeAsCliBlockIdentifier as l, mapEntryForOutput as ln, portablePageDesignSchema as lr, readFooterMeta as lt, commandReportToSyncResult as m, runWithInvocation as mn, areEventBookingRequirementsIdentical as mr, readVenuesMeta as mt, entryCommandCompileErrorToReport as n, createOutputForCommand as nn, extractApiErrorMessage as nr, downloadMedia as nt, executeEntryCommandPlanAsSyncResult as o, getOutputOnlyContext as on, sdkEventScheduleSchema as or, readAllMeta as ot, unsafeAsCliPageIdentifier as p, resolveCommandPath as pn, API_ENDPOINTS as pr, readSettingsMeta as pt, prepareLocalMediaForPush as q, fieldSchema as qn, eventScheduleScopeValues as qr, loadPushConfigTarget as qt, entryCommandReportToSyncResult as r, currentInvocationEnvelope as rn, normalizeApiError as rr, extractMediaIdentifiers as rt, syncResultForEntryCommandCompileError as s, handleCommandError as sn, sdkSettingsUpdateSchema as sr, readEventCategoriesMeta as st, compileEntryPushCommands as t, createCommandContext as tn, ManagementApiError as tr, buildStorageUrl as tt, unsafeAsCliContentTypeKey as u, parseJsonArray as un, pageDesignDecisionsV2Schema as ur, readFormsMeta as ut, commandReportHasFailures as v, withOutputOnlyErrorHandling as vn, resolveSelectionAttendanceMode as vr, metadataTargetFromEnvironment as vt, mergeManySyncResults as w, withRiverbankEnv as wn, planCheckoutPaymentFlow as wr, listFiles as wt, formatManagementError as x, planEnvironmentExecution as xn, planSelectionCombinationPrices as xr, writeMetadataRecordMap as xt, executeCliCommandPlan as y, executeEnvironmentPlan as yn, checkoutStatusArms as yr, readMetadataFile as yt, calculateEntryDiffs as z, lookKnobBlocks as zn, publicPassProductSchema as zr, ACCOUNT_SITE_LIST_LIMIT_MAX as zt };
34407
+ export { normalizeMediaValueToIdentifierOnly as $, resolveRepeaterGridSpanFieldId as $n, normalizeCalendarFilterId as $r, bindRequestTimeout as $t, formatDiffDetail as A, getEnvPrefix as An, resolveAvailableBookingCollectionOptions as Ar, navigationIdentity as At, buildFieldChanges as B, NodeSchema as Bn, publicMembershipProductSchema as Br, ACCOUNT_SITE_LIST_LIMIT_MIN as Bt, reportFromOutcomes as C, requireEnvironmentWriteAuthorization as Cn, checkoutCopy as Cr, fileExists$1 as Ct, normalizeRemoteHomepageReference as D, transportSuggestion as Dn, flexibleBalanceDueDay as Dr, writeJsonFileAtomic as Dt, createEmptySyncResult as E, formatError as En, planFlexibleBalanceCreditFirst as Er, writeJsonFile$1 as Et, calculatePullDiff as F, createManagementClient as Fn, eventCalendarDefaultViewValues as Fr, AccountApiMalformedResponseError as Ft, syncLocalMediaForPull as G, blockContentSourceSchema as Gn, CALENDAR_SSR_PAGE_SIZE as Gr, applyPushConfigPlan as Gt, formatFieldPath as H, bindingSchema as Hn, publicProductSchema as Hr, ACCOUNT_SITE_TITLE_MAX_LENGTH as Ht, buildJsonDiff as I, cardListBlockParts as In, eventCalendarDisplayModeValues as Ir, createBearerAccountApi as It, admitBinaryWriteDestination as J, MAX_REPEATER_GRID_COLUMNS as Jn, calendarSourceCursorSchema as Jr, preparePushConfigTarget as Jt, applyLocalMediaPush as K, blockRequiredFeatureSchema as Kn, calendarMonthDate as Kr, createPushConfigCommand as Kt, hasPageOperations as L, cardListFamilyBlocks as Ln, eventCalendarListLayoutCompatibleDisplayModeValues as Lr, ACCOUNT_SITE_CURSOR_MAX_LENGTH as Lt, hasPendingChanges as M, isLocalConfigured as Mn, getStripeMinimumChargeRequirement as Mr, convertPulledFooterToLocal as Mt, findChangedFieldsWithValues as N, isRemoteConfigured as Nn, getBookingLaterInstalments as Nr, convertPulledNavigationToLocal as Nt, calculateDiff as O, CliExit as On, isBookingCollectionEquivalentToUpfront as Or, isMediaValue as Ot, formatHumanDiff as P, loadSdkEnvironment as Pn, MAX_EVENT_BOOKING_SELECTION_ITEMS as Pr, convertPulledPagesToLocal as Pt, normalizeMediaIdentifierInput as Q, resolveRepeaterGridRowFieldId as Qn, monthNumber as Qr, mapEnvironmentExecutionOutcomesJson as Qt, pageMetadataForUpsert as R, cardListKnobBlocks as Rn, eventCalendarListLayoutValues as Rr, ACCOUNT_SITE_LIST_LIMIT_DEFAULT as Rt, planCliCommandBatchForBindings as S, planEnvironmentWriteAuthorization as Sn, eventRegistrationErrors as Sr, ensureDir$1 as St, executeResidualSettingsSyncPlan as T, ErrorCodes as Tn, planCheckoutPaymentFlow as Tr, readJsonFile as Tt, revalidateLocalMediaPushPlan as U, DEFAULT_MEDIA_FIELD_KINDS as Un, purchasablePublicMembershipProductSchema as Ur, navigationCommandItemToManagementInput as Ut, formatFieldChange as V, NodeTreeSchema as Vn, publicPassProductSchema as Vr, ACCOUNT_SITE_SEARCH_MAX_LENGTH as Vt, syncLocalMediaForPush as W, blockCategoryEnum as Wn, purchasablePublicPassProductSchema as Wr, normalizeNavigationConfigItemForCommand as Wt, writeBinaryFileAtomic as X, parseRepeaterGridInteger as Xn, eventSurfacePresetValues as Xr, createBearerAPIClient as Xt, readStableBinaryFile as Y, isAcceptedRepeaterGridSpan as Yn, eventScheduleScopeValues as Yr, revalidatePushConfigPlan as Yt, sha256 as Z, resolveRepeaterGridColumnFieldId as Zn, eventSurfaceScopeValues as Zr, deriveCmsApiUrlFromDashboardUrl as Zt, commandExecutionToReport as _, withErrorHandling as _n, decideSelectionAttendance as _r, metadataFilePath as _t, executeEntryCommandPlanAsReport as a, getOutputContext as an, ApiRequestError as ar, readEntries as at, executeCompiledCliCommandPlanAsReport as b, parseEnvironmentSelection as bn, nextCombinationHint as br, writeMetadataFile as bt, titleFromEntryData as c, managementClientConfigFor as cn, linkPayloadSchema as cr, readEventsMeta as ct, unsafeAsCliEntryIdentifier as d, parseJsonData as dn, pageDesignIntentSchemaVersion as dr, readNavigationMeta as dt, publicEventLoaderQuerySchemaShape as ei, confirmAction as en, visibilityLevels as er, walkLocalContentMedia as et, unsafeAsCliFormSlug as f, parsePaginationOptions as fn, sdkConfiguredBookingVerticalConfigSchema as fr, readPagesMeta as ft, commandCompileFailureToReport as g, withConfirmation as gn, INCOMPATIBLE_ATTENDANCE_MESSAGE as gr, ensureMetadataDir as gt, mutationCounterForEffect as h, withCommandContext as hn, eventBookingConsentContentKey as hr, writeMediaManifest as ht, entrySiteCommandTypes as i, formatDateShort as in, isRecord$5 as ir, findLegacyEntryFiles as it, formatDiffSummary as j, getEnvironmentDebugInfo as jn, resolveBookingCollectionOptionFacts as jr, navigationIdentityMap as jt, calculateFooterDiff as k, createOutput as kn, repriceBookingCollectionOptions as kr, duplicateNavigationIdentityMessage as kt, unsafeAsCliBlockIdentifier as l, mapEntryForOutput as ln, portablePageDesignSchema as lr, readFooterMeta as lt, commandReportToSyncResult as m, runWithInvocation as mn, areEventBookingRequirementsIdentical as mr, readVenuesMeta as mt, entryCommandCompileErrorToReport as n, unwrapResponse as ni, createOutputForCommand as nn, extractApiErrorMessage as nr, downloadMedia as nt, executeEntryCommandPlanAsSyncResult as o, getOutputOnlyContext as on, sdkEventScheduleSchema as or, readAllMeta as ot, unsafeAsCliPageIdentifier as p, resolveCommandPath as pn, API_ENDPOINTS as pr, readSettingsMeta as pt, prepareLocalMediaForPush as q, fieldSchema as qn, calendarMonthWindowSchema as qr, loadPushConfigTarget as qt, entryCommandReportToSyncResult as r, currentInvocationEnvelope as rn, normalizeApiError as rr, extractMediaIdentifiers as rt, syncResultForEntryCommandCompileError as s, handleCommandError as sn, sdkSettingsUpdateSchema as sr, readEventCategoriesMeta as st, compileEntryPushCommands as t, ApiEnvelopeError as ti, createCommandContext as tn, ManagementApiError as tr, buildStorageUrl as tt, unsafeAsCliContentTypeKey as u, parseJsonArray as un, pageDesignDecisionsV2Schema as ur, readFormsMeta as ut, commandReportHasFailures as v, withOutputOnlyErrorHandling as vn, resolveSelectionAttendanceMode as vr, metadataTargetFromEnvironment as vt, mergeManySyncResults as w, withRiverbankEnv as wn, unsafeAsPositiveCheckoutQuantity as wr, listFiles as wt, formatManagementError as x, planEnvironmentExecution as xn, planSelectionCombinationPrices as xr, writeMetadataRecordMap as xt, executeCliCommandPlan as y, executeEnvironmentPlan as yn, checkoutStatusArms as yr, readMetadataFile as yt, calculateEntryDiffs as z, lookKnobBlocks as zn, publicVenueMapLocationSchema as zr, ACCOUNT_SITE_LIST_LIMIT_MAX as zt };