@takeshape/schema 9.46.0 → 9.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (450) hide show
  1. package/dist/content-schema-transform.d.ts +6 -6
  2. package/dist/content-schema-transform.d.ts.map +1 -1
  3. package/dist/create-input-schema.d.ts +2 -2
  4. package/dist/create-input-schema.d.ts.map +1 -1
  5. package/dist/flatten-templates.d.ts +2 -2
  6. package/dist/flatten-templates.d.ts.map +1 -1
  7. package/dist/get-is-leaf.d.ts +2 -2
  8. package/dist/get-is-leaf.d.ts.map +1 -1
  9. package/dist/interfaces.d.ts +6 -6
  10. package/dist/interfaces.d.ts.map +1 -1
  11. package/dist/layers/layers.d.ts +3 -3
  12. package/dist/layers/layers.d.ts.map +1 -1
  13. package/dist/layers/refs.d.ts +4 -4
  14. package/dist/layers/refs.d.ts.map +1 -1
  15. package/dist/migration/index.d.ts +43 -41
  16. package/dist/migration/index.d.ts.map +1 -1
  17. package/dist/migration/index.js +7 -1
  18. package/dist/migration/to/utils/v3.34.0-utils.d.ts +1 -0
  19. package/dist/migration/to/utils/v3.34.0-utils.d.ts.map +1 -0
  20. package/dist/migration/to/utils/v3.34.0-utils.js +1 -0
  21. package/dist/migration/to/v3.0.0.d.ts +2 -2
  22. package/dist/migration/to/v3.0.0.d.ts.map +1 -1
  23. package/dist/migration/to/v3.1.0.d.ts +2 -2
  24. package/dist/migration/to/v3.1.0.d.ts.map +1 -1
  25. package/dist/migration/to/v3.10.0.d.ts +2 -2
  26. package/dist/migration/to/v3.10.0.d.ts.map +1 -1
  27. package/dist/migration/to/v3.11.0.d.ts +2 -2
  28. package/dist/migration/to/v3.11.0.d.ts.map +1 -1
  29. package/dist/migration/to/v3.12.0.d.ts +2 -2
  30. package/dist/migration/to/v3.12.0.d.ts.map +1 -1
  31. package/dist/migration/to/v3.12.1.d.ts +2 -2
  32. package/dist/migration/to/v3.12.1.d.ts.map +1 -1
  33. package/dist/migration/to/v3.12.2.d.ts +2 -2
  34. package/dist/migration/to/v3.12.2.d.ts.map +1 -1
  35. package/dist/migration/to/v3.12.3.d.ts +2 -2
  36. package/dist/migration/to/v3.12.3.d.ts.map +1 -1
  37. package/dist/migration/to/v3.13.0.d.ts +2 -2
  38. package/dist/migration/to/v3.13.0.d.ts.map +1 -1
  39. package/dist/migration/to/v3.14.0.d.ts +2 -2
  40. package/dist/migration/to/v3.14.0.d.ts.map +1 -1
  41. package/dist/migration/to/v3.15.0.d.ts +2 -2
  42. package/dist/migration/to/v3.15.0.d.ts.map +1 -1
  43. package/dist/migration/to/v3.16.0.d.ts +2 -2
  44. package/dist/migration/to/v3.16.0.d.ts.map +1 -1
  45. package/dist/migration/to/v3.17.0.d.ts +2 -2
  46. package/dist/migration/to/v3.17.0.d.ts.map +1 -1
  47. package/dist/migration/to/v3.17.1.d.ts +2 -2
  48. package/dist/migration/to/v3.17.1.d.ts.map +1 -1
  49. package/dist/migration/to/v3.18.0.d.ts +2 -2
  50. package/dist/migration/to/v3.18.0.d.ts.map +1 -1
  51. package/dist/migration/to/v3.18.1.d.ts +2 -2
  52. package/dist/migration/to/v3.18.1.d.ts.map +1 -1
  53. package/dist/migration/to/v3.18.2.d.ts +2 -2
  54. package/dist/migration/to/v3.18.2.d.ts.map +1 -1
  55. package/dist/migration/to/v3.19.0.d.ts +2 -2
  56. package/dist/migration/to/v3.19.0.d.ts.map +1 -1
  57. package/dist/migration/to/v3.2.0.d.ts +2 -2
  58. package/dist/migration/to/v3.2.0.d.ts.map +1 -1
  59. package/dist/migration/to/v3.20.0.d.ts +2 -2
  60. package/dist/migration/to/v3.20.0.d.ts.map +1 -1
  61. package/dist/migration/to/v3.21.0.d.ts +2 -2
  62. package/dist/migration/to/v3.21.0.d.ts.map +1 -1
  63. package/dist/migration/to/v3.22.0.d.ts +2 -2
  64. package/dist/migration/to/v3.22.0.d.ts.map +1 -1
  65. package/dist/migration/to/v3.23.0.d.ts +2 -2
  66. package/dist/migration/to/v3.23.0.d.ts.map +1 -1
  67. package/dist/migration/to/v3.24.0.d.ts +2 -2
  68. package/dist/migration/to/v3.24.0.d.ts.map +1 -1
  69. package/dist/migration/to/v3.25.0.d.ts +2 -2
  70. package/dist/migration/to/v3.25.0.d.ts.map +1 -1
  71. package/dist/migration/to/v3.26.0.d.ts +2 -2
  72. package/dist/migration/to/v3.26.0.d.ts.map +1 -1
  73. package/dist/migration/to/v3.27.0.d.ts +2 -2
  74. package/dist/migration/to/v3.27.0.d.ts.map +1 -1
  75. package/dist/migration/to/v3.28.0.d.ts +2 -2
  76. package/dist/migration/to/v3.28.0.d.ts.map +1 -1
  77. package/dist/migration/to/v3.29.0.d.ts +2 -2
  78. package/dist/migration/to/v3.29.0.d.ts.map +1 -1
  79. package/dist/migration/to/v3.3.0.d.ts +2 -2
  80. package/dist/migration/to/v3.3.0.d.ts.map +1 -1
  81. package/dist/migration/to/v3.30.0.d.ts +2 -2
  82. package/dist/migration/to/v3.30.0.d.ts.map +1 -1
  83. package/dist/migration/to/v3.31.0.d.ts +2 -2
  84. package/dist/migration/to/v3.31.0.d.ts.map +1 -1
  85. package/dist/migration/to/v3.32.0.d.ts +2 -2
  86. package/dist/migration/to/v3.32.0.d.ts.map +1 -1
  87. package/dist/migration/to/v3.33.0.d.ts +2 -2
  88. package/dist/migration/to/v3.33.0.d.ts.map +1 -1
  89. package/dist/migration/to/v3.34.0.d.ts +7 -0
  90. package/dist/migration/to/v3.34.0.d.ts.map +1 -0
  91. package/dist/migration/to/v3.34.0.js +183 -0
  92. package/dist/migration/to/v3.35.0.d.ts +5 -0
  93. package/dist/migration/to/v3.35.0.d.ts.map +1 -0
  94. package/dist/migration/to/v3.35.0.js +18 -0
  95. package/dist/migration/to/v3.4.0.d.ts +2 -2
  96. package/dist/migration/to/v3.4.0.d.ts.map +1 -1
  97. package/dist/migration/to/v3.5.0.d.ts +2 -2
  98. package/dist/migration/to/v3.5.0.d.ts.map +1 -1
  99. package/dist/migration/to/v3.5.1.d.ts +2 -2
  100. package/dist/migration/to/v3.5.1.d.ts.map +1 -1
  101. package/dist/migration/to/v3.6.0.d.ts +2 -2
  102. package/dist/migration/to/v3.6.0.d.ts.map +1 -1
  103. package/dist/migration/to/v3.7.0.d.ts +2 -2
  104. package/dist/migration/to/v3.7.0.d.ts.map +1 -1
  105. package/dist/migration/to/v3.8.0.d.ts +2 -2
  106. package/dist/migration/to/v3.8.0.d.ts.map +1 -1
  107. package/dist/migration/to/v3.9.0.d.ts +2 -2
  108. package/dist/migration/to/v3.9.0.d.ts.map +1 -1
  109. package/dist/migration/types.d.ts +6 -6
  110. package/dist/migration/types.d.ts.map +1 -1
  111. package/dist/mocks.d.ts +5 -5
  112. package/dist/mocks.d.ts.map +1 -1
  113. package/dist/models/project-schema.d.ts +36 -0
  114. package/dist/models/project-schema.d.ts.map +1 -0
  115. package/dist/models/project-schema.js +132 -0
  116. package/dist/models/query.d.ts +18 -0
  117. package/dist/models/query.d.ts.map +1 -0
  118. package/dist/models/query.js +44 -0
  119. package/dist/models/service.d.ts +13 -0
  120. package/dist/models/service.d.ts.map +1 -0
  121. package/dist/models/service.js +34 -0
  122. package/dist/models/shape.d.ts +42 -0
  123. package/dist/models/shape.d.ts.map +1 -0
  124. package/dist/models/shape.js +116 -0
  125. package/dist/project-schema/index.d.ts +95 -89
  126. package/dist/project-schema/index.d.ts.map +1 -1
  127. package/dist/project-schema/index.js +168 -134
  128. package/dist/project-schema/latest.d.ts +145 -126
  129. package/dist/project-schema/latest.d.ts.map +1 -1
  130. package/dist/project-schema/migrate.d.ts +3 -3
  131. package/dist/project-schema/migrate.d.ts.map +1 -1
  132. package/dist/project-schema/migrate.js +52 -44
  133. package/dist/project-schema/v1.0.0.d.ts +13 -13
  134. package/dist/project-schema/v1.0.0.d.ts.map +1 -1
  135. package/dist/project-schema/v3.0.0.d.ts +23 -23
  136. package/dist/project-schema/v3.0.0.d.ts.map +1 -1
  137. package/dist/project-schema/v3.1.0.d.ts +35 -35
  138. package/dist/project-schema/v3.1.0.d.ts.map +1 -1
  139. package/dist/project-schema/v3.10.0.d.ts +104 -104
  140. package/dist/project-schema/v3.10.0.d.ts.map +1 -1
  141. package/dist/project-schema/v3.11.0.d.ts +104 -104
  142. package/dist/project-schema/v3.11.0.d.ts.map +1 -1
  143. package/dist/project-schema/v3.12.0.d.ts +104 -104
  144. package/dist/project-schema/v3.12.0.d.ts.map +1 -1
  145. package/dist/project-schema/v3.12.1.d.ts +110 -110
  146. package/dist/project-schema/v3.12.1.d.ts.map +1 -1
  147. package/dist/project-schema/v3.12.2.d.ts +111 -111
  148. package/dist/project-schema/v3.12.2.d.ts.map +1 -1
  149. package/dist/project-schema/v3.12.3.d.ts +114 -114
  150. package/dist/project-schema/v3.12.3.d.ts.map +1 -1
  151. package/dist/project-schema/v3.13.0.d.ts +115 -115
  152. package/dist/project-schema/v3.13.0.d.ts.map +1 -1
  153. package/dist/project-schema/v3.14.0.d.ts +116 -116
  154. package/dist/project-schema/v3.14.0.d.ts.map +1 -1
  155. package/dist/project-schema/v3.15.0.d.ts +119 -119
  156. package/dist/project-schema/v3.15.0.d.ts.map +1 -1
  157. package/dist/project-schema/v3.16.0.d.ts +119 -119
  158. package/dist/project-schema/v3.16.0.d.ts.map +1 -1
  159. package/dist/project-schema/v3.17.0.d.ts +119 -119
  160. package/dist/project-schema/v3.17.0.d.ts.map +1 -1
  161. package/dist/project-schema/v3.17.1.d.ts +119 -119
  162. package/dist/project-schema/v3.17.1.d.ts.map +1 -1
  163. package/dist/project-schema/v3.18.0.d.ts +117 -117
  164. package/dist/project-schema/v3.18.0.d.ts.map +1 -1
  165. package/dist/project-schema/v3.18.1.d.ts +117 -117
  166. package/dist/project-schema/v3.18.1.d.ts.map +1 -1
  167. package/dist/project-schema/v3.18.2.d.ts +117 -117
  168. package/dist/project-schema/v3.18.2.d.ts.map +1 -1
  169. package/dist/project-schema/v3.19.0.d.ts +117 -117
  170. package/dist/project-schema/v3.19.0.d.ts.map +1 -1
  171. package/dist/project-schema/v3.2.0.d.ts +36 -36
  172. package/dist/project-schema/v3.2.0.d.ts.map +1 -1
  173. package/dist/project-schema/v3.20.0.d.ts +117 -117
  174. package/dist/project-schema/v3.20.0.d.ts.map +1 -1
  175. package/dist/project-schema/v3.21.0.d.ts +117 -117
  176. package/dist/project-schema/v3.21.0.d.ts.map +1 -1
  177. package/dist/project-schema/v3.22.0.d.ts +118 -118
  178. package/dist/project-schema/v3.22.0.d.ts.map +1 -1
  179. package/dist/project-schema/v3.23.0.d.ts +120 -120
  180. package/dist/project-schema/v3.23.0.d.ts.map +1 -1
  181. package/dist/project-schema/v3.24.0.d.ts +120 -120
  182. package/dist/project-schema/v3.24.0.d.ts.map +1 -1
  183. package/dist/project-schema/v3.25.0.d.ts +120 -120
  184. package/dist/project-schema/v3.25.0.d.ts.map +1 -1
  185. package/dist/project-schema/v3.26.0.d.ts +121 -121
  186. package/dist/project-schema/v3.26.0.d.ts.map +1 -1
  187. package/dist/project-schema/v3.27.0.d.ts +122 -122
  188. package/dist/project-schema/v3.27.0.d.ts.map +1 -1
  189. package/dist/project-schema/v3.28.0.d.ts +123 -123
  190. package/dist/project-schema/v3.28.0.d.ts.map +1 -1
  191. package/dist/project-schema/v3.29.0.d.ts +124 -124
  192. package/dist/project-schema/v3.29.0.d.ts.map +1 -1
  193. package/dist/project-schema/v3.3.0.d.ts +36 -36
  194. package/dist/project-schema/v3.3.0.d.ts.map +1 -1
  195. package/dist/project-schema/v3.30.0.d.ts +123 -123
  196. package/dist/project-schema/v3.30.0.d.ts.map +1 -1
  197. package/dist/project-schema/v3.31.0.d.ts +125 -125
  198. package/dist/project-schema/v3.31.0.d.ts.map +1 -1
  199. package/dist/project-schema/v3.32.0.d.ts +124 -124
  200. package/dist/project-schema/v3.32.0.d.ts.map +1 -1
  201. package/dist/project-schema/v3.33.0.d.ts +125 -125
  202. package/dist/project-schema/v3.33.0.d.ts.map +1 -1
  203. package/dist/project-schema/v3.34.0.d.ts +1446 -0
  204. package/dist/project-schema/v3.34.0.d.ts.map +1 -0
  205. package/dist/project-schema/v3.34.0.js +5 -0
  206. package/dist/project-schema/v3.35.0.d.ts +1465 -0
  207. package/dist/project-schema/v3.35.0.d.ts.map +1 -0
  208. package/dist/project-schema/v3.35.0.js +5 -0
  209. package/dist/project-schema/v3.4.0.d.ts +36 -36
  210. package/dist/project-schema/v3.4.0.d.ts.map +1 -1
  211. package/dist/project-schema/v3.5.0.d.ts +36 -36
  212. package/dist/project-schema/v3.5.0.d.ts.map +1 -1
  213. package/dist/project-schema/v3.5.1.d.ts +36 -36
  214. package/dist/project-schema/v3.5.1.d.ts.map +1 -1
  215. package/dist/project-schema/v3.6.0.d.ts +37 -37
  216. package/dist/project-schema/v3.6.0.d.ts.map +1 -1
  217. package/dist/project-schema/v3.7.0.d.ts +37 -37
  218. package/dist/project-schema/v3.7.0.d.ts.map +1 -1
  219. package/dist/project-schema/v3.8.0.d.ts +39 -39
  220. package/dist/project-schema/v3.8.0.d.ts.map +1 -1
  221. package/dist/project-schema/v3.9.0.d.ts +39 -39
  222. package/dist/project-schema/v3.9.0.d.ts.map +1 -1
  223. package/dist/project-schema/v4.0.0.d.ts +113 -113
  224. package/dist/project-schema/v4.0.0.d.ts.map +1 -1
  225. package/dist/refs.d.ts +16 -13
  226. package/dist/refs.d.ts.map +1 -1
  227. package/dist/refs.js +21 -0
  228. package/dist/relationships.d.ts +5 -5
  229. package/dist/relationships.d.ts.map +1 -1
  230. package/dist/schema-util.d.ts +46 -40
  231. package/dist/schema-util.d.ts.map +1 -1
  232. package/dist/schema-util.js +34 -29
  233. package/dist/schemas/index.d.ts +2 -2
  234. package/dist/schemas/index.d.ts.map +1 -1
  235. package/dist/schemas/index.js +8 -4
  236. package/dist/schemas/index.ts +6 -2
  237. package/dist/schemas/project-schema/latest.json +43 -8
  238. package/dist/schemas/project-schema/meta-schema-v3.0.0.json +1 -1
  239. package/dist/schemas/project-schema/meta-schema-v3.1.0.json +1 -1
  240. package/dist/schemas/project-schema/meta-schema-v3.2.0.json +1 -1
  241. package/dist/schemas/project-schema/meta-schema-v3.3.0.json +1 -1
  242. package/dist/schemas/project-schema/meta-schema-v3.4.0.json +1 -1
  243. package/dist/schemas/project-schema/meta-schema-v3.5.0.json +1 -1
  244. package/dist/schemas/project-schema/meta-schema-v3.5.1.json +1 -1
  245. package/dist/schemas/project-schema/meta-schema-v3.6.0.json +1 -1
  246. package/dist/schemas/project-schema/meta-schema-v3.7.0.json +1 -1
  247. package/dist/schemas/project-schema/meta-schema-v3.8.0.json +1 -1
  248. package/dist/schemas/project-schema/meta-schema-v3.9.0.json +1 -1
  249. package/dist/schemas/project-schema/v1.0.0.json +1 -1
  250. package/dist/schemas/project-schema/v3.0.0.json +2 -2
  251. package/dist/schemas/project-schema/v3.1.0.json +4 -4
  252. package/dist/schemas/project-schema/v3.10.0.json +5 -5
  253. package/dist/schemas/project-schema/v3.11.0.json +5 -5
  254. package/dist/schemas/project-schema/v3.12.0.json +5 -5
  255. package/dist/schemas/project-schema/v3.12.1.json +5 -5
  256. package/dist/schemas/project-schema/v3.12.2.json +5 -5
  257. package/dist/schemas/project-schema/v3.12.3.json +5 -5
  258. package/dist/schemas/project-schema/v3.13.0.json +5 -5
  259. package/dist/schemas/project-schema/v3.14.0.json +5 -5
  260. package/dist/schemas/project-schema/v3.15.0.json +5 -5
  261. package/dist/schemas/project-schema/v3.16.0.json +5 -5
  262. package/dist/schemas/project-schema/v3.17.0.json +5 -5
  263. package/dist/schemas/project-schema/v3.17.1.json +5 -5
  264. package/dist/schemas/project-schema/v3.18.0.json +5 -5
  265. package/dist/schemas/project-schema/v3.18.1.json +5 -5
  266. package/dist/schemas/project-schema/v3.18.2.json +5 -5
  267. package/dist/schemas/project-schema/v3.19.0.json +5 -5
  268. package/dist/schemas/project-schema/v3.2.0.json +4 -4
  269. package/dist/schemas/project-schema/v3.20.0.json +5 -5
  270. package/dist/schemas/project-schema/v3.21.0.json +5 -5
  271. package/dist/schemas/project-schema/v3.22.0.json +5 -5
  272. package/dist/schemas/project-schema/v3.23.0.json +5 -5
  273. package/dist/schemas/project-schema/v3.24.0.json +5 -5
  274. package/dist/schemas/project-schema/v3.25.0.json +5 -5
  275. package/dist/schemas/project-schema/v3.26.0.json +6 -6
  276. package/dist/schemas/project-schema/v3.27.0.json +6 -6
  277. package/dist/schemas/project-schema/v3.28.0.json +5 -5
  278. package/dist/schemas/project-schema/v3.29.0.json +5 -5
  279. package/dist/schemas/project-schema/v3.3.0.json +4 -4
  280. package/dist/schemas/project-schema/v3.30.0.json +5 -5
  281. package/dist/schemas/project-schema/v3.31.0.json +6 -6
  282. package/dist/schemas/project-schema/v3.32.0.json +6 -6
  283. package/dist/schemas/project-schema/v3.33.0.json +6 -6
  284. package/dist/schemas/project-schema/v3.34.0.json +3088 -0
  285. package/dist/schemas/project-schema/v3.35.0.json +3123 -0
  286. package/dist/schemas/project-schema/v3.4.0.json +4 -4
  287. package/dist/schemas/project-schema/v3.5.0.json +4 -4
  288. package/dist/schemas/project-schema/v3.5.1.json +4 -4
  289. package/dist/schemas/project-schema/v3.6.0.json +4 -4
  290. package/dist/schemas/project-schema/v3.7.0.json +4 -4
  291. package/dist/schemas/project-schema/v3.8.0.json +4 -4
  292. package/dist/schemas/project-schema/v3.9.0.json +4 -4
  293. package/dist/schemas/project-schema/v4.0.0.json +5 -5
  294. package/dist/schemas/project-schema.json +6 -0
  295. package/dist/services.d.ts +12 -12
  296. package/dist/services.d.ts.map +1 -1
  297. package/dist/services.js +3 -3
  298. package/dist/taxonomies.d.ts +4 -4
  299. package/dist/taxonomies.d.ts.map +1 -1
  300. package/dist/template-shapes/index.d.ts +2 -2
  301. package/dist/template-shapes/index.d.ts.map +1 -1
  302. package/dist/template-shapes/templates.d.ts +21 -21
  303. package/dist/template-shapes/templates.d.ts.map +1 -1
  304. package/dist/template-shapes/types.d.ts +3 -3
  305. package/dist/template-shapes/types.d.ts.map +1 -1
  306. package/dist/template-shapes/where.d.ts +6 -6
  307. package/dist/template-shapes/where.d.ts.map +1 -1
  308. package/dist/types/types.d.ts +10 -9
  309. package/dist/types/types.d.ts.map +1 -1
  310. package/dist/types/utils.d.ts +5 -4
  311. package/dist/types/utils.d.ts.map +1 -1
  312. package/dist/types/utils.js +5 -0
  313. package/dist/unions.d.ts +8 -8
  314. package/dist/unions.d.ts.map +1 -1
  315. package/dist/util/api-indexing.d.ts +4 -4
  316. package/dist/util/api-indexing.d.ts.map +1 -1
  317. package/dist/util/detect-cycles.d.ts +3 -3
  318. package/dist/util/detect-cycles.d.ts.map +1 -1
  319. package/dist/util/find-shape-at-path.d.ts +3 -3
  320. package/dist/util/find-shape-at-path.d.ts.map +1 -1
  321. package/dist/util/form-config.d.ts +3 -3
  322. package/dist/util/form-config.d.ts.map +1 -1
  323. package/dist/util/get-conflicting-properties.d.ts +2 -2
  324. package/dist/util/get-conflicting-properties.d.ts.map +1 -1
  325. package/dist/util/get-return-shape.d.ts +4 -2
  326. package/dist/util/get-return-shape.d.ts.map +1 -1
  327. package/dist/util/get-return-shape.js +5 -0
  328. package/dist/util/has-arg.d.ts +2 -2
  329. package/dist/util/has-arg.d.ts.map +1 -1
  330. package/dist/util/merge.d.ts +3 -3
  331. package/dist/util/merge.d.ts.map +1 -1
  332. package/dist/util/patch-schema.d.ts +2 -2
  333. package/dist/util/patch-schema.d.ts.map +1 -1
  334. package/dist/validate.d.ts +3 -3
  335. package/dist/validate.d.ts.map +1 -1
  336. package/dist/validate.js +84 -5
  337. package/dist/workflows.d.ts +3 -3
  338. package/dist/workflows.d.ts.map +1 -1
  339. package/es/migration/index.js +5 -1
  340. package/es/migration/to/utils/v3.34.0-utils.js +0 -0
  341. package/es/migration/to/v3.34.0.js +161 -0
  342. package/es/migration/to/v3.35.0.js +10 -0
  343. package/es/models/project-schema.js +116 -0
  344. package/es/models/query.js +35 -0
  345. package/es/models/service.js +25 -0
  346. package/es/models/shape.js +105 -0
  347. package/es/project-schema/index.js +48 -44
  348. package/es/project-schema/migrate.js +53 -45
  349. package/es/project-schema/v3.34.0.js +1 -0
  350. package/es/project-schema/v3.35.0.js +1 -0
  351. package/es/refs.js +15 -0
  352. package/es/schema-util.js +32 -29
  353. package/es/schemas/index.js +5 -3
  354. package/es/schemas/index.ts +6 -2
  355. package/es/schemas/project-schema/latest.json +43 -8
  356. package/es/schemas/project-schema/meta-schema-v3.0.0.json +1 -1
  357. package/es/schemas/project-schema/meta-schema-v3.1.0.json +1 -1
  358. package/es/schemas/project-schema/meta-schema-v3.2.0.json +1 -1
  359. package/es/schemas/project-schema/meta-schema-v3.3.0.json +1 -1
  360. package/es/schemas/project-schema/meta-schema-v3.4.0.json +1 -1
  361. package/es/schemas/project-schema/meta-schema-v3.5.0.json +1 -1
  362. package/es/schemas/project-schema/meta-schema-v3.5.1.json +1 -1
  363. package/es/schemas/project-schema/meta-schema-v3.6.0.json +1 -1
  364. package/es/schemas/project-schema/meta-schema-v3.7.0.json +1 -1
  365. package/es/schemas/project-schema/meta-schema-v3.8.0.json +1 -1
  366. package/es/schemas/project-schema/meta-schema-v3.9.0.json +1 -1
  367. package/es/schemas/project-schema/v1.0.0.json +1 -1
  368. package/es/schemas/project-schema/v3.0.0.json +2 -2
  369. package/es/schemas/project-schema/v3.1.0.json +4 -4
  370. package/es/schemas/project-schema/v3.10.0.json +5 -5
  371. package/es/schemas/project-schema/v3.11.0.json +5 -5
  372. package/es/schemas/project-schema/v3.12.0.json +5 -5
  373. package/es/schemas/project-schema/v3.12.1.json +5 -5
  374. package/es/schemas/project-schema/v3.12.2.json +5 -5
  375. package/es/schemas/project-schema/v3.12.3.json +5 -5
  376. package/es/schemas/project-schema/v3.13.0.json +5 -5
  377. package/es/schemas/project-schema/v3.14.0.json +5 -5
  378. package/es/schemas/project-schema/v3.15.0.json +5 -5
  379. package/es/schemas/project-schema/v3.16.0.json +5 -5
  380. package/es/schemas/project-schema/v3.17.0.json +5 -5
  381. package/es/schemas/project-schema/v3.17.1.json +5 -5
  382. package/es/schemas/project-schema/v3.18.0.json +5 -5
  383. package/es/schemas/project-schema/v3.18.1.json +5 -5
  384. package/es/schemas/project-schema/v3.18.2.json +5 -5
  385. package/es/schemas/project-schema/v3.19.0.json +5 -5
  386. package/es/schemas/project-schema/v3.2.0.json +4 -4
  387. package/es/schemas/project-schema/v3.20.0.json +5 -5
  388. package/es/schemas/project-schema/v3.21.0.json +5 -5
  389. package/es/schemas/project-schema/v3.22.0.json +5 -5
  390. package/es/schemas/project-schema/v3.23.0.json +5 -5
  391. package/es/schemas/project-schema/v3.24.0.json +5 -5
  392. package/es/schemas/project-schema/v3.25.0.json +5 -5
  393. package/es/schemas/project-schema/v3.26.0.json +6 -6
  394. package/es/schemas/project-schema/v3.27.0.json +6 -6
  395. package/es/schemas/project-schema/v3.28.0.json +5 -5
  396. package/es/schemas/project-schema/v3.29.0.json +5 -5
  397. package/es/schemas/project-schema/v3.3.0.json +4 -4
  398. package/es/schemas/project-schema/v3.30.0.json +5 -5
  399. package/es/schemas/project-schema/v3.31.0.json +6 -6
  400. package/es/schemas/project-schema/v3.32.0.json +6 -6
  401. package/es/schemas/project-schema/v3.33.0.json +6 -6
  402. package/es/schemas/project-schema/v3.34.0.json +3088 -0
  403. package/es/schemas/project-schema/v3.35.0.json +3123 -0
  404. package/es/schemas/project-schema/v3.4.0.json +4 -4
  405. package/es/schemas/project-schema/v3.5.0.json +4 -4
  406. package/es/schemas/project-schema/v3.5.1.json +4 -4
  407. package/es/schemas/project-schema/v3.6.0.json +4 -4
  408. package/es/schemas/project-schema/v3.7.0.json +4 -4
  409. package/es/schemas/project-schema/v3.8.0.json +4 -4
  410. package/es/schemas/project-schema/v3.9.0.json +4 -4
  411. package/es/schemas/project-schema/v4.0.0.json +5 -5
  412. package/es/schemas/project-schema.json +6 -0
  413. package/es/services.js +3 -3
  414. package/es/types/utils.js +3 -0
  415. package/es/util/get-return-shape.js +3 -0
  416. package/es/validate.js +85 -6
  417. package/examples/latest/betzino.json +2012 -1756
  418. package/examples/latest/blog-schema.json +1 -1
  419. package/examples/latest/brewery-schema.json +31 -26
  420. package/examples/latest/complex-project-schema.json +645 -480
  421. package/examples/latest/complex-schema.json +866 -671
  422. package/examples/latest/fabric-ecommerce.json +7 -38
  423. package/examples/latest/frank-and-fred-schema.json +866 -671
  424. package/examples/latest/klirr-schema.json +1641 -1264
  425. package/examples/latest/massive-schema.json +897 -681
  426. package/examples/latest/mill-components-schema.json +1 -1
  427. package/examples/latest/one-earth.json +3012 -2462
  428. package/examples/latest/pet-oneof-array.json +1 -1
  429. package/examples/latest/post-schema.json +1 -1
  430. package/examples/latest/pruned-shopify-product-schema.json +1 -1
  431. package/examples/latest/real-world-schema.json +19 -14
  432. package/examples/latest/recursive-repeater-schema.json +1 -1
  433. package/examples/latest/recursive-schema.json +1 -1
  434. package/examples/latest/rick-and-morty-ast.json +39 -226
  435. package/examples/latest/rick-and-morty-graphql.json +35 -222
  436. package/examples/latest/rick-and-morty-rest.json +1 -1
  437. package/examples/latest/schema-with-repeater-draftjs.json +1 -1
  438. package/examples/latest/shape-books-v3_2_0.json +19 -14
  439. package/examples/latest/shape-books.json +19 -14
  440. package/examples/latest/shape-editor-schema-edited.json +1 -1
  441. package/examples/latest/shape-editor-schema-initial.json +2 -2
  442. package/examples/latest/shopify-lookbook.json +9 -39
  443. package/examples/latest/shopify-product-2022-07.json +21 -213
  444. package/examples/latest/shopify-product-2023-04.json +21 -213
  445. package/examples/latest/shopify-store-with-widget.json +97 -360
  446. package/examples/latest/stripe-product-runtime-schema.json +21 -213
  447. package/examples/latest/stripe-starter-resolved.json +21 -213
  448. package/examples/latest/user-schema-no-required.json +1 -1
  449. package/examples/latest/user-schema-with-defaults.json +1 -1
  450. package/package.json +5 -5
@@ -42,6 +42,8 @@ export * from './v3.30.0';
42
42
  export * from './v3.31.0';
43
43
  export * from './v3.32.0';
44
44
  export * from './v3.33.0';
45
+ export * from './v3.34.0';
46
+ export * from './v3.35.0';
45
47
  export * from './v4.0.0';
46
48
 
47
49
  // Schema type utilities
@@ -63,47 +65,49 @@ function createVersionPredicate(expectedVersion) {
63
65
  };
64
66
  }
65
67
 
66
- export const isProjectSchemaV1_0_0 = createVersionPredicate('1.0.0');
67
- export const isProjectSchemaV3_0_0 = createVersionPredicate('3.0.0');
68
- export const isProjectSchemaV3_1_0 = createVersionPredicate('3.1.0');
69
- export const isProjectSchemaV3_2_0 = createVersionPredicate('3.2.0');
70
- export const isProjectSchemaV3_3_0 = createVersionPredicate('3.3.0');
71
- export const isProjectSchemaV3_4_0 = createVersionPredicate('3.4.0');
72
- export const isProjectSchemaV3_5_0 = createVersionPredicate('3.5.0');
73
- export const isProjectSchemaV3_5_1 = createVersionPredicate('3.5.1');
74
- export const isProjectSchemaV3_6_0 = createVersionPredicate('3.6.0');
75
- export const isProjectSchemaV3_7_0 = createVersionPredicate('3.7.0');
76
- export const isProjectSchemaV3_8_0 = createVersionPredicate('3.8.0');
77
- export const isProjectSchemaV3_9_0 = createVersionPredicate('3.9.0');
78
- export const isProjectSchemaV3_10_0 = createVersionPredicate('3.10.0');
79
- export const isProjectSchemaV3_11_0 = createVersionPredicate('3.11.0');
80
- export const isProjectSchemaV3_12_0 = createVersionPredicate('3.12.0');
81
- export const isProjectSchemaV3_12_1 = createVersionPredicate('3.12.1');
82
- export const isProjectSchemaV3_12_2 = createVersionPredicate('3.12.2');
83
- export const isProjectSchemaV3_12_3 = createVersionPredicate('3.12.3');
84
- export const isProjectSchemaV3_13_0 = createVersionPredicate('3.13.0');
85
- export const isProjectSchemaV3_14_0 = createVersionPredicate('3.14.0');
86
- export const isProjectSchemaV3_15_0 = createVersionPredicate('3.15.0');
87
- export const isProjectSchemaV3_16_0 = createVersionPredicate('3.16.0');
88
- export const isProjectSchemaV3_17_0 = createVersionPredicate('3.17.0');
89
- export const isProjectSchemaV3_17_1 = createVersionPredicate('3.17.1');
90
- export const isProjectSchemaV3_18_0 = createVersionPredicate('3.18.0');
91
- export const isProjectSchemaV3_18_1 = createVersionPredicate('3.18.1');
92
- export const isProjectSchemaV3_18_2 = createVersionPredicate('3.18.2');
93
- export const isProjectSchemaV3_19_0 = createVersionPredicate('3.19.0');
94
- export const isProjectSchemaV3_20_0 = createVersionPredicate('3.20.0');
95
- export const isProjectSchemaV3_21_0 = createVersionPredicate('3.21.0');
96
- export const isProjectSchemaV3_22_0 = createVersionPredicate('3.22.0');
97
- export const isProjectSchemaV3_23_0 = createVersionPredicate('3.23.0');
98
- export const isProjectSchemaV3_24_0 = createVersionPredicate('3.24.0');
99
- export const isProjectSchemaV3_25_0 = createVersionPredicate('3.25.0');
100
- export const isProjectSchemaV3_26_0 = createVersionPredicate('3.26.0');
101
- export const isProjectSchemaV3_27_0 = createVersionPredicate('3.27.0');
102
- export const isProjectSchemaV3_28_0 = createVersionPredicate('3.28.0');
103
- export const isProjectSchemaV3_29_0 = createVersionPredicate('3.29.0');
104
- export const isProjectSchemaV3_30_0 = createVersionPredicate('3.30.0');
105
- export const isProjectSchemaV3_31_0 = createVersionPredicate('3.31.0');
106
- export const isProjectSchemaV3_32_0 = createVersionPredicate('3.32.0');
107
- export const isProjectSchemaV3_33_0 = createVersionPredicate('3.33.0');
108
- export const isLatestProjectSchema = createVersionPredicate('3.33.0');
109
- export const isProjectSchemaV4_0_0 = createVersionPredicate('4.0.0');
68
+ export const isProjectSchemaJSONV1_0_0 = createVersionPredicate('1.0.0');
69
+ export const isProjectSchemaJSONV3_0_0 = createVersionPredicate('3.0.0');
70
+ export const isProjectSchemaJSONV3_1_0 = createVersionPredicate('3.1.0');
71
+ export const isProjectSchemaJSONV3_2_0 = createVersionPredicate('3.2.0');
72
+ export const isProjectSchemaJSONV3_3_0 = createVersionPredicate('3.3.0');
73
+ export const isProjectSchemaJSONV3_4_0 = createVersionPredicate('3.4.0');
74
+ export const isProjectSchemaJSONV3_5_0 = createVersionPredicate('3.5.0');
75
+ export const isProjectSchemaJSONV3_5_1 = createVersionPredicate('3.5.1');
76
+ export const isProjectSchemaJSONV3_6_0 = createVersionPredicate('3.6.0');
77
+ export const isProjectSchemaJSONV3_7_0 = createVersionPredicate('3.7.0');
78
+ export const isProjectSchemaJSONV3_8_0 = createVersionPredicate('3.8.0');
79
+ export const isProjectSchemaJSONV3_9_0 = createVersionPredicate('3.9.0');
80
+ export const isProjectSchemaJSONV3_10_0 = createVersionPredicate('3.10.0');
81
+ export const isProjectSchemaJSONV3_11_0 = createVersionPredicate('3.11.0');
82
+ export const isProjectSchemaJSONV3_12_0 = createVersionPredicate('3.12.0');
83
+ export const isProjectSchemaJSONV3_12_1 = createVersionPredicate('3.12.1');
84
+ export const isProjectSchemaJSONV3_12_2 = createVersionPredicate('3.12.2');
85
+ export const isProjectSchemaJSONV3_12_3 = createVersionPredicate('3.12.3');
86
+ export const isProjectSchemaJSONV3_13_0 = createVersionPredicate('3.13.0');
87
+ export const isProjectSchemaJSONV3_14_0 = createVersionPredicate('3.14.0');
88
+ export const isProjectSchemaJSONV3_15_0 = createVersionPredicate('3.15.0');
89
+ export const isProjectSchemaJSONV3_16_0 = createVersionPredicate('3.16.0');
90
+ export const isProjectSchemaJSONV3_17_0 = createVersionPredicate('3.17.0');
91
+ export const isProjectSchemaJSONV3_17_1 = createVersionPredicate('3.17.1');
92
+ export const isProjectSchemaJSONV3_18_0 = createVersionPredicate('3.18.0');
93
+ export const isProjectSchemaJSONV3_18_1 = createVersionPredicate('3.18.1');
94
+ export const isProjectSchemaJSONV3_18_2 = createVersionPredicate('3.18.2');
95
+ export const isProjectSchemaJSONV3_19_0 = createVersionPredicate('3.19.0');
96
+ export const isProjectSchemaJSONV3_20_0 = createVersionPredicate('3.20.0');
97
+ export const isProjectSchemaJSONV3_21_0 = createVersionPredicate('3.21.0');
98
+ export const isProjectSchemaJSONV3_22_0 = createVersionPredicate('3.22.0');
99
+ export const isProjectSchemaJSONV3_23_0 = createVersionPredicate('3.23.0');
100
+ export const isProjectSchemaJSONV3_24_0 = createVersionPredicate('3.24.0');
101
+ export const isProjectSchemaJSONV3_25_0 = createVersionPredicate('3.25.0');
102
+ export const isProjectSchemaJSONV3_26_0 = createVersionPredicate('3.26.0');
103
+ export const isProjectSchemaJSONV3_27_0 = createVersionPredicate('3.27.0');
104
+ export const isProjectSchemaJSONV3_28_0 = createVersionPredicate('3.28.0');
105
+ export const isProjectSchemaJSONV3_29_0 = createVersionPredicate('3.29.0');
106
+ export const isProjectSchemaJSONV3_30_0 = createVersionPredicate('3.30.0');
107
+ export const isProjectSchemaJSONV3_31_0 = createVersionPredicate('3.31.0');
108
+ export const isProjectSchemaJSONV3_32_0 = createVersionPredicate('3.32.0');
109
+ export const isProjectSchemaJSONV3_33_0 = createVersionPredicate('3.33.0');
110
+ export const isProjectSchemaJSONV3_34_0 = createVersionPredicate('3.34.0');
111
+ export const isProjectSchemaJSONV3_35_0 = createVersionPredicate('3.35.0');
112
+ export const isLatestProjectSchemaJSON = createVersionPredicate('3.35.0');
113
+ export const isProjectSchemaJSONV4_0_0 = createVersionPredicate('4.0.0');
@@ -1,184 +1,192 @@
1
1
  // This file is generated by "pnpm json2ts"
2
2
  import { migrateTo } from '../migration';
3
- import { isProjectSchemaV1_0_0, isProjectSchemaV3_0_0, isProjectSchemaV3_1_0, isProjectSchemaV3_2_0, isProjectSchemaV3_3_0, isProjectSchemaV3_4_0, isProjectSchemaV3_5_0, isProjectSchemaV3_5_1, isProjectSchemaV3_6_0, isProjectSchemaV3_7_0, isProjectSchemaV3_8_0, isProjectSchemaV3_9_0, isProjectSchemaV3_10_0, isProjectSchemaV3_11_0, isProjectSchemaV3_12_0, isProjectSchemaV3_12_1, isProjectSchemaV3_12_2, isProjectSchemaV3_12_3, isProjectSchemaV3_13_0, isProjectSchemaV3_14_0, isProjectSchemaV3_15_0, isProjectSchemaV3_16_0, isProjectSchemaV3_17_0, isProjectSchemaV3_17_1, isProjectSchemaV3_18_0, isProjectSchemaV3_18_1, isProjectSchemaV3_18_2, isProjectSchemaV3_19_0, isProjectSchemaV3_20_0, isProjectSchemaV3_21_0, isProjectSchemaV3_22_0, isProjectSchemaV3_23_0, isProjectSchemaV3_24_0, isProjectSchemaV3_25_0, isProjectSchemaV3_26_0, isProjectSchemaV3_27_0, isProjectSchemaV3_28_0, isProjectSchemaV3_29_0, isProjectSchemaV3_30_0, isProjectSchemaV3_31_0, isProjectSchemaV3_32_0, isProjectSchemaV4_0_0, isLatestProjectSchema } from './index'; // eslint-disable-next-line complexity
3
+ import { isProjectSchemaJSONV1_0_0, isProjectSchemaJSONV3_0_0, isProjectSchemaJSONV3_1_0, isProjectSchemaJSONV3_2_0, isProjectSchemaJSONV3_3_0, isProjectSchemaJSONV3_4_0, isProjectSchemaJSONV3_5_0, isProjectSchemaJSONV3_5_1, isProjectSchemaJSONV3_6_0, isProjectSchemaJSONV3_7_0, isProjectSchemaJSONV3_8_0, isProjectSchemaJSONV3_9_0, isProjectSchemaJSONV3_10_0, isProjectSchemaJSONV3_11_0, isProjectSchemaJSONV3_12_0, isProjectSchemaJSONV3_12_1, isProjectSchemaJSONV3_12_2, isProjectSchemaJSONV3_12_3, isProjectSchemaJSONV3_13_0, isProjectSchemaJSONV3_14_0, isProjectSchemaJSONV3_15_0, isProjectSchemaJSONV3_16_0, isProjectSchemaJSONV3_17_0, isProjectSchemaJSONV3_17_1, isProjectSchemaJSONV3_18_0, isProjectSchemaJSONV3_18_1, isProjectSchemaJSONV3_18_2, isProjectSchemaJSONV3_19_0, isProjectSchemaJSONV3_20_0, isProjectSchemaJSONV3_21_0, isProjectSchemaJSONV3_22_0, isProjectSchemaJSONV3_23_0, isProjectSchemaJSONV3_24_0, isProjectSchemaJSONV3_25_0, isProjectSchemaJSONV3_26_0, isProjectSchemaJSONV3_27_0, isProjectSchemaJSONV3_28_0, isProjectSchemaJSONV3_29_0, isProjectSchemaJSONV3_30_0, isProjectSchemaJSONV3_31_0, isProjectSchemaJSONV3_32_0, isProjectSchemaJSONV3_33_0, isProjectSchemaJSONV3_34_0, isProjectSchemaJSONV4_0_0, isLatestProjectSchemaJSON } from './index'; // eslint-disable-next-line complexity
4
4
 
5
5
  export async function migrateToLatestProjectSchema(context, projectSchema) {
6
- if (isLatestProjectSchema(projectSchema)) {
6
+ if (isLatestProjectSchemaJSON(projectSchema)) {
7
7
  return projectSchema;
8
8
  }
9
9
 
10
- if (isProjectSchemaV1_0_0(projectSchema)) {
10
+ if (isProjectSchemaJSONV1_0_0(projectSchema)) {
11
11
  projectSchema = await migrateTo['v3.0.0'](context, projectSchema);
12
12
  }
13
13
 
14
- if (isProjectSchemaV3_0_0(projectSchema)) {
14
+ if (isProjectSchemaJSONV3_0_0(projectSchema)) {
15
15
  projectSchema = await migrateTo['v3.1.0'](context, projectSchema);
16
16
  }
17
17
 
18
- if (isProjectSchemaV3_1_0(projectSchema)) {
18
+ if (isProjectSchemaJSONV3_1_0(projectSchema)) {
19
19
  projectSchema = await migrateTo['v3.2.0'](context, projectSchema);
20
20
  }
21
21
 
22
- if (isProjectSchemaV3_2_0(projectSchema)) {
22
+ if (isProjectSchemaJSONV3_2_0(projectSchema)) {
23
23
  projectSchema = await migrateTo['v3.3.0'](context, projectSchema);
24
24
  }
25
25
 
26
- if (isProjectSchemaV3_3_0(projectSchema)) {
26
+ if (isProjectSchemaJSONV3_3_0(projectSchema)) {
27
27
  projectSchema = await migrateTo['v3.4.0'](context, projectSchema);
28
28
  }
29
29
 
30
- if (isProjectSchemaV3_4_0(projectSchema)) {
30
+ if (isProjectSchemaJSONV3_4_0(projectSchema)) {
31
31
  projectSchema = await migrateTo['v3.5.0'](context, projectSchema);
32
32
  }
33
33
 
34
- if (isProjectSchemaV3_5_0(projectSchema)) {
34
+ if (isProjectSchemaJSONV3_5_0(projectSchema)) {
35
35
  projectSchema = await migrateTo['v3.5.1'](context, projectSchema);
36
36
  }
37
37
 
38
- if (isProjectSchemaV3_5_1(projectSchema)) {
38
+ if (isProjectSchemaJSONV3_5_1(projectSchema)) {
39
39
  projectSchema = await migrateTo['v3.6.0'](context, projectSchema);
40
40
  }
41
41
 
42
- if (isProjectSchemaV3_6_0(projectSchema)) {
42
+ if (isProjectSchemaJSONV3_6_0(projectSchema)) {
43
43
  projectSchema = await migrateTo['v3.7.0'](context, projectSchema);
44
44
  }
45
45
 
46
- if (isProjectSchemaV3_7_0(projectSchema)) {
46
+ if (isProjectSchemaJSONV3_7_0(projectSchema)) {
47
47
  projectSchema = await migrateTo['v3.8.0'](context, projectSchema);
48
48
  }
49
49
 
50
- if (isProjectSchemaV3_8_0(projectSchema)) {
50
+ if (isProjectSchemaJSONV3_8_0(projectSchema)) {
51
51
  projectSchema = await migrateTo['v3.9.0'](context, projectSchema);
52
52
  }
53
53
 
54
- if (isProjectSchemaV3_9_0(projectSchema)) {
54
+ if (isProjectSchemaJSONV3_9_0(projectSchema)) {
55
55
  projectSchema = await migrateTo['v3.10.0'](context, projectSchema);
56
56
  }
57
57
 
58
- if (isProjectSchemaV3_10_0(projectSchema)) {
58
+ if (isProjectSchemaJSONV3_10_0(projectSchema)) {
59
59
  projectSchema = await migrateTo['v3.11.0'](context, projectSchema);
60
60
  }
61
61
 
62
- if (isProjectSchemaV3_11_0(projectSchema)) {
62
+ if (isProjectSchemaJSONV3_11_0(projectSchema)) {
63
63
  projectSchema = await migrateTo['v3.12.0'](context, projectSchema);
64
64
  }
65
65
 
66
- if (isProjectSchemaV3_12_0(projectSchema)) {
66
+ if (isProjectSchemaJSONV3_12_0(projectSchema)) {
67
67
  projectSchema = await migrateTo['v3.12.1'](context, projectSchema);
68
68
  }
69
69
 
70
- if (isProjectSchemaV3_12_1(projectSchema)) {
70
+ if (isProjectSchemaJSONV3_12_1(projectSchema)) {
71
71
  projectSchema = await migrateTo['v3.12.2'](context, projectSchema);
72
72
  }
73
73
 
74
- if (isProjectSchemaV3_12_2(projectSchema)) {
74
+ if (isProjectSchemaJSONV3_12_2(projectSchema)) {
75
75
  projectSchema = await migrateTo['v3.12.3'](context, projectSchema);
76
76
  }
77
77
 
78
- if (isProjectSchemaV3_12_3(projectSchema)) {
78
+ if (isProjectSchemaJSONV3_12_3(projectSchema)) {
79
79
  projectSchema = await migrateTo['v3.13.0'](context, projectSchema);
80
80
  }
81
81
 
82
- if (isProjectSchemaV3_13_0(projectSchema)) {
82
+ if (isProjectSchemaJSONV3_13_0(projectSchema)) {
83
83
  projectSchema = await migrateTo['v3.14.0'](context, projectSchema);
84
84
  }
85
85
 
86
- if (isProjectSchemaV3_14_0(projectSchema)) {
86
+ if (isProjectSchemaJSONV3_14_0(projectSchema)) {
87
87
  projectSchema = await migrateTo['v3.15.0'](context, projectSchema);
88
88
  }
89
89
 
90
- if (isProjectSchemaV3_15_0(projectSchema)) {
90
+ if (isProjectSchemaJSONV3_15_0(projectSchema)) {
91
91
  projectSchema = await migrateTo['v3.16.0'](context, projectSchema);
92
92
  }
93
93
 
94
- if (isProjectSchemaV3_16_0(projectSchema)) {
94
+ if (isProjectSchemaJSONV3_16_0(projectSchema)) {
95
95
  projectSchema = await migrateTo['v3.17.0'](context, projectSchema);
96
96
  }
97
97
 
98
- if (isProjectSchemaV3_17_0(projectSchema)) {
98
+ if (isProjectSchemaJSONV3_17_0(projectSchema)) {
99
99
  projectSchema = await migrateTo['v3.17.1'](context, projectSchema);
100
100
  }
101
101
 
102
- if (isProjectSchemaV3_17_1(projectSchema)) {
102
+ if (isProjectSchemaJSONV3_17_1(projectSchema)) {
103
103
  projectSchema = await migrateTo['v3.18.0'](context, projectSchema);
104
104
  }
105
105
 
106
- if (isProjectSchemaV3_18_0(projectSchema)) {
106
+ if (isProjectSchemaJSONV3_18_0(projectSchema)) {
107
107
  projectSchema = await migrateTo['v3.18.1'](context, projectSchema);
108
108
  }
109
109
 
110
- if (isProjectSchemaV3_18_1(projectSchema)) {
110
+ if (isProjectSchemaJSONV3_18_1(projectSchema)) {
111
111
  projectSchema = await migrateTo['v3.18.2'](context, projectSchema);
112
112
  }
113
113
 
114
- if (isProjectSchemaV3_18_2(projectSchema)) {
114
+ if (isProjectSchemaJSONV3_18_2(projectSchema)) {
115
115
  projectSchema = await migrateTo['v3.19.0'](context, projectSchema);
116
116
  }
117
117
 
118
- if (isProjectSchemaV3_19_0(projectSchema)) {
118
+ if (isProjectSchemaJSONV3_19_0(projectSchema)) {
119
119
  projectSchema = await migrateTo['v3.20.0'](context, projectSchema);
120
120
  }
121
121
 
122
- if (isProjectSchemaV3_20_0(projectSchema)) {
122
+ if (isProjectSchemaJSONV3_20_0(projectSchema)) {
123
123
  projectSchema = await migrateTo['v3.21.0'](context, projectSchema);
124
124
  }
125
125
 
126
- if (isProjectSchemaV3_21_0(projectSchema)) {
126
+ if (isProjectSchemaJSONV3_21_0(projectSchema)) {
127
127
  projectSchema = await migrateTo['v3.22.0'](context, projectSchema);
128
128
  }
129
129
 
130
- if (isProjectSchemaV3_22_0(projectSchema)) {
130
+ if (isProjectSchemaJSONV3_22_0(projectSchema)) {
131
131
  projectSchema = await migrateTo['v3.23.0'](context, projectSchema);
132
132
  }
133
133
 
134
- if (isProjectSchemaV3_23_0(projectSchema)) {
134
+ if (isProjectSchemaJSONV3_23_0(projectSchema)) {
135
135
  projectSchema = await migrateTo['v3.24.0'](context, projectSchema);
136
136
  }
137
137
 
138
- if (isProjectSchemaV3_24_0(projectSchema)) {
138
+ if (isProjectSchemaJSONV3_24_0(projectSchema)) {
139
139
  projectSchema = await migrateTo['v3.25.0'](context, projectSchema);
140
140
  }
141
141
 
142
- if (isProjectSchemaV3_25_0(projectSchema)) {
142
+ if (isProjectSchemaJSONV3_25_0(projectSchema)) {
143
143
  projectSchema = await migrateTo['v3.26.0'](context, projectSchema);
144
144
  }
145
145
 
146
- if (isProjectSchemaV3_26_0(projectSchema)) {
146
+ if (isProjectSchemaJSONV3_26_0(projectSchema)) {
147
147
  projectSchema = await migrateTo['v3.27.0'](context, projectSchema);
148
148
  }
149
149
 
150
- if (isProjectSchemaV3_27_0(projectSchema)) {
150
+ if (isProjectSchemaJSONV3_27_0(projectSchema)) {
151
151
  projectSchema = await migrateTo['v3.28.0'](context, projectSchema);
152
152
  }
153
153
 
154
- if (isProjectSchemaV3_28_0(projectSchema)) {
154
+ if (isProjectSchemaJSONV3_28_0(projectSchema)) {
155
155
  projectSchema = await migrateTo['v3.29.0'](context, projectSchema);
156
156
  }
157
157
 
158
- if (isProjectSchemaV3_29_0(projectSchema)) {
158
+ if (isProjectSchemaJSONV3_29_0(projectSchema)) {
159
159
  projectSchema = await migrateTo['v3.30.0'](context, projectSchema);
160
160
  }
161
161
 
162
- if (isProjectSchemaV3_30_0(projectSchema)) {
162
+ if (isProjectSchemaJSONV3_30_0(projectSchema)) {
163
163
  projectSchema = await migrateTo['v3.31.0'](context, projectSchema);
164
164
  }
165
165
 
166
- if (isProjectSchemaV3_31_0(projectSchema)) {
166
+ if (isProjectSchemaJSONV3_31_0(projectSchema)) {
167
167
  projectSchema = await migrateTo['v3.32.0'](context, projectSchema);
168
168
  }
169
169
 
170
- if (isProjectSchemaV3_32_0(projectSchema)) {
170
+ if (isProjectSchemaJSONV3_32_0(projectSchema)) {
171
171
  projectSchema = await migrateTo['v3.33.0'](context, projectSchema);
172
172
  }
173
173
 
174
- if (isProjectSchemaV4_0_0(projectSchema)) {
174
+ if (isProjectSchemaJSONV3_33_0(projectSchema)) {
175
+ projectSchema = await migrateTo['v3.34.0'](context, projectSchema);
176
+ }
177
+
178
+ if (isProjectSchemaJSONV3_34_0(projectSchema)) {
179
+ projectSchema = await migrateTo['v3.35.0'](context, projectSchema);
180
+ }
181
+
182
+ if (isProjectSchemaJSONV4_0_0(projectSchema)) {
175
183
  throw new Error('You are using an unreleased schema version. Migration is not possible');
176
184
  }
177
185
 
178
186
  return projectSchema;
179
187
  }
180
188
  export async function ensureLatest(context, schema) {
181
- if (!schema || isLatestProjectSchema(schema)) {
189
+ if (!schema || isLatestProjectSchemaJSON(schema)) {
182
190
  return schema;
183
191
  }
184
192
 
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export {};
package/es/refs.js CHANGED
@@ -250,6 +250,9 @@ export function shapeNameToRefItem(context, shapeName, template) {
250
250
  isForeign: parsed.serviceId !== 'local'
251
251
  };
252
252
  }
253
+ export function shapeToRefItem(context, shape) {
254
+ return shapeNameToRefItem(context, shape.name);
255
+ }
253
256
  /**
254
257
  * Given a property schema and project schema, finds a `@ref` or `$ref` and
255
258
  * returns a `RefItem` suitable for loading a referenced schema...
@@ -553,6 +556,18 @@ export function parsePropertyRef(refStr) {
553
556
  export function serializePropertyRef(propertyRef) {
554
557
  return `${propertyRef.serviceId}:${propertyRef.shapeName}.${propertyRef.propertyName}`;
555
558
  }
559
+ export function propertyRefToShapeRef(propertyRef) {
560
+ const parsed = parsePropertyRef(propertyRef);
561
+
562
+ if (!parsed) {
563
+ throw new Error(`Invalid property ref "${propertyRef}`);
564
+ }
565
+
566
+ return formatShapeRef(parsed.serviceId, parsed.shapeName);
567
+ }
568
+ export function formatShapeRef(serviceId, shapeName) {
569
+ return `${serviceId}:${shapeName}`;
570
+ }
556
571
  export function applyNamespace(namespace, name) {
557
572
  return namespace ? `${namespace}_${name}` : name;
558
573
  }
package/es/schema-util.js CHANGED
@@ -428,6 +428,9 @@ export function applyDefaultsToSchema(projectSchema) {
428
428
  export function getShapeById(projectSchema, shapeId) {
429
429
  return find(projectSchema.shapes, shape => shape.id === shapeId);
430
430
  }
431
+ export function getShapeByRef(projectSchema, shapeRef) {
432
+ return refItemToShape(projectSchema, atRefToRefItem(projectSchema, shapeRef));
433
+ }
431
434
  export function ensureShapeById(projectSchema, shapeId) {
432
435
  const shape = getShapeById(projectSchema, shapeId);
433
436
 
@@ -1026,47 +1029,47 @@ export const createSchemaPropertyList = curry((context, shapeOrSchema) => {
1026
1029
  function isShape(shapeOrSchema) {
1027
1030
  return 'schema' in shapeOrSchema;
1028
1031
  }
1029
- /**
1030
- * Creates a schema property accessor, allowing you to safely access schema
1031
- * properties.
1032
- */
1033
-
1034
1032
 
1035
- export const createSchemaPropertyAccessor = curry((context, shapeOrSchema) => {
1036
- const propSchema = isShape(shapeOrSchema) ? shapeOrSchema.schema : shapeOrSchema;
1037
- const schema = dereferenceSchema(context, propSchema, isShape(shapeOrSchema) ? ['shapes', shapeOrSchema.name] : undefined);
1038
- const propertyIterator = new Map(isObjectSchema(schema) ? Object.entries(schema.properties) : undefined);
1033
+ class SchemaPropertyAccessor {
1034
+ constructor(context, shapeOrSchema) {
1035
+ const propSchema = isShape(shapeOrSchema) ? shapeOrSchema.schema : shapeOrSchema;
1036
+ this.schema = dereferenceSchema(context, propSchema, isShape(shapeOrSchema) ? ['shapes', shapeOrSchema.name] : undefined);
1037
+ this.entries = isObjectSchema(this.schema) ? Object.entries(this.schema.properties) : [];
1038
+ this.properties = new Map(this.entries);
1039
+ }
1039
1040
 
1040
- const _getValue = propertyName => {
1041
- return propertyIterator.get(propertyName);
1042
- };
1041
+ getValue(propertyName) {
1042
+ return this.properties.get(propertyName);
1043
+ }
1043
1044
 
1044
- const _findValue = predicate => {
1045
- var _Array$from$find;
1045
+ findValue(predicate) {
1046
+ var _this$entries$find;
1046
1047
 
1047
- return (_Array$from$find = Array.from(propertyIterator).find(predicate)) === null || _Array$from$find === void 0 ? void 0 : _Array$from$find[1];
1048
- };
1048
+ return (_this$entries$find = this.entries.find(predicate)) === null || _this$entries$find === void 0 ? void 0 : _this$entries$find[1];
1049
+ }
1049
1050
 
1050
- const _findName = predicate => {
1051
- var _Array$from$find2;
1051
+ findName(predicate) {
1052
+ var _this$entries$find2;
1052
1053
 
1053
- return (_Array$from$find2 = Array.from(propertyIterator).find(predicate)) === null || _Array$from$find2 === void 0 ? void 0 : _Array$from$find2[0];
1054
- };
1054
+ return (_this$entries$find2 = this.entries.find(predicate)) === null || _this$entries$find2 === void 0 ? void 0 : _this$entries$find2[0];
1055
+ }
1055
1056
 
1056
- const _getKey = propertyName => {
1057
- const value = propertyIterator.get(propertyName);
1057
+ getKey(propertyName) {
1058
+ const value = this.properties.get(propertyName);
1058
1059
 
1059
1060
  if (value) {
1060
1061
  return getStorageKey(value);
1061
1062
  }
1062
- };
1063
+ }
1063
1064
 
1064
- return {
1065
- getValue: _getValue,
1066
- findValue: _findValue,
1067
- findName: _findName,
1068
- getKey: _getKey
1069
- };
1065
+ }
1066
+
1067
+ /**
1068
+ * Creates a schema property accessor, allowing you to safely access schema
1069
+ * properties.
1070
+ */
1071
+ export const createSchemaPropertyAccessor = curry((context, shapeOrSchema) => {
1072
+ return new SchemaPropertyAccessor(context, shapeOrSchema);
1070
1073
  });
1071
1074
 
1072
1075
  function findQueryHelper(slice, shapeName, resolver, type) {
@@ -1,7 +1,7 @@
1
1
  // This file is generated by "pnpm json2ts"
2
- export const CURRENT_SCHEMA_VERSION = '3.33.0';
2
+ export const CURRENT_SCHEMA_VERSION = '3.35.0';
3
3
  export { default as anyProjectSchema } from './project-schema.json';
4
- export { default as latestSchemaJson } from './project-schema/v3.33.0.json';
4
+ export { default as latestSchemaJson } from './project-schema/v3.35.0.json';
5
5
  import metaSchemaV1_0_0 from './project-schema/meta-schema-v1.0.0.json';
6
6
  import projectSchemaV1_0_0 from './project-schema/v1.0.0.json';
7
7
  import metaSchemaV3_0_0 from './project-schema/meta-schema-v3.0.0.json';
@@ -56,5 +56,7 @@ import projectSchemaV3_30_0 from './project-schema/v3.30.0.json';
56
56
  import projectSchemaV3_31_0 from './project-schema/v3.31.0.json';
57
57
  import projectSchemaV3_32_0 from './project-schema/v3.32.0.json';
58
58
  import projectSchemaV3_33_0 from './project-schema/v3.33.0.json';
59
+ import projectSchemaV3_34_0 from './project-schema/v3.34.0.json';
60
+ import projectSchemaV3_35_0 from './project-schema/v3.35.0.json';
59
61
  import projectSchemaV4_0_0 from './project-schema/v4.0.0.json';
60
- export const allProjectSchemas = [metaSchemaV1_0_0, projectSchemaV1_0_0, metaSchemaV3_0_0, projectSchemaV3_0_0, metaSchemaV3_1_0, projectSchemaV3_1_0, metaSchemaV3_2_0, projectSchemaV3_2_0, metaSchemaV3_3_0, projectSchemaV3_3_0, metaSchemaV3_4_0, projectSchemaV3_4_0, metaSchemaV3_5_0, projectSchemaV3_5_0, metaSchemaV3_5_1, projectSchemaV3_5_1, metaSchemaV3_6_0, projectSchemaV3_6_0, metaSchemaV3_7_0, projectSchemaV3_7_0, metaSchemaV3_8_0, projectSchemaV3_8_0, metaSchemaV3_9_0, projectSchemaV3_9_0, projectSchemaV3_10_0, projectSchemaV3_11_0, projectSchemaV3_12_0, projectSchemaV3_12_1, projectSchemaV3_12_2, projectSchemaV3_12_3, projectSchemaV3_13_0, projectSchemaV3_14_0, projectSchemaV3_15_0, projectSchemaV3_16_0, projectSchemaV3_17_0, projectSchemaV3_17_1, projectSchemaV3_18_0, projectSchemaV3_18_1, projectSchemaV3_18_2, projectSchemaV3_19_0, projectSchemaV3_20_0, projectSchemaV3_21_0, projectSchemaV3_22_0, projectSchemaV3_23_0, projectSchemaV3_24_0, projectSchemaV3_25_0, projectSchemaV3_26_0, projectSchemaV3_27_0, projectSchemaV3_28_0, projectSchemaV3_29_0, projectSchemaV3_30_0, projectSchemaV3_31_0, projectSchemaV3_32_0, projectSchemaV3_33_0, projectSchemaV4_0_0];
62
+ export const allProjectSchemas = [metaSchemaV1_0_0, projectSchemaV1_0_0, metaSchemaV3_0_0, projectSchemaV3_0_0, metaSchemaV3_1_0, projectSchemaV3_1_0, metaSchemaV3_2_0, projectSchemaV3_2_0, metaSchemaV3_3_0, projectSchemaV3_3_0, metaSchemaV3_4_0, projectSchemaV3_4_0, metaSchemaV3_5_0, projectSchemaV3_5_0, metaSchemaV3_5_1, projectSchemaV3_5_1, metaSchemaV3_6_0, projectSchemaV3_6_0, metaSchemaV3_7_0, projectSchemaV3_7_0, metaSchemaV3_8_0, projectSchemaV3_8_0, metaSchemaV3_9_0, projectSchemaV3_9_0, projectSchemaV3_10_0, projectSchemaV3_11_0, projectSchemaV3_12_0, projectSchemaV3_12_1, projectSchemaV3_12_2, projectSchemaV3_12_3, projectSchemaV3_13_0, projectSchemaV3_14_0, projectSchemaV3_15_0, projectSchemaV3_16_0, projectSchemaV3_17_0, projectSchemaV3_17_1, projectSchemaV3_18_0, projectSchemaV3_18_1, projectSchemaV3_18_2, projectSchemaV3_19_0, projectSchemaV3_20_0, projectSchemaV3_21_0, projectSchemaV3_22_0, projectSchemaV3_23_0, projectSchemaV3_24_0, projectSchemaV3_25_0, projectSchemaV3_26_0, projectSchemaV3_27_0, projectSchemaV3_28_0, projectSchemaV3_29_0, projectSchemaV3_30_0, projectSchemaV3_31_0, projectSchemaV3_32_0, projectSchemaV3_33_0, projectSchemaV3_34_0, projectSchemaV3_35_0, projectSchemaV4_0_0];
@@ -1,7 +1,7 @@
1
1
  // This file is generated by "pnpm json2ts"
2
- export const CURRENT_SCHEMA_VERSION = '3.33.0';
2
+ export const CURRENT_SCHEMA_VERSION = '3.35.0';
3
3
  export {default as anyProjectSchema} from './project-schema.json';
4
- export {default as latestSchemaJson} from './project-schema/v3.33.0.json';
4
+ export {default as latestSchemaJson} from './project-schema/v3.35.0.json';
5
5
  import metaSchemaV1_0_0 from './project-schema/meta-schema-v1.0.0.json';
6
6
  import projectSchemaV1_0_0 from './project-schema/v1.0.0.json';
7
7
  import metaSchemaV3_0_0 from './project-schema/meta-schema-v3.0.0.json';
@@ -56,6 +56,8 @@ import projectSchemaV3_30_0 from './project-schema/v3.30.0.json';
56
56
  import projectSchemaV3_31_0 from './project-schema/v3.31.0.json';
57
57
  import projectSchemaV3_32_0 from './project-schema/v3.32.0.json';
58
58
  import projectSchemaV3_33_0 from './project-schema/v3.33.0.json';
59
+ import projectSchemaV3_34_0 from './project-schema/v3.34.0.json';
60
+ import projectSchemaV3_35_0 from './project-schema/v3.35.0.json';
59
61
  import projectSchemaV4_0_0 from './project-schema/v4.0.0.json';
60
62
  export const allProjectSchemas = [
61
63
  metaSchemaV1_0_0,
@@ -112,5 +114,7 @@ export const allProjectSchemas = [
112
114
  projectSchemaV3_31_0,
113
115
  projectSchemaV3_32_0,
114
116
  projectSchemaV3_33_0,
117
+ projectSchemaV3_34_0,
118
+ projectSchemaV3_35_0,
115
119
  projectSchemaV4_0_0
116
120
  ];
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
- "$id": "https://schema.takeshape.io/project-schema/v3.33.0#",
4
- "title": "Project Schema",
3
+ "$id": "https://schema.takeshape.io/project-schema/v3.35.0#",
4
+ "title": "Project Schema JSON",
5
5
  "definitions": {
6
6
  "schemaArray": {
7
7
  "title": "Schema Array",
@@ -1766,7 +1766,7 @@
1766
1766
  "additionalProperties": false
1767
1767
  },
1768
1768
  "query": {
1769
- "title": "Query",
1769
+ "title": "Query JSON",
1770
1770
  "type": "object",
1771
1771
  "properties": {
1772
1772
  "args": {
@@ -2008,7 +2008,7 @@
2008
2008
  "additionalProperties": false
2009
2009
  },
2010
2010
  "shape": {
2011
- "title": "Shape",
2011
+ "title": "Shape JSON",
2012
2012
  "description": "A Shape is a schema object for structuring and storing data from one or more sources, including the TakeShape data store and connected services",
2013
2013
  "type": "object",
2014
2014
  "properties": {
@@ -2067,6 +2067,9 @@
2067
2067
  "loaders": {
2068
2068
  "$ref": "#/definitions/shapeLoaders"
2069
2069
  },
2070
+ "joins": {
2071
+ "$ref": "#/definitions/shapeJoins"
2072
+ },
2070
2073
  "cache": {
2071
2074
  "$ref": "#/definitions/shapeCacheConfig"
2072
2075
  },
@@ -2149,6 +2152,38 @@
2149
2152
  "enabled"
2150
2153
  ]
2151
2154
  },
2155
+ "shapeJoin": {
2156
+ "title": "ShapeJoin",
2157
+ "type": "object",
2158
+ "properties": {
2159
+ "resolver": {
2160
+ "oneOf": [
2161
+ {
2162
+ "$ref": "#/definitions/delegateResolver"
2163
+ },
2164
+ {
2165
+ "$ref": "#/definitions/shapedbResolver"
2166
+ }
2167
+ ]
2168
+ },
2169
+ "dependencies": {
2170
+ "type": "string"
2171
+ }
2172
+ },
2173
+ "required": [
2174
+ "resolver"
2175
+ ],
2176
+ "additionalProperties": false
2177
+ },
2178
+ "shapeJoins": {
2179
+ "title": "ShapeJoins",
2180
+ "type": "object",
2181
+ "patternProperties": {
2182
+ "[:0-9A-Za-z_-]+": {
2183
+ "$ref": "#/definitions/shapeJoin"
2184
+ }
2185
+ }
2186
+ },
2152
2187
  "shapeLoaders": {
2153
2188
  "title": "ShapeLoaders",
2154
2189
  "type": "object",
@@ -2826,7 +2861,7 @@
2826
2861
  "additionalProperties": false
2827
2862
  },
2828
2863
  "storedServiceConfig": {
2829
- "title": "Stored Service Config",
2864
+ "title": "Service Config JSON",
2830
2865
  "type": "object",
2831
2866
  "properties": {
2832
2867
  "id": {
@@ -2894,7 +2929,7 @@
2894
2929
  ]
2895
2930
  },
2896
2931
  "storedServiceMap": {
2897
- "title": "Stored Service Map",
2932
+ "title": "Service Map JSON",
2898
2933
  "type": "object",
2899
2934
  "patternProperties": {
2900
2935
  "[0-9A-Za-z_-]+": {
@@ -3018,7 +3053,7 @@
3018
3053
  "schemaVersion": {
3019
3054
  "type": "string",
3020
3055
  "enum": [
3021
- "3.33.0"
3056
+ "3.35.0"
3022
3057
  ],
3023
3058
  "description": "The version of the schema format your project is using. We increase the version as we make breaking changes to the schema format."
3024
3059
  },
@@ -3085,4 +3120,4 @@
3085
3120
  "mutations",
3086
3121
  "workflows"
3087
3122
  ]
3088
- }
3123
+ }
@@ -348,7 +348,7 @@
348
348
  "type": "string"
349
349
  },
350
350
  "query": {
351
- "title": "Query",
351
+ "title": "Query JSON",
352
352
  "type": "object",
353
353
  "properties": {
354
354
  "args": {
@@ -348,7 +348,7 @@
348
348
  "type": "string"
349
349
  },
350
350
  "query": {
351
- "title": "Query",
351
+ "title": "Query JSON",
352
352
  "type": "object",
353
353
  "properties": {
354
354
  "args": {