riverbankcms 0.35.0 → 0.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { En as sdkEntrySlotBlocksInputSchema, a as classifySdkEventSchedule, i as sdkEventUpsertOptionalFieldSchemas, n as sdkCourseBookingSettingsSchema, o as classifySdkEventBookingOffer } from "./sdk-event-upsert-DoazwQVt.mjs";
3
- import { S as EVENT_PRESET_VALUES } from "./src-CysOxz1U.mjs";
2
+ import { En as sdkEntrySlotBlocksInputSchema, a as classifySdkEventSchedule, i as sdkEventUpsertOptionalFieldSchemas, n as sdkCourseBookingSettingsSchema, o as classifySdkEventBookingOffer } from "./sdk-event-upsert-BL6uAz53.mjs";
3
+ import { S as EVENT_PRESET_VALUES } from "./src-ClX_VLD6.mjs";
4
4
  import { z } from "zod";
5
5
 
6
6
  //#region src/commands/eventUpsertInputSchema.ts
@@ -7,7 +7,7 @@ import { existsSync as existsSync$1 } from "fs";
7
7
  import { fileURLToPath } from "url";
8
8
 
9
9
  //#region package.json
10
- var version = "0.35.0";
10
+ var version = "0.37.0";
11
11
  var peerDependencies = { "@riverbankcms/sdk": ">=0.157.0 <1.0.0" };
12
12
  var package_default = {
13
13
  name: "riverbankcms",
@@ -94,7 +94,7 @@ var package_default = {
94
94
  //#endregion
95
95
  //#region src/version.ts
96
96
  /** The package manifest is the source-run fallback; builds inject this value. */
97
- const CLI_VERSION = typeof "0.35.0" === "string" ? "0.35.0" : version;
97
+ const CLI_VERSION = typeof "0.37.0" === "string" ? "0.37.0" : version;
98
98
  /**
99
99
  * The CLI's SDK peer range is bundled from the CLI manifest alongside its
100
100
  * version. Runtime config loading uses this value as the single compatibility
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ import { t as loadConfigFile } from "./load-config-Bhh-kYhx.mjs";
3
+
4
+ export { loadConfigFile };
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { Nr as err, Pr as ok, xr as parseSiteId } from "./src-CysOxz1U.mjs";
2
+ import { Ir as err, Lr as ok, Tr as parseSiteId } from "./src-ClX_VLD6.mjs";
3
3
  import { existsSync, readFileSync } from "node:fs";
4
4
  import { dirname, isAbsolute, join, parse, relative, resolve, sep } from "node:path";
5
5
  import { fileURLToPath } from "node:url";
@@ -1810,21 +1810,16 @@ export function isPreviewMode(): boolean {
1810
1810
  ` : "";
1811
1811
  return {
1812
1812
  path: "src/lib/riverbank-client.ts",
1813
- content: `import { createRiverbankClient, type RiverbankClient } from '@riverbankcms/sdk/server';
1813
+ content: `import { createRiverbankClient, type RiverbankClient } from '@riverbankcms/sdk/next';
1814
1814
  import config from '../../riverbank.config';
1815
1815
  import { getCmsConfig } from './env';
1816
1816
 
1817
1817
  /**
1818
1818
  * Singleton client instance.
1819
1819
  *
1820
- * The client is created once per process and reused for all subsequent calls.
1821
- * This provides shared caching across all SDK operations, improving performance
1822
- * by avoiding redundant API calls within the cache TTL window.
1823
- *
1824
- * Note: In Next.js server components, each request typically runs in a fresh
1825
- * context, so cache is effectively per-request unless using persistent processes.
1826
- * The singleton pattern primarily benefits scenarios with multiple SDK calls
1827
- * within a single request or when running in long-lived processes.
1820
+ * Reuses SDK memory and resilience state within the process. The Next constructor
1821
+ * also installs the persistent tagged response cache and registers the returned
1822
+ * freshness and tags on rendered pages, including SDK page-memory cache hits.
1828
1823
  */
1829
1824
  let clientInstance: RiverbankClient | null = null;
1830
1825
 
@@ -1834,7 +1829,8 @@ let clientInstance: RiverbankClient | null = null;
1834
1829
  * Returns a cached client instance, creating one if it doesn't exist.
1835
1830
  * The client handles:
1836
1831
  * - API authentication via environment-specific API key
1837
- * - Request caching (300s TTL, 100 entries max, shared across all calls)
1832
+ * - Next caching with one-hour content and 60-second availability policies
1833
+ * - SDK memory caching (100 entries max)
1838
1834
  * - Type-safe API responses
1839
1835
  *
1840
1836
  * Configuration is read based on RIVERBANK_ENV (local | remote).
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import "../src-CysOxz1U.mjs";
3
- import { a as prepareScaffoldExecution, d as loadGeneratedPackageRanges, i as preflightScaffoldTargets, l as deriveGeneratedPackageRanges, o as writeScaffoldFiles, r as preflightScaffoldPlan, s as deriveScaffoldLocalManifest, t as deriveScaffoldPlan, u as findPackageManifestPath } from "../plan-CMMvs6Nr.mjs";
2
+ import "../src-ClX_VLD6.mjs";
3
+ import { a as prepareScaffoldExecution, d as loadGeneratedPackageRanges, i as preflightScaffoldTargets, l as deriveGeneratedPackageRanges, o as writeScaffoldFiles, r as preflightScaffoldPlan, s as deriveScaffoldLocalManifest, t as deriveScaffoldPlan, u as findPackageManifestPath } from "../plan-FPq8qKNu.mjs";
4
4
 
5
5
  export { deriveGeneratedPackageRanges, deriveScaffoldLocalManifest, deriveScaffoldPlan, findPackageManifestPath, loadGeneratedPackageRanges, preflightScaffoldPlan, preflightScaffoldTargets, prepareScaffoldExecution, writeScaffoldFiles };
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { An as mapNonEmptyArray, C as ORDINARY_EVENT_PRESET_VALUES, Cr as unsafeAsSiteId, Dr as unsafeAsEventCategoryId, Dt as validateBookingPaymentOptionKinds, Et as BOOKING_COURSE_INSTALMENT_DEADLINES, J as parseMailingListGlobalForm, Nr as err, Pr as ok, Q as parseFooterCompositionV1, S as EVENT_PRESET_VALUES, Un as unsafeAsBookingRequirementId, Vn as assertNever, Vt as MAX_BOOKING_CUT_OFF_HOURS, Xn as unsafeAsEntitlementId, ar as unsafeAsMediaAssetId, b as resolveSiteVerticalBookingConfig, c as STAFF_OPERATIONAL_CAPABILITIES, cn as localScheduleTimePattern, cr as unsafeAsPositiveSeconds, dn as parseUtcIsoDateTimeString, dr as unsafeAsStorageBucketName, er as unsafeAsBookingSessionId, fr as unsafeAsStoragePath, ft as stableJsonStringify, gn as parseBookingTimeZone, h as NAVIGATION_LOCATIONS, ht as locationValueSchema, i as isRecord$6, ir as unsafeAsFileChecksumSha256, jn as mapReadonlyNonEmptyArray, kn as fromArray, lr as unsafeAsSafeDownloadFilename, lt as SENSITIVE_COLLECTION_CONFIRMATION_VERSION, mr as unsafeAsProductId, n as OFFLINE_PAYMENT_METHODS, nr as unsafeAsDeclaredMimeType, o as applyClearable, or as unsafeAsOriginalFilename, ot as parsePublicContactDetails, pr as unsafeAsUploadSessionId, q as parseConfiguredMailingListProvider, rr as unsafeAsDetectedMimeType, rt as isCanonicalRichTextDoc, s as clearableFrom, sr as unsafeAsPositiveByteCount, st as parseWeeklyOpeningHours, t as isEventOccurrenceRouteSegment, tr as parseMediaAssetId, ur as unsafeAsSiteScopedStoragePath, ut as SENSITIVE_COLLECTION_MODES, wr as unsafeAsUserId, xr as parseSiteId, xt as isPresent, yr as unsafeAsSiteFontId } from "./src-CysOxz1U.mjs";
2
+ import { $ as parseFooterCompositionV1, An as fromArray, C as ORDINARY_EVENT_PRESET_VALUES, Cr as unsafeAsSiteFontId, Dr as unsafeAsSiteId, Dt as BOOKING_COURSE_INSTALMENT_DEADLINES, Hn as assertNever, Ht as MAX_BOOKING_CUT_OFF_HOURS, Ir as err, J as parseConfiguredMailingListProvider, Kn as unsafeAsContentEntryId, Lr as ok, Mn as mapReadonlyNonEmptyArray, Or as unsafeAsUserId, Ot as validateBookingPaymentOptionKinds, Qn as unsafeAsEntitlementId, S as EVENT_PRESET_VALUES, Sr as unsafeAsPageSurfaceId, St as isPresent, Tr as parseSiteId, Wn as unsafeAsBookingRequirementId, Y as parseMailingListGlobalForm, _n as parseBookingTimeZone, ar as unsafeAsDetectedMimeType, b as resolveSiteVerticalBookingConfig, c as STAFF_OPERATIONAL_CAPABILITIES, cr as unsafeAsOriginalFilename, ct as parseWeeklyOpeningHours, dr as unsafeAsSafeDownloadFilename, dt as SENSITIVE_COLLECTION_MODES, fn as parseUtcIsoDateTimeString, fr as unsafeAsSiteScopedStoragePath, gr as unsafeAsProductId, gt as locationValueSchema, h as NAVIGATION_LOCATIONS, hr as unsafeAsUploadSessionId, i as isRecord$6, ir as unsafeAsDeclaredMimeType, it as isCanonicalRichTextDoc, jn as mapNonEmptyArray, jr as unsafeAsEventCategoryId, ln as localScheduleTimePattern, lr as unsafeAsPositiveByteCount, mr as unsafeAsStoragePath, n as OFFLINE_PAYMENT_METHODS, nr as unsafeAsBookingSessionId, o as applyClearable, or as unsafeAsFileChecksumSha256, pr as unsafeAsStorageBucketName, pt as stableJsonStringify, rr as parseMediaAssetId, s as clearableFrom, sr as unsafeAsMediaAssetId, st as parsePublicContactDetails, t as isEventOccurrenceRouteSegment, ur as unsafeAsPositiveSeconds, ut as SENSITIVE_COLLECTION_CONFIRMATION_VERSION } from "./src-ClX_VLD6.mjs";
3
3
  import { createRequire } from "node:module";
4
4
  import { z } from "zod";
5
5
 
@@ -106,7 +106,6 @@ const resourceKinds = [
106
106
  "event-series-registration",
107
107
  "event-registration",
108
108
  "pass-redemption",
109
- "order",
110
109
  "appointment-service",
111
110
  "appointment-service-category",
112
111
  "appointment-resource",
@@ -3043,6 +3042,8 @@ const PRODUCT_CATEGORY_CONTENT_TYPE_SCHEMA = {
3043
3042
 
3044
3043
  //#endregion
3045
3044
  //#region ../content-model/src/content-types/builtins.ts
3045
+ /** The content type that holds team member profiles, and their page sections. */
3046
+ const TEAM_MEMBER_CONTENT_TYPE_KEY = "team-member";
3046
3047
  /**
3047
3048
  * Built-in `ContentTypeSchema` registry. Keyed exhaustively on
3048
3049
  * `BuiltinContentTypeKey` via `satisfies` — adding a new builtin key
@@ -5346,6 +5347,14 @@ function removeTemplateBlockBinding(allBindings, blockId, propId) {
5346
5347
  };
5347
5348
  }
5348
5349
 
5350
+ //#endregion
5351
+ //#region ../content-model/src/templates/previewSource.ts
5352
+ function templatePreviewSource(typeKey) {
5353
+ if (typeKey === "event") return "event-page";
5354
+ if (typeKey === TEAM_MEMBER_CONTENT_TYPE_KEY) return "team-profile";
5355
+ return "content-entry";
5356
+ }
5357
+
5349
5358
  //#endregion
5350
5359
  //#region ../content-model/src/entry-slots/types.ts
5351
5360
  function ok$2(value) {
@@ -6206,6 +6215,16 @@ const BODY_SECTION_KINDS = [
6206
6215
  ];
6207
6216
  /** Short, owner-defined labels shown beside the event title and in listings. */
6208
6217
  const FACT_SECTION_KINDS = ["choice", "shortText"];
6218
+ /**
6219
+ * Whose pages take sections. Each subject's key is also its content type's
6220
+ * key, which is where its definitions are kept. The type below is read from
6221
+ * this list, so the list is complete by construction.
6222
+ */
6223
+ const SECTION_SUBJECTS = [
6224
+ "event",
6225
+ "service",
6226
+ "team-member"
6227
+ ];
6209
6228
  function unsafeAsPageSectionId(value) {
6210
6229
  return value;
6211
6230
  }
@@ -6252,11 +6271,15 @@ function nonEmptyUnique(item) {
6252
6271
  });
6253
6272
  }
6254
6273
  const eventCategoryIdSchema = uuidSchema.transform(unsafeAsEventCategoryId);
6255
- const applicabilitySchema = z.discriminatedUnion("subject", [z.object({ subject: z.literal("service") }).strict(), z.object({
6256
- subject: z.literal("event"),
6257
- presets: z.union([z.literal("all"), nonEmptyUnique(z.enum(EVENT_PRESET_VALUES))]),
6258
- categories: z.union([z.literal("all"), nonEmptyUnique(eventCategoryIdSchema)])
6259
- }).strict()]);
6274
+ const applicabilitySchema = z.discriminatedUnion("subject", [
6275
+ z.object({ subject: z.literal("service") }).strict(),
6276
+ z.object({ subject: z.literal("team-member") }).strict(),
6277
+ z.object({
6278
+ subject: z.literal("event"),
6279
+ presets: z.union([z.literal("all"), nonEmptyUnique(z.enum(EVENT_PRESET_VALUES))]),
6280
+ categories: z.union([z.literal("all"), nonEmptyUnique(eventCategoryIdSchema)])
6281
+ }).strict()
6282
+ ]);
6260
6283
  function isBodyShape(shape) {
6261
6284
  return shape.placement === "body";
6262
6285
  }
@@ -6562,7 +6585,7 @@ function readSectionValue(stored, kind) {
6562
6585
  //#region ../content-model/src/page-sections/applicability.ts
6563
6586
  /** Whether one applicability covers a subject with these facts. */
6564
6587
  function appliesTo(applicability, facts) {
6565
- if (applicability.subject === "service" || facts.subject === "service") {
6588
+ if (applicability.subject !== "event" || facts.subject !== "event") {
6566
6589
  return applicability.subject === facts.subject;
6567
6590
  }
6568
6591
  const presetMatches = applicability.presets === "all" || applicability.presets.includes(facts.preset);
@@ -6575,7 +6598,7 @@ function listsIntersect(left, right) {
6575
6598
  }
6576
6599
  /** Whether some subject could be covered by both (used for the duplicate-heading check). */
6577
6600
  function applicabilitiesIntersect(left, right) {
6578
- if (left.subject === "service" || right.subject === "service") {
6601
+ if (left.subject !== "event" || right.subject !== "event") {
6579
6602
  return left.subject === right.subject;
6580
6603
  }
6581
6604
  return listsIntersect(left.presets, right.presets) && listsIntersect(left.categories, right.categories);
@@ -6619,6 +6642,56 @@ function removeCategoryFromApplicability(applicability, categoryId) {
6619
6642
  };
6620
6643
  }
6621
6644
 
6645
+ //#endregion
6646
+ //#region ../content-model/src/page-sections/subjects.ts
6647
+ /**
6648
+ * The one table of what each subject's pages take, and who owns their values.
6649
+ * Events take sections in the page body and quick facts under the title, on
6650
+ * their Event and run pages. Services take body sections only. Team members
6651
+ * take quick facts only, kept on their profile entry, because profile pages
6652
+ * have no anchor for body sections.
6653
+ */
6654
+ const SECTION_SUBJECT_RULES = {
6655
+ event: {
6656
+ placements: ["body", "facts"],
6657
+ values: {
6658
+ ownerKind: "page_surface",
6659
+ surfaceSubjectTypes: ["event_offering", "event_series"]
6660
+ }
6661
+ },
6662
+ service: {
6663
+ placements: ["body"],
6664
+ values: {
6665
+ ownerKind: "page_surface",
6666
+ surfaceSubjectTypes: ["appointment_service"]
6667
+ }
6668
+ },
6669
+ "team-member": {
6670
+ placements: ["facts"],
6671
+ values: {
6672
+ ownerKind: "entry",
6673
+ contentTypeKey: TEAM_MEMBER_CONTENT_TYPE_KEY
6674
+ }
6675
+ }
6676
+ };
6677
+ function isEntryOwnedSubject(subject) {
6678
+ return SECTION_SUBJECT_RULES[subject].values.ownerKind === "entry";
6679
+ }
6680
+ /**
6681
+ * The subject whose section values an entry of this content type holds, as
6682
+ * the facts its sections are resolved against. Null for every other content
6683
+ * type, whose content keeps a `sections` field as an ordinary field.
6684
+ */
6685
+ function entrySectionSubjectFacts(contentTypeKey) {
6686
+ const subject = SECTION_SUBJECTS.filter(isEntryOwnedSubject).find((candidate) => SECTION_SUBJECT_RULES[candidate].values.contentTypeKey === contentTypeKey);
6687
+ return subject ? { subject } : null;
6688
+ }
6689
+ /** Whether a subject's pages can have sections in this placement. */
6690
+ function subjectOffersPlacement(subject, placement) {
6691
+ const offered = SECTION_SUBJECT_RULES[subject].placements;
6692
+ return offered.includes(placement);
6693
+ }
6694
+
6622
6695
  //#endregion
6623
6696
  //#region ../content-model/src/page-sections/editableSchema.ts
6624
6697
  /**
@@ -6654,7 +6727,7 @@ function compileEditableFacts(sections) {
6654
6727
 
6655
6728
  //#endregion
6656
6729
  //#region ../content-model/src/page-sections/commands.ts
6657
- const subjectSchema = z.enum(["event", "service"]);
6730
+ const subjectSchema = z.enum(SECTION_SUBJECTS);
6658
6731
  const updateSchema = z.object({
6659
6732
  label: sectionLabelSchema.optional(),
6660
6733
  hint: sectionHintSchema.optional(),
@@ -6865,6 +6938,25 @@ function withSectionValueMediaFields(schema, contents) {
6865
6938
 
6866
6939
  //#endregion
6867
6940
  //#region ../content-model/src/page-sections/confirmation.ts
6941
+ const uuid = z.string().uuid();
6942
+ const sectionOwnerRefSchema = z.discriminatedUnion("kind", [z.object({
6943
+ kind: z.literal("pageSurface"),
6944
+ pageSurfaceId: uuid.transform(unsafeAsPageSurfaceId)
6945
+ }).strict(), z.object({
6946
+ kind: z.literal("contentEntry"),
6947
+ contentEntryId: uuid.transform(unsafeAsContentEntryId)
6948
+ }).strict()]);
6949
+ /** The id of the record that holds an owner's content. */
6950
+ function sectionOwnerId(owner) {
6951
+ return owner.kind === "pageSurface" ? owner.pageSurfaceId : owner.contentEntryId;
6952
+ }
6953
+ /** One owner's identity, for comparing and ordering owners: its kind and the record that holds its content. */
6954
+ function sectionOwnerKey(owner) {
6955
+ return `${owner.kind}:${sectionOwnerId(owner)}`;
6956
+ }
6957
+ function sameSectionOwner(left, right) {
6958
+ return sectionOwnerKey(left) === sectionOwnerKey(right);
6959
+ }
6868
6960
  /** B’s live-page effects, shared by every prepare/apply transport and review. */
6869
6961
  const pageSectionPageEffectSchema = z.enum([
6870
6962
  "appears",
@@ -6872,7 +6964,7 @@ const pageSectionPageEffectSchema = z.enum([
6872
6964
  "changes"
6873
6965
  ]);
6874
6966
  const pageSectionConfirmationPageSchema = z.object({
6875
- pageSurfaceId: z.string().uuid(),
6967
+ owner: sectionOwnerRefSchema,
6876
6968
  name: z.string(),
6877
6969
  effect: pageSectionPageEffectSchema
6878
6970
  }).strict();
@@ -6931,24 +7023,39 @@ const upsertPageSectionDefinitionCommandSchema = z.object({
6931
7023
  label: sectionLabelSchema,
6932
7024
  hint: sectionHintSchema.default(null),
6933
7025
  shape: sectionShapeSchema,
6934
- applicability: z.discriminatedUnion("subject", [z.object({ subject: z.literal("service") }).strict(), z.object({
6935
- subject: z.literal("event"),
6936
- presets: z.union([z.literal("all"), z.array(z.enum(EVENT_PRESET_VALUES)).min(1)]),
6937
- categories: z.union([z.literal("all"), z.array(eventCategoryRefSchema).min(1)])
6938
- }).strict()]),
7026
+ applicability: z.discriminatedUnion("subject", [
7027
+ z.object({ subject: z.literal("service") }).strict(),
7028
+ z.object({ subject: z.literal("team-member") }).strict(),
7029
+ z.object({
7030
+ subject: z.literal("event"),
7031
+ presets: z.union([z.literal("all"), z.array(z.enum(EVENT_PRESET_VALUES)).min(1)]),
7032
+ categories: z.union([z.literal("all"), z.array(eventCategoryRefSchema).min(1)])
7033
+ }).strict()
7034
+ ]),
6939
7035
  state: z.enum(["active", "archived"]).default("active")
6940
7036
  }).strict()
6941
7037
  }).strict();
7038
+ /** Section values by definition ref; values are intentionally open, as in the assistant's content command. */
7039
+ const pageSectionValuesSchema = z.record(pageSectionRefSchema, unknownRecordSchema);
6942
7040
  /** Section values are intentionally open, as in the assistant's content command. */
6943
7041
  const setEventPageContentCommandSchema = z.object({
6944
7042
  type: z.literal("setEventPageContent"),
6945
7043
  ref: commandRefSchema,
6946
7044
  input: z.object({
6947
7045
  eventRef: eventSeriesRefSchema,
6948
- sections: z.record(pageSectionRefSchema, unknownRecordSchema),
7046
+ sections: pageSectionValuesSchema,
6949
7047
  publish: z.boolean().default(false)
6950
7048
  }).strict()
6951
7049
  }).strict();
7050
+ /** Looks live on the full-page template's anchor, not the definition; null follows the site style. */
7051
+ const setPageSectionLookCommandSchema = z.object({
7052
+ type: z.literal("setPageSectionLook"),
7053
+ ref: commandRefSchema,
7054
+ input: z.object({
7055
+ sectionRef: pageSectionRefSchema,
7056
+ look: z.string().trim().min(1).max(100).nullable()
7057
+ }).strict()
7058
+ }).strict();
6952
7059
  const pageSectionCommandMetadata = {
6953
7060
  upsertPageSectionDefinition: {
6954
7061
  scope: "content",
@@ -6975,6 +7082,19 @@ const pageSectionCommandMetadata = {
6975
7082
  intendedExposure: recipeExposure,
6976
7083
  capability: "content.entries.write",
6977
7084
  support: "supported"
7085
+ },
7086
+ setPageSectionLook: {
7087
+ scope: "content",
7088
+ risk: "medium",
7089
+ writeSemantics: "patch",
7090
+ lifecycleIntent: "mutation",
7091
+ idempotencyStrategy: "recipe_ref",
7092
+ conflictPolicy: "update_existing",
7093
+ previewability: "dry_run_only",
7094
+ allowedRuntimes: allRuntimes,
7095
+ intendedExposure: recipeExposure,
7096
+ capability: "content.page_sections.write",
7097
+ support: "supported"
6978
7098
  }
6979
7099
  };
6980
7100
 
@@ -39351,6 +39471,7 @@ function mediaUsageLocationLabel(location$1) {
39351
39471
  case "newsletterCampaign": return `Newsletter campaign: ${location$1.campaignName}`;
39352
39472
  case "appointmentService": return `Appointment service: ${location$1.serviceTitle}`;
39353
39473
  case "productFileDownload": return `${location$1.productTitle} — Product download`;
39474
+ case "eventRoomKind": return location$1.eventTitle ? `Room photo: ${location$1.roomKindName}, ${location$1.eventTitle}` : `Room photo: ${location$1.roomKindName}`;
39354
39475
  default: return assertNever$1(location$1);
39355
39476
  }
39356
39477
  }
@@ -42724,7 +42845,6 @@ const customerMembershipRefSchema = resourceRefSchema("customer-membership");
42724
42845
  const customerPassRefSchema = resourceRefSchema("customer-pass");
42725
42846
  const eventRegistrationRefSchema = resourceRefSchema("event-registration");
42726
42847
  const membershipProductRefSchema = resourceRefSchema("membership");
42727
- const orderRefSchema = resourceRefSchema("order");
42728
42848
  const passProductRefSchema = resourceRefSchema("pass");
42729
42849
  const passRedemptionRefSchema = resourceRefSchema("pass-redemption");
42730
42850
  const requiredMoneyAmountSchema = z.object({
@@ -42963,24 +43083,6 @@ const seedPassRedemptionCommandSchema = z.object({
42963
43083
  subject: passRedemptionSubjectSchema
42964
43084
  }).strict()
42965
43085
  }).strict();
42966
- const portalOrderSubjectSchema = z.discriminatedUnion("kind", [z.object({
42967
- kind: z.literal("event_registration"),
42968
- eventRegistrationRef: eventRegistrationRefSchema
42969
- }).strict(), z.object({
42970
- kind: z.literal("event_series_registration"),
42971
- eventSeriesRegistrationRef: eventSeriesRegistrationRefSchema
42972
- }).strict()]);
42973
- const seedPortalOrderCommandSchema = z.object({
42974
- type: z.literal("seedPortalOrder"),
42975
- ref: orderRefSchema,
42976
- input: z.object({
42977
- customerRef: bookingCustomerRefSchema,
42978
- subject: portalOrderSubjectSchema,
42979
- paymentMethod: z.enum(["free", "membership_access"]),
42980
- subtotalCents: nonNegativeIntegerSchema,
42981
- currency: currencySchema
42982
- }).strict().superRefine(validatePortalOrder)
42983
- }).strict();
42984
43086
  const appointmentServiceCommonInputFields = {
42985
43087
  bookingQuestions: bookingQuestionAttachmentSchema.nullable().optional(),
42986
43088
  imageRef: mediaRefSchema.nullable().optional(),
@@ -43084,15 +43186,6 @@ const configureAppointmentAvailabilityCommandSchema = z.object({
43084
43186
  windows: z.array(weeklyWindowSchema).readonly()
43085
43187
  }).strict()
43086
43188
  }).strict();
43087
- function validatePortalOrder(input, ctx) {
43088
- const isValid = input.paymentMethod === "free" && input.subtotalCents === 0 || input.paymentMethod === "membership_access" && input.subtotalCents > 0;
43089
- if (isValid) return;
43090
- ctx.addIssue({
43091
- code: "custom",
43092
- path: ["subtotalCents"],
43093
- message: input.paymentMethod === "free" ? "Free portal order seeds must have subtotalCents 0." : "Membership-access portal order seeds must have a positive subtotalCents value."
43094
- });
43095
- }
43096
43189
 
43097
43190
  //#endregion
43098
43191
  //#region ../site-commands/src/discountCodeCommand.ts
@@ -43168,7 +43261,6 @@ const bookingCommandSchemaOptions = [
43168
43261
  seedEventSeriesRegistrationCommandSchema,
43169
43262
  seedEventRegistrationCommandSchema,
43170
43263
  seedPassRedemptionCommandSchema,
43171
- seedPortalOrderCommandSchema,
43172
43264
  upsertAppointmentServiceCategoryCommandSchema,
43173
43265
  upsertAppointmentServiceCommandSchema,
43174
43266
  upsertBookableResourceCommandSchema,
@@ -43434,7 +43526,6 @@ const upsertStaffMemberCommandSchema = z.object({
43434
43526
  shortBio: z.string().optional(),
43435
43527
  avatarRef: mediaRefSchema.nullable().optional(),
43436
43528
  timezone: z.string().min(1).optional(),
43437
- specialties: stringArraySchema.optional(),
43438
43529
  publicVisibility: z.enum(["hidden", "visible"]).optional()
43439
43530
  }).strict()
43440
43531
  }).strict();
@@ -43536,6 +43627,7 @@ const ensureTeamMemberProfileCommandSchema = z.object({
43536
43627
  title: z.string().min(1),
43537
43628
  slug: z.string().min(1),
43538
43629
  draftContent: unknownRecordSchema.optional(),
43630
+ sections: pageSectionValuesSchema.optional(),
43539
43631
  seedDraftContent: z.enum(["when_created", "never"]).default("when_created"),
43540
43632
  publish: z.boolean().optional()
43541
43633
  }).strict()
@@ -43545,6 +43637,7 @@ const siteCommandSchema = z.discriminatedUnion("type", [
43545
43637
  upsertGiftingOfferCommandSchema,
43546
43638
  upsertPageSectionDefinitionCommandSchema,
43547
43639
  setEventPageContentCommandSchema,
43640
+ setPageSectionLookCommandSchema,
43548
43641
  changeBookingQuestionsCommandSchema,
43549
43642
  configureSiteIdentityCommandSchema,
43550
43643
  configureBookingSettingsCommandSchema,
@@ -44363,19 +44456,6 @@ const siteCommandMetadata = {
44363
44456
  capability: "bookings.pass_redemptions.write",
44364
44457
  support: "supported"
44365
44458
  },
44366
- seedPortalOrder: {
44367
- scope: "order",
44368
- risk: "medium",
44369
- writeSemantics: "append",
44370
- lifecycleIntent: "seed",
44371
- idempotencyStrategy: "natural_key",
44372
- conflictPolicy: "append_once",
44373
- previewability: "dry_run_only",
44374
- allowedRuntimes: allRuntimes,
44375
- intendedExposure: recipeExposure,
44376
- capability: "commerce.orders.write",
44377
- support: "supported"
44378
- },
44379
44459
  upsertAppointmentServiceCategory: {
44380
44460
  scope: "appointment_service_category",
44381
44461
  risk: "medium",
@@ -44612,7 +44692,6 @@ const bookingRefCommandTypeValues = [
44612
44692
  "seedEventSeriesRegistration",
44613
44693
  "seedEventRegistration",
44614
44694
  "seedPassRedemption",
44615
- "seedPortalOrder",
44616
44695
  "upsertAppointmentServiceCategory",
44617
44696
  "upsertAppointmentService",
44618
44697
  "upsertBookableResource",
@@ -44698,10 +44777,6 @@ function bookingCommandRefContributions(command) {
44698
44777
  ref: command.input.customerPassRef,
44699
44778
  field: "input.customerPassRef"
44700
44779
  }, passRedemptionSubjectRefContribution(command.input.subject)]);
44701
- case "seedPortalOrder": return providedWithRequirements(command.ref, [{
44702
- ref: command.input.customerRef,
44703
- field: "input.customerRef"
44704
- }, portalOrderSubjectRefContribution(command.input.subject)]);
44705
44780
  case "assignAppointmentServiceResources": return {
44706
44781
  provides: [],
44707
44782
  requires: [{
@@ -44750,19 +44825,6 @@ function passRedemptionSubjectRefContribution(subject) {
44750
44825
  default: return assertNever(subject);
44751
44826
  }
44752
44827
  }
44753
- function portalOrderSubjectRefContribution(subject) {
44754
- switch (subject.kind) {
44755
- case "event_registration": return {
44756
- ref: subject.eventRegistrationRef,
44757
- field: "input.subject.eventRegistrationRef"
44758
- };
44759
- case "event_series_registration": return {
44760
- ref: subject.eventSeriesRegistrationRef,
44761
- field: "input.subject.eventSeriesRegistrationRef"
44762
- };
44763
- default: return assertNever(subject);
44764
- }
44765
- }
44766
44828
  function passProductContributions(command) {
44767
44829
  return providedWithRequirements(command.ref, [
44768
44830
  ...(command.input.eligibleCategoryRefs ?? []).map((ref, index) => ({
@@ -44817,6 +44879,13 @@ function commandRefContributions(command) {
44817
44879
  field: `input.sections.${ref}`
44818
44880
  }))]
44819
44881
  };
44882
+ case "setPageSectionLook": return {
44883
+ provides: [],
44884
+ requires: [{
44885
+ ref: command.input.sectionRef,
44886
+ field: "input.sectionRef"
44887
+ }]
44888
+ };
44820
44889
  case "changeBookingQuestions": return {
44821
44890
  provides: [],
44822
44891
  requires: bookingQuestionsCommandReferences(command.input)
@@ -44875,7 +44944,10 @@ function commandRefContributions(command) {
44875
44944
  requires: [{
44876
44945
  ref: command.input.staffMemberRef,
44877
44946
  field: "input.staffMemberRef"
44878
- }]
44947
+ }, ...Object.keys(command.input.sections ?? {}).map((ref) => ({
44948
+ ref,
44949
+ field: `input.sections.${ref}`
44950
+ }))]
44879
44951
  };
44880
44952
  case "upsertBlockTree": return {
44881
44953
  provides: [{
@@ -45455,7 +45527,7 @@ function validateCommandRelationships(batch) {
45455
45527
  ...batch,
45456
45528
  commands: batch.commands.flatMap((command) => command.type === "upsertCourseOffering" ? runs.filter((run) => run.offering.ref === command.ref).map((run) => run.command) : [command])
45457
45529
  };
45458
- return [...checkPricingOptionQuantitiesWithinCapacity(expanded), ...checkPortalOrdersHaveUniqueSubjects(expanded)].map((error) => {
45530
+ return [...checkPricingOptionQuantitiesWithinCapacity(expanded)].map((error) => {
45459
45531
  if (error.code !== "command_invariant_violation") return error;
45460
45532
  const run = runs.find((run$1) => run$1.command.ref === error.commandRef);
45461
45533
  return run !== undefined ? {
@@ -45465,27 +45537,6 @@ function validateCommandRelationships(batch) {
45465
45537
  } : error;
45466
45538
  });
45467
45539
  }
45468
- function checkPortalOrdersHaveUniqueSubjects(batch) {
45469
- const seenBySubject = new Map();
45470
- const errors = [];
45471
- for (const command of batch.commands) {
45472
- if (command.type !== "seedPortalOrder") continue;
45473
- const key = portalOrderSubjectKey(command.input.subject);
45474
- const previous = seenBySubject.get(key);
45475
- if (previous !== undefined) {
45476
- errors.push(commandInvariantViolation(command.ref, "input.subject", `Portal order subject ${key} is already claimed by ${previous.ref}.`));
45477
- } else {
45478
- seenBySubject.set(key, command);
45479
- }
45480
- }
45481
- return errors;
45482
- }
45483
- function portalOrderSubjectKey(subject) {
45484
- switch (subject.kind) {
45485
- case "event_registration": return `event_registration:${subject.eventRegistrationRef}`;
45486
- case "event_series_registration": return `event_series_registration:${subject.eventSeriesRegistrationRef}`;
45487
- }
45488
- }
45489
45540
  function checkPricingOptionQuantitiesWithinCapacity(batch) {
45490
45541
  return batch.commands.flatMap((command) => {
45491
45542
  if (command.type !== "upsertEventSeries") return [];