riverbankcms 0.22.2 → 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 +1842 -1205
- 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-BGVgMNMw.mjs → entryCommands-BdN5YrqI.mjs} +242 -170
- package/dist/{eventUpsertInputSchema-CdX--hHz.mjs → eventUpsertInputSchema-kp-U13TZ.mjs} +70 -32
- package/dist/load-config-C7Rd822n.mjs +4 -0
- package/dist/{load-config-BV9Ig2CH.mjs → load-config-D5DDfmv1.mjs} +2 -2
- package/dist/{plan-CFMj_Hee.mjs → plan-6m8gsGI8.mjs} +1 -1
- package/dist/scaffold/index.mjs +2 -2
- package/dist/{sdk-event-upsert-zWw5VolM.mjs → sdk-event-upsert-BnBxyTR6.mjs} +486 -122
- package/dist/{src-ZACBG29u.mjs → src-BPh_OivC.mjs} +463 -85
- package/dist/testing.mjs +4 -4
- package/package.json +1 -1
- package/dist/load-config-JWz__Dkx.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);
|
|
@@ -4480,6 +4515,47 @@ function parsePublicProductCategorySelector(value) {
|
|
|
4480
4515
|
return undefined;
|
|
4481
4516
|
}
|
|
4482
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
|
+
|
|
4483
4559
|
//#endregion
|
|
4484
4560
|
//#region ../api/src/apiEndpointTypes.ts
|
|
4485
4561
|
function allowedDemoMutationPolicy() {
|
|
@@ -4917,6 +4993,58 @@ const SDK_ENTRY_READ_ENDPOINTS = {
|
|
|
4917
4993
|
}
|
|
4918
4994
|
};
|
|
4919
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
|
+
|
|
4920
5048
|
//#endregion
|
|
4921
5049
|
//#region ../api/src/appointmentRequestEndpointDefinitions.ts
|
|
4922
5050
|
const APPOINTMENT_REQUEST_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
@@ -5643,12 +5771,6 @@ const APPOINTMENT_ENDPOINT_DEFINITIONS = defineEndpointDefinitions({
|
|
|
5643
5771
|
"server:internal_error"
|
|
5644
5772
|
]
|
|
5645
5773
|
},
|
|
5646
|
-
cancelAppointment: {
|
|
5647
|
-
path: "/sites/{siteId}/bookings/appointments/{appointmentId}/cancel",
|
|
5648
|
-
method: "POST",
|
|
5649
|
-
auth: "user",
|
|
5650
|
-
responseKind: "json"
|
|
5651
|
-
},
|
|
5652
5774
|
rescheduleAppointment: {
|
|
5653
5775
|
path: "/sites/{siteId}/bookings/appointments/{appointmentId}/reschedule",
|
|
5654
5776
|
method: "POST",
|
|
@@ -5792,19 +5914,6 @@ const EVENT_SERIES_REGISTRATION_ENDPOINT_DEFINITIONS = defineEndpointDefinitions
|
|
|
5792
5914
|
"server:internal_error"
|
|
5793
5915
|
]
|
|
5794
5916
|
},
|
|
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
5917
|
saveEventSeriesRegistrationAnswers: {
|
|
5809
5918
|
path: "/sites/{siteId}/bookings/event-series/{seriesId}/registrations/{registrationId}/answers",
|
|
5810
5919
|
method: "PUT",
|
|
@@ -7490,6 +7599,14 @@ const lifecycleErrors = [
|
|
|
7490
7599
|
"server:internal_error"
|
|
7491
7600
|
];
|
|
7492
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
|
+
},
|
|
7493
7610
|
readEditLease: {
|
|
7494
7611
|
path: path$2,
|
|
7495
7612
|
method: "GET",
|
|
@@ -7743,6 +7860,7 @@ const clientErrorReportSchema = z.object({
|
|
|
7743
7860
|
//#endregion
|
|
7744
7861
|
//#region ../api/src/endpoints.ts
|
|
7745
7862
|
const ENDPOINT_DEFINITIONS = {
|
|
7863
|
+
...PAGE_JOURNAL_ENDPOINT_DEFINITIONS,
|
|
7746
7864
|
...PREVIEW_AUTH_ENDPOINT_DEFINITIONS,
|
|
7747
7865
|
...SITE_LIFECYCLE_ENDPOINT_DEFINITIONS,
|
|
7748
7866
|
...CLIENT_ERROR_REPORT_ENDPOINT_DEFINITIONS,
|
|
@@ -7756,57 +7874,12 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
7756
7874
|
...EDIT_LEASE_ENDPOINT_DEFINITIONS,
|
|
7757
7875
|
...PAGE_SURFACE_EDITOR_ENDPOINT_DEFINITIONS,
|
|
7758
7876
|
...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
7877
|
applySeoChanges: {
|
|
7787
7878
|
path: "/seo/apply",
|
|
7788
7879
|
method: "POST",
|
|
7789
7880
|
auth: "user",
|
|
7790
7881
|
responseKind: "json"
|
|
7791
7882
|
},
|
|
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
7883
|
aiPlaygroundProposeMulti: {
|
|
7811
7884
|
path: "/sites/{siteId}/ai/playground/propose-multi",
|
|
7812
7885
|
method: "POST",
|
|
@@ -7819,17 +7892,26 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
7819
7892
|
auth: "user",
|
|
7820
7893
|
responseKind: "stream"
|
|
7821
7894
|
},
|
|
7822
|
-
|
|
7823
|
-
path: "/
|
|
7895
|
+
assistantSuggestions: {
|
|
7896
|
+
path: "/assistant/suggestions",
|
|
7824
7897
|
method: "POST",
|
|
7825
7898
|
auth: "user",
|
|
7826
|
-
responseKind: "
|
|
7899
|
+
responseKind: "json",
|
|
7900
|
+
errors: []
|
|
7827
7901
|
},
|
|
7828
|
-
|
|
7829
|
-
path: "/
|
|
7902
|
+
submitSupportTicket: {
|
|
7903
|
+
path: "/assistant/support",
|
|
7830
7904
|
method: "POST",
|
|
7831
7905
|
auth: "user",
|
|
7832
|
-
responseKind: "
|
|
7906
|
+
responseKind: "json",
|
|
7907
|
+
errors: []
|
|
7908
|
+
},
|
|
7909
|
+
assistantTurn: {
|
|
7910
|
+
path: "/assistant/turn",
|
|
7911
|
+
method: "POST",
|
|
7912
|
+
auth: "user",
|
|
7913
|
+
responseKind: "stream",
|
|
7914
|
+
errors: []
|
|
7833
7915
|
},
|
|
7834
7916
|
aiPlaygroundPageConvert: {
|
|
7835
7917
|
path: "/sites/{siteId}/ai/playground/page-convert",
|
|
@@ -8028,6 +8110,7 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
8028
8110
|
demoMutation: DEMO_MUTATION_BLOCKED_DISABLED
|
|
8029
8111
|
},
|
|
8030
8112
|
...SITE_API_KEY_ENDPOINT_DEFINITIONS,
|
|
8113
|
+
...GUARDED_CONTENT_REPLAY_ENDPOINT_DEFINITIONS,
|
|
8031
8114
|
getBookingSettings: {
|
|
8032
8115
|
path: "/sites/{siteId}/bookings/settings",
|
|
8033
8116
|
method: "GET",
|
|
@@ -8161,20 +8244,6 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
8161
8244
|
auth: "user",
|
|
8162
8245
|
responseKind: "json"
|
|
8163
8246
|
},
|
|
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
8247
|
getEventAttendeeDetails: {
|
|
8179
8248
|
path: "/sites/{siteId}/bookings/event-attendees/{attendeeId}",
|
|
8180
8249
|
method: "GET",
|
|
@@ -8182,19 +8251,6 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
8182
8251
|
responseKind: "json",
|
|
8183
8252
|
errors: []
|
|
8184
8253
|
},
|
|
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
8254
|
opsRefundEventAttendee: {
|
|
8199
8255
|
path: "/ops/sites/{siteId}/events/attendees/{attendeeId}/refund",
|
|
8200
8256
|
method: "POST",
|
|
@@ -8778,6 +8834,13 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
8778
8834
|
auth: "user",
|
|
8779
8835
|
responseKind: "json"
|
|
8780
8836
|
},
|
|
8837
|
+
getBlockPickerContext: {
|
|
8838
|
+
errors: ["resource:not_found"],
|
|
8839
|
+
path: "/sites/{siteId}/block-picker",
|
|
8840
|
+
method: "GET",
|
|
8841
|
+
auth: "user",
|
|
8842
|
+
responseKind: "json"
|
|
8843
|
+
},
|
|
8781
8844
|
listContentTypes: {
|
|
8782
8845
|
path: "/sites/{siteId}/content-types",
|
|
8783
8846
|
method: "GET",
|
|
@@ -9043,14 +9106,6 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
9043
9106
|
auth: "user",
|
|
9044
9107
|
responseKind: "json"
|
|
9045
9108
|
},
|
|
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
9109
|
getSiteBannerSettings: {
|
|
9055
9110
|
path: "/sites/{siteId}/settings/banner",
|
|
9056
9111
|
method: "GET",
|
|
@@ -9104,13 +9159,6 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
9104
9159
|
],
|
|
9105
9160
|
responseKind: "json"
|
|
9106
9161
|
},
|
|
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
9162
|
updateSiteBannerSettings: {
|
|
9115
9163
|
path: "/sites/{siteId}/settings/banner",
|
|
9116
9164
|
method: "POST",
|
|
@@ -11281,6 +11329,32 @@ const ENDPOINT_DEFINITIONS = {
|
|
|
11281
11329
|
auth: "user",
|
|
11282
11330
|
responseKind: "json"
|
|
11283
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
|
+
},
|
|
11284
11358
|
createEventOccurrence: {
|
|
11285
11359
|
path: "/sites/{siteId}/bookings/event-series/{seriesId}/occurrences",
|
|
11286
11360
|
method: "POST",
|
|
@@ -13963,27 +14037,29 @@ function buildApiRequestPlan(input) {
|
|
|
13963
14037
|
...!isGetOrHead && "tags" in endpointConfig && Array.isArray(endpointConfig.tags) ? { cacheInvalidationTags: endpointConfig.tags.map((tag) => tag) } : {}
|
|
13964
14038
|
};
|
|
13965
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
|
+
}
|
|
13966
14056
|
function createParsedClient(rawClient) {
|
|
13967
14057
|
return async (params) => {
|
|
13968
14058
|
const response = await rawClient(params);
|
|
13969
14059
|
const endpoint = params.endpoint;
|
|
13970
14060
|
const config = API_ENDPOINTS[endpoint];
|
|
13971
|
-
const auth = config.auth ?? "user";
|
|
13972
14061
|
if (!response.ok) {
|
|
13973
|
-
|
|
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
|
-
});
|
|
14062
|
+
throw await createApiRequestError(response, endpoint);
|
|
13987
14063
|
}
|
|
13988
14064
|
return parseSuccessResponse(endpoint, response, config);
|
|
13989
14065
|
};
|
|
@@ -16339,6 +16415,15 @@ function isFeatureEnabled(ctx, flag) {
|
|
|
16339
16415
|
function isDemoSettingsNavSurfaceVisible(mode, surfaceId) {
|
|
16340
16416
|
return !isDemoDashboardUiRestricted(mode) || !hiddenDemoSettingsNavIds.has(surfaceId);
|
|
16341
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
|
+
};
|
|
16342
16427
|
function buildDashboardSettingsNavPlan(ctx) {
|
|
16343
16428
|
const visibility = extractSdkDashboardNavVisibilityConfigForRole(ctx.sdkConfig, "settingsNav", ctx.role);
|
|
16344
16429
|
const groups = DASHBOARD_SETTINGS_NAV_GROUPS.map((group) => {
|
|
@@ -16358,15 +16443,7 @@ function buildDashboardSettingsNavPlan(ctx) {
|
|
|
16358
16443
|
items
|
|
16359
16444
|
};
|
|
16360
16445
|
}).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;
|
|
16446
|
+
const dangerItem = ctx.role === "owner" && !isDemoDashboardUiRestricted(ctx.demoUiMode ?? "standard") ? DASHBOARD_SETTINGS_DANGER_ITEM : undefined;
|
|
16370
16447
|
return {
|
|
16371
16448
|
groups,
|
|
16372
16449
|
...dangerItem ? { dangerItem } : {}
|
|
@@ -16376,40 +16453,37 @@ function buildDashboardSettingsNavPlan(ctx) {
|
|
|
16376
16453
|
//#endregion
|
|
16377
16454
|
//#region ../api/src/navigation/dashboardTeamMemberNav.ts
|
|
16378
16455
|
function buildDashboardTeamMemberNavPlan(ctx) {
|
|
16379
|
-
const items = [];
|
|
16380
16456
|
const ownResourceId = getOwnAppointmentResourceId(ctx.staffScope);
|
|
16381
|
-
|
|
16382
|
-
|
|
16383
|
-
|
|
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({
|
|
16457
|
+
return [
|
|
16458
|
+
...hasAppointmentStaffAccess(ctx.staffScope) ? buildAppointmentStaffNavPlan(ownResourceId) : [],
|
|
16459
|
+
...ownResourceId ? [{
|
|
16397
16460
|
id: "team.calendarSync",
|
|
16398
16461
|
label: "My Calendar Sync",
|
|
16399
16462
|
destination: {
|
|
16400
16463
|
kind: "appointment_resource_calendar",
|
|
16401
16464
|
resourceId: ownResourceId
|
|
16402
16465
|
}
|
|
16403
|
-
}
|
|
16404
|
-
|
|
16405
|
-
if (hasEventOpsAccess(ctx.staffScope)) {
|
|
16406
|
-
items.push({
|
|
16466
|
+
}] : [],
|
|
16467
|
+
...hasEventOpsAccess(ctx.staffScope) ? [{
|
|
16407
16468
|
id: "team.eventOps",
|
|
16408
16469
|
label: "Event Ops",
|
|
16409
16470
|
destination: { kind: "ops_site_events" }
|
|
16410
|
-
}
|
|
16411
|
-
|
|
16412
|
-
|
|
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
|
+
}];
|
|
16413
16487
|
}
|
|
16414
16488
|
function isTeamMemberAccessiblePath(path$3, ownAppointmentResourceId) {
|
|
16415
16489
|
if (path$3 === "bookings" || path$3 === "bookings/resources") {
|
|
@@ -20964,7 +21038,6 @@ function recordPageDiff(summary, diff) {
|
|
|
20964
21038
|
summary.unchanged++;
|
|
20965
21039
|
break;
|
|
20966
21040
|
}
|
|
20967
|
-
if (diff.statusChange === "publish") summary.publish++;
|
|
20968
21041
|
if (diff.statusChange === "unpublish") summary.unpublish++;
|
|
20969
21042
|
}
|
|
20970
21043
|
function recordBlockDiff(summary, diff) {
|
|
@@ -21075,11 +21148,10 @@ function classifyPage(localPage, remotePage, options, blockSummary) {
|
|
|
21075
21148
|
type: "create",
|
|
21076
21149
|
identifier: localPage.identifier,
|
|
21077
21150
|
blocks: blockDiffs$1,
|
|
21078
|
-
remoteBlockIdentifiers: []
|
|
21079
|
-
statusChange: determineStatusChange(localPage.status, undefined)
|
|
21151
|
+
remoteBlockIdentifiers: []
|
|
21080
21152
|
};
|
|
21081
21153
|
}
|
|
21082
|
-
const statusChange = determineStatusChange(localPage.status, remotePage.status);
|
|
21154
|
+
const statusChange = determineStatusChange(localPage.status, remotePage.status) === "unpublish" ? "unpublish" : undefined;
|
|
21083
21155
|
if (options.existingEntries === "skip") {
|
|
21084
21156
|
return {
|
|
21085
21157
|
type: "unchanged",
|