riverbankcms 0.22.1 → 0.23.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.
- package/dist/acceptance/matrix.mjs +3 -3
- package/dist/cli/index.mjs +2283 -1628
- package/dist/cli/init-docs/content/cli-reference.md +2 -2
- package/dist/cli/init-docs/content/content-management.md +1 -1
- package/dist/cli/init-docs/content/workflow-custom-block.md +4 -4
- package/dist/cli/init-docs/content/workflow-publish.md +11 -5
- package/dist/{entryCommands-Bu-z9kxb.mjs → entryCommands-BdN5YrqI.mjs} +253 -174
- package/dist/{eventUpsertInputSchema-xHmuEKwM.mjs → eventUpsertInputSchema-kp-U13TZ.mjs} +70 -32
- package/dist/load-config-C7Rd822n.mjs +4 -0
- package/dist/{load-config-pAPKpeE0.mjs → load-config-D5DDfmv1.mjs} +2 -2
- package/dist/{plan-DUdJbgTV.mjs → plan-6m8gsGI8.mjs} +1 -1
- package/dist/scaffold/index.mjs +2 -2
- package/dist/{sdk-event-upsert-B3gflo1K.mjs → sdk-event-upsert-BnBxyTR6.mjs} +493 -122
- package/dist/{src-RfhyMOpX.mjs → src-BPh_OivC.mjs} +477 -93
- package/dist/testing.mjs +4 -4
- package/package.json +1 -1
- package/dist/load-config-BRd0EUsF.mjs +0 -4
|
@@ -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-
|
|
3
|
-
import {
|
|
4
|
-
import { n as CliSdkPeerError, t as loadConfigFile } from "./load-config-
|
|
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-BnBxyTR6.mjs";
|
|
3
|
+
import { C as parseManagementKey, Cn as unsafeAsEventOfferingId, Dn as unsafeAsOccurrenceId, N as parseFooterCompositionV1, Rn as unsafeAsStaffMemberId, S as exposeSecret, Un as err, Wn as ok, a as areConfiguredBookingVerticalConfigsEqual, c as parseVerticalPresetId, d as EVENT_PRESET_VALUES, dn as parseSiteId, en as assertNever, h as publicReadFreshnessSeconds, l as resolveSiteVerticalBookingConfig, ln as parsePageId, lt as parseBookingLocalDate, mn as unsafeAsAppointmentResourceId, n as resolveEventCatalogue, o as canonicalizeConfiguredBookingVerticalConfig, pt as resolveBookingTimeZoneId, q as formatDate, s as parseVerticalId, u as DEFAULT_EVENT_TYPE_PRESETS, wn as unsafeAsEventSeriesId, x as createSecret } from "./src-BPh_OivC.mjs";
|
|
4
|
+
import { n as CliSdkPeerError, t as loadConfigFile } from "./load-config-D5DDfmv1.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),
|
|
@@ -1394,7 +1426,7 @@ function occurrenceResponseSchema(method, path$3) {
|
|
|
1394
1426
|
const collection = /^\/events\/[^/]+\/runs\/[^/]+\/occurrences$/;
|
|
1395
1427
|
const member = /^\/events\/[^/]+\/runs\/[^/]+\/occurrences\/[^/]+$/;
|
|
1396
1428
|
if (method === "GET" && collection.test(path$3)) return sdkListEventOccurrencesResponseSchema;
|
|
1397
|
-
if (method === "POST" && collection.test(path$3)) return
|
|
1429
|
+
if (method === "POST" && collection.test(path$3)) return sdkAddEventOccurrenceResponseSchema;
|
|
1398
1430
|
if (method === "PATCH" && member.test(path$3)) return sdkEventOccurrenceResponseSchema;
|
|
1399
1431
|
if (method === "DELETE" && member.test(path$3)) return sdkDeleteEventOccurrenceResponseSchema;
|
|
1400
1432
|
return method === "POST" && /^\/events\/[^/]+\/runs\/[^/]+\/occurrences\/[^/]+\/cancel$/.test(path$3) ? sdkEventOccurrenceResponseSchema : undefined;
|
|
@@ -2296,8 +2328,11 @@ function createEventOccurrenceOperations(http) {
|
|
|
2296
2328
|
return http.getValidated(basePath(eventIdentifier, runIdentifier), sdkListEventOccurrencesResponseSchema, occurrenceListParams(options));
|
|
2297
2329
|
},
|
|
2298
2330
|
async add(eventIdentifier, runIdentifier, input) {
|
|
2299
|
-
const result = await http.postValidated(basePath(eventIdentifier, runIdentifier),
|
|
2300
|
-
return result
|
|
2331
|
+
const result = await http.postValidated(basePath(eventIdentifier, runIdentifier), sdkAddEventOccurrenceResponseSchema, input, "write");
|
|
2332
|
+
return "kind" in result ? result : {
|
|
2333
|
+
...result.occurrence,
|
|
2334
|
+
...result.commit ? { commit: result.commit } : {}
|
|
2335
|
+
};
|
|
2301
2336
|
},
|
|
2302
2337
|
async update(eventIdentifier, runIdentifier, occurrenceId, input) {
|
|
2303
2338
|
const result = await http.patchValidated(occurrencePath(eventIdentifier, runIdentifier, occurrenceId), sdkEventOccurrenceResponseSchema, input);
|
|
@@ -3889,16 +3924,23 @@ function parsePaginationOptions(options) {
|
|
|
3889
3924
|
};
|
|
3890
3925
|
}
|
|
3891
3926
|
/**
|
|
3892
|
-
* Format an ISO
|
|
3927
|
+
* Format an ISO calendar day for human-readable metadata columns.
|
|
3928
|
+
* Keep the source's lexical day; these cross-site facts have no business zone.
|
|
3893
3929
|
*
|
|
3894
3930
|
* @param isoDate - ISO date string (e.g., "2024-01-15T10:30:00Z")
|
|
3895
|
-
* @returns Short date string (e.g., "2024
|
|
3931
|
+
* @returns Short date string (e.g., "15 Jan 2024")
|
|
3896
3932
|
*
|
|
3897
3933
|
* @example
|
|
3898
|
-
* formatDateShort("2024-01-15T10:30:00Z") // "2024
|
|
3934
|
+
* formatDateShort("2024-01-15T10:30:00Z") // "15 Jan 2024"
|
|
3899
3935
|
*/
|
|
3900
3936
|
function formatDateShort(isoDate) {
|
|
3901
|
-
return
|
|
3937
|
+
return formatDate({
|
|
3938
|
+
kind: "civil",
|
|
3939
|
+
value: parseBookingLocalDate(isoDate.split("T")[0] ?? "")
|
|
3940
|
+
}, {
|
|
3941
|
+
locale: "en-GB",
|
|
3942
|
+
timeZone: resolveBookingTimeZoneId("UTC")
|
|
3943
|
+
}, { date: "short" });
|
|
3902
3944
|
}
|
|
3903
3945
|
/**
|
|
3904
3946
|
* Parse JSON data from --data flag or --file flag.
|
|
@@ -4473,6 +4515,47 @@ function parsePublicProductCategorySelector(value) {
|
|
|
4473
4515
|
return undefined;
|
|
4474
4516
|
}
|
|
4475
4517
|
|
|
4518
|
+
//#endregion
|
|
4519
|
+
//#region ../api/src/pageJournalEndpoints.ts
|
|
4520
|
+
const PAGE_JOURNAL_ENDPOINT_DEFINITIONS = {
|
|
4521
|
+
replayThemeJournalChange: {
|
|
4522
|
+
path: "/sites/{siteId}/theme/journal",
|
|
4523
|
+
method: "POST",
|
|
4524
|
+
auth: "user",
|
|
4525
|
+
responseKind: "json",
|
|
4526
|
+
errors: [
|
|
4527
|
+
"validation:invalid_input",
|
|
4528
|
+
"auth:forbidden",
|
|
4529
|
+
"resource:conflict",
|
|
4530
|
+
"server:internal_error"
|
|
4531
|
+
]
|
|
4532
|
+
},
|
|
4533
|
+
getPageJournalState: {
|
|
4534
|
+
path: "/sites/{siteId}/pages/{pageId}/journal",
|
|
4535
|
+
method: "GET",
|
|
4536
|
+
auth: "user",
|
|
4537
|
+
responseKind: "json",
|
|
4538
|
+
errors: [
|
|
4539
|
+
"resource:not_found",
|
|
4540
|
+
"resource:conflict",
|
|
4541
|
+
"server:internal_error"
|
|
4542
|
+
]
|
|
4543
|
+
},
|
|
4544
|
+
replayPageJournalChange: {
|
|
4545
|
+
path: "/sites/{siteId}/pages/{pageId}/journal",
|
|
4546
|
+
method: "POST",
|
|
4547
|
+
auth: "user",
|
|
4548
|
+
responseKind: "json",
|
|
4549
|
+
editLease: "managed",
|
|
4550
|
+
errors: [
|
|
4551
|
+
"validation:invalid_input",
|
|
4552
|
+
"resource:not_found",
|
|
4553
|
+
"resource:conflict",
|
|
4554
|
+
"server:internal_error"
|
|
4555
|
+
]
|
|
4556
|
+
}
|
|
4557
|
+
};
|
|
4558
|
+
|
|
4476
4559
|
//#endregion
|
|
4477
4560
|
//#region ../api/src/apiEndpointTypes.ts
|
|
4478
4561
|
function allowedDemoMutationPolicy() {
|
|
@@ -4910,6 +4993,58 @@ const SDK_ENTRY_READ_ENDPOINTS = {
|
|
|
4910
4993
|
}
|
|
4911
4994
|
};
|
|
4912
4995
|
|
|
4996
|
+
//#endregion
|
|
4997
|
+
//#region ../api/src/guardedContentReplayEndpointDefinitions.ts
|
|
4998
|
+
const GUARDED_CONTENT_REPLAY_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
4999
|
+
restoreSurfaceSlotStructure: {
|
|
5000
|
+
editLease: "managed",
|
|
5001
|
+
path: "/sites/{siteId}/page-surfaces/{pageSurfaceId}/slots/{slotKey}/blocks/restore",
|
|
5002
|
+
method: "POST",
|
|
5003
|
+
tags: [
|
|
5004
|
+
"site-{siteId}",
|
|
5005
|
+
"page-surface-{pageSurfaceId}",
|
|
5006
|
+
"blocks"
|
|
5007
|
+
],
|
|
5008
|
+
auth: "user",
|
|
5009
|
+
responseKind: "json",
|
|
5010
|
+
errors: [
|
|
5011
|
+
"validation:invalid_input",
|
|
5012
|
+
"resource:not_found",
|
|
5013
|
+
"resource:conflict"
|
|
5014
|
+
]
|
|
5015
|
+
},
|
|
5016
|
+
restoreLiveTemplate: {
|
|
5017
|
+
path: "/sites/{siteId}/content/types/{type}/template/restore",
|
|
5018
|
+
method: "POST",
|
|
5019
|
+
tags: ["site-{siteId}", "content-template-{siteId}-{type}"],
|
|
5020
|
+
auth: "user",
|
|
5021
|
+
responseKind: "json",
|
|
5022
|
+
errors: [
|
|
5023
|
+
"validation:invalid_input",
|
|
5024
|
+
"resource:not_found",
|
|
5025
|
+
"resource:conflict"
|
|
5026
|
+
]
|
|
5027
|
+
},
|
|
5028
|
+
restoreEntrySlotStructure: {
|
|
5029
|
+
editLease: "managed",
|
|
5030
|
+
path: "/sites/{siteId}/content/{type}/{entryId}/slots/{slotKey}/blocks/restore",
|
|
5031
|
+
method: "POST",
|
|
5032
|
+
tags: [
|
|
5033
|
+
"site-{siteId}",
|
|
5034
|
+
"content-entry-{entryId}",
|
|
5035
|
+
"entry-slot-{slotKey}",
|
|
5036
|
+
"blocks"
|
|
5037
|
+
],
|
|
5038
|
+
auth: "user",
|
|
5039
|
+
responseKind: "json",
|
|
5040
|
+
errors: [
|
|
5041
|
+
"validation:invalid_input",
|
|
5042
|
+
"resource:not_found",
|
|
5043
|
+
"resource:conflict"
|
|
5044
|
+
]
|
|
5045
|
+
}
|
|
5046
|
+
});
|
|
5047
|
+
|
|
4913
5048
|
//#endregion
|
|
4914
5049
|
//#region ../api/src/appointmentRequestEndpointDefinitions.ts
|
|
4915
5050
|
const APPOINTMENT_REQUEST_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
@@ -5636,12 +5771,6 @@ const APPOINTMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
5636
5771
|
"server:internal_error"
|
|
5637
5772
|
]
|
|
5638
5773
|
},
|
|
5639
|
-
cancelAppointment: {
|
|
5640
|
-
path: "/sites/{siteId}/bookings/appointments/{appointmentId}/cancel",
|
|
5641
|
-
method: "POST",
|
|
5642
|
-
auth: "user",
|
|
5643
|
-
responseKind: "json"
|
|
5644
|
-
},
|
|
5645
5774
|
rescheduleAppointment: {
|
|
5646
5775
|
path: "/sites/{siteId}/bookings/appointments/{appointmentId}/reschedule",
|
|
5647
5776
|
method: "POST",
|
|
@@ -5785,19 +5914,6 @@ const EVENT_SERIES_REGISTRATION_ENDPOINT_DEFINITIONS = defineEndpointDefinitions
|
|
|
5785
5914
|
"server:internal_error"
|
|
5786
5915
|
]
|
|
5787
5916
|
},
|
|
5788
|
-
cancelEventSeriesRegistration: {
|
|
5789
|
-
path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations/{registrationId}/cancel",
|
|
5790
|
-
method: "POST",
|
|
5791
|
-
auth: "user",
|
|
5792
|
-
responseKind: "json",
|
|
5793
|
-
errors: [
|
|
5794
|
-
"validation:invalid_input",
|
|
5795
|
-
"auth:forbidden",
|
|
5796
|
-
"resource:not_found",
|
|
5797
|
-
"resource:conflict",
|
|
5798
|
-
"server:internal_error"
|
|
5799
|
-
]
|
|
5800
|
-
},
|
|
5801
5917
|
saveEventSeriesRegistrationAnswers: {
|
|
5802
5918
|
path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations/{registrationId}/answers",
|
|
5803
5919
|
method: "PUT",
|
|
@@ -7483,6 +7599,14 @@ const lifecycleErrors = [
|
|
|
7483
7599
|
"server:internal_error"
|
|
7484
7600
|
];
|
|
7485
7601
|
const EDIT_LEASE_ENDPOINT_DEFINITIONS = {
|
|
7602
|
+
readEditAdmission: {
|
|
7603
|
+
path: "/sites/{siteId}/edit-admission",
|
|
7604
|
+
method: "GET",
|
|
7605
|
+
editLease: "lifecycle",
|
|
7606
|
+
errors: lifecycleErrors,
|
|
7607
|
+
auth: "user",
|
|
7608
|
+
responseKind: "json"
|
|
7609
|
+
},
|
|
7486
7610
|
readEditLease: {
|
|
7487
7611
|
path: path$2,
|
|
7488
7612
|
method: "GET",
|
|
@@ -7736,6 +7860,7 @@ const clientErrorReportSchema = z.object({
|
|
|
7736
7860
|
//#endregion
|
|
7737
7861
|
//#region ../api/src/endpoints.ts
|
|
7738
7862
|
const ENDPOINT_DEFINITIONS = {
|
|
7863
|
+
...PAGE_JOURNAL_ENDPOINT_DEFINITIONS,
|
|
7739
7864
|
...PREVIEW_AUTH_ENDPOINT_DEFINITIONS,
|
|
7740
7865
|
...SITE_LIFECYCLE_ENDPOINT_DEFINITIONS,
|
|
7741
7866
|
...CLIENT_ERROR_REPORT_ENDPOINT_DEFINITIONS,
|
|
@@ -7749,57 +7874,12 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
7749
7874
|
...EDIT_LEASE_ENDPOINT_DEFINITIONS,
|
|
7750
7875
|
...PAGE_SURFACE_EDITOR_ENDPOINT_DEFINITIONS,
|
|
7751
7876
|
...SITE_MANAGEMENT_ENDPOINT_DEFINITIONS,
|
|
7752
|
-
aiContentUpdateChat: {
|
|
7753
|
-
path: "/ai/content-update-chat",
|
|
7754
|
-
method: "POST",
|
|
7755
|
-
auth: "user",
|
|
7756
|
-
responseKind: "stream"
|
|
7757
|
-
},
|
|
7758
|
-
aiChat: {
|
|
7759
|
-
path: "/ai/chat",
|
|
7760
|
-
method: "POST",
|
|
7761
|
-
auth: "user",
|
|
7762
|
-
responseKind: "stream"
|
|
7763
|
-
},
|
|
7764
|
-
aiDesignerThemeApply: {
|
|
7765
|
-
path: "/sites/{siteId}/ai/designer/theme/apply",
|
|
7766
|
-
method: "POST",
|
|
7767
|
-
tags: [TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme],
|
|
7768
|
-
auth: "user",
|
|
7769
|
-
responseKind: "json"
|
|
7770
|
-
},
|
|
7771
|
-
aiDesignerPageOpsApply: {
|
|
7772
|
-
editLease: "managed",
|
|
7773
|
-
path: "/sites/{siteId}/ai/designer/page/apply",
|
|
7774
|
-
method: "POST",
|
|
7775
|
-
tags: [TAG_TEMPLATES.siteCollection],
|
|
7776
|
-
auth: "user",
|
|
7777
|
-
responseKind: "json"
|
|
7778
|
-
},
|
|
7779
7877
|
applySeoChanges: {
|
|
7780
7878
|
path: "/seo/apply",
|
|
7781
7879
|
method: "POST",
|
|
7782
7880
|
auth: "user",
|
|
7783
7881
|
responseKind: "json"
|
|
7784
7882
|
},
|
|
7785
|
-
aiCreateBriefChat: {
|
|
7786
|
-
path: "/ai/chat/create-brief",
|
|
7787
|
-
method: "POST",
|
|
7788
|
-
auth: "user",
|
|
7789
|
-
responseKind: "json"
|
|
7790
|
-
},
|
|
7791
|
-
aiPatchDryRun: {
|
|
7792
|
-
path: "/ai/patch/dry-run",
|
|
7793
|
-
method: "POST",
|
|
7794
|
-
auth: "user",
|
|
7795
|
-
responseKind: "json"
|
|
7796
|
-
},
|
|
7797
|
-
aiPatchApply: {
|
|
7798
|
-
path: "/ai/patch/apply",
|
|
7799
|
-
method: "POST",
|
|
7800
|
-
auth: "user",
|
|
7801
|
-
responseKind: "json"
|
|
7802
|
-
},
|
|
7803
7883
|
aiPlaygroundProposeMulti: {
|
|
7804
7884
|
path: "/sites/{siteId}/ai/playground/propose-multi",
|
|
7805
7885
|
method: "POST",
|
|
@@ -7812,17 +7892,26 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
7812
7892
|
auth: "user",
|
|
7813
7893
|
responseKind: "stream"
|
|
7814
7894
|
},
|
|
7815
|
-
|
|
7816
|
-
path: "/
|
|
7895
|
+
assistantSuggestions: {
|
|
7896
|
+
path: "/assistant/suggestions",
|
|
7817
7897
|
method: "POST",
|
|
7818
7898
|
auth: "user",
|
|
7819
|
-
responseKind: "
|
|
7899
|
+
responseKind: "json",
|
|
7900
|
+
errors: []
|
|
7820
7901
|
},
|
|
7821
|
-
|
|
7822
|
-
path: "/
|
|
7902
|
+
submitSupportTicket: {
|
|
7903
|
+
path: "/assistant/support",
|
|
7823
7904
|
method: "POST",
|
|
7824
7905
|
auth: "user",
|
|
7825
|
-
responseKind: "
|
|
7906
|
+
responseKind: "json",
|
|
7907
|
+
errors: []
|
|
7908
|
+
},
|
|
7909
|
+
assistantTurn: {
|
|
7910
|
+
path: "/assistant/turn",
|
|
7911
|
+
method: "POST",
|
|
7912
|
+
auth: "user",
|
|
7913
|
+
responseKind: "stream",
|
|
7914
|
+
errors: []
|
|
7826
7915
|
},
|
|
7827
7916
|
aiPlaygroundPageConvert: {
|
|
7828
7917
|
path: "/sites/{siteId}/ai/playground/page-convert",
|
|
@@ -8021,6 +8110,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
8021
8110
|
demoMutation: DEMO_MUTATION_BLOCKED_DISABLED
|
|
8022
8111
|
},
|
|
8023
8112
|
...SITE_API_KEY_ENDPOINT_DEFINITIONS,
|
|
8113
|
+
...GUARDED_CONTENT_REPLAY_ENDPOINT_DEFINITIONS,
|
|
8024
8114
|
getBookingSettings: {
|
|
8025
8115
|
path: "/sites/{siteId}/bookings/settings",
|
|
8026
8116
|
method: "GET",
|
|
@@ -8154,20 +8244,6 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
8154
8244
|
auth: "user",
|
|
8155
8245
|
responseKind: "json"
|
|
8156
8246
|
},
|
|
8157
|
-
opsCancelEventAttendee: {
|
|
8158
|
-
path: "/ops/sites/{siteId}/events/attendees/{attendeeId}/cancel",
|
|
8159
|
-
method: "POST",
|
|
8160
|
-
auth: "user",
|
|
8161
|
-
responseKind: "json",
|
|
8162
|
-
demoMutation: DEMO_MUTATION_INTERNAL_ONLY,
|
|
8163
|
-
errors: [
|
|
8164
|
-
"validation:invalid_input",
|
|
8165
|
-
"auth:forbidden",
|
|
8166
|
-
"resource:not_found",
|
|
8167
|
-
"resource:conflict",
|
|
8168
|
-
"server:internal_error"
|
|
8169
|
-
]
|
|
8170
|
-
},
|
|
8171
8247
|
getEventAttendeeDetails: {
|
|
8172
8248
|
path: "/sites/{siteId}/bookings/event-attendees/{attendeeId}",
|
|
8173
8249
|
method: "GET",
|
|
@@ -8175,19 +8251,6 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
8175
8251
|
responseKind: "json",
|
|
8176
8252
|
errors: []
|
|
8177
8253
|
},
|
|
8178
|
-
cancelEventAttendee: {
|
|
8179
|
-
path: "/sites/{siteId}/bookings/event-attendees/{attendeeId}/cancel",
|
|
8180
|
-
method: "POST",
|
|
8181
|
-
auth: "user",
|
|
8182
|
-
responseKind: "json",
|
|
8183
|
-
errors: [
|
|
8184
|
-
"validation:invalid_input",
|
|
8185
|
-
"auth:forbidden",
|
|
8186
|
-
"resource:not_found",
|
|
8187
|
-
"resource:conflict",
|
|
8188
|
-
"server:internal_error"
|
|
8189
|
-
]
|
|
8190
|
-
},
|
|
8191
8254
|
opsRefundEventAttendee: {
|
|
8192
8255
|
path: "/ops/sites/{siteId}/events/attendees/{attendeeId}/refund",
|
|
8193
8256
|
method: "POST",
|
|
@@ -8771,6 +8834,13 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
8771
8834
|
auth: "user",
|
|
8772
8835
|
responseKind: "json"
|
|
8773
8836
|
},
|
|
8837
|
+
getBlockPickerContext: {
|
|
8838
|
+
errors: ["resource:not_found"],
|
|
8839
|
+
path: "/sites/{siteId}/block-picker",
|
|
8840
|
+
method: "GET",
|
|
8841
|
+
auth: "user",
|
|
8842
|
+
responseKind: "json"
|
|
8843
|
+
},
|
|
8774
8844
|
listContentTypes: {
|
|
8775
8845
|
path: "/sites/{siteId}/content-types",
|
|
8776
8846
|
method: "GET",
|
|
@@ -9036,14 +9106,6 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
9036
9106
|
auth: "user",
|
|
9037
9107
|
responseKind: "json"
|
|
9038
9108
|
},
|
|
9039
|
-
getSiteLayoutSettings: {
|
|
9040
|
-
path: "/sites/{siteId}/settings/layout",
|
|
9041
|
-
method: "GET",
|
|
9042
|
-
revalidate: 120,
|
|
9043
|
-
tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings],
|
|
9044
|
-
auth: "user",
|
|
9045
|
-
responseKind: "json"
|
|
9046
|
-
},
|
|
9047
9109
|
getSiteBannerSettings: {
|
|
9048
9110
|
path: "/sites/{siteId}/settings/banner",
|
|
9049
9111
|
method: "GET",
|
|
@@ -9097,13 +9159,6 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
9097
9159
|
],
|
|
9098
9160
|
responseKind: "json"
|
|
9099
9161
|
},
|
|
9100
|
-
updateSiteLayoutSettings: {
|
|
9101
|
-
path: "/sites/{siteId}/settings/layout",
|
|
9102
|
-
method: "POST",
|
|
9103
|
-
tags: [TAG_TEMPLATES.site, TAG_TEMPLATES.siteSettings],
|
|
9104
|
-
auth: "user",
|
|
9105
|
-
responseKind: "json"
|
|
9106
|
-
},
|
|
9107
9162
|
updateSiteBannerSettings: {
|
|
9108
9163
|
path: "/sites/{siteId}/settings/banner",
|
|
9109
9164
|
method: "POST",
|
|
@@ -11274,6 +11329,32 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
11274
11329
|
auth: "user",
|
|
11275
11330
|
responseKind: "json"
|
|
11276
11331
|
},
|
|
11332
|
+
previewBookingOperation: {
|
|
11333
|
+
path: "/bookings/operations/preview",
|
|
11334
|
+
method: "POST",
|
|
11335
|
+
auth: "user",
|
|
11336
|
+
responseKind: "json",
|
|
11337
|
+
errors: [
|
|
11338
|
+
"server:internal_error",
|
|
11339
|
+
"auth:insufficient_permissions",
|
|
11340
|
+
"validation:invalid_input",
|
|
11341
|
+
"resource:not_found",
|
|
11342
|
+
"resource:conflict"
|
|
11343
|
+
]
|
|
11344
|
+
},
|
|
11345
|
+
confirmBookingOperation: {
|
|
11346
|
+
path: "/bookings/operations/confirm",
|
|
11347
|
+
method: "POST",
|
|
11348
|
+
auth: "user",
|
|
11349
|
+
responseKind: "json",
|
|
11350
|
+
errors: [
|
|
11351
|
+
"server:internal_error",
|
|
11352
|
+
"auth:insufficient_permissions",
|
|
11353
|
+
"validation:invalid_input",
|
|
11354
|
+
"resource:not_found",
|
|
11355
|
+
"resource:conflict"
|
|
11356
|
+
]
|
|
11357
|
+
},
|
|
11277
11358
|
createEventOccurrence: {
|
|
11278
11359
|
path: "/sites/{siteId}/bookings/event-series/{seriesId}/occurrences",
|
|
11279
11360
|
method: "POST",
|
|
@@ -13956,27 +14037,29 @@ function buildApiRequestPlan(input) {
|
|
|
13956
14037
|
...!isGetOrHead && "tags" in endpointConfig && Array.isArray(endpointConfig.tags) ? { cacheInvalidationTags: endpointConfig.tags.map((tag) => tag) } : {}
|
|
13957
14038
|
};
|
|
13958
14039
|
}
|
|
14040
|
+
/** Shared HTTP error boundary for parsed calls and streaming transports. */
|
|
14041
|
+
async function createApiRequestError(response, endpoint, fallbackMessage) {
|
|
14042
|
+
const body = await parseErrorBody(response);
|
|
14043
|
+
const details = extractApiEnvelopeErrorDetails(body);
|
|
14044
|
+
const config = API_ENDPOINTS[endpoint];
|
|
14045
|
+
return new ApiRequestError(details.message ?? fallbackMessage ?? `Request to ${String(endpoint)} failed with status ${response.status}`, {
|
|
14046
|
+
endpoint,
|
|
14047
|
+
status: response.status,
|
|
14048
|
+
method: config.method,
|
|
14049
|
+
auth: config.auth ?? "user",
|
|
14050
|
+
requestId: response.headers.get("x-request-id") ?? undefined,
|
|
14051
|
+
body,
|
|
14052
|
+
errorCode: details.code ?? undefined,
|
|
14053
|
+
retryAfterMs: parseRetryAfterHeader(response.headers.get("retry-after"))
|
|
14054
|
+
});
|
|
14055
|
+
}
|
|
13959
14056
|
function createParsedClient(rawClient) {
|
|
13960
14057
|
return async (params) => {
|
|
13961
14058
|
const response = await rawClient(params);
|
|
13962
14059
|
const endpoint = params.endpoint;
|
|
13963
14060
|
const config = API_ENDPOINTS[endpoint];
|
|
13964
|
-
const auth = config.auth ?? "user";
|
|
13965
14061
|
if (!response.ok) {
|
|
13966
|
-
|
|
13967
|
-
const envelopeError = extractApiEnvelopeErrorDetails(body);
|
|
13968
|
-
const requestId = response.headers.get("x-request-id") ?? undefined;
|
|
13969
|
-
const retryAfterMs = parseRetryAfterHeader(response.headers.get("retry-after"));
|
|
13970
|
-
throw new ApiRequestError(`Request to ${String(endpoint)} failed with status ${response.status}`, {
|
|
13971
|
-
endpoint,
|
|
13972
|
-
status: response.status,
|
|
13973
|
-
method: config.method,
|
|
13974
|
-
auth,
|
|
13975
|
-
requestId,
|
|
13976
|
-
body,
|
|
13977
|
-
errorCode: envelopeError.code ?? undefined,
|
|
13978
|
-
retryAfterMs
|
|
13979
|
-
});
|
|
14062
|
+
throw await createApiRequestError(response, endpoint);
|
|
13980
14063
|
}
|
|
13981
14064
|
return parseSuccessResponse(endpoint, response, config);
|
|
13982
14065
|
};
|
|
@@ -16332,6 +16415,15 @@ function isFeatureEnabled(ctx, flag) {
|
|
|
16332
16415
|
function isDemoSettingsNavSurfaceVisible(mode, surfaceId) {
|
|
16333
16416
|
return !isDemoDashboardUiRestricted(mode) || !hiddenDemoSettingsNavIds.has(surfaceId);
|
|
16334
16417
|
}
|
|
16418
|
+
const DASHBOARD_SETTINGS_DANGER_ITEM = {
|
|
16419
|
+
id: "settings.danger",
|
|
16420
|
+
label: "Delete site",
|
|
16421
|
+
keywords: [
|
|
16422
|
+
"delete",
|
|
16423
|
+
"danger",
|
|
16424
|
+
"remove"
|
|
16425
|
+
]
|
|
16426
|
+
};
|
|
16335
16427
|
function buildDashboardSettingsNavPlan(ctx) {
|
|
16336
16428
|
const visibility = extractSdkDashboardNavVisibilityConfigForRole(ctx.sdkConfig, "settingsNav", ctx.role);
|
|
16337
16429
|
const groups = DASHBOARD_SETTINGS_NAV_GROUPS.map((group) => {
|
|
@@ -16351,15 +16443,7 @@ function buildDashboardSettingsNavPlan(ctx) {
|
|
|
16351
16443
|
items
|
|
16352
16444
|
};
|
|
16353
16445
|
}).filter((group) => group.items.length > 0);
|
|
16354
|
-
const dangerItem = ctx.role === "owner" && !isDemoDashboardUiRestricted(ctx.demoUiMode ?? "standard") ?
|
|
16355
|
-
id: "settings.danger",
|
|
16356
|
-
label: "Delete site",
|
|
16357
|
-
keywords: [
|
|
16358
|
-
"delete",
|
|
16359
|
-
"danger",
|
|
16360
|
-
"remove"
|
|
16361
|
-
]
|
|
16362
|
-
} : undefined;
|
|
16446
|
+
const dangerItem = ctx.role === "owner" && !isDemoDashboardUiRestricted(ctx.demoUiMode ?? "standard") ? DASHBOARD_SETTINGS_DANGER_ITEM : undefined;
|
|
16363
16447
|
return {
|
|
16364
16448
|
groups,
|
|
16365
16449
|
...dangerItem ? { dangerItem } : {}
|
|
@@ -16369,40 +16453,37 @@ function buildDashboardSettingsNavPlan(ctx) {
|
|
|
16369
16453
|
//#endregion
|
|
16370
16454
|
//#region ../api/src/navigation/dashboardTeamMemberNav.ts
|
|
16371
16455
|
function buildDashboardTeamMemberNavPlan(ctx) {
|
|
16372
|
-
const items = [];
|
|
16373
16456
|
const ownResourceId = getOwnAppointmentResourceId(ctx.staffScope);
|
|
16374
|
-
|
|
16375
|
-
|
|
16376
|
-
|
|
16377
|
-
label: "My Calendar",
|
|
16378
|
-
destination: { kind: "appointments_calendar" }
|
|
16379
|
-
}, {
|
|
16380
|
-
id: "team.availability",
|
|
16381
|
-
label: "My Availability",
|
|
16382
|
-
destination: {
|
|
16383
|
-
kind: "appointment_resource_availability",
|
|
16384
|
-
resourceId: ownResourceId
|
|
16385
|
-
}
|
|
16386
|
-
});
|
|
16387
|
-
}
|
|
16388
|
-
if (ownResourceId) {
|
|
16389
|
-
items.push({
|
|
16457
|
+
return [
|
|
16458
|
+
...hasAppointmentStaffAccess(ctx.staffScope) ? buildAppointmentStaffNavPlan(ownResourceId) : [],
|
|
16459
|
+
...ownResourceId ? [{
|
|
16390
16460
|
id: "team.calendarSync",
|
|
16391
16461
|
label: "My Calendar Sync",
|
|
16392
16462
|
destination: {
|
|
16393
16463
|
kind: "appointment_resource_calendar",
|
|
16394
16464
|
resourceId: ownResourceId
|
|
16395
16465
|
}
|
|
16396
|
-
}
|
|
16397
|
-
|
|
16398
|
-
if (hasEventOpsAccess(ctx.staffScope)) {
|
|
16399
|
-
items.push({
|
|
16466
|
+
}] : [],
|
|
16467
|
+
...hasEventOpsAccess(ctx.staffScope) ? [{
|
|
16400
16468
|
id: "team.eventOps",
|
|
16401
16469
|
label: "Event Ops",
|
|
16402
16470
|
destination: { kind: "ops_site_events" }
|
|
16403
|
-
}
|
|
16404
|
-
|
|
16405
|
-
|
|
16471
|
+
}] : []
|
|
16472
|
+
];
|
|
16473
|
+
}
|
|
16474
|
+
function buildAppointmentStaffNavPlan(resourceId) {
|
|
16475
|
+
return [{
|
|
16476
|
+
id: "team.calendar",
|
|
16477
|
+
label: "My Calendar",
|
|
16478
|
+
destination: { kind: "appointments_calendar" }
|
|
16479
|
+
}, {
|
|
16480
|
+
id: "team.availability",
|
|
16481
|
+
label: "My Availability",
|
|
16482
|
+
destination: resourceId ? {
|
|
16483
|
+
kind: "appointment_resource_availability",
|
|
16484
|
+
resourceId
|
|
16485
|
+
} : { kind: "appointment_resources" }
|
|
16486
|
+
}];
|
|
16406
16487
|
}
|
|
16407
16488
|
function isTeamMemberAccessiblePath(path$3, ownAppointmentResourceId) {
|
|
16408
16489
|
if (path$3 === "bookings" || path$3 === "bookings/resources") {
|
|
@@ -20957,7 +21038,6 @@ function recordPageDiff(summary, diff) {
|
|
|
20957
21038
|
summary.unchanged++;
|
|
20958
21039
|
break;
|
|
20959
21040
|
}
|
|
20960
|
-
if (diff.statusChange === "publish") summary.publish++;
|
|
20961
21041
|
if (diff.statusChange === "unpublish") summary.unpublish++;
|
|
20962
21042
|
}
|
|
20963
21043
|
function recordBlockDiff(summary, diff) {
|
|
@@ -21068,11 +21148,10 @@ function classifyPage(localPage, remotePage, options, blockSummary) {
|
|
|
21068
21148
|
type: "create",
|
|
21069
21149
|
identifier: localPage.identifier,
|
|
21070
21150
|
blocks: blockDiffs$1,
|
|
21071
|
-
remoteBlockIdentifiers: []
|
|
21072
|
-
statusChange: determineStatusChange(localPage.status, undefined)
|
|
21151
|
+
remoteBlockIdentifiers: []
|
|
21073
21152
|
};
|
|
21074
21153
|
}
|
|
21075
|
-
const statusChange = determineStatusChange(localPage.status, remotePage.status);
|
|
21154
|
+
const statusChange = determineStatusChange(localPage.status, remotePage.status) === "unpublish" ? "unpublish" : undefined;
|
|
21076
21155
|
if (options.existingEntries === "skip") {
|
|
21077
21156
|
return {
|
|
21078
21157
|
type: "unchanged",
|