@cloudhal/core-contracts 0.7.2 → 0.8.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/src/generated/content-entry.d.ts +1 -1
- package/dist/src/generated/content-entry.js +1 -1
- package/dist/src/generated/index.d.ts +1 -1
- package/dist/src/generated/index.js +1 -1
- package/dist/src/generated/schemas.d.ts +699 -25
- package/dist/src/generated/schemas.js +425 -2
- package/dist/src/generated/site.d.ts +410 -174
- package/dist/src/generated/site.js +609 -328
- package/dist/src/generated/validators.js +4120 -1753
- package/package.json +1 -1
- package/schemas/content-entry.schema.json +1 -1
- package/schemas/site.schema.json +352 -1
|
@@ -1165,6 +1165,130 @@ export const SiteSchema = {
|
|
|
1165
1165
|
"description": "The value is a list of option values. Absent: false."
|
|
1166
1166
|
}
|
|
1167
1167
|
}
|
|
1168
|
+
},
|
|
1169
|
+
{
|
|
1170
|
+
"title": "ReferenceField",
|
|
1171
|
+
"type": "object",
|
|
1172
|
+
"description": "RFC-0045: entries of other (or this) collections of the same site, by translation group id (entry_…): the id of the group's original, which every language version and edition carries in translation.group.",
|
|
1173
|
+
"additionalProperties": false,
|
|
1174
|
+
"required": [
|
|
1175
|
+
"key",
|
|
1176
|
+
"type",
|
|
1177
|
+
"labels",
|
|
1178
|
+
"localized",
|
|
1179
|
+
"collections"
|
|
1180
|
+
],
|
|
1181
|
+
"properties": {
|
|
1182
|
+
"key": {
|
|
1183
|
+
"$ref": "#/$defs/FieldKey"
|
|
1184
|
+
},
|
|
1185
|
+
"type": {
|
|
1186
|
+
"type": "string",
|
|
1187
|
+
"enum": [
|
|
1188
|
+
"reference"
|
|
1189
|
+
]
|
|
1190
|
+
},
|
|
1191
|
+
"labels": {
|
|
1192
|
+
"$ref": "#/$defs/FieldLabels"
|
|
1193
|
+
},
|
|
1194
|
+
"localized": {
|
|
1195
|
+
"type": "boolean",
|
|
1196
|
+
"description": "true: each language version picks its own targets; false: only the translation group's original holds them, and every version resolves them in its own language."
|
|
1197
|
+
},
|
|
1198
|
+
"requiredToPublish": {
|
|
1199
|
+
"type": "boolean",
|
|
1200
|
+
"description": "An entry in review or published needs at least one target. Absent: false."
|
|
1201
|
+
},
|
|
1202
|
+
"migration": {
|
|
1203
|
+
"$ref": "#/$defs/FieldMigration"
|
|
1204
|
+
},
|
|
1205
|
+
"collections": {
|
|
1206
|
+
"type": "array",
|
|
1207
|
+
"description": "The collections a target may belong to: declared collections of this site (checked in code).",
|
|
1208
|
+
"minItems": 1,
|
|
1209
|
+
"maxItems": 5,
|
|
1210
|
+
"uniqueItems": true,
|
|
1211
|
+
"items": {
|
|
1212
|
+
"$ref": "#/$defs/Slug"
|
|
1213
|
+
}
|
|
1214
|
+
},
|
|
1215
|
+
"multiple": {
|
|
1216
|
+
"type": "boolean",
|
|
1217
|
+
"description": "The value is an ordered list of targets. Absent: false."
|
|
1218
|
+
},
|
|
1219
|
+
"maxItems": {
|
|
1220
|
+
"type": "integer",
|
|
1221
|
+
"description": "With multiple: at most this many targets. Absent: 20.",
|
|
1222
|
+
"minimum": 1,
|
|
1223
|
+
"maximum": 50
|
|
1224
|
+
},
|
|
1225
|
+
"where": {
|
|
1226
|
+
"type": "array",
|
|
1227
|
+
"description": "Only with one target collection: conditions on its list fields that a newly chosen target must meet (no `now`; checked in code). Narrows the picker; not re-checked when the target changes later.",
|
|
1228
|
+
"minItems": 1,
|
|
1229
|
+
"maxItems": 4,
|
|
1230
|
+
"items": {
|
|
1231
|
+
"$ref": "#/$defs/FieldCondition"
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
},
|
|
1236
|
+
{
|
|
1237
|
+
"title": "RepeaterField",
|
|
1238
|
+
"type": "object",
|
|
1239
|
+
"description": "RFC-0045: an ordered list of items, each a flat object of sub-fields. A repeater cannot contain a repeater.",
|
|
1240
|
+
"additionalProperties": false,
|
|
1241
|
+
"required": [
|
|
1242
|
+
"key",
|
|
1243
|
+
"type",
|
|
1244
|
+
"labels",
|
|
1245
|
+
"localized",
|
|
1246
|
+
"fields"
|
|
1247
|
+
],
|
|
1248
|
+
"properties": {
|
|
1249
|
+
"key": {
|
|
1250
|
+
"$ref": "#/$defs/FieldKey"
|
|
1251
|
+
},
|
|
1252
|
+
"type": {
|
|
1253
|
+
"type": "string",
|
|
1254
|
+
"enum": [
|
|
1255
|
+
"repeater"
|
|
1256
|
+
]
|
|
1257
|
+
},
|
|
1258
|
+
"labels": {
|
|
1259
|
+
"$ref": "#/$defs/FieldLabels"
|
|
1260
|
+
},
|
|
1261
|
+
"localized": {
|
|
1262
|
+
"type": "boolean",
|
|
1263
|
+
"description": "true: each language version has its own list (missing reads the original's); false: only the original holds the list."
|
|
1264
|
+
},
|
|
1265
|
+
"requiredToPublish": {
|
|
1266
|
+
"type": "boolean",
|
|
1267
|
+
"description": "An entry in review or published needs at least one item. Absent: false."
|
|
1268
|
+
},
|
|
1269
|
+
"migration": {
|
|
1270
|
+
"$ref": "#/$defs/FieldMigration"
|
|
1271
|
+
},
|
|
1272
|
+
"fields": {
|
|
1273
|
+
"type": "array",
|
|
1274
|
+
"description": "The sub-fields of every item, in form order. Unique keys (checked in code).",
|
|
1275
|
+
"minItems": 1,
|
|
1276
|
+
"maxItems": 10,
|
|
1277
|
+
"items": {
|
|
1278
|
+
"$ref": "#/$defs/SubFieldDefinition"
|
|
1279
|
+
}
|
|
1280
|
+
},
|
|
1281
|
+
"maxItems": {
|
|
1282
|
+
"type": "integer",
|
|
1283
|
+
"description": "At most this many items. Absent: 20.",
|
|
1284
|
+
"minimum": 1,
|
|
1285
|
+
"maximum": 50
|
|
1286
|
+
},
|
|
1287
|
+
"itemLabel": {
|
|
1288
|
+
"$ref": "#/$defs/FieldKey",
|
|
1289
|
+
"description": "The text, select or reference sub-field that names an item in Studio and approval prompts. Absent: the first such sub-field."
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1168
1292
|
}
|
|
1169
1293
|
]
|
|
1170
1294
|
},
|
|
@@ -1228,11 +1352,17 @@ export const SiteSchema = {
|
|
|
1228
1352
|
"datetime",
|
|
1229
1353
|
"url",
|
|
1230
1354
|
"image",
|
|
1231
|
-
"select"
|
|
1355
|
+
"select",
|
|
1356
|
+
"reference",
|
|
1357
|
+
"repeater"
|
|
1232
1358
|
]
|
|
1233
1359
|
},
|
|
1234
1360
|
"fromLocalized": {
|
|
1235
1361
|
"type": "boolean"
|
|
1362
|
+
},
|
|
1363
|
+
"sub": {
|
|
1364
|
+
"$ref": "#/$defs/FieldKey",
|
|
1365
|
+
"description": "RFC-0045: the repeater's sub-field the operation rewrites (its key once the operation is done); fromKey and fromType then describe the sub-field."
|
|
1236
1366
|
}
|
|
1237
1367
|
}
|
|
1238
1368
|
},
|
|
@@ -1905,6 +2035,299 @@ export const SiteSchema = {
|
|
|
1905
2035
|
}
|
|
1906
2036
|
]
|
|
1907
2037
|
},
|
|
2038
|
+
"SubFieldDefinition": {
|
|
2039
|
+
"description": "RFC-0045: one sub-field of a repeater item, discriminated by `type`. Only types whose value is a scalar: no datetime, no multiple select or reference, no repeater. No localized and no migration: the repeater's apply.",
|
|
2040
|
+
"oneOf": [
|
|
2041
|
+
{
|
|
2042
|
+
"title": "TextSubField",
|
|
2043
|
+
"type": "object",
|
|
2044
|
+
"additionalProperties": false,
|
|
2045
|
+
"required": [
|
|
2046
|
+
"key",
|
|
2047
|
+
"type",
|
|
2048
|
+
"labels"
|
|
2049
|
+
],
|
|
2050
|
+
"properties": {
|
|
2051
|
+
"key": {
|
|
2052
|
+
"$ref": "#/$defs/FieldKey"
|
|
2053
|
+
},
|
|
2054
|
+
"type": {
|
|
2055
|
+
"type": "string",
|
|
2056
|
+
"enum": [
|
|
2057
|
+
"text"
|
|
2058
|
+
]
|
|
2059
|
+
},
|
|
2060
|
+
"labels": {
|
|
2061
|
+
"$ref": "#/$defs/FieldLabels"
|
|
2062
|
+
},
|
|
2063
|
+
"requiredToPublish": {
|
|
2064
|
+
"type": "boolean",
|
|
2065
|
+
"description": "Every item of an entry in review or published needs a value. Absent: false."
|
|
2066
|
+
},
|
|
2067
|
+
"maxLength": {
|
|
2068
|
+
"type": "integer",
|
|
2069
|
+
"description": "Absent: 5000.",
|
|
2070
|
+
"minimum": 1,
|
|
2071
|
+
"maximum": 5000
|
|
2072
|
+
},
|
|
2073
|
+
"multiline": {
|
|
2074
|
+
"type": "boolean",
|
|
2075
|
+
"description": "Line breaks allowed. Absent: false."
|
|
2076
|
+
}
|
|
2077
|
+
}
|
|
2078
|
+
},
|
|
2079
|
+
{
|
|
2080
|
+
"title": "RichTextSubField",
|
|
2081
|
+
"type": "object",
|
|
2082
|
+
"additionalProperties": false,
|
|
2083
|
+
"required": [
|
|
2084
|
+
"key",
|
|
2085
|
+
"type",
|
|
2086
|
+
"labels"
|
|
2087
|
+
],
|
|
2088
|
+
"properties": {
|
|
2089
|
+
"key": {
|
|
2090
|
+
"$ref": "#/$defs/FieldKey"
|
|
2091
|
+
},
|
|
2092
|
+
"type": {
|
|
2093
|
+
"type": "string",
|
|
2094
|
+
"enum": [
|
|
2095
|
+
"richText"
|
|
2096
|
+
]
|
|
2097
|
+
},
|
|
2098
|
+
"labels": {
|
|
2099
|
+
"$ref": "#/$defs/FieldLabels"
|
|
2100
|
+
},
|
|
2101
|
+
"requiredToPublish": {
|
|
2102
|
+
"type": "boolean",
|
|
2103
|
+
"description": "Every item of an entry in review or published needs a value. Absent: false."
|
|
2104
|
+
}
|
|
2105
|
+
}
|
|
2106
|
+
},
|
|
2107
|
+
{
|
|
2108
|
+
"title": "NumberSubField",
|
|
2109
|
+
"type": "object",
|
|
2110
|
+
"additionalProperties": false,
|
|
2111
|
+
"required": [
|
|
2112
|
+
"key",
|
|
2113
|
+
"type",
|
|
2114
|
+
"labels"
|
|
2115
|
+
],
|
|
2116
|
+
"properties": {
|
|
2117
|
+
"key": {
|
|
2118
|
+
"$ref": "#/$defs/FieldKey"
|
|
2119
|
+
},
|
|
2120
|
+
"type": {
|
|
2121
|
+
"type": "string",
|
|
2122
|
+
"enum": [
|
|
2123
|
+
"number"
|
|
2124
|
+
]
|
|
2125
|
+
},
|
|
2126
|
+
"labels": {
|
|
2127
|
+
"$ref": "#/$defs/FieldLabels"
|
|
2128
|
+
},
|
|
2129
|
+
"requiredToPublish": {
|
|
2130
|
+
"type": "boolean",
|
|
2131
|
+
"description": "Every item of an entry in review or published needs a value. Absent: false."
|
|
2132
|
+
},
|
|
2133
|
+
"integer": {
|
|
2134
|
+
"type": "boolean",
|
|
2135
|
+
"description": "Whole numbers only. Absent: false."
|
|
2136
|
+
},
|
|
2137
|
+
"minimum": {
|
|
2138
|
+
"type": "number"
|
|
2139
|
+
},
|
|
2140
|
+
"maximum": {
|
|
2141
|
+
"type": "number"
|
|
2142
|
+
}
|
|
2143
|
+
}
|
|
2144
|
+
},
|
|
2145
|
+
{
|
|
2146
|
+
"title": "BooleanSubField",
|
|
2147
|
+
"type": "object",
|
|
2148
|
+
"additionalProperties": false,
|
|
2149
|
+
"required": [
|
|
2150
|
+
"key",
|
|
2151
|
+
"type",
|
|
2152
|
+
"labels"
|
|
2153
|
+
],
|
|
2154
|
+
"properties": {
|
|
2155
|
+
"key": {
|
|
2156
|
+
"$ref": "#/$defs/FieldKey"
|
|
2157
|
+
},
|
|
2158
|
+
"type": {
|
|
2159
|
+
"type": "string",
|
|
2160
|
+
"enum": [
|
|
2161
|
+
"boolean"
|
|
2162
|
+
]
|
|
2163
|
+
},
|
|
2164
|
+
"labels": {
|
|
2165
|
+
"$ref": "#/$defs/FieldLabels"
|
|
2166
|
+
}
|
|
2167
|
+
}
|
|
2168
|
+
},
|
|
2169
|
+
{
|
|
2170
|
+
"title": "DateSubField",
|
|
2171
|
+
"type": "object",
|
|
2172
|
+
"additionalProperties": false,
|
|
2173
|
+
"required": [
|
|
2174
|
+
"key",
|
|
2175
|
+
"type",
|
|
2176
|
+
"labels"
|
|
2177
|
+
],
|
|
2178
|
+
"properties": {
|
|
2179
|
+
"key": {
|
|
2180
|
+
"$ref": "#/$defs/FieldKey"
|
|
2181
|
+
},
|
|
2182
|
+
"type": {
|
|
2183
|
+
"type": "string",
|
|
2184
|
+
"enum": [
|
|
2185
|
+
"date"
|
|
2186
|
+
]
|
|
2187
|
+
},
|
|
2188
|
+
"labels": {
|
|
2189
|
+
"$ref": "#/$defs/FieldLabels"
|
|
2190
|
+
},
|
|
2191
|
+
"requiredToPublish": {
|
|
2192
|
+
"type": "boolean",
|
|
2193
|
+
"description": "Every item of an entry in review or published needs a value. Absent: false."
|
|
2194
|
+
}
|
|
2195
|
+
}
|
|
2196
|
+
},
|
|
2197
|
+
{
|
|
2198
|
+
"title": "UrlSubField",
|
|
2199
|
+
"type": "object",
|
|
2200
|
+
"additionalProperties": false,
|
|
2201
|
+
"required": [
|
|
2202
|
+
"key",
|
|
2203
|
+
"type",
|
|
2204
|
+
"labels"
|
|
2205
|
+
],
|
|
2206
|
+
"properties": {
|
|
2207
|
+
"key": {
|
|
2208
|
+
"$ref": "#/$defs/FieldKey"
|
|
2209
|
+
},
|
|
2210
|
+
"type": {
|
|
2211
|
+
"type": "string",
|
|
2212
|
+
"enum": [
|
|
2213
|
+
"url"
|
|
2214
|
+
]
|
|
2215
|
+
},
|
|
2216
|
+
"labels": {
|
|
2217
|
+
"$ref": "#/$defs/FieldLabels"
|
|
2218
|
+
},
|
|
2219
|
+
"requiredToPublish": {
|
|
2220
|
+
"type": "boolean",
|
|
2221
|
+
"description": "Every item of an entry in review or published needs a value. Absent: false."
|
|
2222
|
+
}
|
|
2223
|
+
}
|
|
2224
|
+
},
|
|
2225
|
+
{
|
|
2226
|
+
"title": "ImageSubField",
|
|
2227
|
+
"type": "object",
|
|
2228
|
+
"additionalProperties": false,
|
|
2229
|
+
"required": [
|
|
2230
|
+
"key",
|
|
2231
|
+
"type",
|
|
2232
|
+
"labels"
|
|
2233
|
+
],
|
|
2234
|
+
"properties": {
|
|
2235
|
+
"key": {
|
|
2236
|
+
"$ref": "#/$defs/FieldKey"
|
|
2237
|
+
},
|
|
2238
|
+
"type": {
|
|
2239
|
+
"type": "string",
|
|
2240
|
+
"enum": [
|
|
2241
|
+
"image"
|
|
2242
|
+
]
|
|
2243
|
+
},
|
|
2244
|
+
"labels": {
|
|
2245
|
+
"$ref": "#/$defs/FieldLabels"
|
|
2246
|
+
},
|
|
2247
|
+
"requiredToPublish": {
|
|
2248
|
+
"type": "boolean",
|
|
2249
|
+
"description": "Every item of an entry in review or published needs a value. Absent: false."
|
|
2250
|
+
}
|
|
2251
|
+
}
|
|
2252
|
+
},
|
|
2253
|
+
{
|
|
2254
|
+
"title": "SelectSubField",
|
|
2255
|
+
"type": "object",
|
|
2256
|
+
"additionalProperties": false,
|
|
2257
|
+
"required": [
|
|
2258
|
+
"key",
|
|
2259
|
+
"type",
|
|
2260
|
+
"labels",
|
|
2261
|
+
"options"
|
|
2262
|
+
],
|
|
2263
|
+
"properties": {
|
|
2264
|
+
"key": {
|
|
2265
|
+
"$ref": "#/$defs/FieldKey"
|
|
2266
|
+
},
|
|
2267
|
+
"type": {
|
|
2268
|
+
"type": "string",
|
|
2269
|
+
"enum": [
|
|
2270
|
+
"select"
|
|
2271
|
+
]
|
|
2272
|
+
},
|
|
2273
|
+
"labels": {
|
|
2274
|
+
"$ref": "#/$defs/FieldLabels"
|
|
2275
|
+
},
|
|
2276
|
+
"requiredToPublish": {
|
|
2277
|
+
"type": "boolean",
|
|
2278
|
+
"description": "Every item of an entry in review or published needs a value. Absent: false."
|
|
2279
|
+
},
|
|
2280
|
+
"options": {
|
|
2281
|
+
"type": "array",
|
|
2282
|
+
"minItems": 1,
|
|
2283
|
+
"maxItems": 50,
|
|
2284
|
+
"items": {
|
|
2285
|
+
"$ref": "#/$defs/FieldOption"
|
|
2286
|
+
}
|
|
2287
|
+
}
|
|
2288
|
+
}
|
|
2289
|
+
},
|
|
2290
|
+
{
|
|
2291
|
+
"title": "ReferenceSubField",
|
|
2292
|
+
"type": "object",
|
|
2293
|
+
"additionalProperties": false,
|
|
2294
|
+
"required": [
|
|
2295
|
+
"key",
|
|
2296
|
+
"type",
|
|
2297
|
+
"labels",
|
|
2298
|
+
"collections"
|
|
2299
|
+
],
|
|
2300
|
+
"properties": {
|
|
2301
|
+
"key": {
|
|
2302
|
+
"$ref": "#/$defs/FieldKey"
|
|
2303
|
+
},
|
|
2304
|
+
"type": {
|
|
2305
|
+
"type": "string",
|
|
2306
|
+
"enum": [
|
|
2307
|
+
"reference"
|
|
2308
|
+
]
|
|
2309
|
+
},
|
|
2310
|
+
"labels": {
|
|
2311
|
+
"$ref": "#/$defs/FieldLabels"
|
|
2312
|
+
},
|
|
2313
|
+
"requiredToPublish": {
|
|
2314
|
+
"type": "boolean",
|
|
2315
|
+
"description": "Every item of an entry in review or published needs a value. Absent: false."
|
|
2316
|
+
},
|
|
2317
|
+
"collections": {
|
|
2318
|
+
"type": "array",
|
|
2319
|
+
"description": "The collections a target may belong to (checked in code).",
|
|
2320
|
+
"minItems": 1,
|
|
2321
|
+
"maxItems": 5,
|
|
2322
|
+
"uniqueItems": true,
|
|
2323
|
+
"items": {
|
|
2324
|
+
"$ref": "#/$defs/Slug"
|
|
2325
|
+
}
|
|
2326
|
+
}
|
|
2327
|
+
}
|
|
2328
|
+
}
|
|
2329
|
+
]
|
|
2330
|
+
},
|
|
1908
2331
|
"SurfaceComponent": {
|
|
1909
2332
|
"type": "object",
|
|
1910
2333
|
"description": "One element of a generative UI surface (RFC-0020 §1), in a flat list: `component` names a catalog entry (a PascalCase built-in primitive such as `Stack`, or a registry block type such as `callout`), `children` refer to other ids of the same surface, and `props` follow the entry's schema, which the store checks. Field names follow A2UI v0.9.",
|
|
@@ -3381,7 +3804,7 @@ export const ContentEntrySchema = {
|
|
|
3381
3804
|
},
|
|
3382
3805
|
"fields": {
|
|
3383
3806
|
"type": "object",
|
|
3384
|
-
"description": "Collection-specific values, keyed by field. A collection with typed fields (RFC-0041, Site.collections.<key>.fields) checks each value against its definition on write; otherwise any JSON. An absent key means no value.",
|
|
3807
|
+
"description": "Collection-specific values, keyed by field. A collection with typed fields (RFC-0041, Site.collections.<key>.fields) checks each value against its definition on write; otherwise any JSON. An absent key means no value. A reference value is a translation group id or a list of them, a repeater value a list of flat objects (RFC-0045).",
|
|
3385
3808
|
"additionalProperties": true
|
|
3386
3809
|
},
|
|
3387
3810
|
"tags": {
|