@riverbankcms/sdk 0.90.0 → 0.90.1
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/{PreviewEditorSidebar-KVXNF3VW.mjs → PreviewEditorSidebar-FNFRVSIM.mjs} +2 -2
- package/dist/{PreviewEditorUI-J3JN5Z7T.mjs → PreviewEditorUI-3WXJFQXG.mjs} +2 -2
- package/dist/SdkPreviewModeRuntime-2UCIMKUB.mjs +8 -0
- package/dist/_dts/api/src/bookingConfig.d.ts +3 -0
- package/dist/_dts/api/src/event-listing-destination.d.ts +59 -0
- package/dist/_dts/api/src/index.d.ts +4 -0
- package/dist/_dts/api/src/navigation/dashboardSettingsNav.d.ts +0 -1
- package/dist/_dts/api/src/navigation.d.ts +2 -0
- package/dist/_dts/api/src/publicExperienceEndpoints.d.ts +3 -1
- package/dist/_dts/api/src/settings/permissions.d.ts +273 -0
- package/dist/_dts/api/src/types.d.ts +1 -0
- package/dist/_dts/blocks/src/system/blocks/events/shared/schemas.d.ts +60 -2
- package/dist/_dts/blocks/src/system/blocks/events/shared/types.d.ts +12 -1
- package/dist/_dts/blocks/src/system/blocks/media-text.d.ts +9 -9
- package/dist/_dts/blocks/src/system/blocks/team-members.d.ts +1 -1
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/event-registration.headless.contract.d.ts +5 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/event-registration/eventPaymentOptions.d.ts +24 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/destination.d.ts +8 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/pricing.d.ts +3 -0
- package/dist/_dts/blocks/src/system/runtime/nodes/events/shared/utils.d.ts +7 -0
- package/dist/_dts/core/src/event-pricing.d.ts +12 -2
- package/dist/_dts/sdk/src/public-api/contracts.d.ts +11 -1
- package/dist/_dts/sdk/src/rendering/islands/types.d.ts +11 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/{chunk-PMBB6MQ7.mjs → chunk-CR2VX432.mjs} +297 -117
- package/dist/{chunk-AEOYWPE4.mjs → chunk-FA6LVZ7C.mjs} +5 -5
- package/dist/{chunk-RQ3XZ4SJ.mjs → chunk-H6TT5ZXI.mjs} +1 -1
- package/dist/{chunk-GSPFFUVB.mjs → chunk-SYYJZPKU.mjs} +1 -1
- package/dist/cli/index.mjs +160 -103
- package/dist/client/{accordion-GXQNWQ6O.mjs → accordion-4K7VGZ3I.mjs} +2 -2
- package/dist/client/{bookingForm-STLUJ36H.mjs → bookingForm-3QXA3CIS.mjs} +5 -5
- package/dist/client/bookings.mjs +1154 -556
- package/dist/client/{carousel-CVRN6EPP.mjs → carousel-BEJKNGQ7.mjs} +3 -3
- package/dist/client/{cart-IYIBA5CL.mjs → cart-44BBM6XG.mjs} +6 -6
- package/dist/client/{checkout-O3BGM4GS.mjs → checkout-THMHEYKF.mjs} +6 -6
- package/dist/client/{chunk-25W2EQUN.mjs → chunk-3H5CLFKT.mjs} +8 -0
- package/dist/client/{chunk-MFPKS6QS.mjs → chunk-4COPESPO.mjs} +5 -5
- package/dist/client/{chunk-4RTFGHZN.mjs → chunk-5AJIMWKS.mjs} +6 -3
- package/dist/client/{chunk-6DPXDOIL.mjs → chunk-B4H6QMPY.mjs} +93 -22
- package/dist/client/{chunk-VFHZLZAC.mjs → chunk-DQIRKNZE.mjs} +1 -1
- package/dist/client/{chunk-7DH35FGA.mjs → chunk-EJBHK74Y.mjs} +1 -1
- package/dist/client/{chunk-DAS5CIER.mjs → chunk-JV7ZNAOU.mjs} +118 -20
- package/dist/client/{chunk-FHU6PFPM.mjs → chunk-KNTLBQ3N.mjs} +1 -1
- package/dist/client/{chunk-Z62JYS5O.mjs → chunk-PEDNDLPB.mjs} +2 -2
- package/dist/client/{chunk-NBFRJ5NB.mjs → chunk-SLY6UDAS.mjs} +2 -2
- package/dist/client/{chunk-D3ETC2SU.mjs → chunk-ZIAF2DA4.mjs} +1 -1
- package/dist/client/client.mjs +272 -83
- package/dist/client/{courseRegistration-2D3ACMJR.mjs → courseRegistration-URX7RCCK.mjs} +5 -5
- package/dist/client/{eventCalendar-QY4UZUFF.mjs → eventCalendar-GTENOQCE.mjs} +8 -8
- package/dist/client/{eventCombined-RRCDKJC2.mjs → eventCombined-EZVB72MF.mjs} +8 -8
- package/dist/client/{eventDetails-YO335BUT.mjs → eventDetails-CH4BJR5Z.mjs} +8 -8
- package/dist/client/{eventListing-PXA6GFQ3.mjs → eventListing-4BVOI5HS.mjs} +8 -8
- package/dist/client/{eventRegistration-2ZHEDDXO.mjs → eventRegistration-37LPIKIE.mjs} +8 -8
- package/dist/client/{form-ZS6KX4U2.mjs → form-FX3Y54YK.mjs} +2 -2
- package/dist/client/{headerSection-QK5SLIIB.mjs → headerSection-UOZZGVYL.mjs} +3 -3
- package/dist/client/hooks.mjs +86 -35
- package/dist/client/{locationMap-GFNIUD2X.mjs → locationMap-VSIPKV35.mjs} +3 -3
- package/dist/client/{newsletterForm-PGLTTCUG.mjs → newsletterForm-6FRJKNAF.mjs} +2 -2
- package/dist/client/{productDetail-OPBE5ZPI.mjs → productDetail-6AHMLXCO.mjs} +6 -6
- package/dist/client/{productList-NI72Q62Z.mjs → productList-M2CYIZVH.mjs} +6 -6
- package/dist/client/rendering/client.mjs +231 -42
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +273 -84
- package/dist/client/{shop-3ZQPEWYI.mjs → shop-AUOT6GEX.mjs} +6 -6
- package/dist/preview-next/client/runtime.mjs +3 -3
- package/dist/{sdk-runtime-FSHXCWDS.mjs → sdk-runtime-6GPJNLU6.mjs} +4 -4
- package/dist/server/components.mjs +136 -58
- package/dist/server/config-validation.mjs +78 -27
- package/dist/server/config.mjs +78 -27
- package/dist/server/data.mjs +86 -35
- package/dist/server/index.mjs +1 -1
- package/dist/server/next.mjs +157 -79
- package/dist/server/page-converter.mjs +72 -21
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +148 -70
- package/dist/server/rendering.mjs +152 -74
- package/dist/server/routing.mjs +121 -44
- package/dist/server/server.mjs +95 -44
- package/package.json +2 -2
- package/dist/SdkPreviewModeRuntime-UBL6MSNP.mjs +0 -8
|
@@ -103,6 +103,8 @@ function publicEventPricingType(pricing) {
|
|
|
103
103
|
case "ticket_types":
|
|
104
104
|
case "course":
|
|
105
105
|
return isFreePublicEventPriceDisplay(pricing.display) ? "free" : "paid";
|
|
106
|
+
case "external":
|
|
107
|
+
return "external";
|
|
106
108
|
}
|
|
107
109
|
}
|
|
108
110
|
function isFreePublicEventPriceDisplay(display) {
|
|
@@ -116,6 +118,7 @@ function isFreePublicEventPriceDisplay(display) {
|
|
|
116
118
|
case "range":
|
|
117
119
|
case "mixed":
|
|
118
120
|
case "unavailable":
|
|
121
|
+
case "external":
|
|
119
122
|
return false;
|
|
120
123
|
}
|
|
121
124
|
}
|
|
@@ -19312,6 +19315,18 @@ var publicCoursesArraySchema = z35.array(publicCourseSchema);
|
|
|
19312
19315
|
var eventPresetSchema = z36.enum(["event", "class", "workshop", "retreat", "performance"]);
|
|
19313
19316
|
var eventScheduleScopeSchema = z36.enum(["recurring", "oneOff"]);
|
|
19314
19317
|
var eventDestinationModeSchema = z36.enum(["cms-managed", "system-managed"]);
|
|
19318
|
+
var publicEventDestinationSchema = z36.discriminatedUnion("kind", [
|
|
19319
|
+
z36.object({
|
|
19320
|
+
kind: z36.literal("native"),
|
|
19321
|
+
mode: eventDestinationModeSchema,
|
|
19322
|
+
path: z36.string()
|
|
19323
|
+
}),
|
|
19324
|
+
z36.object({
|
|
19325
|
+
kind: z36.literal("external"),
|
|
19326
|
+
url: z36.string(),
|
|
19327
|
+
label: z36.string()
|
|
19328
|
+
})
|
|
19329
|
+
]);
|
|
19315
19330
|
var eventVenueSchema = z36.object({
|
|
19316
19331
|
id: z36.string(),
|
|
19317
19332
|
name: z36.string(),
|
|
@@ -19326,7 +19341,7 @@ var eventCategorySchema = z36.object({
|
|
|
19326
19341
|
name: z36.string(),
|
|
19327
19342
|
color: z36.string().nullable()
|
|
19328
19343
|
});
|
|
19329
|
-
var pricingTypeSchema = z36.enum(["free", "paid"]);
|
|
19344
|
+
var pricingTypeSchema = z36.enum(["free", "paid", "external"]);
|
|
19330
19345
|
var accessRestrictionSchema = z36.enum(["none", "category"]);
|
|
19331
19346
|
var eventPricingModeSchema = z36.enum(["single", "ticket_types"]);
|
|
19332
19347
|
var publicCoursePriceDisplaySchema = z36.discriminatedUnion("kind", [
|
|
@@ -19347,6 +19362,7 @@ var publicEventPriceDisplaySchema = z36.discriminatedUnion("kind", [
|
|
|
19347
19362
|
currency: z36.string()
|
|
19348
19363
|
}),
|
|
19349
19364
|
z36.object({ kind: z36.literal("unavailable"), currency: z36.string() }),
|
|
19365
|
+
z36.object({ kind: z36.literal("external"), label: z36.string() }),
|
|
19350
19366
|
z36.object({ kind: z36.literal("course"), display: publicCoursePriceDisplaySchema })
|
|
19351
19367
|
]);
|
|
19352
19368
|
var publicEventTicketTypePriceDisplaySchema = z36.union([
|
|
@@ -19425,6 +19441,10 @@ var publicEventPricingSchema = z36.discriminatedUnion("kind", [
|
|
|
19425
19441
|
z36.object({
|
|
19426
19442
|
kind: z36.literal("course"),
|
|
19427
19443
|
display: z36.object({ kind: z36.literal("course"), display: publicCoursePriceDisplaySchema })
|
|
19444
|
+
}),
|
|
19445
|
+
z36.object({
|
|
19446
|
+
kind: z36.literal("external"),
|
|
19447
|
+
display: z36.object({ kind: z36.literal("external"), label: z36.string() })
|
|
19428
19448
|
})
|
|
19429
19449
|
]);
|
|
19430
19450
|
var publicTeamMemberSummarySchema = z36.object({
|
|
@@ -19453,7 +19473,8 @@ var publicEventSchema = z36.object({
|
|
|
19453
19473
|
image: mediaSchema2.nullable().optional()
|
|
19454
19474
|
}).optional(),
|
|
19455
19475
|
slug: z36.string(),
|
|
19456
|
-
path: z36.string(),
|
|
19476
|
+
path: z36.string().nullable(),
|
|
19477
|
+
destination: publicEventDestinationSchema,
|
|
19457
19478
|
requiresRegistration: z36.boolean(),
|
|
19458
19479
|
deliveryMode: z36.enum(["in_person", "online", "hybrid"]),
|
|
19459
19480
|
attendanceModes: z36.array(publicEventAttendanceModeAvailabilitySchema),
|
|
@@ -19757,12 +19778,41 @@ function isEventContentType(slug) {
|
|
|
19757
19778
|
return EVENT_CONTENT_TYPE_SLUGS.includes(slug);
|
|
19758
19779
|
}
|
|
19759
19780
|
|
|
19781
|
+
// ../blocks/src/system/runtime/nodes/events/shared/destination.ts
|
|
19782
|
+
function isRecord2(value) {
|
|
19783
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
19784
|
+
}
|
|
19785
|
+
function isRuntimeEventDestination(value) {
|
|
19786
|
+
if (!isRecord2(value) || typeof value.kind !== "string") return false;
|
|
19787
|
+
if (value.kind === "native") {
|
|
19788
|
+
return (value.mode === "cms-managed" || value.mode === "system-managed") && typeof value.path === "string";
|
|
19789
|
+
}
|
|
19790
|
+
return value.kind === "external" && typeof value.url === "string" && typeof value.label === "string";
|
|
19791
|
+
}
|
|
19792
|
+
function resolveRuntimeEventDestination(event) {
|
|
19793
|
+
if (isRuntimeEventDestination(event.destination)) {
|
|
19794
|
+
return event.destination;
|
|
19795
|
+
}
|
|
19796
|
+
return {
|
|
19797
|
+
kind: "native",
|
|
19798
|
+
mode: event.eventDestinationMode === "system-managed" ? "system-managed" : "cms-managed",
|
|
19799
|
+
path: typeof event.path === "string" ? event.path : ""
|
|
19800
|
+
};
|
|
19801
|
+
}
|
|
19802
|
+
|
|
19760
19803
|
// ../blocks/src/system/runtime/nodes/events/shared/pricing.ts
|
|
19761
19804
|
var DEFAULT_EVENT_CURRENCY = "USD";
|
|
19762
19805
|
function resolveRuntimeEventPricing(event) {
|
|
19763
19806
|
if (isPublicEventPricing(event.pricing)) {
|
|
19764
19807
|
return event.pricing;
|
|
19765
19808
|
}
|
|
19809
|
+
const destination = resolveRuntimeEventDestination(event);
|
|
19810
|
+
if (destination.kind === "external") {
|
|
19811
|
+
return {
|
|
19812
|
+
kind: "external",
|
|
19813
|
+
display: { kind: "external", label: "External registration" }
|
|
19814
|
+
};
|
|
19815
|
+
}
|
|
19766
19816
|
const legacy = event;
|
|
19767
19817
|
const currency = readCurrency(legacy.currency);
|
|
19768
19818
|
if (event.requiresRegistration === false) {
|
|
@@ -19799,22 +19849,22 @@ function resolveRuntimeEventPricing(event) {
|
|
|
19799
19849
|
function readCurrency(value) {
|
|
19800
19850
|
return typeof value === "string" && value.trim().length > 0 ? value : DEFAULT_EVENT_CURRENCY;
|
|
19801
19851
|
}
|
|
19802
|
-
function
|
|
19852
|
+
function isRecord3(value) {
|
|
19803
19853
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
19804
19854
|
}
|
|
19805
19855
|
function isPublicEventPricing(value) {
|
|
19806
|
-
if (!
|
|
19807
|
-
return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "ticket_types" || value.kind === "course";
|
|
19856
|
+
if (!isRecord3(value) || typeof value.kind !== "string") return false;
|
|
19857
|
+
return value.kind === "drop_in" || value.kind === "free_registration" || value.kind === "single_paid" || value.kind === "ticket_types" || value.kind === "course" || value.kind === "external";
|
|
19808
19858
|
}
|
|
19809
19859
|
function isPublicEventTicketType(value) {
|
|
19810
|
-
return
|
|
19860
|
+
return isRecord3(value) && typeof value.id === "string";
|
|
19811
19861
|
}
|
|
19812
19862
|
function readTicketTypePriceDisplay(value, currency) {
|
|
19813
19863
|
const display = readLegacyPriceDisplay(value, currency);
|
|
19814
|
-
return display.kind === "course" ? { kind: "unavailable", currency } : display;
|
|
19864
|
+
return display.kind === "course" || display.kind === "external" ? { kind: "unavailable", currency } : display;
|
|
19815
19865
|
}
|
|
19816
19866
|
function readLegacyPriceDisplay(value, currency) {
|
|
19817
|
-
if (!
|
|
19867
|
+
if (!isRecord3(value) || typeof value.kind !== "string") {
|
|
19818
19868
|
return { kind: "unavailable", currency };
|
|
19819
19869
|
}
|
|
19820
19870
|
const displayCurrency = readCurrency(value.currency);
|
|
@@ -19853,7 +19903,7 @@ function readLegacyPriceDisplay(value, currency) {
|
|
|
19853
19903
|
case "unavailable":
|
|
19854
19904
|
return { kind: "unavailable", currency: displayCurrency };
|
|
19855
19905
|
case "course":
|
|
19856
|
-
return
|
|
19906
|
+
return isRecord3(value.display) ? {
|
|
19857
19907
|
kind: "course",
|
|
19858
19908
|
display: readCoursePriceDisplay(value.display, displayCurrency)
|
|
19859
19909
|
} : {
|
|
@@ -19940,7 +19990,7 @@ function resolveEventRequiresPayment(input) {
|
|
|
19940
19990
|
if (!input.event) {
|
|
19941
19991
|
return false;
|
|
19942
19992
|
}
|
|
19943
|
-
return publicEventPricingType(resolveRuntimeEventPricing(input.event))
|
|
19993
|
+
return publicEventPricingType(resolveRuntimeEventPricing(input.event)) === "paid";
|
|
19944
19994
|
}
|
|
19945
19995
|
|
|
19946
19996
|
// ../blocks/src/system/runtime/nodes/event-registration/registrationEventAdapter.ts
|
|
@@ -20137,15 +20187,16 @@ var eventRegistrationBlockRuntime = defineClientOwnedBlockRuntime({
|
|
|
20137
20187
|
})
|
|
20138
20188
|
});
|
|
20139
20189
|
function normalizeEventRegistrationEventInput(value) {
|
|
20140
|
-
if (!
|
|
20190
|
+
if (!isRecord4(value)) {
|
|
20141
20191
|
return value;
|
|
20142
20192
|
}
|
|
20143
20193
|
return {
|
|
20144
20194
|
...value,
|
|
20195
|
+
destination: resolveRuntimeEventDestination(value),
|
|
20145
20196
|
pricing: resolveRuntimeEventPricing(value)
|
|
20146
20197
|
};
|
|
20147
20198
|
}
|
|
20148
|
-
function
|
|
20199
|
+
function isRecord4(value) {
|
|
20149
20200
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
20150
20201
|
}
|
|
20151
20202
|
var eventRegistrationInteractiveIslandPropsCodec = createInteractiveIslandCodec({
|
|
@@ -22631,7 +22682,7 @@ function inferLegacyOfferingsPreviewGroupOrder(overrides) {
|
|
|
22631
22682
|
return keys.length >= 2 ? keys : [];
|
|
22632
22683
|
}
|
|
22633
22684
|
function normalizeOfferingsPreviewContentForWrite(value) {
|
|
22634
|
-
if (!
|
|
22685
|
+
if (!isRecord5(value)) return null;
|
|
22635
22686
|
const groupOrderValue = value.groupOrder;
|
|
22636
22687
|
if (Array.isArray(groupOrderValue)) {
|
|
22637
22688
|
const normalized = normalizeOfferingsPreviewGroupOrder(groupOrderValue);
|
|
@@ -22644,7 +22695,7 @@ function normalizeOfferingsPreviewContentForWrite(value) {
|
|
|
22644
22695
|
return { ...value, groupOrder: [] };
|
|
22645
22696
|
}
|
|
22646
22697
|
const legacyOrder = inferLegacyOfferingsPreviewGroupOrder(
|
|
22647
|
-
Array.isArray(value.groupOverrides) ? value.groupOverrides.filter(
|
|
22698
|
+
Array.isArray(value.groupOverrides) ? value.groupOverrides.filter(isRecord5) : []
|
|
22648
22699
|
);
|
|
22649
22700
|
return legacyOrder.length > 0 ? { ...value, groupOrder: legacyOrder } : value;
|
|
22650
22701
|
}
|
|
@@ -22658,7 +22709,7 @@ function uniqueOfferingsPreviewSourceKeys(values) {
|
|
|
22658
22709
|
}
|
|
22659
22710
|
return keys;
|
|
22660
22711
|
}
|
|
22661
|
-
function
|
|
22712
|
+
function isRecord5(value) {
|
|
22662
22713
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
22663
22714
|
}
|
|
22664
22715
|
|
|
@@ -23025,7 +23076,7 @@ function isOfferingsPreviewItemLimit(value) {
|
|
|
23025
23076
|
return value === "1" || value === "2" || value === "3" || value === "4" || value === "5" || value === "6" || value === null;
|
|
23026
23077
|
}
|
|
23027
23078
|
function normalizeOfferingsPreviewGroupOverride(value) {
|
|
23028
|
-
if (!
|
|
23079
|
+
if (!isRecord6(value)) return [];
|
|
23029
23080
|
const override = {};
|
|
23030
23081
|
if (isOfferingsPreviewSourceKey(value.sourceKey) || value.sourceKey === null) {
|
|
23031
23082
|
override.sourceKey = value.sourceKey;
|
|
@@ -23057,12 +23108,12 @@ function isButtonVariant(value) {
|
|
|
23057
23108
|
return value === "primary" || value === "secondary" || value === "outline" || value === "link" || value === null;
|
|
23058
23109
|
}
|
|
23059
23110
|
function normalizeCardStylesContent(value) {
|
|
23060
|
-
return
|
|
23111
|
+
return isRecord6(value) || value === null ? value : void 0;
|
|
23061
23112
|
}
|
|
23062
23113
|
function normalizeSectionStylesContent(value) {
|
|
23063
|
-
return
|
|
23114
|
+
return isRecord6(value) || value === null ? value : void 0;
|
|
23064
23115
|
}
|
|
23065
|
-
function
|
|
23116
|
+
function isRecord6(value) {
|
|
23066
23117
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
23067
23118
|
}
|
|
23068
23119
|
|
|
@@ -32101,7 +32152,7 @@ function sanitizeExtractedContent(content) {
|
|
|
32101
32152
|
}
|
|
32102
32153
|
return result;
|
|
32103
32154
|
}
|
|
32104
|
-
function
|
|
32155
|
+
function isRecord7(value) {
|
|
32105
32156
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
32106
32157
|
}
|
|
32107
32158
|
function isBoxStylesField(fieldId) {
|
|
@@ -32210,7 +32261,7 @@ async function populateBuiltinBlock(sectionIndex, section2, blockInfo, ctx) {
|
|
|
32210
32261
|
await ctx.debug.writeText(`pass2-builtin-${sectionIndex}-raw.txt`, rawText);
|
|
32211
32262
|
await ctx.debug.writeJson(`pass2-builtin-${sectionIndex}-output.json`, result);
|
|
32212
32263
|
const rawContent = result.content;
|
|
32213
|
-
const sanitizedContent =
|
|
32264
|
+
const sanitizedContent = isRecord7(rawContent) ? sanitizeExtractedContent(rawContent) : {};
|
|
32214
32265
|
return {
|
|
32215
32266
|
success: true,
|
|
32216
32267
|
block: {
|