@agentshouse/mdmodel 0.1.0-c2987f5d89720 → 0.1.0-c2e6f0cf254e0

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 (430) hide show
  1. package/API.md +354 -234
  2. package/README.md +28 -29
  3. package/dist/body.d.ts +85 -0
  4. package/dist/body.d.ts.map +1 -0
  5. package/dist/body.js +1083 -0
  6. package/dist/built-in.d.ts +4 -0
  7. package/dist/built-in.d.ts.map +1 -0
  8. package/dist/built-in.js +19 -0
  9. package/dist/definition.d.ts +44 -10
  10. package/dist/definition.d.ts.map +1 -1
  11. package/dist/definition.js +480 -104
  12. package/dist/divide.d.ts.map +1 -1
  13. package/dist/divide.js +32 -21
  14. package/dist/document.d.ts +19 -13
  15. package/dist/document.d.ts.map +1 -1
  16. package/dist/document.js +993 -210
  17. package/dist/event.d.ts +77 -0
  18. package/dist/event.d.ts.map +1 -0
  19. package/dist/event.js +200 -0
  20. package/dist/facts.d.ts +15 -0
  21. package/dist/facts.d.ts.map +1 -0
  22. package/dist/facts.js +41 -0
  23. package/dist/fields.d.ts +3 -1
  24. package/dist/fields.d.ts.map +1 -1
  25. package/dist/fields.js +8 -1
  26. package/dist/form.d.ts +4 -0
  27. package/dist/form.d.ts.map +1 -0
  28. package/dist/form.js +153 -0
  29. package/dist/house-model.d.ts +831 -0
  30. package/dist/house-model.d.ts.map +1 -0
  31. package/dist/house-model.js +462 -0
  32. package/dist/house-references/crockford.d.ts +4 -0
  33. package/dist/house-references/crockford.d.ts.map +1 -0
  34. package/dist/house-references/crockford.js +3 -0
  35. package/dist/house-references/patterns.d.ts +9 -0
  36. package/dist/house-references/patterns.d.ts.map +1 -0
  37. package/dist/house-references/patterns.js +13 -0
  38. package/dist/index.d.ts +38 -10
  39. package/dist/index.d.ts.map +1 -1
  40. package/dist/index.js +23 -7
  41. package/dist/kinds.d.ts +18 -0
  42. package/dist/kinds.d.ts.map +1 -0
  43. package/dist/kinds.js +150 -0
  44. package/dist/markdown.d.ts +75 -0
  45. package/dist/markdown.d.ts.map +1 -0
  46. package/dist/markdown.js +265 -0
  47. package/dist/media-type.d.ts +72 -0
  48. package/dist/media-type.d.ts.map +1 -0
  49. package/dist/media-type.js +157 -0
  50. package/dist/paths.d.ts +20 -2
  51. package/dist/paths.d.ts.map +1 -1
  52. package/dist/paths.js +177 -16
  53. package/dist/pattern.d.ts +10 -0
  54. package/dist/pattern.d.ts.map +1 -0
  55. package/dist/pattern.js +356 -0
  56. package/dist/project.d.ts +1 -0
  57. package/dist/project.d.ts.map +1 -1
  58. package/dist/project.js +61 -65
  59. package/dist/query/language.d.ts +254 -0
  60. package/dist/query/language.d.ts.map +1 -0
  61. package/dist/query/language.js +620 -0
  62. package/dist/query/match.d.ts +14 -0
  63. package/dist/query/match.d.ts.map +1 -0
  64. package/dist/query/match.js +150 -0
  65. package/dist/query/rows.d.ts +32 -0
  66. package/dist/query/rows.d.ts.map +1 -0
  67. package/dist/query/rows.js +161 -0
  68. package/dist/query/sql.d.ts +39 -0
  69. package/dist/query/sql.d.ts.map +1 -0
  70. package/dist/query/sql.js +285 -0
  71. package/dist/references.d.ts +2 -2
  72. package/dist/references.d.ts.map +1 -1
  73. package/dist/references.js +6 -1
  74. package/dist/refuse.d.ts +1 -0
  75. package/dist/refuse.d.ts.map +1 -1
  76. package/dist/refuse.js +1 -0
  77. package/dist/reserved.d.ts +6 -0
  78. package/dist/reserved.d.ts.map +1 -0
  79. package/dist/reserved.js +21 -0
  80. package/dist/room-types.d.ts +7 -0
  81. package/dist/room-types.d.ts.map +1 -0
  82. package/dist/room-types.js +137 -0
  83. package/dist/schema.d.ts +0 -1
  84. package/dist/schema.d.ts.map +1 -1
  85. package/dist/schema.js +10 -22
  86. package/dist/types.d.ts +72 -3
  87. package/dist/types.d.ts.map +1 -1
  88. package/dist/validate.d.ts +34 -2
  89. package/dist/validate.d.ts.map +1 -1
  90. package/dist/validate.js +383 -140
  91. package/dist/yaml.d.ts +7 -3
  92. package/dist/yaml.d.ts.map +1 -1
  93. package/dist/yaml.js +110 -55
  94. package/fixtures/README.md +62 -25
  95. package/fixtures/cases/absent-link-dangles/library/item.md +8 -0
  96. package/fixtures/cases/absent-link-dangles/schema.yaml +5 -0
  97. package/fixtures/cases/absent-optional-field/library/companies/acme.md +1 -1
  98. package/fixtures/cases/absent-optional-field/library/deals/lead.md +3 -3
  99. package/fixtures/cases/absent-optional-field/schema.yaml +10 -11
  100. package/fixtures/cases/{missing-binary-image → absolute-link}/expected.json +1 -1
  101. package/fixtures/cases/absolute-link/library/item.md +8 -0
  102. package/fixtures/cases/absolute-link/schema.yaml +5 -0
  103. package/fixtures/cases/attachment-reference-any-file/library/companies/acme.md +1 -1
  104. package/fixtures/cases/attachment-reference-any-file/library/deals/renewal.md +13 -10
  105. package/fixtures/cases/attachment-reference-any-file/library/places/depot.md +1 -1
  106. package/fixtures/cases/attachment-reference-any-file/library/products/seats.md +1 -1
  107. package/fixtures/cases/attachment-reference-any-file/library/products/support.md +1 -1
  108. package/fixtures/cases/attachment-reference-dangles/library/companies/acme.md +1 -1
  109. package/fixtures/cases/attachment-reference-dangles/library/deals/renewal.md +13 -10
  110. package/fixtures/cases/attachment-reference-dangles/library/places/depot.md +1 -1
  111. package/fixtures/cases/attachment-reference-dangles/library/products/seats.md +1 -1
  112. package/fixtures/cases/attachment-reference-dangles/library/products/support.md +1 -1
  113. package/fixtures/cases/attachment-reference-outside/expected.json +2 -1
  114. package/fixtures/cases/attachment-reference-outside/library/companies/acme.md +1 -1
  115. package/fixtures/cases/attachment-reference-outside/library/deals/renewal.md +13 -10
  116. package/fixtures/cases/attachment-reference-outside/library/places/depot.md +1 -1
  117. package/fixtures/cases/attachment-reference-outside/library/products/seats.md +1 -1
  118. package/fixtures/cases/attachment-reference-outside/library/products/support.md +1 -1
  119. package/fixtures/cases/binary-any-reference/expected.json +2 -1
  120. package/fixtures/cases/binary-any-reference/library/notes/draft.md +1 -1
  121. package/fixtures/cases/binary-image-dangles/expected.json +1 -0
  122. package/fixtures/cases/binary-link-dangles/expected.json +1 -0
  123. package/fixtures/cases/binary-prototype-reference/expected.json +2 -1
  124. package/fixtures/cases/binary-prototype-reference/library/notes/draft.md +1 -1
  125. package/fixtures/cases/binary-typed-reference/expected.json +2 -1
  126. package/fixtures/cases/binary-typed-reference/library/notes/draft.md +1 -1
  127. package/fixtures/cases/boolean-field/expected.json +2 -1
  128. package/fixtures/cases/boolean-field/library/companies/acme.md +1 -1
  129. package/fixtures/cases/boolean-field/library/deals/renewal.md +49 -24
  130. package/fixtures/cases/boolean-field/schema.yaml +10 -11
  131. package/fixtures/cases/bracketed-link-definition/library/item.md +1 -1
  132. package/fixtures/cases/bracketed-link-definition/schema.yaml +2 -3
  133. package/fixtures/cases/closed-nested-object/expected.json +2 -1
  134. package/fixtures/cases/closed-nested-object/library/companies/acme.md +1 -1
  135. package/fixtures/cases/closed-nested-object/library/deals/renewal.md +50 -25
  136. package/fixtures/cases/closed-nested-object/schema.yaml +10 -11
  137. package/fixtures/cases/composed-root-reference/library/a.md +2 -2
  138. package/fixtures/cases/conditional-long-text/expected.json +7 -0
  139. package/fixtures/cases/conditional-long-text/library/questions/hosting.md +9 -0
  140. package/fixtures/cases/conditional-long-text/library/questions/payments.md +12 -0
  141. package/fixtures/cases/conditional-long-text/schema.yaml +13 -0
  142. package/fixtures/cases/cross-room-link/expected.json +1 -0
  143. package/fixtures/cases/cross-room-link/library/clients/acme.md +6 -0
  144. package/fixtures/cases/cross-room-link/schema.yaml +3 -0
  145. package/fixtures/cases/cross-room-reference/expected.json +1 -0
  146. package/fixtures/cases/cross-room-reference/library/clients/acme.md +9 -0
  147. package/fixtures/cases/cross-room-reference/schema.yaml +8 -0
  148. package/fixtures/cases/date-time-format/expected.json +2 -1
  149. package/fixtures/cases/date-time-format/library/companies/acme.md +1 -1
  150. package/fixtures/cases/date-time-format/library/deals/renewal.md +49 -24
  151. package/fixtures/cases/date-time-format/schema.yaml +10 -11
  152. package/fixtures/cases/default-unfilled/library/companies/acme.md +1 -1
  153. package/fixtures/cases/default-unfilled/library/deals/renewal.md +47 -22
  154. package/fixtures/cases/default-unfilled/schema.yaml +10 -11
  155. package/fixtures/cases/defs-pattern/expected.json +2 -1
  156. package/fixtures/cases/defs-pattern/library/companies/acme.md +1 -1
  157. package/fixtures/cases/defs-pattern/library/deals/renewal.md +49 -24
  158. package/fixtures/cases/defs-pattern/schema.yaml +10 -11
  159. package/fixtures/cases/dependent-rule/library/companies/acme.md +1 -1
  160. package/fixtures/cases/dependent-rule/library/deals/renewal.md +48 -23
  161. package/fixtures/cases/dependent-rule/schema.yaml +10 -11
  162. package/fixtures/cases/duplicate-link-definition/library/item.md +1 -1
  163. package/fixtures/cases/duplicate-link-definition/schema.yaml +2 -3
  164. package/fixtures/cases/email-format/expected.json +2 -1
  165. package/fixtures/cases/email-format/library/companies/acme.md +1 -1
  166. package/fixtures/cases/email-format/library/deals/renewal.md +49 -24
  167. package/fixtures/cases/email-format/schema.yaml +10 -11
  168. package/fixtures/cases/equal-labels/expected.json +5 -0
  169. package/fixtures/cases/equal-labels/schema.yaml +4 -0
  170. package/fixtures/cases/fenced-link-definition/library/item.md +1 -1
  171. package/fixtures/cases/fenced-link-definition/schema.yaml +2 -3
  172. package/fixtures/cases/field-enum/expected.json +2 -1
  173. package/fixtures/cases/field-enum/library/item.md +2 -2
  174. package/fixtures/cases/field-enum/schema.yaml +3 -4
  175. package/fixtures/cases/integer-field/expected.json +2 -1
  176. package/fixtures/cases/integer-field/library/companies/acme.md +1 -1
  177. package/fixtures/cases/integer-field/library/deals/renewal.md +49 -24
  178. package/fixtures/cases/integer-field/schema.yaml +10 -11
  179. package/fixtures/cases/json-schema-constructs/library/companies/acme.md +1 -1
  180. package/fixtures/cases/json-schema-constructs/library/deals/renewal.md +49 -24
  181. package/fixtures/cases/json-schema-constructs/schema.yaml +10 -11
  182. package/fixtures/cases/labels-in-the-rooms-language/expected.json +1 -0
  183. package/fixtures/cases/labels-in-the-rooms-language/library/deals/atlas.md +7 -0
  184. package/fixtures/cases/labels-in-the-rooms-language/schema.yaml +9 -0
  185. package/fixtures/cases/lazy-list-item/expected.json +3 -0
  186. package/fixtures/cases/lazy-list-item/library/item.md +10 -0
  187. package/fixtures/cases/lazy-list-item/schema.yaml +3 -0
  188. package/fixtures/cases/link-into-a-reserved-name/context.json +1 -0
  189. package/fixtures/cases/link-into-a-reserved-name/expected.json +5 -0
  190. package/fixtures/cases/link-into-a-reserved-name/library/notes/a.md +6 -0
  191. package/fixtures/cases/link-into-a-reserved-name/schema.yaml +3 -0
  192. package/fixtures/cases/{missing-binary-link → link-into-a-reserved-name-from-an-untyped-document}/expected.json +1 -1
  193. package/fixtures/cases/link-into-a-reserved-name-from-an-untyped-document/library/notes/b.md +5 -0
  194. package/fixtures/cases/list-item-enum/context.json +1 -0
  195. package/fixtures/cases/list-item-enum/expected.json +7 -0
  196. package/fixtures/cases/list-item-enum/library/task.md +7 -0
  197. package/fixtures/cases/list-item-enum/schema.yaml +3 -0
  198. package/fixtures/cases/list-item-kind/context.json +1 -0
  199. package/fixtures/cases/list-item-kind/expected.json +7 -0
  200. package/fixtures/cases/list-item-kind/library/task.md +6 -0
  201. package/fixtures/cases/list-item-kind/schema.yaml +3 -0
  202. package/fixtures/cases/list-items/context.json +1 -0
  203. package/fixtures/cases/list-items/expected.json +1 -0
  204. package/fixtures/cases/list-items/library/page.md +26 -0
  205. package/fixtures/cases/list-items/schema.yaml +10 -0
  206. package/fixtures/cases/list-of-objects-closed/expected.json +2 -1
  207. package/fixtures/cases/list-of-objects-closed/library/companies/acme.md +1 -1
  208. package/fixtures/cases/list-of-objects-closed/library/deals/renewal.md +49 -25
  209. package/fixtures/cases/list-of-objects-closed/schema.yaml +10 -11
  210. package/fixtures/cases/list-of-objects-item/expected.json +2 -1
  211. package/fixtures/cases/list-of-objects-item/library/companies/acme.md +1 -1
  212. package/fixtures/cases/list-of-objects-item/library/deals/renewal.md +49 -24
  213. package/fixtures/cases/list-of-objects-item/schema.yaml +10 -11
  214. package/fixtures/cases/list-of-objects-reference/expected.json +2 -1
  215. package/fixtures/cases/list-of-objects-reference/library/companies/acme.md +1 -1
  216. package/fixtures/cases/list-of-objects-reference/library/deals/renewal.md +12 -9
  217. package/fixtures/cases/list-of-objects-reference/library/places/depot.md +1 -1
  218. package/fixtures/cases/list-of-objects-reference/library/products/seats.md +1 -1
  219. package/fixtures/cases/list-of-objects-reference/library/products/support.md +1 -1
  220. package/fixtures/cases/list-reference-path/context.json +1 -0
  221. package/fixtures/cases/list-reference-path/expected.json +7 -0
  222. package/fixtures/cases/list-reference-path/library/page.md +5 -0
  223. package/fixtures/cases/list-reference-path/schema.yaml +3 -0
  224. package/fixtures/cases/list-reference-type/context.json +1 -0
  225. package/fixtures/cases/list-reference-type/expected.json +7 -0
  226. package/fixtures/cases/list-reference-type/library/page.md +6 -0
  227. package/fixtures/cases/list-reference-type/schema.yaml +3 -0
  228. package/fixtures/cases/list-size/expected.json +2 -1
  229. package/fixtures/cases/list-size/library/companies/acme.md +1 -1
  230. package/fixtures/cases/list-size/library/deals/renewal.md +51 -24
  231. package/fixtures/cases/list-size/schema.yaml +10 -11
  232. package/fixtures/cases/long-value-past-six-levels/context.json +1 -0
  233. package/fixtures/cases/long-value-past-six-levels/expected.json +5 -0
  234. package/fixtures/cases/long-value-past-six-levels/schema.yaml +15 -0
  235. package/fixtures/cases/malformed-list/context.json +1 -0
  236. package/fixtures/cases/malformed-list/expected.json +7 -0
  237. package/fixtures/cases/{structured-section → malformed-list}/library/item.md +1 -1
  238. package/fixtures/cases/malformed-list/schema.yaml +6 -0
  239. package/fixtures/cases/member-document/library/people/ana.md +2 -2
  240. package/fixtures/cases/member-on-an-untyped-document/context.json +1 -0
  241. package/fixtures/cases/member-on-an-untyped-document/expected.json +6 -0
  242. package/fixtures/cases/member-on-an-untyped-document/library/note.md +4 -0
  243. package/fixtures/cases/member-on-another-type/context.json +1 -0
  244. package/fixtures/cases/member-on-another-type/expected.json +6 -0
  245. package/fixtures/cases/member-on-another-type/library/note.md +4 -0
  246. package/fixtures/cases/member-on-another-type/schema.yaml +7 -0
  247. package/fixtures/cases/missing-required-field/library/item.md +1 -1
  248. package/fixtures/cases/missing-required-field/schema.yaml +3 -4
  249. package/fixtures/cases/misspelled-key/expected.json +2 -1
  250. package/fixtures/cases/misspelled-key/library/companies/acme.md +1 -1
  251. package/fixtures/cases/misspelled-key/library/deals/renewal.md +50 -25
  252. package/fixtures/cases/misspelled-key/schema.yaml +10 -11
  253. package/fixtures/cases/name-not-a-string/context.json +1 -0
  254. package/fixtures/cases/name-not-a-string/expected.json +5 -0
  255. package/fixtures/cases/name-not-a-string/schema.yaml +5 -0
  256. package/fixtures/cases/nested-defs/expected.json +2 -1
  257. package/fixtures/cases/nested-defs/library/deal.md +3 -3
  258. package/fixtures/cases/nested-object-reference/expected.json +2 -1
  259. package/fixtures/cases/nested-object-reference/library/companies/acme.md +1 -1
  260. package/fixtures/cases/nested-object-reference/library/deals/renewal.md +12 -9
  261. package/fixtures/cases/nested-object-reference/library/places/depot.md +1 -1
  262. package/fixtures/cases/nested-object-reference/library/products/seats.md +1 -1
  263. package/fixtures/cases/nested-object-reference/library/products/support.md +1 -1
  264. package/fixtures/cases/nested-reference/library/companies/acme.md +1 -1
  265. package/fixtures/cases/nested-reference/library/deals/renewal.md +13 -10
  266. package/fixtures/cases/nested-reference/library/places/depot.md +1 -1
  267. package/fixtures/cases/nested-reference/library/products/seats.md +1 -1
  268. package/fixtures/cases/nested-reference/library/products/support.md +1 -1
  269. package/fixtures/cases/nested-required-field/expected.json +2 -1
  270. package/fixtures/cases/nested-required-field/library/companies/acme.md +1 -1
  271. package/fixtures/cases/nested-required-field/library/deals/renewal.md +48 -23
  272. package/fixtures/cases/nested-required-field/schema.yaml +10 -11
  273. package/fixtures/cases/numeric-range/expected.json +2 -1
  274. package/fixtures/cases/numeric-range/library/companies/acme.md +1 -1
  275. package/fixtures/cases/numeric-range/library/deals/renewal.md +49 -24
  276. package/fixtures/cases/numeric-range/schema.yaml +10 -11
  277. package/fixtures/cases/one-key-two-labels/context.json +1 -0
  278. package/fixtures/cases/one-key-two-labels/expected.json +5 -0
  279. package/fixtures/cases/one-key-two-labels/schema.yaml +5 -0
  280. package/fixtures/cases/one-key-two-types/context.json +1 -0
  281. package/fixtures/cases/one-key-two-types/expected.json +5 -0
  282. package/fixtures/cases/one-key-two-types/schema.yaml +4 -0
  283. package/fixtures/cases/one-of-variant/expected.json +2 -1
  284. package/fixtures/cases/one-of-variant/library/companies/acme.md +1 -1
  285. package/fixtures/cases/one-of-variant/library/deals/renewal.md +49 -24
  286. package/fixtures/cases/one-of-variant/schema.yaml +10 -11
  287. package/fixtures/cases/other-room-reference/expected.json +2 -1
  288. package/fixtures/cases/other-room-reference/library/companies/acme.md +1 -1
  289. package/fixtures/cases/other-room-reference/library/deals/renewal.md +12 -9
  290. package/fixtures/cases/other-room-reference/library/places/depot.md +1 -1
  291. package/fixtures/cases/other-room-reference/library/products/seats.md +1 -1
  292. package/fixtures/cases/other-room-reference/library/products/support.md +1 -1
  293. package/fixtures/cases/prototype-field/expected.json +2 -1
  294. package/fixtures/cases/prototype-field/library/item.md +2 -2
  295. package/fixtures/cases/prototype-field/schema.yaml +2 -3
  296. package/fixtures/cases/quoted-link-definition/library/notes/draft.md +1 -1
  297. package/fixtures/cases/reference-into-a-reserved-name/context.json +1 -0
  298. package/fixtures/cases/reference-into-a-reserved-name/expected.json +7 -0
  299. package/fixtures/cases/reference-into-a-reserved-name/library/notes/a.md +4 -0
  300. package/fixtures/cases/reference-into-a-reserved-name/library/settings/brief.md +1 -0
  301. package/fixtures/cases/reference-into-a-reserved-name/schema.yaml +3 -0
  302. package/fixtures/cases/referenced-missing-file/library/a.md +2 -2
  303. package/fixtures/cases/referenced-missing-file/library/b.md +2 -2
  304. package/fixtures/cases/referenced-missing-file/schema.yaml +3 -4
  305. package/fixtures/cases/room-md-declares-a-type/context.json +1 -0
  306. package/fixtures/cases/room-md-declares-a-type/expected.json +6 -0
  307. package/fixtures/cases/room-md-declares-a-type/library/ROOM.md +5 -0
  308. package/fixtures/cases/sections-keyword-refused/context.json +1 -0
  309. package/fixtures/cases/sections-keyword-refused/expected.json +5 -0
  310. package/fixtures/cases/{structured-section → sections-keyword-refused}/schema.yaml +1 -2
  311. package/fixtures/cases/shortcut-reference-link/library/item.md +2 -2
  312. package/fixtures/cases/shortcut-reference-link/schema.yaml +2 -3
  313. package/fixtures/cases/string-length/expected.json +2 -1
  314. package/fixtures/cases/string-length/library/companies/acme.md +1 -1
  315. package/fixtures/cases/string-length/library/deals/renewal.md +49 -24
  316. package/fixtures/cases/string-length/schema.yaml +10 -11
  317. package/fixtures/cases/submission-keys/library/notes/visitor.md +2 -2
  318. package/fixtures/cases/text-field-kind/expected.json +1 -4
  319. package/fixtures/cases/text-field-kind/library/page.md +1 -1
  320. package/fixtures/cases/thematic-break-ends-the-values/context.json +1 -0
  321. package/fixtures/cases/thematic-break-ends-the-values/expected.json +1 -0
  322. package/fixtures/cases/thematic-break-ends-the-values/library/item.md +10 -0
  323. package/fixtures/cases/thematic-break-ends-the-values/schema.yaml +3 -0
  324. package/fixtures/cases/truncated-link-definition/library/notes/draft.md +1 -1
  325. package/fixtures/cases/typed-path-names-another-type/context.json +11 -0
  326. package/fixtures/cases/typed-path-names-another-type/expected.json +6 -0
  327. package/fixtures/cases/typed-path-names-another-type/library/settings/prefs/one.md +3 -0
  328. package/fixtures/cases/typed-path-names-another-type/schema.yaml +6 -0
  329. package/fixtures/cases/typed-path-names-its-type/context.json +11 -0
  330. package/fixtures/cases/typed-path-names-its-type/expected.json +3 -0
  331. package/fixtures/cases/typed-path-names-its-type/library/settings/prefs/deeper/two.md +1 -0
  332. package/fixtures/cases/typed-path-names-its-type/library/settings/prefs/one.md +4 -0
  333. package/fixtures/cases/typed-path-names-its-type/schema.yaml +6 -0
  334. package/fixtures/cases/typed-path-names-no-type/context.json +11 -0
  335. package/fixtures/cases/typed-path-names-no-type/expected.json +6 -0
  336. package/fixtures/cases/typed-path-names-no-type/library/settings/prefs/one.md +1 -0
  337. package/fixtures/cases/typed-path-names-no-type/schema.yaml +6 -0
  338. package/fixtures/cases/types-folder-content/library/types/task.md +1 -1
  339. package/fixtures/cases/undeclared-field/expected.json +2 -1
  340. package/fixtures/cases/undeclared-field/library/item.md +2 -2
  341. package/fixtures/cases/undeclared-field/schema.yaml +2 -3
  342. package/fixtures/cases/unevaluated-items-closed/expected.json +2 -1
  343. package/fixtures/cases/unevaluated-items-closed/library/trip.md +13 -3
  344. package/fixtures/cases/unnamed-typed-path-checks-its-fields/context.json +11 -0
  345. package/fixtures/cases/unnamed-typed-path-checks-its-fields/expected.json +6 -0
  346. package/fixtures/cases/unnamed-typed-path-checks-its-fields/library/rooms/team/tasks/plan.md +5 -0
  347. package/fixtures/cases/unnamed-typed-path-checks-its-fields/schema.yaml +5 -0
  348. package/fixtures/cases/unnamed-typed-path-names-a-type/context.json +11 -0
  349. package/fixtures/cases/unnamed-typed-path-names-a-type/expected.json +6 -0
  350. package/fixtures/cases/unnamed-typed-path-names-a-type/library/rooms/team/tasks/plan.md +7 -0
  351. package/fixtures/cases/unnamed-typed-path-names-a-type/schema.yaml +5 -0
  352. package/fixtures/cases/unnamed-typed-path-reads-its-type/context.json +11 -0
  353. package/fixtures/cases/unnamed-typed-path-reads-its-type/expected.json +3 -0
  354. package/fixtures/cases/unnamed-typed-path-reads-its-type/library/rooms/team/plan.md +1 -0
  355. package/fixtures/cases/unnamed-typed-path-reads-its-type/library/rooms/team/tasks/plan.md +6 -0
  356. package/fixtures/cases/unnamed-typed-path-reads-its-type/schema.yaml +5 -0
  357. package/fixtures/cases/unnamed-typed-path-without-a-body/context.json +11 -0
  358. package/fixtures/cases/unnamed-typed-path-without-a-body/expected.json +5 -0
  359. package/fixtures/cases/unnamed-typed-path-without-a-body/library/rooms/team/tasks/plan.md +5 -0
  360. package/fixtures/cases/unnamed-typed-path-without-a-body/schema.yaml +5 -0
  361. package/fixtures/cases/unresolved-link/library/item.md +2 -2
  362. package/fixtures/cases/unresolved-link/schema.yaml +2 -3
  363. package/fixtures/cases/valid-typed-document/library/people/ada.md +1 -1
  364. package/fixtures/cases/valid-typed-document/library/tasks/one.md +11 -11
  365. package/fixtures/cases/valid-typed-document/schema.yaml +5 -6
  366. package/fixtures/division.json +111 -66
  367. package/fixtures/forms.json +347 -0
  368. package/fixtures/preamble.json +26 -5
  369. package/fixtures/projection.json +121 -18
  370. package/fixtures/queries.json +964 -0
  371. package/package.json +19 -3
  372. package/dist/blocks.d.ts +0 -11
  373. package/dist/blocks.d.ts.map +0 -1
  374. package/dist/blocks.js +0 -62
  375. package/dist/condition.d.ts +0 -137
  376. package/dist/condition.d.ts.map +0 -1
  377. package/dist/condition.js +0 -394
  378. package/dist/links.d.ts +0 -26
  379. package/dist/links.d.ts.map +0 -1
  380. package/dist/links.js +0 -774
  381. package/dist/profile.d.ts +0 -6
  382. package/dist/profile.d.ts.map +0 -1
  383. package/dist/profile.js +0 -5
  384. package/dist/sections.d.ts +0 -11
  385. package/dist/sections.d.ts.map +0 -1
  386. package/dist/sections.js +0 -57
  387. package/fixtures/cases/missing-section-item-kind/expected.json +0 -5
  388. package/fixtures/cases/missing-section-item-kind/schema.yaml +0 -6
  389. package/fixtures/cases/null-refused/expected.json +0 -6
  390. package/fixtures/cases/null-refused/library/companies/acme.md +0 -4
  391. package/fixtures/cases/null-refused/library/deals/renewal.md +0 -31
  392. package/fixtures/cases/null-refused/schema.yaml +0 -56
  393. package/fixtures/cases/open-map-value/expected.json +0 -6
  394. package/fixtures/cases/open-map-value/library/companies/acme.md +0 -4
  395. package/fixtures/cases/open-map-value/library/deals/renewal.md +0 -31
  396. package/fixtures/cases/open-map-value/schema.yaml +0 -56
  397. package/fixtures/cases/section-item-enum/expected.json +0 -6
  398. package/fixtures/cases/section-item-enum/library/task.md +0 -8
  399. package/fixtures/cases/section-item-enum/schema.yaml +0 -3
  400. package/fixtures/cases/section-item-kind/expected.json +0 -6
  401. package/fixtures/cases/section-item-kind/library/task.md +0 -8
  402. package/fixtures/cases/section-item-kind/schema.yaml +0 -3
  403. package/fixtures/cases/section-items/library/page.md +0 -42
  404. package/fixtures/cases/section-items/schema.yaml +0 -10
  405. package/fixtures/cases/section-reference-path/expected.json +0 -6
  406. package/fixtures/cases/section-reference-path/library/page.md +0 -7
  407. package/fixtures/cases/section-reference-path/schema.yaml +0 -3
  408. package/fixtures/cases/section-reference-type/expected.json +0 -6
  409. package/fixtures/cases/section-reference-type/library/page.md +0 -7
  410. package/fixtures/cases/section-reference-type/schema.yaml +0 -3
  411. package/fixtures/cases/structured-section/expected.json +0 -6
  412. /package/fixtures/cases/{missing-section-item-kind → absent-link-dangles}/context.json +0 -0
  413. /package/fixtures/cases/{section-items → absent-link-dangles}/expected.json +0 -0
  414. /package/fixtures/cases/{null-refused → absolute-link}/context.json +0 -0
  415. /package/fixtures/cases/{missing-binary-image → binary-image-dangles}/context.json +0 -0
  416. /package/fixtures/cases/{missing-binary-image → binary-image-dangles}/library/notes/draft.md +0 -0
  417. /package/fixtures/cases/{missing-binary-image → binary-image-dangles}/schema.yaml +0 -0
  418. /package/fixtures/cases/{missing-binary-link → binary-link-dangles}/context.json +0 -0
  419. /package/fixtures/cases/{missing-binary-link → binary-link-dangles}/library/notes/draft.md +0 -0
  420. /package/fixtures/cases/{missing-binary-link → binary-link-dangles}/schema.yaml +0 -0
  421. /package/fixtures/cases/{open-map-value → conditional-long-text}/context.json +0 -0
  422. /package/fixtures/cases/{section-item-enum → cross-room-link}/context.json +0 -0
  423. /package/fixtures/cases/{section-item-kind → cross-room-reference}/context.json +0 -0
  424. /package/fixtures/cases/{section-items → equal-labels}/context.json +0 -0
  425. /package/fixtures/cases/{section-reference-path → labels-in-the-rooms-language}/context.json +0 -0
  426. /package/fixtures/cases/{section-reference-type → lazy-list-item}/context.json +0 -0
  427. /package/fixtures/cases/{structured-section → link-into-a-reserved-name-from-an-untyped-document}/context.json +0 -0
  428. /package/fixtures/cases/{section-items → list-items}/library/other.md +0 -0
  429. /package/fixtures/cases/{section-reference-path → list-reference-path}/library/other.md +0 -0
  430. /package/fixtures/cases/{section-reference-type → list-reference-type}/library/note.md +0 -0
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  type: task
3
- status: open
4
3
  ---
4
+ - **status**: open
5
5
 
6
6
  ## Description
7
7
 
@@ -1,7 +1,6 @@
1
1
  task:
2
2
  properties:
3
3
  title: { type: string }
4
- status: { enum: [open, in-progress, done] }
5
- required: [title, status]
6
- sections:
7
- Description: { kind: text, required: true }
4
+ status: { enum: [ open, in-progress, done ] }
5
+ description: { type: string, contentMediaType: text/markdown, minLength: 1, title: Description }
6
+ required: [ title, status, description ]
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "verdict": "refuse",
3
3
  "file": "deals/renewal.md",
4
+ "rule": "unknown-label",
4
5
  "location": "/opne",
5
- "rule": "undeclared-field"
6
+ "line": 5
6
7
  }
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  type: company
3
- name: Acme
4
3
  ---
4
+ # Acme
@@ -1,31 +1,56 @@
1
1
  ---
2
2
  type: deal
3
- title: Renewal
4
- opne: true
5
- company: ../companies/acme.md
6
- stage: won
7
- amount: 1200
8
- probability: 0.5
9
- open: false
10
- closes_at: 2026-10-10T09:30:00Z
11
- contact_email: ana@example.com
12
- note: null
13
- shipping:
14
- city: Paris
15
- country: FR
16
- tags: [renewal, priority]
17
- lines:
18
- - product: seats
19
- quantity: 10
20
- - product: support
21
- quantity: 1
22
- blocks:
23
- - kind: paragraph
24
- text: Signed.
25
- - { kind: quiz, question: Renew next year? }
26
- attributes:
27
- region: emea
28
3
  ---
4
+ - **title**: Renewal
5
+ - [x] opne
6
+ - **company**: [Acme](../companies/acme.md)
7
+ - **stage**: won
8
+ - **amount**: 1200
9
+ - **probability**: 0.5
10
+ - [ ] open
11
+ - **closes_at**: 2026-10-10T09:30:00Z
12
+ - **contact_email**: ana@example.com
13
+ - **shipping**:
14
+ - **city**: Paris
15
+ - **country**: FR
16
+ - **tags**:
17
+ - renewal
18
+ - priority
19
+ - **attributes**:
20
+ - **region**: emea
21
+
22
+ ## note
23
+
24
+ ```json
25
+ null
26
+ ```
27
+
28
+ ## lines
29
+
30
+ | product | quantity |
31
+ | --- | --- |
32
+ | seats | 10 |
33
+ | support | 1 |
34
+
35
+ ## blocks
36
+
37
+ ### 1
38
+
39
+ ```json
40
+ {
41
+ "kind": "paragraph",
42
+ "text": "Signed."
43
+ }
44
+ ```
45
+
46
+ ### 2
47
+
48
+ ```json
49
+ {
50
+ "kind": "quiz",
51
+ "question": "Renew next year?"
52
+ }
53
+ ```
29
54
 
30
55
  ## Description
31
56
 
@@ -4,7 +4,7 @@ $defs:
4
4
  properties:
5
5
  city: { type: string }
6
6
  country: { type: string, pattern: '^[A-Z]{2}$' }
7
- required: [city]
7
+ required: [ city ]
8
8
  company:
9
9
  properties:
10
10
  name: { type: string }
@@ -13,13 +13,13 @@ deal:
13
13
  properties:
14
14
  title: { type: string, minLength: 1, maxLength: 40 }
15
15
  company: { type: string, reference: company }
16
- stage: { enum: [lead, proposal, won, lost], default: lead }
16
+ stage: { enum: [ lead, proposal, won, lost ], default: lead }
17
17
  amount: { type: integer, minimum: 0 }
18
18
  probability: { type: number, minimum: 0, maximum: 1 }
19
19
  open: { type: boolean }
20
20
  closes_at: { type: string, format: date-time }
21
21
  contact_email: { type: string, format: email }
22
- note: { type: [string, 'null'] }
22
+ note: { type: [ string, 'null' ] }
23
23
  shipping: { $ref: '#/$defs/address' }
24
24
  tags: { type: array, items: { type: string }, maxItems: 3 }
25
25
  lines:
@@ -29,7 +29,7 @@ deal:
29
29
  properties:
30
30
  product: { type: string }
31
31
  quantity: { type: integer, minimum: 1 }
32
- required: [product, quantity]
32
+ required: [ product, quantity ]
33
33
  blocks:
34
34
  type: array
35
35
  items:
@@ -37,20 +37,19 @@ deal:
37
37
  - properties:
38
38
  kind: { const: paragraph }
39
39
  text: { type: string }
40
- required: [kind, text]
40
+ required: [ kind, text ]
41
41
  - properties:
42
42
  kind: { const: quiz }
43
43
  question: { type: string }
44
- required: [kind, question]
44
+ required: [ kind, question ]
45
45
  attributes:
46
46
  type: object
47
47
  additionalProperties: { type: string }
48
- required: [title, company, stage]
48
+ description: { type: string, contentMediaType: text/markdown, title: Description }
49
+ required: [ title, company, stage ]
49
50
  if:
50
51
  properties:
51
52
  stage: { const: won }
52
- required: [stage]
53
+ required: [ stage ]
53
54
  then:
54
- required: [amount]
55
- sections:
56
- Description: { kind: text }
55
+ required: [ amount ]
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,5 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "location": "/contact/properties/name",
4
+ "rule": "name-type"
5
+ }
@@ -0,0 +1,5 @@
1
+ contact:
2
+ properties:
3
+ name:
4
+ type: object
5
+ properties: { first: { type: string }, last: { type: string } }
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "verdict": "refuse",
3
3
  "file": "deal.md",
4
+ "rule": "minLength",
4
5
  "location": "/billing_city",
5
- "rule": "minLength"
6
+ "line": 6
6
7
  }
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  type: deal
3
- shipping:
4
- city: Paris
5
- billing_city: P
6
3
  ---
4
+ - **shipping**:
5
+ - **city**: Paris
6
+ - **billing_city**: P
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "verdict": "refuse",
3
3
  "file": "deals/renewal.md",
4
+ "rule": "unresolved-reference",
4
5
  "location": "/shipping/depot",
5
- "rule": "unresolved-reference"
6
+ "line": 8
6
7
  }
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  type: company
3
- name: Acme
4
3
  ---
4
+ # Acme
@@ -1,14 +1,17 @@
1
1
  ---
2
2
  type: deal
3
- title: Renewal
4
- company: ../companies/acme.md
5
- shipping:
6
- city: Paris
7
- depot: ../companies/acme.md
8
- lines:
9
- - product: ../products/seats.md
10
- quantity: 10
11
- - { product: ../products/support.md, quantity: 1 }
12
3
  ---
4
+ - **title**: Renewal
5
+ - **company**: [Acme](../companies/acme.md)
6
+ - **shipping**:
7
+ - **city**: Paris
8
+ - **depot**: [Acme](../companies/acme.md)
13
9
 
14
10
  The yearly renewal.
11
+
12
+ ## lines
13
+
14
+ | product | quantity |
15
+ | --- | --- |
16
+ | [Seats](../products/seats.md) | 10 |
17
+ | [Support](../products/support.md) | 1 |
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  type: place
3
- name: Depot
4
3
  ---
4
+ # Depot
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  type: product
3
- name: Seats
4
3
  ---
4
+ # Seats
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  type: product
3
- name: Support
4
3
  ---
4
+ # Support
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  type: company
3
- name: Acme
4
3
  ---
4
+ # Acme
@@ -1,15 +1,18 @@
1
1
  ---
2
2
  type: deal
3
- title: Renewal
4
- company: ../companies/acme.md
5
- shipping:
6
- city: Paris
7
- depot: ../places/depot.md
8
- lines:
9
- - product: ../products/seats.md
10
- quantity: 10
11
- - { product: ../products/support.md, quantity: 1 }
12
- contract: ../assets/contract.pdf
13
3
  ---
4
+ - **title**: Renewal
5
+ - **company**: [Acme](../companies/acme.md)
6
+ - **shipping**:
7
+ - **city**: Paris
8
+ - **depot**: [Depot](../places/depot.md)
9
+ - **contract**: [contract.pdf](../assets/contract.pdf)
14
10
 
15
11
  The yearly renewal.
12
+
13
+ ## lines
14
+
15
+ | product | quantity |
16
+ | --- | --- |
17
+ | [Seats](../products/seats.md) | 10 |
18
+ | [Support](../products/support.md) | 1 |
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  type: place
3
- name: Depot
4
3
  ---
4
+ # Depot
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  type: product
3
- name: Seats
4
3
  ---
4
+ # Seats
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  type: product
3
- name: Support
4
3
  ---
4
+ # Support
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "verdict": "refuse",
3
3
  "file": "deals/renewal.md",
4
+ "rule": "required",
4
5
  "location": "/shipping/city",
5
- "rule": "required"
6
+ "line": 12
6
7
  }
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  type: company
3
- name: Acme
4
3
  ---
4
+ # Acme
@@ -1,29 +1,54 @@
1
1
  ---
2
2
  type: deal
3
- title: Renewal
4
- company: ../companies/acme.md
5
- stage: won
6
- amount: 1200
7
- probability: 0.5
8
- open: false
9
- closes_at: 2026-10-10T09:30:00Z
10
- contact_email: ana@example.com
11
- note: null
12
- shipping:
13
- country: FR
14
- tags: [renewal, priority]
15
- lines:
16
- - product: seats
17
- quantity: 10
18
- - product: support
19
- quantity: 1
20
- blocks:
21
- - kind: paragraph
22
- text: Signed.
23
- - { kind: quiz, question: Renew next year? }
24
- attributes:
25
- region: emea
26
3
  ---
4
+ - **title**: Renewal
5
+ - **company**: [Acme](../companies/acme.md)
6
+ - **stage**: won
7
+ - **amount**: 1200
8
+ - **probability**: 0.5
9
+ - [ ] open
10
+ - **closes_at**: 2026-10-10T09:30:00Z
11
+ - **contact_email**: ana@example.com
12
+ - **shipping**:
13
+ - **country**: FR
14
+ - **tags**:
15
+ - renewal
16
+ - priority
17
+ - **attributes**:
18
+ - **region**: emea
19
+
20
+ ## note
21
+
22
+ ```json
23
+ null
24
+ ```
25
+
26
+ ## lines
27
+
28
+ | product | quantity |
29
+ | --- | --- |
30
+ | seats | 10 |
31
+ | support | 1 |
32
+
33
+ ## blocks
34
+
35
+ ### 1
36
+
37
+ ```json
38
+ {
39
+ "kind": "paragraph",
40
+ "text": "Signed."
41
+ }
42
+ ```
43
+
44
+ ### 2
45
+
46
+ ```json
47
+ {
48
+ "kind": "quiz",
49
+ "question": "Renew next year?"
50
+ }
51
+ ```
27
52
 
28
53
  ## Description
29
54
 
@@ -4,7 +4,7 @@ $defs:
4
4
  properties:
5
5
  city: { type: string }
6
6
  country: { type: string, pattern: '^[A-Z]{2}$' }
7
- required: [city]
7
+ required: [ city ]
8
8
  company:
9
9
  properties:
10
10
  name: { type: string }
@@ -13,13 +13,13 @@ deal:
13
13
  properties:
14
14
  title: { type: string, minLength: 1, maxLength: 40 }
15
15
  company: { type: string, reference: company }
16
- stage: { enum: [lead, proposal, won, lost], default: lead }
16
+ stage: { enum: [ lead, proposal, won, lost ], default: lead }
17
17
  amount: { type: integer, minimum: 0 }
18
18
  probability: { type: number, minimum: 0, maximum: 1 }
19
19
  open: { type: boolean }
20
20
  closes_at: { type: string, format: date-time }
21
21
  contact_email: { type: string, format: email }
22
- note: { type: [string, 'null'] }
22
+ note: { type: [ string, 'null' ] }
23
23
  shipping: { $ref: '#/$defs/address' }
24
24
  tags: { type: array, items: { type: string }, maxItems: 3 }
25
25
  lines:
@@ -29,7 +29,7 @@ deal:
29
29
  properties:
30
30
  product: { type: string }
31
31
  quantity: { type: integer, minimum: 1 }
32
- required: [product, quantity]
32
+ required: [ product, quantity ]
33
33
  blocks:
34
34
  type: array
35
35
  items:
@@ -37,20 +37,19 @@ deal:
37
37
  - properties:
38
38
  kind: { const: paragraph }
39
39
  text: { type: string }
40
- required: [kind, text]
40
+ required: [ kind, text ]
41
41
  - properties:
42
42
  kind: { const: quiz }
43
43
  question: { type: string }
44
- required: [kind, question]
44
+ required: [ kind, question ]
45
45
  attributes:
46
46
  type: object
47
47
  additionalProperties: { type: string }
48
- required: [title, company, stage]
48
+ description: { type: string, contentMediaType: text/markdown, title: Description }
49
+ required: [ title, company, stage ]
49
50
  if:
50
51
  properties:
51
52
  stage: { const: won }
52
- required: [stage]
53
+ required: [ stage ]
53
54
  then:
54
- required: [amount]
55
- sections:
56
- Description: { kind: text }
55
+ required: [ amount ]
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "verdict": "refuse",
3
3
  "file": "deals/renewal.md",
4
+ "rule": "maximum",
4
5
  "location": "/probability",
5
- "rule": "maximum"
6
+ "line": 8
6
7
  }
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  type: company
3
- name: Acme
4
3
  ---
4
+ # Acme
@@ -1,30 +1,55 @@
1
1
  ---
2
2
  type: deal
3
- title: Renewal
4
- company: ../companies/acme.md
5
- stage: won
6
- amount: 1200
7
- probability: 1.5
8
- open: false
9
- closes_at: 2026-10-10T09:30:00Z
10
- contact_email: ana@example.com
11
- note: null
12
- shipping:
13
- city: Paris
14
- country: FR
15
- tags: [renewal, priority]
16
- lines:
17
- - product: seats
18
- quantity: 10
19
- - product: support
20
- quantity: 1
21
- blocks:
22
- - kind: paragraph
23
- text: Signed.
24
- - { kind: quiz, question: Renew next year? }
25
- attributes:
26
- region: emea
27
3
  ---
4
+ - **title**: Renewal
5
+ - **company**: [Acme](../companies/acme.md)
6
+ - **stage**: won
7
+ - **amount**: 1200
8
+ - **probability**: 1.5
9
+ - [ ] open
10
+ - **closes_at**: 2026-10-10T09:30:00Z
11
+ - **contact_email**: ana@example.com
12
+ - **shipping**:
13
+ - **city**: Paris
14
+ - **country**: FR
15
+ - **tags**:
16
+ - renewal
17
+ - priority
18
+ - **attributes**:
19
+ - **region**: emea
20
+
21
+ ## note
22
+
23
+ ```json
24
+ null
25
+ ```
26
+
27
+ ## lines
28
+
29
+ | product | quantity |
30
+ | --- | --- |
31
+ | seats | 10 |
32
+ | support | 1 |
33
+
34
+ ## blocks
35
+
36
+ ### 1
37
+
38
+ ```json
39
+ {
40
+ "kind": "paragraph",
41
+ "text": "Signed."
42
+ }
43
+ ```
44
+
45
+ ### 2
46
+
47
+ ```json
48
+ {
49
+ "kind": "quiz",
50
+ "question": "Renew next year?"
51
+ }
52
+ ```
28
53
 
29
54
  ## Description
30
55
 
@@ -4,7 +4,7 @@ $defs:
4
4
  properties:
5
5
  city: { type: string }
6
6
  country: { type: string, pattern: '^[A-Z]{2}$' }
7
- required: [city]
7
+ required: [ city ]
8
8
  company:
9
9
  properties:
10
10
  name: { type: string }
@@ -13,13 +13,13 @@ deal:
13
13
  properties:
14
14
  title: { type: string, minLength: 1, maxLength: 40 }
15
15
  company: { type: string, reference: company }
16
- stage: { enum: [lead, proposal, won, lost], default: lead }
16
+ stage: { enum: [ lead, proposal, won, lost ], default: lead }
17
17
  amount: { type: integer, minimum: 0 }
18
18
  probability: { type: number, minimum: 0, maximum: 1 }
19
19
  open: { type: boolean }
20
20
  closes_at: { type: string, format: date-time }
21
21
  contact_email: { type: string, format: email }
22
- note: { type: [string, 'null'] }
22
+ note: { type: [ string, 'null' ] }
23
23
  shipping: { $ref: '#/$defs/address' }
24
24
  tags: { type: array, items: { type: string }, maxItems: 3 }
25
25
  lines:
@@ -29,7 +29,7 @@ deal:
29
29
  properties:
30
30
  product: { type: string }
31
31
  quantity: { type: integer, minimum: 1 }
32
- required: [product, quantity]
32
+ required: [ product, quantity ]
33
33
  blocks:
34
34
  type: array
35
35
  items:
@@ -37,20 +37,19 @@ deal:
37
37
  - properties:
38
38
  kind: { const: paragraph }
39
39
  text: { type: string }
40
- required: [kind, text]
40
+ required: [ kind, text ]
41
41
  - properties:
42
42
  kind: { const: quiz }
43
43
  question: { type: string }
44
- required: [kind, question]
44
+ required: [ kind, question ]
45
45
  attributes:
46
46
  type: object
47
47
  additionalProperties: { type: string }
48
- required: [title, company, stage]
48
+ description: { type: string, contentMediaType: text/markdown, title: Description }
49
+ required: [ title, company, stage ]
49
50
  if:
50
51
  properties:
51
52
  stage: { const: won }
52
- required: [stage]
53
+ required: [ stage ]
53
54
  then:
54
- required: [amount]
55
- sections:
56
- Description: { kind: text }
55
+ required: [ amount ]
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,5 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "location": "/deal/then/properties/stage/title",
4
+ "rule": "conflicting-label"
5
+ }
@@ -0,0 +1,5 @@
1
+ deal:
2
+ properties:
3
+ stage: { enum: [lead, won, lost], title: Stage }
4
+ if: { properties: { stage: { const: lost } } }
5
+ then: { properties: { stage: { title: Phase } } }
@@ -0,0 +1 @@
1
+ { "binaryTargets": [] }
@@ -0,0 +1,5 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "location": "/task/oneOf/1/properties/due",
4
+ "rule": "conflicting-type"
5
+ }