@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.
Files changed (42) hide show
  1. package/LICENSE +25 -0
  2. package/README.md +76 -2
  3. package/dist/index.d.ts +3040 -0
  4. package/dist/index.js +2096 -0
  5. package/package.json +82 -3
  6. package/schemas/2026-10-28/address.json +53 -0
  7. package/schemas/2026-10-28/attachment.json +31 -0
  8. package/schemas/2026-10-28/bbox.json +22 -0
  9. package/schemas/2026-10-28/bundle-content-item.json +122 -0
  10. package/schemas/2026-10-28/bundle.json +267 -0
  11. package/schemas/2026-10-28/checklist-item.json +113 -0
  12. package/schemas/2026-10-28/checklist.json +300 -0
  13. package/schemas/2026-10-28/cond-expr.json +18 -0
  14. package/schemas/2026-10-28/content-ref.json +76 -0
  15. package/schemas/2026-10-28/coordinate.json +26 -0
  16. package/schemas/2026-10-28/defs-section.json +862 -0
  17. package/schemas/2026-10-28/document.json +292 -0
  18. package/schemas/2026-10-28/duration.json +8 -0
  19. package/schemas/2026-10-28/fieldset-field.json +49 -0
  20. package/schemas/2026-10-28/form-annex.json +33 -0
  21. package/schemas/2026-10-28/form-field.json +1037 -0
  22. package/schemas/2026-10-28/form-party.json +150 -0
  23. package/schemas/2026-10-28/form.json +369 -0
  24. package/schemas/2026-10-28/identification.json +44 -0
  25. package/schemas/2026-10-28/layer.json +556 -0
  26. package/schemas/2026-10-28/list-field.json +51 -0
  27. package/schemas/2026-10-28/metadata.json +35 -0
  28. package/schemas/2026-10-28/money.json +25 -0
  29. package/schemas/2026-10-28/organization.json +49 -0
  30. package/schemas/2026-10-28/person.json +49 -0
  31. package/schemas/2026-10-28/phone.json +32 -0
  32. package/schemas/2026-10-28/rule-severity.json +11 -0
  33. package/schemas/2026-10-28/rules-section.json +46 -0
  34. package/schemas/2026-10-28/signature.json +68 -0
  35. package/schemas/2026-10-28/validation-rule.json +34 -0
  36. package/schemas/2026-10-28.json +4636 -0
  37. package/schemas/config.json +174 -0
  38. package/schemas/lock.json +151 -0
  39. package/schemas/manifest.json +184 -0
  40. package/schemas/registry-item.json +488 -0
  41. package/schemas/registry.json +281 -0
  42. package/schemas/schema.json +4636 -0
@@ -0,0 +1,49 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.asterdoc.com/2026-10-28/organization.json",
4
+ "type": "object",
5
+ "properties": {
6
+ "name": {
7
+ "type": "string",
8
+ "minLength": 1,
9
+ "maxLength": 200,
10
+ "description": "Organization name"
11
+ },
12
+ "legalName": {
13
+ "type": "string",
14
+ "minLength": 1,
15
+ "maxLength": 200,
16
+ "description": "Legal or registered name of the organization"
17
+ },
18
+ "domicile": {
19
+ "type": "string",
20
+ "minLength": 1,
21
+ "maxLength": 100,
22
+ "description": "Domicile"
23
+ },
24
+ "entityType": {
25
+ "type": "string",
26
+ "minLength": 1,
27
+ "maxLength": 100,
28
+ "description": "Legal entity type of the organization"
29
+ },
30
+ "entityId": {
31
+ "type": "string",
32
+ "minLength": 1,
33
+ "maxLength": 100,
34
+ "description": "Business identification number"
35
+ },
36
+ "taxId": {
37
+ "type": "string",
38
+ "minLength": 1,
39
+ "maxLength": 100,
40
+ "description": "Tax identification number"
41
+ }
42
+ },
43
+ "required": [
44
+ "name"
45
+ ],
46
+ "additionalProperties": false,
47
+ "description": "Organization with legal details and identification",
48
+ "title": "Organization"
49
+ }
@@ -0,0 +1,49 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.asterdoc.com/2026-10-28/person.json",
4
+ "type": "object",
5
+ "properties": {
6
+ "name": {
7
+ "type": "string",
8
+ "minLength": 1,
9
+ "maxLength": 200,
10
+ "description": "Person's full name (complete name as a single string)"
11
+ },
12
+ "title": {
13
+ "type": "string",
14
+ "minLength": 1,
15
+ "maxLength": 50,
16
+ "description": "Name prefix or title (e.g., Mr., Mrs., Dr., Prof.)"
17
+ },
18
+ "firstName": {
19
+ "type": "string",
20
+ "minLength": 1,
21
+ "maxLength": 100,
22
+ "description": "Person's first or given name"
23
+ },
24
+ "middleName": {
25
+ "type": "string",
26
+ "minLength": 1,
27
+ "maxLength": 100,
28
+ "description": "Person's middle name or initial"
29
+ },
30
+ "lastName": {
31
+ "type": "string",
32
+ "minLength": 1,
33
+ "maxLength": 100,
34
+ "description": "Person's last name or surname"
35
+ },
36
+ "suffix": {
37
+ "type": "string",
38
+ "minLength": 1,
39
+ "maxLength": 50,
40
+ "description": "Name suffix (e.g., Jr., Sr., III, Esq.)"
41
+ }
42
+ },
43
+ "required": [
44
+ "name"
45
+ ],
46
+ "additionalProperties": false,
47
+ "description": "Person with name (required) and optional name components (title, first name, middle name, last name, suffix)",
48
+ "title": "Person"
49
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.asterdoc.com/2026-10-28/phone.json",
4
+ "type": "object",
5
+ "properties": {
6
+ "number": {
7
+ "type": "string",
8
+ "minLength": 8,
9
+ "maxLength": 16,
10
+ "pattern": "^\\+[1-9]\\d{1,14}$",
11
+ "description": "Phone number in E.164 international format (e.g., +14155552671)"
12
+ },
13
+ "type": {
14
+ "type": "string",
15
+ "minLength": 1,
16
+ "maxLength": 50,
17
+ "description": "Type or category of phone number (e.g., mobile, work, home)"
18
+ },
19
+ "extension": {
20
+ "type": "string",
21
+ "minLength": 1,
22
+ "maxLength": 20,
23
+ "description": "Phone extension or extension number"
24
+ }
25
+ },
26
+ "required": [
27
+ "number"
28
+ ],
29
+ "additionalProperties": false,
30
+ "description": "Phone number in E.164 international format with optional type and extension",
31
+ "title": "Phone"
32
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.asterdoc.com/2026-10-28/rule-severity.json",
4
+ "type": "string",
5
+ "enum": [
6
+ "error",
7
+ "warning"
8
+ ],
9
+ "description": "Severity level: error blocks submission, warning allows but warns",
10
+ "title": "RuleSeverity"
11
+ }
@@ -0,0 +1,46 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.asterdoc.com/2026-10-28/rules-section.json",
4
+ "type": "object",
5
+ "propertyNames": {
6
+ "type": "string",
7
+ "minLength": 1,
8
+ "maxLength": 100,
9
+ "pattern": "^[a-z][a-zA-Z0-9_]*$",
10
+ "description": "Validation rule identifier (camelCase, starts with lowercase letter)"
11
+ },
12
+ "additionalProperties": {
13
+ "type": "object",
14
+ "properties": {
15
+ "expr": {
16
+ "type": "string",
17
+ "minLength": 1,
18
+ "maxLength": 2000,
19
+ "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."
20
+ },
21
+ "message": {
22
+ "type": "string",
23
+ "minLength": 1,
24
+ "maxLength": 500,
25
+ "description": "Error message displayed when the rule fails (expression evaluates to false)"
26
+ },
27
+ "severity": {
28
+ "type": "string",
29
+ "enum": [
30
+ "error",
31
+ "warning"
32
+ ],
33
+ "description": "Severity level: error (default) blocks submission, warning allows but warns"
34
+ }
35
+ },
36
+ "required": [
37
+ "expr",
38
+ "message"
39
+ ],
40
+ "additionalProperties": false,
41
+ "title": "ValidationRule",
42
+ "description": "A form-level validation rule with a boolean expression and error message"
43
+ },
44
+ "description": "Form-level validation rules keyed by rule identifier. Rules use expressions to validate cross-field constraints.",
45
+ "title": "RulesSection"
46
+ }
@@ -0,0 +1,68 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.asterdoc.com/2026-10-28/signature.json",
4
+ "type": "object",
5
+ "properties": {
6
+ "image": {
7
+ "type": "string",
8
+ "minLength": 1,
9
+ "description": "Base64-encoded signature image or data URI"
10
+ },
11
+ "timestamp": {
12
+ "type": "string",
13
+ "format": "date-time",
14
+ "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])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$",
15
+ "description": "ISO 8601 date-time when the signature was captured"
16
+ },
17
+ "method": {
18
+ "anyOf": [
19
+ {
20
+ "type": "string",
21
+ "const": "drawn"
22
+ },
23
+ {
24
+ "type": "string",
25
+ "const": "typed"
26
+ },
27
+ {
28
+ "type": "string",
29
+ "const": "uploaded"
30
+ },
31
+ {
32
+ "type": "string",
33
+ "const": "certificate"
34
+ }
35
+ ],
36
+ "description": "Method used to capture the signature"
37
+ },
38
+ "type": {
39
+ "default": "signature",
40
+ "description": "Whether this is a full signature or initials",
41
+ "anyOf": [
42
+ {
43
+ "type": "string",
44
+ "const": "signature"
45
+ },
46
+ {
47
+ "type": "string",
48
+ "const": "initials"
49
+ }
50
+ ]
51
+ },
52
+ "metadata": {
53
+ "type": "object",
54
+ "propertyNames": {
55
+ "type": "string"
56
+ },
57
+ "additionalProperties": {},
58
+ "description": "Additional metadata (IP address, device info, etc.)"
59
+ }
60
+ },
61
+ "required": [
62
+ "timestamp",
63
+ "method"
64
+ ],
65
+ "additionalProperties": false,
66
+ "description": "Captured signature data containing the signature image, timestamp, capture method, and optional metadata.",
67
+ "title": "Signature"
68
+ }
@@ -0,0 +1,34 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://schema.asterdoc.com/2026-10-28/validation-rule.json",
4
+ "type": "object",
5
+ "properties": {
6
+ "expr": {
7
+ "type": "string",
8
+ "minLength": 1,
9
+ "maxLength": 2000,
10
+ "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."
11
+ },
12
+ "message": {
13
+ "type": "string",
14
+ "minLength": 1,
15
+ "maxLength": 500,
16
+ "description": "Error message displayed when the rule fails (expression evaluates to false)"
17
+ },
18
+ "severity": {
19
+ "type": "string",
20
+ "enum": [
21
+ "error",
22
+ "warning"
23
+ ],
24
+ "description": "Severity level: error (default) blocks submission, warning allows but warns"
25
+ }
26
+ },
27
+ "required": [
28
+ "expr",
29
+ "message"
30
+ ],
31
+ "additionalProperties": false,
32
+ "description": "A form-level validation rule with a boolean expression and error message",
33
+ "title": "ValidationRule"
34
+ }