riverbankcms 0.22.2 → 0.24.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,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import { $t as pageDesignIntentSchemaVersion, A as getSiteCommandMetadata, B as eventBookingOfferIntentSchema, Dn as getDirectImageUrlForSiteScopedPath, E as parseAndPlanCommandBatchForTypes, Gn as getExtensionForMimeType, Hn as slugifyMediaIdentifier, J as createCommandRef, Jn as normalizeAmbiguousStoragePathForSite, Kn as getMimeType, O as evaluateSiteCommandBatchExposure, P as entryIdentifierForCommand, Qt as pageDesignBoundaryTreatmentSchema, Rn as buildMediaIdentifierFromFilename, T as createDryRunReport, Vn as resolveMediaIdentifier, Wt as buttonStyleSelectionSchema, Xn as FILE_SIZE_LIMITS, Y as createContentEntryRef, Zn as MAX_MANAGEMENT_MEDIA_UPLOAD_BYTES, at as slugPart, en as footerPreferencesSchema, fr as asPageFlowPresetId, k as evaluateSiteCommandExposure, lr as asAppearancePresetId, m as isInternalResolvedLinkValue, n as sdkCourseBookingSettingsSchema, nt as createSiteCommandSiteRef, pr as asSiteStyleId, r as sdkEventOccurrenceInputSchema, s as RESOLVED_INTERNAL_LINK_ENTITY_TYPES, w as stableStringify, wt as themeSchema, x as resolvePageUpsertSeo, y as eventVisibilitySchema } from "./sdk-event-upsert-zWw5VolM.mjs";
3
- import { $t as assertNever, Cn as unsafeAsEventSeriesId, En as unsafeAsOccurrenceId, Hn as err, K as formatDate, Ln as unsafeAsStaffMemberId, M as parseFooterCompositionV1, S as parseManagementKey, Sn as unsafeAsEventOfferingId, Un as ok, a as canonicalizeConfiguredBookingVerticalConfig, b as createSecret, c as resolveSiteVerticalBookingConfig, cn as parsePageId, ct as parseBookingLocalDate, ft as resolveBookingTimeZoneId, i as areConfiguredBookingVerticalConfigsEqual, l as DEFAULT_EVENT_TYPE_PRESETS, m as publicReadFreshnessSeconds, o as parseVerticalId, pn as unsafeAsAppointmentResourceId, s as parseVerticalPresetId, t as resolveEventCatalogue, u as EVENT_PRESET_VALUES, un as parseSiteId, x as exposeSecret } from "./src-ZACBG29u.mjs";
4
- import { n as CliSdkPeerError, t as loadConfigFile } from "./load-config-BV9Ig2CH.mjs";
2
+ import { $t as pageDesignIntentSchemaVersion, A as getSiteCommandMetadata, B as eventBookingOfferIntentSchema, Bn as resolveMediaIdentifier, Dn as getDirectImageUrlForSiteScopedPath, E as parseAndPlanCommandBatchForTypes, Gn as getMimeType, J as createCommandRef, Jt as buttonStyleSelectionSchema, Ln as buildMediaIdentifierFromFilename, O as evaluateSiteCommandBatchExposure, Ot as themeSchema, P as entryIdentifierForCommand, Qt as pageDesignBoundaryTreatmentSchema, T as createDryRunReport, Vn as slugifyMediaIdentifier, Wn as getExtensionForMimeType, Xn as MAX_MANAGEMENT_MEDIA_UPLOAD_BYTES, Y as createContentEntryRef, Yn as FILE_SIZE_LIMITS, at as slugPart, cr as asAppearancePresetId, dr as asPageFlowPresetId, en as footerPreferencesSchema, fr as asSiteStyleId, k as evaluateSiteCommandExposure, kr as parseSurfaceTree, m as isInternalResolvedLinkValue, n as sdkCourseBookingSettingsSchema, nt as createSiteCommandSiteRef, qn as normalizeAmbiguousStoragePathForSite, r as sdkEventOccurrenceInputSchema, s as RESOLVED_INTERNAL_LINK_ENTITY_TYPES, w as stableStringify, x as resolvePageUpsertSeo, y as eventVisibilitySchema } from "./sdk-event-upsert-DmNSeHgP.mjs";
3
+ import { An as unsafeAsEventOfferingId, C as parseManagementKey, G as locationValueSchema, Gn as unsafeAsStaffMemberId, M as parseFooterCompositionV1, Pn as unsafeAsOccurrenceId, S as exposeSecret, Xn as err, Zn as ok, a as areConfiguredBookingVerticalConfigsEqual, bt as resolveBookingTimeZoneId, c as parseVerticalPresetId, d as EVENT_PRESET_VALUES, et as formatDate, gn as parsePageId, gt as parseBookingLocalDate, h as publicReadFreshnessSeconds, jn as unsafeAsEventSeriesId, l as resolveSiteVerticalBookingConfig, n as resolveEventCatalogue, o as canonicalizeConfiguredBookingVerticalConfig, s as parseVerticalId, sn as assertNever, u as DEFAULT_EVENT_TYPE_PRESETS, vn as parseSiteId, x as createSecret, xn as unsafeAsAppointmentResourceId } from "./src-B03aw4Tv.mjs";
4
+ import { n as CliSdkPeerError, t as loadConfigFile } from "./load-config-h2Ri_tDO.mjs";
5
5
  import { Command } from "commander";
6
6
  import { AsyncLocalStorage } from "node:async_hooks";
7
7
  import * as fs$1 from "fs/promises";
@@ -274,6 +274,38 @@ const sdkEventOccurrenceResponseSchema = z.object({
274
274
  cancellationResult: businessCancellationResultSchema.optional(),
275
275
  cancellationResults: z.array(businessCancellationResultSchema).optional()
276
276
  });
277
+ const addedDateReceiptSchema = z.object({
278
+ kind: z.literal("committed"),
279
+ occurrenceId: identifierSchema$1,
280
+ undo: z.object({
281
+ operation: z.literal("undo_added_event_date"),
282
+ siteId: identifierSchema$1,
283
+ seriesId: identifierSchema$1,
284
+ occurrenceId: identifierSchema$1,
285
+ handle: z.string().min(1)
286
+ }).optional(),
287
+ details: z.enum(["completed", "failed"]),
288
+ cache: z.enum(["completed", "failed"]),
289
+ projection: z.enum(["available", "unavailable"]),
290
+ notification: z.discriminatedUnion("kind", [
291
+ z.object({ kind: z.literal("not_applicable") }),
292
+ z.object({ kind: z.literal("suppressed") }),
293
+ z.object({ kind: z.literal("not_attempted") }),
294
+ z.object({ kind: z.literal("no_recipients") }),
295
+ z.object({ kind: z.literal("submission_failed") }),
296
+ z.object({
297
+ kind: z.literal("submitted"),
298
+ sent: z.number().int().nonnegative(),
299
+ queued: z.number().int().nonnegative(),
300
+ failed: z.number().int().nonnegative()
301
+ })
302
+ ])
303
+ });
304
+ const sdkAddEventOccurrenceResponseSchema = z.union([sdkEventOccurrenceResponseSchema.extend({ commit: addedDateReceiptSchema.optional() }), z.object({
305
+ kind: z.literal("accepted_unavailable"),
306
+ id: identifierSchema$1,
307
+ commit: addedDateReceiptSchema
308
+ })]);
277
309
  const sdkDeleteEventOccurrenceResponseSchema = z.object({ deleted: z.literal(true) });
278
310
  const sdkReorderResponseSchema = z.object({
279
311
  reordered: z.literal(true),
@@ -783,6 +815,7 @@ const sdkPullVenueSchema = z.object({
783
815
  lat: z.number(),
784
816
  lng: z.number()
785
817
  }).partial().nullable(),
818
+ locationValue: locationValueSchema.nullable().optional(),
786
819
  mapEmbed: z.string().nullable(),
787
820
  updatedAt: sdkTimestampSchema$2,
788
821
  createdAt: sdkTimestampSchema$2
@@ -1394,7 +1427,7 @@ function occurrenceResponseSchema(method, path$3) {
1394
1427
  const collection = /^\/events\/[^/]+\/runs\/[^/]+\/occurrences$/;
1395
1428
  const member = /^\/events\/[^/]+\/runs\/[^/]+\/occurrences\/[^/]+$/;
1396
1429
  if (method === "GET" && collection.test(path$3)) return sdkListEventOccurrencesResponseSchema;
1397
- if (method === "POST" && collection.test(path$3)) return sdkEventOccurrenceResponseSchema;
1430
+ if (method === "POST" && collection.test(path$3)) return sdkAddEventOccurrenceResponseSchema;
1398
1431
  if (method === "PATCH" && member.test(path$3)) return sdkEventOccurrenceResponseSchema;
1399
1432
  if (method === "DELETE" && member.test(path$3)) return sdkDeleteEventOccurrenceResponseSchema;
1400
1433
  return method === "POST" && /^\/events\/[^/]+\/runs\/[^/]+\/occurrences\/[^/]+\/cancel$/.test(path$3) ? sdkEventOccurrenceResponseSchema : undefined;
@@ -2296,8 +2329,11 @@ function createEventOccurrenceOperations(http) {
2296
2329
  return http.getValidated(basePath(eventIdentifier, runIdentifier), sdkListEventOccurrencesResponseSchema, occurrenceListParams(options));
2297
2330
  },
2298
2331
  async add(eventIdentifier, runIdentifier, input) {
2299
- const result = await http.postValidated(basePath(eventIdentifier, runIdentifier), sdkEventOccurrenceResponseSchema, input, "write");
2300
- return result.occurrence;
2332
+ const result = await http.postValidated(basePath(eventIdentifier, runIdentifier), sdkAddEventOccurrenceResponseSchema, input, "write");
2333
+ return "kind" in result ? result : {
2334
+ ...result.occurrence,
2335
+ ...result.commit ? { commit: result.commit } : {}
2336
+ };
2301
2337
  },
2302
2338
  async update(eventIdentifier, runIdentifier, occurrenceId, input) {
2303
2339
  const result = await http.patchValidated(occurrencePath(eventIdentifier, runIdentifier, occurrenceId), sdkEventOccurrenceResponseSchema, input);
@@ -4480,6 +4516,47 @@ function parsePublicProductCategorySelector(value) {
4480
4516
  return undefined;
4481
4517
  }
4482
4518
 
4519
+ //#endregion
4520
+ //#region ../api/src/pageJournalEndpoints.ts
4521
+ const PAGE_JOURNAL_ENDPOINT_DEFINITIONS = {
4522
+ replayThemeJournalChange: {
4523
+ path: "/sites/{siteId}/theme/journal",
4524
+ method: "POST",
4525
+ auth: "user",
4526
+ responseKind: "json",
4527
+ errors: [
4528
+ "validation:invalid_input",
4529
+ "auth:forbidden",
4530
+ "resource:conflict",
4531
+ "server:internal_error"
4532
+ ]
4533
+ },
4534
+ getPageJournalState: {
4535
+ path: "/sites/{siteId}/pages/{pageId}/journal",
4536
+ method: "GET",
4537
+ auth: "user",
4538
+ responseKind: "json",
4539
+ errors: [
4540
+ "resource:not_found",
4541
+ "resource:conflict",
4542
+ "server:internal_error"
4543
+ ]
4544
+ },
4545
+ replayPageJournalChange: {
4546
+ path: "/sites/{siteId}/pages/{pageId}/journal",
4547
+ method: "POST",
4548
+ auth: "user",
4549
+ responseKind: "json",
4550
+ editLease: "managed",
4551
+ errors: [
4552
+ "validation:invalid_input",
4553
+ "resource:not_found",
4554
+ "resource:conflict",
4555
+ "server:internal_error"
4556
+ ]
4557
+ }
4558
+ };
4559
+
4483
4560
  //#endregion
4484
4561
  //#region ../api/src/apiEndpointTypes.ts
4485
4562
  function allowedDemoMutationPolicy() {
@@ -4917,6 +4994,58 @@ const SDK_ENTRY_READ_ENDPOINTS = {
4917
4994
  }
4918
4995
  };
4919
4996
 
4997
+ //#endregion
4998
+ //#region ../api/src/guardedContentReplayEndpointDefinitions.ts
4999
+ const GUARDED_CONTENT_REPLAY_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
5000
+ restoreSurfaceSlotStructure: {
5001
+ editLease: "managed",
5002
+ path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/slots/{slotKey}/blocks/restore",
5003
+ method: "POST",
5004
+ tags: [
5005
+ "site-{siteId}",
5006
+ "page-surface-{pageSurfaceId}",
5007
+ "blocks"
5008
+ ],
5009
+ auth: "user",
5010
+ responseKind: "json",
5011
+ errors: [
5012
+ "validation:invalid_input",
5013
+ "resource:not_found",
5014
+ "resource:conflict"
5015
+ ]
5016
+ },
5017
+ restoreLiveTemplate: {
5018
+ path: "/sites/{siteId}/content/types/{type}/template/restore",
5019
+ method: "POST",
5020
+ tags: ["site-{siteId}", "content-template-{siteId}-{type}"],
5021
+ auth: "user",
5022
+ responseKind: "json",
5023
+ errors: [
5024
+ "validation:invalid_input",
5025
+ "resource:not_found",
5026
+ "resource:conflict"
5027
+ ]
5028
+ },
5029
+ restoreEntrySlotStructure: {
5030
+ editLease: "managed",
5031
+ path: "/sites/{siteId}/content/{type}/{entryId}/slots/{slotKey}/blocks/restore",
5032
+ method: "POST",
5033
+ tags: [
5034
+ "site-{siteId}",
5035
+ "content-entry-{entryId}",
5036
+ "entry-slot-{slotKey}",
5037
+ "blocks"
5038
+ ],
5039
+ auth: "user",
5040
+ responseKind: "json",
5041
+ errors: [
5042
+ "validation:invalid_input",
5043
+ "resource:not_found",
5044
+ "resource:conflict"
5045
+ ]
5046
+ }
5047
+ });
5048
+
4920
5049
  //#endregion
4921
5050
  //#region ../api/src/appointmentRequestEndpointDefinitions.ts
4922
5051
  const APPOINTMENT_REQUEST_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
@@ -5643,12 +5772,6 @@ const APPOINTMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
5643
5772
  "server:internal_error"
5644
5773
  ]
5645
5774
  },
5646
- cancelAppointment: {
5647
- path: "/sites/{siteId}/bookings/appointments/{appointmentId}/cancel",
5648
- method: "POST",
5649
- auth: "user",
5650
- responseKind: "json"
5651
- },
5652
5775
  rescheduleAppointment: {
5653
5776
  path: "/sites/{siteId}/bookings/appointments/{appointmentId}/reschedule",
5654
5777
  method: "POST",
@@ -5792,19 +5915,6 @@ const EVENT_SERIES_REGISTRATION_ENDPOINT_DEFINITIONS = defineEndpointDefinitions
5792
5915
  "server:internal_error"
5793
5916
  ]
5794
5917
  },
5795
- cancelEventSeriesRegistration: {
5796
- path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations/{registrationId}/cancel",
5797
- method: "POST",
5798
- auth: "user",
5799
- responseKind: "json",
5800
- errors: [
5801
- "validation:invalid_input",
5802
- "auth:forbidden",
5803
- "resource:not_found",
5804
- "resource:conflict",
5805
- "server:internal_error"
5806
- ]
5807
- },
5808
5918
  saveEventSeriesRegistrationAnswers: {
5809
5919
  path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations/{registrationId}/answers",
5810
5920
  method: "PUT",
@@ -7490,6 +7600,14 @@ const lifecycleErrors = [
7490
7600
  "server:internal_error"
7491
7601
  ];
7492
7602
  const EDIT_LEASE_ENDPOINT_DEFINITIONS = {
7603
+ readEditAdmission: {
7604
+ path: "/sites/{siteId}/edit-admission",
7605
+ method: "GET",
7606
+ editLease: "lifecycle",
7607
+ errors: lifecycleErrors,
7608
+ auth: "user",
7609
+ responseKind: "json"
7610
+ },
7493
7611
  readEditLease: {
7494
7612
  path: path$2,
7495
7613
  method: "GET",
@@ -7743,6 +7861,7 @@ const clientErrorReportSchema = z.object({
7743
7861
  //#endregion
7744
7862
  //#region ../api/src/endpoints.ts
7745
7863
  const ENDPOINT_DEFINITIONS = {
7864
+ ...PAGE_JOURNAL_ENDPOINT_DEFINITIONS,
7746
7865
  ...PREVIEW_AUTH_ENDPOINT_DEFINITIONS,
7747
7866
  ...SITE_LIFECYCLE_ENDPOINT_DEFINITIONS,
7748
7867
  ...CLIENT_ERROR_REPORT_ENDPOINT_DEFINITIONS,
@@ -7756,57 +7875,12 @@ const ENDPOINT_DEFINITIONS = {
7756
7875
  ...EDIT_LEASE_ENDPOINT_DEFINITIONS,
7757
7876
  ...PAGE_SURFACE_EDITOR_ENDPOINT_DEFINITIONS,
7758
7877
  ...SITE_MANAGEMENT_ENDPOINT_DEFINITIONS,
7759
- aiContentUpdateChat: {
7760
- path: "/ai/content-update-chat",
7761
- method: "POST",
7762
- auth: "user",
7763
- responseKind: "stream"
7764
- },
7765
- aiChat: {
7766
- path: "/ai/chat",
7767
- method: "POST",
7768
- auth: "user",
7769
- responseKind: "stream"
7770
- },
7771
- aiDesignerThemeApply: {
7772
- path: "/sites/{siteId}/ai/designer/theme/apply",
7773
- method: "POST",
7774
- tags: [TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme],
7775
- auth: "user",
7776
- responseKind: "json"
7777
- },
7778
- aiDesignerPageOpsApply: {
7779
- editLease: "managed",
7780
- path: "/sites/{siteId}/ai/designer/page/apply",
7781
- method: "POST",
7782
- tags: [TAG_TEMPLATES.siteCollection],
7783
- auth: "user",
7784
- responseKind: "json"
7785
- },
7786
7878
  applySeoChanges: {
7787
7879
  path: "/seo/apply",
7788
7880
  method: "POST",
7789
7881
  auth: "user",
7790
7882
  responseKind: "json"
7791
7883
  },
7792
- aiCreateBriefChat: {
7793
- path: "/ai/chat/create-brief",
7794
- method: "POST",
7795
- auth: "user",
7796
- responseKind: "json"
7797
- },
7798
- aiPatchDryRun: {
7799
- path: "/ai/patch/dry-run",
7800
- method: "POST",
7801
- auth: "user",
7802
- responseKind: "json"
7803
- },
7804
- aiPatchApply: {
7805
- path: "/ai/patch/apply",
7806
- method: "POST",
7807
- auth: "user",
7808
- responseKind: "json"
7809
- },
7810
7884
  aiPlaygroundProposeMulti: {
7811
7885
  path: "/sites/{siteId}/ai/playground/propose-multi",
7812
7886
  method: "POST",
@@ -7819,17 +7893,33 @@ const ENDPOINT_DEFINITIONS = {
7819
7893
  auth: "user",
7820
7894
  responseKind: "stream"
7821
7895
  },
7822
- aiAssistantChatSite: {
7823
- path: "/sites/{siteId}/ai/assistant/chat",
7896
+ assistantSuggestions: {
7897
+ path: "/assistant/suggestions",
7824
7898
  method: "POST",
7825
7899
  auth: "user",
7826
- responseKind: "stream"
7900
+ responseKind: "json",
7901
+ errors: []
7827
7902
  },
7828
- aiDesignerChat: {
7829
- path: "/sites/{siteId}/ai/designer/chat",
7903
+ submitSupportTicket: {
7904
+ path: "/assistant/support",
7830
7905
  method: "POST",
7831
7906
  auth: "user",
7832
- responseKind: "stream"
7907
+ responseKind: "json",
7908
+ errors: []
7909
+ },
7910
+ replyToSupportTicket: {
7911
+ path: "/assistant/support/reply",
7912
+ method: "POST",
7913
+ auth: "user",
7914
+ responseKind: "json",
7915
+ errors: []
7916
+ },
7917
+ assistantTurn: {
7918
+ path: "/assistant/turn",
7919
+ method: "POST",
7920
+ auth: "user",
7921
+ responseKind: "stream",
7922
+ errors: []
7833
7923
  },
7834
7924
  aiPlaygroundPageConvert: {
7835
7925
  path: "/sites/{siteId}/ai/playground/page-convert",
@@ -8028,6 +8118,7 @@ const ENDPOINT_DEFINITIONS = {
8028
8118
  demoMutation: DEMO_MUTATION_BLOCKED_DISABLED
8029
8119
  },
8030
8120
  ...SITE_API_KEY_ENDPOINT_DEFINITIONS,
8121
+ ...GUARDED_CONTENT_REPLAY_ENDPOINT_DEFINITIONS,
8031
8122
  getBookingSettings: {
8032
8123
  path: "/sites/{siteId}/bookings/settings",
8033
8124
  method: "GET",
@@ -8161,20 +8252,6 @@ const ENDPOINT_DEFINITIONS = {
8161
8252
  auth: "user",
8162
8253
  responseKind: "json"
8163
8254
  },
8164
- opsCancelEventAttendee: {
8165
- path: "/ops/sites/{siteId}/events/attendees/{attendeeId}/cancel",
8166
- method: "POST",
8167
- auth: "user",
8168
- responseKind: "json",
8169
- demoMutation: DEMO_MUTATION_INTERNAL_ONLY,
8170
- errors: [
8171
- "validation:invalid_input",
8172
- "auth:forbidden",
8173
- "resource:not_found",
8174
- "resource:conflict",
8175
- "server:internal_error"
8176
- ]
8177
- },
8178
8255
  getEventAttendeeDetails: {
8179
8256
  path: "/sites/{siteId}/bookings/event-attendees/{attendeeId}",
8180
8257
  method: "GET",
@@ -8182,19 +8259,6 @@ const ENDPOINT_DEFINITIONS = {
8182
8259
  responseKind: "json",
8183
8260
  errors: []
8184
8261
  },
8185
- cancelEventAttendee: {
8186
- path: "/sites/{siteId}/bookings/event-attendees/{attendeeId}/cancel",
8187
- method: "POST",
8188
- auth: "user",
8189
- responseKind: "json",
8190
- errors: [
8191
- "validation:invalid_input",
8192
- "auth:forbidden",
8193
- "resource:not_found",
8194
- "resource:conflict",
8195
- "server:internal_error"
8196
- ]
8197
- },
8198
8262
  opsRefundEventAttendee: {
8199
8263
  path: "/ops/sites/{siteId}/events/attendees/{attendeeId}/refund",
8200
8264
  method: "POST",
@@ -8778,6 +8842,13 @@ const ENDPOINT_DEFINITIONS = {
8778
8842
  auth: "user",
8779
8843
  responseKind: "json"
8780
8844
  },
8845
+ getBlockPickerContext: {
8846
+ errors: ["resource:not_found"],
8847
+ path: "/sites/{siteId}/block-picker",
8848
+ method: "GET",
8849
+ auth: "user",
8850
+ responseKind: "json"
8851
+ },
8781
8852
  listContentTypes: {
8782
8853
  path: "/sites/{siteId}/content-types",
8783
8854
  method: "GET",
@@ -9043,14 +9114,6 @@ const ENDPOINT_DEFINITIONS = {
9043
9114
  auth: "user",
9044
9115
  responseKind: "json"
9045
9116
  },
9046
- getSiteLayoutSettings: {
9047
- path: "/sites/{siteId}/settings/layout",
9048
- method: "GET",
9049
- revalidate: 120,
9050
- tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings],
9051
- auth: "user",
9052
- responseKind: "json"
9053
- },
9054
9117
  getSiteBannerSettings: {
9055
9118
  path: "/sites/{siteId}/settings/banner",
9056
9119
  method: "GET",
@@ -9104,13 +9167,6 @@ const ENDPOINT_DEFINITIONS = {
9104
9167
  ],
9105
9168
  responseKind: "json"
9106
9169
  },
9107
- updateSiteLayoutSettings: {
9108
- path: "/sites/{siteId}/settings/layout",
9109
- method: "POST",
9110
- tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings],
9111
- auth: "user",
9112
- responseKind: "json"
9113
- },
9114
9170
  updateSiteBannerSettings: {
9115
9171
  path: "/sites/{siteId}/settings/banner",
9116
9172
  method: "POST",
@@ -9344,6 +9400,22 @@ const ENDPOINT_DEFINITIONS = {
9344
9400
  auth: "admin",
9345
9401
  responseKind: "json"
9346
9402
  },
9403
+ adminReplyToSupportTicket: {
9404
+ path: "/admin/support/tickets/reply",
9405
+ method: "POST",
9406
+ tags: ["admin", "support"],
9407
+ auth: "admin",
9408
+ responseKind: "json",
9409
+ errors: []
9410
+ },
9411
+ adminSetSupportTicketStatus: {
9412
+ path: "/admin/support/tickets/status",
9413
+ method: "POST",
9414
+ tags: ["admin", "support"],
9415
+ auth: "admin",
9416
+ responseKind: "json",
9417
+ errors: []
9418
+ },
9347
9419
  mfaTotpEnroll: {
9348
9420
  path: "/auth/mfa/totp/enroll",
9349
9421
  method: "POST",
@@ -11281,6 +11353,32 @@ const ENDPOINT_DEFINITIONS = {
11281
11353
  auth: "user",
11282
11354
  responseKind: "json"
11283
11355
  },
11356
+ previewBookingOperation: {
11357
+ path: "/bookings/operations/preview",
11358
+ method: "POST",
11359
+ auth: "user",
11360
+ responseKind: "json",
11361
+ errors: [
11362
+ "server:internal_error",
11363
+ "auth:insufficient_permissions",
11364
+ "validation:invalid_input",
11365
+ "resource:not_found",
11366
+ "resource:conflict"
11367
+ ]
11368
+ },
11369
+ confirmBookingOperation: {
11370
+ path: "/bookings/operations/confirm",
11371
+ method: "POST",
11372
+ auth: "user",
11373
+ responseKind: "json",
11374
+ errors: [
11375
+ "server:internal_error",
11376
+ "auth:insufficient_permissions",
11377
+ "validation:invalid_input",
11378
+ "resource:not_found",
11379
+ "resource:conflict"
11380
+ ]
11381
+ },
11284
11382
  createEventOccurrence: {
11285
11383
  path: "/sites/{siteId}/bookings/event-series/{seriesId}/occurrences",
11286
11384
  method: "POST",
@@ -11386,8 +11484,17 @@ const ENDPOINT_DEFINITIONS = {
11386
11484
  responseKind: "json",
11387
11485
  errors: ["resource:conflict", "resource:not_found"]
11388
11486
  },
11389
- geocodeVenue: {
11390
- path: "/sites/{siteId}/bookings/geocode",
11487
+ previewLocationDrawing: {
11488
+ errors: ["resource:not_found"],
11489
+ path: "/sites/{siteId}/location/drawing-preview",
11490
+ method: "POST",
11491
+ tags: [],
11492
+ auth: "user",
11493
+ responseKind: "json"
11494
+ },
11495
+ geocodeLocation: {
11496
+ errors: ["resource:not_found"],
11497
+ path: "/sites/{siteId}/location/geocode",
11391
11498
  method: "POST",
11392
11499
  tags: ["site-{siteId}"],
11393
11500
  auth: "user",
@@ -13326,6 +13433,32 @@ function extractSurfaceAwareSiteSlug(value) {
13326
13433
  const result = classifySurfaceSiteHost(value);
13327
13434
  return result.kind === "managed-site" ? result.siteSlug : null;
13328
13435
  }
13436
+ /**
13437
+ * Pick the surface to embed in a per-user email link, by counting input
13438
+ * sites and returning the most common surface. The strict `next > bestCount`
13439
+ * comparison means the first surface to reach a new maximum wins ties,
13440
+ * matching input order.
13441
+ */
13442
+ function pickDominantSurface(sites) {
13443
+ const first = sites[0];
13444
+ if (first === undefined) return null;
13445
+ return sites.reduce((tally, site) => {
13446
+ const next = (tally.counts.get(site.surfaceId) ?? 0) + 1;
13447
+ const counts = new Map(tally.counts).set(site.surfaceId, next);
13448
+ return next > tally.bestCount ? {
13449
+ counts,
13450
+ best: site.surfaceId,
13451
+ bestCount: next
13452
+ } : {
13453
+ ...tally,
13454
+ counts
13455
+ };
13456
+ }, {
13457
+ counts: new Map(),
13458
+ best: first.surfaceId,
13459
+ bestCount: 0
13460
+ }).best;
13461
+ }
13329
13462
 
13330
13463
  //#endregion
13331
13464
  //#region ../api/src/url.ts
@@ -13807,7 +13940,7 @@ async function parseSuccessResponse(endpoint, response, config) {
13807
13940
  }
13808
13941
  let parsed;
13809
13942
  try {
13810
- parsed = JSON.parse(raw);
13943
+ parsed = parseSurfaceTree(JSON.parse(raw));
13811
13944
  } catch (cause) {
13812
13945
  throw new ApiRequestError(`Failed to parse JSON response for endpoint ${String(endpoint)}`, {
13813
13946
  endpoint,
@@ -13878,6 +14011,9 @@ function createRawCMSClient(getHeaders = () => ({}), baseUrl) {
13878
14011
  return fetchPromise;
13879
14012
  };
13880
14013
  }
14014
+ function surfaceTransportCapability(endpoint) {
14015
+ return endpoint === "getContentByPath" ? "revision-v1" : undefined;
14016
+ }
13881
14017
  function buildApiRequestPlan(input) {
13882
14018
  const { endpoint, body, params, headers = {}, baseUrl } = input;
13883
14019
  const options = input.options ?? {};
@@ -13919,6 +14055,7 @@ function buildApiRequestPlan(input) {
13919
14055
  appendQueryParam(queryParams, key, value);
13920
14056
  });
13921
14057
  }
14058
+ appendQueryParam(queryParams, "surfaceTransport", surfaceTransportCapability(endpoint));
13922
14059
  const queryString = queryParams.toString();
13923
14060
  if (queryString) {
13924
14061
  url += (url.includes("?") ? "&" : "?") + queryString;
@@ -13963,27 +14100,29 @@ function buildApiRequestPlan(input) {
13963
14100
  ...!isGetOrHead && "tags" in endpointConfig && Array.isArray(endpointConfig.tags) ? { cacheInvalidationTags: endpointConfig.tags.map((tag) => tag) } : {}
13964
14101
  };
13965
14102
  }
14103
+ /** Shared HTTP error boundary for parsed calls and streaming transports. */
14104
+ async function createApiRequestError(response, endpoint, fallbackMessage) {
14105
+ const body = await parseErrorBody(response);
14106
+ const details = extractApiEnvelopeErrorDetails(body);
14107
+ const config = API_ENDPOINTS[endpoint];
14108
+ return new ApiRequestError(details.message ?? fallbackMessage ?? `Request to ${String(endpoint)} failed with status ${response.status}`, {
14109
+ endpoint,
14110
+ status: response.status,
14111
+ method: config.method,
14112
+ auth: config.auth ?? "user",
14113
+ requestId: response.headers.get("x-request-id") ?? undefined,
14114
+ body,
14115
+ errorCode: details.code ?? undefined,
14116
+ retryAfterMs: parseRetryAfterHeader(response.headers.get("retry-after"))
14117
+ });
14118
+ }
13966
14119
  function createParsedClient(rawClient) {
13967
14120
  return async (params) => {
13968
14121
  const response = await rawClient(params);
13969
14122
  const endpoint = params.endpoint;
13970
14123
  const config = API_ENDPOINTS[endpoint];
13971
- const auth = config.auth ?? "user";
13972
14124
  if (!response.ok) {
13973
- const body = await parseErrorBody(response);
13974
- const envelopeError = extractApiEnvelopeErrorDetails(body);
13975
- const requestId = response.headers.get("x-request-id") ?? undefined;
13976
- const retryAfterMs = parseRetryAfterHeader(response.headers.get("retry-after"));
13977
- throw new ApiRequestError(`Request to ${String(endpoint)} failed with status ${response.status}`, {
13978
- endpoint,
13979
- status: response.status,
13980
- method: config.method,
13981
- auth,
13982
- requestId,
13983
- body,
13984
- errorCode: envelopeError.code ?? undefined,
13985
- retryAfterMs
13986
- });
14125
+ throw await createApiRequestError(response, endpoint);
13987
14126
  }
13988
14127
  return parseSuccessResponse(endpoint, response, config);
13989
14128
  };
@@ -16339,6 +16478,15 @@ function isFeatureEnabled(ctx, flag) {
16339
16478
  function isDemoSettingsNavSurfaceVisible(mode, surfaceId) {
16340
16479
  return !isDemoDashboardUiRestricted(mode) || !hiddenDemoSettingsNavIds.has(surfaceId);
16341
16480
  }
16481
+ const DASHBOARD_SETTINGS_DANGER_ITEM = {
16482
+ id: "settings.danger",
16483
+ label: "Delete site",
16484
+ keywords: [
16485
+ "delete",
16486
+ "danger",
16487
+ "remove"
16488
+ ]
16489
+ };
16342
16490
  function buildDashboardSettingsNavPlan(ctx) {
16343
16491
  const visibility = extractSdkDashboardNavVisibilityConfigForRole(ctx.sdkConfig, "settingsNav", ctx.role);
16344
16492
  const groups = DASHBOARD_SETTINGS_NAV_GROUPS.map((group) => {
@@ -16358,15 +16506,7 @@ function buildDashboardSettingsNavPlan(ctx) {
16358
16506
  items
16359
16507
  };
16360
16508
  }).filter((group) => group.items.length > 0);
16361
- const dangerItem = ctx.role === "owner" && !isDemoDashboardUiRestricted(ctx.demoUiMode ?? "standard") ? {
16362
- id: "settings.danger",
16363
- label: "Delete site",
16364
- keywords: [
16365
- "delete",
16366
- "danger",
16367
- "remove"
16368
- ]
16369
- } : undefined;
16509
+ const dangerItem = ctx.role === "owner" && !isDemoDashboardUiRestricted(ctx.demoUiMode ?? "standard") ? DASHBOARD_SETTINGS_DANGER_ITEM : undefined;
16370
16510
  return {
16371
16511
  groups,
16372
16512
  ...dangerItem ? { dangerItem } : {}
@@ -16376,40 +16516,37 @@ function buildDashboardSettingsNavPlan(ctx) {
16376
16516
  //#endregion
16377
16517
  //#region ../api/src/navigation/dashboardTeamMemberNav.ts
16378
16518
  function buildDashboardTeamMemberNavPlan(ctx) {
16379
- const items = [];
16380
16519
  const ownResourceId = getOwnAppointmentResourceId(ctx.staffScope);
16381
- if (hasAppointmentStaffAccess(ctx.staffScope)) {
16382
- items.push({
16383
- id: "team.calendar",
16384
- label: "My Calendar",
16385
- destination: { kind: "appointments_calendar" }
16386
- }, {
16387
- id: "team.availability",
16388
- label: "My Availability",
16389
- destination: {
16390
- kind: "appointment_resource_availability",
16391
- resourceId: ownResourceId
16392
- }
16393
- });
16394
- }
16395
- if (ownResourceId) {
16396
- items.push({
16520
+ return [
16521
+ ...hasAppointmentStaffAccess(ctx.staffScope) ? buildAppointmentStaffNavPlan(ownResourceId) : [],
16522
+ ...ownResourceId ? [{
16397
16523
  id: "team.calendarSync",
16398
16524
  label: "My Calendar Sync",
16399
16525
  destination: {
16400
16526
  kind: "appointment_resource_calendar",
16401
16527
  resourceId: ownResourceId
16402
16528
  }
16403
- });
16404
- }
16405
- if (hasEventOpsAccess(ctx.staffScope)) {
16406
- items.push({
16529
+ }] : [],
16530
+ ...hasEventOpsAccess(ctx.staffScope) ? [{
16407
16531
  id: "team.eventOps",
16408
16532
  label: "Event Ops",
16409
16533
  destination: { kind: "ops_site_events" }
16410
- });
16411
- }
16412
- return items;
16534
+ }] : []
16535
+ ];
16536
+ }
16537
+ function buildAppointmentStaffNavPlan(resourceId) {
16538
+ return [{
16539
+ id: "team.calendar",
16540
+ label: "My Calendar",
16541
+ destination: { kind: "appointments_calendar" }
16542
+ }, {
16543
+ id: "team.availability",
16544
+ label: "My Availability",
16545
+ destination: resourceId ? {
16546
+ kind: "appointment_resource_availability",
16547
+ resourceId
16548
+ } : { kind: "appointment_resources" }
16549
+ }];
16413
16550
  }
16414
16551
  function isTeamMemberAccessiblePath(path$3, ownAppointmentResourceId) {
16415
16552
  if (path$3 === "bookings" || path$3 === "bookings/resources") {
@@ -20964,7 +21101,6 @@ function recordPageDiff(summary, diff) {
20964
21101
  summary.unchanged++;
20965
21102
  break;
20966
21103
  }
20967
- if (diff.statusChange === "publish") summary.publish++;
20968
21104
  if (diff.statusChange === "unpublish") summary.unpublish++;
20969
21105
  }
20970
21106
  function recordBlockDiff(summary, diff) {
@@ -21075,11 +21211,10 @@ function classifyPage(localPage, remotePage, options, blockSummary) {
21075
21211
  type: "create",
21076
21212
  identifier: localPage.identifier,
21077
21213
  blocks: blockDiffs$1,
21078
- remoteBlockIdentifiers: [],
21079
- statusChange: determineStatusChange(localPage.status, undefined)
21214
+ remoteBlockIdentifiers: []
21080
21215
  };
21081
21216
  }
21082
- const statusChange = determineStatusChange(localPage.status, remotePage.status);
21217
+ const statusChange = determineStatusChange(localPage.status, remotePage.status) === "unpublish" ? "unpublish" : undefined;
21083
21218
  if (options.existingEntries === "skip") {
21084
21219
  return {
21085
21220
  type: "unchanged",