@takeshape/schema 11.52.0 → 11.56.1

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 (1030) hide show
  1. package/dist/__tests__/_examples.test.js +77 -0
  2. package/dist/__tests__/agents.test.js +163 -0
  3. package/dist/__tests__/api-version.test.js +24 -0
  4. package/dist/__tests__/builtin-schema.test.js +18 -0
  5. package/dist/__tests__/content-schema-transform.test.d.ts +1 -0
  6. package/dist/__tests__/content-schema-transform.test.js +522 -0
  7. package/dist/__tests__/create-input-schema.test.d.ts +1 -0
  8. package/dist/__tests__/create-input-schema.test.js +184 -0
  9. package/dist/__tests__/enum.test.d.ts +1 -0
  10. package/dist/__tests__/enum.test.js +36 -0
  11. package/dist/__tests__/flatten-templates.test.d.ts +1 -0
  12. package/dist/__tests__/flatten-templates.test.js +40 -0
  13. package/dist/__tests__/get-is-leaf.test.d.ts +1 -0
  14. package/dist/__tests__/get-is-leaf.test.js +50 -0
  15. package/dist/__tests__/interfaces.test.d.ts +1 -0
  16. package/dist/__tests__/interfaces.test.js +219 -0
  17. package/dist/__tests__/migration.test.d.ts +1 -0
  18. package/dist/__tests__/migration.test.js +34 -0
  19. package/dist/__tests__/mocks.test.d.ts +1 -0
  20. package/dist/__tests__/mocks.test.js +24 -0
  21. package/dist/__tests__/refs.test.d.ts +1 -0
  22. package/dist/__tests__/refs.test.js +752 -0
  23. package/dist/__tests__/relationships.test.d.ts +1 -0
  24. package/dist/__tests__/relationships.test.js +638 -0
  25. package/dist/__tests__/schema-transform.test.d.ts +1 -0
  26. package/dist/__tests__/schema-transform.test.js +205 -0
  27. package/dist/__tests__/schema-util.test.d.ts +1 -0
  28. package/dist/__tests__/schema-util.test.js +1731 -0
  29. package/dist/__tests__/service-dependencies.test.d.ts +1 -0
  30. package/dist/__tests__/service-dependencies.test.js +360 -0
  31. package/dist/__tests__/unions.test.d.ts +1 -0
  32. package/dist/__tests__/unions.test.js +44 -0
  33. package/dist/__tests__/validate.test.d.ts +1 -0
  34. package/dist/__tests__/validate.test.js +1926 -0
  35. package/dist/__tests__/workflows.test.d.ts +3 -0
  36. package/dist/__tests__/workflows.test.js +149 -0
  37. package/dist/agents.d.ts +14 -0
  38. package/dist/auth-schemas.d.ts +125 -0
  39. package/dist/builtin-schema.d.ts +8 -0
  40. package/dist/content-schema-transform.d.ts +35 -0
  41. package/dist/content-schema-transform.js +162 -0
  42. package/dist/create-input-schema.d.ts +9 -0
  43. package/dist/enum.d.ts +2 -0
  44. package/dist/flatten-templates.d.ts +2 -0
  45. package/dist/flatten-templates.js +20 -0
  46. package/dist/get-is-leaf.d.ts +3 -0
  47. package/dist/get-is-leaf.js +56 -0
  48. package/dist/index.d.ts +48 -0
  49. package/dist/index.js +46 -0
  50. package/dist/interfaces.d.ts +12 -0
  51. package/dist/interfaces.js +85 -0
  52. package/dist/layers/__tests__/layers.test.d.ts +1 -0
  53. package/dist/layers/__tests__/layers.test.js +38 -0
  54. package/dist/layers/layers.d.ts +26 -0
  55. package/dist/layers/layers.js +301 -0
  56. package/dist/layers/refs.d.ts +102 -0
  57. package/dist/layers/refs.js +220 -0
  58. package/dist/layers/type-utils.d.ts +59 -0
  59. package/dist/layers/type-utils.js +118 -0
  60. package/dist/layers/visitor.d.ts +5 -0
  61. package/dist/layers/visitor.js +38 -0
  62. package/dist/migration/index.d.ts +64 -0
  63. package/dist/migration/index.js +122 -0
  64. package/dist/migration/to/__tests__/v3.10.0.test.d.ts +1 -0
  65. package/dist/migration/to/__tests__/v3.10.0.test.js +90 -0
  66. package/dist/migration/to/__tests__/v3.12.3.test.d.ts +1 -0
  67. package/dist/migration/to/__tests__/v3.12.3.test.js +103 -0
  68. package/dist/migration/to/__tests__/v3.17.test.d.ts +1 -0
  69. package/dist/migration/to/__tests__/v3.17.test.js +71 -0
  70. package/dist/migration/to/__tests__/v3.34.0.test.d.ts +1 -0
  71. package/dist/migration/to/__tests__/v3.34.0.test.js +240 -0
  72. package/dist/migration/to/__tests__/v3.39.0.test.d.ts +1 -0
  73. package/dist/migration/to/__tests__/v3.39.0.test.js +116 -0
  74. package/dist/migration/to/__tests__/v3.46.0.test.d.ts +1 -0
  75. package/dist/migration/to/__tests__/v3.46.0.test.js +59 -0
  76. package/dist/migration/to/v3.0.0.d.ts +4 -0
  77. package/dist/migration/to/v3.0.0.js +212 -0
  78. package/dist/migration/to/v3.1.0.d.ts +4 -0
  79. package/dist/migration/to/v3.1.0.js +194 -0
  80. package/dist/migration/to/v3.10.0.d.ts +4 -0
  81. package/dist/migration/to/v3.11.0.d.ts +4 -0
  82. package/dist/migration/to/v3.12.0.d.ts +4 -0
  83. package/dist/migration/to/v3.12.1.d.ts +4 -0
  84. package/dist/migration/to/v3.12.2.d.ts +4 -0
  85. package/dist/migration/to/v3.12.3.d.ts +4 -0
  86. package/dist/migration/to/v3.13.0.d.ts +4 -0
  87. package/dist/migration/to/v3.14.0.d.ts +4 -0
  88. package/dist/migration/to/v3.15.0.d.ts +4 -0
  89. package/dist/migration/to/v3.16.0.d.ts +4 -0
  90. package/dist/migration/to/v3.17.0.d.ts +4 -0
  91. package/dist/migration/to/v3.17.1.d.ts +4 -0
  92. package/dist/migration/to/v3.18.0.d.ts +4 -0
  93. package/dist/migration/to/v3.18.1.d.ts +4 -0
  94. package/dist/migration/to/v3.18.2.d.ts +4 -0
  95. package/dist/migration/to/v3.19.0.d.ts +4 -0
  96. package/dist/migration/to/v3.2.0.d.ts +4 -0
  97. package/dist/migration/to/v3.20.0.d.ts +4 -0
  98. package/dist/migration/to/v3.21.0.d.ts +4 -0
  99. package/dist/migration/to/v3.22.0.d.ts +4 -0
  100. package/dist/migration/to/v3.23.0.d.ts +4 -0
  101. package/dist/migration/to/v3.24.0.d.ts +4 -0
  102. package/dist/migration/to/v3.25.0.d.ts +4 -0
  103. package/dist/migration/to/v3.26.0.d.ts +4 -0
  104. package/dist/migration/to/v3.27.0.d.ts +4 -0
  105. package/dist/migration/to/v3.28.0.d.ts +4 -0
  106. package/dist/migration/to/v3.29.0.d.ts +4 -0
  107. package/dist/migration/to/v3.3.0.d.ts +4 -0
  108. package/dist/migration/to/v3.30.0.d.ts +4 -0
  109. package/dist/migration/to/v3.31.0.d.ts +4 -0
  110. package/dist/migration/to/v3.32.0.d.ts +4 -0
  111. package/dist/migration/to/v3.32.0.js +59 -0
  112. package/dist/migration/to/v3.33.0.d.ts +4 -0
  113. package/dist/migration/to/v3.34.0.d.ts +6 -0
  114. package/dist/migration/to/v3.34.0.js +116 -0
  115. package/dist/migration/to/v3.35.0.d.ts +4 -0
  116. package/dist/migration/to/v3.36.0.d.ts +4 -0
  117. package/dist/migration/to/v3.37.0.d.ts +4 -0
  118. package/dist/migration/to/v3.38.0.d.ts +4 -0
  119. package/dist/migration/to/v3.39.0.d.ts +4 -0
  120. package/dist/migration/to/v3.39.0.js +45 -0
  121. package/dist/migration/to/v3.4.0.d.ts +4 -0
  122. package/dist/migration/to/v3.40.0.d.ts +4 -0
  123. package/dist/migration/to/v3.41.0.d.ts +4 -0
  124. package/dist/migration/to/v3.42.0.d.ts +4 -0
  125. package/dist/migration/to/v3.43.0.d.ts +4 -0
  126. package/dist/migration/to/v3.44.0.d.ts +4 -0
  127. package/dist/migration/to/v3.45.0.d.ts +4 -0
  128. package/dist/migration/to/v3.46.0.d.ts +4 -0
  129. package/dist/migration/to/v3.47.0.d.ts +4 -0
  130. package/dist/migration/to/v3.48.0.d.ts +4 -0
  131. package/dist/migration/to/v3.49.0.d.ts +4 -0
  132. package/dist/migration/to/v3.5.0.d.ts +4 -0
  133. package/dist/migration/to/v3.5.1.d.ts +4 -0
  134. package/dist/migration/to/v3.50.0.d.ts +4 -0
  135. package/dist/migration/to/v3.51.0.d.ts +4 -0
  136. package/dist/migration/to/v3.6.0.d.ts +4 -0
  137. package/dist/migration/to/v3.7.0.d.ts +4 -0
  138. package/dist/migration/to/v3.8.0.d.ts +4 -0
  139. package/dist/migration/to/v3.9.0.d.ts +4 -0
  140. package/dist/migration/types.d.ts +19 -0
  141. package/dist/migration/types.js +1 -0
  142. package/dist/mocks.d.ts +13 -0
  143. package/dist/mocks.js +58 -0
  144. package/dist/models/__tests__/project-schema.test.d.ts +1 -0
  145. package/dist/models/__tests__/project-schema.test.js +67 -0
  146. package/dist/models/__tests__/query.test.d.ts +1 -0
  147. package/dist/models/__tests__/query.test.js +27 -0
  148. package/dist/models/__tests__/service.test.d.ts +1 -0
  149. package/dist/models/__tests__/service.test.js +17 -0
  150. package/dist/models/__tests__/shape.test.d.ts +1 -0
  151. package/dist/models/__tests__/shape.test.js +61 -0
  152. package/dist/models/project-schema.d.ts +35 -0
  153. package/dist/models/project-schema.js +92 -0
  154. package/dist/models/query.d.ts +17 -0
  155. package/dist/models/service.d.ts +12 -0
  156. package/dist/models/shape.d.ts +41 -0
  157. package/dist/models/shape.js +85 -0
  158. package/dist/patterns.js +1 -0
  159. package/dist/project-schema/index.d.ts +187 -0
  160. package/dist/project-schema/index.js +75 -0
  161. package/dist/project-schema/latest.d.ts +2222 -0
  162. package/dist/project-schema/migrate.d.ts +4 -0
  163. package/dist/project-schema/migrate.js +194 -0
  164. package/dist/project-schema/v3.48.0.d.ts +2161 -0
  165. package/dist/project-schema/v3.49.0.d.ts +2170 -0
  166. package/dist/project-schema/v3.50.0.d.ts +2222 -0
  167. package/dist/project-schema/v3.51.0.d.ts +2222 -0
  168. package/dist/refs.d.ts +226 -0
  169. package/dist/refs.js +608 -0
  170. package/dist/relationships.d.ts +40 -0
  171. package/dist/relationships.js +311 -0
  172. package/dist/runtime-schema.d.ts +5 -0
  173. package/dist/runtime-schema.js +80 -0
  174. package/dist/schema-transform.d.ts +19 -0
  175. package/dist/schema-transform.js +74 -0
  176. package/dist/schema-util.d.ts +210 -0
  177. package/dist/schema-util.js +1077 -0
  178. package/dist/schemas/auth-schemas.json +365 -0
  179. package/dist/schemas/index.js +154 -0
  180. package/dist/schemas/project-schema/experimental.json +1104 -0
  181. package/dist/service-dependencies.d.ts +13 -0
  182. package/dist/service-dependencies.js +165 -0
  183. package/dist/services/__tests__/services.test.d.ts +1 -0
  184. package/dist/services/__tests__/services.test.js +113 -0
  185. package/dist/services/services.d.ts +31 -0
  186. package/dist/services/services.js +145 -0
  187. package/dist/services/types.js +1 -0
  188. package/dist/services/util.d.ts +16 -0
  189. package/dist/taxonomies.d.ts +15 -0
  190. package/dist/taxonomies.js +24 -0
  191. package/dist/template-shapes/__tests__/index.test.d.ts +1 -0
  192. package/dist/template-shapes/__tests__/index.test.js +40 -0
  193. package/dist/template-shapes/__tests__/names.test.d.ts +1 -0
  194. package/dist/template-shapes/__tests__/names.test.js +19 -0
  195. package/dist/template-shapes/__tests__/templates.test.d.ts +1 -0
  196. package/dist/template-shapes/__tests__/templates.test.js +80 -0
  197. package/dist/template-shapes/__tests__/where.test.d.ts +1 -0
  198. package/dist/template-shapes/__tests__/where.test.js +218 -0
  199. package/dist/template-shapes/index.d.ts +7 -0
  200. package/dist/template-shapes/names.d.ts +10 -0
  201. package/dist/template-shapes/templates.d.ts +32 -0
  202. package/dist/template-shapes/templates.js +319 -0
  203. package/dist/template-shapes/types.d.ts +15 -0
  204. package/dist/template-shapes/where.d.ts +37 -0
  205. package/dist/template-shapes/where.js +402 -0
  206. package/dist/types/__tests__/utils.test.d.ts +1 -0
  207. package/dist/types/__tests__/utils.test.js +159 -0
  208. package/dist/types/index.d.ts +3 -0
  209. package/dist/types/index.js +2 -0
  210. package/dist/types/transforms.d.ts +13 -0
  211. package/dist/types/transforms.js +1 -0
  212. package/dist/types/types.d.ts +211 -0
  213. package/dist/types/utils.d.ts +117 -0
  214. package/dist/types/utils.js +279 -0
  215. package/dist/unions.d.ts +14 -0
  216. package/dist/unions.js +77 -0
  217. package/dist/util/__tests__/api-indexing.test.d.ts +1 -0
  218. package/dist/util/__tests__/api-indexing.test.js +129 -0
  219. package/dist/util/__tests__/detect-cycles.test.d.ts +1 -0
  220. package/dist/util/__tests__/detect-cycles.test.js +193 -0
  221. package/dist/util/__tests__/find-shape-at-path.test.d.ts +1 -0
  222. package/dist/util/__tests__/find-shape-at-path.test.js +41 -0
  223. package/dist/util/__tests__/form-config.test.d.ts +1 -0
  224. package/dist/util/__tests__/form-config.test.js +196 -0
  225. package/dist/util/__tests__/get-return-shape.test.d.ts +1 -0
  226. package/dist/util/__tests__/get-return-shape.test.js +27 -0
  227. package/dist/util/__tests__/has-args.test.d.ts +1 -0
  228. package/dist/util/__tests__/has-args.test.js +46 -0
  229. package/dist/util/__tests__/merge.test.d.ts +1 -0
  230. package/dist/util/__tests__/merge.test.js +1074 -0
  231. package/dist/util/__tests__/patch-schema.test.d.ts +1 -0
  232. package/dist/util/__tests__/patch-schema.test.js +82 -0
  233. package/dist/util/__tests__/shapes.test.d.ts +1 -0
  234. package/dist/util/__tests__/shapes.test.js +30 -0
  235. package/dist/util/ai-tools.d.ts +3 -0
  236. package/dist/util/api-indexing.d.ts +9 -0
  237. package/dist/util/api-indexing.js +57 -0
  238. package/dist/util/detect-cycles.d.ts +7 -0
  239. package/dist/util/detect-cycles.js +45 -0
  240. package/dist/util/find-shape-at-path.d.ts +21 -0
  241. package/dist/util/form-config.d.ts +11 -0
  242. package/dist/util/form-config.js +62 -0
  243. package/dist/util/get-conflicting-properties.d.ts +6 -0
  244. package/dist/util/get-conflicting-properties.js +55 -0
  245. package/dist/util/get-return-shape.d.ts +4 -0
  246. package/dist/util/get-return-shape.js +30 -0
  247. package/dist/util/has-arg.d.ts +4 -0
  248. package/dist/util/has-arg.js +13 -0
  249. package/dist/util/merge.d.ts +15 -0
  250. package/dist/util/merge.js +256 -0
  251. package/dist/util/patch-schema.d.ts +8 -0
  252. package/dist/util/shapes.d.ts +5 -0
  253. package/dist/validate/errors.d.ts +3 -0
  254. package/dist/validate/errors.js +20 -0
  255. package/dist/validate/validate.d.ts +73 -0
  256. package/dist/validate/validate.js +1107 -0
  257. package/dist/versions.d.ts +4 -0
  258. package/dist/versions.js +4 -0
  259. package/dist/workflows.d.ts +14 -0
  260. package/dist/workflows.js +66 -0
  261. package/examples/latest/agent-schema.json +12 -4
  262. package/examples/latest/all-fields-shapes-inline.json +52 -18
  263. package/examples/latest/all-fields-shapes.json +76 -26
  264. package/examples/latest/betzino.json +3139 -902
  265. package/examples/latest/blog-schema.json +28 -8
  266. package/examples/latest/brewery-schema.json +25 -7
  267. package/examples/latest/clear-cache-schema.json +7 -3
  268. package/examples/latest/complex-project-schema.json +359 -98
  269. package/examples/latest/complex-schema.json +1754 -487
  270. package/examples/latest/edit-schema.json +11 -4
  271. package/examples/latest/fabric-ecommerce.json +838 -187
  272. package/examples/latest/frank-and-fred-schema.json +1753 -486
  273. package/examples/latest/klirr-schema.json +2411 -682
  274. package/examples/latest/layers/rick-and-morty-layer.json +32 -11
  275. package/examples/latest/layers/shopify-layer-2023-01.json +8637 -2206
  276. package/examples/latest/layers/shopify-storefront-2023-04.json +1714 -404
  277. package/examples/latest/layers/wordpress-2024-01.json +2746 -691
  278. package/examples/latest/massive-schema.json +584 -131
  279. package/examples/latest/mill-components-schema.json +125 -29
  280. package/examples/latest/nested-shape-arrays.json +19 -7
  281. package/examples/latest/one-earth.json +1113 -236
  282. package/examples/latest/pet-oneof-array.json +22 -7
  283. package/examples/latest/post-schema.json +20 -6
  284. package/examples/latest/pruned-shopify-product-schema.json +830 -185
  285. package/examples/latest/rag-example.json +15 -5
  286. package/examples/latest/real-world-schema.json +56 -14
  287. package/examples/latest/recursive-repeater-schema.json +11 -4
  288. package/examples/latest/recursive-schema.json +11 -4
  289. package/examples/latest/rick-and-morty-ast.json +174 -45
  290. package/examples/latest/rick-and-morty-graphql.json +100 -25
  291. package/examples/latest/rick-and-morty-rest.json +7 -3
  292. package/examples/latest/rick-and-morty-with-indexing.json +13 -5
  293. package/examples/latest/schema-where-filter.json +40 -11
  294. package/examples/latest/schema-with-repeater-draftjs.json +8 -3
  295. package/examples/latest/schema-with-rick-and-morty.json +4 -2
  296. package/examples/latest/shape-books-v3_2_0.json +71 -17
  297. package/examples/latest/shape-books.json +71 -17
  298. package/examples/latest/shape-editor-schema-edited.json +69 -23
  299. package/examples/latest/shape-editor-schema-initial.json +28 -10
  300. package/examples/latest/shapedb-crud-every-prop-type.json +22 -8
  301. package/examples/latest/shopify-lookbook.json +19 -5
  302. package/examples/latest/shopify-product-2022-07.json +3217 -726
  303. package/examples/latest/shopify-product-2023-04.json +4496 -1012
  304. package/examples/latest/shopify-store-with-widget.json +942 -213
  305. package/examples/latest/stripe-product-runtime-schema.json +277 -81
  306. package/examples/latest/stripe-starter-resolved.json +1953 -476
  307. package/examples/latest/user-schema-no-required.json +13 -3
  308. package/examples/latest/user-schema-with-defaults.json +27 -5
  309. package/examples/latest/valvoline-ai-demo.json +69 -17
  310. package/examples/latest/vector-search-schema.json +24 -8
  311. package/package.json +24 -26
  312. package/dist/cjs/package.json +0 -1
  313. package/dist/cjs/src/agents.js +0 -147
  314. package/dist/cjs/src/api-version.js +0 -24
  315. package/dist/cjs/src/auth-schemas.js +0 -8
  316. package/dist/cjs/src/builtin-schema.js +0 -616
  317. package/dist/cjs/src/constants.js +0 -4
  318. package/dist/cjs/src/content-schema-transform.js +0 -175
  319. package/dist/cjs/src/create-input-schema.js +0 -66
  320. package/dist/cjs/src/enum.js +0 -12
  321. package/dist/cjs/src/flatten-templates.js +0 -26
  322. package/dist/cjs/src/get-is-leaf.js +0 -59
  323. package/dist/cjs/src/index.js +0 -62
  324. package/dist/cjs/src/interfaces.js +0 -98
  325. package/dist/cjs/src/layers/layers.js +0 -313
  326. package/dist/cjs/src/layers/refs.js +0 -243
  327. package/dist/cjs/src/layers/type-utils.js +0 -145
  328. package/dist/cjs/src/layers/visitor.js +0 -42
  329. package/dist/cjs/src/migration/index.js +0 -142
  330. package/dist/cjs/src/migration/to/v3.0.0.js +0 -217
  331. package/dist/cjs/src/migration/to/v3.1.0.js +0 -199
  332. package/dist/cjs/src/migration/to/v3.10.0.js +0 -72
  333. package/dist/cjs/src/migration/to/v3.11.0.js +0 -90
  334. package/dist/cjs/src/migration/to/v3.12.0.js +0 -12
  335. package/dist/cjs/src/migration/to/v3.12.1.js +0 -12
  336. package/dist/cjs/src/migration/to/v3.12.2.js +0 -12
  337. package/dist/cjs/src/migration/to/v3.12.3.js +0 -92
  338. package/dist/cjs/src/migration/to/v3.13.0.js +0 -22
  339. package/dist/cjs/src/migration/to/v3.14.0.js +0 -12
  340. package/dist/cjs/src/migration/to/v3.15.0.js +0 -12
  341. package/dist/cjs/src/migration/to/v3.16.0.js +0 -12
  342. package/dist/cjs/src/migration/to/v3.17.0.js +0 -27
  343. package/dist/cjs/src/migration/to/v3.17.1.js +0 -12
  344. package/dist/cjs/src/migration/to/v3.18.0.js +0 -69
  345. package/dist/cjs/src/migration/to/v3.18.1.js +0 -20
  346. package/dist/cjs/src/migration/to/v3.18.2.js +0 -24
  347. package/dist/cjs/src/migration/to/v3.19.0.js +0 -12
  348. package/dist/cjs/src/migration/to/v3.2.0.js +0 -12
  349. package/dist/cjs/src/migration/to/v3.20.0.js +0 -29
  350. package/dist/cjs/src/migration/to/v3.21.0.js +0 -12
  351. package/dist/cjs/src/migration/to/v3.22.0.js +0 -30
  352. package/dist/cjs/src/migration/to/v3.23.0.js +0 -12
  353. package/dist/cjs/src/migration/to/v3.24.0.js +0 -13
  354. package/dist/cjs/src/migration/to/v3.25.0.js +0 -13
  355. package/dist/cjs/src/migration/to/v3.26.0.js +0 -12
  356. package/dist/cjs/src/migration/to/v3.27.0.js +0 -12
  357. package/dist/cjs/src/migration/to/v3.28.0.js +0 -12
  358. package/dist/cjs/src/migration/to/v3.29.0.js +0 -12
  359. package/dist/cjs/src/migration/to/v3.3.0.js +0 -15
  360. package/dist/cjs/src/migration/to/v3.30.0.js +0 -12
  361. package/dist/cjs/src/migration/to/v3.31.0.js +0 -43
  362. package/dist/cjs/src/migration/to/v3.32.0.js +0 -61
  363. package/dist/cjs/src/migration/to/v3.33.0.js +0 -12
  364. package/dist/cjs/src/migration/to/v3.34.0.js +0 -123
  365. package/dist/cjs/src/migration/to/v3.35.0.js +0 -12
  366. package/dist/cjs/src/migration/to/v3.36.0.js +0 -27
  367. package/dist/cjs/src/migration/to/v3.37.0.js +0 -12
  368. package/dist/cjs/src/migration/to/v3.38.0.js +0 -12
  369. package/dist/cjs/src/migration/to/v3.39.0.js +0 -47
  370. package/dist/cjs/src/migration/to/v3.4.0.js +0 -12
  371. package/dist/cjs/src/migration/to/v3.40.0.js +0 -31
  372. package/dist/cjs/src/migration/to/v3.41.0.js +0 -12
  373. package/dist/cjs/src/migration/to/v3.42.0.js +0 -12
  374. package/dist/cjs/src/migration/to/v3.43.0.js +0 -12
  375. package/dist/cjs/src/migration/to/v3.44.0.js +0 -12
  376. package/dist/cjs/src/migration/to/v3.45.0.js +0 -12
  377. package/dist/cjs/src/migration/to/v3.46.0.js +0 -37
  378. package/dist/cjs/src/migration/to/v3.47.0.js +0 -12
  379. package/dist/cjs/src/migration/to/v3.48.0.js +0 -12
  380. package/dist/cjs/src/migration/to/v3.49.0.js +0 -12
  381. package/dist/cjs/src/migration/to/v3.5.0.js +0 -12
  382. package/dist/cjs/src/migration/to/v3.5.1.js +0 -12
  383. package/dist/cjs/src/migration/to/v3.50.0.js +0 -12
  384. package/dist/cjs/src/migration/to/v3.51.0.js +0 -12
  385. package/dist/cjs/src/migration/to/v3.6.0.js +0 -12
  386. package/dist/cjs/src/migration/to/v3.7.0.js +0 -12
  387. package/dist/cjs/src/migration/to/v3.8.0.js +0 -12
  388. package/dist/cjs/src/migration/to/v3.9.0.js +0 -84
  389. package/dist/cjs/src/migration/types.js +0 -2
  390. package/dist/cjs/src/migration/utils.js +0 -10
  391. package/dist/cjs/src/mocks.js +0 -65
  392. package/dist/cjs/src/models/project-schema.js +0 -99
  393. package/dist/cjs/src/models/query.js +0 -35
  394. package/dist/cjs/src/models/service.js +0 -24
  395. package/dist/cjs/src/models/shape.js +0 -89
  396. package/dist/cjs/src/patterns.js +0 -2
  397. package/dist/cjs/src/project-schema/index.js +0 -156
  398. package/dist/cjs/src/project-schema/latest.js +0 -8
  399. package/dist/cjs/src/project-schema/migrate.js +0 -198
  400. package/dist/cjs/src/project-schema/v1.0.0.js +0 -8
  401. package/dist/cjs/src/project-schema/v3.0.0.js +0 -8
  402. package/dist/cjs/src/project-schema/v3.1.0.js +0 -8
  403. package/dist/cjs/src/project-schema/v3.10.0.js +0 -8
  404. package/dist/cjs/src/project-schema/v3.11.0.js +0 -8
  405. package/dist/cjs/src/project-schema/v3.12.0.js +0 -8
  406. package/dist/cjs/src/project-schema/v3.12.1.js +0 -8
  407. package/dist/cjs/src/project-schema/v3.12.2.js +0 -8
  408. package/dist/cjs/src/project-schema/v3.12.3.js +0 -8
  409. package/dist/cjs/src/project-schema/v3.13.0.js +0 -8
  410. package/dist/cjs/src/project-schema/v3.13.1.js +0 -8
  411. package/dist/cjs/src/project-schema/v3.14.0.js +0 -8
  412. package/dist/cjs/src/project-schema/v3.15.0.js +0 -8
  413. package/dist/cjs/src/project-schema/v3.16.0.js +0 -8
  414. package/dist/cjs/src/project-schema/v3.17.0.js +0 -8
  415. package/dist/cjs/src/project-schema/v3.17.1.js +0 -8
  416. package/dist/cjs/src/project-schema/v3.18.0.js +0 -8
  417. package/dist/cjs/src/project-schema/v3.18.1.js +0 -8
  418. package/dist/cjs/src/project-schema/v3.18.2.js +0 -8
  419. package/dist/cjs/src/project-schema/v3.19.0.js +0 -8
  420. package/dist/cjs/src/project-schema/v3.2.0.js +0 -8
  421. package/dist/cjs/src/project-schema/v3.20.0.js +0 -8
  422. package/dist/cjs/src/project-schema/v3.21.0.js +0 -8
  423. package/dist/cjs/src/project-schema/v3.22.0.js +0 -8
  424. package/dist/cjs/src/project-schema/v3.23.0.js +0 -8
  425. package/dist/cjs/src/project-schema/v3.24.0.js +0 -8
  426. package/dist/cjs/src/project-schema/v3.25.0.js +0 -8
  427. package/dist/cjs/src/project-schema/v3.26.0.js +0 -8
  428. package/dist/cjs/src/project-schema/v3.27.0.js +0 -8
  429. package/dist/cjs/src/project-schema/v3.28.0.js +0 -8
  430. package/dist/cjs/src/project-schema/v3.29.0.js +0 -8
  431. package/dist/cjs/src/project-schema/v3.3.0.js +0 -8
  432. package/dist/cjs/src/project-schema/v3.30.0.js +0 -8
  433. package/dist/cjs/src/project-schema/v3.31.0.js +0 -8
  434. package/dist/cjs/src/project-schema/v3.32.0.js +0 -8
  435. package/dist/cjs/src/project-schema/v3.33.0.js +0 -8
  436. package/dist/cjs/src/project-schema/v3.34.0.js +0 -8
  437. package/dist/cjs/src/project-schema/v3.35.0.js +0 -8
  438. package/dist/cjs/src/project-schema/v3.36.0.js +0 -8
  439. package/dist/cjs/src/project-schema/v3.37.0.js +0 -8
  440. package/dist/cjs/src/project-schema/v3.38.0.js +0 -8
  441. package/dist/cjs/src/project-schema/v3.39.0.js +0 -8
  442. package/dist/cjs/src/project-schema/v3.4.0.js +0 -8
  443. package/dist/cjs/src/project-schema/v3.40.0.js +0 -8
  444. package/dist/cjs/src/project-schema/v3.41.0.js +0 -8
  445. package/dist/cjs/src/project-schema/v3.42.0.js +0 -8
  446. package/dist/cjs/src/project-schema/v3.43.0.js +0 -8
  447. package/dist/cjs/src/project-schema/v3.44.0.js +0 -8
  448. package/dist/cjs/src/project-schema/v3.45.0.js +0 -8
  449. package/dist/cjs/src/project-schema/v3.46.0.js +0 -8
  450. package/dist/cjs/src/project-schema/v3.47.0.js +0 -8
  451. package/dist/cjs/src/project-schema/v3.48.0.js +0 -8
  452. package/dist/cjs/src/project-schema/v3.49.0.js +0 -8
  453. package/dist/cjs/src/project-schema/v3.5.0.js +0 -8
  454. package/dist/cjs/src/project-schema/v3.5.1.js +0 -8
  455. package/dist/cjs/src/project-schema/v3.50.0.js +0 -8
  456. package/dist/cjs/src/project-schema/v3.51.0.js +0 -8
  457. package/dist/cjs/src/project-schema/v3.6.0.js +0 -8
  458. package/dist/cjs/src/project-schema/v3.7.0.js +0 -8
  459. package/dist/cjs/src/project-schema/v3.8.0.js +0 -8
  460. package/dist/cjs/src/project-schema/v3.9.0.js +0 -8
  461. package/dist/cjs/src/project-schema/v4.0.0.js +0 -8
  462. package/dist/cjs/src/refs.js +0 -671
  463. package/dist/cjs/src/relationships.js +0 -326
  464. package/dist/cjs/src/runtime-schema.js +0 -88
  465. package/dist/cjs/src/scalars.js +0 -8
  466. package/dist/cjs/src/schema-transform.js +0 -83
  467. package/dist/cjs/src/schema-util.js +0 -1140
  468. package/dist/cjs/src/schemas/auth-schemas.json +0 -313
  469. package/dist/cjs/src/schemas/index.js +0 -162
  470. package/dist/cjs/src/schemas/project-schema/experimental.json +0 -1101
  471. package/dist/cjs/src/schemas/user-schema.json +0 -51
  472. package/dist/cjs/src/service-dependencies.js +0 -172
  473. package/dist/cjs/src/services/services.js +0 -156
  474. package/dist/cjs/src/services/types.js +0 -2
  475. package/dist/cjs/src/services/util.js +0 -45
  476. package/dist/cjs/src/taxonomies.js +0 -28
  477. package/dist/cjs/src/template-shapes/index.js +0 -37
  478. package/dist/cjs/src/template-shapes/names.js +0 -26
  479. package/dist/cjs/src/template-shapes/templates.js +0 -331
  480. package/dist/cjs/src/template-shapes/types.js +0 -10
  481. package/dist/cjs/src/template-shapes/where.js +0 -414
  482. package/dist/cjs/src/types/index.js +0 -19
  483. package/dist/cjs/src/types/transforms.js +0 -2
  484. package/dist/cjs/src/types/types.js +0 -21
  485. package/dist/cjs/src/types/utils.js +0 -344
  486. package/dist/cjs/src/unions.js +0 -88
  487. package/dist/cjs/src/user-schema.js +0 -8
  488. package/dist/cjs/src/util/ai-tools.js +0 -10
  489. package/dist/cjs/src/util/api-indexing.js +0 -62
  490. package/dist/cjs/src/util/detect-cycles.js +0 -48
  491. package/dist/cjs/src/util/find-shape-at-path.js +0 -57
  492. package/dist/cjs/src/util/form-config.js +0 -66
  493. package/dist/cjs/src/util/get-conflicting-properties.js +0 -58
  494. package/dist/cjs/src/util/get-return-shape.js +0 -34
  495. package/dist/cjs/src/util/has-arg.js +0 -17
  496. package/dist/cjs/src/util/merge.js +0 -269
  497. package/dist/cjs/src/util/patch-schema.js +0 -55
  498. package/dist/cjs/src/util/shapes.js +0 -31
  499. package/dist/cjs/src/validate.js +0 -1140
  500. package/dist/cjs/src/versions.js +0 -8
  501. package/dist/cjs/src/workflows.js +0 -76
  502. package/dist/cjs/tsconfig.cjs.tsbuildinfo +0 -1
  503. package/dist/esm/package.json +0 -1
  504. package/dist/esm/src/content-schema-transform.js +0 -162
  505. package/dist/esm/src/flatten-templates.js +0 -20
  506. package/dist/esm/src/get-is-leaf.js +0 -56
  507. package/dist/esm/src/index.js +0 -46
  508. package/dist/esm/src/interfaces.js +0 -85
  509. package/dist/esm/src/layers/layers.js +0 -301
  510. package/dist/esm/src/layers/refs.js +0 -220
  511. package/dist/esm/src/layers/type-utils.js +0 -118
  512. package/dist/esm/src/layers/visitor.js +0 -38
  513. package/dist/esm/src/migration/index.js +0 -122
  514. package/dist/esm/src/migration/to/v3.0.0.js +0 -212
  515. package/dist/esm/src/migration/to/v3.1.0.js +0 -194
  516. package/dist/esm/src/migration/to/v3.32.0.js +0 -59
  517. package/dist/esm/src/migration/to/v3.34.0.js +0 -116
  518. package/dist/esm/src/migration/to/v3.39.0.js +0 -45
  519. package/dist/esm/src/mocks.js +0 -58
  520. package/dist/esm/src/models/project-schema.js +0 -92
  521. package/dist/esm/src/models/shape.js +0 -85
  522. package/dist/esm/src/project-schema/index.js +0 -138
  523. package/dist/esm/src/project-schema/migrate.js +0 -194
  524. package/dist/esm/src/refs.js +0 -608
  525. package/dist/esm/src/relationships.js +0 -311
  526. package/dist/esm/src/runtime-schema.js +0 -80
  527. package/dist/esm/src/schema-transform.js +0 -74
  528. package/dist/esm/src/schema-util.js +0 -1077
  529. package/dist/esm/src/schemas/auth-schemas.json +0 -313
  530. package/dist/esm/src/schemas/index.js +0 -154
  531. package/dist/esm/src/schemas/project-schema/experimental.json +0 -1101
  532. package/dist/esm/src/schemas/project-schema/latest.json +0 -3320
  533. package/dist/esm/src/schemas/project-schema/meta-schema-v1.0.0.json +0 -193
  534. package/dist/esm/src/schemas/project-schema/meta-schema-v3.0.0.json +0 -608
  535. package/dist/esm/src/schemas/project-schema/meta-schema-v3.1.0.json +0 -608
  536. package/dist/esm/src/schemas/project-schema/meta-schema-v3.2.0.json +0 -612
  537. package/dist/esm/src/schemas/project-schema/meta-schema-v3.3.0.json +0 -612
  538. package/dist/esm/src/schemas/project-schema/meta-schema-v3.4.0.json +0 -637
  539. package/dist/esm/src/schemas/project-schema/meta-schema-v3.5.0.json +0 -626
  540. package/dist/esm/src/schemas/project-schema/meta-schema-v3.5.1.json +0 -626
  541. package/dist/esm/src/schemas/project-schema/meta-schema-v3.6.0.json +0 -629
  542. package/dist/esm/src/schemas/project-schema/meta-schema-v3.7.0.json +0 -1137
  543. package/dist/esm/src/schemas/project-schema/meta-schema-v3.8.0.json +0 -1137
  544. package/dist/esm/src/schemas/project-schema/meta-schema-v3.9.0.json +0 -1477
  545. package/dist/esm/src/schemas/project-schema/v1.0.0.json +0 -321
  546. package/dist/esm/src/schemas/project-schema/v3.0.0.json +0 -414
  547. package/dist/esm/src/schemas/project-schema/v3.1.0.json +0 -572
  548. package/dist/esm/src/schemas/project-schema/v3.10.0.json +0 -2097
  549. package/dist/esm/src/schemas/project-schema/v3.11.0.json +0 -2141
  550. package/dist/esm/src/schemas/project-schema/v3.12.0.json +0 -2144
  551. package/dist/esm/src/schemas/project-schema/v3.12.1.json +0 -2282
  552. package/dist/esm/src/schemas/project-schema/v3.12.2.json +0 -2304
  553. package/dist/esm/src/schemas/project-schema/v3.12.3.json +0 -2357
  554. package/dist/esm/src/schemas/project-schema/v3.13.0.json +0 -2377
  555. package/dist/esm/src/schemas/project-schema/v3.14.0.json +0 -2385
  556. package/dist/esm/src/schemas/project-schema/v3.15.0.json +0 -2365
  557. package/dist/esm/src/schemas/project-schema/v3.16.0.json +0 -2373
  558. package/dist/esm/src/schemas/project-schema/v3.17.0.json +0 -2378
  559. package/dist/esm/src/schemas/project-schema/v3.17.1.json +0 -2380
  560. package/dist/esm/src/schemas/project-schema/v3.18.0.json +0 -2356
  561. package/dist/esm/src/schemas/project-schema/v3.18.1.json +0 -2357
  562. package/dist/esm/src/schemas/project-schema/v3.18.2.json +0 -2357
  563. package/dist/esm/src/schemas/project-schema/v3.19.0.json +0 -2369
  564. package/dist/esm/src/schemas/project-schema/v3.2.0.json +0 -580
  565. package/dist/esm/src/schemas/project-schema/v3.20.0.json +0 -2369
  566. package/dist/esm/src/schemas/project-schema/v3.21.0.json +0 -2376
  567. package/dist/esm/src/schemas/project-schema/v3.22.0.json +0 -2381
  568. package/dist/esm/src/schemas/project-schema/v3.23.0.json +0 -2456
  569. package/dist/esm/src/schemas/project-schema/v3.24.0.json +0 -2556
  570. package/dist/esm/src/schemas/project-schema/v3.25.0.json +0 -2552
  571. package/dist/esm/src/schemas/project-schema/v3.26.0.json +0 -2599
  572. package/dist/esm/src/schemas/project-schema/v3.27.0.json +0 -2611
  573. package/dist/esm/src/schemas/project-schema/v3.28.0.json +0 -2656
  574. package/dist/esm/src/schemas/project-schema/v3.29.0.json +0 -2670
  575. package/dist/esm/src/schemas/project-schema/v3.3.0.json +0 -581
  576. package/dist/esm/src/schemas/project-schema/v3.30.0.json +0 -2656
  577. package/dist/esm/src/schemas/project-schema/v3.31.0.json +0 -2714
  578. package/dist/esm/src/schemas/project-schema/v3.32.0.json +0 -2708
  579. package/dist/esm/src/schemas/project-schema/v3.33.0.json +0 -2715
  580. package/dist/esm/src/schemas/project-schema/v3.34.0.json +0 -2715
  581. package/dist/esm/src/schemas/project-schema/v3.35.0.json +0 -2748
  582. package/dist/esm/src/schemas/project-schema/v3.36.0.json +0 -2756
  583. package/dist/esm/src/schemas/project-schema/v3.37.0.json +0 -2821
  584. package/dist/esm/src/schemas/project-schema/v3.38.0.json +0 -2819
  585. package/dist/esm/src/schemas/project-schema/v3.39.0.json +0 -2827
  586. package/dist/esm/src/schemas/project-schema/v3.4.0.json +0 -571
  587. package/dist/esm/src/schemas/project-schema/v3.40.0.json +0 -2830
  588. package/dist/esm/src/schemas/project-schema/v3.41.0.json +0 -2830
  589. package/dist/esm/src/schemas/project-schema/v3.42.0.json +0 -2835
  590. package/dist/esm/src/schemas/project-schema/v3.43.0.json +0 -2841
  591. package/dist/esm/src/schemas/project-schema/v3.44.0.json +0 -3013
  592. package/dist/esm/src/schemas/project-schema/v3.45.0.json +0 -3064
  593. package/dist/esm/src/schemas/project-schema/v3.46.0.json +0 -3136
  594. package/dist/esm/src/schemas/project-schema/v3.47.0.json +0 -3189
  595. package/dist/esm/src/schemas/project-schema/v3.48.0.json +0 -3196
  596. package/dist/esm/src/schemas/project-schema/v3.49.0.json +0 -3239
  597. package/dist/esm/src/schemas/project-schema/v3.5.0.json +0 -571
  598. package/dist/esm/src/schemas/project-schema/v3.5.1.json +0 -571
  599. package/dist/esm/src/schemas/project-schema/v3.50.0.json +0 -3320
  600. package/dist/esm/src/schemas/project-schema/v3.51.0.json +0 -3320
  601. package/dist/esm/src/schemas/project-schema/v3.6.0.json +0 -587
  602. package/dist/esm/src/schemas/project-schema/v3.7.0.json +0 -587
  603. package/dist/esm/src/schemas/project-schema/v3.8.0.json +0 -604
  604. package/dist/esm/src/schemas/project-schema/v3.9.0.json +0 -604
  605. package/dist/esm/src/schemas/project-schema/v4.0.0.json +0 -2316
  606. package/dist/esm/src/schemas/project-schema.json +0 -190
  607. package/dist/esm/src/schemas/user-schema.json +0 -51
  608. package/dist/esm/src/service-dependencies.js +0 -165
  609. package/dist/esm/src/services/services.js +0 -145
  610. package/dist/esm/src/taxonomies.js +0 -24
  611. package/dist/esm/src/template-shapes/templates.js +0 -319
  612. package/dist/esm/src/template-shapes/where.js +0 -402
  613. package/dist/esm/src/types/index.js +0 -3
  614. package/dist/esm/src/types/utils.js +0 -279
  615. package/dist/esm/src/unions.js +0 -77
  616. package/dist/esm/src/user-schema.js +0 -7
  617. package/dist/esm/src/util/api-indexing.js +0 -57
  618. package/dist/esm/src/util/detect-cycles.js +0 -45
  619. package/dist/esm/src/util/form-config.js +0 -62
  620. package/dist/esm/src/util/get-conflicting-properties.js +0 -55
  621. package/dist/esm/src/util/get-return-shape.js +0 -30
  622. package/dist/esm/src/util/has-arg.js +0 -13
  623. package/dist/esm/src/util/merge.js +0 -256
  624. package/dist/esm/src/validate.js +0 -1126
  625. package/dist/esm/src/versions.js +0 -4
  626. package/dist/esm/src/workflows.js +0 -66
  627. package/dist/esm/tsconfig.esm.tsbuildinfo +0 -1
  628. package/dist/types/src/agents.d.ts +0 -14
  629. package/dist/types/src/auth-schemas.d.ts +0 -104
  630. package/dist/types/src/builtin-schema.d.ts +0 -8
  631. package/dist/types/src/content-schema-transform.d.ts +0 -35
  632. package/dist/types/src/create-input-schema.d.ts +0 -9
  633. package/dist/types/src/enum.d.ts +0 -2
  634. package/dist/types/src/flatten-templates.d.ts +0 -2
  635. package/dist/types/src/get-is-leaf.d.ts +0 -3
  636. package/dist/types/src/index.d.ts +0 -48
  637. package/dist/types/src/interfaces.d.ts +0 -12
  638. package/dist/types/src/layers/layers.d.ts +0 -26
  639. package/dist/types/src/layers/refs.d.ts +0 -102
  640. package/dist/types/src/layers/type-utils.d.ts +0 -59
  641. package/dist/types/src/layers/visitor.d.ts +0 -5
  642. package/dist/types/src/migration/index.d.ts +0 -64
  643. package/dist/types/src/migration/to/v3.0.0.d.ts +0 -4
  644. package/dist/types/src/migration/to/v3.1.0.d.ts +0 -4
  645. package/dist/types/src/migration/to/v3.10.0.d.ts +0 -4
  646. package/dist/types/src/migration/to/v3.11.0.d.ts +0 -4
  647. package/dist/types/src/migration/to/v3.12.0.d.ts +0 -4
  648. package/dist/types/src/migration/to/v3.12.1.d.ts +0 -4
  649. package/dist/types/src/migration/to/v3.12.2.d.ts +0 -4
  650. package/dist/types/src/migration/to/v3.12.3.d.ts +0 -4
  651. package/dist/types/src/migration/to/v3.13.0.d.ts +0 -4
  652. package/dist/types/src/migration/to/v3.14.0.d.ts +0 -4
  653. package/dist/types/src/migration/to/v3.15.0.d.ts +0 -4
  654. package/dist/types/src/migration/to/v3.16.0.d.ts +0 -4
  655. package/dist/types/src/migration/to/v3.17.0.d.ts +0 -4
  656. package/dist/types/src/migration/to/v3.17.1.d.ts +0 -4
  657. package/dist/types/src/migration/to/v3.18.0.d.ts +0 -4
  658. package/dist/types/src/migration/to/v3.18.1.d.ts +0 -4
  659. package/dist/types/src/migration/to/v3.18.2.d.ts +0 -4
  660. package/dist/types/src/migration/to/v3.19.0.d.ts +0 -4
  661. package/dist/types/src/migration/to/v3.2.0.d.ts +0 -4
  662. package/dist/types/src/migration/to/v3.20.0.d.ts +0 -4
  663. package/dist/types/src/migration/to/v3.21.0.d.ts +0 -4
  664. package/dist/types/src/migration/to/v3.22.0.d.ts +0 -4
  665. package/dist/types/src/migration/to/v3.23.0.d.ts +0 -4
  666. package/dist/types/src/migration/to/v3.24.0.d.ts +0 -4
  667. package/dist/types/src/migration/to/v3.25.0.d.ts +0 -4
  668. package/dist/types/src/migration/to/v3.26.0.d.ts +0 -4
  669. package/dist/types/src/migration/to/v3.27.0.d.ts +0 -4
  670. package/dist/types/src/migration/to/v3.28.0.d.ts +0 -4
  671. package/dist/types/src/migration/to/v3.29.0.d.ts +0 -4
  672. package/dist/types/src/migration/to/v3.3.0.d.ts +0 -4
  673. package/dist/types/src/migration/to/v3.30.0.d.ts +0 -4
  674. package/dist/types/src/migration/to/v3.31.0.d.ts +0 -4
  675. package/dist/types/src/migration/to/v3.32.0.d.ts +0 -4
  676. package/dist/types/src/migration/to/v3.33.0.d.ts +0 -4
  677. package/dist/types/src/migration/to/v3.34.0.d.ts +0 -6
  678. package/dist/types/src/migration/to/v3.35.0.d.ts +0 -4
  679. package/dist/types/src/migration/to/v3.36.0.d.ts +0 -4
  680. package/dist/types/src/migration/to/v3.37.0.d.ts +0 -4
  681. package/dist/types/src/migration/to/v3.38.0.d.ts +0 -4
  682. package/dist/types/src/migration/to/v3.39.0.d.ts +0 -4
  683. package/dist/types/src/migration/to/v3.4.0.d.ts +0 -4
  684. package/dist/types/src/migration/to/v3.40.0.d.ts +0 -4
  685. package/dist/types/src/migration/to/v3.41.0.d.ts +0 -4
  686. package/dist/types/src/migration/to/v3.42.0.d.ts +0 -4
  687. package/dist/types/src/migration/to/v3.43.0.d.ts +0 -4
  688. package/dist/types/src/migration/to/v3.44.0.d.ts +0 -4
  689. package/dist/types/src/migration/to/v3.45.0.d.ts +0 -4
  690. package/dist/types/src/migration/to/v3.46.0.d.ts +0 -4
  691. package/dist/types/src/migration/to/v3.47.0.d.ts +0 -4
  692. package/dist/types/src/migration/to/v3.48.0.d.ts +0 -4
  693. package/dist/types/src/migration/to/v3.49.0.d.ts +0 -4
  694. package/dist/types/src/migration/to/v3.5.0.d.ts +0 -4
  695. package/dist/types/src/migration/to/v3.5.1.d.ts +0 -4
  696. package/dist/types/src/migration/to/v3.50.0.d.ts +0 -4
  697. package/dist/types/src/migration/to/v3.51.0.d.ts +0 -4
  698. package/dist/types/src/migration/to/v3.6.0.d.ts +0 -4
  699. package/dist/types/src/migration/to/v3.7.0.d.ts +0 -4
  700. package/dist/types/src/migration/to/v3.8.0.d.ts +0 -4
  701. package/dist/types/src/migration/to/v3.9.0.d.ts +0 -4
  702. package/dist/types/src/migration/types.d.ts +0 -19
  703. package/dist/types/src/mocks.d.ts +0 -13
  704. package/dist/types/src/models/project-schema.d.ts +0 -35
  705. package/dist/types/src/models/query.d.ts +0 -17
  706. package/dist/types/src/models/service.d.ts +0 -12
  707. package/dist/types/src/models/shape.d.ts +0 -41
  708. package/dist/types/src/project-schema/index.d.ts +0 -187
  709. package/dist/types/src/project-schema/latest.d.ts +0 -2221
  710. package/dist/types/src/project-schema/migrate.d.ts +0 -4
  711. package/dist/types/src/project-schema/v3.48.0.d.ts +0 -2160
  712. package/dist/types/src/project-schema/v3.49.0.d.ts +0 -2169
  713. package/dist/types/src/project-schema/v3.50.0.d.ts +0 -2221
  714. package/dist/types/src/project-schema/v3.51.0.d.ts +0 -2221
  715. package/dist/types/src/refs.d.ts +0 -226
  716. package/dist/types/src/relationships.d.ts +0 -40
  717. package/dist/types/src/runtime-schema.d.ts +0 -5
  718. package/dist/types/src/schema-transform.d.ts +0 -19
  719. package/dist/types/src/schema-util.d.ts +0 -210
  720. package/dist/types/src/service-dependencies.d.ts +0 -13
  721. package/dist/types/src/services/services.d.ts +0 -31
  722. package/dist/types/src/services/util.d.ts +0 -16
  723. package/dist/types/src/taxonomies.d.ts +0 -15
  724. package/dist/types/src/template-shapes/index.d.ts +0 -7
  725. package/dist/types/src/template-shapes/names.d.ts +0 -10
  726. package/dist/types/src/template-shapes/templates.d.ts +0 -32
  727. package/dist/types/src/template-shapes/types.d.ts +0 -15
  728. package/dist/types/src/template-shapes/where.d.ts +0 -37
  729. package/dist/types/src/types/index.d.ts +0 -3
  730. package/dist/types/src/types/transforms.d.ts +0 -13
  731. package/dist/types/src/types/types.d.ts +0 -211
  732. package/dist/types/src/types/utils.d.ts +0 -117
  733. package/dist/types/src/unions.d.ts +0 -14
  734. package/dist/types/src/user-schema.d.ts +0 -38
  735. package/dist/types/src/util/ai-tools.d.ts +0 -3
  736. package/dist/types/src/util/api-indexing.d.ts +0 -9
  737. package/dist/types/src/util/detect-cycles.d.ts +0 -7
  738. package/dist/types/src/util/find-shape-at-path.d.ts +0 -21
  739. package/dist/types/src/util/form-config.d.ts +0 -11
  740. package/dist/types/src/util/get-conflicting-properties.d.ts +0 -6
  741. package/dist/types/src/util/get-return-shape.d.ts +0 -4
  742. package/dist/types/src/util/has-arg.d.ts +0 -4
  743. package/dist/types/src/util/merge.d.ts +0 -15
  744. package/dist/types/src/util/patch-schema.d.ts +0 -8
  745. package/dist/types/src/util/shapes.d.ts +0 -5
  746. package/dist/types/src/validate.d.ts +0 -75
  747. package/dist/types/src/versions.d.ts +0 -4
  748. package/dist/types/src/workflows.d.ts +0 -14
  749. package/dist/types/tsconfig.types.tsbuildinfo +0 -1
  750. /package/dist/{esm/src/migration/types.js → __tests__/_examples.test.d.ts} +0 -0
  751. /package/dist/{esm/src/patterns.js → __tests__/agents.test.d.ts} +0 -0
  752. /package/dist/{esm/src/services/types.js → __tests__/api-version.test.d.ts} +0 -0
  753. /package/dist/{esm/src/types/transforms.js → __tests__/builtin-schema.test.d.ts} +0 -0
  754. /package/dist/{esm/src/agents.js → agents.js} +0 -0
  755. /package/dist/{types/src/api-version.d.ts → api-version.d.ts} +0 -0
  756. /package/dist/{esm/src/api-version.js → api-version.js} +0 -0
  757. /package/dist/{esm/src/auth-schemas.js → auth-schemas.js} +0 -0
  758. /package/dist/{esm/src/builtin-schema.js → builtin-schema.js} +0 -0
  759. /package/dist/{types/src/constants.d.ts → constants.d.ts} +0 -0
  760. /package/dist/{esm/src/constants.js → constants.js} +0 -0
  761. /package/dist/{esm/src/create-input-schema.js → create-input-schema.js} +0 -0
  762. /package/dist/{esm/src/enum.js → enum.js} +0 -0
  763. /package/dist/{esm/src/migration → migration}/to/v3.10.0.js +0 -0
  764. /package/dist/{esm/src/migration → migration}/to/v3.11.0.js +0 -0
  765. /package/dist/{esm/src/migration → migration}/to/v3.12.0.js +0 -0
  766. /package/dist/{esm/src/migration → migration}/to/v3.12.1.js +0 -0
  767. /package/dist/{esm/src/migration → migration}/to/v3.12.2.js +0 -0
  768. /package/dist/{esm/src/migration → migration}/to/v3.12.3.js +0 -0
  769. /package/dist/{esm/src/migration → migration}/to/v3.13.0.js +0 -0
  770. /package/dist/{esm/src/migration → migration}/to/v3.14.0.js +0 -0
  771. /package/dist/{esm/src/migration → migration}/to/v3.15.0.js +0 -0
  772. /package/dist/{esm/src/migration → migration}/to/v3.16.0.js +0 -0
  773. /package/dist/{esm/src/migration → migration}/to/v3.17.0.js +0 -0
  774. /package/dist/{esm/src/migration → migration}/to/v3.17.1.js +0 -0
  775. /package/dist/{esm/src/migration → migration}/to/v3.18.0.js +0 -0
  776. /package/dist/{esm/src/migration → migration}/to/v3.18.1.js +0 -0
  777. /package/dist/{esm/src/migration → migration}/to/v3.18.2.js +0 -0
  778. /package/dist/{esm/src/migration → migration}/to/v3.19.0.js +0 -0
  779. /package/dist/{esm/src/migration → migration}/to/v3.2.0.js +0 -0
  780. /package/dist/{esm/src/migration → migration}/to/v3.20.0.js +0 -0
  781. /package/dist/{esm/src/migration → migration}/to/v3.21.0.js +0 -0
  782. /package/dist/{esm/src/migration → migration}/to/v3.22.0.js +0 -0
  783. /package/dist/{esm/src/migration → migration}/to/v3.23.0.js +0 -0
  784. /package/dist/{esm/src/migration → migration}/to/v3.24.0.js +0 -0
  785. /package/dist/{esm/src/migration → migration}/to/v3.25.0.js +0 -0
  786. /package/dist/{esm/src/migration → migration}/to/v3.26.0.js +0 -0
  787. /package/dist/{esm/src/migration → migration}/to/v3.27.0.js +0 -0
  788. /package/dist/{esm/src/migration → migration}/to/v3.28.0.js +0 -0
  789. /package/dist/{esm/src/migration → migration}/to/v3.29.0.js +0 -0
  790. /package/dist/{esm/src/migration → migration}/to/v3.3.0.js +0 -0
  791. /package/dist/{esm/src/migration → migration}/to/v3.30.0.js +0 -0
  792. /package/dist/{esm/src/migration → migration}/to/v3.31.0.js +0 -0
  793. /package/dist/{esm/src/migration → migration}/to/v3.33.0.js +0 -0
  794. /package/dist/{esm/src/migration → migration}/to/v3.35.0.js +0 -0
  795. /package/dist/{esm/src/migration → migration}/to/v3.36.0.js +0 -0
  796. /package/dist/{esm/src/migration → migration}/to/v3.37.0.js +0 -0
  797. /package/dist/{esm/src/migration → migration}/to/v3.38.0.js +0 -0
  798. /package/dist/{esm/src/migration → migration}/to/v3.4.0.js +0 -0
  799. /package/dist/{esm/src/migration → migration}/to/v3.40.0.js +0 -0
  800. /package/dist/{esm/src/migration → migration}/to/v3.41.0.js +0 -0
  801. /package/dist/{esm/src/migration → migration}/to/v3.42.0.js +0 -0
  802. /package/dist/{esm/src/migration → migration}/to/v3.43.0.js +0 -0
  803. /package/dist/{esm/src/migration → migration}/to/v3.44.0.js +0 -0
  804. /package/dist/{esm/src/migration → migration}/to/v3.45.0.js +0 -0
  805. /package/dist/{esm/src/migration → migration}/to/v3.46.0.js +0 -0
  806. /package/dist/{esm/src/migration → migration}/to/v3.47.0.js +0 -0
  807. /package/dist/{esm/src/migration → migration}/to/v3.48.0.js +0 -0
  808. /package/dist/{esm/src/migration → migration}/to/v3.49.0.js +0 -0
  809. /package/dist/{esm/src/migration → migration}/to/v3.5.0.js +0 -0
  810. /package/dist/{esm/src/migration → migration}/to/v3.5.1.js +0 -0
  811. /package/dist/{esm/src/migration → migration}/to/v3.50.0.js +0 -0
  812. /package/dist/{esm/src/migration → migration}/to/v3.51.0.js +0 -0
  813. /package/dist/{esm/src/migration → migration}/to/v3.6.0.js +0 -0
  814. /package/dist/{esm/src/migration → migration}/to/v3.7.0.js +0 -0
  815. /package/dist/{esm/src/migration → migration}/to/v3.8.0.js +0 -0
  816. /package/dist/{esm/src/migration → migration}/to/v3.9.0.js +0 -0
  817. /package/dist/{types/src/migration → migration}/utils.d.ts +0 -0
  818. /package/dist/{esm/src/migration → migration}/utils.js +0 -0
  819. /package/dist/{esm/src/models → models}/query.js +0 -0
  820. /package/dist/{esm/src/models → models}/service.js +0 -0
  821. /package/dist/{types/src/patterns.d.ts → patterns.d.ts} +0 -0
  822. /package/dist/{esm/src/project-schema → project-schema}/latest.js +0 -0
  823. /package/dist/{types/src/project-schema → project-schema}/v1.0.0.d.ts +0 -0
  824. /package/dist/{esm/src/project-schema → project-schema}/v1.0.0.js +0 -0
  825. /package/dist/{types/src/project-schema → project-schema}/v3.0.0.d.ts +0 -0
  826. /package/dist/{esm/src/project-schema → project-schema}/v3.0.0.js +0 -0
  827. /package/dist/{types/src/project-schema → project-schema}/v3.1.0.d.ts +0 -0
  828. /package/dist/{esm/src/project-schema → project-schema}/v3.1.0.js +0 -0
  829. /package/dist/{types/src/project-schema → project-schema}/v3.10.0.d.ts +0 -0
  830. /package/dist/{esm/src/project-schema → project-schema}/v3.10.0.js +0 -0
  831. /package/dist/{types/src/project-schema → project-schema}/v3.11.0.d.ts +0 -0
  832. /package/dist/{esm/src/project-schema → project-schema}/v3.11.0.js +0 -0
  833. /package/dist/{types/src/project-schema → project-schema}/v3.12.0.d.ts +0 -0
  834. /package/dist/{esm/src/project-schema → project-schema}/v3.12.0.js +0 -0
  835. /package/dist/{types/src/project-schema → project-schema}/v3.12.1.d.ts +0 -0
  836. /package/dist/{esm/src/project-schema → project-schema}/v3.12.1.js +0 -0
  837. /package/dist/{types/src/project-schema → project-schema}/v3.12.2.d.ts +0 -0
  838. /package/dist/{esm/src/project-schema → project-schema}/v3.12.2.js +0 -0
  839. /package/dist/{types/src/project-schema → project-schema}/v3.12.3.d.ts +0 -0
  840. /package/dist/{esm/src/project-schema → project-schema}/v3.12.3.js +0 -0
  841. /package/dist/{types/src/project-schema → project-schema}/v3.13.0.d.ts +0 -0
  842. /package/dist/{esm/src/project-schema → project-schema}/v3.13.0.js +0 -0
  843. /package/dist/{types/src/project-schema → project-schema}/v3.13.1.d.ts +0 -0
  844. /package/dist/{esm/src/project-schema → project-schema}/v3.13.1.js +0 -0
  845. /package/dist/{types/src/project-schema → project-schema}/v3.14.0.d.ts +0 -0
  846. /package/dist/{esm/src/project-schema → project-schema}/v3.14.0.js +0 -0
  847. /package/dist/{types/src/project-schema → project-schema}/v3.15.0.d.ts +0 -0
  848. /package/dist/{esm/src/project-schema → project-schema}/v3.15.0.js +0 -0
  849. /package/dist/{types/src/project-schema → project-schema}/v3.16.0.d.ts +0 -0
  850. /package/dist/{esm/src/project-schema → project-schema}/v3.16.0.js +0 -0
  851. /package/dist/{types/src/project-schema → project-schema}/v3.17.0.d.ts +0 -0
  852. /package/dist/{esm/src/project-schema → project-schema}/v3.17.0.js +0 -0
  853. /package/dist/{types/src/project-schema → project-schema}/v3.17.1.d.ts +0 -0
  854. /package/dist/{esm/src/project-schema → project-schema}/v3.17.1.js +0 -0
  855. /package/dist/{types/src/project-schema → project-schema}/v3.18.0.d.ts +0 -0
  856. /package/dist/{esm/src/project-schema → project-schema}/v3.18.0.js +0 -0
  857. /package/dist/{types/src/project-schema → project-schema}/v3.18.1.d.ts +0 -0
  858. /package/dist/{esm/src/project-schema → project-schema}/v3.18.1.js +0 -0
  859. /package/dist/{types/src/project-schema → project-schema}/v3.18.2.d.ts +0 -0
  860. /package/dist/{esm/src/project-schema → project-schema}/v3.18.2.js +0 -0
  861. /package/dist/{types/src/project-schema → project-schema}/v3.19.0.d.ts +0 -0
  862. /package/dist/{esm/src/project-schema → project-schema}/v3.19.0.js +0 -0
  863. /package/dist/{types/src/project-schema → project-schema}/v3.2.0.d.ts +0 -0
  864. /package/dist/{esm/src/project-schema → project-schema}/v3.2.0.js +0 -0
  865. /package/dist/{types/src/project-schema → project-schema}/v3.20.0.d.ts +0 -0
  866. /package/dist/{esm/src/project-schema → project-schema}/v3.20.0.js +0 -0
  867. /package/dist/{types/src/project-schema → project-schema}/v3.21.0.d.ts +0 -0
  868. /package/dist/{esm/src/project-schema → project-schema}/v3.21.0.js +0 -0
  869. /package/dist/{types/src/project-schema → project-schema}/v3.22.0.d.ts +0 -0
  870. /package/dist/{esm/src/project-schema → project-schema}/v3.22.0.js +0 -0
  871. /package/dist/{types/src/project-schema → project-schema}/v3.23.0.d.ts +0 -0
  872. /package/dist/{esm/src/project-schema → project-schema}/v3.23.0.js +0 -0
  873. /package/dist/{types/src/project-schema → project-schema}/v3.24.0.d.ts +0 -0
  874. /package/dist/{esm/src/project-schema → project-schema}/v3.24.0.js +0 -0
  875. /package/dist/{types/src/project-schema → project-schema}/v3.25.0.d.ts +0 -0
  876. /package/dist/{esm/src/project-schema → project-schema}/v3.25.0.js +0 -0
  877. /package/dist/{types/src/project-schema → project-schema}/v3.26.0.d.ts +0 -0
  878. /package/dist/{esm/src/project-schema → project-schema}/v3.26.0.js +0 -0
  879. /package/dist/{types/src/project-schema → project-schema}/v3.27.0.d.ts +0 -0
  880. /package/dist/{esm/src/project-schema → project-schema}/v3.27.0.js +0 -0
  881. /package/dist/{types/src/project-schema → project-schema}/v3.28.0.d.ts +0 -0
  882. /package/dist/{esm/src/project-schema → project-schema}/v3.28.0.js +0 -0
  883. /package/dist/{types/src/project-schema → project-schema}/v3.29.0.d.ts +0 -0
  884. /package/dist/{esm/src/project-schema → project-schema}/v3.29.0.js +0 -0
  885. /package/dist/{types/src/project-schema → project-schema}/v3.3.0.d.ts +0 -0
  886. /package/dist/{esm/src/project-schema → project-schema}/v3.3.0.js +0 -0
  887. /package/dist/{types/src/project-schema → project-schema}/v3.30.0.d.ts +0 -0
  888. /package/dist/{esm/src/project-schema → project-schema}/v3.30.0.js +0 -0
  889. /package/dist/{types/src/project-schema → project-schema}/v3.31.0.d.ts +0 -0
  890. /package/dist/{esm/src/project-schema → project-schema}/v3.31.0.js +0 -0
  891. /package/dist/{types/src/project-schema → project-schema}/v3.32.0.d.ts +0 -0
  892. /package/dist/{esm/src/project-schema → project-schema}/v3.32.0.js +0 -0
  893. /package/dist/{types/src/project-schema → project-schema}/v3.33.0.d.ts +0 -0
  894. /package/dist/{esm/src/project-schema → project-schema}/v3.33.0.js +0 -0
  895. /package/dist/{types/src/project-schema → project-schema}/v3.34.0.d.ts +0 -0
  896. /package/dist/{esm/src/project-schema → project-schema}/v3.34.0.js +0 -0
  897. /package/dist/{types/src/project-schema → project-schema}/v3.35.0.d.ts +0 -0
  898. /package/dist/{esm/src/project-schema → project-schema}/v3.35.0.js +0 -0
  899. /package/dist/{types/src/project-schema → project-schema}/v3.36.0.d.ts +0 -0
  900. /package/dist/{esm/src/project-schema → project-schema}/v3.36.0.js +0 -0
  901. /package/dist/{types/src/project-schema → project-schema}/v3.37.0.d.ts +0 -0
  902. /package/dist/{esm/src/project-schema → project-schema}/v3.37.0.js +0 -0
  903. /package/dist/{types/src/project-schema → project-schema}/v3.38.0.d.ts +0 -0
  904. /package/dist/{esm/src/project-schema → project-schema}/v3.38.0.js +0 -0
  905. /package/dist/{types/src/project-schema → project-schema}/v3.39.0.d.ts +0 -0
  906. /package/dist/{esm/src/project-schema → project-schema}/v3.39.0.js +0 -0
  907. /package/dist/{types/src/project-schema → project-schema}/v3.4.0.d.ts +0 -0
  908. /package/dist/{esm/src/project-schema → project-schema}/v3.4.0.js +0 -0
  909. /package/dist/{types/src/project-schema → project-schema}/v3.40.0.d.ts +0 -0
  910. /package/dist/{esm/src/project-schema → project-schema}/v3.40.0.js +0 -0
  911. /package/dist/{types/src/project-schema → project-schema}/v3.41.0.d.ts +0 -0
  912. /package/dist/{esm/src/project-schema → project-schema}/v3.41.0.js +0 -0
  913. /package/dist/{types/src/project-schema → project-schema}/v3.42.0.d.ts +0 -0
  914. /package/dist/{esm/src/project-schema → project-schema}/v3.42.0.js +0 -0
  915. /package/dist/{types/src/project-schema → project-schema}/v3.43.0.d.ts +0 -0
  916. /package/dist/{esm/src/project-schema → project-schema}/v3.43.0.js +0 -0
  917. /package/dist/{types/src/project-schema → project-schema}/v3.44.0.d.ts +0 -0
  918. /package/dist/{esm/src/project-schema → project-schema}/v3.44.0.js +0 -0
  919. /package/dist/{types/src/project-schema → project-schema}/v3.45.0.d.ts +0 -0
  920. /package/dist/{esm/src/project-schema → project-schema}/v3.45.0.js +0 -0
  921. /package/dist/{types/src/project-schema → project-schema}/v3.46.0.d.ts +0 -0
  922. /package/dist/{esm/src/project-schema → project-schema}/v3.46.0.js +0 -0
  923. /package/dist/{types/src/project-schema → project-schema}/v3.47.0.d.ts +0 -0
  924. /package/dist/{esm/src/project-schema → project-schema}/v3.47.0.js +0 -0
  925. /package/dist/{esm/src/project-schema → project-schema}/v3.48.0.js +0 -0
  926. /package/dist/{esm/src/project-schema → project-schema}/v3.49.0.js +0 -0
  927. /package/dist/{types/src/project-schema → project-schema}/v3.5.0.d.ts +0 -0
  928. /package/dist/{esm/src/project-schema → project-schema}/v3.5.0.js +0 -0
  929. /package/dist/{types/src/project-schema → project-schema}/v3.5.1.d.ts +0 -0
  930. /package/dist/{esm/src/project-schema → project-schema}/v3.5.1.js +0 -0
  931. /package/dist/{esm/src/project-schema → project-schema}/v3.50.0.js +0 -0
  932. /package/dist/{esm/src/project-schema → project-schema}/v3.51.0.js +0 -0
  933. /package/dist/{types/src/project-schema → project-schema}/v3.6.0.d.ts +0 -0
  934. /package/dist/{esm/src/project-schema → project-schema}/v3.6.0.js +0 -0
  935. /package/dist/{types/src/project-schema → project-schema}/v3.7.0.d.ts +0 -0
  936. /package/dist/{esm/src/project-schema → project-schema}/v3.7.0.js +0 -0
  937. /package/dist/{types/src/project-schema → project-schema}/v3.8.0.d.ts +0 -0
  938. /package/dist/{esm/src/project-schema → project-schema}/v3.8.0.js +0 -0
  939. /package/dist/{types/src/project-schema → project-schema}/v3.9.0.d.ts +0 -0
  940. /package/dist/{esm/src/project-schema → project-schema}/v3.9.0.js +0 -0
  941. /package/dist/{types/src/project-schema → project-schema}/v4.0.0.d.ts +0 -0
  942. /package/dist/{esm/src/project-schema → project-schema}/v4.0.0.js +0 -0
  943. /package/dist/{types/src/scalars.d.ts → scalars.d.ts} +0 -0
  944. /package/dist/{esm/src/scalars.js → scalars.js} +0 -0
  945. /package/dist/{types/src/schemas → schemas}/index.d.ts +0 -0
  946. /package/dist/{cjs/src/schemas → schemas}/project-schema/latest.json +0 -0
  947. /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v1.0.0.json +0 -0
  948. /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.0.0.json +0 -0
  949. /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.1.0.json +0 -0
  950. /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.2.0.json +0 -0
  951. /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.3.0.json +0 -0
  952. /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.4.0.json +0 -0
  953. /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.5.0.json +0 -0
  954. /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.5.1.json +0 -0
  955. /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.6.0.json +0 -0
  956. /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.7.0.json +0 -0
  957. /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.8.0.json +0 -0
  958. /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.9.0.json +0 -0
  959. /package/dist/{cjs/src/schemas → schemas}/project-schema/v1.0.0.json +0 -0
  960. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.0.0.json +0 -0
  961. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.1.0.json +0 -0
  962. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.10.0.json +0 -0
  963. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.11.0.json +0 -0
  964. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.12.0.json +0 -0
  965. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.12.1.json +0 -0
  966. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.12.2.json +0 -0
  967. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.12.3.json +0 -0
  968. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.13.0.json +0 -0
  969. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.14.0.json +0 -0
  970. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.15.0.json +0 -0
  971. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.16.0.json +0 -0
  972. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.17.0.json +0 -0
  973. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.17.1.json +0 -0
  974. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.18.0.json +0 -0
  975. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.18.1.json +0 -0
  976. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.18.2.json +0 -0
  977. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.19.0.json +0 -0
  978. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.2.0.json +0 -0
  979. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.20.0.json +0 -0
  980. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.21.0.json +0 -0
  981. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.22.0.json +0 -0
  982. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.23.0.json +0 -0
  983. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.24.0.json +0 -0
  984. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.25.0.json +0 -0
  985. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.26.0.json +0 -0
  986. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.27.0.json +0 -0
  987. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.28.0.json +0 -0
  988. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.29.0.json +0 -0
  989. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.3.0.json +0 -0
  990. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.30.0.json +0 -0
  991. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.31.0.json +0 -0
  992. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.32.0.json +0 -0
  993. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.33.0.json +0 -0
  994. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.34.0.json +0 -0
  995. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.35.0.json +0 -0
  996. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.36.0.json +0 -0
  997. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.37.0.json +0 -0
  998. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.38.0.json +0 -0
  999. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.39.0.json +0 -0
  1000. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.4.0.json +0 -0
  1001. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.40.0.json +0 -0
  1002. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.41.0.json +0 -0
  1003. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.42.0.json +0 -0
  1004. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.43.0.json +0 -0
  1005. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.44.0.json +0 -0
  1006. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.45.0.json +0 -0
  1007. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.46.0.json +0 -0
  1008. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.47.0.json +0 -0
  1009. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.48.0.json +0 -0
  1010. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.49.0.json +0 -0
  1011. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.5.0.json +0 -0
  1012. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.5.1.json +0 -0
  1013. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.50.0.json +0 -0
  1014. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.51.0.json +0 -0
  1015. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.6.0.json +0 -0
  1016. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.7.0.json +0 -0
  1017. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.8.0.json +0 -0
  1018. /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.9.0.json +0 -0
  1019. /package/dist/{cjs/src/schemas → schemas}/project-schema/v4.0.0.json +0 -0
  1020. /package/dist/{cjs/src/schemas → schemas}/project-schema.json +0 -0
  1021. /package/dist/{types/src/services → services}/types.d.ts +0 -0
  1022. /package/dist/{esm/src/services → services}/util.js +0 -0
  1023. /package/dist/{esm/src/template-shapes → template-shapes}/index.js +0 -0
  1024. /package/dist/{esm/src/template-shapes → template-shapes}/names.js +0 -0
  1025. /package/dist/{esm/src/template-shapes → template-shapes}/types.js +0 -0
  1026. /package/dist/{esm/src/types → types}/types.js +0 -0
  1027. /package/dist/{esm/src/util → util}/ai-tools.js +0 -0
  1028. /package/dist/{esm/src/util → util}/find-shape-at-path.js +0 -0
  1029. /package/dist/{esm/src/util → util}/patch-schema.js +0 -0
  1030. /package/dist/{esm/src/util → util}/shapes.js +0 -0
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,638 @@
1
+ import massiveSchemaJson from '@takeshape/schema/examples/latest/massive-schema.json';
2
+ import postSchemaJson from '@takeshape/schema/examples/latest/post-schema.json';
3
+ import shapeBooksSchemaJson from '@takeshape/schema/examples/latest/shape-books.json';
4
+ import { deepClone } from '@takeshape/util';
5
+ import { describe, expect, it, test } from 'vitest';
6
+ import { createMockSchema, createMockSchemaWithDefaults } from "../mocks.js";
7
+ import { addRelatedFields, findExistingRelationships, getRelationshipSchema } from "../relationships.js";
8
+ import { applyDefaultsToSchema, createShape } from "../schema-util.js";
9
+ const projectSchema = applyDefaultsToSchema(shapeBooksSchemaJson);
10
+ describe('getRelationshipSchema', () => {
11
+ const projectSchema = createMockSchema('<project-id>', {
12
+ shapes: {
13
+ A: createShape('A', {
14
+ type: 'object',
15
+ properties: { a: { type: 'string' } }
16
+ }),
17
+ B: createShape('B', {
18
+ type: 'object',
19
+ properties: { b: { type: 'string' } }
20
+ })
21
+ }
22
+ });
23
+ const singleRelationship = {
24
+ shapeIds: ['ASSET'],
25
+ type: 'single'
26
+ };
27
+ const multipleRelationship = {
28
+ shapeIds: ['ASSET'],
29
+ type: 'multiple'
30
+ };
31
+ it('gets a schema when provided a single relationship', () => {
32
+ const schema = getRelationshipSchema(projectSchema, singleRelationship);
33
+ expect(schema).toEqual({
34
+ '@ref': 'local:Asset',
35
+ '@args': 'TSRelationshipArgs',
36
+ '@input': {
37
+ '@ref': 'local:TSRelationship'
38
+ },
39
+ '@resolver': {
40
+ name: 'shapedb:getRelated',
41
+ service: 'shapedb',
42
+ options: {
43
+ nullable: true
44
+ }
45
+ }
46
+ });
47
+ });
48
+ it('gets an array schema when provided a multiple relationship', () => {
49
+ const schema = getRelationshipSchema(projectSchema, multipleRelationship);
50
+ expect(schema).toEqual({
51
+ type: 'array',
52
+ items: { '@ref': 'local:Asset' },
53
+ '@args': 'TSRelationshipArgs',
54
+ '@input': {
55
+ type: 'array',
56
+ items: {
57
+ '@ref': 'local:TSRelationship'
58
+ }
59
+ },
60
+ '@resolver': {
61
+ name: 'shapedb:getRelated',
62
+ service: 'shapedb',
63
+ options: {
64
+ nullable: true
65
+ }
66
+ }
67
+ });
68
+ });
69
+ it('gets uses oneOf when relationship has multiple shape ids', () => {
70
+ const multipleRelationship = {
71
+ shapeIds: ['A', 'B'],
72
+ type: 'multiple'
73
+ };
74
+ const schema = getRelationshipSchema(projectSchema, multipleRelationship);
75
+ expect(schema).toEqual({
76
+ type: 'array',
77
+ items: { oneOf: [{ '@ref': 'local:A' }, { '@ref': 'local:B' }] },
78
+ '@args': 'TSRelationshipArgs',
79
+ '@input': {
80
+ type: 'array',
81
+ items: {
82
+ '@ref': 'local:TSRelationship'
83
+ }
84
+ },
85
+ '@resolver': {
86
+ name: 'shapedb:getRelated',
87
+ service: 'shapedb',
88
+ options: {
89
+ nullable: true
90
+ }
91
+ }
92
+ });
93
+ });
94
+ it('throws error for empty relationship', () => {
95
+ const empty = {
96
+ shapeIds: [],
97
+ type: 'single'
98
+ };
99
+ expect(() => getRelationshipSchema(projectSchema, empty)).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid empty relationship {"shapeIds":[],"type":"single"}]`);
100
+ });
101
+ });
102
+ const massiveSchema = createMockSchemaWithDefaults(massiveSchemaJson.projectId, massiveSchemaJson);
103
+ const postSchema = createMockSchemaWithDefaults(postSchemaJson.projectId, postSchemaJson);
104
+ describe('findExistingRelationships', () => {
105
+ test('post', () => {
106
+ const schema = postSchema;
107
+ const actual = findExistingRelationships(schema, schema.shapes);
108
+ const expected = {
109
+ tagContentTypeId: [
110
+ {
111
+ shapeId: 'postContentTypeId',
112
+ path: ['tags'],
113
+ relatedName: 'firstTags',
114
+ hasBackreference: true,
115
+ schema: {
116
+ '@args': 'TSRelationshipArgs',
117
+ '@backreference': {
118
+ enabled: true,
119
+ name: 'firstTags'
120
+ },
121
+ '@input': {
122
+ items: {
123
+ '@ref': 'local:TSRelationship'
124
+ },
125
+ type: 'array'
126
+ },
127
+ '@mapping': 'shapedb:Post.tagsId',
128
+ '@resolver': {
129
+ name: 'shapedb:getRelated',
130
+ service: 'shapedb',
131
+ options: {
132
+ nullable: true
133
+ }
134
+ },
135
+ items: {
136
+ '@ref': 'local:Tag'
137
+ },
138
+ type: 'array'
139
+ },
140
+ shapeName: 'Post'
141
+ }
142
+ ]
143
+ };
144
+ expect(actual).toEqual(expected);
145
+ });
146
+ test('massive', () => {
147
+ const actual = findExistingRelationships(massiveSchema, massiveSchema.shapes);
148
+ expect(Object.keys(actual).length).toBe(15);
149
+ });
150
+ test('recursive ', () => {
151
+ const recursiveSchema = createMockSchemaWithDefaults('project-id', {
152
+ shapes: {
153
+ Node: {
154
+ title: 'Node',
155
+ name: 'Node',
156
+ id: 'node-id',
157
+ schema: {
158
+ type: 'object',
159
+ properties: {
160
+ value: { type: 'number' },
161
+ left: { '@ref': 'local:Node' },
162
+ right: { '@ref': 'local:Node' }
163
+ }
164
+ }
165
+ },
166
+ Report: {
167
+ title: 'Report',
168
+ name: 'Report',
169
+ id: 'report-id',
170
+ model: {
171
+ type: 'multiple'
172
+ },
173
+ schema: {
174
+ type: 'object',
175
+ properties: {
176
+ name: { type: 'string' },
177
+ tree: {
178
+ oneOf: [
179
+ {
180
+ '@ref': 'local:Node'
181
+ }
182
+ ],
183
+ '@input': {
184
+ '@ref': 'local:TSRelationship'
185
+ },
186
+ '@backreference': {
187
+ enabled: true,
188
+ name: 'firstTags'
189
+ },
190
+ '@resolver': {
191
+ name: 'shapedb:getRelated',
192
+ service: 'shapedb'
193
+ }
194
+ }
195
+ }
196
+ }
197
+ }
198
+ }
199
+ });
200
+ const actual = findExistingRelationships(recursiveSchema, recursiveSchema.shapes);
201
+ expect(actual).toEqual({
202
+ 'node-id': [
203
+ {
204
+ path: ['tree'],
205
+ shapeId: 'report-id',
206
+ relatedName: 'firstTags',
207
+ hasBackreference: true,
208
+ schema: {
209
+ '@backreference': {
210
+ enabled: true,
211
+ name: 'firstTags'
212
+ },
213
+ '@input': {
214
+ '@ref': 'local:TSRelationship'
215
+ },
216
+ '@resolver': {
217
+ name: 'shapedb:getRelated',
218
+ service: 'shapedb'
219
+ },
220
+ oneOf: [
221
+ {
222
+ '@ref': 'local:Node'
223
+ }
224
+ ]
225
+ },
226
+ shapeName: 'Report'
227
+ }
228
+ ]
229
+ });
230
+ });
231
+ test('nested in union ', () => {
232
+ const projectSchema = createMockSchema('project-id', {
233
+ shapes: {
234
+ Center: {
235
+ title: 'Center',
236
+ name: 'Center',
237
+ id: 'Center',
238
+ model: {
239
+ type: 'multiple'
240
+ },
241
+ schema: {
242
+ type: 'object',
243
+ properties: {
244
+ name: { type: 'string' },
245
+ info: {
246
+ oneOf: [{ '@ref': 'local:BasicInfo' }, { '@ref': 'local:AdvancedInfo' }]
247
+ }
248
+ }
249
+ }
250
+ },
251
+ BasicInfo: {
252
+ title: 'BasicInfo',
253
+ name: 'BasicInfo',
254
+ id: 'BasicInfo',
255
+ schema: {
256
+ type: 'object',
257
+ properties: {
258
+ treatments: {
259
+ type: 'array',
260
+ items: {
261
+ oneOf: [
262
+ {
263
+ '@ref': 'local:Treatment'
264
+ }
265
+ ]
266
+ },
267
+ '@input': {
268
+ type: 'array',
269
+ items: {
270
+ '@ref': 'local:TSRelationship'
271
+ }
272
+ },
273
+ '@backreference': { enabled: true, name: 'basicInfoSet' },
274
+ '@resolver': {
275
+ name: 'shapedb:getRelated',
276
+ service: 'shapedb'
277
+ }
278
+ }
279
+ }
280
+ }
281
+ },
282
+ AdvancedInfo: {
283
+ title: 'AdvancedInfo',
284
+ name: 'AdvancedInfo',
285
+ id: 'AdvancedInfo',
286
+ schema: {
287
+ type: 'object',
288
+ properties: {
289
+ isExpensive: { type: 'boolean' }
290
+ }
291
+ }
292
+ },
293
+ Treatment: {
294
+ title: 'Treatment',
295
+ name: 'Treatment',
296
+ id: 'Treatment',
297
+ model: {
298
+ type: 'multiple'
299
+ },
300
+ schema: {
301
+ type: 'object',
302
+ properties: {
303
+ name: { type: 'string' }
304
+ }
305
+ }
306
+ }
307
+ }
308
+ });
309
+ const actual = findExistingRelationships(projectSchema, projectSchema.shapes);
310
+ expect(actual).toEqual({
311
+ Treatment: [
312
+ {
313
+ relatedName: 'basicInfoSet',
314
+ path: ['info', 'treatments'],
315
+ shapeId: 'Center',
316
+ hasBackreference: true,
317
+ schema: {
318
+ '@backreference': {
319
+ enabled: true,
320
+ name: 'basicInfoSet'
321
+ },
322
+ '@input': {
323
+ items: {
324
+ '@ref': 'local:TSRelationship'
325
+ },
326
+ type: 'array'
327
+ },
328
+ '@resolver': {
329
+ name: 'shapedb:getRelated',
330
+ service: 'shapedb'
331
+ },
332
+ items: {
333
+ oneOf: [
334
+ {
335
+ '@ref': 'local:Treatment'
336
+ }
337
+ ]
338
+ },
339
+ type: 'array'
340
+ },
341
+ shapeName: 'BasicInfo'
342
+ }
343
+ ]
344
+ });
345
+ });
346
+ test('shopify', () => {
347
+ const shapes = {
348
+ TSRelationship: {
349
+ id: 'TSRelationship',
350
+ name: 'TSRelationship',
351
+ title: 'Relationship',
352
+ schema: {
353
+ type: 'object',
354
+ properties: {
355
+ shapeId: {
356
+ type: 'string'
357
+ },
358
+ id: { type: 'string' }
359
+ },
360
+ required: ['shapeId', 'id']
361
+ }
362
+ },
363
+ Post: {
364
+ name: 'Post',
365
+ schema: {
366
+ type: 'object',
367
+ properties: {
368
+ shopifyProduct: {
369
+ $ref: '#/shapes/TSShopify_Product/schema',
370
+ '@resolver': {
371
+ name: 'graphql:query',
372
+ argsMapping: {
373
+ id: [['jsonPath', { path: '$.productId' }]]
374
+ },
375
+ service: 'seans-store-takeshape',
376
+ fieldName: 'product'
377
+ }
378
+ },
379
+ rating: {
380
+ type: 'integer',
381
+ '@mapping': 'shapedb:self.ratingId'
382
+ },
383
+ productId: {
384
+ type: 'string',
385
+ '@tag': 'id'
386
+ },
387
+ title: {
388
+ type: 'string',
389
+ '@l10n': true,
390
+ '@mapping': 'shapedb:self.titleId'
391
+ },
392
+ body: {
393
+ type: 'string',
394
+ '@l10n': true,
395
+ '@mapping': 'shapedb:self.bodyId'
396
+ },
397
+ tags: {
398
+ '@mapping': 'shapedb:self.tagsId',
399
+ type: 'array',
400
+ items: {
401
+ oneOf: [
402
+ {
403
+ '@ref': 'local:Tag'
404
+ }
405
+ ]
406
+ },
407
+ '@input': {
408
+ items: {
409
+ '@ref': 'local:TSRelationship'
410
+ }
411
+ },
412
+ '@backreference': {
413
+ enabled: true,
414
+ name: 'firstTags'
415
+ },
416
+ '@resolver': {
417
+ name: 'shapedb:getRelated',
418
+ service: 'shapedb'
419
+ }
420
+ }
421
+ },
422
+ required: ['title']
423
+ },
424
+ model: {
425
+ type: 'multiple'
426
+ },
427
+ id: 'postContentTypeId',
428
+ title: 'Post'
429
+ },
430
+ Tag: {
431
+ name: 'Tag',
432
+ schema: {
433
+ type: 'object',
434
+ properties: {
435
+ name: {
436
+ type: 'string',
437
+ '@mapping': 'shapedb:self.nameId'
438
+ }
439
+ },
440
+ required: ['name']
441
+ },
442
+ model: {
443
+ type: 'taxonomy'
444
+ },
445
+ id: 'tagContentTypeId',
446
+ title: 'Tag'
447
+ }
448
+ };
449
+ const relationships = findExistingRelationships(massiveSchema, shapes);
450
+ expect(relationships).toEqual({
451
+ tagContentTypeId: [
452
+ {
453
+ path: ['tags'],
454
+ relatedName: 'firstTags',
455
+ shapeId: 'postContentTypeId',
456
+ hasBackreference: true,
457
+ schema: {
458
+ '@backreference': {
459
+ enabled: true,
460
+ name: 'firstTags'
461
+ },
462
+ '@input': {
463
+ items: {
464
+ '@ref': 'local:TSRelationship'
465
+ }
466
+ },
467
+ '@mapping': 'shapedb:self.tagsId',
468
+ '@resolver': {
469
+ name: 'shapedb:getRelated',
470
+ service: 'shapedb'
471
+ },
472
+ items: {
473
+ oneOf: [
474
+ {
475
+ '@ref': 'local:Tag'
476
+ }
477
+ ]
478
+ },
479
+ type: 'array'
480
+ },
481
+ shapeName: 'Post'
482
+ }
483
+ ]
484
+ });
485
+ });
486
+ });
487
+ describe('addRelatedFields', () => {
488
+ test('it works', () => {
489
+ const relationships = findExistingRelationships(projectSchema, projectSchema.shapes);
490
+ const actual = addRelatedFields(deepClone(projectSchema), relationships);
491
+ const { properties } = actual.shapes.Author.schema;
492
+ expect(properties.postSet).toEqual({
493
+ '@args': 'TSListArgs<local:Post>',
494
+ '@ref': 'PaginatedList<local:Post>',
495
+ '@resolver': {
496
+ args: {
497
+ ops: [
498
+ {
499
+ path: '$',
500
+ mapping: '$args'
501
+ },
502
+ {
503
+ path: 'baseWhere._references.eq',
504
+ mapping: '$source._id'
505
+ },
506
+ {
507
+ path: 'baseWhere._shapeId.eq',
508
+ value: projectSchema.shapes.Post.id
509
+ }
510
+ ]
511
+ },
512
+ name: 'shapedb:list',
513
+ service: 'shapedb'
514
+ }
515
+ });
516
+ expect(properties.authored).toEqual({
517
+ '@args': 'TSListArgs<local:Book>',
518
+ '@ref': 'PaginatedList<local:Book>',
519
+ '@resolver': {
520
+ args: {
521
+ ops: [
522
+ {
523
+ path: '$',
524
+ mapping: '$args'
525
+ },
526
+ {
527
+ path: 'baseWhere.author._id.eq',
528
+ mapping: '$source._id'
529
+ },
530
+ {
531
+ path: 'baseWhere._shapeId.eq',
532
+ value: projectSchema.shapes.Book.id
533
+ }
534
+ ]
535
+ },
536
+ name: 'shapedb:list',
537
+ service: 'shapedb'
538
+ }
539
+ });
540
+ expect(properties._references).toEqual({
541
+ '@args': 'TSListArgs<local:AuthorReference>',
542
+ '@ref': 'PaginatedList<local:AuthorReference>',
543
+ '@resolver': {
544
+ args: {
545
+ ops: [
546
+ {
547
+ path: '$',
548
+ mapping: '$args'
549
+ },
550
+ {
551
+ path: 'baseWhere._references.eq',
552
+ mapping: '$source._id'
553
+ },
554
+ {
555
+ path: 'baseWhere._shapeId.in',
556
+ value: [projectSchema.shapes.Asset.id, projectSchema.shapes.Post.id, projectSchema.shapes.Book.id]
557
+ }
558
+ ]
559
+ },
560
+ name: 'shapedb:list',
561
+ service: 'shapedb'
562
+ }
563
+ });
564
+ expect(actual.shapes.AuthorReference).toEqual({
565
+ id: 'AuthorReference',
566
+ name: 'AuthorReference',
567
+ title: 'AuthorReference',
568
+ schema: {
569
+ oneOf: [{ '@ref': 'local:Asset' }, { '@ref': 'local:Post' }, { '@ref': 'local:Book' }]
570
+ }
571
+ });
572
+ });
573
+ test('backreference not enabled, no reference', () => {
574
+ const mockSchema = deepClone(projectSchema);
575
+ // @ts-expect-error
576
+ mockSchema.shapes.Post.schema.properties.author['@backreference'].enabled = false;
577
+ const relationships = findExistingRelationships(mockSchema, mockSchema.shapes);
578
+ const actual = addRelatedFields(deepClone(projectSchema), relationships);
579
+ const { properties } = actual.shapes.Author.schema;
580
+ expect(properties.postSet).toBeUndefined();
581
+ expect(properties.authored).toEqual({
582
+ '@args': 'TSListArgs<local:Book>',
583
+ '@ref': 'PaginatedList<local:Book>',
584
+ '@resolver': {
585
+ args: {
586
+ ops: [
587
+ {
588
+ path: '$',
589
+ mapping: '$args'
590
+ },
591
+ {
592
+ path: 'baseWhere.author._id.eq',
593
+ mapping: '$source._id'
594
+ },
595
+ {
596
+ path: 'baseWhere._shapeId.eq',
597
+ value: projectSchema.shapes.Book.id
598
+ }
599
+ ]
600
+ },
601
+ name: 'shapedb:list',
602
+ service: 'shapedb'
603
+ }
604
+ });
605
+ expect(properties._references).toEqual({
606
+ '@args': 'TSListArgs<local:AuthorReference>',
607
+ '@ref': 'PaginatedList<local:AuthorReference>',
608
+ '@resolver': {
609
+ args: {
610
+ ops: [
611
+ {
612
+ path: '$',
613
+ mapping: '$args'
614
+ },
615
+ {
616
+ path: 'baseWhere._references.eq',
617
+ mapping: '$source._id'
618
+ },
619
+ {
620
+ path: 'baseWhere._shapeId.in',
621
+ value: [projectSchema.shapes.Asset.id, projectSchema.shapes.Book.id]
622
+ }
623
+ ]
624
+ },
625
+ name: 'shapedb:list',
626
+ service: 'shapedb'
627
+ }
628
+ });
629
+ expect(actual.shapes.AuthorReference).toEqual({
630
+ id: 'AuthorReference',
631
+ name: 'AuthorReference',
632
+ title: 'AuthorReference',
633
+ schema: {
634
+ oneOf: [{ '@ref': 'local:Asset' }, { '@ref': 'local:Book' }]
635
+ }
636
+ });
637
+ });
638
+ });
@@ -0,0 +1 @@
1
+ export {};