@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,150 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.asterdoc.com/2026-10-28/form-party.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"label": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"minLength": 1,
|
|
9
|
+
"maxLength": 100,
|
|
10
|
+
"description": "Display name for this role"
|
|
11
|
+
},
|
|
12
|
+
"description": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"maxLength": 500,
|
|
15
|
+
"description": "Description of this role"
|
|
16
|
+
},
|
|
17
|
+
"partyType": {
|
|
18
|
+
"anyOf": [
|
|
19
|
+
{
|
|
20
|
+
"type": "string",
|
|
21
|
+
"const": "person"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"type": "string",
|
|
25
|
+
"const": "organization"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"type": "string",
|
|
29
|
+
"const": "any"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"description": "Constraint on party type (default: any)"
|
|
33
|
+
},
|
|
34
|
+
"min": {
|
|
35
|
+
"type": "integer",
|
|
36
|
+
"minimum": 0,
|
|
37
|
+
"maximum": 9007199254740991,
|
|
38
|
+
"description": "Minimum parties required (default: 1)"
|
|
39
|
+
},
|
|
40
|
+
"max": {
|
|
41
|
+
"type": "integer",
|
|
42
|
+
"minimum": 1,
|
|
43
|
+
"maximum": 9007199254740991,
|
|
44
|
+
"description": "Maximum parties allowed (default: 1)"
|
|
45
|
+
},
|
|
46
|
+
"required": {
|
|
47
|
+
"$ref": "https://schema.asterdoc.com/2026-10-28.json#/$defs/CondExpr"
|
|
48
|
+
},
|
|
49
|
+
"signature": {
|
|
50
|
+
"type": "object",
|
|
51
|
+
"properties": {
|
|
52
|
+
"required": {
|
|
53
|
+
"type": "boolean",
|
|
54
|
+
"description": "Whether signature is required for this role (default: false)"
|
|
55
|
+
},
|
|
56
|
+
"witnesses": {
|
|
57
|
+
"type": "integer",
|
|
58
|
+
"minimum": 0,
|
|
59
|
+
"maximum": 9007199254740991,
|
|
60
|
+
"description": "Number of caller-declared witness attestations required for this signature (default: 0)"
|
|
61
|
+
},
|
|
62
|
+
"notarized": {
|
|
63
|
+
"type": "boolean",
|
|
64
|
+
"description": "Whether at least one caller-declared attesting witness must have notary status (default: false)"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"additionalProperties": false,
|
|
68
|
+
"title": "FormSignature",
|
|
69
|
+
"description": "Design-time signature requirements for a party role"
|
|
70
|
+
},
|
|
71
|
+
"payment": {
|
|
72
|
+
"type": "object",
|
|
73
|
+
"properties": {
|
|
74
|
+
"required": {
|
|
75
|
+
"type": "boolean",
|
|
76
|
+
"description": "Whether payment is required for this role (default: false)"
|
|
77
|
+
},
|
|
78
|
+
"amount": {
|
|
79
|
+
"anyOf": [
|
|
80
|
+
{
|
|
81
|
+
"$ref": "https://schema.asterdoc.com/2026-10-28.json#/$defs/Money"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"type": "object",
|
|
85
|
+
"properties": {
|
|
86
|
+
"label": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"minLength": 1,
|
|
89
|
+
"maxLength": 200,
|
|
90
|
+
"description": "Display label for the computed value"
|
|
91
|
+
},
|
|
92
|
+
"description": {
|
|
93
|
+
"type": "string",
|
|
94
|
+
"minLength": 1,
|
|
95
|
+
"maxLength": 1000,
|
|
96
|
+
"description": "Description or documentation of the computed value"
|
|
97
|
+
},
|
|
98
|
+
"type": {
|
|
99
|
+
"type": "string",
|
|
100
|
+
"const": "money"
|
|
101
|
+
},
|
|
102
|
+
"value": {
|
|
103
|
+
"type": "object",
|
|
104
|
+
"properties": {
|
|
105
|
+
"amount": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"minLength": 1,
|
|
108
|
+
"maxLength": 2000,
|
|
109
|
+
"description": "Expression string to evaluate"
|
|
110
|
+
},
|
|
111
|
+
"currency": {
|
|
112
|
+
"type": "string",
|
|
113
|
+
"minLength": 1,
|
|
114
|
+
"maxLength": 2000,
|
|
115
|
+
"description": "Expression string to evaluate"
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"required": [
|
|
119
|
+
"amount",
|
|
120
|
+
"currency"
|
|
121
|
+
],
|
|
122
|
+
"additionalProperties": false,
|
|
123
|
+
"description": "Money object with amount and currency expressions"
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"required": [
|
|
127
|
+
"type",
|
|
128
|
+
"value"
|
|
129
|
+
],
|
|
130
|
+
"additionalProperties": false
|
|
131
|
+
}
|
|
132
|
+
],
|
|
133
|
+
"description": "Amount owed: a fixed Money value, or a MoneyExpression resolved from filled data at request time"
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"required": [
|
|
137
|
+
"amount"
|
|
138
|
+
],
|
|
139
|
+
"additionalProperties": false,
|
|
140
|
+
"title": "FormPayment",
|
|
141
|
+
"description": "Design-time payment requirement for a party role"
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
"required": [
|
|
145
|
+
"label"
|
|
146
|
+
],
|
|
147
|
+
"additionalProperties": false,
|
|
148
|
+
"description": "Design-time party role definition. Defines what roles exist and what constraints apply when filling a form.",
|
|
149
|
+
"title": "FormParty"
|
|
150
|
+
}
|
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.asterdoc.com/2026-10-28/form.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"$schema": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"format": "uri",
|
|
9
|
+
"description": "JSON Schema URI for this artifact instance."
|
|
10
|
+
},
|
|
11
|
+
"name": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"minLength": 1,
|
|
14
|
+
"maxLength": 128,
|
|
15
|
+
"pattern": "^[A-Za-z0-9]([A-Za-z0-9]|-[A-Za-z0-9])*$",
|
|
16
|
+
"description": "Artifact identifier. Must start with a letter or digit, can contain letters, numbers, and hyphens (no leading/trailing/consecutive hyphens). Every edition of one artifact shares the same name."
|
|
17
|
+
},
|
|
18
|
+
"version": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"minLength": 1,
|
|
21
|
+
"maxLength": 200,
|
|
22
|
+
"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-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
|
|
23
|
+
"description": "Artifact version (SemVer 2.0.0, such as 1.2.3 or 1.3.0-beta.1). It counts the publisher's own changes, never the issuer's edition; each edition has its own version line. Required for publishing to registry."
|
|
24
|
+
},
|
|
25
|
+
"title": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"minLength": 1,
|
|
28
|
+
"maxLength": 200,
|
|
29
|
+
"description": "Human-readable title. Recommended for published/shared artifacts and directory browsing."
|
|
30
|
+
},
|
|
31
|
+
"description": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"minLength": 0,
|
|
34
|
+
"maxLength": 2000,
|
|
35
|
+
"description": "Detailed description or context for the artifact."
|
|
36
|
+
},
|
|
37
|
+
"code": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"minLength": 1,
|
|
40
|
+
"maxLength": 200,
|
|
41
|
+
"description": "The form number as printed by its issuer, such as W-9 or ACORD 25, or a self-issued form's own number."
|
|
42
|
+
},
|
|
43
|
+
"issuer": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"minLength": 1,
|
|
46
|
+
"maxLength": 200,
|
|
47
|
+
"description": "The organization that issues the form, such as U.S. Internal Revenue Service."
|
|
48
|
+
},
|
|
49
|
+
"edition": {
|
|
50
|
+
"type": "object",
|
|
51
|
+
"properties": {
|
|
52
|
+
"key": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"minLength": 1,
|
|
55
|
+
"maxLength": 64,
|
|
56
|
+
"pattern": "^(?!(?:current|latest|editions|tags|diff)$)[a-z0-9]([a-z0-9]|-[a-z0-9])*$",
|
|
57
|
+
"description": "Stable edition identifier, unique among the editions of one artifact (for example 2024-03 or 3b). Lowercase letters and digits with single hyphens, and not current, latest, editions, tags or diff. It is the edition segment of a coordinate such as @org/repo/w-9/2024-03 and never changes once published."
|
|
58
|
+
},
|
|
59
|
+
"label": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"minLength": 1,
|
|
62
|
+
"maxLength": 200,
|
|
63
|
+
"description": "The issuer's edition text exactly as printed, such as \"Rev. March 2024\". For display only."
|
|
64
|
+
},
|
|
65
|
+
"date": {
|
|
66
|
+
"type": "string",
|
|
67
|
+
"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]))))$",
|
|
68
|
+
"description": "When the issuer released the edition, at the precision the issuer gives: YYYY, YYYY-MM or YYYY-MM-DD."
|
|
69
|
+
},
|
|
70
|
+
"effectiveFrom": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"format": "date",
|
|
73
|
+
"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])))$",
|
|
74
|
+
"description": "The date the edition takes effect. Only when the issuer prints one."
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"required": [
|
|
78
|
+
"key",
|
|
79
|
+
"label"
|
|
80
|
+
],
|
|
81
|
+
"additionalProperties": false,
|
|
82
|
+
"title": "ArtifactEdition",
|
|
83
|
+
"description": "The issuer's edition this artifact encodes. Omitted for artifacts that are not issued in editions."
|
|
84
|
+
},
|
|
85
|
+
"language": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"minLength": 2,
|
|
88
|
+
"maxLength": 35,
|
|
89
|
+
"pattern": "^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$",
|
|
90
|
+
"description": "BCP 47-style source language tag for this artifact. Defaults to en when omitted."
|
|
91
|
+
},
|
|
92
|
+
"metadata": {
|
|
93
|
+
"description": "Custom key-value pairs for storing domain-specific or organizational metadata",
|
|
94
|
+
"$ref": "https://schema.asterdoc.com/2026-10-28.json#/$defs/Metadata"
|
|
95
|
+
},
|
|
96
|
+
"instructions": {
|
|
97
|
+
"oneOf": [
|
|
98
|
+
{
|
|
99
|
+
"type": "object",
|
|
100
|
+
"properties": {
|
|
101
|
+
"kind": {
|
|
102
|
+
"type": "string",
|
|
103
|
+
"const": "inline"
|
|
104
|
+
},
|
|
105
|
+
"text": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"minLength": 1,
|
|
108
|
+
"maxLength": 1000000,
|
|
109
|
+
"description": "Inline text content"
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
"required": [
|
|
113
|
+
"kind",
|
|
114
|
+
"text"
|
|
115
|
+
],
|
|
116
|
+
"additionalProperties": false,
|
|
117
|
+
"title": "InlineContentRef",
|
|
118
|
+
"description": "Inline content reference with embedded text"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"type": "object",
|
|
122
|
+
"properties": {
|
|
123
|
+
"kind": {
|
|
124
|
+
"type": "string",
|
|
125
|
+
"const": "file"
|
|
126
|
+
},
|
|
127
|
+
"path": {
|
|
128
|
+
"type": "string",
|
|
129
|
+
"minLength": 1,
|
|
130
|
+
"maxLength": 1000,
|
|
131
|
+
"description": "Path to the content file"
|
|
132
|
+
},
|
|
133
|
+
"mimeType": {
|
|
134
|
+
"type": "string",
|
|
135
|
+
"minLength": 1,
|
|
136
|
+
"maxLength": 100,
|
|
137
|
+
"description": "MIME type of the file content"
|
|
138
|
+
},
|
|
139
|
+
"title": {
|
|
140
|
+
"type": "string",
|
|
141
|
+
"minLength": 1,
|
|
142
|
+
"maxLength": 200,
|
|
143
|
+
"description": "Human-readable title"
|
|
144
|
+
},
|
|
145
|
+
"description": {
|
|
146
|
+
"type": "string",
|
|
147
|
+
"minLength": 1,
|
|
148
|
+
"maxLength": 2000,
|
|
149
|
+
"description": "Description of the content"
|
|
150
|
+
},
|
|
151
|
+
"checksum": {
|
|
152
|
+
"type": "string",
|
|
153
|
+
"pattern": "^sha256:[a-f0-9]{64}$",
|
|
154
|
+
"description": "SHA-256 checksum for integrity verification"
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"required": [
|
|
158
|
+
"kind",
|
|
159
|
+
"path",
|
|
160
|
+
"mimeType"
|
|
161
|
+
],
|
|
162
|
+
"additionalProperties": false,
|
|
163
|
+
"title": "FileContentRef",
|
|
164
|
+
"description": "File content reference with path and metadata"
|
|
165
|
+
}
|
|
166
|
+
],
|
|
167
|
+
"title": "ContentRef",
|
|
168
|
+
"description": "Domain or compliance reference content (e.g., IRS instructions, regulatory guidance)"
|
|
169
|
+
},
|
|
170
|
+
"agentInstructions": {
|
|
171
|
+
"oneOf": [
|
|
172
|
+
{
|
|
173
|
+
"type": "object",
|
|
174
|
+
"properties": {
|
|
175
|
+
"kind": {
|
|
176
|
+
"type": "string",
|
|
177
|
+
"const": "inline"
|
|
178
|
+
},
|
|
179
|
+
"text": {
|
|
180
|
+
"type": "string",
|
|
181
|
+
"minLength": 1,
|
|
182
|
+
"maxLength": 1000000,
|
|
183
|
+
"description": "Inline text content"
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
"required": [
|
|
187
|
+
"kind",
|
|
188
|
+
"text"
|
|
189
|
+
],
|
|
190
|
+
"additionalProperties": false,
|
|
191
|
+
"title": "InlineContentRef",
|
|
192
|
+
"description": "Inline content reference with embedded text"
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"type": "object",
|
|
196
|
+
"properties": {
|
|
197
|
+
"kind": {
|
|
198
|
+
"type": "string",
|
|
199
|
+
"const": "file"
|
|
200
|
+
},
|
|
201
|
+
"path": {
|
|
202
|
+
"type": "string",
|
|
203
|
+
"minLength": 1,
|
|
204
|
+
"maxLength": 1000,
|
|
205
|
+
"description": "Path to the content file"
|
|
206
|
+
},
|
|
207
|
+
"mimeType": {
|
|
208
|
+
"type": "string",
|
|
209
|
+
"minLength": 1,
|
|
210
|
+
"maxLength": 100,
|
|
211
|
+
"description": "MIME type of the file content"
|
|
212
|
+
},
|
|
213
|
+
"title": {
|
|
214
|
+
"type": "string",
|
|
215
|
+
"minLength": 1,
|
|
216
|
+
"maxLength": 200,
|
|
217
|
+
"description": "Human-readable title"
|
|
218
|
+
},
|
|
219
|
+
"description": {
|
|
220
|
+
"type": "string",
|
|
221
|
+
"minLength": 1,
|
|
222
|
+
"maxLength": 2000,
|
|
223
|
+
"description": "Description of the content"
|
|
224
|
+
},
|
|
225
|
+
"checksum": {
|
|
226
|
+
"type": "string",
|
|
227
|
+
"pattern": "^sha256:[a-f0-9]{64}$",
|
|
228
|
+
"description": "SHA-256 checksum for integrity verification"
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
"required": [
|
|
232
|
+
"kind",
|
|
233
|
+
"path",
|
|
234
|
+
"mimeType"
|
|
235
|
+
],
|
|
236
|
+
"additionalProperties": false,
|
|
237
|
+
"title": "FileContentRef",
|
|
238
|
+
"description": "File content reference with path and metadata"
|
|
239
|
+
}
|
|
240
|
+
],
|
|
241
|
+
"title": "ContentRef",
|
|
242
|
+
"description": "LLM/agent prompts for field ordering, grouping, tone, and presentation guidance"
|
|
243
|
+
},
|
|
244
|
+
"kind": {
|
|
245
|
+
"type": "string",
|
|
246
|
+
"const": "form"
|
|
247
|
+
},
|
|
248
|
+
"defs": {
|
|
249
|
+
"$ref": "https://schema.asterdoc.com/2026-10-28.json#/$defs/DefsSection"
|
|
250
|
+
},
|
|
251
|
+
"rules": {
|
|
252
|
+
"type": "object",
|
|
253
|
+
"propertyNames": {
|
|
254
|
+
"type": "string",
|
|
255
|
+
"minLength": 1,
|
|
256
|
+
"maxLength": 100,
|
|
257
|
+
"pattern": "^[a-z][a-zA-Z0-9_]*$",
|
|
258
|
+
"description": "Validation rule identifier (camelCase, starts with lowercase letter)"
|
|
259
|
+
},
|
|
260
|
+
"additionalProperties": {
|
|
261
|
+
"type": "object",
|
|
262
|
+
"properties": {
|
|
263
|
+
"expr": {
|
|
264
|
+
"type": "string",
|
|
265
|
+
"minLength": 1,
|
|
266
|
+
"maxLength": 2000,
|
|
267
|
+
"description": "Boolean expression that must evaluate to true for the form to be valid. Has access to field values directly (e.g., \"ssn or ein\") and defs section values."
|
|
268
|
+
},
|
|
269
|
+
"message": {
|
|
270
|
+
"type": "string",
|
|
271
|
+
"minLength": 1,
|
|
272
|
+
"maxLength": 500,
|
|
273
|
+
"description": "Error message displayed when the rule fails (expression evaluates to false)"
|
|
274
|
+
},
|
|
275
|
+
"severity": {
|
|
276
|
+
"type": "string",
|
|
277
|
+
"enum": [
|
|
278
|
+
"error",
|
|
279
|
+
"warning"
|
|
280
|
+
],
|
|
281
|
+
"description": "Severity level: error (default) blocks submission, warning allows but warns"
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
"required": [
|
|
285
|
+
"expr",
|
|
286
|
+
"message"
|
|
287
|
+
],
|
|
288
|
+
"additionalProperties": false,
|
|
289
|
+
"title": "ValidationRule",
|
|
290
|
+
"description": "A form-level validation rule with a boolean expression and error message"
|
|
291
|
+
},
|
|
292
|
+
"title": "RulesSection",
|
|
293
|
+
"description": "Form-level validation rules for cross-field constraints. Rules use expressions with direct access to field values and defs section values."
|
|
294
|
+
},
|
|
295
|
+
"fields": {
|
|
296
|
+
"type": "object",
|
|
297
|
+
"propertyNames": {
|
|
298
|
+
"type": "string",
|
|
299
|
+
"minLength": 1,
|
|
300
|
+
"maxLength": 100,
|
|
301
|
+
"pattern": "^[a-z][a-zA-Z0-9_]*$",
|
|
302
|
+
"description": "Field identifier (camelCase, starts with lowercase letter)"
|
|
303
|
+
},
|
|
304
|
+
"additionalProperties": {
|
|
305
|
+
"$ref": "https://schema.asterdoc.com/2026-10-28.json#/$defs/FormField"
|
|
306
|
+
},
|
|
307
|
+
"description": "Form field definitions keyed by field identifier. Fields define the input structure and validation rules for the form"
|
|
308
|
+
},
|
|
309
|
+
"layers": {
|
|
310
|
+
"type": "object",
|
|
311
|
+
"propertyNames": {
|
|
312
|
+
"type": "string",
|
|
313
|
+
"minLength": 1,
|
|
314
|
+
"maxLength": 100,
|
|
315
|
+
"pattern": "^[a-z][a-zA-Z0-9_]*$",
|
|
316
|
+
"description": "Layer identifier (camelCase, starts with lowercase letter)"
|
|
317
|
+
},
|
|
318
|
+
"additionalProperties": {
|
|
319
|
+
"$ref": "https://schema.asterdoc.com/2026-10-28.json#/$defs/Layer"
|
|
320
|
+
},
|
|
321
|
+
"description": "Named layers for rendering this form into different formats. Keys are user-defined identifiers (e.g., markdown, pdf, html)"
|
|
322
|
+
},
|
|
323
|
+
"defaultLayer": {
|
|
324
|
+
"type": "string",
|
|
325
|
+
"minLength": 1,
|
|
326
|
+
"maxLength": 100,
|
|
327
|
+
"description": "Key of the default layer to use when none specified at render time"
|
|
328
|
+
},
|
|
329
|
+
"allowAdditionalAnnexes": {
|
|
330
|
+
"type": "boolean",
|
|
331
|
+
"description": "Whether additional ad-hoc annexes can be attached beyond those defined in the annexes record (default: false)"
|
|
332
|
+
},
|
|
333
|
+
"annexes": {
|
|
334
|
+
"type": "object",
|
|
335
|
+
"propertyNames": {
|
|
336
|
+
"type": "string",
|
|
337
|
+
"minLength": 1,
|
|
338
|
+
"maxLength": 100,
|
|
339
|
+
"pattern": "^[a-z][a-zA-Z0-9_]*$",
|
|
340
|
+
"description": "Annex identifier (camelCase, starts with lowercase letter)"
|
|
341
|
+
},
|
|
342
|
+
"additionalProperties": {
|
|
343
|
+
"$ref": "https://schema.asterdoc.com/2026-10-28.json#/$defs/FormAnnex"
|
|
344
|
+
},
|
|
345
|
+
"description": "Predefined annex slots keyed by identifier. Each slot can be marked as required (must be filled at runtime) or optional"
|
|
346
|
+
},
|
|
347
|
+
"parties": {
|
|
348
|
+
"type": "object",
|
|
349
|
+
"propertyNames": {
|
|
350
|
+
"type": "string",
|
|
351
|
+
"minLength": 1,
|
|
352
|
+
"maxLength": 50,
|
|
353
|
+
"pattern": "^[a-z][a-zA-Z0-9_]*$",
|
|
354
|
+
"description": "Party role identifier (e.g., buyer, seller, landlord, buyerRepresentative)"
|
|
355
|
+
},
|
|
356
|
+
"additionalProperties": {
|
|
357
|
+
"$ref": "https://schema.asterdoc.com/2026-10-28.json#/$defs/FormParty"
|
|
358
|
+
},
|
|
359
|
+
"description": "Party role definitions keyed by role identifier. Each role specifies constraints on who can fill it (person/organization) and signature requirements."
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
"required": [
|
|
363
|
+
"name",
|
|
364
|
+
"kind"
|
|
365
|
+
],
|
|
366
|
+
"additionalProperties": false,
|
|
367
|
+
"description": "A form artifact that defines a data contract with field definitions, optional layers for rendering, and optional annexes. Forms are the primary artifact type for structured data collection and document generation.",
|
|
368
|
+
"title": "Form"
|
|
369
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schema.asterdoc.com/2026-10-28/identification.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"type": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"minLength": 1,
|
|
9
|
+
"maxLength": 50,
|
|
10
|
+
"description": "Type of identification document (e.g., ssn, passport, license, ein)"
|
|
11
|
+
},
|
|
12
|
+
"number": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"minLength": 1,
|
|
15
|
+
"maxLength": 100,
|
|
16
|
+
"description": "Identification number or identifier"
|
|
17
|
+
},
|
|
18
|
+
"issuer": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"minLength": 1,
|
|
21
|
+
"maxLength": 100,
|
|
22
|
+
"description": "Issuing authority, country, or state (e.g., US, CA, DMV)"
|
|
23
|
+
},
|
|
24
|
+
"issueDate": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"format": "date",
|
|
27
|
+
"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])))$",
|
|
28
|
+
"description": "Issue date in ISO 8601 format (YYYY-MM-DD)"
|
|
29
|
+
},
|
|
30
|
+
"expiryDate": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"format": "date",
|
|
33
|
+
"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])))$",
|
|
34
|
+
"description": "Expiry date in ISO 8601 format (YYYY-MM-DD)"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"required": [
|
|
38
|
+
"type",
|
|
39
|
+
"number"
|
|
40
|
+
],
|
|
41
|
+
"additionalProperties": false,
|
|
42
|
+
"description": "Identification document with type, number, issuer, and optional issue and expiry dates",
|
|
43
|
+
"title": "Identification"
|
|
44
|
+
}
|