@takeshape/schema 9.47.0 → 9.49.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 (448) 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 -42
  16. package/dist/migration/index.d.ts.map +1 -1
  17. package/dist/migration/index.js +4 -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 +4 -4
  90. package/dist/migration/to/v3.34.0.d.ts.map +1 -1
  91. package/dist/migration/to/v3.34.0.js +28 -6
  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 +94 -91
  126. package/dist/project-schema/index.d.ts.map +1 -1
  127. package/dist/project-schema/index.js +154 -137
  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 +49 -45
  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 +125 -125
  204. package/dist/project-schema/v3.34.0.d.ts.map +1 -1
  205. package/dist/project-schema/v3.35.0.d.ts +1465 -0
  206. package/dist/project-schema/v3.35.0.d.ts.map +1 -0
  207. package/dist/project-schema/v3.35.0.js +5 -0
  208. package/dist/project-schema/v3.4.0.d.ts +36 -36
  209. package/dist/project-schema/v3.4.0.d.ts.map +1 -1
  210. package/dist/project-schema/v3.5.0.d.ts +36 -36
  211. package/dist/project-schema/v3.5.0.d.ts.map +1 -1
  212. package/dist/project-schema/v3.5.1.d.ts +36 -36
  213. package/dist/project-schema/v3.5.1.d.ts.map +1 -1
  214. package/dist/project-schema/v3.6.0.d.ts +37 -37
  215. package/dist/project-schema/v3.6.0.d.ts.map +1 -1
  216. package/dist/project-schema/v3.7.0.d.ts +37 -37
  217. package/dist/project-schema/v3.7.0.d.ts.map +1 -1
  218. package/dist/project-schema/v3.8.0.d.ts +39 -39
  219. package/dist/project-schema/v3.8.0.d.ts.map +1 -1
  220. package/dist/project-schema/v3.9.0.d.ts +39 -39
  221. package/dist/project-schema/v3.9.0.d.ts.map +1 -1
  222. package/dist/project-schema/v4.0.0.d.ts +113 -113
  223. package/dist/project-schema/v4.0.0.d.ts.map +1 -1
  224. package/dist/refs.d.ts +16 -13
  225. package/dist/refs.d.ts.map +1 -1
  226. package/dist/refs.js +21 -0
  227. package/dist/relationships.d.ts +5 -5
  228. package/dist/relationships.d.ts.map +1 -1
  229. package/dist/schema-util.d.ts +46 -40
  230. package/dist/schema-util.d.ts.map +1 -1
  231. package/dist/schema-util.js +34 -29
  232. package/dist/schemas/index.d.ts +2 -2
  233. package/dist/schemas/index.d.ts.map +1 -1
  234. package/dist/schemas/index.js +6 -4
  235. package/dist/schemas/index.ts +4 -2
  236. package/dist/schemas/project-schema/latest.json +42 -7
  237. package/dist/schemas/project-schema/meta-schema-v3.0.0.json +1 -1
  238. package/dist/schemas/project-schema/meta-schema-v3.1.0.json +1 -1
  239. package/dist/schemas/project-schema/meta-schema-v3.2.0.json +1 -1
  240. package/dist/schemas/project-schema/meta-schema-v3.3.0.json +1 -1
  241. package/dist/schemas/project-schema/meta-schema-v3.4.0.json +1 -1
  242. package/dist/schemas/project-schema/meta-schema-v3.5.0.json +1 -1
  243. package/dist/schemas/project-schema/meta-schema-v3.5.1.json +1 -1
  244. package/dist/schemas/project-schema/meta-schema-v3.6.0.json +1 -1
  245. package/dist/schemas/project-schema/meta-schema-v3.7.0.json +1 -1
  246. package/dist/schemas/project-schema/meta-schema-v3.8.0.json +1 -1
  247. package/dist/schemas/project-schema/meta-schema-v3.9.0.json +1 -1
  248. package/dist/schemas/project-schema/v1.0.0.json +1 -1
  249. package/dist/schemas/project-schema/v3.0.0.json +2 -2
  250. package/dist/schemas/project-schema/v3.1.0.json +4 -4
  251. package/dist/schemas/project-schema/v3.10.0.json +5 -5
  252. package/dist/schemas/project-schema/v3.11.0.json +5 -5
  253. package/dist/schemas/project-schema/v3.12.0.json +5 -5
  254. package/dist/schemas/project-schema/v3.12.1.json +5 -5
  255. package/dist/schemas/project-schema/v3.12.2.json +5 -5
  256. package/dist/schemas/project-schema/v3.12.3.json +5 -5
  257. package/dist/schemas/project-schema/v3.13.0.json +5 -5
  258. package/dist/schemas/project-schema/v3.14.0.json +5 -5
  259. package/dist/schemas/project-schema/v3.15.0.json +5 -5
  260. package/dist/schemas/project-schema/v3.16.0.json +5 -5
  261. package/dist/schemas/project-schema/v3.17.0.json +5 -5
  262. package/dist/schemas/project-schema/v3.17.1.json +5 -5
  263. package/dist/schemas/project-schema/v3.18.0.json +5 -5
  264. package/dist/schemas/project-schema/v3.18.1.json +5 -5
  265. package/dist/schemas/project-schema/v3.18.2.json +5 -5
  266. package/dist/schemas/project-schema/v3.19.0.json +5 -5
  267. package/dist/schemas/project-schema/v3.2.0.json +4 -4
  268. package/dist/schemas/project-schema/v3.20.0.json +5 -5
  269. package/dist/schemas/project-schema/v3.21.0.json +5 -5
  270. package/dist/schemas/project-schema/v3.22.0.json +5 -5
  271. package/dist/schemas/project-schema/v3.23.0.json +5 -5
  272. package/dist/schemas/project-schema/v3.24.0.json +5 -5
  273. package/dist/schemas/project-schema/v3.25.0.json +5 -5
  274. package/dist/schemas/project-schema/v3.26.0.json +6 -6
  275. package/dist/schemas/project-schema/v3.27.0.json +6 -6
  276. package/dist/schemas/project-schema/v3.28.0.json +5 -5
  277. package/dist/schemas/project-schema/v3.29.0.json +5 -5
  278. package/dist/schemas/project-schema/v3.3.0.json +4 -4
  279. package/dist/schemas/project-schema/v3.30.0.json +5 -5
  280. package/dist/schemas/project-schema/v3.31.0.json +6 -6
  281. package/dist/schemas/project-schema/v3.32.0.json +6 -6
  282. package/dist/schemas/project-schema/v3.33.0.json +6 -6
  283. package/dist/schemas/project-schema/v3.34.0.json +5 -5
  284. package/dist/schemas/project-schema/v3.35.0.json +3123 -0
  285. package/dist/schemas/project-schema/v3.4.0.json +4 -4
  286. package/dist/schemas/project-schema/v3.5.0.json +4 -4
  287. package/dist/schemas/project-schema/v3.5.1.json +4 -4
  288. package/dist/schemas/project-schema/v3.6.0.json +4 -4
  289. package/dist/schemas/project-schema/v3.7.0.json +4 -4
  290. package/dist/schemas/project-schema/v3.8.0.json +4 -4
  291. package/dist/schemas/project-schema/v3.9.0.json +4 -4
  292. package/dist/schemas/project-schema/v4.0.0.json +5 -5
  293. package/dist/schemas/project-schema.json +3 -0
  294. package/dist/services.d.ts +12 -12
  295. package/dist/services.d.ts.map +1 -1
  296. package/dist/services.js +3 -3
  297. package/dist/taxonomies.d.ts +4 -4
  298. package/dist/taxonomies.d.ts.map +1 -1
  299. package/dist/template-shapes/index.d.ts +2 -2
  300. package/dist/template-shapes/index.d.ts.map +1 -1
  301. package/dist/template-shapes/templates.d.ts +21 -21
  302. package/dist/template-shapes/templates.d.ts.map +1 -1
  303. package/dist/template-shapes/types.d.ts +3 -3
  304. package/dist/template-shapes/types.d.ts.map +1 -1
  305. package/dist/template-shapes/where.d.ts +6 -6
  306. package/dist/template-shapes/where.d.ts.map +1 -1
  307. package/dist/types/types.d.ts +10 -9
  308. package/dist/types/types.d.ts.map +1 -1
  309. package/dist/types/utils.d.ts +5 -4
  310. package/dist/types/utils.d.ts.map +1 -1
  311. package/dist/types/utils.js +5 -0
  312. package/dist/unions.d.ts +8 -8
  313. package/dist/unions.d.ts.map +1 -1
  314. package/dist/util/api-indexing.d.ts +4 -4
  315. package/dist/util/api-indexing.d.ts.map +1 -1
  316. package/dist/util/detect-cycles.d.ts +3 -3
  317. package/dist/util/detect-cycles.d.ts.map +1 -1
  318. package/dist/util/find-shape-at-path.d.ts +3 -3
  319. package/dist/util/find-shape-at-path.d.ts.map +1 -1
  320. package/dist/util/form-config.d.ts +3 -3
  321. package/dist/util/form-config.d.ts.map +1 -1
  322. package/dist/util/get-conflicting-properties.d.ts +2 -2
  323. package/dist/util/get-conflicting-properties.d.ts.map +1 -1
  324. package/dist/util/get-return-shape.d.ts +4 -2
  325. package/dist/util/get-return-shape.d.ts.map +1 -1
  326. package/dist/util/get-return-shape.js +5 -0
  327. package/dist/util/has-arg.d.ts +2 -2
  328. package/dist/util/has-arg.d.ts.map +1 -1
  329. package/dist/util/merge.d.ts +3 -3
  330. package/dist/util/merge.d.ts.map +1 -1
  331. package/dist/util/patch-schema.d.ts +2 -2
  332. package/dist/util/patch-schema.d.ts.map +1 -1
  333. package/dist/validate.d.ts +3 -3
  334. package/dist/validate.d.ts.map +1 -1
  335. package/dist/validate.js +84 -5
  336. package/dist/workflows.d.ts +3 -3
  337. package/dist/workflows.d.ts.map +1 -1
  338. package/es/migration/index.js +3 -1
  339. package/es/migration/to/utils/v3.34.0-utils.js +0 -0
  340. package/es/migration/to/v3.34.0.js +28 -7
  341. package/es/migration/to/v3.35.0.js +10 -0
  342. package/es/models/project-schema.js +116 -0
  343. package/es/models/query.js +35 -0
  344. package/es/models/service.js +25 -0
  345. package/es/models/shape.js +105 -0
  346. package/es/project-schema/index.js +47 -45
  347. package/es/project-schema/migrate.js +50 -46
  348. package/es/project-schema/v3.35.0.js +1 -0
  349. package/es/refs.js +15 -0
  350. package/es/schema-util.js +32 -29
  351. package/es/schemas/index.js +4 -3
  352. package/es/schemas/index.ts +4 -2
  353. package/es/schemas/project-schema/latest.json +42 -7
  354. package/es/schemas/project-schema/meta-schema-v3.0.0.json +1 -1
  355. package/es/schemas/project-schema/meta-schema-v3.1.0.json +1 -1
  356. package/es/schemas/project-schema/meta-schema-v3.2.0.json +1 -1
  357. package/es/schemas/project-schema/meta-schema-v3.3.0.json +1 -1
  358. package/es/schemas/project-schema/meta-schema-v3.4.0.json +1 -1
  359. package/es/schemas/project-schema/meta-schema-v3.5.0.json +1 -1
  360. package/es/schemas/project-schema/meta-schema-v3.5.1.json +1 -1
  361. package/es/schemas/project-schema/meta-schema-v3.6.0.json +1 -1
  362. package/es/schemas/project-schema/meta-schema-v3.7.0.json +1 -1
  363. package/es/schemas/project-schema/meta-schema-v3.8.0.json +1 -1
  364. package/es/schemas/project-schema/meta-schema-v3.9.0.json +1 -1
  365. package/es/schemas/project-schema/v1.0.0.json +1 -1
  366. package/es/schemas/project-schema/v3.0.0.json +2 -2
  367. package/es/schemas/project-schema/v3.1.0.json +4 -4
  368. package/es/schemas/project-schema/v3.10.0.json +5 -5
  369. package/es/schemas/project-schema/v3.11.0.json +5 -5
  370. package/es/schemas/project-schema/v3.12.0.json +5 -5
  371. package/es/schemas/project-schema/v3.12.1.json +5 -5
  372. package/es/schemas/project-schema/v3.12.2.json +5 -5
  373. package/es/schemas/project-schema/v3.12.3.json +5 -5
  374. package/es/schemas/project-schema/v3.13.0.json +5 -5
  375. package/es/schemas/project-schema/v3.14.0.json +5 -5
  376. package/es/schemas/project-schema/v3.15.0.json +5 -5
  377. package/es/schemas/project-schema/v3.16.0.json +5 -5
  378. package/es/schemas/project-schema/v3.17.0.json +5 -5
  379. package/es/schemas/project-schema/v3.17.1.json +5 -5
  380. package/es/schemas/project-schema/v3.18.0.json +5 -5
  381. package/es/schemas/project-schema/v3.18.1.json +5 -5
  382. package/es/schemas/project-schema/v3.18.2.json +5 -5
  383. package/es/schemas/project-schema/v3.19.0.json +5 -5
  384. package/es/schemas/project-schema/v3.2.0.json +4 -4
  385. package/es/schemas/project-schema/v3.20.0.json +5 -5
  386. package/es/schemas/project-schema/v3.21.0.json +5 -5
  387. package/es/schemas/project-schema/v3.22.0.json +5 -5
  388. package/es/schemas/project-schema/v3.23.0.json +5 -5
  389. package/es/schemas/project-schema/v3.24.0.json +5 -5
  390. package/es/schemas/project-schema/v3.25.0.json +5 -5
  391. package/es/schemas/project-schema/v3.26.0.json +6 -6
  392. package/es/schemas/project-schema/v3.27.0.json +6 -6
  393. package/es/schemas/project-schema/v3.28.0.json +5 -5
  394. package/es/schemas/project-schema/v3.29.0.json +5 -5
  395. package/es/schemas/project-schema/v3.3.0.json +4 -4
  396. package/es/schemas/project-schema/v3.30.0.json +5 -5
  397. package/es/schemas/project-schema/v3.31.0.json +6 -6
  398. package/es/schemas/project-schema/v3.32.0.json +6 -6
  399. package/es/schemas/project-schema/v3.33.0.json +6 -6
  400. package/es/schemas/project-schema/v3.34.0.json +5 -5
  401. package/es/schemas/project-schema/v3.35.0.json +3123 -0
  402. package/es/schemas/project-schema/v3.4.0.json +4 -4
  403. package/es/schemas/project-schema/v3.5.0.json +4 -4
  404. package/es/schemas/project-schema/v3.5.1.json +4 -4
  405. package/es/schemas/project-schema/v3.6.0.json +4 -4
  406. package/es/schemas/project-schema/v3.7.0.json +4 -4
  407. package/es/schemas/project-schema/v3.8.0.json +4 -4
  408. package/es/schemas/project-schema/v3.9.0.json +4 -4
  409. package/es/schemas/project-schema/v4.0.0.json +5 -5
  410. package/es/schemas/project-schema.json +3 -0
  411. package/es/services.js +3 -3
  412. package/es/types/utils.js +3 -0
  413. package/es/util/get-return-shape.js +3 -0
  414. package/es/validate.js +85 -6
  415. package/examples/latest/betzino.json +1 -1
  416. package/examples/latest/blog-schema.json +1 -1
  417. package/examples/latest/brewery-schema.json +1 -1
  418. package/examples/latest/complex-project-schema.json +1 -1
  419. package/examples/latest/complex-schema.json +1 -1
  420. package/examples/latest/fabric-ecommerce.json +1 -1
  421. package/examples/latest/frank-and-fred-schema.json +1 -1
  422. package/examples/latest/klirr-schema.json +1 -1
  423. package/examples/latest/massive-schema.json +1 -1
  424. package/examples/latest/mill-components-schema.json +1 -1
  425. package/examples/latest/one-earth.json +1 -1
  426. package/examples/latest/pet-oneof-array.json +1 -1
  427. package/examples/latest/post-schema.json +1 -1
  428. package/examples/latest/pruned-shopify-product-schema.json +1 -1
  429. package/examples/latest/real-world-schema.json +1 -1
  430. package/examples/latest/recursive-repeater-schema.json +1 -1
  431. package/examples/latest/recursive-schema.json +1 -1
  432. package/examples/latest/rick-and-morty-ast.json +1 -1
  433. package/examples/latest/rick-and-morty-graphql.json +1 -1
  434. package/examples/latest/rick-and-morty-rest.json +1 -1
  435. package/examples/latest/schema-with-repeater-draftjs.json +1 -1
  436. package/examples/latest/shape-books-v3_2_0.json +1 -1
  437. package/examples/latest/shape-books.json +1 -1
  438. package/examples/latest/shape-editor-schema-edited.json +2 -2
  439. package/examples/latest/shape-editor-schema-initial.json +1 -1
  440. package/examples/latest/shopify-lookbook.json +1 -1
  441. package/examples/latest/shopify-product-2022-07.json +1 -1
  442. package/examples/latest/shopify-product-2023-04.json +1 -1
  443. package/examples/latest/shopify-store-with-widget.json +1 -1
  444. package/examples/latest/stripe-product-runtime-schema.json +1 -1
  445. package/examples/latest/stripe-starter-resolved.json +1 -1
  446. package/examples/latest/user-schema-no-required.json +1 -1
  447. package/examples/latest/user-schema-with-defaults.json +1 -1
  448. package/package.json +5 -5
@@ -1,188 +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, isProjectSchemaV3_33_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 (isProjectSchemaV3_33_0(projectSchema)) {
174
+ if (isProjectSchemaJSONV3_33_0(projectSchema)) {
175
175
  projectSchema = await migrateTo['v3.34.0'](context, projectSchema);
176
176
  }
177
177
 
178
- if (isProjectSchemaV4_0_0(projectSchema)) {
178
+ if (isProjectSchemaJSONV3_34_0(projectSchema)) {
179
+ projectSchema = await migrateTo['v3.35.0'](context, projectSchema);
180
+ }
181
+
182
+ if (isProjectSchemaJSONV4_0_0(projectSchema)) {
179
183
  throw new Error('You are using an unreleased schema version. Migration is not possible');
180
184
  }
181
185
 
182
186
  return projectSchema;
183
187
  }
184
188
  export async function ensureLatest(context, schema) {
185
- if (!schema || isLatestProjectSchema(schema)) {
189
+ if (!schema || isLatestProjectSchemaJSON(schema)) {
186
190
  return schema;
187
191
  }
188
192
 
@@ -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.34.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.34.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';
@@ -57,5 +57,6 @@ 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
59
  import projectSchemaV3_34_0 from './project-schema/v3.34.0.json';
60
+ import projectSchemaV3_35_0 from './project-schema/v3.35.0.json';
60
61
  import projectSchemaV4_0_0 from './project-schema/v4.0.0.json';
61
- 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, 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.34.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.34.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';
@@ -57,6 +57,7 @@ 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
59
  import projectSchemaV3_34_0 from './project-schema/v3.34.0.json';
60
+ import projectSchemaV3_35_0 from './project-schema/v3.35.0.json';
60
61
  import projectSchemaV4_0_0 from './project-schema/v4.0.0.json';
61
62
  export const allProjectSchemas = [
62
63
  metaSchemaV1_0_0,
@@ -114,5 +115,6 @@ export const allProjectSchemas = [
114
115
  projectSchemaV3_32_0,
115
116
  projectSchemaV3_33_0,
116
117
  projectSchemaV3_34_0,
118
+ projectSchemaV3_35_0,
117
119
  projectSchemaV4_0_0
118
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.34.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.34.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
  },
@@ -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": {
@@ -352,7 +352,7 @@
352
352
  "type": "string"
353
353
  },
354
354
  "query": {
355
- "title": "Query",
355
+ "title": "Query JSON",
356
356
  "type": "object",
357
357
  "properties": {
358
358
  "args": {
@@ -352,7 +352,7 @@
352
352
  "type": "string"
353
353
  },
354
354
  "query": {
355
- "title": "Query",
355
+ "title": "Query JSON",
356
356
  "type": "object",
357
357
  "properties": {
358
358
  "args": {
@@ -406,7 +406,7 @@
406
406
  "type": "string"
407
407
  },
408
408
  "query": {
409
- "title": "Query",
409
+ "title": "Query JSON",
410
410
  "type": "object",
411
411
  "properties": {
412
412
  "args": {
@@ -366,7 +366,7 @@
366
366
  "type": "string"
367
367
  },
368
368
  "query": {
369
- "title": "Query",
369
+ "title": "Query JSON",
370
370
  "type": "object",
371
371
  "properties": {
372
372
  "args": {
@@ -366,7 +366,7 @@
366
366
  "type": "string"
367
367
  },
368
368
  "query": {
369
- "title": "Query",
369
+ "title": "Query JSON",
370
370
  "type": "object",
371
371
  "properties": {
372
372
  "args": {
@@ -366,7 +366,7 @@
366
366
  "type": "string"
367
367
  },
368
368
  "query": {
369
- "title": "Query",
369
+ "title": "Query JSON",
370
370
  "type": "object",
371
371
  "properties": {
372
372
  "args": {
@@ -872,7 +872,7 @@
872
872
  "type": "string"
873
873
  },
874
874
  "query": {
875
- "title": "Query",
875
+ "title": "Query JSON",
876
876
  "type": "object",
877
877
  "properties": {
878
878
  "args": {
@@ -872,7 +872,7 @@
872
872
  "type": "string"
873
873
  },
874
874
  "query": {
875
- "title": "Query",
875
+ "title": "Query JSON",
876
876
  "type": "object",
877
877
  "properties": {
878
878
  "args": {
@@ -1212,7 +1212,7 @@
1212
1212
  "type": "string"
1213
1213
  },
1214
1214
  "query": {
1215
- "title": "Query",
1215
+ "title": "Query JSON",
1216
1216
  "type": "object",
1217
1217
  "properties": {
1218
1218
  "args": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
3
  "$id": "https://schema.takeshape.io/project-schema/v1.0.0#",
4
- "title": "Project Schema",
4
+ "title": "Project Schema JSON",
5
5
  "definitions": {
6
6
  "encryptedGraphqlServiceConfig": {
7
7
  "title": "Encrypted GraphQL Service Config",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "http://json-schema.org/draft-07/schema#",
3
3
  "$id": "https://schema.takeshape.io/project-schema/v3.0.0#",
4
- "title": "Project Schema",
4
+ "title": "Project Schema JSON",
5
5
  "definitions": {
6
6
  "encryptedGraphqlServiceConfig": {
7
7
  "title": "Encrypted GraphQL Service Config",
@@ -204,7 +204,7 @@
204
204
  "required": ["default"]
205
205
  },
206
206
  "shape": {
207
- "title": "Shape",
207
+ "title": "Shape JSON",
208
208
  "type": "object",
209
209
  "properties": {
210
210
  "name": {