@riverbankcms/sdk 0.60.9 → 0.60.12

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.
Files changed (45) hide show
  1. package/dist/_dts/api/src/accessAdmin.d.ts +102 -0
  2. package/dist/_dts/api/src/common/envelope.d.ts +1 -1
  3. package/dist/_dts/api/src/domains.d.ts +14 -13
  4. package/dist/_dts/api/src/endpoints.d.ts +32 -0
  5. package/dist/_dts/api/src/index.d.ts +4 -3
  6. package/dist/_dts/api/src/navigation/linkValue.d.ts +15 -2
  7. package/dist/_dts/api/src/navigation.d.ts +2 -0
  8. package/dist/_dts/api/src/siteManagementEndpoints.d.ts +15 -1
  9. package/dist/_dts/blocks/src/index.d.ts +1 -1
  10. package/dist/_dts/blocks/src/system/node/fragments/ctaButton.d.ts +2 -2
  11. package/dist/_dts/blocks/src/system/runtime/nodes/basic.d.ts +2 -1
  12. package/dist/_dts/blocks/src/system/types/link.d.ts +7 -1
  13. package/dist/_dts/core/src/participant-identity.d.ts +72 -0
  14. package/dist/_dts/db/src/generated/supabase/database.types.d.ts +96 -60
  15. package/dist/_dts/db/src/schemas/forms.d.ts +135 -24
  16. package/dist/_dts/sdk/src/contracts/content.d.ts +7 -1
  17. package/dist/_dts/sdk/src/public-api/contracts.d.ts +1 -1
  18. package/dist/_dts/sdk/src/version.d.ts +1 -1
  19. package/dist/_dts/theme-core/src/buttons/classNames.d.ts +21 -0
  20. package/dist/_dts/theme-core/src/buttons/index.d.ts +1 -0
  21. package/dist/_dts/theme-core/src/buttons/types.d.ts +1 -0
  22. package/dist/cli/index.mjs +188 -9
  23. package/dist/client/bookings.mjs +808 -149
  24. package/dist/client/client.mjs +553 -130
  25. package/dist/client/hooks.mjs +119 -0
  26. package/dist/client/rendering/client.mjs +412 -113
  27. package/dist/client/rendering/islands.mjs +4605 -4361
  28. package/dist/client/rendering.mjs +580 -157
  29. package/dist/preview-next/before-render.mjs +57 -0
  30. package/dist/preview-next/client/runtime.mjs +580 -151
  31. package/dist/preview-next/middleware.mjs +57 -0
  32. package/dist/server/components.mjs +293 -45
  33. package/dist/server/config-validation.mjs +119 -0
  34. package/dist/server/config.mjs +119 -0
  35. package/dist/server/data.mjs +119 -0
  36. package/dist/server/index.mjs +120 -1
  37. package/dist/server/next.mjs +300 -52
  38. package/dist/server/page-converter.mjs +62 -0
  39. package/dist/server/prebuild.mjs +1 -1
  40. package/dist/server/rendering/server.mjs +293 -45
  41. package/dist/server/rendering.mjs +293 -45
  42. package/dist/server/routing.mjs +159 -29
  43. package/dist/server/server.mjs +120 -1
  44. package/package.json +1 -1
  45. package/dist/_dts/blocks/src/system/runtime/shared/themedButtonClass.d.ts +0 -11
@@ -197,9 +197,70 @@ var init_participants = __esm({
197
197
  });
198
198
 
199
199
  // ../core/src/participant-identity.ts
200
+ var PARTICIPANT_PARTICIPATION_IDENTITY_FIELD_CLASSIFICATION_BY_FIELD;
200
201
  var init_participant_identity = __esm({
201
202
  "../core/src/participant-identity.ts"() {
202
203
  init_assertNever();
204
+ PARTICIPANT_PARTICIPATION_IDENTITY_FIELD_CLASSIFICATION_BY_FIELD = {
205
+ participant_id: {
206
+ field: "participant_id",
207
+ role: "canonical_link",
208
+ canonicalSource: "booking_participants.id",
209
+ contractAction: "tighten_in_839",
210
+ notes: "Canonical person-subject link for a participation. #839 should enforce this once preflight is clean."
211
+ },
212
+ display_name: {
213
+ field: "display_name",
214
+ role: "contextual_snapshot",
215
+ canonicalSource: "booking_participants.display_name for live identity",
216
+ contractAction: "retain_as_snapshot",
217
+ notes: "Participation-time display context. Readers must not treat it as mutable live participant identity."
218
+ },
219
+ email: {
220
+ field: "email",
221
+ role: "contextual_snapshot",
222
+ canonicalSource: "booking_participants.email_normalized for live email identity",
223
+ contractAction: "retain_as_snapshot",
224
+ notes: "Participation-time contact snapshot used for notifications/context. Live identity belongs to the participant row."
225
+ },
226
+ email_normalized: {
227
+ field: "email_normalized",
228
+ role: "contextual_snapshot",
229
+ canonicalSource: "booking_participants.email_normalized for live email identity",
230
+ contractAction: "retain_as_snapshot",
231
+ notes: "Normalized snapshot/dedupe helper for the participation slot, not live person authority."
232
+ },
233
+ phone: {
234
+ field: "phone",
235
+ role: "contextual_snapshot",
236
+ canonicalSource: "booking_participants.phone for live phone identity",
237
+ contractAction: "retain_as_snapshot",
238
+ notes: "Participation-time phone context. Live identity belongs to the participant row."
239
+ },
240
+ identity_state: {
241
+ field: "identity_state",
242
+ role: "materialization_state",
243
+ canonicalSource: "booking_participants.identity_state for subject state",
244
+ contractAction: "review_for_later_contract_cleanup",
245
+ notes: "Slot materialization state: booker_supplied, contactable, portal_claimed, or staff_verified."
246
+ },
247
+ event_attendee_guest_id: {
248
+ field: "event_attendee_guest_id",
249
+ role: "compatibility_projection",
250
+ canonicalSource: "canonical participant slot plus #838 event guest compatibility projection",
251
+ contractAction: "retain_as_projection",
252
+ notes: "Compatibility FK for event guest read models. It is not person identity authority."
253
+ }
254
+ };
255
+ [
256
+ PARTICIPANT_PARTICIPATION_IDENTITY_FIELD_CLASSIFICATION_BY_FIELD.participant_id,
257
+ PARTICIPANT_PARTICIPATION_IDENTITY_FIELD_CLASSIFICATION_BY_FIELD.display_name,
258
+ PARTICIPANT_PARTICIPATION_IDENTITY_FIELD_CLASSIFICATION_BY_FIELD.email,
259
+ PARTICIPANT_PARTICIPATION_IDENTITY_FIELD_CLASSIFICATION_BY_FIELD.email_normalized,
260
+ PARTICIPANT_PARTICIPATION_IDENTITY_FIELD_CLASSIFICATION_BY_FIELD.phone,
261
+ PARTICIPANT_PARTICIPATION_IDENTITY_FIELD_CLASSIFICATION_BY_FIELD.identity_state,
262
+ PARTICIPANT_PARTICIPATION_IDENTITY_FIELD_CLASSIFICATION_BY_FIELD.event_attendee_guest_id
263
+ ];
203
264
  }
204
265
  });
205
266
 
@@ -2291,6 +2352,13 @@ var init_personalities = __esm({
2291
2352
  }
2292
2353
  });
2293
2354
 
2355
+ // ../theme-core/src/buttons/classNames.ts
2356
+ var init_classNames = __esm({
2357
+ "../theme-core/src/buttons/classNames.ts"() {
2358
+ init_types2();
2359
+ }
2360
+ });
2361
+
2294
2362
  // ../theme-core/src/tokens/resolver.ts
2295
2363
  var init_resolver = __esm({
2296
2364
  "../theme-core/src/tokens/resolver.ts"() {
@@ -2409,6 +2477,7 @@ var init_generateDefaultButtonSystem = __esm({
2409
2477
  var init_generateButtonCss = __esm({
2410
2478
  "../theme-core/src/buttons/generateButtonCss.ts"() {
2411
2479
  init_types2();
2480
+ init_classNames();
2412
2481
  init_resolver();
2413
2482
  init_generateEffectsCSS();
2414
2483
  init_constants();
@@ -2439,6 +2508,7 @@ var init_core = __esm({
2439
2508
  var init_buttons = __esm({
2440
2509
  "../theme-core/src/buttons/index.ts"() {
2441
2510
  init_types2();
2511
+ init_classNames();
2442
2512
  init_generateButtonCss();
2443
2513
  init_generateDefaultButtonSystem();
2444
2514
  init_constants();
@@ -16176,6 +16246,63 @@ var ENDPOINT_DEFINITIONS = {
16176
16246
  auth: "user",
16177
16247
  responseKind: "json"
16178
16248
  },
16249
+ updateRegisteredDomainContact: {
16250
+ path: "/domains/{domainId}/registrar/contact",
16251
+ method: "POST",
16252
+ errors: [
16253
+ "validation:invalid_input",
16254
+ "resource:not_found",
16255
+ "auth:forbidden",
16256
+ "external:service_error",
16257
+ "external:registrar_orphaned_contact_profile",
16258
+ "server:internal_error"
16259
+ ],
16260
+ tags: ["domains", "domain-{domainId}", "domain-registrar"],
16261
+ auth: "user",
16262
+ responseKind: "json"
16263
+ },
16264
+ setRegisteredDomainPrivacy: {
16265
+ path: "/domains/{domainId}/registrar/privacy",
16266
+ method: "POST",
16267
+ errors: [
16268
+ "validation:invalid_input",
16269
+ "resource:not_found",
16270
+ "auth:forbidden",
16271
+ "external:service_error",
16272
+ "server:internal_error"
16273
+ ],
16274
+ tags: ["domains", "domain-{domainId}", "domain-registrar"],
16275
+ auth: "user",
16276
+ responseKind: "json"
16277
+ },
16278
+ setRegisteredDomainAutoRenew: {
16279
+ path: "/domains/{domainId}/registrar/auto-renew",
16280
+ method: "POST",
16281
+ errors: [
16282
+ "validation:invalid_input",
16283
+ "resource:not_found",
16284
+ "auth:forbidden",
16285
+ "external:service_error",
16286
+ "server:internal_error"
16287
+ ],
16288
+ tags: ["domains", "domain-{domainId}", "domain-registrar"],
16289
+ auth: "user",
16290
+ responseKind: "json"
16291
+ },
16292
+ getRegisteredDomainRenewalPosture: {
16293
+ path: "/domains/{domainId}/registrar/renewal",
16294
+ method: "GET",
16295
+ errors: [
16296
+ "validation:invalid_input",
16297
+ "resource:not_found",
16298
+ "auth:forbidden",
16299
+ "external:service_error",
16300
+ "server:internal_error"
16301
+ ],
16302
+ tags: ["domains", "domain-{domainId}", "domain-registrar"],
16303
+ auth: "user",
16304
+ responseKind: "json"
16305
+ },
16179
16306
  retryDomainVercel: {
16180
16307
  path: "/domains/{domainId}/vercel",
16181
16308
  method: "POST",
@@ -21152,6 +21279,9 @@ function validationContext(options = {}) {
21152
21279
  allowIncomplete: isDraft || (options.allowIncomplete ?? false)
21153
21280
  };
21154
21281
  }
21282
+ function formatFieldPath(path21) {
21283
+ return path21.map((segment) => String(segment)).join(".");
21284
+ }
21155
21285
  function fieldIssueToMessage(issue2) {
21156
21286
  switch (issue2.kind) {
21157
21287
  case "required":
@@ -21375,7 +21505,7 @@ function normalizeRepeaterItems(plan, value, ctx) {
21375
21505
  return normalizeObjectChildren(fields3, itemRecord, ctx);
21376
21506
  });
21377
21507
  }
21378
- function normalizeNumberInput(value, allowNull) {
21508
+ function normalizeNumberInput(value, _allowNull) {
21379
21509
  if (value === "") return void 0;
21380
21510
  if (typeof value === "string" && value.trim() !== "") return Number(value);
21381
21511
  return value;
@@ -21507,7 +21637,7 @@ function validateRepeaterItem(plan, item, index, ctx) {
21507
21637
  const fields3 = plan.repeatedItemVariants ? plan.repeatedItemVariants.find((variant) => variant.typeId === itemType)?.fields : plan.repeatedItemPlan;
21508
21638
  if (!fields3) return [];
21509
21639
  return fields3.flatMap((childPlan) => {
21510
- const indexedPlan = withIndexedPath(childPlan, plan.path, index);
21640
+ const indexedPlan = materializeRepeaterItemPlan(childPlan, plan.path, index);
21511
21641
  return validateNormalizedFieldValue(indexedPlan, item[childPlan.fieldId], ctx);
21512
21642
  });
21513
21643
  }
@@ -21519,12 +21649,58 @@ function validateGroupPlan(plan, value, ctx) {
21519
21649
  function childValidationContext(plan, ctx) {
21520
21650
  return plan.allowNullChildren ? { ...ctx, allowNull: true } : ctx;
21521
21651
  }
21522
- function withIndexedPath(plan, parentPath, index) {
21523
- const suffix = plan.path.slice(parentPath.length + 1);
21524
- return {
21525
- ...plan,
21526
- path: [...parentPath, index, plan.fieldId, ...suffix]
21527
- };
21652
+ function materializeRepeaterItemPlan(plan, parentPath, index) {
21653
+ return rebaseFieldPlanPath(plan, [...parentPath, 0], [...parentPath, index]);
21654
+ }
21655
+ function rebaseFieldPlanPath(plan, fromPrefix, toPrefix) {
21656
+ const path21 = rebaseFieldPath(plan.path, fromPrefix, toPrefix);
21657
+ switch (plan.kind) {
21658
+ case "group":
21659
+ return {
21660
+ ...plan,
21661
+ path: path21,
21662
+ children: plan.children.map((childPlan) => rebaseFieldPlanPath(childPlan, fromPrefix, toPrefix))
21663
+ };
21664
+ case "repeater":
21665
+ return {
21666
+ ...plan,
21667
+ path: path21,
21668
+ ...plan.repeatedItemVariants ? {
21669
+ repeatedItemVariants: plan.repeatedItemVariants.map((variant) => ({
21670
+ ...variant,
21671
+ fields: variant.fields.map((fieldPlan) => rebaseFieldPlanPath(fieldPlan, fromPrefix, toPrefix))
21672
+ }))
21673
+ } : {},
21674
+ ...plan.repeatedItemPlan ? {
21675
+ repeatedItemPlan: plan.repeatedItemPlan.map(
21676
+ (fieldPlan) => rebaseFieldPlanPath(fieldPlan, fromPrefix, toPrefix)
21677
+ )
21678
+ } : {}
21679
+ };
21680
+ case "string":
21681
+ case "number":
21682
+ case "boolean":
21683
+ case "richText":
21684
+ case "media":
21685
+ case "link":
21686
+ case "select":
21687
+ case "passthrough":
21688
+ return {
21689
+ ...plan,
21690
+ path: path21
21691
+ };
21692
+ default:
21693
+ return assertNever2(plan);
21694
+ }
21695
+ }
21696
+ function rebaseFieldPath(path21, fromPrefix, toPrefix) {
21697
+ if (!startsWithFieldPath(path21, fromPrefix)) {
21698
+ throw new Error(`Cannot rebase field path ${formatFieldPath(path21)} from ${formatFieldPath(fromPrefix)}`);
21699
+ }
21700
+ return [...toPrefix, ...path21.slice(fromPrefix.length)];
21701
+ }
21702
+ function startsWithFieldPath(path21, prefix) {
21703
+ return prefix.every((segment, index) => path21[index] === segment);
21528
21704
  }
21529
21705
  function issue(plan, kind, extra) {
21530
21706
  return {
@@ -32197,6 +32373,9 @@ init_shadow2();
32197
32373
  // ../blocks/src/index.ts
32198
32374
  init_blocks();
32199
32375
  init_colorStyles();
32376
+
32377
+ // ../api/src/navigation/linkValue.ts
32378
+ init_src();
32200
32379
  var Rfc6902PatchOp = z.discriminatedUnion("op", [
32201
32380
  // Standard RFC-6902 operations
32202
32381
  z.object({
@@ -45358,7 +45537,7 @@ var SimpleCache = class {
45358
45537
  };
45359
45538
 
45360
45539
  // src/version.ts
45361
- var SDK_VERSION = "0.60.9";
45540
+ var SDK_VERSION = "0.60.12";
45362
45541
 
45363
45542
  // src/client/error.ts
45364
45543
  var RiverbankApiError = class _RiverbankApiError extends Error {