@riverbankcms/sdk 0.70.0 → 0.70.3
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/README.md +29 -0
- package/dist/_dts/ai/src/contracts/commandExposure.d.ts +8 -0
- package/dist/_dts/ai/src/contracts/feedback.d.ts +55 -0
- package/dist/_dts/ai/src/contracts/proposals.d.ts +34764 -0
- package/dist/_dts/ai/src/contracts.d.ts +5 -0
- package/dist/_dts/ai/src/designer/rfc6902.d.ts +16 -0
- package/dist/_dts/ai/src/designer/themePatch.d.ts +50 -0
- package/dist/_dts/api/src/aiPlayground.d.ts +1 -1
- package/dist/_dts/api/src/appointmentSetup.d.ts +19 -0
- package/dist/_dts/api/src/availability.d.ts +84 -2
- package/dist/_dts/api/src/bookingManagementEndpoints.d.ts +10 -1
- package/dist/_dts/api/src/contentRuntime.d.ts +1 -0
- package/dist/_dts/api/src/endpoints.d.ts +29 -0
- package/dist/_dts/api/src/sitePlatformEndpoints.d.ts +4 -0
- package/dist/_dts/api/src/siteRuntimeEndpoints.d.ts +29 -1
- package/dist/_dts/api/src/types.d.ts +1 -1
- package/dist/_dts/billing/src/components/index.d.ts +41 -0
- package/dist/_dts/db/src/generated/supabase/database.types.d.ts +219 -0
- package/dist/_dts/preview-next/src/client/preview/PreviewEditorSidebar.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShell.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/PreviewShellLayout.d.ts +2 -1
- package/dist/_dts/preview-next/src/client/preview/SiteChromeCustomizeContext.d.ts +3 -1
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.d.ts +3 -1
- package/dist/_dts/preview-next/src/client/preview/StyleConfigurator.state.d.ts +1 -0
- package/dist/_dts/preview-next/src/client/preview/styleConfiguratorApplyPayload.d.ts +8 -0
- package/dist/_dts/preview-next/src/client/preview/styleConfiguratorSnapshot.d.ts +1 -0
- package/dist/_dts/sdk/src/cli/commands/delete.d.ts +3 -0
- package/dist/_dts/sdk/src/cli/commands/style.d.ts +37 -0
- package/dist/_dts/sdk/src/cli/helpers.d.ts +8 -33
- package/dist/_dts/sdk/src/cli/site-commands/oneOffCommands.d.ts +81 -0
- package/dist/_dts/sdk/src/client/management/index.d.ts +2 -1
- package/dist/_dts/sdk/src/client/management/theme.d.ts +3 -1
- package/dist/_dts/sdk/src/client/management/types.d.ts +23 -0
- package/dist/_dts/sdk/src/components.d.ts +2 -1
- package/dist/_dts/sdk/src/next/types.d.ts +4 -2
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +1 -0
- package/dist/_dts/sdk/src/rendering/index.d.ts +2 -1
- package/dist/_dts/sdk/src/rendering/overrideResolution.d.ts +10 -0
- package/dist/_dts/sdk/src/rendering/overrides.d.ts +12 -0
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/_dts/site-commands/src/commands.d.ts +25 -7
- package/dist/_dts/site-commands/src/metadata.d.ts +2 -2
- package/dist/cli/index.mjs +844 -108
- package/dist/client/client.mjs +256 -202
- package/dist/client/hooks.mjs +55 -1
- package/dist/client/rendering.mjs +25467 -25403
- package/dist/preview-next/before-render.mjs +39 -0
- package/dist/preview-next/client/runtime.mjs +160 -39
- package/dist/preview-next/middleware.mjs +39 -0
- package/dist/server/components.mjs +65 -1
- package/dist/server/config-validation.mjs +55 -1
- package/dist/server/config.mjs +55 -1
- package/dist/server/data.mjs +55 -1
- package/dist/server/index.mjs +40 -1
- package/dist/server/next.mjs +137 -4
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +55 -1
- package/dist/server/rendering.mjs +65 -1
- package/dist/server/routing.mjs +56 -2
- package/dist/server/server.mjs +56 -2
- package/package.json +4 -3
|
@@ -50169,6 +50169,24 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
50169
50169
|
"server:internal_error"
|
|
50170
50170
|
]
|
|
50171
50171
|
},
|
|
50172
|
+
setServiceSpecificAvailability: {
|
|
50173
|
+
path: "/sites/{siteId}/bookings/resources/{resourceId}/service-availability",
|
|
50174
|
+
method: "PUT",
|
|
50175
|
+
auth: "user",
|
|
50176
|
+
responseKind: "json",
|
|
50177
|
+
errors: [
|
|
50178
|
+
"validation:invalid_input",
|
|
50179
|
+
"resource:not_found",
|
|
50180
|
+
"server:internal_error"
|
|
50181
|
+
]
|
|
50182
|
+
},
|
|
50183
|
+
deleteServiceSpecificAvailability: {
|
|
50184
|
+
path: "/sites/{siteId}/bookings/resources/{resourceId}/service-availability/{scheduleId}",
|
|
50185
|
+
method: "DELETE",
|
|
50186
|
+
auth: "user",
|
|
50187
|
+
responseKind: "json",
|
|
50188
|
+
errors: ["resource:not_found", "server:internal_error"]
|
|
50189
|
+
},
|
|
50172
50190
|
listBlackouts: {
|
|
50173
50191
|
path: "/sites/{siteId}/bookings/resources/{resourceId}/blackouts",
|
|
50174
50192
|
method: "GET",
|
|
@@ -51804,6 +51822,20 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
51804
51822
|
auth: "user",
|
|
51805
51823
|
responseKind: "json"
|
|
51806
51824
|
},
|
|
51825
|
+
applySiteStyleSelection: {
|
|
51826
|
+
path: "/sites/{siteId}/theme/style-selection/apply",
|
|
51827
|
+
method: "POST",
|
|
51828
|
+
tags: [TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme],
|
|
51829
|
+
auth: "user",
|
|
51830
|
+
errors: [
|
|
51831
|
+
"validation:invalid_input",
|
|
51832
|
+
"auth:forbidden",
|
|
51833
|
+
"resource:not_found",
|
|
51834
|
+
"resource:conflict",
|
|
51835
|
+
"server:internal_error"
|
|
51836
|
+
],
|
|
51837
|
+
responseKind: "json"
|
|
51838
|
+
},
|
|
51807
51839
|
saveSiteChromeLookSelection: {
|
|
51808
51840
|
path: "/sites/{siteId}/theme/site-chrome-look",
|
|
51809
51841
|
method: "POST",
|
|
@@ -54547,6 +54579,13 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
54547
54579
|
auth: "service",
|
|
54548
54580
|
responseKind: "json"
|
|
54549
54581
|
},
|
|
54582
|
+
sdkApplySiteStyleSelection: {
|
|
54583
|
+
path: "/sdk/{siteId}/theme/style-selection/apply",
|
|
54584
|
+
method: "POST",
|
|
54585
|
+
auth: "service",
|
|
54586
|
+
responseKind: "json",
|
|
54587
|
+
errors: ["validation:invalid_input", "resource:not_found", "resource:conflict", "server:internal_error"]
|
|
54588
|
+
},
|
|
54550
54589
|
sdkUpsertFooter: {
|
|
54551
54590
|
path: "/sdk/{siteId}/footer",
|
|
54552
54591
|
method: "POST",
|
|
@@ -55821,11 +55860,26 @@ var appointmentSetupWeeklyWindowDraftSchema = z69.object({
|
|
|
55821
55860
|
startTime: z69.string(),
|
|
55822
55861
|
endTime: z69.string()
|
|
55823
55862
|
});
|
|
55863
|
+
var appointmentSetupStartTimePolicyDraftSchema = z69.discriminatedUnion("kind", [
|
|
55864
|
+
z69.object({ kind: z69.literal("automatic_spacing") }),
|
|
55865
|
+
z69.object({
|
|
55866
|
+
kind: z69.literal("regular_interval"),
|
|
55867
|
+
intervalMinutes: z69.union([
|
|
55868
|
+
z69.literal(10),
|
|
55869
|
+
z69.literal(15),
|
|
55870
|
+
z69.literal(20),
|
|
55871
|
+
z69.literal(30),
|
|
55872
|
+
z69.literal(45),
|
|
55873
|
+
z69.literal(60)
|
|
55874
|
+
])
|
|
55875
|
+
})
|
|
55876
|
+
]);
|
|
55824
55877
|
var appointmentSetupAvailabilityDraftSchema = z69.object({
|
|
55825
55878
|
kind: z69.literal("weekly_windows"),
|
|
55826
55879
|
resourceRef: appointmentSetupRefSchema,
|
|
55827
55880
|
serviceRef: appointmentSetupRefSchema.nullable(),
|
|
55828
|
-
windows: z69.array(appointmentSetupWeeklyWindowDraftSchema)
|
|
55881
|
+
windows: z69.array(appointmentSetupWeeklyWindowDraftSchema),
|
|
55882
|
+
startTimePolicy: appointmentSetupStartTimePolicyDraftSchema.optional()
|
|
55829
55883
|
});
|
|
55830
55884
|
var APPOINTMENT_DEFAULT_MIN_LEAD_MINUTES_MAX = 28 * 24 * 60;
|
|
55831
55885
|
var APPOINTMENT_DEFAULT_MAX_BOOKING_NOTICE_MINUTES_MAX = 10 * 365 * 24 * 60;
|
|
@@ -56195,6 +56249,15 @@ function resolveImageUrlWithContext2(value, options, context, transformAspectRat
|
|
|
56195
56249
|
function resolveImageSourceSetWithContext2(value, options, context) {
|
|
56196
56250
|
return resolveImageSourceSetWithContext(value, options, context);
|
|
56197
56251
|
}
|
|
56252
|
+
|
|
56253
|
+
// src/rendering/overrides.ts
|
|
56254
|
+
var lazyBlockOverrideSymbol = /* @__PURE__ */ Symbol.for("riverbankcms.sdk.lazyBlockOverride");
|
|
56255
|
+
function defineLazyBlockOverride(load) {
|
|
56256
|
+
return {
|
|
56257
|
+
[lazyBlockOverrideSymbol]: true,
|
|
56258
|
+
load
|
|
56259
|
+
};
|
|
56260
|
+
}
|
|
56198
56261
|
export {
|
|
56199
56262
|
ImagePresets2 as ImagePresets,
|
|
56200
56263
|
Layout,
|
|
@@ -56203,6 +56266,7 @@ export {
|
|
|
56203
56266
|
RichText3 as RichText,
|
|
56204
56267
|
ThemeScope2 as ThemeScope,
|
|
56205
56268
|
buildThemeRuntime2 as buildThemeRuntime,
|
|
56269
|
+
defineLazyBlockOverride,
|
|
56206
56270
|
resolveImageSourceSetWithContext2 as resolveImageSourceSetWithContext,
|
|
56207
56271
|
resolveImageUrl2 as resolveImageUrl,
|
|
56208
56272
|
resolveImageUrlWithContext2 as resolveImageUrlWithContext
|
|
@@ -1198,6 +1198,24 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
1198
1198
|
"server:internal_error"
|
|
1199
1199
|
]
|
|
1200
1200
|
},
|
|
1201
|
+
setServiceSpecificAvailability: {
|
|
1202
|
+
path: "/sites/{siteId}/bookings/resources/{resourceId}/service-availability",
|
|
1203
|
+
method: "PUT",
|
|
1204
|
+
auth: "user",
|
|
1205
|
+
responseKind: "json",
|
|
1206
|
+
errors: [
|
|
1207
|
+
"validation:invalid_input",
|
|
1208
|
+
"resource:not_found",
|
|
1209
|
+
"server:internal_error"
|
|
1210
|
+
]
|
|
1211
|
+
},
|
|
1212
|
+
deleteServiceSpecificAvailability: {
|
|
1213
|
+
path: "/sites/{siteId}/bookings/resources/{resourceId}/service-availability/{scheduleId}",
|
|
1214
|
+
method: "DELETE",
|
|
1215
|
+
auth: "user",
|
|
1216
|
+
responseKind: "json",
|
|
1217
|
+
errors: ["resource:not_found", "server:internal_error"]
|
|
1218
|
+
},
|
|
1201
1219
|
listBlackouts: {
|
|
1202
1220
|
path: "/sites/{siteId}/bookings/resources/{resourceId}/blackouts",
|
|
1203
1221
|
method: "GET",
|
|
@@ -2833,6 +2851,20 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
2833
2851
|
auth: "user",
|
|
2834
2852
|
responseKind: "json"
|
|
2835
2853
|
},
|
|
2854
|
+
applySiteStyleSelection: {
|
|
2855
|
+
path: "/sites/{siteId}/theme/style-selection/apply",
|
|
2856
|
+
method: "POST",
|
|
2857
|
+
tags: [TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme],
|
|
2858
|
+
auth: "user",
|
|
2859
|
+
errors: [
|
|
2860
|
+
"validation:invalid_input",
|
|
2861
|
+
"auth:forbidden",
|
|
2862
|
+
"resource:not_found",
|
|
2863
|
+
"resource:conflict",
|
|
2864
|
+
"server:internal_error"
|
|
2865
|
+
],
|
|
2866
|
+
responseKind: "json"
|
|
2867
|
+
},
|
|
2836
2868
|
saveSiteChromeLookSelection: {
|
|
2837
2869
|
path: "/sites/{siteId}/theme/site-chrome-look",
|
|
2838
2870
|
method: "POST",
|
|
@@ -5576,6 +5608,13 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
5576
5608
|
auth: "service",
|
|
5577
5609
|
responseKind: "json"
|
|
5578
5610
|
},
|
|
5611
|
+
sdkApplySiteStyleSelection: {
|
|
5612
|
+
path: "/sdk/{siteId}/theme/style-selection/apply",
|
|
5613
|
+
method: "POST",
|
|
5614
|
+
auth: "service",
|
|
5615
|
+
responseKind: "json",
|
|
5616
|
+
errors: ["validation:invalid_input", "resource:not_found", "resource:conflict", "server:internal_error"]
|
|
5617
|
+
},
|
|
5579
5618
|
sdkUpsertFooter: {
|
|
5580
5619
|
path: "/sdk/{siteId}/footer",
|
|
5581
5620
|
method: "POST",
|
|
@@ -31191,11 +31230,26 @@ var appointmentSetupWeeklyWindowDraftSchema = z63.object({
|
|
|
31191
31230
|
startTime: z63.string(),
|
|
31192
31231
|
endTime: z63.string()
|
|
31193
31232
|
});
|
|
31233
|
+
var appointmentSetupStartTimePolicyDraftSchema = z63.discriminatedUnion("kind", [
|
|
31234
|
+
z63.object({ kind: z63.literal("automatic_spacing") }),
|
|
31235
|
+
z63.object({
|
|
31236
|
+
kind: z63.literal("regular_interval"),
|
|
31237
|
+
intervalMinutes: z63.union([
|
|
31238
|
+
z63.literal(10),
|
|
31239
|
+
z63.literal(15),
|
|
31240
|
+
z63.literal(20),
|
|
31241
|
+
z63.literal(30),
|
|
31242
|
+
z63.literal(45),
|
|
31243
|
+
z63.literal(60)
|
|
31244
|
+
])
|
|
31245
|
+
})
|
|
31246
|
+
]);
|
|
31194
31247
|
var appointmentSetupAvailabilityDraftSchema = z63.object({
|
|
31195
31248
|
kind: z63.literal("weekly_windows"),
|
|
31196
31249
|
resourceRef: appointmentSetupRefSchema,
|
|
31197
31250
|
serviceRef: appointmentSetupRefSchema.nullable(),
|
|
31198
|
-
windows: z63.array(appointmentSetupWeeklyWindowDraftSchema)
|
|
31251
|
+
windows: z63.array(appointmentSetupWeeklyWindowDraftSchema),
|
|
31252
|
+
startTimePolicy: appointmentSetupStartTimePolicyDraftSchema.optional()
|
|
31199
31253
|
});
|
|
31200
31254
|
var APPOINTMENT_DEFAULT_MIN_LEAD_MINUTES_MAX = 28 * 24 * 60;
|
|
31201
31255
|
var APPOINTMENT_DEFAULT_MAX_BOOKING_NOTICE_MINUTES_MAX = 10 * 365 * 24 * 60;
|
package/dist/server/config.mjs
CHANGED
|
@@ -1243,6 +1243,24 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
1243
1243
|
"server:internal_error"
|
|
1244
1244
|
]
|
|
1245
1245
|
},
|
|
1246
|
+
setServiceSpecificAvailability: {
|
|
1247
|
+
path: "/sites/{siteId}/bookings/resources/{resourceId}/service-availability",
|
|
1248
|
+
method: "PUT",
|
|
1249
|
+
auth: "user",
|
|
1250
|
+
responseKind: "json",
|
|
1251
|
+
errors: [
|
|
1252
|
+
"validation:invalid_input",
|
|
1253
|
+
"resource:not_found",
|
|
1254
|
+
"server:internal_error"
|
|
1255
|
+
]
|
|
1256
|
+
},
|
|
1257
|
+
deleteServiceSpecificAvailability: {
|
|
1258
|
+
path: "/sites/{siteId}/bookings/resources/{resourceId}/service-availability/{scheduleId}",
|
|
1259
|
+
method: "DELETE",
|
|
1260
|
+
auth: "user",
|
|
1261
|
+
responseKind: "json",
|
|
1262
|
+
errors: ["resource:not_found", "server:internal_error"]
|
|
1263
|
+
},
|
|
1246
1264
|
listBlackouts: {
|
|
1247
1265
|
path: "/sites/{siteId}/bookings/resources/{resourceId}/blackouts",
|
|
1248
1266
|
method: "GET",
|
|
@@ -2878,6 +2896,20 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
2878
2896
|
auth: "user",
|
|
2879
2897
|
responseKind: "json"
|
|
2880
2898
|
},
|
|
2899
|
+
applySiteStyleSelection: {
|
|
2900
|
+
path: "/sites/{siteId}/theme/style-selection/apply",
|
|
2901
|
+
method: "POST",
|
|
2902
|
+
tags: [TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme],
|
|
2903
|
+
auth: "user",
|
|
2904
|
+
errors: [
|
|
2905
|
+
"validation:invalid_input",
|
|
2906
|
+
"auth:forbidden",
|
|
2907
|
+
"resource:not_found",
|
|
2908
|
+
"resource:conflict",
|
|
2909
|
+
"server:internal_error"
|
|
2910
|
+
],
|
|
2911
|
+
responseKind: "json"
|
|
2912
|
+
},
|
|
2881
2913
|
saveSiteChromeLookSelection: {
|
|
2882
2914
|
path: "/sites/{siteId}/theme/site-chrome-look",
|
|
2883
2915
|
method: "POST",
|
|
@@ -5621,6 +5653,13 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
5621
5653
|
auth: "service",
|
|
5622
5654
|
responseKind: "json"
|
|
5623
5655
|
},
|
|
5656
|
+
sdkApplySiteStyleSelection: {
|
|
5657
|
+
path: "/sdk/{siteId}/theme/style-selection/apply",
|
|
5658
|
+
method: "POST",
|
|
5659
|
+
auth: "service",
|
|
5660
|
+
responseKind: "json",
|
|
5661
|
+
errors: ["validation:invalid_input", "resource:not_found", "resource:conflict", "server:internal_error"]
|
|
5662
|
+
},
|
|
5624
5663
|
sdkUpsertFooter: {
|
|
5625
5664
|
path: "/sdk/{siteId}/footer",
|
|
5626
5665
|
method: "POST",
|
|
@@ -31236,11 +31275,26 @@ var appointmentSetupWeeklyWindowDraftSchema = z63.object({
|
|
|
31236
31275
|
startTime: z63.string(),
|
|
31237
31276
|
endTime: z63.string()
|
|
31238
31277
|
});
|
|
31278
|
+
var appointmentSetupStartTimePolicyDraftSchema = z63.discriminatedUnion("kind", [
|
|
31279
|
+
z63.object({ kind: z63.literal("automatic_spacing") }),
|
|
31280
|
+
z63.object({
|
|
31281
|
+
kind: z63.literal("regular_interval"),
|
|
31282
|
+
intervalMinutes: z63.union([
|
|
31283
|
+
z63.literal(10),
|
|
31284
|
+
z63.literal(15),
|
|
31285
|
+
z63.literal(20),
|
|
31286
|
+
z63.literal(30),
|
|
31287
|
+
z63.literal(45),
|
|
31288
|
+
z63.literal(60)
|
|
31289
|
+
])
|
|
31290
|
+
})
|
|
31291
|
+
]);
|
|
31239
31292
|
var appointmentSetupAvailabilityDraftSchema = z63.object({
|
|
31240
31293
|
kind: z63.literal("weekly_windows"),
|
|
31241
31294
|
resourceRef: appointmentSetupRefSchema,
|
|
31242
31295
|
serviceRef: appointmentSetupRefSchema.nullable(),
|
|
31243
|
-
windows: z63.array(appointmentSetupWeeklyWindowDraftSchema)
|
|
31296
|
+
windows: z63.array(appointmentSetupWeeklyWindowDraftSchema),
|
|
31297
|
+
startTimePolicy: appointmentSetupStartTimePolicyDraftSchema.optional()
|
|
31244
31298
|
});
|
|
31245
31299
|
var APPOINTMENT_DEFAULT_MIN_LEAD_MINUTES_MAX = 28 * 24 * 60;
|
|
31246
31300
|
var APPOINTMENT_DEFAULT_MAX_BOOKING_NOTICE_MINUTES_MAX = 10 * 365 * 24 * 60;
|
package/dist/server/data.mjs
CHANGED
|
@@ -1195,6 +1195,24 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
1195
1195
|
"server:internal_error"
|
|
1196
1196
|
]
|
|
1197
1197
|
},
|
|
1198
|
+
setServiceSpecificAvailability: {
|
|
1199
|
+
path: "/sites/{siteId}/bookings/resources/{resourceId}/service-availability",
|
|
1200
|
+
method: "PUT",
|
|
1201
|
+
auth: "user",
|
|
1202
|
+
responseKind: "json",
|
|
1203
|
+
errors: [
|
|
1204
|
+
"validation:invalid_input",
|
|
1205
|
+
"resource:not_found",
|
|
1206
|
+
"server:internal_error"
|
|
1207
|
+
]
|
|
1208
|
+
},
|
|
1209
|
+
deleteServiceSpecificAvailability: {
|
|
1210
|
+
path: "/sites/{siteId}/bookings/resources/{resourceId}/service-availability/{scheduleId}",
|
|
1211
|
+
method: "DELETE",
|
|
1212
|
+
auth: "user",
|
|
1213
|
+
responseKind: "json",
|
|
1214
|
+
errors: ["resource:not_found", "server:internal_error"]
|
|
1215
|
+
},
|
|
1198
1216
|
listBlackouts: {
|
|
1199
1217
|
path: "/sites/{siteId}/bookings/resources/{resourceId}/blackouts",
|
|
1200
1218
|
method: "GET",
|
|
@@ -2830,6 +2848,20 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
2830
2848
|
auth: "user",
|
|
2831
2849
|
responseKind: "json"
|
|
2832
2850
|
},
|
|
2851
|
+
applySiteStyleSelection: {
|
|
2852
|
+
path: "/sites/{siteId}/theme/style-selection/apply",
|
|
2853
|
+
method: "POST",
|
|
2854
|
+
tags: [TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme],
|
|
2855
|
+
auth: "user",
|
|
2856
|
+
errors: [
|
|
2857
|
+
"validation:invalid_input",
|
|
2858
|
+
"auth:forbidden",
|
|
2859
|
+
"resource:not_found",
|
|
2860
|
+
"resource:conflict",
|
|
2861
|
+
"server:internal_error"
|
|
2862
|
+
],
|
|
2863
|
+
responseKind: "json"
|
|
2864
|
+
},
|
|
2833
2865
|
saveSiteChromeLookSelection: {
|
|
2834
2866
|
path: "/sites/{siteId}/theme/site-chrome-look",
|
|
2835
2867
|
method: "POST",
|
|
@@ -5573,6 +5605,13 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
5573
5605
|
auth: "service",
|
|
5574
5606
|
responseKind: "json"
|
|
5575
5607
|
},
|
|
5608
|
+
sdkApplySiteStyleSelection: {
|
|
5609
|
+
path: "/sdk/{siteId}/theme/style-selection/apply",
|
|
5610
|
+
method: "POST",
|
|
5611
|
+
auth: "service",
|
|
5612
|
+
responseKind: "json",
|
|
5613
|
+
errors: ["validation:invalid_input", "resource:not_found", "resource:conflict", "server:internal_error"]
|
|
5614
|
+
},
|
|
5576
5615
|
sdkUpsertFooter: {
|
|
5577
5616
|
path: "/sdk/{siteId}/footer",
|
|
5578
5617
|
method: "POST",
|
|
@@ -31462,11 +31501,26 @@ var appointmentSetupWeeklyWindowDraftSchema = z63.object({
|
|
|
31462
31501
|
startTime: z63.string(),
|
|
31463
31502
|
endTime: z63.string()
|
|
31464
31503
|
});
|
|
31504
|
+
var appointmentSetupStartTimePolicyDraftSchema = z63.discriminatedUnion("kind", [
|
|
31505
|
+
z63.object({ kind: z63.literal("automatic_spacing") }),
|
|
31506
|
+
z63.object({
|
|
31507
|
+
kind: z63.literal("regular_interval"),
|
|
31508
|
+
intervalMinutes: z63.union([
|
|
31509
|
+
z63.literal(10),
|
|
31510
|
+
z63.literal(15),
|
|
31511
|
+
z63.literal(20),
|
|
31512
|
+
z63.literal(30),
|
|
31513
|
+
z63.literal(45),
|
|
31514
|
+
z63.literal(60)
|
|
31515
|
+
])
|
|
31516
|
+
})
|
|
31517
|
+
]);
|
|
31465
31518
|
var appointmentSetupAvailabilityDraftSchema = z63.object({
|
|
31466
31519
|
kind: z63.literal("weekly_windows"),
|
|
31467
31520
|
resourceRef: appointmentSetupRefSchema,
|
|
31468
31521
|
serviceRef: appointmentSetupRefSchema.nullable(),
|
|
31469
|
-
windows: z63.array(appointmentSetupWeeklyWindowDraftSchema)
|
|
31522
|
+
windows: z63.array(appointmentSetupWeeklyWindowDraftSchema),
|
|
31523
|
+
startTimePolicy: appointmentSetupStartTimePolicyDraftSchema.optional()
|
|
31470
31524
|
});
|
|
31471
31525
|
var APPOINTMENT_DEFAULT_MIN_LEAD_MINUTES_MAX = 28 * 24 * 60;
|
|
31472
31526
|
var APPOINTMENT_DEFAULT_MAX_BOOKING_NOTICE_MINUTES_MAX = 10 * 365 * 24 * 60;
|
package/dist/server/index.mjs
CHANGED
|
@@ -1217,6 +1217,24 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
1217
1217
|
"server:internal_error"
|
|
1218
1218
|
]
|
|
1219
1219
|
},
|
|
1220
|
+
setServiceSpecificAvailability: {
|
|
1221
|
+
path: "/sites/{siteId}/bookings/resources/{resourceId}/service-availability",
|
|
1222
|
+
method: "PUT",
|
|
1223
|
+
auth: "user",
|
|
1224
|
+
responseKind: "json",
|
|
1225
|
+
errors: [
|
|
1226
|
+
"validation:invalid_input",
|
|
1227
|
+
"resource:not_found",
|
|
1228
|
+
"server:internal_error"
|
|
1229
|
+
]
|
|
1230
|
+
},
|
|
1231
|
+
deleteServiceSpecificAvailability: {
|
|
1232
|
+
path: "/sites/{siteId}/bookings/resources/{resourceId}/service-availability/{scheduleId}",
|
|
1233
|
+
method: "DELETE",
|
|
1234
|
+
auth: "user",
|
|
1235
|
+
responseKind: "json",
|
|
1236
|
+
errors: ["resource:not_found", "server:internal_error"]
|
|
1237
|
+
},
|
|
1220
1238
|
listBlackouts: {
|
|
1221
1239
|
path: "/sites/{siteId}/bookings/resources/{resourceId}/blackouts",
|
|
1222
1240
|
method: "GET",
|
|
@@ -2852,6 +2870,20 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
2852
2870
|
auth: "user",
|
|
2853
2871
|
responseKind: "json"
|
|
2854
2872
|
},
|
|
2873
|
+
applySiteStyleSelection: {
|
|
2874
|
+
path: "/sites/{siteId}/theme/style-selection/apply",
|
|
2875
|
+
method: "POST",
|
|
2876
|
+
tags: [TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme],
|
|
2877
|
+
auth: "user",
|
|
2878
|
+
errors: [
|
|
2879
|
+
"validation:invalid_input",
|
|
2880
|
+
"auth:forbidden",
|
|
2881
|
+
"resource:not_found",
|
|
2882
|
+
"resource:conflict",
|
|
2883
|
+
"server:internal_error"
|
|
2884
|
+
],
|
|
2885
|
+
responseKind: "json"
|
|
2886
|
+
},
|
|
2855
2887
|
saveSiteChromeLookSelection: {
|
|
2856
2888
|
path: "/sites/{siteId}/theme/site-chrome-look",
|
|
2857
2889
|
method: "POST",
|
|
@@ -5595,6 +5627,13 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
5595
5627
|
auth: "service",
|
|
5596
5628
|
responseKind: "json"
|
|
5597
5629
|
},
|
|
5630
|
+
sdkApplySiteStyleSelection: {
|
|
5631
|
+
path: "/sdk/{siteId}/theme/style-selection/apply",
|
|
5632
|
+
method: "POST",
|
|
5633
|
+
auth: "service",
|
|
5634
|
+
responseKind: "json",
|
|
5635
|
+
errors: ["validation:invalid_input", "resource:not_found", "resource:conflict", "server:internal_error"]
|
|
5636
|
+
},
|
|
5598
5637
|
sdkUpsertFooter: {
|
|
5599
5638
|
path: "/sdk/{siteId}/footer",
|
|
5600
5639
|
method: "POST",
|
|
@@ -6758,7 +6797,7 @@ var SimpleCache = class {
|
|
|
6758
6797
|
};
|
|
6759
6798
|
|
|
6760
6799
|
// src/version.ts
|
|
6761
|
-
var SDK_VERSION = "0.70.
|
|
6800
|
+
var SDK_VERSION = "0.70.3";
|
|
6762
6801
|
|
|
6763
6802
|
// src/client/error.ts
|
|
6764
6803
|
var RiverbankApiError = class _RiverbankApiError extends Error {
|
package/dist/server/next.mjs
CHANGED
|
@@ -1228,6 +1228,24 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
1228
1228
|
"server:internal_error"
|
|
1229
1229
|
]
|
|
1230
1230
|
},
|
|
1231
|
+
setServiceSpecificAvailability: {
|
|
1232
|
+
path: "/sites/{siteId}/bookings/resources/{resourceId}/service-availability",
|
|
1233
|
+
method: "PUT",
|
|
1234
|
+
auth: "user",
|
|
1235
|
+
responseKind: "json",
|
|
1236
|
+
errors: [
|
|
1237
|
+
"validation:invalid_input",
|
|
1238
|
+
"resource:not_found",
|
|
1239
|
+
"server:internal_error"
|
|
1240
|
+
]
|
|
1241
|
+
},
|
|
1242
|
+
deleteServiceSpecificAvailability: {
|
|
1243
|
+
path: "/sites/{siteId}/bookings/resources/{resourceId}/service-availability/{scheduleId}",
|
|
1244
|
+
method: "DELETE",
|
|
1245
|
+
auth: "user",
|
|
1246
|
+
responseKind: "json",
|
|
1247
|
+
errors: ["resource:not_found", "server:internal_error"]
|
|
1248
|
+
},
|
|
1231
1249
|
listBlackouts: {
|
|
1232
1250
|
path: "/sites/{siteId}/bookings/resources/{resourceId}/blackouts",
|
|
1233
1251
|
method: "GET",
|
|
@@ -2863,6 +2881,20 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
2863
2881
|
auth: "user",
|
|
2864
2882
|
responseKind: "json"
|
|
2865
2883
|
},
|
|
2884
|
+
applySiteStyleSelection: {
|
|
2885
|
+
path: "/sites/{siteId}/theme/style-selection/apply",
|
|
2886
|
+
method: "POST",
|
|
2887
|
+
tags: [TAG_TEMPLATES.siteCollection, TAG_TEMPLATES.siteTheme],
|
|
2888
|
+
auth: "user",
|
|
2889
|
+
errors: [
|
|
2890
|
+
"validation:invalid_input",
|
|
2891
|
+
"auth:forbidden",
|
|
2892
|
+
"resource:not_found",
|
|
2893
|
+
"resource:conflict",
|
|
2894
|
+
"server:internal_error"
|
|
2895
|
+
],
|
|
2896
|
+
responseKind: "json"
|
|
2897
|
+
},
|
|
2866
2898
|
saveSiteChromeLookSelection: {
|
|
2867
2899
|
path: "/sites/{siteId}/theme/site-chrome-look",
|
|
2868
2900
|
method: "POST",
|
|
@@ -5606,6 +5638,13 @@ var ENDPOINT_DEFINITIONS = {
|
|
|
5606
5638
|
auth: "service",
|
|
5607
5639
|
responseKind: "json"
|
|
5608
5640
|
},
|
|
5641
|
+
sdkApplySiteStyleSelection: {
|
|
5642
|
+
path: "/sdk/{siteId}/theme/style-selection/apply",
|
|
5643
|
+
method: "POST",
|
|
5644
|
+
auth: "service",
|
|
5645
|
+
responseKind: "json",
|
|
5646
|
+
errors: ["validation:invalid_input", "resource:not_found", "resource:conflict", "server:internal_error"]
|
|
5647
|
+
},
|
|
5609
5648
|
sdkUpsertFooter: {
|
|
5610
5649
|
path: "/sdk/{siteId}/footer",
|
|
5611
5650
|
method: "POST",
|
|
@@ -55774,11 +55813,26 @@ var appointmentSetupWeeklyWindowDraftSchema = z69.object({
|
|
|
55774
55813
|
startTime: z69.string(),
|
|
55775
55814
|
endTime: z69.string()
|
|
55776
55815
|
});
|
|
55816
|
+
var appointmentSetupStartTimePolicyDraftSchema = z69.discriminatedUnion("kind", [
|
|
55817
|
+
z69.object({ kind: z69.literal("automatic_spacing") }),
|
|
55818
|
+
z69.object({
|
|
55819
|
+
kind: z69.literal("regular_interval"),
|
|
55820
|
+
intervalMinutes: z69.union([
|
|
55821
|
+
z69.literal(10),
|
|
55822
|
+
z69.literal(15),
|
|
55823
|
+
z69.literal(20),
|
|
55824
|
+
z69.literal(30),
|
|
55825
|
+
z69.literal(45),
|
|
55826
|
+
z69.literal(60)
|
|
55827
|
+
])
|
|
55828
|
+
})
|
|
55829
|
+
]);
|
|
55777
55830
|
var appointmentSetupAvailabilityDraftSchema = z69.object({
|
|
55778
55831
|
kind: z69.literal("weekly_windows"),
|
|
55779
55832
|
resourceRef: appointmentSetupRefSchema,
|
|
55780
55833
|
serviceRef: appointmentSetupRefSchema.nullable(),
|
|
55781
|
-
windows: z69.array(appointmentSetupWeeklyWindowDraftSchema)
|
|
55834
|
+
windows: z69.array(appointmentSetupWeeklyWindowDraftSchema),
|
|
55835
|
+
startTimePolicy: appointmentSetupStartTimePolicyDraftSchema.optional()
|
|
55782
55836
|
});
|
|
55783
55837
|
var APPOINTMENT_DEFAULT_MIN_LEAD_MINUTES_MAX = 28 * 24 * 60;
|
|
55784
55838
|
var APPOINTMENT_DEFAULT_MAX_BOOKING_NOTICE_MINUTES_MAX = 10 * 365 * 24 * 60;
|
|
@@ -57043,6 +57097,83 @@ function Page(props2) {
|
|
|
57043
57097
|
return /* @__PURE__ */ jsx59(PageContent, { ...props2 });
|
|
57044
57098
|
}
|
|
57045
57099
|
|
|
57100
|
+
// src/rendering/overrides.ts
|
|
57101
|
+
var lazyBlockOverrideSymbol = /* @__PURE__ */ Symbol.for("riverbankcms.sdk.lazyBlockOverride");
|
|
57102
|
+
|
|
57103
|
+
// src/rendering/overrideResolution.ts
|
|
57104
|
+
function isRecord6(value) {
|
|
57105
|
+
return typeof value === "object" && value !== null;
|
|
57106
|
+
}
|
|
57107
|
+
function isBlockOutlineLike(value) {
|
|
57108
|
+
const id = value.id;
|
|
57109
|
+
return typeof value.kind === "string" && (typeof id === "string" || id === null) && (typeof value.purpose === "string" || isRecord6(value.content) || isRecord6(value.draftContent) || isRecord6(value.bindings));
|
|
57110
|
+
}
|
|
57111
|
+
function collectBlockKindsFromValue(value, usedKinds, seen) {
|
|
57112
|
+
if (!isRecord6(value)) return;
|
|
57113
|
+
if (seen.has(value)) return;
|
|
57114
|
+
seen.add(value);
|
|
57115
|
+
if (isBlockOutlineLike(value)) {
|
|
57116
|
+
usedKinds.add(value.kind);
|
|
57117
|
+
}
|
|
57118
|
+
for (const child of Object.values(value)) {
|
|
57119
|
+
if (Array.isArray(child)) {
|
|
57120
|
+
for (const item of child) {
|
|
57121
|
+
collectBlockKindsFromValue(item, usedKinds, seen);
|
|
57122
|
+
}
|
|
57123
|
+
continue;
|
|
57124
|
+
}
|
|
57125
|
+
collectBlockKindsFromValue(child, usedKinds, seen);
|
|
57126
|
+
}
|
|
57127
|
+
}
|
|
57128
|
+
function collectUsedBlockKinds(page) {
|
|
57129
|
+
const usedKinds = /* @__PURE__ */ new Set();
|
|
57130
|
+
const seen = /* @__PURE__ */ new WeakSet();
|
|
57131
|
+
for (const block of page?.blocks ?? []) {
|
|
57132
|
+
collectBlockKindsFromValue(block, usedKinds, seen);
|
|
57133
|
+
}
|
|
57134
|
+
return usedKinds;
|
|
57135
|
+
}
|
|
57136
|
+
function shortBlockKind(blockKind) {
|
|
57137
|
+
return blockKind.replace(/^block\./, "");
|
|
57138
|
+
}
|
|
57139
|
+
function selectOverrideKeysForUsedKinds(usedKinds, entries) {
|
|
57140
|
+
const availableKeys = new Set(entries.map(([key]) => key));
|
|
57141
|
+
const selectedKeys = /* @__PURE__ */ new Set();
|
|
57142
|
+
for (const blockKind of usedKinds) {
|
|
57143
|
+
if (availableKeys.has(blockKind)) {
|
|
57144
|
+
selectedKeys.add(blockKind);
|
|
57145
|
+
continue;
|
|
57146
|
+
}
|
|
57147
|
+
const shortKind = shortBlockKind(blockKind);
|
|
57148
|
+
if (availableKeys.has(shortKind)) {
|
|
57149
|
+
selectedKeys.add(shortKind);
|
|
57150
|
+
}
|
|
57151
|
+
}
|
|
57152
|
+
return selectedKeys;
|
|
57153
|
+
}
|
|
57154
|
+
function isLazyRegistration(registration) {
|
|
57155
|
+
return isRecord6(registration) && registration[lazyBlockOverrideSymbol] === true;
|
|
57156
|
+
}
|
|
57157
|
+
async function resolveOverrideComponent(registration) {
|
|
57158
|
+
if (isLazyRegistration(registration)) {
|
|
57159
|
+
return registration.load();
|
|
57160
|
+
}
|
|
57161
|
+
return registration;
|
|
57162
|
+
}
|
|
57163
|
+
async function resolveBlockOverridesForPage(registrations, page) {
|
|
57164
|
+
if (!registrations) return void 0;
|
|
57165
|
+
const entries = Object.entries(registrations);
|
|
57166
|
+
if (entries.length === 0) return void 0;
|
|
57167
|
+
const selectedKeys = selectOverrideKeysForUsedKinds(collectUsedBlockKinds(page), entries);
|
|
57168
|
+
if (selectedKeys.size === 0) return void 0;
|
|
57169
|
+
const resolved = {};
|
|
57170
|
+
for (const [key, registration] of entries) {
|
|
57171
|
+
if (!selectedKeys.has(key)) continue;
|
|
57172
|
+
resolved[key] = await resolveOverrideComponent(registration);
|
|
57173
|
+
}
|
|
57174
|
+
return resolved;
|
|
57175
|
+
}
|
|
57176
|
+
|
|
57046
57177
|
// src/metadata/generatePageMetadata.ts
|
|
57047
57178
|
function generatePageMetadata(input) {
|
|
57048
57179
|
const { page, site, path, siteUrl, overrides, googleSiteVerification, titleMode = "append-site-title" } = input;
|
|
@@ -57765,6 +57896,7 @@ function createCatchAllPage(options) {
|
|
|
57765
57896
|
const resolvedTheme = themeResult.theme;
|
|
57766
57897
|
let rendered;
|
|
57767
57898
|
if (isPageContent(content)) {
|
|
57899
|
+
const resolvedBlockOverrides = await resolveBlockOverridesForPage(blockOverrides, content.page);
|
|
57768
57900
|
rendered = /* @__PURE__ */ jsx60(
|
|
57769
57901
|
Page,
|
|
57770
57902
|
{
|
|
@@ -57774,7 +57906,7 @@ function createCatchAllPage(options) {
|
|
|
57774
57906
|
apiBaseUrl,
|
|
57775
57907
|
portalToken,
|
|
57776
57908
|
resolvedData: content.resolvedData,
|
|
57777
|
-
blockOverrides,
|
|
57909
|
+
blockOverrides: resolvedBlockOverrides,
|
|
57778
57910
|
sdkConfig: content.sdkConfig,
|
|
57779
57911
|
supabaseUrl: content.supabaseUrl,
|
|
57780
57912
|
mediaAssets: content.mediaAssets,
|
|
@@ -57788,6 +57920,7 @@ function createCatchAllPage(options) {
|
|
|
57788
57920
|
if (!content.templatePage) {
|
|
57789
57921
|
return notFound();
|
|
57790
57922
|
}
|
|
57923
|
+
const resolvedBlockOverrides = await resolveBlockOverridesForPage(blockOverrides, content.templatePage);
|
|
57791
57924
|
rendered = /* @__PURE__ */ jsx60(
|
|
57792
57925
|
Page,
|
|
57793
57926
|
{
|
|
@@ -57797,7 +57930,7 @@ function createCatchAllPage(options) {
|
|
|
57797
57930
|
apiBaseUrl,
|
|
57798
57931
|
portalToken,
|
|
57799
57932
|
resolvedData: content.resolvedData,
|
|
57800
|
-
blockOverrides,
|
|
57933
|
+
blockOverrides: resolvedBlockOverrides,
|
|
57801
57934
|
sdkConfig: content.sdkConfig,
|
|
57802
57935
|
supabaseUrl: content.supabaseUrl,
|
|
57803
57936
|
mediaAssets: content.mediaAssets,
|
|
@@ -58009,7 +58142,7 @@ var SimpleCache = class {
|
|
|
58009
58142
|
};
|
|
58010
58143
|
|
|
58011
58144
|
// src/version.ts
|
|
58012
|
-
var SDK_VERSION = "0.70.
|
|
58145
|
+
var SDK_VERSION = "0.70.3";
|
|
58013
58146
|
|
|
58014
58147
|
// src/client/error.ts
|
|
58015
58148
|
var RiverbankApiError = class _RiverbankApiError extends Error {
|