@agentshouse/mdmodel 0.1.0-ce47d8f9de14a → 0.1.0-ce60fddcab8ff

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 (190) hide show
  1. package/API.md +32 -12
  2. package/dist/definition.d.ts +2 -1
  3. package/dist/definition.d.ts.map +1 -1
  4. package/dist/definition.js +48 -9
  5. package/dist/document.d.ts +2 -1
  6. package/dist/document.d.ts.map +1 -1
  7. package/dist/document.js +17 -0
  8. package/dist/facts.d.ts.map +1 -1
  9. package/dist/facts.js +3 -2
  10. package/dist/house-model.d.ts +2 -24
  11. package/dist/house-model.d.ts.map +1 -1
  12. package/dist/house-model.js +2 -13
  13. package/dist/house-references/patterns.d.ts +5 -1
  14. package/dist/house-references/patterns.d.ts.map +1 -1
  15. package/dist/house-references/patterns.js +8 -1
  16. package/dist/index.d.ts +9 -9
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +7 -7
  19. package/dist/indexed.d.ts +1 -0
  20. package/dist/indexed.d.ts.map +1 -1
  21. package/dist/indexed.js +8 -0
  22. package/dist/kinds.d.ts +6 -1
  23. package/dist/kinds.d.ts.map +1 -1
  24. package/dist/kinds.js +8 -0
  25. package/dist/query/match.d.ts.map +1 -1
  26. package/dist/query/match.js +3 -24
  27. package/dist/query/rows.d.ts +4 -0
  28. package/dist/query/rows.d.ts.map +1 -1
  29. package/dist/query/rows.js +21 -0
  30. package/dist/query/walk.d.ts +6 -0
  31. package/dist/query/walk.d.ts.map +1 -1
  32. package/dist/query/walk.js +12 -1
  33. package/dist/room-types.d.ts +1 -0
  34. package/dist/room-types.d.ts.map +1 -1
  35. package/dist/room-types.js +7 -0
  36. package/dist/types.d.ts +10 -0
  37. package/dist/types.d.ts.map +1 -1
  38. package/dist/validate.d.ts +2 -0
  39. package/dist/validate.d.ts.map +1 -1
  40. package/dist/validate.js +41 -12
  41. package/dist/view.d.ts +5 -0
  42. package/dist/view.d.ts.map +1 -0
  43. package/dist/view.js +27 -0
  44. package/fixtures/README.md +13 -2
  45. package/fixtures/cases/absent-link-dangles/{schema.yaml → schema.md} +2 -0
  46. package/fixtures/cases/{boolean-field/schema.yaml → absent-optional-field/schema.md} +2 -0
  47. package/fixtures/cases/{duplicate-link-definition/schema.yaml → absolute-link/schema.md} +2 -0
  48. package/fixtures/cases/{attachment-reference-dangles/schema.yaml → attachment-reference-any-file/schema.md} +2 -0
  49. package/fixtures/cases/{attachment-reference-outside/schema.yaml → attachment-reference-dangles/schema.md} +2 -0
  50. package/fixtures/cases/{list-of-objects-reference/schema.yaml → attachment-reference-outside/schema.md} +2 -0
  51. package/fixtures/cases/binary-any-reference/{schema.yaml → schema.md} +2 -0
  52. package/fixtures/cases/binary-document-collision/{schema.yaml → schema.md} +2 -0
  53. package/fixtures/cases/binary-image-dangles/{schema.yaml → schema.md} +2 -0
  54. package/fixtures/cases/binary-link-dangles/{schema.yaml → schema.md} +2 -0
  55. package/fixtures/cases/binary-link-outside-collection/{schema.yaml → schema.md} +2 -0
  56. package/fixtures/cases/binary-prototype-reference/{schema.yaml → schema.md} +2 -0
  57. package/fixtures/cases/binary-typed-reference/{schema.yaml → schema.md} +2 -0
  58. package/fixtures/cases/{absent-optional-field/schema.yaml → boolean-field/schema.md} +2 -0
  59. package/fixtures/cases/{absolute-link/schema.yaml → bracketed-link-definition/schema.md} +2 -0
  60. package/fixtures/cases/closed-nested-object/{schema.yaml → schema.md} +2 -0
  61. package/fixtures/cases/composed-root-reference/{schema.yaml → schema.md} +2 -0
  62. package/fixtures/cases/conditional-long-text/{schema.yaml → schema.md} +2 -0
  63. package/fixtures/cases/cross-room-link/{schema.yaml → schema.md} +2 -0
  64. package/fixtures/cases/cross-room-reference/{schema.yaml → schema.md} +2 -0
  65. package/fixtures/cases/date-time-format/{schema.yaml → schema.md} +2 -0
  66. package/fixtures/cases/declared-binary-links/schema.md +3 -0
  67. package/fixtures/cases/default-unfilled/schema.md +57 -0
  68. package/fixtures/cases/defs-pattern/schema.md +57 -0
  69. package/fixtures/cases/dependent-rule/schema.md +57 -0
  70. package/fixtures/cases/{bracketed-link-definition/schema.yaml → duplicate-link-definition/schema.md} +2 -0
  71. package/fixtures/cases/email-format/schema.md +57 -0
  72. package/fixtures/cases/equal-labels/{schema.yaml → schema.md} +2 -0
  73. package/fixtures/cases/fenced-link-definition/schema.md +7 -0
  74. package/fixtures/cases/field-enum/{schema.yaml → schema.md} +2 -0
  75. package/fixtures/cases/integer-field/schema.md +57 -0
  76. package/fixtures/cases/interrupted-link-definition/schema.md +3 -0
  77. package/fixtures/cases/json-schema-constructs/schema.md +57 -0
  78. package/fixtures/cases/labels-in-the-rooms-language/{schema.yaml → schema.md} +2 -0
  79. package/fixtures/cases/lazy-list-item/{schema.yaml → schema.md} +2 -0
  80. package/fixtures/cases/link-into-a-reserved-name/{schema.yaml → schema.md} +2 -0
  81. package/fixtures/cases/list-item-enum/{schema.yaml → schema.md} +2 -0
  82. package/fixtures/cases/list-item-kind/{schema.yaml → schema.md} +2 -0
  83. package/fixtures/cases/list-items/{schema.yaml → schema.md} +2 -0
  84. package/fixtures/cases/list-of-objects-closed/schema.md +57 -0
  85. package/fixtures/cases/list-of-objects-item/schema.md +57 -0
  86. package/fixtures/cases/{attachment-reference-any-file/schema.yaml → list-of-objects-reference/schema.md} +2 -0
  87. package/fixtures/cases/list-reference-path/{schema.yaml → schema.md} +2 -0
  88. package/fixtures/cases/list-reference-type/{schema.yaml → schema.md} +2 -0
  89. package/fixtures/cases/list-size/schema.md +57 -0
  90. package/fixtures/cases/long-fence-link-definition/schema.md +3 -0
  91. package/fixtures/cases/long-value-past-six-levels/{schema.yaml → schema.md} +2 -0
  92. package/fixtures/cases/malformed-definition/{schema.yaml → schema.md} +2 -0
  93. package/fixtures/cases/malformed-list/{schema.yaml → schema.md} +2 -0
  94. package/fixtures/cases/member-document/{schema.yaml → schema.md} +2 -0
  95. package/fixtures/cases/member-on-another-type/{schema.yaml → schema.md} +2 -0
  96. package/fixtures/cases/missing-required-field/{schema.yaml → schema.md} +2 -0
  97. package/fixtures/cases/misspelled-key/schema.md +57 -0
  98. package/fixtures/cases/name-not-a-string/{schema.yaml → schema.md} +2 -0
  99. package/fixtures/cases/nested-defs/{schema.yaml → schema.md} +2 -0
  100. package/fixtures/cases/nested-object-reference/schema.md +34 -0
  101. package/fixtures/cases/nested-reference/schema.md +34 -0
  102. package/fixtures/cases/nested-required-field/schema.md +57 -0
  103. package/fixtures/cases/numeric-range/schema.md +57 -0
  104. package/fixtures/cases/one-key-two-labels/{schema.yaml → schema.md} +2 -0
  105. package/fixtures/cases/one-key-two-types/{schema.yaml → schema.md} +2 -0
  106. package/fixtures/cases/one-of-variant/schema.md +57 -0
  107. package/fixtures/cases/other-room-reference/schema.md +34 -0
  108. package/fixtures/cases/paragraph-link-definition/schema.md +3 -0
  109. package/fixtures/cases/prototype-field/schema.md +7 -0
  110. package/fixtures/cases/quoted-link-definition/schema.md +3 -0
  111. package/fixtures/cases/reference-into-a-reserved-name/{schema.yaml → schema.md} +2 -0
  112. package/fixtures/cases/reference-to-any-file-name/{schema.yaml → schema.md} +2 -0
  113. package/fixtures/cases/referenced-missing-file/{schema.yaml → schema.md} +2 -0
  114. package/fixtures/cases/referenced-missing-non-latin-file/{schema.yaml → schema.md} +2 -0
  115. package/fixtures/cases/remote-ref/{schema.yaml → schema.md} +2 -0
  116. package/fixtures/cases/schema-body-ignored/expected.json +1 -0
  117. package/fixtures/cases/schema-body-ignored/schema.md +9 -0
  118. package/fixtures/cases/schema-type-named-folders/context.json +1 -0
  119. package/fixtures/cases/schema-type-named-folders/expected.json +5 -0
  120. package/fixtures/cases/schema-type-named-folders/schema.md +5 -0
  121. package/fixtures/cases/schema-type-named-type/context.json +1 -0
  122. package/fixtures/cases/schema-type-named-type/expected.json +5 -0
  123. package/fixtures/cases/{unknown-type/schema.yaml → schema-type-named-type/schema.md} +3 -1
  124. package/fixtures/cases/second-member-document/{schema.yaml → schema.md} +2 -0
  125. package/fixtures/cases/sections-keyword-refused/{schema.yaml → schema.md} +2 -0
  126. package/fixtures/cases/shortcut-reference-link/schema.md +7 -0
  127. package/fixtures/cases/string-length/schema.md +57 -0
  128. package/fixtures/cases/submission-keys/{schema.yaml → schema.md} +2 -0
  129. package/fixtures/cases/text-field-kind/{schema.yaml → schema.md} +2 -0
  130. package/fixtures/cases/thematic-break-ends-the-values/{schema.yaml → schema.md} +2 -0
  131. package/fixtures/cases/truncated-link-definition/schema.md +3 -0
  132. package/fixtures/cases/typed-path-names-another-type/{schema.yaml → schema.md} +2 -0
  133. package/fixtures/cases/typed-path-names-its-type/{schema.yaml → schema.md} +2 -0
  134. package/fixtures/cases/typed-path-names-no-type/{schema.yaml → schema.md} +2 -0
  135. package/fixtures/cases/types-folder-content/{schema.yaml → schema.md} +2 -0
  136. package/fixtures/cases/undeclared-field/schema.md +7 -0
  137. package/fixtures/cases/unevaluated-items-closed/{schema.yaml → schema.md} +2 -0
  138. package/fixtures/cases/unique-in-app-schema/context.json +1 -0
  139. package/fixtures/cases/unique-in-app-schema/expected.json +5 -0
  140. package/fixtures/cases/unique-in-app-schema/schema.yaml +7 -0
  141. package/fixtures/cases/unique-indexed-field/context.json +1 -0
  142. package/fixtures/cases/unique-indexed-field/expected.json +1 -0
  143. package/fixtures/cases/unique-indexed-field/library/tickets/first.md +8 -0
  144. package/fixtures/cases/unique-indexed-field/library/tickets/second.md +8 -0
  145. package/fixtures/cases/unique-indexed-field/schema.md +9 -0
  146. package/fixtures/cases/unique-off-indexed-field/context.json +1 -0
  147. package/fixtures/cases/unique-off-indexed-field/expected.json +5 -0
  148. package/fixtures/cases/unique-off-indexed-field/schema.md +9 -0
  149. package/fixtures/cases/unlisted-reference-type/{schema.yaml → schema.md} +2 -0
  150. package/fixtures/cases/unnamed-typed-path-checks-its-fields/{schema.yaml → schema.md} +2 -0
  151. package/fixtures/cases/unnamed-typed-path-names-a-type/{schema.yaml → schema.md} +2 -0
  152. package/fixtures/cases/unnamed-typed-path-reads-its-type/{schema.yaml → schema.md} +2 -0
  153. package/fixtures/cases/unnamed-typed-path-without-a-body/{schema.yaml → schema.md} +2 -0
  154. package/fixtures/cases/unresolved-link/schema.md +7 -0
  155. package/fixtures/cases/valid-typed-document/{schema.yaml → schema.md} +2 -0
  156. package/fixtures/cases/wide-item-fence-link/schema.md +3 -0
  157. package/fixtures/references.json +15 -0
  158. package/package.json +1 -1
  159. package/fixtures/cases/declared-binary-links/schema.yaml +0 -1
  160. package/fixtures/cases/default-unfilled/schema.yaml +0 -55
  161. package/fixtures/cases/defs-pattern/schema.yaml +0 -55
  162. package/fixtures/cases/dependent-rule/schema.yaml +0 -55
  163. package/fixtures/cases/email-format/schema.yaml +0 -55
  164. package/fixtures/cases/fenced-link-definition/schema.yaml +0 -5
  165. package/fixtures/cases/frontmatter-schema/expected.json +0 -5
  166. package/fixtures/cases/integer-field/schema.yaml +0 -55
  167. package/fixtures/cases/interrupted-link-definition/schema.yaml +0 -1
  168. package/fixtures/cases/json-schema-constructs/schema.yaml +0 -55
  169. package/fixtures/cases/list-of-objects-closed/schema.yaml +0 -55
  170. package/fixtures/cases/list-of-objects-item/schema.yaml +0 -55
  171. package/fixtures/cases/list-size/schema.yaml +0 -55
  172. package/fixtures/cases/long-fence-link-definition/schema.yaml +0 -1
  173. package/fixtures/cases/misspelled-key/schema.yaml +0 -55
  174. package/fixtures/cases/nested-object-reference/schema.yaml +0 -32
  175. package/fixtures/cases/nested-reference/schema.yaml +0 -32
  176. package/fixtures/cases/nested-required-field/schema.yaml +0 -55
  177. package/fixtures/cases/numeric-range/schema.yaml +0 -55
  178. package/fixtures/cases/one-of-variant/schema.yaml +0 -55
  179. package/fixtures/cases/other-room-reference/schema.yaml +0 -32
  180. package/fixtures/cases/paragraph-link-definition/schema.yaml +0 -1
  181. package/fixtures/cases/prototype-field/schema.yaml +0 -5
  182. package/fixtures/cases/quoted-link-definition/schema.yaml +0 -1
  183. package/fixtures/cases/shortcut-reference-link/schema.yaml +0 -5
  184. package/fixtures/cases/string-length/schema.yaml +0 -55
  185. package/fixtures/cases/truncated-link-definition/schema.yaml +0 -1
  186. package/fixtures/cases/undeclared-field/schema.yaml +0 -5
  187. package/fixtures/cases/unresolved-link/schema.yaml +0 -5
  188. package/fixtures/cases/wide-item-fence-link/schema.yaml +0 -1
  189. /package/fixtures/cases/{frontmatter-schema → schema-body-ignored}/context.json +0 -0
  190. /package/fixtures/cases/{frontmatter-schema/schema.yaml → unknown-type/schema.md} +0 -0
@@ -1,3 +1,4 @@
1
+ ---
1
2
  person:
2
3
  properties:
3
4
  name: { type: string }
@@ -8,3 +9,4 @@ task:
8
9
  owner: { type: string, reference: person }
9
10
  description: { type: string, contentMediaType: text/markdown, minLength: 1, title: Description }
10
11
  required: [ title, owner, description ]
12
+ ---
@@ -1,3 +1,4 @@
1
+ ---
1
2
  person:
2
3
  properties:
3
4
  name: { type: string }
@@ -8,3 +9,4 @@ task:
8
9
  owner: { type: string, reference: person }
9
10
  description: { type: string, contentMediaType: text/markdown, minLength: 1, title: Description }
10
11
  required: [ title, owner, description ]
12
+ ---
@@ -1,3 +1,5 @@
1
+ ---
1
2
  deal:
2
3
  properties:
3
4
  shipping: { $ref: 'https://example.com/address.json' }
5
+ ---
@@ -0,0 +1 @@
1
+ { "verdict": "accept" }
@@ -0,0 +1,9 @@
1
+ ---
2
+ task:
3
+ properties:
4
+ title: { type: string }
5
+ ---
6
+
7
+ # Types
8
+
9
+ task: [not, yaml {
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,5 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "location": "/folders",
4
+ "rule": "schema-type-name"
5
+ }
@@ -0,0 +1,5 @@
1
+ ---
2
+ folders:
3
+ properties:
4
+ title: { type: string }
5
+ ---
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,5 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "location": "/type",
4
+ "rule": "schema-type-name"
5
+ }
@@ -1,3 +1,5 @@
1
- task:
1
+ ---
2
+ type:
2
3
  properties:
3
4
  title: { type: string }
5
+ ---
@@ -1,4 +1,6 @@
1
+ ---
1
2
  contact:
2
3
  member_document: true
3
4
  person:
4
5
  member_document: true
6
+ ---
@@ -1,6 +1,8 @@
1
+ ---
1
2
  task:
2
3
  properties:
3
4
  title: { type: string }
4
5
  required: [ title ]
5
6
  sections:
6
7
  Acceptance: { kind: list, items: { type: string } }
8
+ ---
@@ -0,0 +1,7 @@
1
+ ---
2
+ task:
3
+ properties:
4
+ title: { type: string }
5
+ description: { type: string, contentMediaType: text/markdown, minLength: 1, title: Description }
6
+ required: [ title, description ]
7
+ ---
@@ -0,0 +1,57 @@
1
+ ---
2
+ $defs:
3
+ address:
4
+ type: object
5
+ properties:
6
+ city: { type: string }
7
+ country: { type: string, pattern: '^[A-Z]{2}$' }
8
+ required: [ city ]
9
+ company:
10
+ properties:
11
+ name: { type: string }
12
+ deal:
13
+ type: object
14
+ properties:
15
+ title: { type: string, minLength: 1, maxLength: 40 }
16
+ company: { type: string, reference: company }
17
+ stage: { enum: [ lead, proposal, won, lost ], default: lead }
18
+ amount: { type: integer, minimum: 0 }
19
+ probability: { type: number, minimum: 0, maximum: 1 }
20
+ open: { type: boolean }
21
+ closes_at: { type: string, format: date-time }
22
+ contact_email: { type: string, format: email }
23
+ note: { type: [ string, 'null' ] }
24
+ shipping: { $ref: '#/$defs/address' }
25
+ tags: { type: array, items: { type: string }, maxItems: 3 }
26
+ lines:
27
+ type: array
28
+ items:
29
+ type: object
30
+ properties:
31
+ product: { type: string }
32
+ quantity: { type: integer, minimum: 1 }
33
+ required: [ product, quantity ]
34
+ blocks:
35
+ type: array
36
+ items:
37
+ oneOf:
38
+ - properties:
39
+ kind: { const: paragraph }
40
+ text: { type: string }
41
+ required: [ kind, text ]
42
+ - properties:
43
+ kind: { const: quiz }
44
+ question: { type: string }
45
+ required: [ kind, question ]
46
+ attributes:
47
+ type: object
48
+ additionalProperties: { type: string }
49
+ description: { type: string, contentMediaType: text/markdown, title: Description }
50
+ required: [ title, company, stage ]
51
+ if:
52
+ properties:
53
+ stage: { const: won }
54
+ required: [ stage ]
55
+ then:
56
+ required: [ amount ]
57
+ ---
@@ -1,4 +1,6 @@
1
+ ---
1
2
  note:
2
3
  properties:
3
4
  title: { type: string }
4
5
  required: [title]
6
+ ---
@@ -1,4 +1,6 @@
1
+ ---
1
2
  page:
2
3
  properties:
3
4
  name: { type: string }
4
5
  required: [name]
6
+ ---
@@ -1,3 +1,5 @@
1
+ ---
1
2
  task:
2
3
  properties:
3
4
  acceptance: { type: array, items: { type: string }, title: Acceptance }
5
+ ---
@@ -0,0 +1,3 @@
1
+ ---
2
+ note: {}
3
+ ---
@@ -1,6 +1,8 @@
1
+ ---
1
2
  prefs:
2
3
  properties:
3
4
  theme: { type: string }
4
5
  note:
5
6
  properties:
6
7
  title: { type: string }
8
+ ---
@@ -1,6 +1,8 @@
1
+ ---
1
2
  prefs:
2
3
  properties:
3
4
  theme: { type: string }
4
5
  note:
5
6
  properties:
6
7
  title: { type: string }
8
+ ---
@@ -1,6 +1,8 @@
1
+ ---
1
2
  prefs:
2
3
  properties:
3
4
  theme: { type: string }
4
5
  note:
5
6
  properties:
6
7
  title: { type: string }
8
+ ---
@@ -1,4 +1,6 @@
1
+ ---
1
2
  task:
2
3
  properties:
3
4
  title: { type: string }
4
5
  required: [title]
6
+ ---
@@ -0,0 +1,7 @@
1
+ ---
2
+ task:
3
+ properties:
4
+ title: { type: string }
5
+ description: { type: string, contentMediaType: text/markdown, minLength: 1, title: Description }
6
+ required: [ title, description ]
7
+ ---
@@ -1,3 +1,4 @@
1
+ ---
1
2
  trip:
2
3
  properties:
3
4
  stops:
@@ -8,3 +9,4 @@ trip:
8
9
  type: object
9
10
  properties:
10
11
  city: { type: string }
12
+ ---
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,5 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "location": "/ticket/properties/number/unique",
4
+ "rule": "unique"
5
+ }
@@ -0,0 +1,7 @@
1
+ ticket:
2
+ properties:
3
+ name: { type: string }
4
+ number: { type: integer, unique: true, title: Number }
5
+ status: { enum: [open, done], title: Status }
6
+ required: [name, number]
7
+ indexed: [number, status]
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1 @@
1
+ { "verdict": "accept" }
@@ -0,0 +1,8 @@
1
+ ---
2
+ type: ticket
3
+ ---
4
+
5
+ # Fix the door
6
+
7
+ - **Number**: 1
8
+ - **Status**: open
@@ -0,0 +1,8 @@
1
+ ---
2
+ type: ticket
3
+ ---
4
+
5
+ # Paint the fence
6
+
7
+ - **Number**: 2
8
+ - **Status**: open
@@ -0,0 +1,9 @@
1
+ ---
2
+ ticket:
3
+ properties:
4
+ name: { type: string }
5
+ number: { type: integer, unique: true, title: Number }
6
+ status: { enum: [open, done], title: Status }
7
+ required: [name, number]
8
+ indexed: [number, status]
9
+ ---
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,5 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "location": "/ticket/properties/number/unique",
4
+ "rule": "unique"
5
+ }
@@ -0,0 +1,9 @@
1
+ ---
2
+ ticket:
3
+ properties:
4
+ name: { type: string }
5
+ number: { type: integer, unique: true, title: Number }
6
+ status: { enum: [open, done], title: Status }
7
+ required: [name, number]
8
+ indexed: [status]
9
+ ---
@@ -1,3 +1,5 @@
1
+ ---
1
2
  task:
2
3
  properties:
3
4
  owner: { type: string, reference: person }
5
+ ---
@@ -1,5 +1,7 @@
1
+ ---
1
2
  task:
2
3
  properties:
3
4
  title: { type: string, maxLength: 20 }
4
5
  owner: { type: string, format: uuid }
5
6
  required: [title, owner]
7
+ ---
@@ -1,5 +1,7 @@
1
+ ---
1
2
  task:
2
3
  properties:
3
4
  title: { type: string, maxLength: 20 }
4
5
  owner: { type: string, format: uuid }
5
6
  required: [title, owner]
7
+ ---
@@ -1,5 +1,7 @@
1
+ ---
1
2
  task:
2
3
  properties:
3
4
  title: { type: string, maxLength: 20 }
4
5
  owner: { type: string, format: uuid }
5
6
  required: [title, owner]
7
+ ---
@@ -1,5 +1,7 @@
1
+ ---
1
2
  task:
2
3
  properties:
3
4
  title: { type: string, maxLength: 20 }
4
5
  owner: { type: string, format: uuid }
5
6
  required: [title, owner]
7
+ ---
@@ -0,0 +1,7 @@
1
+ ---
2
+ task:
3
+ properties:
4
+ title: { type: string }
5
+ description: { type: string, contentMediaType: text/markdown, minLength: 1, title: Description }
6
+ required: [ title, description ]
7
+ ---
@@ -1,3 +1,4 @@
1
+ ---
1
2
  person:
2
3
  properties:
3
4
  name: { type: string }
@@ -13,3 +14,4 @@ task:
13
14
  description: { type: string, contentMediaType: text/markdown, minLength: 1, title: Description }
14
15
  acceptance: { type: array, items: { type: string }, title: Acceptance }
15
16
  required: [ title, status, description ]
17
+ ---
@@ -0,0 +1,3 @@
1
+ ---
2
+ note: {}
3
+ ---
@@ -0,0 +1,15 @@
1
+ [
2
+ { "name": "a Room", "reference": "r_3k9.q", "pattern": "room" },
3
+ { "name": "an App", "reference": "a_3k9.q", "pattern": "app" },
4
+ { "name": "a Space", "reference": "sp_3k9.q", "pattern": "space" },
5
+ { "name": "a document", "reference": "d_3k9.q", "pattern": "document" },
6
+ { "name": "an attachment", "reference": "at_3k9.q", "pattern": "attachment" },
7
+ { "name": "a revision", "reference": "v_3k9.2.q", "pattern": "revision" },
8
+ { "name": "a document's ordinal never starts with zero", "reference": "d_03k9.q", "pattern": null },
9
+ { "name": "a revision's number never starts with zero", "reference": "v_3k9.02.q", "pattern": null },
10
+ { "name": "a reference is lower case", "reference": "D_3K9.Q", "pattern": null },
11
+ { "name": "an entry reference carries no revision", "reference": "at_3k9.2.q", "pattern": null },
12
+ { "name": "a revision carries its entry's ordinal", "reference": "v_2.q", "pattern": null },
13
+ { "name": "an authored file's old form", "reference": "af_3k9.q", "pattern": null },
14
+ { "name": "a file revision's old form", "reference": "fr_3k9.2.q", "pattern": null }
15
+ ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentshouse/mdmodel",
3
- "version": "0.1.0-ce47d8f9de14a",
3
+ "version": "0.1.0-ce60fddcab8ff",
4
4
  "description": "MD Type language, parser, validator, structured change application, Markdown syntax profile, and conformance fixtures",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1 +0,0 @@
1
- note: {}
@@ -1,55 +0,0 @@
1
- $defs:
2
- address:
3
- type: object
4
- properties:
5
- city: { type: string }
6
- country: { type: string, pattern: '^[A-Z]{2}$' }
7
- required: [ city ]
8
- company:
9
- properties:
10
- name: { type: string }
11
- deal:
12
- type: object
13
- properties:
14
- title: { type: string, minLength: 1, maxLength: 40 }
15
- company: { type: string, reference: company }
16
- stage: { enum: [ lead, proposal, won, lost ], default: lead }
17
- amount: { type: integer, minimum: 0 }
18
- probability: { type: number, minimum: 0, maximum: 1 }
19
- open: { type: boolean }
20
- closes_at: { type: string, format: date-time }
21
- contact_email: { type: string, format: email }
22
- note: { type: [ string, 'null' ] }
23
- shipping: { $ref: '#/$defs/address' }
24
- tags: { type: array, items: { type: string }, maxItems: 3 }
25
- lines:
26
- type: array
27
- items:
28
- type: object
29
- properties:
30
- product: { type: string }
31
- quantity: { type: integer, minimum: 1 }
32
- required: [ product, quantity ]
33
- blocks:
34
- type: array
35
- items:
36
- oneOf:
37
- - properties:
38
- kind: { const: paragraph }
39
- text: { type: string }
40
- required: [ kind, text ]
41
- - properties:
42
- kind: { const: quiz }
43
- question: { type: string }
44
- required: [ kind, question ]
45
- attributes:
46
- type: object
47
- additionalProperties: { type: string }
48
- description: { type: string, contentMediaType: text/markdown, title: Description }
49
- required: [ title, company, stage ]
50
- if:
51
- properties:
52
- stage: { const: won }
53
- required: [ stage ]
54
- then:
55
- required: [ amount ]
@@ -1,55 +0,0 @@
1
- $defs:
2
- address:
3
- type: object
4
- properties:
5
- city: { type: string }
6
- country: { type: string, pattern: '^[A-Z]{2}$' }
7
- required: [ city ]
8
- company:
9
- properties:
10
- name: { type: string }
11
- deal:
12
- type: object
13
- properties:
14
- title: { type: string, minLength: 1, maxLength: 40 }
15
- company: { type: string, reference: company }
16
- stage: { enum: [ lead, proposal, won, lost ], default: lead }
17
- amount: { type: integer, minimum: 0 }
18
- probability: { type: number, minimum: 0, maximum: 1 }
19
- open: { type: boolean }
20
- closes_at: { type: string, format: date-time }
21
- contact_email: { type: string, format: email }
22
- note: { type: [ string, 'null' ] }
23
- shipping: { $ref: '#/$defs/address' }
24
- tags: { type: array, items: { type: string }, maxItems: 3 }
25
- lines:
26
- type: array
27
- items:
28
- type: object
29
- properties:
30
- product: { type: string }
31
- quantity: { type: integer, minimum: 1 }
32
- required: [ product, quantity ]
33
- blocks:
34
- type: array
35
- items:
36
- oneOf:
37
- - properties:
38
- kind: { const: paragraph }
39
- text: { type: string }
40
- required: [ kind, text ]
41
- - properties:
42
- kind: { const: quiz }
43
- question: { type: string }
44
- required: [ kind, question ]
45
- attributes:
46
- type: object
47
- additionalProperties: { type: string }
48
- description: { type: string, contentMediaType: text/markdown, title: Description }
49
- required: [ title, company, stage ]
50
- if:
51
- properties:
52
- stage: { const: won }
53
- required: [ stage ]
54
- then:
55
- required: [ amount ]
@@ -1,55 +0,0 @@
1
- $defs:
2
- address:
3
- type: object
4
- properties:
5
- city: { type: string }
6
- country: { type: string, pattern: '^[A-Z]{2}$' }
7
- required: [ city ]
8
- company:
9
- properties:
10
- name: { type: string }
11
- deal:
12
- type: object
13
- properties:
14
- title: { type: string, minLength: 1, maxLength: 40 }
15
- company: { type: string, reference: company }
16
- stage: { enum: [ lead, proposal, won, lost ], default: lead }
17
- amount: { type: integer, minimum: 0 }
18
- probability: { type: number, minimum: 0, maximum: 1 }
19
- open: { type: boolean }
20
- closes_at: { type: string, format: date-time }
21
- contact_email: { type: string, format: email }
22
- note: { type: [ string, 'null' ] }
23
- shipping: { $ref: '#/$defs/address' }
24
- tags: { type: array, items: { type: string }, maxItems: 3 }
25
- lines:
26
- type: array
27
- items:
28
- type: object
29
- properties:
30
- product: { type: string }
31
- quantity: { type: integer, minimum: 1 }
32
- required: [ product, quantity ]
33
- blocks:
34
- type: array
35
- items:
36
- oneOf:
37
- - properties:
38
- kind: { const: paragraph }
39
- text: { type: string }
40
- required: [ kind, text ]
41
- - properties:
42
- kind: { const: quiz }
43
- question: { type: string }
44
- required: [ kind, question ]
45
- attributes:
46
- type: object
47
- additionalProperties: { type: string }
48
- description: { type: string, contentMediaType: text/markdown, title: Description }
49
- required: [ title, company, stage ]
50
- if:
51
- properties:
52
- stage: { const: won }
53
- required: [ stage ]
54
- then:
55
- required: [ amount ]
@@ -1,55 +0,0 @@
1
- $defs:
2
- address:
3
- type: object
4
- properties:
5
- city: { type: string }
6
- country: { type: string, pattern: '^[A-Z]{2}$' }
7
- required: [ city ]
8
- company:
9
- properties:
10
- name: { type: string }
11
- deal:
12
- type: object
13
- properties:
14
- title: { type: string, minLength: 1, maxLength: 40 }
15
- company: { type: string, reference: company }
16
- stage: { enum: [ lead, proposal, won, lost ], default: lead }
17
- amount: { type: integer, minimum: 0 }
18
- probability: { type: number, minimum: 0, maximum: 1 }
19
- open: { type: boolean }
20
- closes_at: { type: string, format: date-time }
21
- contact_email: { type: string, format: email }
22
- note: { type: [ string, 'null' ] }
23
- shipping: { $ref: '#/$defs/address' }
24
- tags: { type: array, items: { type: string }, maxItems: 3 }
25
- lines:
26
- type: array
27
- items:
28
- type: object
29
- properties:
30
- product: { type: string }
31
- quantity: { type: integer, minimum: 1 }
32
- required: [ product, quantity ]
33
- blocks:
34
- type: array
35
- items:
36
- oneOf:
37
- - properties:
38
- kind: { const: paragraph }
39
- text: { type: string }
40
- required: [ kind, text ]
41
- - properties:
42
- kind: { const: quiz }
43
- question: { type: string }
44
- required: [ kind, question ]
45
- attributes:
46
- type: object
47
- additionalProperties: { type: string }
48
- description: { type: string, contentMediaType: text/markdown, title: Description }
49
- required: [ title, company, stage ]
50
- if:
51
- properties:
52
- stage: { const: won }
53
- required: [ stage ]
54
- then:
55
- required: [ amount ]
@@ -1,5 +0,0 @@
1
- task:
2
- properties:
3
- title: { type: string }
4
- description: { type: string, contentMediaType: text/markdown, minLength: 1, title: Description }
5
- required: [ title, description ]
@@ -1,5 +0,0 @@
1
- {
2
- "verdict": "refuse",
3
- "location": "line 1",
4
- "rule": "schema-yaml"
5
- }