@agentshouse/mdmodel 0.1.0-c83456e1cebfb → 0.1.0-c839e4b34c8dc

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 (645) hide show
  1. package/API.md +359 -256
  2. package/README.md +29 -27
  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 +28 -0
  9. package/dist/definition.d.ts +89 -32
  10. package/dist/definition.d.ts.map +1 -1
  11. package/dist/definition.js +930 -152
  12. package/dist/document.d.ts +21 -5
  13. package/dist/document.d.ts.map +1 -1
  14. package/dist/document.js +1065 -157
  15. package/dist/event.d.ts +74 -0
  16. package/dist/event.d.ts.map +1 -0
  17. package/dist/event.js +201 -0
  18. package/dist/facts.d.ts +15 -0
  19. package/dist/facts.d.ts.map +1 -0
  20. package/dist/facts.js +45 -0
  21. package/dist/fields.d.ts +3 -1
  22. package/dist/fields.d.ts.map +1 -1
  23. package/dist/fields.js +8 -1
  24. package/dist/folders.d.ts +5 -0
  25. package/dist/folders.d.ts.map +1 -0
  26. package/dist/folders.js +19 -0
  27. package/dist/form.d.ts +4 -0
  28. package/dist/form.d.ts.map +1 -0
  29. package/dist/form.js +153 -0
  30. package/dist/house-model.d.ts +1090 -0
  31. package/dist/house-model.d.ts.map +1 -0
  32. package/dist/house-model.js +593 -0
  33. package/dist/house-references/crockford.d.ts +4 -0
  34. package/dist/house-references/crockford.d.ts.map +1 -0
  35. package/dist/house-references/crockford.js +3 -0
  36. package/dist/house-references/patterns.d.ts +13 -0
  37. package/dist/house-references/patterns.d.ts.map +1 -0
  38. package/dist/house-references/patterns.js +20 -0
  39. package/dist/index.d.ts +47 -9
  40. package/dist/index.d.ts.map +1 -1
  41. package/dist/index.js +29 -7
  42. package/dist/indexed.d.ts +10 -0
  43. package/dist/indexed.d.ts.map +1 -0
  44. package/dist/indexed.js +63 -0
  45. package/dist/kinds.d.ts +26 -0
  46. package/dist/kinds.d.ts.map +1 -0
  47. package/dist/kinds.js +218 -0
  48. package/dist/markdown.d.ts +71 -0
  49. package/dist/markdown.d.ts.map +1 -0
  50. package/dist/markdown.js +232 -0
  51. package/dist/media-type.d.ts +72 -0
  52. package/dist/media-type.d.ts.map +1 -0
  53. package/dist/media-type.js +157 -0
  54. package/dist/moment.d.ts +9 -0
  55. package/dist/moment.d.ts.map +1 -0
  56. package/dist/moment.js +40 -0
  57. package/dist/not-ready.d.ts +2 -0
  58. package/dist/not-ready.d.ts.map +1 -0
  59. package/dist/not-ready.js +5 -0
  60. package/dist/paths.d.ts +29 -2
  61. package/dist/paths.d.ts.map +1 -1
  62. package/dist/paths.js +225 -14
  63. package/dist/pattern.d.ts +10 -0
  64. package/dist/pattern.d.ts.map +1 -0
  65. package/dist/pattern.js +356 -0
  66. package/dist/query/language.d.ts +257 -0
  67. package/dist/query/language.d.ts.map +1 -0
  68. package/dist/query/language.js +621 -0
  69. package/dist/query/match.d.ts +14 -0
  70. package/dist/query/match.d.ts.map +1 -0
  71. package/dist/query/match.js +129 -0
  72. package/dist/query/rows.d.ts +37 -0
  73. package/dist/query/rows.d.ts.map +1 -0
  74. package/dist/query/rows.js +190 -0
  75. package/dist/query/sql.d.ts +48 -0
  76. package/dist/query/sql.d.ts.map +1 -0
  77. package/dist/query/sql.js +304 -0
  78. package/dist/query/walk.d.ts +73 -0
  79. package/dist/query/walk.d.ts.map +1 -0
  80. package/dist/query/walk.js +277 -0
  81. package/dist/references.d.ts +4 -0
  82. package/dist/references.d.ts.map +1 -0
  83. package/dist/references.js +30 -0
  84. package/dist/refuse.d.ts +1 -0
  85. package/dist/refuse.d.ts.map +1 -1
  86. package/dist/refuse.js +1 -0
  87. package/dist/reserved.d.ts +6 -0
  88. package/dist/reserved.d.ts.map +1 -0
  89. package/dist/reserved.js +30 -0
  90. package/dist/room-types.d.ts +8 -0
  91. package/dist/room-types.d.ts.map +1 -0
  92. package/dist/room-types.js +142 -0
  93. package/dist/schema.d.ts +6 -6
  94. package/dist/schema.d.ts.map +1 -1
  95. package/dist/schema.js +144 -31
  96. package/dist/types.d.ts +80 -21
  97. package/dist/types.d.ts.map +1 -1
  98. package/dist/validate.d.ts +38 -2
  99. package/dist/validate.d.ts.map +1 -1
  100. package/dist/validate.js +445 -171
  101. package/dist/view.d.ts +5 -0
  102. package/dist/view.d.ts.map +1 -0
  103. package/dist/view.js +27 -0
  104. package/dist/yaml.d.ts +11 -4
  105. package/dist/yaml.d.ts.map +1 -1
  106. package/dist/yaml.js +313 -76
  107. package/fixtures/README.md +142 -86
  108. package/fixtures/cases/absent-link-dangles/library/item.md +8 -0
  109. package/fixtures/cases/absent-link-dangles/schema.md +7 -0
  110. package/fixtures/cases/absent-optional-field/expected.json +1 -0
  111. package/fixtures/cases/absent-optional-field/library/companies/acme.md +4 -0
  112. package/fixtures/cases/absent-optional-field/library/deals/lead.md +6 -0
  113. package/fixtures/cases/absent-optional-field/schema.md +57 -0
  114. package/fixtures/cases/{missing-binary-link → absolute-link}/expected.json +1 -1
  115. package/fixtures/cases/absolute-link/library/item.md +8 -0
  116. package/fixtures/cases/absolute-link/schema.md +7 -0
  117. package/fixtures/cases/attachment-reference-any-file/expected.json +1 -0
  118. package/fixtures/cases/attachment-reference-any-file/library/companies/acme.md +4 -0
  119. package/fixtures/cases/attachment-reference-any-file/library/deals/renewal.md +18 -0
  120. package/fixtures/cases/attachment-reference-any-file/library/places/depot.md +4 -0
  121. package/fixtures/cases/attachment-reference-any-file/library/products/seats.md +4 -0
  122. package/fixtures/cases/attachment-reference-any-file/library/products/support.md +4 -0
  123. package/fixtures/cases/attachment-reference-any-file/schema.md +34 -0
  124. package/fixtures/cases/attachment-reference-dangles/expected.json +1 -0
  125. package/fixtures/cases/attachment-reference-dangles/library/companies/acme.md +4 -0
  126. package/fixtures/cases/attachment-reference-dangles/library/deals/renewal.md +18 -0
  127. package/fixtures/cases/attachment-reference-dangles/library/places/depot.md +4 -0
  128. package/fixtures/cases/attachment-reference-dangles/library/products/seats.md +4 -0
  129. package/fixtures/cases/attachment-reference-dangles/library/products/support.md +4 -0
  130. package/fixtures/cases/attachment-reference-dangles/schema.md +34 -0
  131. package/fixtures/cases/attachment-reference-outside/expected.json +7 -0
  132. package/fixtures/cases/attachment-reference-outside/library/companies/acme.md +4 -0
  133. package/fixtures/cases/attachment-reference-outside/library/deals/renewal.md +18 -0
  134. package/fixtures/cases/attachment-reference-outside/library/places/depot.md +4 -0
  135. package/fixtures/cases/attachment-reference-outside/library/products/seats.md +4 -0
  136. package/fixtures/cases/attachment-reference-outside/library/products/support.md +4 -0
  137. package/fixtures/cases/attachment-reference-outside/schema.md +34 -0
  138. package/fixtures/cases/binary-any-reference/expected.json +2 -1
  139. package/fixtures/cases/binary-any-reference/library/notes/draft.md +1 -1
  140. package/fixtures/cases/binary-any-reference/schema.md +6 -0
  141. package/fixtures/cases/binary-document-collision/schema.md +3 -0
  142. package/fixtures/cases/binary-image-dangles/expected.json +1 -0
  143. package/fixtures/cases/binary-image-dangles/schema.md +3 -0
  144. package/fixtures/cases/binary-link-dangles/expected.json +1 -0
  145. package/fixtures/cases/binary-link-dangles/schema.md +3 -0
  146. package/fixtures/cases/binary-link-outside-collection/schema.md +3 -0
  147. package/fixtures/cases/binary-prototype-reference/expected.json +2 -1
  148. package/fixtures/cases/binary-prototype-reference/library/notes/draft.md +1 -1
  149. package/fixtures/cases/binary-prototype-reference/schema.md +6 -0
  150. package/fixtures/cases/binary-typed-reference/expected.json +2 -1
  151. package/fixtures/cases/binary-typed-reference/library/notes/draft.md +1 -1
  152. package/fixtures/cases/binary-typed-reference/schema.md +7 -0
  153. package/fixtures/cases/block-scalar-frontmatter/expected.json +1 -0
  154. package/fixtures/cases/block-scalar-frontmatter/library/notes/literal.md +17 -0
  155. package/fixtures/cases/block-scalar-frontmatter/library/skills/notes/SKILL.md +10 -0
  156. package/fixtures/cases/boolean-field/expected.json +7 -0
  157. package/fixtures/cases/boolean-field/library/companies/acme.md +4 -0
  158. package/fixtures/cases/boolean-field/library/deals/renewal.md +56 -0
  159. package/fixtures/cases/boolean-field/schema.md +57 -0
  160. package/fixtures/cases/bracketed-link-definition/library/item.md +1 -1
  161. package/fixtures/cases/bracketed-link-definition/schema.md +7 -0
  162. package/fixtures/cases/closed-nested-object/context.json +1 -0
  163. package/fixtures/cases/closed-nested-object/expected.json +7 -0
  164. package/fixtures/cases/closed-nested-object/library/companies/acme.md +4 -0
  165. package/fixtures/cases/closed-nested-object/library/deals/renewal.md +57 -0
  166. package/fixtures/cases/closed-nested-object/schema.md +57 -0
  167. package/fixtures/cases/composed-root-reference/context.json +1 -0
  168. package/fixtures/cases/composed-root-reference/expected.json +6 -0
  169. package/fixtures/cases/composed-root-reference/library/a.md +5 -0
  170. package/fixtures/cases/composed-root-reference/schema.md +15 -0
  171. package/fixtures/cases/conditional-long-text/context.json +1 -0
  172. package/fixtures/cases/conditional-long-text/expected.json +7 -0
  173. package/fixtures/cases/conditional-long-text/library/questions/hosting.md +9 -0
  174. package/fixtures/cases/conditional-long-text/library/questions/payments.md +12 -0
  175. package/fixtures/cases/conditional-long-text/schema.md +15 -0
  176. package/fixtures/cases/cross-room-link/context.json +1 -0
  177. package/fixtures/cases/cross-room-link/expected.json +1 -0
  178. package/fixtures/cases/cross-room-link/library/clients/acme.md +6 -0
  179. package/fixtures/cases/cross-room-link/schema.md +5 -0
  180. package/fixtures/cases/cross-room-reference/context.json +1 -0
  181. package/fixtures/cases/cross-room-reference/expected.json +1 -0
  182. package/fixtures/cases/cross-room-reference/library/clients/acme.md +9 -0
  183. package/fixtures/cases/cross-room-reference/schema.md +10 -0
  184. package/fixtures/cases/date-time-format/context.json +1 -0
  185. package/fixtures/cases/date-time-format/expected.json +7 -0
  186. package/fixtures/cases/date-time-format/library/companies/acme.md +4 -0
  187. package/fixtures/cases/date-time-format/library/deals/renewal.md +56 -0
  188. package/fixtures/cases/date-time-format/schema.md +57 -0
  189. package/fixtures/cases/declared-binary-links/schema.md +3 -0
  190. package/fixtures/cases/default-unfilled/context.json +1 -0
  191. package/fixtures/cases/default-unfilled/expected.json +6 -0
  192. package/fixtures/cases/default-unfilled/library/companies/acme.md +4 -0
  193. package/fixtures/cases/default-unfilled/library/deals/renewal.md +54 -0
  194. package/fixtures/cases/default-unfilled/schema.md +57 -0
  195. package/fixtures/cases/defs-pattern/context.json +1 -0
  196. package/fixtures/cases/defs-pattern/expected.json +7 -0
  197. package/fixtures/cases/defs-pattern/library/companies/acme.md +4 -0
  198. package/fixtures/cases/defs-pattern/library/deals/renewal.md +56 -0
  199. package/fixtures/cases/defs-pattern/schema.md +57 -0
  200. package/fixtures/cases/dependent-rule/context.json +1 -0
  201. package/fixtures/cases/dependent-rule/expected.json +6 -0
  202. package/fixtures/cases/dependent-rule/library/companies/acme.md +4 -0
  203. package/fixtures/cases/dependent-rule/library/deals/renewal.md +55 -0
  204. package/fixtures/cases/dependent-rule/schema.md +57 -0
  205. package/fixtures/cases/duplicate-link-definition/library/item.md +1 -1
  206. package/fixtures/cases/duplicate-link-definition/schema.md +7 -0
  207. package/fixtures/cases/email-format/context.json +1 -0
  208. package/fixtures/cases/email-format/expected.json +7 -0
  209. package/fixtures/cases/email-format/library/companies/acme.md +4 -0
  210. package/fixtures/cases/email-format/library/deals/renewal.md +56 -0
  211. package/fixtures/cases/email-format/schema.md +57 -0
  212. package/fixtures/cases/equal-labels/context.json +1 -0
  213. package/fixtures/cases/equal-labels/expected.json +5 -0
  214. package/fixtures/cases/equal-labels/schema.md +6 -0
  215. package/fixtures/cases/fenced-link-definition/library/item.md +1 -1
  216. package/fixtures/cases/fenced-link-definition/schema.md +7 -0
  217. package/fixtures/cases/field-enum/expected.json +3 -2
  218. package/fixtures/cases/field-enum/library/item.md +2 -2
  219. package/fixtures/cases/field-enum/schema.md +8 -0
  220. package/fixtures/cases/folder-keeps-a-built-in-type/context.json +1 -0
  221. package/fixtures/cases/folder-keeps-a-built-in-type/expected.json +1 -0
  222. package/fixtures/cases/folder-keeps-a-built-in-type/library/tickets/door.md +3 -0
  223. package/fixtures/cases/folder-keeps-a-built-in-type/library/tickets/host.md +13 -0
  224. package/fixtures/cases/folder-keeps-a-built-in-type/library/tickets/map.md +24 -0
  225. package/fixtures/cases/folder-keeps-a-built-in-type/library/tickets/open.md +13 -0
  226. package/fixtures/cases/folder-keeps-a-built-in-type/schema.md +9 -0
  227. package/fixtures/cases/folder-keeps-a-record/context.json +1 -0
  228. package/fixtures/cases/folder-keeps-a-record/expected.json +1 -0
  229. package/fixtures/cases/folder-keeps-a-record/library/tickets/2026-11-16-d_1.r.md +13 -0
  230. package/fixtures/cases/folder-keeps-a-record/library/tickets/door.md +3 -0
  231. package/fixtures/cases/folder-keeps-a-record/schema.md +9 -0
  232. package/fixtures/cases/folder-names-no-type-of-the-schema/context.json +1 -0
  233. package/fixtures/cases/folder-names-no-type-of-the-schema/expected.json +5 -0
  234. package/fixtures/cases/folder-names-no-type-of-the-schema/schema.md +7 -0
  235. package/fixtures/cases/folder-nearer-entry-types-a-document/context.json +1 -0
  236. package/fixtures/cases/folder-nearer-entry-types-a-document/expected.json +6 -0
  237. package/fixtures/cases/folder-nearer-entry-types-a-document/library/tickets/archive/2025/old.md +1 -0
  238. package/fixtures/cases/folder-nearer-entry-types-a-document/schema.md +15 -0
  239. package/fixtures/cases/folder-refuses-a-declared-any/context.json +1 -0
  240. package/fixtures/cases/folder-refuses-a-declared-any/expected.json +6 -0
  241. package/fixtures/cases/folder-refuses-a-declared-any/library/tickets/door.md +5 -0
  242. package/fixtures/cases/folder-refuses-a-declared-any/schema.md +9 -0
  243. package/fixtures/cases/folder-refuses-another-declared-type/context.json +1 -0
  244. package/fixtures/cases/folder-refuses-another-declared-type/expected.json +6 -0
  245. package/fixtures/cases/folder-refuses-another-declared-type/library/tickets/door.md +5 -0
  246. package/fixtures/cases/folder-refuses-another-declared-type/schema.md +12 -0
  247. package/fixtures/cases/folder-type-is-the-type-a-reference-reaches/context.json +1 -0
  248. package/fixtures/cases/folder-type-is-the-type-a-reference-reaches/expected.json +1 -0
  249. package/fixtures/cases/folder-type-is-the-type-a-reference-reaches/library/notes/plan.md +7 -0
  250. package/fixtures/cases/folder-type-is-the-type-a-reference-reaches/library/tickets/door.md +3 -0
  251. package/fixtures/cases/folder-type-is-the-type-a-reference-reaches/library/tickets/gate.md +7 -0
  252. package/fixtures/cases/folder-type-is-the-type-a-reference-reaches/schema.md +13 -0
  253. package/fixtures/cases/folder-types-a-document-in-a-folder-below-it/context.json +1 -0
  254. package/fixtures/cases/folder-types-a-document-in-a-folder-below-it/expected.json +6 -0
  255. package/fixtures/cases/folder-types-a-document-in-a-folder-below-it/library/tickets/2026/gate.md +1 -0
  256. package/fixtures/cases/folder-types-a-document-in-a-folder-below-it/schema.md +9 -0
  257. package/fixtures/cases/folder-types-a-document-that-names-no-type/context.json +1 -0
  258. package/fixtures/cases/folder-types-a-document-that-names-no-type/expected.json +7 -0
  259. package/fixtures/cases/folder-types-a-document-that-names-no-type/library/tickets/door.md +3 -0
  260. package/fixtures/cases/folder-types-a-document-that-names-no-type/schema.md +9 -0
  261. package/fixtures/cases/folder-under-a-reserved-name/context.json +1 -0
  262. package/fixtures/cases/folder-under-a-reserved-name/expected.json +5 -0
  263. package/fixtures/cases/folder-under-a-reserved-name/schema.md +7 -0
  264. package/fixtures/cases/folder-without-a-trailing-slash/context.json +1 -0
  265. package/fixtures/cases/folder-without-a-trailing-slash/expected.json +5 -0
  266. package/fixtures/cases/folder-without-a-trailing-slash/schema.md +7 -0
  267. package/fixtures/cases/frontmatter-construct/context.json +1 -0
  268. package/fixtures/cases/frontmatter-construct/expected.json +7 -0
  269. package/fixtures/cases/frontmatter-construct/library/note.md +6 -0
  270. package/fixtures/cases/integer-field/context.json +1 -0
  271. package/fixtures/cases/integer-field/expected.json +7 -0
  272. package/fixtures/cases/integer-field/library/companies/acme.md +4 -0
  273. package/fixtures/cases/integer-field/library/deals/renewal.md +56 -0
  274. package/fixtures/cases/integer-field/schema.md +57 -0
  275. package/fixtures/cases/interrupted-link-definition/schema.md +3 -0
  276. package/fixtures/cases/json-schema-constructs/context.json +1 -0
  277. package/fixtures/cases/json-schema-constructs/expected.json +1 -0
  278. package/fixtures/cases/json-schema-constructs/library/companies/acme.md +4 -0
  279. package/fixtures/cases/json-schema-constructs/library/deals/renewal.md +56 -0
  280. package/fixtures/cases/json-schema-constructs/schema.md +57 -0
  281. package/fixtures/cases/labels-in-the-rooms-language/context.json +1 -0
  282. package/fixtures/cases/labels-in-the-rooms-language/expected.json +1 -0
  283. package/fixtures/cases/labels-in-the-rooms-language/library/deals/atlas.md +7 -0
  284. package/fixtures/cases/labels-in-the-rooms-language/schema.md +11 -0
  285. package/fixtures/cases/lazy-list-item/context.json +1 -0
  286. package/fixtures/cases/lazy-list-item/expected.json +3 -0
  287. package/fixtures/cases/lazy-list-item/library/item.md +10 -0
  288. package/fixtures/cases/lazy-list-item/schema.md +5 -0
  289. package/fixtures/cases/link-into-a-reserved-name/context.json +1 -0
  290. package/fixtures/cases/link-into-a-reserved-name/expected.json +5 -0
  291. package/fixtures/cases/link-into-a-reserved-name/library/notes/a.md +6 -0
  292. package/fixtures/cases/link-into-a-reserved-name/schema.md +5 -0
  293. package/fixtures/cases/link-into-a-reserved-name-from-an-untyped-document/context.json +1 -0
  294. package/fixtures/cases/{missing-binary-image → link-into-a-reserved-name-from-an-untyped-document}/expected.json +1 -1
  295. package/fixtures/cases/link-into-a-reserved-name-from-an-untyped-document/library/notes/b.md +5 -0
  296. package/fixtures/cases/list-item-enum/context.json +1 -0
  297. package/fixtures/cases/list-item-enum/expected.json +7 -0
  298. package/fixtures/cases/list-item-enum/library/task.md +7 -0
  299. package/fixtures/cases/list-item-enum/schema.md +5 -0
  300. package/fixtures/cases/list-item-kind/context.json +1 -0
  301. package/fixtures/cases/list-item-kind/expected.json +7 -0
  302. package/fixtures/cases/list-item-kind/library/task.md +6 -0
  303. package/fixtures/cases/list-item-kind/schema.md +5 -0
  304. package/fixtures/cases/list-items/context.json +1 -0
  305. package/fixtures/cases/list-items/expected.json +1 -0
  306. package/fixtures/cases/list-items/library/page.md +26 -0
  307. package/fixtures/cases/list-items/schema.md +12 -0
  308. package/fixtures/cases/list-of-objects-closed/context.json +1 -0
  309. package/fixtures/cases/list-of-objects-closed/expected.json +7 -0
  310. package/fixtures/cases/list-of-objects-closed/library/companies/acme.md +4 -0
  311. package/fixtures/cases/list-of-objects-closed/library/deals/renewal.md +56 -0
  312. package/fixtures/cases/list-of-objects-closed/schema.md +57 -0
  313. package/fixtures/cases/list-of-objects-item/context.json +1 -0
  314. package/fixtures/cases/list-of-objects-item/expected.json +7 -0
  315. package/fixtures/cases/list-of-objects-item/library/companies/acme.md +4 -0
  316. package/fixtures/cases/list-of-objects-item/library/deals/renewal.md +56 -0
  317. package/fixtures/cases/list-of-objects-item/schema.md +57 -0
  318. package/fixtures/cases/list-of-objects-reference/context.json +1 -0
  319. package/fixtures/cases/list-of-objects-reference/expected.json +7 -0
  320. package/fixtures/cases/list-of-objects-reference/library/companies/acme.md +4 -0
  321. package/fixtures/cases/list-of-objects-reference/library/deals/renewal.md +17 -0
  322. package/fixtures/cases/list-of-objects-reference/library/places/depot.md +4 -0
  323. package/fixtures/cases/list-of-objects-reference/library/products/seats.md +4 -0
  324. package/fixtures/cases/list-of-objects-reference/library/products/support.md +4 -0
  325. package/fixtures/cases/list-of-objects-reference/schema.md +34 -0
  326. package/fixtures/cases/list-reference-path/context.json +1 -0
  327. package/fixtures/cases/list-reference-path/expected.json +7 -0
  328. package/fixtures/cases/list-reference-path/library/page.md +5 -0
  329. package/fixtures/cases/list-reference-path/schema.md +5 -0
  330. package/fixtures/cases/list-reference-type/context.json +1 -0
  331. package/fixtures/cases/list-reference-type/expected.json +7 -0
  332. package/fixtures/cases/list-reference-type/library/page.md +6 -0
  333. package/fixtures/cases/list-reference-type/schema.md +5 -0
  334. package/fixtures/cases/list-size/context.json +1 -0
  335. package/fixtures/cases/list-size/expected.json +7 -0
  336. package/fixtures/cases/list-size/library/companies/acme.md +4 -0
  337. package/fixtures/cases/list-size/library/deals/renewal.md +58 -0
  338. package/fixtures/cases/list-size/schema.md +57 -0
  339. package/fixtures/cases/long-fence-link-definition/schema.md +3 -0
  340. package/fixtures/cases/long-value-past-six-levels/context.json +1 -0
  341. package/fixtures/cases/long-value-past-six-levels/expected.json +5 -0
  342. package/fixtures/cases/long-value-past-six-levels/schema.md +17 -0
  343. package/fixtures/cases/malformed-definition/expected.json +2 -2
  344. package/fixtures/cases/malformed-definition/schema.md +5 -0
  345. package/fixtures/cases/malformed-list/context.json +1 -0
  346. package/fixtures/cases/malformed-list/expected.json +7 -0
  347. package/fixtures/cases/{structured-section → malformed-list}/library/item.md +1 -1
  348. package/fixtures/cases/malformed-list/schema.md +8 -0
  349. package/fixtures/cases/member-document/library/people/ana.md +2 -2
  350. package/fixtures/cases/member-document/schema.md +7 -0
  351. package/fixtures/cases/member-on-an-untyped-document/context.json +1 -0
  352. package/fixtures/cases/member-on-an-untyped-document/expected.json +6 -0
  353. package/fixtures/cases/member-on-an-untyped-document/library/note.md +4 -0
  354. package/fixtures/cases/member-on-another-type/context.json +1 -0
  355. package/fixtures/cases/member-on-another-type/expected.json +6 -0
  356. package/fixtures/cases/member-on-another-type/library/note.md +4 -0
  357. package/fixtures/cases/member-on-another-type/schema.md +9 -0
  358. package/fixtures/cases/missing-required-field/expected.json +2 -2
  359. package/fixtures/cases/missing-required-field/library/item.md +1 -1
  360. package/fixtures/cases/missing-required-field/schema.md +8 -0
  361. package/fixtures/cases/misspelled-key/context.json +1 -0
  362. package/fixtures/cases/misspelled-key/expected.json +7 -0
  363. package/fixtures/cases/misspelled-key/library/companies/acme.md +4 -0
  364. package/fixtures/cases/misspelled-key/library/deals/renewal.md +57 -0
  365. package/fixtures/cases/misspelled-key/schema.md +57 -0
  366. package/fixtures/cases/name-not-a-string/context.json +1 -0
  367. package/fixtures/cases/name-not-a-string/expected.json +5 -0
  368. package/fixtures/cases/name-not-a-string/schema.md +7 -0
  369. package/fixtures/cases/nested-defs/context.json +1 -0
  370. package/fixtures/cases/nested-defs/expected.json +7 -0
  371. package/fixtures/cases/nested-defs/library/deal.md +6 -0
  372. package/fixtures/cases/nested-defs/schema.md +13 -0
  373. package/fixtures/cases/nested-object-reference/context.json +1 -0
  374. package/fixtures/cases/nested-object-reference/expected.json +7 -0
  375. package/fixtures/cases/nested-object-reference/library/companies/acme.md +4 -0
  376. package/fixtures/cases/nested-object-reference/library/deals/renewal.md +17 -0
  377. package/fixtures/cases/nested-object-reference/library/places/depot.md +4 -0
  378. package/fixtures/cases/nested-object-reference/library/products/seats.md +4 -0
  379. package/fixtures/cases/nested-object-reference/library/products/support.md +4 -0
  380. package/fixtures/cases/nested-object-reference/schema.md +34 -0
  381. package/fixtures/cases/nested-reference/context.json +1 -0
  382. package/fixtures/cases/nested-reference/expected.json +1 -0
  383. package/fixtures/cases/nested-reference/library/companies/acme.md +4 -0
  384. package/fixtures/cases/nested-reference/library/deals/renewal.md +18 -0
  385. package/fixtures/cases/nested-reference/library/places/depot.md +4 -0
  386. package/fixtures/cases/nested-reference/library/products/seats.md +4 -0
  387. package/fixtures/cases/nested-reference/library/products/support.md +4 -0
  388. package/fixtures/cases/nested-reference/schema.md +34 -0
  389. package/fixtures/cases/nested-required-field/context.json +1 -0
  390. package/fixtures/cases/nested-required-field/expected.json +7 -0
  391. package/fixtures/cases/nested-required-field/library/companies/acme.md +4 -0
  392. package/fixtures/cases/nested-required-field/library/deals/renewal.md +55 -0
  393. package/fixtures/cases/nested-required-field/schema.md +57 -0
  394. package/fixtures/cases/numeric-range/context.json +1 -0
  395. package/fixtures/cases/numeric-range/expected.json +7 -0
  396. package/fixtures/cases/numeric-range/library/companies/acme.md +4 -0
  397. package/fixtures/cases/numeric-range/library/deals/renewal.md +56 -0
  398. package/fixtures/cases/numeric-range/schema.md +57 -0
  399. package/fixtures/cases/one-key-two-labels/context.json +1 -0
  400. package/fixtures/cases/one-key-two-labels/expected.json +5 -0
  401. package/fixtures/cases/one-key-two-labels/schema.md +7 -0
  402. package/fixtures/cases/one-key-two-types/context.json +1 -0
  403. package/fixtures/cases/one-key-two-types/expected.json +5 -0
  404. package/fixtures/cases/one-key-two-types/schema.md +6 -0
  405. package/fixtures/cases/one-of-variant/context.json +1 -0
  406. package/fixtures/cases/one-of-variant/expected.json +7 -0
  407. package/fixtures/cases/one-of-variant/library/companies/acme.md +4 -0
  408. package/fixtures/cases/one-of-variant/library/deals/renewal.md +56 -0
  409. package/fixtures/cases/one-of-variant/schema.md +57 -0
  410. package/fixtures/cases/other-room-reference/context.json +1 -0
  411. package/fixtures/cases/other-room-reference/expected.json +7 -0
  412. package/fixtures/cases/other-room-reference/library/companies/acme.md +4 -0
  413. package/fixtures/cases/other-room-reference/library/deals/renewal.md +17 -0
  414. package/fixtures/cases/other-room-reference/library/places/depot.md +4 -0
  415. package/fixtures/cases/other-room-reference/library/products/seats.md +4 -0
  416. package/fixtures/cases/other-room-reference/library/products/support.md +4 -0
  417. package/fixtures/cases/other-room-reference/schema.md +34 -0
  418. package/fixtures/cases/paragraph-link-definition/schema.md +3 -0
  419. package/fixtures/cases/prototype-field/expected.json +3 -2
  420. package/fixtures/cases/prototype-field/library/item.md +2 -2
  421. package/fixtures/cases/prototype-field/schema.md +7 -0
  422. package/fixtures/cases/quoted-link-definition/library/notes/draft.md +1 -1
  423. package/fixtures/cases/quoted-link-definition/schema.md +3 -0
  424. package/fixtures/cases/reference-into-a-reserved-name/context.json +1 -0
  425. package/fixtures/cases/reference-into-a-reserved-name/expected.json +7 -0
  426. package/fixtures/cases/reference-into-a-reserved-name/library/notes/a.md +4 -0
  427. package/fixtures/cases/reference-into-a-reserved-name/library/settings/brief.md +1 -0
  428. package/fixtures/cases/reference-into-a-reserved-name/schema.md +5 -0
  429. package/fixtures/cases/reference-to-any-file-name/context.json +1 -0
  430. package/fixtures/cases/reference-to-any-file-name/expected.json +1 -0
  431. package/fixtures/cases/reference-to-any-file-name/library/people/100%.md +4 -0
  432. package/fixtures/cases/reference-to-any-file-name/library/people/C#.md +4 -0
  433. package/fixtures/cases/reference-to-any-file-name/library/people/My notes.md +4 -0
  434. package/fixtures/cases/reference-to-any-file-name/library/people/[draft].md +4 -0
  435. package/fixtures/cases/reference-to-any-file-name/library/people/c (d).md +4 -0
  436. package/fixtures/cases/reference-to-any-file-name/library/people/caf/303/251.md +4 -0
  437. package/fixtures/cases/reference-to-any-file-name/library/people//320/236/321/202/321/207/321/221/321/202.md +4 -0
  438. package/fixtures/cases/reference-to-any-file-name/library/tasks/bracket.md +9 -0
  439. package/fixtures/cases/reference-to-any-file-name/library/tasks/cyrillic.md +9 -0
  440. package/fixtures/cases/reference-to-any-file-name/library/tasks/decomposed.md +9 -0
  441. package/fixtures/cases/reference-to-any-file-name/library/tasks/hash.md +9 -0
  442. package/fixtures/cases/reference-to-any-file-name/library/tasks/parenthesis.md +9 -0
  443. package/fixtures/cases/reference-to-any-file-name/library/tasks/percent.md +9 -0
  444. package/fixtures/cases/reference-to-any-file-name/library/tasks/spaced.md +9 -0
  445. package/fixtures/cases/reference-to-any-file-name/schema.md +12 -0
  446. package/fixtures/cases/referenced-missing-file/library/a.md +2 -2
  447. package/fixtures/cases/referenced-missing-file/library/b.md +2 -2
  448. package/fixtures/cases/referenced-missing-file/schema.md +12 -0
  449. package/fixtures/cases/referenced-missing-non-latin-file/context.json +1 -0
  450. package/fixtures/cases/referenced-missing-non-latin-file/expected.json +6 -0
  451. package/fixtures/cases/referenced-missing-non-latin-file/library/tasks/a.md +9 -0
  452. package/fixtures/cases/referenced-missing-non-latin-file/library/tasks/b.md +9 -0
  453. package/fixtures/cases/referenced-missing-non-latin-file/schema.md +12 -0
  454. package/fixtures/cases/remote-ref/context.json +1 -0
  455. package/fixtures/cases/remote-ref/expected.json +5 -0
  456. package/fixtures/cases/remote-ref/schema.md +5 -0
  457. package/fixtures/cases/room-md-declares-a-type/context.json +1 -0
  458. package/fixtures/cases/room-md-declares-a-type/expected.json +6 -0
  459. package/fixtures/cases/room-md-declares-a-type/library/ROOM.md +5 -0
  460. package/fixtures/cases/schema-body-ignored/context.json +1 -0
  461. package/fixtures/cases/schema-body-ignored/expected.json +1 -0
  462. package/fixtures/cases/schema-body-ignored/schema.md +9 -0
  463. package/fixtures/cases/schema-type-named-folders/context.json +1 -0
  464. package/fixtures/cases/schema-type-named-folders/expected.json +5 -0
  465. package/fixtures/cases/schema-type-named-folders/schema.md +5 -0
  466. package/fixtures/cases/schema-type-named-type/context.json +1 -0
  467. package/fixtures/cases/schema-type-named-type/expected.json +5 -0
  468. package/fixtures/cases/schema-type-named-type/schema.md +5 -0
  469. package/fixtures/cases/second-member-document/expected.json +2 -2
  470. package/fixtures/cases/second-member-document/schema.md +6 -0
  471. package/fixtures/cases/sections-keyword-refused/context.json +1 -0
  472. package/fixtures/cases/sections-keyword-refused/expected.json +5 -0
  473. package/fixtures/cases/sections-keyword-refused/schema.md +8 -0
  474. package/fixtures/cases/shortcut-reference-link/library/item.md +2 -2
  475. package/fixtures/cases/shortcut-reference-link/schema.md +7 -0
  476. package/fixtures/cases/string-length/context.json +1 -0
  477. package/fixtures/cases/string-length/expected.json +7 -0
  478. package/fixtures/cases/string-length/library/companies/acme.md +4 -0
  479. package/fixtures/cases/string-length/library/deals/renewal.md +56 -0
  480. package/fixtures/cases/string-length/schema.md +57 -0
  481. package/fixtures/cases/submission-keys/library/notes/visitor.md +2 -2
  482. package/fixtures/cases/submission-keys/schema.md +6 -0
  483. package/fixtures/cases/text-field-kind/expected.json +1 -4
  484. package/fixtures/cases/text-field-kind/library/page.md +1 -1
  485. package/fixtures/cases/text-field-kind/schema.md +6 -0
  486. package/fixtures/cases/thematic-break-ends-the-values/context.json +1 -0
  487. package/fixtures/cases/thematic-break-ends-the-values/expected.json +1 -0
  488. package/fixtures/cases/thematic-break-ends-the-values/library/item.md +10 -0
  489. package/fixtures/cases/thematic-break-ends-the-values/schema.md +5 -0
  490. package/fixtures/cases/truncated-link-definition/library/notes/draft.md +1 -1
  491. package/fixtures/cases/truncated-link-definition/schema.md +3 -0
  492. package/fixtures/cases/typed-path-names-another-type/context.json +11 -0
  493. package/fixtures/cases/typed-path-names-another-type/expected.json +6 -0
  494. package/fixtures/cases/typed-path-names-another-type/library/settings/prefs/one.md +3 -0
  495. package/fixtures/cases/typed-path-names-another-type/schema.md +8 -0
  496. package/fixtures/cases/typed-path-names-its-type/context.json +11 -0
  497. package/fixtures/cases/typed-path-names-its-type/expected.json +3 -0
  498. package/fixtures/cases/typed-path-names-its-type/library/settings/prefs/deeper/two.md +1 -0
  499. package/fixtures/cases/typed-path-names-its-type/library/settings/prefs/one.md +4 -0
  500. package/fixtures/cases/typed-path-names-its-type/schema.md +8 -0
  501. package/fixtures/cases/typed-path-names-no-type/context.json +11 -0
  502. package/fixtures/cases/typed-path-names-no-type/expected.json +6 -0
  503. package/fixtures/cases/typed-path-names-no-type/library/settings/prefs/one.md +1 -0
  504. package/fixtures/cases/typed-path-names-no-type/schema.md +8 -0
  505. package/fixtures/cases/types-folder-content/library/types/task.md +1 -1
  506. package/fixtures/cases/types-folder-content/schema.md +6 -0
  507. package/fixtures/cases/undeclared-field/expected.json +3 -2
  508. package/fixtures/cases/undeclared-field/library/item.md +2 -2
  509. package/fixtures/cases/undeclared-field/schema.md +7 -0
  510. package/fixtures/cases/unevaluated-items-closed/context.json +1 -0
  511. package/fixtures/cases/unevaluated-items-closed/expected.json +7 -0
  512. package/fixtures/cases/unevaluated-items-closed/library/trip.md +16 -0
  513. package/fixtures/cases/unevaluated-items-closed/schema.md +12 -0
  514. package/fixtures/cases/unique-in-app-schema/context.json +1 -0
  515. package/fixtures/cases/unique-in-app-schema/expected.json +5 -0
  516. package/fixtures/cases/unique-in-app-schema/schema.yaml +7 -0
  517. package/fixtures/cases/unique-indexed-field/context.json +1 -0
  518. package/fixtures/cases/unique-indexed-field/expected.json +1 -0
  519. package/fixtures/cases/unique-indexed-field/library/tickets/first.md +8 -0
  520. package/fixtures/cases/unique-indexed-field/library/tickets/second.md +8 -0
  521. package/fixtures/cases/unique-indexed-field/schema.md +9 -0
  522. package/fixtures/cases/unique-off-indexed-field/context.json +1 -0
  523. package/fixtures/cases/unique-off-indexed-field/expected.json +5 -0
  524. package/fixtures/cases/unique-off-indexed-field/schema.md +9 -0
  525. package/fixtures/cases/unknown-type/expected.json +1 -1
  526. package/fixtures/cases/unknown-type/schema.md +5 -0
  527. package/fixtures/cases/unlisted-reference-type/expected.json +2 -2
  528. package/fixtures/cases/unlisted-reference-type/schema.md +5 -0
  529. package/fixtures/cases/unnamed-typed-path-checks-its-fields/context.json +11 -0
  530. package/fixtures/cases/unnamed-typed-path-checks-its-fields/expected.json +6 -0
  531. package/fixtures/cases/unnamed-typed-path-checks-its-fields/library/rooms/team/tasks/plan.md +5 -0
  532. package/fixtures/cases/unnamed-typed-path-checks-its-fields/schema.md +7 -0
  533. package/fixtures/cases/unnamed-typed-path-names-a-type/context.json +11 -0
  534. package/fixtures/cases/unnamed-typed-path-names-a-type/expected.json +6 -0
  535. package/fixtures/cases/unnamed-typed-path-names-a-type/library/rooms/team/tasks/plan.md +7 -0
  536. package/fixtures/cases/unnamed-typed-path-names-a-type/schema.md +7 -0
  537. package/fixtures/cases/unnamed-typed-path-reads-its-type/context.json +11 -0
  538. package/fixtures/cases/unnamed-typed-path-reads-its-type/expected.json +3 -0
  539. package/fixtures/cases/unnamed-typed-path-reads-its-type/library/rooms/team/plan.md +1 -0
  540. package/fixtures/cases/unnamed-typed-path-reads-its-type/library/rooms/team/tasks/plan.md +6 -0
  541. package/fixtures/cases/unnamed-typed-path-reads-its-type/schema.md +7 -0
  542. package/fixtures/cases/unnamed-typed-path-without-a-body/context.json +11 -0
  543. package/fixtures/cases/unnamed-typed-path-without-a-body/expected.json +5 -0
  544. package/fixtures/cases/unnamed-typed-path-without-a-body/library/rooms/team/tasks/plan.md +5 -0
  545. package/fixtures/cases/unnamed-typed-path-without-a-body/schema.md +7 -0
  546. package/fixtures/cases/unresolved-link/library/item.md +2 -2
  547. package/fixtures/cases/unresolved-link/schema.md +7 -0
  548. package/fixtures/cases/valid-typed-document/library/people/ada.md +1 -1
  549. package/fixtures/cases/valid-typed-document/library/tasks/one.md +11 -11
  550. package/fixtures/cases/valid-typed-document/schema.md +17 -0
  551. package/fixtures/cases/wide-item-fence-link/schema.md +3 -0
  552. package/fixtures/forms.json +371 -0
  553. package/fixtures/preamble.json +29 -8
  554. package/fixtures/queries.json +2134 -0
  555. package/fixtures/references.json +15 -0
  556. package/package.json +20 -4
  557. package/dist/blocks.d.ts +0 -11
  558. package/dist/blocks.d.ts.map +0 -1
  559. package/dist/blocks.js +0 -62
  560. package/dist/divide.d.ts +0 -3
  561. package/dist/divide.d.ts.map +0 -1
  562. package/dist/divide.js +0 -310
  563. package/dist/links.d.ts +0 -26
  564. package/dist/links.d.ts.map +0 -1
  565. package/dist/links.js +0 -774
  566. package/dist/profile.d.ts +0 -6
  567. package/dist/profile.d.ts.map +0 -1
  568. package/dist/profile.js +0 -5
  569. package/dist/project.d.ts +0 -21
  570. package/dist/project.d.ts.map +0 -1
  571. package/dist/project.js +0 -106
  572. package/dist/sections.d.ts +0 -11
  573. package/dist/sections.d.ts.map +0 -1
  574. package/dist/sections.js +0 -57
  575. package/fixtures/cases/binary-any-reference/schema.yaml +0 -4
  576. package/fixtures/cases/binary-document-collision/schema.yaml +0 -2
  577. package/fixtures/cases/binary-link-outside-collection/schema.yaml +0 -2
  578. package/fixtures/cases/binary-prototype-reference/schema.yaml +0 -4
  579. package/fixtures/cases/binary-typed-reference/schema.yaml +0 -5
  580. package/fixtures/cases/bracketed-link-definition/schema.yaml +0 -6
  581. package/fixtures/cases/declared-binary-links/schema.yaml +0 -2
  582. package/fixtures/cases/duplicate-link-definition/schema.yaml +0 -6
  583. package/fixtures/cases/fenced-link-definition/schema.yaml +0 -6
  584. package/fixtures/cases/field-enum/schema.yaml +0 -7
  585. package/fixtures/cases/frontmatter-schema/expected.json +0 -5
  586. package/fixtures/cases/frontmatter-schema/schema.yaml +0 -6
  587. package/fixtures/cases/interrupted-link-definition/schema.yaml +0 -2
  588. package/fixtures/cases/long-fence-link-definition/schema.yaml +0 -2
  589. package/fixtures/cases/malformed-definition/schema.yaml +0 -4
  590. package/fixtures/cases/member-document/schema.yaml +0 -5
  591. package/fixtures/cases/missing-binary-image/schema.yaml +0 -2
  592. package/fixtures/cases/missing-binary-link/schema.yaml +0 -2
  593. package/fixtures/cases/missing-required-field/schema.yaml +0 -7
  594. package/fixtures/cases/missing-section-item-kind/expected.json +0 -5
  595. package/fixtures/cases/missing-section-item-kind/schema.yaml +0 -6
  596. package/fixtures/cases/paragraph-link-definition/schema.yaml +0 -2
  597. package/fixtures/cases/prototype-field/schema.yaml +0 -6
  598. package/fixtures/cases/quoted-link-definition/schema.yaml +0 -2
  599. package/fixtures/cases/referenced-missing-file/schema.yaml +0 -10
  600. package/fixtures/cases/second-member-document/schema.yaml +0 -5
  601. package/fixtures/cases/section-item-enum/expected.json +0 -6
  602. package/fixtures/cases/section-item-enum/library/task.md +0 -8
  603. package/fixtures/cases/section-item-enum/schema.yaml +0 -4
  604. package/fixtures/cases/section-item-kind/expected.json +0 -6
  605. package/fixtures/cases/section-item-kind/library/task.md +0 -8
  606. package/fixtures/cases/section-item-kind/schema.yaml +0 -4
  607. package/fixtures/cases/section-items/library/page.md +0 -28
  608. package/fixtures/cases/section-items/schema.yaml +0 -8
  609. package/fixtures/cases/section-reference-path/expected.json +0 -6
  610. package/fixtures/cases/section-reference-path/library/page.md +0 -7
  611. package/fixtures/cases/section-reference-path/schema.yaml +0 -4
  612. package/fixtures/cases/section-reference-type/expected.json +0 -6
  613. package/fixtures/cases/section-reference-type/library/page.md +0 -7
  614. package/fixtures/cases/section-reference-type/schema.yaml +0 -4
  615. package/fixtures/cases/shortcut-reference-link/schema.yaml +0 -6
  616. package/fixtures/cases/structured-section/expected.json +0 -6
  617. package/fixtures/cases/structured-section/schema.yaml +0 -7
  618. package/fixtures/cases/submission-keys/schema.yaml +0 -4
  619. package/fixtures/cases/text-field-kind/schema.yaml +0 -4
  620. package/fixtures/cases/truncated-link-definition/schema.yaml +0 -2
  621. package/fixtures/cases/types-folder-content/schema.yaml +0 -4
  622. package/fixtures/cases/undeclared-field/schema.yaml +0 -6
  623. package/fixtures/cases/unknown-type/schema.yaml +0 -4
  624. package/fixtures/cases/unlisted-reference-type/schema.yaml +0 -4
  625. package/fixtures/cases/unresolved-link/schema.yaml +0 -6
  626. package/fixtures/cases/valid-typed-document/schema.yaml +0 -15
  627. package/fixtures/cases/wide-item-fence-link/schema.yaml +0 -2
  628. package/fixtures/division.json +0 -409
  629. package/fixtures/projection.json +0 -223
  630. /package/fixtures/cases/{frontmatter-schema → absent-link-dangles}/context.json +0 -0
  631. /package/fixtures/cases/{section-items → absent-link-dangles}/expected.json +0 -0
  632. /package/fixtures/cases/{missing-section-item-kind → absent-optional-field}/context.json +0 -0
  633. /package/fixtures/cases/{section-item-enum → absolute-link}/context.json +0 -0
  634. /package/fixtures/cases/{section-item-kind → attachment-reference-any-file}/context.json +0 -0
  635. /package/fixtures/cases/{section-items → attachment-reference-dangles}/context.json +0 -0
  636. /package/fixtures/cases/{section-reference-path → attachment-reference-outside}/context.json +0 -0
  637. /package/fixtures/cases/{missing-binary-image → binary-image-dangles}/context.json +0 -0
  638. /package/fixtures/cases/{missing-binary-image → binary-image-dangles}/library/notes/draft.md +0 -0
  639. /package/fixtures/cases/{missing-binary-link → binary-link-dangles}/context.json +0 -0
  640. /package/fixtures/cases/{missing-binary-link → binary-link-dangles}/library/notes/draft.md +0 -0
  641. /package/fixtures/cases/{section-reference-type → block-scalar-frontmatter}/context.json +0 -0
  642. /package/fixtures/cases/{structured-section → boolean-field}/context.json +0 -0
  643. /package/fixtures/cases/{section-items → list-items}/library/other.md +0 -0
  644. /package/fixtures/cases/{section-reference-path → list-reference-path}/library/other.md +0 -0
  645. /package/fixtures/cases/{section-reference-type → list-reference-type}/library/note.md +0 -0
@@ -3,13 +3,29 @@
3
3
  Each directory under `cases/` is one text Library, one validation context,
4
4
  and one expected verdict. Consumers load the files under `library/` as
5
5
  path-to-content, an absent `library/` being the empty Library, and the
6
- required `context.json` as `ValidationContext`. Cases with a `schema.yaml` call
7
- `verify` with its text, then compare its refusal or
6
+ required `context.json` as `ValidationContext`. Cases with a `schema.md`, a Room
7
+ schema Document whose frontmatter is the schema, call `verifySchemaDocument` with
8
+ its text and `HOUSE_ROOM_TYPES`, as every Room reads one, and cases with a `schema.yaml`, an
9
+ App's schema text, call `verify` with it and `HOUSE_ROOM_TYPES`; either then compares its refusal or
8
10
  `validate(library, context, verified.model)` against `expected.json`. Other
9
11
  cases compare `validate(library, context)` directly. Text-only cases carry
10
12
  `{ "binaryTargets": [] }`. Binary targets are membership declarations; the
11
13
  corpus supplies no binary bytes or placeholder Documents.
12
14
 
15
+ ## Forms
16
+
17
+ `forms.json` exercises how a typed Document writes its values in its body. It carries `schema`,
18
+ one schema text, `names`, the name each reference value's target shows, and three lists. Each of
19
+ `cases` carries `name`, the `type` its source declares, exact `source` and the `value` `parse`
20
+ reads with that type's definition, and optionally `ranges`, the exact source text of each listed
21
+ pointer's `Document.ranges` entry, `after`, the text `Document.listEnd` is followed by, the
22
+ `preamble`, `sections` and `text` it reads, `written: true` where `create(type)` with one `field`
23
+ change per value but `type` and a `text` change of the case's `text`, applied with the definition
24
+ and a `nameOf` reading `names`, serializes to `source` exactly, and `rendered`, each pointer's
25
+ exact text as GitHub Flavored Markdown renders it. Each of `refused` carries `name`, `type`,
26
+ `source` and the `refusal` `parse` answers, its `rule`, `location` and `line`. Each of `applied`
27
+ carries `name`, `type`, `source`, `changes` and the exact source `apply` writes.
28
+
13
29
  ## Preamble operations
14
30
 
15
31
  `preamble.json` exercises the public parse/apply/serialize seam separately from
@@ -18,48 +34,44 @@ the validation Libraries. Each row carries `name`, exact `source`, expected
18
34
  the source, compare `Document.preamble`, apply
19
35
  `{ kind: 'preamble', prior: preamble, value }`, and compare the serialized result.
20
36
  These cases cover empty and heading-free Documents, frontmatter boundaries,
21
- fenced headings, newline/source preservation, and a moved-export link rewrite.
22
-
23
- ## Projection
24
-
25
- `projection.json` exercises the public `project` seam separately from the
26
- validation Libraries. It carries `schema`, one schema text, and `cases`. Each
27
- case carries `name`, the `file` the Document sits at, exact `source`, the
28
- `documentTargets` the collection holds as Markdown documents, the `definition`
29
- type name or `null`, an optional `move`, an optional `links` inventory, an
30
- optional `relabel`, and `expected`.
31
- A case carrying a `move` lists both the Path its target sits at and the Path the
32
- move takes it to, because the collection holds that target either way.
33
-
34
- Verify the schema, parse the source, call `project(document, file, context)`
35
- with `documentTargets` and the verified type `definition` names, and compare against `expected`. Where
36
- `links` is present, compare `links(document, file)` against it. Then check
37
- that the source is unchanged. Where `move` is present, apply
38
- `{ kind: 'link', href, to }`, confirm the serialized Document changed, and
39
- confirm the projection of the moved Document is still exactly `expected`: a
40
- moved Path rewrites destinations and leaves the projection alone. Where
41
- `relabel` is present, split the source at its `from`, which the source carries
42
- exactly once, join the pieces with its `to`, parse the result, and confirm its
43
- projection is exactly the relabel's own `expected` and differs from the case's:
44
- a changed visible label changes the projection.
45
-
46
- ## Division
47
-
48
- `division.json` exercises the public `divide` seam separately from the
49
- validation Libraries. It carries `schema` and `cases` like `projection.json`,
50
- and each case adds the `budget` the division runs under. Parse the source, call
51
- `divide(document, file, context)` with `{ documentTargets, definition, budget }`,
52
- and compare against `expected`: either `{ "ok": true, "spans": [...] }`, where
53
- each span carries the exact `text` to embed and the exact `source` the returned
54
- `start` and `end` address in that case's source, or `{ "ok": false, "refusal": ... }`. Then
55
- check that the source is unchanged. A span's `text` and `source` differ where
56
- the embedded text repeats a continuation's own heading, carries an internal
57
- link's visible label, or carries a frontmatter value without the quotes the
58
- author wrote, and where the addressed extent encloses a declared structured
59
- section between two pieces one span packs together or the whole of a free-text
60
- value one span carries part of. `start` and `end` are UTF-8 byte offsets into the case's
61
- source; every source in this corpus is ASCII, so a consumer compares the
62
- addressed `source` with an ordinary string slice.
37
+ fenced headings and a heading an HTML block holds, setext, indented and empty
38
+ headings that open a section, newline/source preservation, and a moved-export
39
+ link rewrite.
40
+
41
+ ## Queries
42
+
43
+ `queries.json` is the one table of cases both query evaluators answer. It carries `schema`,
44
+ one schema text; `reads`, the handles of the other Rooms the reader reads; `documents`, each
45
+ named and carrying its `path`, the `room` handle of another Room that holds it, absent for the
46
+ reader's own Room, the `type` a collection
47
+ stores for it (`any` for an untyped Markdown Document, `null` for one that is not Markdown),
48
+ its `fileId`, the `text` the device holds or `null`, and its `fields`; and `cases`, each with a
49
+ `name`, a `query` of filter parts, the `document` it names and whether it `matches`. Verify
50
+ the schema and plan `{ ...query, select: {} }` with `planOf` against its types. Then
51
+ `matches(plan, candidate)` over the named Document, given its type's definition, and the
52
+ condition `sql.tests` writes over a collection holding every Document of the table with the
53
+ values and links `indexed` derives from it, joined with `sql.hopped` for a `hop` whose targets
54
+ are the collection's Documents by Room and Path, a link into a Room the reader does not read
55
+ followed by none, must both answer `matches`. A case that tests other
56
+ Documents names in `refusedInMemory` the part `matches` refuses there as `invalid-query`, since
57
+ one Document cannot answer it, and only the SQL condition answers `matches`. A new operator
58
+ adds its cases here first. The `actor` type's `door` holds the MD model's `WRITE_DOORS`, each
59
+ matched by its own case, as a Trigger condition's `by` reads it. With `types: ["task"]`, every `task` Document both evaluators match, in each case `matches` answers but a `record`'s or an `actor`'s, lies within the
60
+ index plan `walkOf` takes for each case: among the keys of the equality or list it walks, and
61
+ within the runs of keys it walks an order by each indexed field in, a missing value's among
62
+ them, so a new driving test adds its cases here too. Each of `orders` carries a `name`, one `orderBy` clause on a field the `task` type
63
+ names `indexed` and the `order` of every `task` Document, ties by Path in code-point order in
64
+ either direction. The SQL order `sql.sorted` writes over that collection, `compared` over the
65
+ value `heldAt` reads, its instant for a date-time, and the bytes of each Document's `indexKey`,
66
+ a missing value and `null` placed as the clause's `nulls` asks, must each give that order.
67
+
68
+ ## References
69
+
70
+ `references.json` holds House's reference forms. Each row carries `name`, one `reference` and the
71
+ one `pattern` that reads it, `room`, `app`, `space`, `document`, `attachment` or `revision`, or
72
+ `null` where none does: `ROOM_REFERENCE_PATTERN`, `APP_REFERENCE_PATTERN`,
73
+ `SPACE_REFERENCE_PATTERN`, `DOCUMENT_REFERENCE_PATTERN`, `ATTACHMENT_REFERENCE_PATTERN` and
74
+ `REVISION_REFERENCE_PATTERN` must each read exactly the rows that name it.
63
75
 
64
76
  ## Verdict format
65
77
 
@@ -75,56 +87,100 @@ Refusal:
75
87
  {
76
88
  "verdict": "refuse",
77
89
  "file": "<library path>",
78
- "location": "<field or section name>",
90
+ "location": "<JSON Pointer>",
79
91
  "rule": "<rule id>",
92
+ "line": 5,
80
93
  "referrers": ["<library path>"]
81
94
  }
82
95
  ```
83
96
 
84
- `location` is omitted when the rule is not about a field or section.
85
- `referrers` is present only for `referenced-missing-file`. A schema refusal
86
- carries no `file`; its `location`, when present, is the dotted path of the
87
- schema part it concerns, such as `types.task.fields.title`, or `line <n>` for
88
- `schema-yaml`.
97
+ `location` is the JSON Pointer of the value a rule concerns, such as `/shipping/city`, and is
98
+ omitted when the rule concerns none. `line` is the line, from 1, of the Document's source the value
99
+ is written on, present when the value is written; a missing one has none. `referrers` is present only for
100
+ `referenced-missing-file`. A schema refusal carries no `file`; its `location`
101
+ is the JSON Pointer of the schema part it concerns, such as
102
+ `/task/properties/title/type`, or `line <n>` for `schema-yaml`. A `frontmatter-fence` refusal of a
103
+ fence that does not parse carries as its `location` the construct it does not take, one of those
104
+ under [YAML subset](#yaml-subset), and as its `line` the line that construct is written on; one of
105
+ an unclosed fence carries neither.
89
106
 
90
107
  ## Rule ids
91
108
 
92
- | Rule | When |
93
- | ------------------------- | -------------------------------------------------------------------------------- |
94
- | `binary-target-document` | A path is declared as both a text Document and a binary target |
95
- | `frontmatter-fence` | A present frontmatter fence does not parse as the accepted YAML subset |
96
- | `schema-yaml` | A schema text is not a mapping in the accepted YAML subset |
97
- | `schema-shape` | A schema is not a mapping of exactly `types` to a mapping of non-empty names |
98
- | `schema-member-document` | A second type is marked `member_document: true` |
99
- | `definition-shape` | A type is not a mapping of `fields`, `sections`, and a boolean `member_document` |
100
- | `definition-fields` | `fields` is not a mapping |
101
- | `definition-field` | A field spec is not an object of the accepted keys |
102
- | `definition-field-kind` | A field kind is not text, string, number, date, enum, reference, or list |
103
- | `definition-enum-values` | An enum field has no non-empty string `values` |
104
- | `definition-reference-to` | A reference has no `to` naming `any` or a type of the same schema |
105
- | `definition-list-of` | A list field or list section has no `of` that is one scalar kind |
106
- | `definition-sections` | `sections` is not a mapping |
107
- | `definition-section` | A section spec is not an object of the accepted keys |
108
- | `definition-section-kind` | A section kind is not `text` or `list` |
109
- | `unknown-type` | A file declares a type absent from the governing schema |
110
- | `required-field` | A required field is missing |
111
- | `required-section` | A required section heading is missing |
112
- | `field-kind` | A field value fails its kind, including date |
113
- | `field-enum` | A field value is not one of the declared enum values |
114
- | `undeclared-field` | A typed file carries a frontmatter field its type does not declare |
115
- | `unresolved-reference` | A reference field or item resolves to no current file of the required type |
116
- | `unresolved-link` | A relative body link does not resolve to a current path |
117
- | `structured-section` | A declared list section is not a list of its declared item kind |
118
- | `referenced-missing-file` | Remaining files still reference an absent path |
119
- | `unwritable-link` | No Markdown destination form can carry a new link destination |
120
- | `division-budget` | A division budget is not a whole number of at least 2 |
121
-
122
- `unwritable-link` is refused by `apply` and `division-budget` by `divide`, not
123
- by `validate`, so no case under `cases/` carries either.
109
+ A value that fails a JSON Schema keyword is refused under that
110
+ keyword's name, such as `required`, `type`, `enum`, `format`, `pattern`,
111
+ `minimum`, `maxLength`, `maxItems` or `oneOf`, at the value's JSON Pointer; a
112
+ missing required key is named by the Pointer it would sit at. A malformed
113
+ schema keyword is refused under that keyword's name at its Pointer in the
114
+ schema text. The model's own rules:
115
+
116
+ | Rule | When |
117
+ | ------------------------- | --------------------------------------------------------------------------------- |
118
+ | `binary-target-document` | A path is declared as both a text Document and a binary target |
119
+ | `frontmatter-fence` | A present frontmatter fence does not parse as the accepted YAML subset |
120
+ | `schema-yaml` | A schema text is not a mapping in the accepted YAML subset |
121
+ | `schema-type-name` | A type name is empty, starts with `$`, or is `any` or `attachment` |
122
+ | `provided-type` | A schema names a type its caller provides with a key but its two role keywords |
123
+ | `schema` | A type or subschema is neither a mapping nor a boolean |
124
+ | `schema-keyword` | A schema carries a key that is no JSON Schema 2020-12 keyword the model admits |
125
+ | `$defs` | `$defs` is not a mapping |
126
+ | `$ref` | A `$ref` reaches no subschema under `#/$defs/` of the same file |
127
+ | `reference` | `reference` is not on a string or names something but a type, `any`, `attachment` |
128
+ | `member_document` | The mark is not a boolean, or a second type carries it |
129
+ | `indexed` | `indexed` names a field a type cannot index, or more than its caller's bounds |
130
+ | `unique` | `unique` is not `true`, sits on a field its type does not name in `indexed` or anywhere but a field of a type's own `properties`, or is in an App's schema text |
131
+ | `folders` | `folders` is no mapping, or an entry is no folder written from the root with a trailing `/`, sits under a reserved name, or names no type the schema declares |
132
+ | `duplicate-label` | Two fields of one object show one label: a field's `title`, else its key |
133
+ | `conflicting-label` | Declarations of one key in `anyOf`, `oneOf`, `then`, `else` or a composed shape give it two `title`s |
134
+ | `conflicting-type` | Such declarations give one key two JSON types, integer and number counting as one |
135
+ | `name-type` | A type's top-level `name` is not a string |
136
+ | `heading-depth` | A value written under a heading sits past `######`: `##` at the top, a level deeper per property or list item, none inside a `json` block |
137
+ | `unknown-type` | A file declares a type absent from the governing schema, or other than its typed path requires it to name |
138
+ | `folder-type` | A file in a folder `folders` types declares another type, `any` included, that is not built in |
139
+ | `undeclared-field` | A closed object carries a key it does not declare |
140
+ | `malformed-value` | A value is not written in its form, or a typed Document's frontmatter holds a key that is not House's |
141
+ | `repeated-value` | A value is written twice: two lines, a line and a heading, or two headings |
142
+ | `unknown-label` | A line, heading or column of a closed object names no field |
143
+ | `unresolved-reference` | A reference at any depth reaches no member it admits |
144
+ | `unresolved-link` | A body link is an absolute path, leaves the collection or, from a typed Document at a document path, reaches a reserved name |
145
+ | `room-md-type` | `ROOM.md` declares a type |
146
+ | `required-body` | A file at a typed path that requires a body has a body holding no text |
147
+ | `referenced-missing-file` | Remaining files still reference an absent path |
148
+ | `unwritable-link` | No Markdown destination form can carry a new link destination |
149
+ | `field-section` | A section change names a field's label rather than a free section; its location is that field's key |
150
+ | `unwritable-section` | A section change names a section no `## ` heading reads back as itself, such as one with surrounding spaces or a closing run of `#` |
151
+
152
+ `unwritable-link`, `field-section` and `unwritable-section` are refused by `apply`, not by
153
+ `validate`, so no case under `cases/` carries them.
154
+
155
+ A reference that admits `attachment` reaches any path in the same Library, so
156
+ neither `unresolved-reference` for an absent target nor
157
+ `referenced-missing-file` ever names it. A body link to an absent path in the
158
+ Library is accepted too, so `unresolved-link` never names it and
159
+ `referenced-missing-file` never counts it.
124
160
 
125
161
  ## YAML subset
126
162
 
127
- Frontmatter and a schema text are each a mapping in a closed YAML subset: block and flow mappings,
128
- block and flow sequences, plain and quoted scalars, `true`, `false`, `null`,
129
- and decimal numbers. It does not take YAML 1.1 boolean or timestamp aliases,
130
- octal numbers, anchors, tags, or block scalars. A mapping carries each key once.
163
+ Frontmatter and a schema text are each a mapping in a closed subset of YAML 1.2: block and flow
164
+ mappings, block and flow sequences, a block sequence item that opens a mapping, plain scalars, each
165
+ the rest of its line before a ` #` comment, quoted scalars closed on their line (a single-quoted
166
+ scalar doubles its apostrophe, a double-quoted one takes JSON's escapes), literal (`|`) and folded
167
+ (`>`) block scalars with their chomping (`-`, `+`) and indentation (`1` to `9`) indicators, read
168
+ as YAML 1.2 reads them, `true`, `false`, `null`, and decimal numbers. A mapping carries each key
169
+ once. YAML 1.1 boolean and timestamp aliases and octal numbers read as strings, and a plain scalar
170
+ that begins with `&`, `*` or `!` reads as its text, never as an anchor, an alias or a tag.
171
+
172
+ A frontmatter outside the subset is refused as `frontmatter-fence` naming one construct:
173
+
174
+ | Construct | What the frontmatter writes |
175
+ | ---------------------- | ------------------------------------------------------------------------------------------- |
176
+ | `multi-line-scalar` | A plain scalar continued on a deeper line, or a quoted scalar not closed on its line |
177
+ | `indentation` | A line deeper or shallower than its mapping or list, or a block scalar's leading empty line deeper than its first text |
178
+ | `tab` | A tab where indentation or a separating space stands |
179
+ | `mapping-entry` | A line of a block mapping that is no `key: value`, an explicit `?` key among them |
180
+ | `duplicate-key` | A key its mapping already carries |
181
+ | `block-scalar-header` | A block scalar header holding more than its indicators and a comment |
182
+ | `block-scalar-in-flow` | A block scalar inside a flow mapping or sequence |
183
+ | `flow-collection` | A flow mapping or sequence that does not close, or an entry of one it cannot read |
184
+ | `escape` | A double-quoted escape JSON does not define |
185
+ | `unheld-character` | A NUL or an unpaired surrogate, written or escaped |
186
+ | `nesting` | Collections nested more than 64 deep |
@@ -0,0 +1,8 @@
1
+ ---
2
+ type: task
3
+ ---
4
+ - **title**: Ship
5
+
6
+ ## Description
7
+
8
+ See [plan](missing.md).
@@ -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 @@
1
+ { "verdict": "accept" }
@@ -0,0 +1,4 @@
1
+ ---
2
+ type: company
3
+ ---
4
+ # Acme
@@ -0,0 +1,6 @@
1
+ ---
2
+ type: deal
3
+ ---
4
+ - **title**: Lead
5
+ - **company**: [Acme](../companies/acme.md)
6
+ - **stage**: lead
@@ -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,5 +1,5 @@
1
1
  {
2
2
  "verdict": "refuse",
3
- "file": "notes/draft.md",
3
+ "file": "item.md",
4
4
  "rule": "unresolved-link"
5
5
  }
@@ -0,0 +1,8 @@
1
+ ---
2
+ type: task
3
+ ---
4
+ - **title**: Ship
5
+
6
+ ## Description
7
+
8
+ See [plan](/notes/plan.md).
@@ -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 @@
1
+ { "verdict": "accept" }
@@ -0,0 +1,4 @@
1
+ ---
2
+ type: company
3
+ ---
4
+ # Acme
@@ -0,0 +1,18 @@
1
+ ---
2
+ type: deal
3
+ ---
4
+ - **title**: Renewal
5
+ - **company**: [Acme](../companies/acme.md)
6
+ - **shipping**:
7
+ - **city**: Paris
8
+ - **depot**: [Depot](../places/depot.md)
9
+ - **contract**: [Seats](../products/seats.md)
10
+
11
+ The yearly renewal.
12
+
13
+ ## lines
14
+
15
+ | product | quantity |
16
+ | --- | --- |
17
+ | [Seats](../products/seats.md) | 10 |
18
+ | [Support](../products/support.md) | 1 |
@@ -0,0 +1,4 @@
1
+ ---
2
+ type: place
3
+ ---
4
+ # Depot
@@ -0,0 +1,4 @@
1
+ ---
2
+ type: product
3
+ ---
4
+ # Seats
@@ -0,0 +1,4 @@
1
+ ---
2
+ type: product
3
+ ---
4
+ # Support
@@ -0,0 +1,34 @@
1
+ ---
2
+ $defs:
3
+ address:
4
+ type: object
5
+ properties:
6
+ city: { type: string }
7
+ depot: { type: string, reference: place }
8
+ required: [city]
9
+ company:
10
+ properties:
11
+ name: { type: string }
12
+ product:
13
+ properties:
14
+ name: { type: string }
15
+ place:
16
+ properties:
17
+ name: { type: string }
18
+ deal:
19
+ type: object
20
+ properties:
21
+ title: { type: string }
22
+ company: { type: string, reference: company }
23
+ shipping: { $ref: '#/$defs/address' }
24
+ lines:
25
+ type: array
26
+ items:
27
+ type: object
28
+ properties:
29
+ product: { type: string, reference: product }
30
+ quantity: { type: integer, minimum: 1 }
31
+ required: [product, quantity]
32
+ contract: { type: string, reference: attachment }
33
+ required: [title, company]
34
+ ---
@@ -0,0 +1 @@
1
+ { "verdict": "accept" }
@@ -0,0 +1,4 @@
1
+ ---
2
+ type: company
3
+ ---
4
+ # Acme
@@ -0,0 +1,18 @@
1
+ ---
2
+ type: deal
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)
10
+
11
+ The yearly renewal.
12
+
13
+ ## lines
14
+
15
+ | product | quantity |
16
+ | --- | --- |
17
+ | [Seats](../products/seats.md) | 10 |
18
+ | [Support](../products/support.md) | 1 |
@@ -0,0 +1,4 @@
1
+ ---
2
+ type: place
3
+ ---
4
+ # Depot
@@ -0,0 +1,4 @@
1
+ ---
2
+ type: product
3
+ ---
4
+ # Seats
@@ -0,0 +1,4 @@
1
+ ---
2
+ type: product
3
+ ---
4
+ # Support
@@ -0,0 +1,34 @@
1
+ ---
2
+ $defs:
3
+ address:
4
+ type: object
5
+ properties:
6
+ city: { type: string }
7
+ depot: { type: string, reference: place }
8
+ required: [city]
9
+ company:
10
+ properties:
11
+ name: { type: string }
12
+ product:
13
+ properties:
14
+ name: { type: string }
15
+ place:
16
+ properties:
17
+ name: { type: string }
18
+ deal:
19
+ type: object
20
+ properties:
21
+ title: { type: string }
22
+ company: { type: string, reference: company }
23
+ shipping: { $ref: '#/$defs/address' }
24
+ lines:
25
+ type: array
26
+ items:
27
+ type: object
28
+ properties:
29
+ product: { type: string, reference: product }
30
+ quantity: { type: integer, minimum: 1 }
31
+ required: [product, quantity]
32
+ contract: { type: string, reference: attachment }
33
+ required: [title, company]
34
+ ---
@@ -0,0 +1,7 @@
1
+ {
2
+ "verdict": "refuse",
3
+ "file": "deals/renewal.md",
4
+ "rule": "unresolved-reference",
5
+ "location": "/contract",
6
+ "line": 9
7
+ }
@@ -0,0 +1,4 @@
1
+ ---
2
+ type: company
3
+ ---
4
+ # Acme
@@ -0,0 +1,18 @@
1
+ ---
2
+ type: deal
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](/rooms/other/assets/contract.pdf)
10
+
11
+ The yearly renewal.
12
+
13
+ ## lines
14
+
15
+ | product | quantity |
16
+ | --- | --- |
17
+ | [Seats](../products/seats.md) | 10 |
18
+ | [Support](../products/support.md) | 1 |
@@ -0,0 +1,4 @@
1
+ ---
2
+ type: place
3
+ ---
4
+ # Depot
@@ -0,0 +1,4 @@
1
+ ---
2
+ type: product
3
+ ---
4
+ # Seats
@@ -0,0 +1,4 @@
1
+ ---
2
+ type: product
3
+ ---
4
+ # Support