@asterdoc/schemas 0.0.0-stage → 0.10.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/LICENSE +25 -0
- package/README.md +76 -2
- package/dist/index.d.ts +3040 -0
- package/dist/index.js +2096 -0
- package/package.json +82 -3
- package/schemas/2026-10-28/address.json +53 -0
- package/schemas/2026-10-28/attachment.json +31 -0
- package/schemas/2026-10-28/bbox.json +22 -0
- package/schemas/2026-10-28/bundle-content-item.json +122 -0
- package/schemas/2026-10-28/bundle.json +267 -0
- package/schemas/2026-10-28/checklist-item.json +113 -0
- package/schemas/2026-10-28/checklist.json +300 -0
- package/schemas/2026-10-28/cond-expr.json +18 -0
- package/schemas/2026-10-28/content-ref.json +76 -0
- package/schemas/2026-10-28/coordinate.json +26 -0
- package/schemas/2026-10-28/defs-section.json +862 -0
- package/schemas/2026-10-28/document.json +292 -0
- package/schemas/2026-10-28/duration.json +8 -0
- package/schemas/2026-10-28/fieldset-field.json +49 -0
- package/schemas/2026-10-28/form-annex.json +33 -0
- package/schemas/2026-10-28/form-field.json +1037 -0
- package/schemas/2026-10-28/form-party.json +150 -0
- package/schemas/2026-10-28/form.json +369 -0
- package/schemas/2026-10-28/identification.json +44 -0
- package/schemas/2026-10-28/layer.json +556 -0
- package/schemas/2026-10-28/list-field.json +51 -0
- package/schemas/2026-10-28/metadata.json +35 -0
- package/schemas/2026-10-28/money.json +25 -0
- package/schemas/2026-10-28/organization.json +49 -0
- package/schemas/2026-10-28/person.json +49 -0
- package/schemas/2026-10-28/phone.json +32 -0
- package/schemas/2026-10-28/rule-severity.json +11 -0
- package/schemas/2026-10-28/rules-section.json +46 -0
- package/schemas/2026-10-28/signature.json +68 -0
- package/schemas/2026-10-28/validation-rule.json +34 -0
- package/schemas/2026-10-28.json +4636 -0
- package/schemas/config.json +174 -0
- package/schemas/lock.json +151 -0
- package/schemas/manifest.json +184 -0
- package/schemas/registry-item.json +488 -0
- package/schemas/registry.json +281 -0
- package/schemas/schema.json +4636 -0
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.asterdoc.com/registry.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"$schema": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"format": "uri",
|
|
9
|
+
"description": "JSON Schema URI for validation"
|
|
10
|
+
},
|
|
11
|
+
"name": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"minLength": 1,
|
|
14
|
+
"maxLength": 100,
|
|
15
|
+
"pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?$",
|
|
16
|
+
"description": "Registry name/identifier (lowercase slug, used for data attributes and metadata)"
|
|
17
|
+
},
|
|
18
|
+
"homepage": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"format": "uri",
|
|
21
|
+
"description": "Homepage URL for the registry"
|
|
22
|
+
},
|
|
23
|
+
"description": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"maxLength": 2000,
|
|
26
|
+
"description": "Description of the registry"
|
|
27
|
+
},
|
|
28
|
+
"enableTelemetry": {
|
|
29
|
+
"default": true,
|
|
30
|
+
"description": "Enable anonymous usage telemetry for artifact installs. Defaults to true.",
|
|
31
|
+
"type": "boolean"
|
|
32
|
+
},
|
|
33
|
+
"enableDirectory": {
|
|
34
|
+
"default": true,
|
|
35
|
+
"description": "Allow this registry to appear in the Asterdoc Hub directory. Defaults to true.",
|
|
36
|
+
"type": "boolean"
|
|
37
|
+
},
|
|
38
|
+
"items": {
|
|
39
|
+
"type": "array",
|
|
40
|
+
"items": {
|
|
41
|
+
"$ref": "#/$defs/RegistryItemSummary"
|
|
42
|
+
},
|
|
43
|
+
"description": "Every artifact in the registry, one item for each artifact name. No two items have the same name, and no two versions in the manifest have the same path."
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"required": [
|
|
47
|
+
"name",
|
|
48
|
+
"items"
|
|
49
|
+
],
|
|
50
|
+
"additionalProperties": false,
|
|
51
|
+
"title": "Asterdoc Registry Manifest",
|
|
52
|
+
"description": "Schema for registry.json, the manifest of a file registry. It lists every artifact the registry serves, with every edition and version of each. Every path is relative to the registry base address: the address of the folder that holds registry.json.",
|
|
53
|
+
"$defs": {
|
|
54
|
+
"RegistryItemSummary": {
|
|
55
|
+
"type": "object",
|
|
56
|
+
"properties": {
|
|
57
|
+
"name": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"minLength": 1,
|
|
60
|
+
"maxLength": 128,
|
|
61
|
+
"pattern": "^[a-z0-9](?:[a-z0-9]|-[a-z0-9])*$",
|
|
62
|
+
"description": "Artifact name, unique within the registry. Lowercase letters and digits with single hyphens. It is the name segment of a reference such as @acme/w-9, and every edition and version of the artifact shares it."
|
|
63
|
+
},
|
|
64
|
+
"kind": {
|
|
65
|
+
"anyOf": [
|
|
66
|
+
{
|
|
67
|
+
"type": "string",
|
|
68
|
+
"const": "form"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"type": "string",
|
|
72
|
+
"const": "document"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"type": "string",
|
|
76
|
+
"const": "checklist"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"type": "string",
|
|
80
|
+
"const": "bundle"
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"description": "Artifact kind"
|
|
84
|
+
},
|
|
85
|
+
"title": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"minLength": 1,
|
|
88
|
+
"maxLength": 200,
|
|
89
|
+
"description": "Human-readable title"
|
|
90
|
+
},
|
|
91
|
+
"description": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"maxLength": 2000,
|
|
94
|
+
"description": "Brief description of the artifact"
|
|
95
|
+
},
|
|
96
|
+
"currentEdition": {
|
|
97
|
+
"type": "string",
|
|
98
|
+
"minLength": 1,
|
|
99
|
+
"maxLength": 64,
|
|
100
|
+
"pattern": "^(?!(?:current|latest|editions|tags|diff)$)[a-z0-9]([a-z0-9]|-[a-z0-9])*$",
|
|
101
|
+
"description": "The edition to use when a request names none. It is the publisher's statement and must be a key of editions. It is not the newest edition by date: a publisher may list an edition that takes effect in the future. A reader uses this value and never compares dates. Present only with editions."
|
|
102
|
+
},
|
|
103
|
+
"editions": {
|
|
104
|
+
"type": "object",
|
|
105
|
+
"propertyNames": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"minLength": 1,
|
|
108
|
+
"maxLength": 64,
|
|
109
|
+
"pattern": "^(?!(?:current|latest|editions|tags|diff)$)[a-z0-9]([a-z0-9]|-[a-z0-9])*$"
|
|
110
|
+
},
|
|
111
|
+
"additionalProperties": {
|
|
112
|
+
"$ref": "#/$defs/RegistryEditionEntry"
|
|
113
|
+
},
|
|
114
|
+
"title": "RegistryEditions",
|
|
115
|
+
"description": "The issuer's editions of this artifact, keyed by edition key. Present only on an artifact that is issued in editions; then latestVersion and versions are inside each edition and absent on the item.",
|
|
116
|
+
"minProperties": 1
|
|
117
|
+
},
|
|
118
|
+
"latestVersion": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"maxLength": 200,
|
|
121
|
+
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?$",
|
|
122
|
+
"description": "The version to use when a request names none. It is the publisher's statement and must be a key of versions. It is normally the highest stable version; a pre-release is the default only when the publisher points at it. A reader uses this value and never compares version numbers. Present only with versions, on an artifact that has no editions."
|
|
123
|
+
},
|
|
124
|
+
"versions": {
|
|
125
|
+
"type": "object",
|
|
126
|
+
"propertyNames": {
|
|
127
|
+
"type": "string",
|
|
128
|
+
"maxLength": 200,
|
|
129
|
+
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?$"
|
|
130
|
+
},
|
|
131
|
+
"additionalProperties": {
|
|
132
|
+
"$ref": "#/$defs/RegistryVersionEntry"
|
|
133
|
+
},
|
|
134
|
+
"title": "RegistryVersions",
|
|
135
|
+
"description": "The versions of an artifact that has no editions, keyed by version. Present only when editions is absent.",
|
|
136
|
+
"minProperties": 1
|
|
137
|
+
},
|
|
138
|
+
"layers": {
|
|
139
|
+
"type": "array",
|
|
140
|
+
"items": {
|
|
141
|
+
"type": "string",
|
|
142
|
+
"description": "Layer key"
|
|
143
|
+
},
|
|
144
|
+
"description": "Available layer keys"
|
|
145
|
+
},
|
|
146
|
+
"tags": {
|
|
147
|
+
"type": "array",
|
|
148
|
+
"items": {
|
|
149
|
+
"type": "string",
|
|
150
|
+
"minLength": 1,
|
|
151
|
+
"maxLength": 50,
|
|
152
|
+
"description": "Tag for categorization"
|
|
153
|
+
},
|
|
154
|
+
"description": "Tags for search and filtering"
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"required": [
|
|
158
|
+
"name",
|
|
159
|
+
"kind"
|
|
160
|
+
],
|
|
161
|
+
"additionalProperties": false,
|
|
162
|
+
"title": "RegistryItemSummary",
|
|
163
|
+
"description": "One artifact in the registry, with every release of it. An artifact that is issued in editions has currentEdition and editions; an artifact that is not has latestVersion and versions. Never both, and never neither.",
|
|
164
|
+
"oneOf": [
|
|
165
|
+
{
|
|
166
|
+
"required": [
|
|
167
|
+
"currentEdition",
|
|
168
|
+
"editions"
|
|
169
|
+
],
|
|
170
|
+
"not": {
|
|
171
|
+
"anyOf": [
|
|
172
|
+
{
|
|
173
|
+
"required": [
|
|
174
|
+
"latestVersion"
|
|
175
|
+
]
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"required": [
|
|
179
|
+
"versions"
|
|
180
|
+
]
|
|
181
|
+
}
|
|
182
|
+
]
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"required": [
|
|
187
|
+
"latestVersion",
|
|
188
|
+
"versions"
|
|
189
|
+
],
|
|
190
|
+
"not": {
|
|
191
|
+
"anyOf": [
|
|
192
|
+
{
|
|
193
|
+
"required": [
|
|
194
|
+
"currentEdition"
|
|
195
|
+
]
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"required": [
|
|
199
|
+
"editions"
|
|
200
|
+
]
|
|
201
|
+
}
|
|
202
|
+
]
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
]
|
|
206
|
+
},
|
|
207
|
+
"RegistryEditionEntry": {
|
|
208
|
+
"type": "object",
|
|
209
|
+
"properties": {
|
|
210
|
+
"label": {
|
|
211
|
+
"type": "string",
|
|
212
|
+
"minLength": 1,
|
|
213
|
+
"maxLength": 200,
|
|
214
|
+
"description": "The issuer's edition text exactly as printed, such as \"Rev. March 2024\". For display only."
|
|
215
|
+
},
|
|
216
|
+
"date": {
|
|
217
|
+
"type": "string",
|
|
218
|
+
"pattern": "^(?:\\d{4}(?:-(?:0[1-9]|1[0-2]))?|(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8]))))$",
|
|
219
|
+
"description": "When the issuer released the edition, at the precision the issuer gives: YYYY, YYYY-MM or YYYY-MM-DD."
|
|
220
|
+
},
|
|
221
|
+
"effectiveFrom": {
|
|
222
|
+
"type": "string",
|
|
223
|
+
"format": "date",
|
|
224
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$",
|
|
225
|
+
"description": "The date the edition takes effect. Only when the issuer prints one."
|
|
226
|
+
},
|
|
227
|
+
"latestVersion": {
|
|
228
|
+
"type": "string",
|
|
229
|
+
"maxLength": 200,
|
|
230
|
+
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?$",
|
|
231
|
+
"description": "The version to use when a request names none. It is the publisher's statement and must be a key of versions. It is normally the highest stable version; a pre-release is the default only when the publisher points at it. A reader uses this value and never compares version numbers."
|
|
232
|
+
},
|
|
233
|
+
"versions": {
|
|
234
|
+
"type": "object",
|
|
235
|
+
"propertyNames": {
|
|
236
|
+
"type": "string",
|
|
237
|
+
"maxLength": 200,
|
|
238
|
+
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?$"
|
|
239
|
+
},
|
|
240
|
+
"additionalProperties": {
|
|
241
|
+
"$ref": "#/$defs/RegistryVersionEntry"
|
|
242
|
+
},
|
|
243
|
+
"title": "RegistryVersions",
|
|
244
|
+
"description": "Versions keyed by version. Each key is a SemVer 2.0.0 version with no build metadata, such as 1.2.0 or 1.3.0-beta.1, and never latest or current. At least one version. The order of the keys has no meaning.",
|
|
245
|
+
"minProperties": 1
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
"required": [
|
|
249
|
+
"label",
|
|
250
|
+
"latestVersion",
|
|
251
|
+
"versions"
|
|
252
|
+
],
|
|
253
|
+
"additionalProperties": false,
|
|
254
|
+
"title": "RegistryEditionEntry",
|
|
255
|
+
"description": "One edition of an issued artifact, as printed by its issuer, and the publisher's versions of it. The edition key is the key of this entry."
|
|
256
|
+
},
|
|
257
|
+
"RegistryVersionEntry": {
|
|
258
|
+
"type": "object",
|
|
259
|
+
"properties": {
|
|
260
|
+
"path": {
|
|
261
|
+
"type": "string",
|
|
262
|
+
"maxLength": 500,
|
|
263
|
+
"pattern": "^(?:(?!\\.{1,2}\\/)[A-Za-z0-9._-]+\\/)*[A-Za-z0-9._-]+\\.(?:json|yaml|yml)$",
|
|
264
|
+
"description": "Path to the artifact file, relative to the registry base address (the address of the folder that holds registry.json), such as w-9/2024-03/1.0.0/w-9.json. Forward slashes only, no leading slash, no . or .. segment, ending in .json, .yaml or .yml. No two versions in one manifest have the same path."
|
|
265
|
+
},
|
|
266
|
+
"sha256": {
|
|
267
|
+
"type": "string",
|
|
268
|
+
"pattern": "^[a-f0-9]{64}$",
|
|
269
|
+
"description": "SHA-256 digest of the bytes of the artifact file at path, as 64 lowercase hex digits. A reader refuses a file whose digest is different."
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
"required": [
|
|
273
|
+
"path",
|
|
274
|
+
"sha256"
|
|
275
|
+
],
|
|
276
|
+
"additionalProperties": false,
|
|
277
|
+
"title": "RegistryVersionEntry",
|
|
278
|
+
"description": "One version of an artifact in a registry: the path of its file and the checksum of that file. The version itself is the key of this entry."
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|