@rathnasgala2/schemas 3.31.0 → 3.32.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.
Files changed (45) hide show
  1. package/THIRD_PARTY_LICENSES.json +1 -1
  2. package/diagnostics/diagnostic-map.json +119 -0
  3. package/docs/catalogs/schema-inventory.json +7 -7
  4. package/examples/valid/build-input/rules.json +126 -0
  5. package/examples/valid/interactions-config/rules.json +10 -0
  6. package/examples/valid/publication/rules.json +86 -0
  7. package/fixtures/boundary/build-input/rules.json +176 -0
  8. package/fixtures/boundary/interactions-config/rules.json +10 -0
  9. package/fixtures/boundary/publication/rules.json +132 -0
  10. package/fixtures/invalid/build-input/GRAPHEME_LENGTH_INVALID/cases.json +33 -0
  11. package/fixtures/invalid/build-input/REQUEST_FIELD_UNKNOWN/cases.json +30 -0
  12. package/fixtures/invalid/build-input/SCHEMA_ARRAY_DUPLICATE/cases.json +11 -0
  13. package/fixtures/invalid/build-input/SCHEMA_ARRAY_TOO_LONG/cases.json +15 -0
  14. package/fixtures/invalid/build-input/SCHEMA_ENUM_INVALID/cases.json +11 -0
  15. package/fixtures/invalid/build-input/SCHEMA_NUMBER_TOO_LARGE/cases.json +11 -0
  16. package/fixtures/invalid/build-input/SCHEMA_PATTERN_INVALID/cases.json +22 -0
  17. package/fixtures/invalid/build-input/SCHEMA_REQUIRED_FIELD_MISSING/cases.json +51 -0
  18. package/fixtures/invalid/build-input/SCHEMA_TYPE_INVALID/cases.json +53 -0
  19. package/fixtures/invalid/interactions-config/SCHEMA_TYPE_INVALID/cases.json +11 -0
  20. package/fixtures/invalid/publication/GRAPHEME_LENGTH_INVALID/cases.json +33 -0
  21. package/fixtures/invalid/publication/REQUEST_FIELD_UNKNOWN/cases.json +30 -0
  22. package/fixtures/invalid/publication/SCHEMA_ARRAY_DUPLICATE/cases.json +9 -0
  23. package/fixtures/invalid/publication/SCHEMA_ARRAY_TOO_LONG/cases.json +13 -0
  24. package/fixtures/invalid/publication/SCHEMA_PATTERN_INVALID/cases.json +22 -0
  25. package/fixtures/invalid/publication/SCHEMA_REQUIRED_FIELD_MISSING/cases.json +40 -0
  26. package/fixtures/invalid/publication/SCHEMA_TYPE_INVALID/cases.json +40 -0
  27. package/fixtures/manifest.json +943 -8
  28. package/fixtures/unknown-field/build-input/rules.json +50 -0
  29. package/fixtures/unknown-field/interactions-config/rules.json +1 -0
  30. package/fixtures/unknown-field/publication/rules.json +46 -0
  31. package/generated/browser/validator-core.mjs +3 -3
  32. package/generated/typescript/contracts/artifact-manifest.d.ts +4 -2
  33. package/generated/typescript/contracts/build-input.d.ts +16 -1
  34. package/generated/typescript/contracts/build-provenance.d.ts +4 -2
  35. package/generated/typescript/contracts/interactions-config.d.ts +1 -0
  36. package/generated/typescript/contracts/publication.d.ts +13 -0
  37. package/openapi/http-catalog.json +80 -2
  38. package/openapi/openapi.yaml +1753 -250
  39. package/package.json +1 -1
  40. package/sbom.cdx.json +23 -23
  41. package/schemas/artifact-manifest.schema.json +4 -2
  42. package/schemas/build-input.schema.json +64 -3
  43. package/schemas/build-provenance.schema.json +4 -2
  44. package/schemas/interactions-config.schema.json +6 -1
  45. package/schemas/publication.schema.json +48 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rathnasgala2/schemas",
3
- "version": "3.31.0",
3
+ "version": "3.32.1",
4
4
  "description": "Executable JSON Schema and OpenAPI contracts for Galascribe",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
package/sbom.cdx.json CHANGED
@@ -97,8 +97,8 @@
97
97
  "type": "library",
98
98
  "name": "schemas",
99
99
  "group": "@rathnasgala2",
100
- "version": "3.31.0",
101
- "bom-ref": "@rathnasgala2/schemas@3.31.0",
100
+ "version": "3.32.1",
101
+ "bom-ref": "@rathnasgala2/schemas@3.32.1",
102
102
  "description": "Executable JSON Schema and OpenAPI contracts for Galascribe",
103
103
  "licenses": [
104
104
  {
@@ -108,7 +108,7 @@
108
108
  }
109
109
  }
110
110
  ],
111
- "purl": "pkg:npm/%40rathnasgala2/schemas@3.31.0?vcs_url=git%2Bhttps%3A%2F%2Fgithub.com%2Frathnasgala2%2Fschema.git",
111
+ "purl": "pkg:npm/%40rathnasgala2/schemas@3.32.1?vcs_url=git%2Bhttps%3A%2F%2Fgithub.com%2Frathnasgala2%2Fschema.git",
112
112
  "externalReferences": [
113
113
  {
114
114
  "url": "https://github.com/rathnasgala2/schema/issues",
@@ -153,7 +153,7 @@
153
153
  "type": "library",
154
154
  "name": "ajv-formats",
155
155
  "version": "3.0.1",
156
- "bom-ref": "@rathnasgala2/schemas@3.31.0|ajv-formats@3.0.1",
156
+ "bom-ref": "@rathnasgala2/schemas@3.32.1|ajv-formats@3.0.1",
157
157
  "licenses": [
158
158
  {
159
159
  "license": {
@@ -187,7 +187,7 @@
187
187
  "type": "library",
188
188
  "name": "ajv",
189
189
  "version": "8.20.0",
190
- "bom-ref": "@rathnasgala2/schemas@3.31.0|ajv@8.20.0",
190
+ "bom-ref": "@rathnasgala2/schemas@3.32.1|ajv@8.20.0",
191
191
  "licenses": [
192
192
  {
193
193
  "license": {
@@ -221,7 +221,7 @@
221
221
  "type": "library",
222
222
  "name": "fast-deep-equal",
223
223
  "version": "3.1.3",
224
- "bom-ref": "@rathnasgala2/schemas@3.31.0|fast-deep-equal@3.1.3",
224
+ "bom-ref": "@rathnasgala2/schemas@3.32.1|fast-deep-equal@3.1.3",
225
225
  "licenses": [
226
226
  {
227
227
  "license": {
@@ -255,7 +255,7 @@
255
255
  "type": "library",
256
256
  "name": "fast-uri",
257
257
  "version": "3.1.8",
258
- "bom-ref": "@rathnasgala2/schemas@3.31.0|fast-uri@3.1.8",
258
+ "bom-ref": "@rathnasgala2/schemas@3.32.1|fast-uri@3.1.8",
259
259
  "licenses": [
260
260
  {
261
261
  "license": {
@@ -289,7 +289,7 @@
289
289
  "type": "library",
290
290
  "name": "json-schema-traverse",
291
291
  "version": "1.0.0",
292
- "bom-ref": "@rathnasgala2/schemas@3.31.0|json-schema-traverse@1.0.0",
292
+ "bom-ref": "@rathnasgala2/schemas@3.32.1|json-schema-traverse@1.0.0",
293
293
  "licenses": [
294
294
  {
295
295
  "license": {
@@ -323,7 +323,7 @@
323
323
  "type": "library",
324
324
  "name": "require-from-string",
325
325
  "version": "2.0.2",
326
- "bom-ref": "@rathnasgala2/schemas@3.31.0|require-from-string@2.0.2",
326
+ "bom-ref": "@rathnasgala2/schemas@3.32.1|require-from-string@2.0.2",
327
327
  "licenses": [
328
328
  {
329
329
  "license": {
@@ -1064,10 +1064,10 @@
1064
1064
  ],
1065
1065
  "dependencies": [
1066
1066
  {
1067
- "ref": "@rathnasgala2/schemas@3.31.0",
1067
+ "ref": "@rathnasgala2/schemas@3.32.1",
1068
1068
  "dependsOn": [
1069
- "@rathnasgala2/schemas@3.31.0|ajv-formats@3.0.1",
1070
- "@rathnasgala2/schemas@3.31.0|ajv@8.20.0",
1069
+ "@rathnasgala2/schemas@3.32.1|ajv-formats@3.0.1",
1070
+ "@rathnasgala2/schemas@3.32.1|ajv@8.20.0",
1071
1071
  "pkg:npm/semver@7.8.5",
1072
1072
  "urn:gala:source-data:iana-ipv4-special-registry",
1073
1073
  "urn:gala:source-data:iana-ipv6-special-registry",
@@ -1089,31 +1089,31 @@
1089
1089
  ]
1090
1090
  },
1091
1091
  {
1092
- "ref": "@rathnasgala2/schemas@3.31.0|ajv-formats@3.0.1",
1092
+ "ref": "@rathnasgala2/schemas@3.32.1|ajv-formats@3.0.1",
1093
1093
  "dependsOn": [
1094
- "@rathnasgala2/schemas@3.31.0|ajv@8.20.0"
1094
+ "@rathnasgala2/schemas@3.32.1|ajv@8.20.0"
1095
1095
  ]
1096
1096
  },
1097
1097
  {
1098
- "ref": "@rathnasgala2/schemas@3.31.0|ajv@8.20.0",
1098
+ "ref": "@rathnasgala2/schemas@3.32.1|ajv@8.20.0",
1099
1099
  "dependsOn": [
1100
- "@rathnasgala2/schemas@3.31.0|fast-deep-equal@3.1.3",
1101
- "@rathnasgala2/schemas@3.31.0|fast-uri@3.1.8",
1102
- "@rathnasgala2/schemas@3.31.0|json-schema-traverse@1.0.0",
1103
- "@rathnasgala2/schemas@3.31.0|require-from-string@2.0.2"
1100
+ "@rathnasgala2/schemas@3.32.1|fast-deep-equal@3.1.3",
1101
+ "@rathnasgala2/schemas@3.32.1|fast-uri@3.1.8",
1102
+ "@rathnasgala2/schemas@3.32.1|json-schema-traverse@1.0.0",
1103
+ "@rathnasgala2/schemas@3.32.1|require-from-string@2.0.2"
1104
1104
  ]
1105
1105
  },
1106
1106
  {
1107
- "ref": "@rathnasgala2/schemas@3.31.0|fast-deep-equal@3.1.3"
1107
+ "ref": "@rathnasgala2/schemas@3.32.1|fast-deep-equal@3.1.3"
1108
1108
  },
1109
1109
  {
1110
- "ref": "@rathnasgala2/schemas@3.31.0|fast-uri@3.1.8"
1110
+ "ref": "@rathnasgala2/schemas@3.32.1|fast-uri@3.1.8"
1111
1111
  },
1112
1112
  {
1113
- "ref": "@rathnasgala2/schemas@3.31.0|json-schema-traverse@1.0.0"
1113
+ "ref": "@rathnasgala2/schemas@3.32.1|json-schema-traverse@1.0.0"
1114
1114
  },
1115
1115
  {
1116
- "ref": "@rathnasgala2/schemas@3.31.0|require-from-string@2.0.2"
1116
+ "ref": "@rathnasgala2/schemas@3.32.1|require-from-string@2.0.2"
1117
1117
  },
1118
1118
  {
1119
1119
  "ref": "pkg:npm/semver@7.8.5"
@@ -580,7 +580,8 @@
580
580
  "audio/ogg",
581
581
  "audio/wav",
582
582
  "video/mp4",
583
- "video/webm"
583
+ "video/webm",
584
+ "application/pdf"
584
585
  ]
585
586
  },
586
587
  "byteLength": { "$ref": "#/$defs/nonNegativeInt64" },
@@ -621,7 +622,8 @@
621
622
  "audio/ogg",
622
623
  "audio/wav",
623
624
  "video/mp4",
624
- "video/webm"
625
+ "video/webm",
626
+ "application/pdf"
625
627
  ]
626
628
  },
627
629
  "byteLength": { "$ref": "#/$defs/nonNegativeInt64" },
@@ -423,6 +423,25 @@
423
423
  }
424
424
  ]
425
425
  },
426
+ "recommendation": {
427
+ "type": "object",
428
+ "required": ["url", "title"],
429
+ "properties": {
430
+ "url": { "$ref": "#/$defs/urlHttps" },
431
+ "title": { "$ref": "#/$defs/plainLabel" },
432
+ "description": {
433
+ "$ref": "#/$defs/plainText",
434
+ "x-gala-graphemeLength": { "maximum": 300 }
435
+ },
436
+ "addedOn": {
437
+ "type": "string",
438
+ "pattern": "^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12][0-9]|3[01])$",
439
+ "description": "The day the recommendation was added, YYYY-MM-DD (UTC). It feeds the `created_at` and `updated_at` members of the site's `/.well-known/recommendations.json` entry."
440
+ }
441
+ },
442
+ "additionalProperties": false,
443
+ "description": "SCHEMA-3.32.0: one site the author recommends to readers."
444
+ },
426
445
  "localizedAuthor": {
427
446
  "type": "object",
428
447
  "required": ["language", "displayName", "biography"],
@@ -479,6 +498,14 @@
479
498
  "minItems": 0,
480
499
  "maxItems": 32
481
500
  },
501
+ "recommendations": {
502
+ "type": "array",
503
+ "items": { "$ref": "#/$defs/recommendation" },
504
+ "minItems": 0,
505
+ "maxItems": 24,
506
+ "uniqueItems": true,
507
+ "description": "SCHEMA-3.32.0: the sites the author recommends, shown to readers after they subscribe and published as `/.well-known/recommendations.json`. At most 24; `url` is unique within the array. JSON Schema cannot express uniqueness by one member, so consumers enforce it. An absent member means no recommendations."
508
+ },
482
509
  "defaultImage": { "$ref": "#/$defs/resolvedFile" },
483
510
  "profile": {
484
511
  "type": "object",
@@ -564,6 +591,27 @@
564
591
  "replyToOwner": {
565
592
  "type": "boolean",
566
593
  "description": "When true, subscribers' replies go to the site owner's contact email; when false the emails carry no Reply-To."
594
+ },
595
+ "welcome": {
596
+ "type": "object",
597
+ "required": ["subject", "body"],
598
+ "properties": {
599
+ "subject": {
600
+ "$ref": "#/$defs/plainText",
601
+ "x-gala-graphemeLength": { "minimum": 1, "maximum": 120 },
602
+ "pattern": "^[^\\r\\n\\u2028\\u2029]+$"
603
+ },
604
+ "body": {
605
+ "$ref": "#/$defs/plainText",
606
+ "x-gala-graphemeLength": { "minimum": 1, "maximum": 2000 }
607
+ }
608
+ },
609
+ "additionalProperties": false,
610
+ "description": "SCHEMA-3.32.0: the welcome email mailed once to a new subscriber after they confirm. `subject` is one line (no line break) of 1 to 120 graphemes; `body` is plain text of 1 to 2000 graphemes. An absent `welcome` member means no welcome email."
611
+ },
612
+ "afterSignupUrl": {
613
+ "$ref": "#/$defs/urlHttps",
614
+ "description": "SCHEMA-3.32.0: where the subscriber is sent after they confirm. It must be an https URL; the API applies its own open-redirect rules. An absent member shows the Galascribe confirmation page."
567
615
  }
568
616
  },
569
617
  "additionalProperties": false,
@@ -1164,7 +1212,8 @@
1164
1212
  "audio/ogg",
1165
1213
  "audio/wav",
1166
1214
  "video/mp4",
1167
- "video/webm"
1215
+ "video/webm",
1216
+ "application/pdf"
1168
1217
  ]
1169
1218
  },
1170
1219
  "byteLength": { "type": "integer", "minimum": 1 }
@@ -1207,9 +1256,16 @@
1207
1256
  "required": ["mediaType"]
1208
1257
  },
1209
1258
  "then": { "properties": { "byteLength": { "maximum": 52428800 } } }
1259
+ },
1260
+ {
1261
+ "if": {
1262
+ "properties": { "mediaType": { "enum": ["application/pdf"] } },
1263
+ "required": ["mediaType"]
1264
+ },
1265
+ "then": { "properties": { "byteLength": { "maximum": 10485760 } } }
1210
1266
  }
1211
1267
  ],
1212
- "$comment": "Per-mediaType byteLength bound: image 5 MiB, audio 20 MiB, video 50 MiB, matching the OpenAPI contract’s declared per-file media limits."
1268
+ "$comment": "Per-mediaType byteLength bound: image 5 MiB, audio 20 MiB, video 50 MiB, PDF file download 10 MiB, matching the OpenAPI contract’s declared per-file media limits."
1213
1269
  },
1214
1270
  "contentBuildRecord": {
1215
1271
  "type": "object",
@@ -1303,7 +1359,12 @@
1303
1359
  "properties": {
1304
1360
  "enabled": { "type": "boolean" },
1305
1361
  "allowReplies": { "type": "boolean" },
1306
- "maxDepth": { "type": "integer", "minimum": 1, "maximum": 4 }
1362
+ "maxDepth": { "type": "integer", "minimum": 1, "maximum": 4 },
1363
+ "likes": {
1364
+ "type": "boolean",
1365
+ "default": false,
1366
+ "description": "SCHEMA-3.32.0: when true, signed-in readers can like a comment. An absent member means false, so every 3.31 configuration still validates."
1367
+ }
1307
1368
  },
1308
1369
  "additionalProperties": false
1309
1370
  },
@@ -620,7 +620,8 @@
620
620
  "audio/ogg",
621
621
  "audio/wav",
622
622
  "video/mp4",
623
- "video/webm"
623
+ "video/webm",
624
+ "application/pdf"
624
625
  ]
625
626
  },
626
627
  "byteLength": { "$ref": "#/$defs/nonNegativeInt64" },
@@ -661,7 +662,8 @@
661
662
  "audio/ogg",
662
663
  "audio/wav",
663
664
  "video/mp4",
664
- "video/webm"
665
+ "video/webm",
666
+ "application/pdf"
665
667
  ]
666
668
  },
667
669
  "byteLength": { "$ref": "#/$defs/nonNegativeInt64" },
@@ -33,7 +33,12 @@
33
33
  "properties": {
34
34
  "enabled": { "type": "boolean" },
35
35
  "allowReplies": { "type": "boolean" },
36
- "maxDepth": { "type": "integer", "minimum": 1, "maximum": 4 }
36
+ "maxDepth": { "type": "integer", "minimum": 1, "maximum": 4 },
37
+ "likes": {
38
+ "type": "boolean",
39
+ "default": false,
40
+ "description": "SCHEMA-3.32.0: when true, signed-in readers can like a comment. An absent member means false, so every 3.31 configuration still validates."
41
+ }
37
42
  },
38
43
  "additionalProperties": false
39
44
  },
@@ -44,6 +44,14 @@
44
44
  "minItems": 0,
45
45
  "maxItems": 32
46
46
  },
47
+ "recommendations": {
48
+ "type": "array",
49
+ "items": { "$ref": "#/$defs/recommendation" },
50
+ "minItems": 0,
51
+ "maxItems": 24,
52
+ "uniqueItems": true,
53
+ "description": "SCHEMA-3.32.0: the sites the author recommends, shown to readers after they subscribe and published as `/.well-known/recommendations.json`. At most 24; `url` is unique within the array. JSON Schema cannot express uniqueness by one member, so consumers enforce it. An absent member means no recommendations."
54
+ },
47
55
  "defaultImageRef": { "$ref": "#/$defs/repoRelativePath" },
48
56
  "profile": { "$ref": "#/$defs/publicationProfile" },
49
57
  "policies": { "$ref": "#/$defs/publicationPolicies" },
@@ -218,6 +226,25 @@
218
226
  }
219
227
  ]
220
228
  },
229
+ "recommendation": {
230
+ "type": "object",
231
+ "required": ["url", "title"],
232
+ "properties": {
233
+ "url": { "$ref": "#/$defs/urlHttps" },
234
+ "title": { "$ref": "#/$defs/plainLabel" },
235
+ "description": {
236
+ "$ref": "#/$defs/plainText",
237
+ "x-gala-graphemeLength": { "maximum": 300 }
238
+ },
239
+ "addedOn": {
240
+ "type": "string",
241
+ "pattern": "^[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12][0-9]|3[01])$",
242
+ "description": "The day the recommendation was added, YYYY-MM-DD (UTC). It feeds the `created_at` and `updated_at` members of the site's `/.well-known/recommendations.json` entry."
243
+ }
244
+ },
245
+ "additionalProperties": false,
246
+ "description": "SCHEMA-3.32.0: one site the author recommends to readers."
247
+ },
221
248
  "publicationProfile": {
222
249
  "type": "object",
223
250
  "required": ["route", "body"],
@@ -302,6 +329,27 @@
302
329
  "replyToOwner": {
303
330
  "type": "boolean",
304
331
  "description": "When true, subscribers' replies go to the site owner's contact email; when false the emails carry no Reply-To."
332
+ },
333
+ "welcome": {
334
+ "type": "object",
335
+ "required": ["subject", "body"],
336
+ "properties": {
337
+ "subject": {
338
+ "$ref": "#/$defs/plainText",
339
+ "x-gala-graphemeLength": { "minimum": 1, "maximum": 120 },
340
+ "pattern": "^[^\\r\\n\\u2028\\u2029]+$"
341
+ },
342
+ "body": {
343
+ "$ref": "#/$defs/plainText",
344
+ "x-gala-graphemeLength": { "minimum": 1, "maximum": 2000 }
345
+ }
346
+ },
347
+ "additionalProperties": false,
348
+ "description": "SCHEMA-3.32.0: the welcome email mailed once to a new subscriber after they confirm. `subject` is one line (no line break) of 1 to 120 graphemes; `body` is plain text of 1 to 2000 graphemes. An absent `welcome` member means no welcome email."
349
+ },
350
+ "afterSignupUrl": {
351
+ "$ref": "#/$defs/urlHttps",
352
+ "description": "SCHEMA-3.32.0: where the subscriber is sent after they confirm. It must be an https URL; the API applies its own open-redirect rules. An absent member shows the Galascribe confirmation page."
305
353
  }
306
354
  },
307
355
  "additionalProperties": false,