@riverbankcms/sdk 0.92.0 → 0.93.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/{PreviewEditorSidebar-3CI5MKV3.mjs → PreviewEditorSidebar-D3PAF7NW.mjs} +3 -3
- package/dist/{PreviewEditorUI-DKEP636I.mjs → PreviewEditorUI-G5JVJEIJ.mjs} +3 -3
- package/dist/SdkPreviewModeRuntime-NHTLRNQD.mjs +8 -0
- package/dist/_dts/api/src/common/envelope.d.ts +10 -0
- package/dist/_dts/api/src/index.d.ts +2 -2
- package/dist/_dts/api/src/request.d.ts +1 -1
- package/dist/_dts/blocks/src/system/manifest/fieldValidation/index.d.ts +1 -0
- package/dist/_dts/content-editor/src/controller/EntryControllerProvider.d.ts +14 -14
- package/dist/_dts/content-editor/src/controller/useEntrySyncHelpers.d.ts +1 -1
- package/dist/_dts/content-editor/src/hooks/useEntryActions.d.ts +5 -15
- package/dist/_dts/content-editor/src/ui/editorSnapshot.d.ts +46 -0
- package/dist/_dts/content-editor/src/ui/editorUiStore.d.ts +43 -36
- package/dist/_dts/media-core/src/fileUploadFinalization.d.ts +29 -1
- package/dist/_dts/media-core/src/index.d.ts +1 -0
- package/dist/_dts/media-core/src/legacyMediaValue.d.ts +11 -0
- package/dist/_dts/media-react/src/hooks/useApiMediaUploader.d.ts +2 -1
- package/dist/_dts/sdk/src/version.d.ts +1 -1
- package/dist/{chunk-UOMTCHZD.mjs → chunk-A63UXN3P.mjs} +21 -19
- package/dist/{chunk-U5YM4AWE.mjs → chunk-AJZGT6YG.mjs} +1 -1
- package/dist/{chunk-6D7PLF4M.mjs → chunk-AQ6RT6LZ.mjs} +2 -2
- package/dist/{chunk-ZA2S7H34.mjs → chunk-NT76QGIJ.mjs} +98 -1
- package/dist/{chunk-I6EOKV6B.mjs → chunk-PCNCETBI.mjs} +676 -386
- package/dist/{chunk-LERKJM3E.mjs → chunk-XIK2HYI3.mjs} +7 -7
- package/dist/cli/index.mjs +198 -87
- package/dist/client/{accordion-BUDH2G3S.mjs → accordion-RNQIPG55.mjs} +2 -2
- package/dist/client/{bookingForm-NQMCELVB.mjs → bookingForm-HYEEVRLP.mjs} +5 -5
- package/dist/client/{carousel-ONCEW6IJ.mjs → carousel-W7DQ3YPU.mjs} +3 -3
- package/dist/client/{cart-V2TCK2GI.mjs → cart-PXJ3SXXO.mjs} +6 -6
- package/dist/client/{checkout-ZI7SWNCS.mjs → checkout-X3JYSOXI.mjs} +6 -6
- package/dist/client/{chunk-R3CZQLXF.mjs → chunk-6SYGVVWA.mjs} +1 -1
- package/dist/client/{chunk-N2WJPTF7.mjs → chunk-DUOHLWLF.mjs} +3 -3
- package/dist/client/{chunk-KXYEKEV6.mjs → chunk-IXDSXF2D.mjs} +7 -7
- package/dist/client/{chunk-ZJDBOLX7.mjs → chunk-J6TMMMXW.mjs} +2 -2
- package/dist/client/{chunk-B5UC2D6X.mjs → chunk-JNE6UI6U.mjs} +1 -1
- package/dist/client/{chunk-QQNVQ62W.mjs → chunk-OLAOAZEO.mjs} +1 -1
- package/dist/client/{chunk-AUMRQ242.mjs → chunk-PICR3NTQ.mjs} +2 -2
- package/dist/client/{chunk-ERQDHUS2.mjs → chunk-Q47XGAGS.mjs} +1 -1
- package/dist/client/{chunk-HQWIJLYN.mjs → chunk-WERRJXNJ.mjs} +1 -1
- package/dist/client/{chunk-JXY6NHG6.mjs → chunk-YYVGSYBO.mjs} +5 -5
- package/dist/client/client.mjs +127 -17
- package/dist/client/{courseRegistration-JPWAQ6KM.mjs → courseRegistration-QZ67PVHO.mjs} +5 -5
- package/dist/client/{eventCalendar-QDOCHBBV.mjs → eventCalendar-V3BDHQNT.mjs} +8 -8
- package/dist/client/{eventCombined-ZS2CXSIE.mjs → eventCombined-XYFRN2RG.mjs} +8 -8
- package/dist/client/{eventDetails-5LOBMPLN.mjs → eventDetails-TFE5TWKV.mjs} +8 -8
- package/dist/client/{eventListing-SBGY4I3L.mjs → eventListing-IQ6AGWZ6.mjs} +8 -8
- package/dist/client/{eventRegistration-XGPIU3Z2.mjs → eventRegistration-WGJVFKQJ.mjs} +8 -8
- package/dist/client/{form-R7D4LZWW.mjs → form-6UZY6RUA.mjs} +2 -2
- package/dist/client/{headerSection-RRLYUCGC.mjs → headerSection-RSFXY6V3.mjs} +3 -3
- package/dist/client/hooks.mjs +35 -3
- package/dist/client/{locationMap-35ZJMRBZ.mjs → locationMap-24FH67I4.mjs} +3 -3
- package/dist/client/{newsletterForm-MJ2VCFUT.mjs → newsletterForm-QVL3MLTN.mjs} +2 -2
- package/dist/client/{productDetail-2O7YQNBX.mjs → productDetail-ZDYN3G4T.mjs} +6 -6
- package/dist/client/{productList-FDP5BH7W.mjs → productList-4BMJLQHZ.mjs} +6 -6
- package/dist/client/rendering/client.mjs +8 -0
- package/dist/client/rendering/islands.mjs +19 -19
- package/dist/client/rendering.mjs +69 -2
- package/dist/client/{shop-BGYJ3LDT.mjs → shop-U5C634FF.mjs} +6 -6
- package/dist/preview-next/client/runtime.mjs +5 -5
- package/dist/{sdk-runtime-B3TFXRXZ.mjs → sdk-runtime-VGV46WVB.mjs} +6 -6
- package/dist/server/components.mjs +121 -61
- package/dist/server/config-validation.mjs +35 -3
- package/dist/server/config.mjs +35 -3
- package/dist/server/data.mjs +35 -3
- package/dist/server/index.mjs +104 -29
- package/dist/server/next.mjs +183 -80
- package/dist/server/page-converter.mjs +3 -3
- package/dist/server/prebuild.mjs +1 -1
- package/dist/server/rendering/server.mjs +121 -61
- package/dist/server/rendering.mjs +121 -61
- package/dist/server/routing.mjs +102 -62
- package/dist/server/server.mjs +167 -92
- package/package.json +1 -1
- package/dist/SdkPreviewModeRuntime-BRGRDQFH.mjs +0 -8
- /package/dist/client/{chunk-GH6IIOOE.mjs → chunk-PCHACQEB.mjs} +0 -0
|
@@ -57,65 +57,6 @@ function formatKeyAsLabel(key) {
|
|
|
57
57
|
// ../blocks/src/system/manifest/fieldValidation/index.ts
|
|
58
58
|
import { z as z4 } from "zod";
|
|
59
59
|
|
|
60
|
-
// ../blocks/src/system/types/link.ts
|
|
61
|
-
import { z } from "zod";
|
|
62
|
-
var nullableString = z.union([z.string().min(1), z.null()]);
|
|
63
|
-
var resolvedInternalLinkKeys = ["entityId", "entityType", "href", "title", "typeLabel"];
|
|
64
|
-
var internalRouteOnlyLinkSchema = z.object({
|
|
65
|
-
kind: z.literal("internal"),
|
|
66
|
-
routeId: z.string().min(1)
|
|
67
|
-
}).passthrough().superRefine((value, ctx) => {
|
|
68
|
-
const hasResolvedMetadata = resolvedInternalLinkKeys.some((key) => value[key] != null);
|
|
69
|
-
if (!hasResolvedMetadata) return;
|
|
70
|
-
ctx.addIssue({
|
|
71
|
-
code: "custom",
|
|
72
|
-
message: "Internal links with resolved metadata must include entityId, entityType, href, title, and typeLabel"
|
|
73
|
-
});
|
|
74
|
-
});
|
|
75
|
-
var internalResolvedLinkSchema = z.object({
|
|
76
|
-
kind: z.literal("internal"),
|
|
77
|
-
routeId: z.string().min(1),
|
|
78
|
-
entityId: z.string().min(1),
|
|
79
|
-
entityType: z.enum(["page", "content"]),
|
|
80
|
-
href: z.string().min(1),
|
|
81
|
-
title: z.string().min(1),
|
|
82
|
-
typeLabel: z.string().min(1),
|
|
83
|
-
contentTypeKey: nullableString.optional(),
|
|
84
|
-
contentTypeName: nullableString.optional(),
|
|
85
|
-
updatedAt: nullableString.optional()
|
|
86
|
-
}).passthrough();
|
|
87
|
-
var internalLinkSchema = z.union([
|
|
88
|
-
internalResolvedLinkSchema,
|
|
89
|
-
internalRouteOnlyLinkSchema
|
|
90
|
-
]);
|
|
91
|
-
var externalLinkSchema = z.object({
|
|
92
|
-
kind: z.literal("external"),
|
|
93
|
-
href: z.string().min(1)
|
|
94
|
-
}).passthrough();
|
|
95
|
-
var customLinkSchema = z.object({
|
|
96
|
-
kind: z.literal("url"),
|
|
97
|
-
href: z.string().min(1)
|
|
98
|
-
}).passthrough();
|
|
99
|
-
var pageLinkSchema = z.object({
|
|
100
|
-
kind: z.literal("page"),
|
|
101
|
-
identifier: z.string().min(1)
|
|
102
|
-
}).passthrough();
|
|
103
|
-
var entryLinkSchema = z.object({
|
|
104
|
-
kind: z.literal("entry"),
|
|
105
|
-
contentType: z.string().min(1),
|
|
106
|
-
identifier: z.string().min(1)
|
|
107
|
-
}).passthrough();
|
|
108
|
-
var linkSchema = z.union([
|
|
109
|
-
internalLinkSchema,
|
|
110
|
-
externalLinkSchema,
|
|
111
|
-
customLinkSchema,
|
|
112
|
-
pageLinkSchema,
|
|
113
|
-
entryLinkSchema
|
|
114
|
-
]);
|
|
115
|
-
|
|
116
|
-
// ../blocks/src/system/manifest/schema.ts
|
|
117
|
-
import { z as z3 } from "zod";
|
|
118
|
-
|
|
119
60
|
// ../core/src/result.ts
|
|
120
61
|
function ok(value) {
|
|
121
62
|
return { ok: true, value };
|
|
@@ -866,6 +807,82 @@ function mediaIdentifierOrFallback(current, fallback2) {
|
|
|
866
807
|
return fallback2 ?? (typeof current === "string" ? current : void 0);
|
|
867
808
|
}
|
|
868
809
|
|
|
810
|
+
// ../media-core/src/legacyMediaValue.ts
|
|
811
|
+
function legacyStringMediaTypeForField(field) {
|
|
812
|
+
if (field.type === "file") {
|
|
813
|
+
return field.fileKinds?.[0] ?? "document";
|
|
814
|
+
}
|
|
815
|
+
return field.mediaKinds?.[0] ?? "image";
|
|
816
|
+
}
|
|
817
|
+
function normalizeLegacyStringMediaValueForField(value, field) {
|
|
818
|
+
if (typeof value !== "string") return value;
|
|
819
|
+
const src = value.trim();
|
|
820
|
+
if (!src) return value;
|
|
821
|
+
return {
|
|
822
|
+
type: legacyStringMediaTypeForField(field),
|
|
823
|
+
src
|
|
824
|
+
};
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
// ../blocks/src/system/types/link.ts
|
|
828
|
+
import { z } from "zod";
|
|
829
|
+
var nullableString = z.union([z.string().min(1), z.null()]);
|
|
830
|
+
var resolvedInternalLinkKeys = ["entityId", "entityType", "href", "title", "typeLabel"];
|
|
831
|
+
var internalRouteOnlyLinkSchema = z.object({
|
|
832
|
+
kind: z.literal("internal"),
|
|
833
|
+
routeId: z.string().min(1)
|
|
834
|
+
}).passthrough().superRefine((value, ctx) => {
|
|
835
|
+
const hasResolvedMetadata = resolvedInternalLinkKeys.some((key) => value[key] != null);
|
|
836
|
+
if (!hasResolvedMetadata) return;
|
|
837
|
+
ctx.addIssue({
|
|
838
|
+
code: "custom",
|
|
839
|
+
message: "Internal links with resolved metadata must include entityId, entityType, href, title, and typeLabel"
|
|
840
|
+
});
|
|
841
|
+
});
|
|
842
|
+
var internalResolvedLinkSchema = z.object({
|
|
843
|
+
kind: z.literal("internal"),
|
|
844
|
+
routeId: z.string().min(1),
|
|
845
|
+
entityId: z.string().min(1),
|
|
846
|
+
entityType: z.enum(["page", "content"]),
|
|
847
|
+
href: z.string().min(1),
|
|
848
|
+
title: z.string().min(1),
|
|
849
|
+
typeLabel: z.string().min(1),
|
|
850
|
+
contentTypeKey: nullableString.optional(),
|
|
851
|
+
contentTypeName: nullableString.optional(),
|
|
852
|
+
updatedAt: nullableString.optional()
|
|
853
|
+
}).passthrough();
|
|
854
|
+
var internalLinkSchema = z.union([
|
|
855
|
+
internalResolvedLinkSchema,
|
|
856
|
+
internalRouteOnlyLinkSchema
|
|
857
|
+
]);
|
|
858
|
+
var externalLinkSchema = z.object({
|
|
859
|
+
kind: z.literal("external"),
|
|
860
|
+
href: z.string().min(1)
|
|
861
|
+
}).passthrough();
|
|
862
|
+
var customLinkSchema = z.object({
|
|
863
|
+
kind: z.literal("url"),
|
|
864
|
+
href: z.string().min(1)
|
|
865
|
+
}).passthrough();
|
|
866
|
+
var pageLinkSchema = z.object({
|
|
867
|
+
kind: z.literal("page"),
|
|
868
|
+
identifier: z.string().min(1)
|
|
869
|
+
}).passthrough();
|
|
870
|
+
var entryLinkSchema = z.object({
|
|
871
|
+
kind: z.literal("entry"),
|
|
872
|
+
contentType: z.string().min(1),
|
|
873
|
+
identifier: z.string().min(1)
|
|
874
|
+
}).passthrough();
|
|
875
|
+
var linkSchema = z.union([
|
|
876
|
+
internalLinkSchema,
|
|
877
|
+
externalLinkSchema,
|
|
878
|
+
customLinkSchema,
|
|
879
|
+
pageLinkSchema,
|
|
880
|
+
entryLinkSchema
|
|
881
|
+
]);
|
|
882
|
+
|
|
883
|
+
// ../blocks/src/system/manifest/schema.ts
|
|
884
|
+
import { z as z3 } from "zod";
|
|
885
|
+
|
|
869
886
|
// ../blocks/src/system/node/schema.ts
|
|
870
887
|
import { z as z2 } from "zod";
|
|
871
888
|
var transformStepSchema = z2.object({
|
|
@@ -2626,7 +2643,10 @@ function deriveFieldValidationPlan(field, path = [field.id]) {
|
|
|
2626
2643
|
return makePlan("richText", "object", field, path, required, commonConstraints(required, { kind: "richTextDoc" }));
|
|
2627
2644
|
case "media":
|
|
2628
2645
|
case "file":
|
|
2629
|
-
return
|
|
2646
|
+
return {
|
|
2647
|
+
...makePlan("media", "object", field, path, required, commonConstraints(required, { kind: "mediaObject" })),
|
|
2648
|
+
legacyStringType: legacyStringMediaTypeForField(field)
|
|
2649
|
+
};
|
|
2630
2650
|
case "link":
|
|
2631
2651
|
return makePlan("link", "object", field, path, required, commonConstraints(required, { kind: "linkObject" }));
|
|
2632
2652
|
case "boolean":
|
|
@@ -2811,15 +2831,23 @@ function normalizeFieldValue(plan, value, ctx) {
|
|
|
2811
2831
|
return normalizeRepeaterItems(plan, value, ctx);
|
|
2812
2832
|
case "boolean":
|
|
2813
2833
|
case "richText":
|
|
2814
|
-
case "media":
|
|
2815
2834
|
case "link":
|
|
2816
2835
|
case "select":
|
|
2817
2836
|
case "passthrough":
|
|
2818
2837
|
return value;
|
|
2838
|
+
case "media":
|
|
2839
|
+
return normalizeMediaInput(plan, value);
|
|
2819
2840
|
default:
|
|
2820
2841
|
return assertNever2(plan);
|
|
2821
2842
|
}
|
|
2822
2843
|
}
|
|
2844
|
+
function normalizeMediaInput(plan, value) {
|
|
2845
|
+
return normalizeLegacyStringMediaValueForField(value, {
|
|
2846
|
+
type: plan.fieldType,
|
|
2847
|
+
mediaKinds: plan.fieldType === "media" ? [plan.legacyStringType] : void 0,
|
|
2848
|
+
fileKinds: plan.fieldType === "file" ? [plan.legacyStringType] : void 0
|
|
2849
|
+
});
|
|
2850
|
+
}
|
|
2823
2851
|
function normalizeObjectChildren(children, value, ctx) {
|
|
2824
2852
|
if (!value || typeof value !== "object" || Array.isArray(value)) return value;
|
|
2825
2853
|
const normalized = {
|
|
@@ -68372,6 +68400,38 @@ var NAMED_SURFACE_IDS = SURFACE_IDS.filter(
|
|
|
68372
68400
|
(surfaceId) => surfaceId !== DEFAULT_SURFACE_ID
|
|
68373
68401
|
);
|
|
68374
68402
|
|
|
68403
|
+
// ../api/src/common/envelope.ts
|
|
68404
|
+
var API_ERROR_CODES = [
|
|
68405
|
+
"auth:unauthenticated",
|
|
68406
|
+
"auth:token_expired",
|
|
68407
|
+
"auth:token_invalid",
|
|
68408
|
+
"auth:forbidden",
|
|
68409
|
+
"auth:mfa_required",
|
|
68410
|
+
"auth:sudo_required",
|
|
68411
|
+
"auth:insufficient_permissions",
|
|
68412
|
+
"auth:impersonation_restricted",
|
|
68413
|
+
"validation:invalid_input",
|
|
68414
|
+
"validation:missing_field",
|
|
68415
|
+
"validation:invalid_format",
|
|
68416
|
+
"validation:payload_too_large",
|
|
68417
|
+
"resource:not_found",
|
|
68418
|
+
"resource:already_exists",
|
|
68419
|
+
"resource:conflict",
|
|
68420
|
+
"resource:gone",
|
|
68421
|
+
"rate_limit:exceeded",
|
|
68422
|
+
"billing:payment_required",
|
|
68423
|
+
"billing:plan_limit_exceeded",
|
|
68424
|
+
"billing:pass_redemption_failed",
|
|
68425
|
+
"server:internal_error",
|
|
68426
|
+
"server:unavailable",
|
|
68427
|
+
"external:service_error",
|
|
68428
|
+
"external:registrar_orphaned_contact_profile",
|
|
68429
|
+
"network:connection_error",
|
|
68430
|
+
"network:timeout",
|
|
68431
|
+
"network:dns_error"
|
|
68432
|
+
];
|
|
68433
|
+
var API_ERROR_CODE_SET = new Set(API_ERROR_CODES);
|
|
68434
|
+
|
|
68375
68435
|
// ../api/src/customerMembershipOutcomes.ts
|
|
68376
68436
|
var CANONICAL_REFUND_CONFLICT_CODES = [
|
|
68377
68437
|
"already_refunded",
|
package/dist/server/routing.mjs
CHANGED
|
@@ -7255,68 +7255,6 @@ var init_fieldPath = __esm({
|
|
|
7255
7255
|
}
|
|
7256
7256
|
});
|
|
7257
7257
|
|
|
7258
|
-
// ../blocks/src/system/types/link.ts
|
|
7259
|
-
import { z as z3 } from "zod";
|
|
7260
|
-
var nullableString, resolvedInternalLinkKeys, internalRouteOnlyLinkSchema, internalResolvedLinkSchema, internalLinkSchema, externalLinkSchema2, customLinkSchema2, pageLinkSchema2, entryLinkSchema2, linkSchema;
|
|
7261
|
-
var init_link = __esm({
|
|
7262
|
-
"../blocks/src/system/types/link.ts"() {
|
|
7263
|
-
"use strict";
|
|
7264
|
-
nullableString = z3.union([z3.string().min(1), z3.null()]);
|
|
7265
|
-
resolvedInternalLinkKeys = ["entityId", "entityType", "href", "title", "typeLabel"];
|
|
7266
|
-
internalRouteOnlyLinkSchema = z3.object({
|
|
7267
|
-
kind: z3.literal("internal"),
|
|
7268
|
-
routeId: z3.string().min(1)
|
|
7269
|
-
}).passthrough().superRefine((value, ctx) => {
|
|
7270
|
-
const hasResolvedMetadata = resolvedInternalLinkKeys.some((key) => value[key] != null);
|
|
7271
|
-
if (!hasResolvedMetadata) return;
|
|
7272
|
-
ctx.addIssue({
|
|
7273
|
-
code: "custom",
|
|
7274
|
-
message: "Internal links with resolved metadata must include entityId, entityType, href, title, and typeLabel"
|
|
7275
|
-
});
|
|
7276
|
-
});
|
|
7277
|
-
internalResolvedLinkSchema = z3.object({
|
|
7278
|
-
kind: z3.literal("internal"),
|
|
7279
|
-
routeId: z3.string().min(1),
|
|
7280
|
-
entityId: z3.string().min(1),
|
|
7281
|
-
entityType: z3.enum(["page", "content"]),
|
|
7282
|
-
href: z3.string().min(1),
|
|
7283
|
-
title: z3.string().min(1),
|
|
7284
|
-
typeLabel: z3.string().min(1),
|
|
7285
|
-
contentTypeKey: nullableString.optional(),
|
|
7286
|
-
contentTypeName: nullableString.optional(),
|
|
7287
|
-
updatedAt: nullableString.optional()
|
|
7288
|
-
}).passthrough();
|
|
7289
|
-
internalLinkSchema = z3.union([
|
|
7290
|
-
internalResolvedLinkSchema,
|
|
7291
|
-
internalRouteOnlyLinkSchema
|
|
7292
|
-
]);
|
|
7293
|
-
externalLinkSchema2 = z3.object({
|
|
7294
|
-
kind: z3.literal("external"),
|
|
7295
|
-
href: z3.string().min(1)
|
|
7296
|
-
}).passthrough();
|
|
7297
|
-
customLinkSchema2 = z3.object({
|
|
7298
|
-
kind: z3.literal("url"),
|
|
7299
|
-
href: z3.string().min(1)
|
|
7300
|
-
}).passthrough();
|
|
7301
|
-
pageLinkSchema2 = z3.object({
|
|
7302
|
-
kind: z3.literal("page"),
|
|
7303
|
-
identifier: z3.string().min(1)
|
|
7304
|
-
}).passthrough();
|
|
7305
|
-
entryLinkSchema2 = z3.object({
|
|
7306
|
-
kind: z3.literal("entry"),
|
|
7307
|
-
contentType: z3.string().min(1),
|
|
7308
|
-
identifier: z3.string().min(1)
|
|
7309
|
-
}).passthrough();
|
|
7310
|
-
linkSchema = z3.union([
|
|
7311
|
-
internalLinkSchema,
|
|
7312
|
-
externalLinkSchema2,
|
|
7313
|
-
customLinkSchema2,
|
|
7314
|
-
pageLinkSchema2,
|
|
7315
|
-
entryLinkSchema2
|
|
7316
|
-
]);
|
|
7317
|
-
}
|
|
7318
|
-
});
|
|
7319
|
-
|
|
7320
7258
|
// ../media-core/src/types.ts
|
|
7321
7259
|
var init_types = __esm({
|
|
7322
7260
|
"../media-core/src/types.ts"() {
|
|
@@ -7769,6 +7707,13 @@ var init_renderableMediaAsset = __esm({
|
|
|
7769
7707
|
}
|
|
7770
7708
|
});
|
|
7771
7709
|
|
|
7710
|
+
// ../media-core/src/legacyMediaValue.ts
|
|
7711
|
+
var init_legacyMediaValue = __esm({
|
|
7712
|
+
"../media-core/src/legacyMediaValue.ts"() {
|
|
7713
|
+
"use strict";
|
|
7714
|
+
}
|
|
7715
|
+
});
|
|
7716
|
+
|
|
7772
7717
|
// ../media-core/src/index.ts
|
|
7773
7718
|
var init_src2 = __esm({
|
|
7774
7719
|
"../media-core/src/index.ts"() {
|
|
@@ -7808,6 +7753,69 @@ var init_src2 = __esm({
|
|
|
7808
7753
|
init_mediaUsageProjection();
|
|
7809
7754
|
init_portableMediaReferences();
|
|
7810
7755
|
init_renderableMediaAsset();
|
|
7756
|
+
init_legacyMediaValue();
|
|
7757
|
+
}
|
|
7758
|
+
});
|
|
7759
|
+
|
|
7760
|
+
// ../blocks/src/system/types/link.ts
|
|
7761
|
+
import { z as z3 } from "zod";
|
|
7762
|
+
var nullableString, resolvedInternalLinkKeys, internalRouteOnlyLinkSchema, internalResolvedLinkSchema, internalLinkSchema, externalLinkSchema2, customLinkSchema2, pageLinkSchema2, entryLinkSchema2, linkSchema;
|
|
7763
|
+
var init_link = __esm({
|
|
7764
|
+
"../blocks/src/system/types/link.ts"() {
|
|
7765
|
+
"use strict";
|
|
7766
|
+
nullableString = z3.union([z3.string().min(1), z3.null()]);
|
|
7767
|
+
resolvedInternalLinkKeys = ["entityId", "entityType", "href", "title", "typeLabel"];
|
|
7768
|
+
internalRouteOnlyLinkSchema = z3.object({
|
|
7769
|
+
kind: z3.literal("internal"),
|
|
7770
|
+
routeId: z3.string().min(1)
|
|
7771
|
+
}).passthrough().superRefine((value, ctx) => {
|
|
7772
|
+
const hasResolvedMetadata = resolvedInternalLinkKeys.some((key) => value[key] != null);
|
|
7773
|
+
if (!hasResolvedMetadata) return;
|
|
7774
|
+
ctx.addIssue({
|
|
7775
|
+
code: "custom",
|
|
7776
|
+
message: "Internal links with resolved metadata must include entityId, entityType, href, title, and typeLabel"
|
|
7777
|
+
});
|
|
7778
|
+
});
|
|
7779
|
+
internalResolvedLinkSchema = z3.object({
|
|
7780
|
+
kind: z3.literal("internal"),
|
|
7781
|
+
routeId: z3.string().min(1),
|
|
7782
|
+
entityId: z3.string().min(1),
|
|
7783
|
+
entityType: z3.enum(["page", "content"]),
|
|
7784
|
+
href: z3.string().min(1),
|
|
7785
|
+
title: z3.string().min(1),
|
|
7786
|
+
typeLabel: z3.string().min(1),
|
|
7787
|
+
contentTypeKey: nullableString.optional(),
|
|
7788
|
+
contentTypeName: nullableString.optional(),
|
|
7789
|
+
updatedAt: nullableString.optional()
|
|
7790
|
+
}).passthrough();
|
|
7791
|
+
internalLinkSchema = z3.union([
|
|
7792
|
+
internalResolvedLinkSchema,
|
|
7793
|
+
internalRouteOnlyLinkSchema
|
|
7794
|
+
]);
|
|
7795
|
+
externalLinkSchema2 = z3.object({
|
|
7796
|
+
kind: z3.literal("external"),
|
|
7797
|
+
href: z3.string().min(1)
|
|
7798
|
+
}).passthrough();
|
|
7799
|
+
customLinkSchema2 = z3.object({
|
|
7800
|
+
kind: z3.literal("url"),
|
|
7801
|
+
href: z3.string().min(1)
|
|
7802
|
+
}).passthrough();
|
|
7803
|
+
pageLinkSchema2 = z3.object({
|
|
7804
|
+
kind: z3.literal("page"),
|
|
7805
|
+
identifier: z3.string().min(1)
|
|
7806
|
+
}).passthrough();
|
|
7807
|
+
entryLinkSchema2 = z3.object({
|
|
7808
|
+
kind: z3.literal("entry"),
|
|
7809
|
+
contentType: z3.string().min(1),
|
|
7810
|
+
identifier: z3.string().min(1)
|
|
7811
|
+
}).passthrough();
|
|
7812
|
+
linkSchema = z3.union([
|
|
7813
|
+
internalLinkSchema,
|
|
7814
|
+
externalLinkSchema2,
|
|
7815
|
+
customLinkSchema2,
|
|
7816
|
+
pageLinkSchema2,
|
|
7817
|
+
entryLinkSchema2
|
|
7818
|
+
]);
|
|
7811
7819
|
}
|
|
7812
7820
|
});
|
|
7813
7821
|
|
|
@@ -45417,9 +45425,40 @@ var init_url = __esm({
|
|
|
45417
45425
|
});
|
|
45418
45426
|
|
|
45419
45427
|
// ../api/src/common/envelope.ts
|
|
45428
|
+
var API_ERROR_CODES, API_ERROR_CODE_SET;
|
|
45420
45429
|
var init_envelope = __esm({
|
|
45421
45430
|
"../api/src/common/envelope.ts"() {
|
|
45422
45431
|
"use strict";
|
|
45432
|
+
API_ERROR_CODES = [
|
|
45433
|
+
"auth:unauthenticated",
|
|
45434
|
+
"auth:token_expired",
|
|
45435
|
+
"auth:token_invalid",
|
|
45436
|
+
"auth:forbidden",
|
|
45437
|
+
"auth:mfa_required",
|
|
45438
|
+
"auth:sudo_required",
|
|
45439
|
+
"auth:insufficient_permissions",
|
|
45440
|
+
"auth:impersonation_restricted",
|
|
45441
|
+
"validation:invalid_input",
|
|
45442
|
+
"validation:missing_field",
|
|
45443
|
+
"validation:invalid_format",
|
|
45444
|
+
"validation:payload_too_large",
|
|
45445
|
+
"resource:not_found",
|
|
45446
|
+
"resource:already_exists",
|
|
45447
|
+
"resource:conflict",
|
|
45448
|
+
"resource:gone",
|
|
45449
|
+
"rate_limit:exceeded",
|
|
45450
|
+
"billing:payment_required",
|
|
45451
|
+
"billing:plan_limit_exceeded",
|
|
45452
|
+
"billing:pass_redemption_failed",
|
|
45453
|
+
"server:internal_error",
|
|
45454
|
+
"server:unavailable",
|
|
45455
|
+
"external:service_error",
|
|
45456
|
+
"external:registrar_orphaned_contact_profile",
|
|
45457
|
+
"network:connection_error",
|
|
45458
|
+
"network:timeout",
|
|
45459
|
+
"network:dns_error"
|
|
45460
|
+
];
|
|
45461
|
+
API_ERROR_CODE_SET = new Set(API_ERROR_CODES);
|
|
45423
45462
|
}
|
|
45424
45463
|
});
|
|
45425
45464
|
|
|
@@ -45445,6 +45484,7 @@ var init_request = __esm({
|
|
|
45445
45484
|
init_token();
|
|
45446
45485
|
init_url();
|
|
45447
45486
|
init_env2();
|
|
45487
|
+
init_envelope();
|
|
45448
45488
|
}
|
|
45449
45489
|
});
|
|
45450
45490
|
|