@takeshape/schema 11.40.0 → 11.41.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 (1418) hide show
  1. package/dist/cjs/package.json +1 -0
  2. package/dist/cjs/src/agents.js +58 -0
  3. package/dist/cjs/src/api-version.js +24 -0
  4. package/dist/cjs/src/auth-schemas.js +8 -0
  5. package/dist/cjs/src/builtin-schema.js +616 -0
  6. package/dist/cjs/src/constants.js +4 -0
  7. package/dist/cjs/src/content-schema-transform.js +175 -0
  8. package/dist/cjs/src/create-input-schema.js +67 -0
  9. package/dist/cjs/src/enum.js +13 -0
  10. package/dist/cjs/src/flatten-templates.js +27 -0
  11. package/dist/cjs/src/get-is-leaf.js +60 -0
  12. package/dist/cjs/src/index.js +60 -0
  13. package/dist/cjs/src/interfaces.js +97 -0
  14. package/dist/cjs/src/layers/layers.js +308 -0
  15. package/dist/cjs/src/layers/refs.js +243 -0
  16. package/dist/cjs/src/layers/type-utils.js +146 -0
  17. package/dist/cjs/src/layers/visitor.js +43 -0
  18. package/dist/cjs/src/migration/index.js +140 -0
  19. package/dist/cjs/src/migration/to/v3.0.0.js +205 -0
  20. package/dist/cjs/src/migration/to/v3.1.0.js +197 -0
  21. package/dist/cjs/src/migration/to/v3.10.0.js +72 -0
  22. package/dist/cjs/src/migration/to/v3.11.0.js +90 -0
  23. package/dist/cjs/src/migration/to/v3.12.0.js +12 -0
  24. package/dist/cjs/src/migration/to/v3.12.1.js +12 -0
  25. package/dist/cjs/src/migration/to/v3.12.2.js +12 -0
  26. package/dist/cjs/src/migration/to/v3.12.3.js +92 -0
  27. package/dist/cjs/src/migration/to/v3.13.0.js +22 -0
  28. package/dist/cjs/src/migration/to/v3.14.0.js +12 -0
  29. package/dist/cjs/src/migration/to/v3.15.0.js +12 -0
  30. package/dist/cjs/src/migration/to/v3.16.0.js +12 -0
  31. package/dist/cjs/src/migration/to/v3.17.0.js +27 -0
  32. package/dist/cjs/src/migration/to/v3.17.1.js +12 -0
  33. package/dist/cjs/src/migration/to/v3.18.0.js +69 -0
  34. package/dist/cjs/src/migration/to/v3.18.1.js +20 -0
  35. package/dist/cjs/src/migration/to/v3.18.2.js +24 -0
  36. package/dist/cjs/src/migration/to/v3.19.0.js +12 -0
  37. package/dist/cjs/src/migration/to/v3.2.0.js +12 -0
  38. package/dist/cjs/src/migration/to/v3.20.0.js +26 -0
  39. package/dist/cjs/src/migration/to/v3.21.0.js +12 -0
  40. package/dist/cjs/src/migration/to/v3.22.0.js +30 -0
  41. package/dist/cjs/src/migration/to/v3.23.0.js +12 -0
  42. package/dist/cjs/src/migration/to/v3.24.0.js +13 -0
  43. package/dist/cjs/src/migration/to/v3.25.0.js +13 -0
  44. package/dist/cjs/src/migration/to/v3.26.0.js +12 -0
  45. package/dist/cjs/src/migration/to/v3.27.0.js +12 -0
  46. package/dist/cjs/src/migration/to/v3.28.0.js +12 -0
  47. package/dist/cjs/src/migration/to/v3.29.0.js +12 -0
  48. package/dist/cjs/src/migration/to/v3.3.0.js +15 -0
  49. package/dist/cjs/src/migration/to/v3.30.0.js +12 -0
  50. package/dist/cjs/src/migration/to/v3.31.0.js +43 -0
  51. package/dist/cjs/src/migration/to/v3.32.0.js +59 -0
  52. package/dist/cjs/src/migration/to/v3.33.0.js +12 -0
  53. package/dist/cjs/src/migration/to/v3.34.0.js +127 -0
  54. package/dist/cjs/src/migration/to/v3.35.0.js +12 -0
  55. package/dist/cjs/src/migration/to/v3.36.0.js +27 -0
  56. package/dist/cjs/src/migration/to/v3.37.0.js +12 -0
  57. package/dist/cjs/src/migration/to/v3.38.0.js +12 -0
  58. package/dist/cjs/src/migration/to/v3.39.0.js +47 -0
  59. package/dist/cjs/src/migration/to/v3.4.0.js +12 -0
  60. package/dist/cjs/src/migration/to/v3.40.0.js +31 -0
  61. package/dist/cjs/src/migration/to/v3.41.0.js +12 -0
  62. package/dist/cjs/src/migration/to/v3.42.0.js +12 -0
  63. package/dist/cjs/src/migration/to/v3.43.0.js +12 -0
  64. package/dist/cjs/src/migration/to/v3.44.0.js +12 -0
  65. package/dist/cjs/src/migration/to/v3.45.0.js +12 -0
  66. package/dist/cjs/src/migration/to/v3.46.0.js +37 -0
  67. package/dist/cjs/src/migration/to/v3.47.0.js +12 -0
  68. package/dist/cjs/src/migration/to/v3.48.0.js +12 -0
  69. package/dist/cjs/src/migration/to/v3.49.0.js +12 -0
  70. package/dist/cjs/src/migration/to/v3.5.0.js +12 -0
  71. package/dist/cjs/src/migration/to/v3.5.1.js +12 -0
  72. package/dist/cjs/src/migration/to/v3.50.0.js +12 -0
  73. package/dist/cjs/src/migration/to/v3.6.0.js +12 -0
  74. package/dist/cjs/src/migration/to/v3.7.0.js +12 -0
  75. package/dist/cjs/src/migration/to/v3.8.0.js +12 -0
  76. package/dist/cjs/src/migration/to/v3.9.0.js +84 -0
  77. package/dist/cjs/src/migration/types.js +2 -0
  78. package/dist/cjs/src/migration/utils.js +11 -0
  79. package/dist/cjs/src/mocks.js +66 -0
  80. package/dist/cjs/src/models/project-schema.js +99 -0
  81. package/dist/cjs/src/models/query.js +35 -0
  82. package/dist/cjs/src/models/service.js +24 -0
  83. package/dist/cjs/src/models/shape.js +89 -0
  84. package/dist/cjs/src/patterns.js +2 -0
  85. package/dist/cjs/src/project-schema/index.js +154 -0
  86. package/dist/cjs/src/project-schema/latest.js +8 -0
  87. package/dist/cjs/src/project-schema/migrate.js +197 -0
  88. package/dist/cjs/src/project-schema/v1.0.0.js +8 -0
  89. package/dist/cjs/src/project-schema/v3.0.0.js +8 -0
  90. package/dist/cjs/src/project-schema/v3.1.0.js +8 -0
  91. package/dist/cjs/src/project-schema/v3.10.0.js +8 -0
  92. package/dist/cjs/src/project-schema/v3.11.0.js +8 -0
  93. package/dist/cjs/src/project-schema/v3.12.0.js +8 -0
  94. package/dist/cjs/src/project-schema/v3.12.1.js +8 -0
  95. package/dist/cjs/src/project-schema/v3.12.2.js +8 -0
  96. package/dist/cjs/src/project-schema/v3.12.3.js +8 -0
  97. package/dist/cjs/src/project-schema/v3.13.0.js +8 -0
  98. package/dist/cjs/src/project-schema/v3.13.1.js +8 -0
  99. package/dist/cjs/src/project-schema/v3.14.0.js +8 -0
  100. package/dist/cjs/src/project-schema/v3.15.0.js +8 -0
  101. package/dist/cjs/src/project-schema/v3.16.0.js +8 -0
  102. package/dist/cjs/src/project-schema/v3.17.0.js +8 -0
  103. package/dist/cjs/src/project-schema/v3.17.1.js +8 -0
  104. package/dist/cjs/src/project-schema/v3.18.0.js +8 -0
  105. package/dist/cjs/src/project-schema/v3.18.1.js +8 -0
  106. package/dist/cjs/src/project-schema/v3.18.2.js +8 -0
  107. package/dist/cjs/src/project-schema/v3.19.0.js +8 -0
  108. package/dist/cjs/src/project-schema/v3.2.0.js +8 -0
  109. package/dist/cjs/src/project-schema/v3.20.0.js +8 -0
  110. package/dist/cjs/src/project-schema/v3.21.0.js +8 -0
  111. package/dist/cjs/src/project-schema/v3.22.0.js +8 -0
  112. package/dist/cjs/src/project-schema/v3.23.0.js +8 -0
  113. package/dist/cjs/src/project-schema/v3.24.0.js +8 -0
  114. package/dist/cjs/src/project-schema/v3.25.0.js +8 -0
  115. package/dist/cjs/src/project-schema/v3.26.0.js +8 -0
  116. package/dist/cjs/src/project-schema/v3.27.0.js +8 -0
  117. package/dist/cjs/src/project-schema/v3.28.0.js +8 -0
  118. package/dist/cjs/src/project-schema/v3.29.0.js +8 -0
  119. package/dist/cjs/src/project-schema/v3.3.0.js +8 -0
  120. package/dist/cjs/src/project-schema/v3.30.0.js +8 -0
  121. package/dist/cjs/src/project-schema/v3.31.0.js +8 -0
  122. package/dist/cjs/src/project-schema/v3.32.0.js +8 -0
  123. package/dist/cjs/src/project-schema/v3.33.0.js +8 -0
  124. package/dist/cjs/src/project-schema/v3.34.0.js +8 -0
  125. package/dist/cjs/src/project-schema/v3.35.0.js +8 -0
  126. package/dist/cjs/src/project-schema/v3.36.0.js +8 -0
  127. package/dist/cjs/src/project-schema/v3.37.0.js +8 -0
  128. package/dist/cjs/src/project-schema/v3.38.0.js +8 -0
  129. package/dist/cjs/src/project-schema/v3.39.0.js +8 -0
  130. package/dist/cjs/src/project-schema/v3.4.0.js +8 -0
  131. package/dist/cjs/src/project-schema/v3.40.0.js +8 -0
  132. package/dist/cjs/src/project-schema/v3.41.0.js +8 -0
  133. package/dist/cjs/src/project-schema/v3.42.0.js +8 -0
  134. package/dist/cjs/src/project-schema/v3.43.0.js +8 -0
  135. package/dist/cjs/src/project-schema/v3.44.0.js +8 -0
  136. package/dist/cjs/src/project-schema/v3.45.0.js +8 -0
  137. package/dist/cjs/src/project-schema/v3.46.0.js +8 -0
  138. package/dist/cjs/src/project-schema/v3.47.0.js +8 -0
  139. package/dist/cjs/src/project-schema/v3.48.0.js +8 -0
  140. package/dist/cjs/src/project-schema/v3.49.0.js +8 -0
  141. package/dist/cjs/src/project-schema/v3.5.0.js +8 -0
  142. package/dist/cjs/src/project-schema/v3.5.1.js +8 -0
  143. package/dist/cjs/src/project-schema/v3.50.0.js +8 -0
  144. package/dist/cjs/src/project-schema/v3.6.0.js +8 -0
  145. package/dist/cjs/src/project-schema/v3.7.0.js +8 -0
  146. package/dist/cjs/src/project-schema/v3.8.0.js +8 -0
  147. package/dist/cjs/src/project-schema/v3.9.0.js +8 -0
  148. package/dist/cjs/src/project-schema/v4.0.0.js +8 -0
  149. package/dist/cjs/src/refs.js +662 -0
  150. package/dist/cjs/src/relationships.js +237 -0
  151. package/dist/cjs/src/scalars.js +8 -0
  152. package/dist/cjs/src/schema-transform.js +83 -0
  153. package/dist/cjs/src/schema-util.js +1133 -0
  154. package/dist/cjs/src/schemas/index.js +164 -0
  155. package/dist/cjs/src/services/services.js +156 -0
  156. package/dist/cjs/src/services/types.js +2 -0
  157. package/dist/cjs/src/services/util.js +46 -0
  158. package/dist/cjs/src/taxonomies.js +28 -0
  159. package/dist/cjs/src/template-shapes/index.js +38 -0
  160. package/dist/cjs/src/template-shapes/names.js +27 -0
  161. package/dist/cjs/src/template-shapes/templates.js +325 -0
  162. package/dist/cjs/src/template-shapes/types.js +10 -0
  163. package/dist/cjs/src/template-shapes/where.js +403 -0
  164. package/dist/cjs/src/types/index.js +19 -0
  165. package/dist/cjs/src/types/transforms.js +2 -0
  166. package/dist/cjs/src/types/types.js +21 -0
  167. package/dist/cjs/src/types/utils.js +345 -0
  168. package/dist/cjs/src/unions.js +90 -0
  169. package/dist/cjs/src/user-schema.js +8 -0
  170. package/dist/cjs/src/util/ai-tools.js +11 -0
  171. package/dist/cjs/src/util/api-indexing.js +62 -0
  172. package/dist/cjs/src/util/detect-cycles.js +49 -0
  173. package/dist/cjs/src/util/find-shape-at-path.js +58 -0
  174. package/dist/cjs/src/util/form-config.js +68 -0
  175. package/dist/cjs/src/util/get-conflicting-properties.js +59 -0
  176. package/dist/cjs/src/util/get-return-shape.js +35 -0
  177. package/dist/cjs/src/util/has-arg.js +18 -0
  178. package/dist/cjs/src/util/merge.js +261 -0
  179. package/dist/cjs/src/util/patch-schema.js +50 -0
  180. package/dist/cjs/src/util/shapes.js +32 -0
  181. package/dist/cjs/src/validate.js +1087 -0
  182. package/dist/cjs/src/versions.js +8 -0
  183. package/dist/cjs/src/workflows.js +76 -0
  184. package/dist/esm/package.json +1 -0
  185. package/dist/esm/src/agents.js +49 -0
  186. package/dist/esm/src/api-version.js +17 -0
  187. package/dist/esm/src/auth-schemas.js +7 -0
  188. package/dist/esm/src/builtin-schema.js +610 -0
  189. package/dist/esm/src/constants.js +1 -0
  190. package/dist/esm/src/content-schema-transform.js +162 -0
  191. package/dist/esm/src/create-input-schema.js +60 -0
  192. package/dist/esm/src/enum.js +9 -0
  193. package/dist/esm/src/flatten-templates.js +20 -0
  194. package/dist/esm/src/get-is-leaf.js +56 -0
  195. package/dist/esm/src/index.js +44 -0
  196. package/dist/esm/src/interfaces.js +83 -0
  197. package/dist/esm/src/layers/layers.js +295 -0
  198. package/dist/esm/src/layers/refs.js +220 -0
  199. package/dist/esm/src/layers/type-utils.js +118 -0
  200. package/dist/esm/src/layers/visitor.js +38 -0
  201. package/dist/esm/src/migration/index.js +120 -0
  202. package/dist/esm/src/migration/to/v3.0.0.js +200 -0
  203. package/dist/esm/src/migration/to/v3.1.0.js +192 -0
  204. package/dist/esm/src/migration/to/v3.10.0.js +67 -0
  205. package/dist/esm/src/migration/to/v3.11.0.js +85 -0
  206. package/dist/esm/src/migration/to/v3.12.0.js +10 -0
  207. package/dist/esm/src/migration/to/v3.12.1.js +10 -0
  208. package/dist/esm/src/migration/to/v3.12.2.js +10 -0
  209. package/dist/esm/src/migration/to/v3.12.3.js +87 -0
  210. package/dist/esm/src/migration/to/v3.13.0.js +17 -0
  211. package/dist/esm/src/migration/to/v3.14.0.js +10 -0
  212. package/dist/esm/src/migration/to/v3.15.0.js +10 -0
  213. package/dist/esm/src/migration/to/v3.16.0.js +10 -0
  214. package/dist/esm/src/migration/to/v3.17.0.js +22 -0
  215. package/dist/esm/src/migration/to/v3.17.1.js +10 -0
  216. package/dist/esm/src/migration/to/v3.18.0.js +64 -0
  217. package/dist/esm/src/migration/to/v3.18.1.js +15 -0
  218. package/dist/esm/src/migration/to/v3.18.2.js +19 -0
  219. package/dist/esm/src/migration/to/v3.19.0.js +10 -0
  220. package/dist/esm/src/migration/to/v3.2.0.js +10 -0
  221. package/dist/esm/src/migration/to/v3.20.0.js +21 -0
  222. package/dist/esm/src/migration/to/v3.21.0.js +10 -0
  223. package/dist/esm/src/migration/to/v3.22.0.js +25 -0
  224. package/dist/esm/src/migration/to/v3.23.0.js +10 -0
  225. package/dist/esm/src/migration/to/v3.24.0.js +11 -0
  226. package/dist/esm/src/migration/to/v3.25.0.js +11 -0
  227. package/dist/esm/src/migration/to/v3.26.0.js +10 -0
  228. package/dist/esm/src/migration/to/v3.27.0.js +10 -0
  229. package/dist/esm/src/migration/to/v3.28.0.js +10 -0
  230. package/dist/esm/src/migration/to/v3.29.0.js +10 -0
  231. package/dist/esm/src/migration/to/v3.3.0.js +13 -0
  232. package/dist/esm/src/migration/to/v3.30.0.js +10 -0
  233. package/dist/esm/src/migration/to/v3.31.0.js +38 -0
  234. package/dist/esm/src/migration/to/v3.32.0.js +57 -0
  235. package/dist/esm/src/migration/to/v3.33.0.js +10 -0
  236. package/dist/esm/src/migration/to/v3.34.0.js +119 -0
  237. package/dist/esm/src/migration/to/v3.35.0.js +10 -0
  238. package/dist/esm/src/migration/to/v3.36.0.js +22 -0
  239. package/dist/esm/src/migration/to/v3.37.0.js +10 -0
  240. package/dist/esm/src/migration/to/v3.38.0.js +10 -0
  241. package/dist/esm/src/migration/to/v3.39.0.js +45 -0
  242. package/dist/esm/src/migration/to/v3.4.0.js +10 -0
  243. package/dist/esm/src/migration/to/v3.40.0.js +26 -0
  244. package/dist/esm/src/migration/to/v3.41.0.js +10 -0
  245. package/dist/esm/src/migration/to/v3.42.0.js +10 -0
  246. package/dist/esm/src/migration/to/v3.43.0.js +10 -0
  247. package/dist/esm/src/migration/to/v3.44.0.js +10 -0
  248. package/dist/esm/src/migration/to/v3.45.0.js +10 -0
  249. package/dist/esm/src/migration/to/v3.46.0.js +35 -0
  250. package/dist/esm/src/migration/to/v3.47.0.js +10 -0
  251. package/dist/esm/src/migration/to/v3.48.0.js +10 -0
  252. package/dist/esm/src/migration/to/v3.49.0.js +10 -0
  253. package/dist/esm/src/migration/to/v3.5.0.js +10 -0
  254. package/dist/esm/src/migration/to/v3.5.1.js +10 -0
  255. package/dist/esm/src/migration/to/v3.50.0.js +10 -0
  256. package/dist/esm/src/migration/to/v3.6.0.js +10 -0
  257. package/dist/esm/src/migration/to/v3.7.0.js +10 -0
  258. package/dist/esm/src/migration/to/v3.8.0.js +10 -0
  259. package/dist/esm/src/migration/to/v3.9.0.js +79 -0
  260. package/dist/esm/src/migration/types.js +1 -0
  261. package/dist/esm/src/migration/utils.js +6 -0
  262. package/dist/esm/src/mocks.js +58 -0
  263. package/dist/esm/src/models/project-schema.js +92 -0
  264. package/dist/esm/src/models/query.js +31 -0
  265. package/dist/esm/src/models/service.js +20 -0
  266. package/dist/esm/src/models/shape.js +85 -0
  267. package/dist/esm/src/patterns.js +1 -0
  268. package/dist/esm/src/project-schema/index.js +136 -0
  269. package/dist/esm/src/project-schema/latest.js +7 -0
  270. package/dist/esm/src/project-schema/migrate.js +192 -0
  271. package/dist/esm/src/project-schema/v1.0.0.js +7 -0
  272. package/dist/esm/src/project-schema/v3.0.0.js +7 -0
  273. package/dist/esm/src/project-schema/v3.1.0.js +7 -0
  274. package/dist/esm/src/project-schema/v3.10.0.js +7 -0
  275. package/dist/esm/src/project-schema/v3.11.0.js +7 -0
  276. package/dist/esm/src/project-schema/v3.12.0.js +7 -0
  277. package/dist/esm/src/project-schema/v3.12.1.js +7 -0
  278. package/dist/esm/src/project-schema/v3.12.2.js +7 -0
  279. package/dist/esm/src/project-schema/v3.12.3.js +7 -0
  280. package/dist/esm/src/project-schema/v3.13.0.js +7 -0
  281. package/dist/esm/src/project-schema/v3.13.1.js +7 -0
  282. package/dist/esm/src/project-schema/v3.14.0.js +7 -0
  283. package/dist/esm/src/project-schema/v3.15.0.js +7 -0
  284. package/dist/esm/src/project-schema/v3.16.0.js +7 -0
  285. package/dist/esm/src/project-schema/v3.17.0.js +7 -0
  286. package/dist/esm/src/project-schema/v3.17.1.js +7 -0
  287. package/dist/esm/src/project-schema/v3.18.0.js +7 -0
  288. package/dist/esm/src/project-schema/v3.18.1.js +7 -0
  289. package/dist/esm/src/project-schema/v3.18.2.js +7 -0
  290. package/dist/esm/src/project-schema/v3.19.0.js +7 -0
  291. package/dist/esm/src/project-schema/v3.2.0.js +7 -0
  292. package/dist/esm/src/project-schema/v3.20.0.js +7 -0
  293. package/dist/esm/src/project-schema/v3.21.0.js +7 -0
  294. package/dist/esm/src/project-schema/v3.22.0.js +7 -0
  295. package/dist/esm/src/project-schema/v3.23.0.js +7 -0
  296. package/dist/esm/src/project-schema/v3.24.0.js +7 -0
  297. package/dist/esm/src/project-schema/v3.25.0.js +7 -0
  298. package/dist/esm/src/project-schema/v3.26.0.js +7 -0
  299. package/dist/esm/src/project-schema/v3.27.0.js +7 -0
  300. package/dist/esm/src/project-schema/v3.28.0.js +7 -0
  301. package/dist/esm/src/project-schema/v3.29.0.js +7 -0
  302. package/dist/esm/src/project-schema/v3.3.0.js +7 -0
  303. package/dist/esm/src/project-schema/v3.30.0.js +7 -0
  304. package/dist/esm/src/project-schema/v3.31.0.js +7 -0
  305. package/dist/esm/src/project-schema/v3.32.0.js +7 -0
  306. package/dist/esm/src/project-schema/v3.33.0.js +7 -0
  307. package/dist/esm/src/project-schema/v3.34.0.js +7 -0
  308. package/dist/esm/src/project-schema/v3.35.0.js +7 -0
  309. package/dist/esm/src/project-schema/v3.36.0.js +7 -0
  310. package/dist/esm/src/project-schema/v3.37.0.js +7 -0
  311. package/dist/esm/src/project-schema/v3.38.0.js +7 -0
  312. package/dist/esm/src/project-schema/v3.39.0.js +7 -0
  313. package/dist/esm/src/project-schema/v3.4.0.js +7 -0
  314. package/dist/esm/src/project-schema/v3.40.0.js +7 -0
  315. package/dist/esm/src/project-schema/v3.41.0.js +7 -0
  316. package/dist/esm/src/project-schema/v3.42.0.js +7 -0
  317. package/dist/esm/src/project-schema/v3.43.0.js +7 -0
  318. package/dist/esm/src/project-schema/v3.44.0.js +7 -0
  319. package/dist/esm/src/project-schema/v3.45.0.js +7 -0
  320. package/dist/esm/src/project-schema/v3.46.0.js +7 -0
  321. package/dist/esm/src/project-schema/v3.47.0.js +7 -0
  322. package/dist/esm/src/project-schema/v3.48.0.js +7 -0
  323. package/dist/esm/src/project-schema/v3.49.0.js +7 -0
  324. package/dist/esm/src/project-schema/v3.5.0.js +7 -0
  325. package/dist/esm/src/project-schema/v3.5.1.js +7 -0
  326. package/dist/esm/src/project-schema/v3.50.0.js +7 -0
  327. package/dist/esm/src/project-schema/v3.6.0.js +7 -0
  328. package/dist/esm/src/project-schema/v3.7.0.js +7 -0
  329. package/dist/esm/src/project-schema/v3.8.0.js +7 -0
  330. package/dist/esm/src/project-schema/v3.9.0.js +7 -0
  331. package/dist/esm/src/project-schema/v4.0.0.js +7 -0
  332. package/dist/esm/src/refs.js +598 -0
  333. package/dist/esm/src/relationships.js +222 -0
  334. package/dist/esm/src/scalars.js +4 -0
  335. package/dist/esm/src/schema-transform.js +74 -0
  336. package/dist/esm/src/schema-util.js +1069 -0
  337. package/dist/esm/src/schemas/index.js +154 -0
  338. package/dist/esm/src/services/services.js +144 -0
  339. package/dist/esm/src/services/types.js +1 -0
  340. package/dist/esm/src/services/util.js +36 -0
  341. package/dist/esm/src/taxonomies.js +24 -0
  342. package/dist/esm/src/template-shapes/index.js +33 -0
  343. package/dist/esm/src/template-shapes/names.js +21 -0
  344. package/dist/esm/src/template-shapes/templates.js +313 -0
  345. package/dist/esm/src/template-shapes/types.js +7 -0
  346. package/dist/esm/src/template-shapes/where.js +391 -0
  347. package/dist/esm/src/types/index.js +3 -0
  348. package/dist/esm/src/types/transforms.js +1 -0
  349. package/dist/esm/src/types/types.js +18 -0
  350. package/dist/esm/src/types/utils.js +279 -0
  351. package/dist/esm/src/unions.js +79 -0
  352. package/dist/esm/src/user-schema.js +7 -0
  353. package/dist/esm/src/util/ai-tools.js +6 -0
  354. package/dist/esm/src/util/api-indexing.js +57 -0
  355. package/dist/esm/src/util/detect-cycles.js +45 -0
  356. package/dist/esm/src/util/find-shape-at-path.js +53 -0
  357. package/dist/esm/src/util/form-config.js +63 -0
  358. package/dist/esm/src/util/get-conflicting-properties.js +55 -0
  359. package/dist/esm/src/util/get-return-shape.js +30 -0
  360. package/dist/esm/src/util/has-arg.js +13 -0
  361. package/dist/esm/src/util/merge.js +247 -0
  362. package/dist/esm/src/util/patch-schema.js +42 -0
  363. package/dist/esm/src/util/shapes.js +22 -0
  364. package/dist/esm/src/validate.js +1073 -0
  365. package/dist/esm/src/versions.js +4 -0
  366. package/dist/esm/src/workflows.js +66 -0
  367. package/dist/types/src/agents.d.ts +11 -0
  368. package/dist/types/src/api-version.d.ts +5 -0
  369. package/dist/types/src/auth-schemas.d.ts +104 -0
  370. package/dist/types/src/builtin-schema.d.ts +8 -0
  371. package/dist/types/src/constants.d.ts +1 -0
  372. package/dist/types/src/content-schema-transform.d.ts +35 -0
  373. package/dist/types/src/create-input-schema.d.ts +9 -0
  374. package/dist/types/src/enum.d.ts +2 -0
  375. package/dist/types/src/flatten-templates.d.ts +2 -0
  376. package/dist/types/src/get-is-leaf.d.ts +3 -0
  377. package/dist/types/src/index.d.ts +46 -0
  378. package/dist/types/src/interfaces.d.ts +12 -0
  379. package/dist/types/src/layers/layers.d.ts +26 -0
  380. package/dist/types/src/layers/refs.d.ts +103 -0
  381. package/dist/types/src/layers/type-utils.d.ts +59 -0
  382. package/dist/types/src/layers/visitor.d.ts +5 -0
  383. package/dist/types/src/migration/index.d.ts +63 -0
  384. package/dist/types/src/migration/to/v3.0.0.d.ts +4 -0
  385. package/dist/types/src/migration/to/v3.1.0.d.ts +4 -0
  386. package/dist/types/src/migration/to/v3.10.0.d.ts +4 -0
  387. package/dist/types/src/migration/to/v3.11.0.d.ts +4 -0
  388. package/dist/types/src/migration/to/v3.12.0.d.ts +4 -0
  389. package/dist/types/src/migration/to/v3.12.1.d.ts +4 -0
  390. package/dist/types/src/migration/to/v3.12.2.d.ts +4 -0
  391. package/dist/types/src/migration/to/v3.12.3.d.ts +4 -0
  392. package/dist/types/src/migration/to/v3.13.0.d.ts +4 -0
  393. package/dist/types/src/migration/to/v3.14.0.d.ts +4 -0
  394. package/dist/types/src/migration/to/v3.15.0.d.ts +4 -0
  395. package/dist/types/src/migration/to/v3.16.0.d.ts +4 -0
  396. package/dist/types/src/migration/to/v3.17.0.d.ts +4 -0
  397. package/dist/types/src/migration/to/v3.17.1.d.ts +4 -0
  398. package/dist/types/src/migration/to/v3.18.0.d.ts +4 -0
  399. package/dist/types/src/migration/to/v3.18.1.d.ts +4 -0
  400. package/dist/types/src/migration/to/v3.18.2.d.ts +4 -0
  401. package/dist/types/src/migration/to/v3.19.0.d.ts +4 -0
  402. package/dist/types/src/migration/to/v3.2.0.d.ts +4 -0
  403. package/dist/types/src/migration/to/v3.20.0.d.ts +4 -0
  404. package/dist/types/src/migration/to/v3.21.0.d.ts +4 -0
  405. package/dist/types/src/migration/to/v3.22.0.d.ts +4 -0
  406. package/dist/types/src/migration/to/v3.23.0.d.ts +4 -0
  407. package/dist/types/src/migration/to/v3.24.0.d.ts +4 -0
  408. package/dist/types/src/migration/to/v3.25.0.d.ts +4 -0
  409. package/dist/types/src/migration/to/v3.26.0.d.ts +4 -0
  410. package/dist/types/src/migration/to/v3.27.0.d.ts +4 -0
  411. package/dist/types/src/migration/to/v3.28.0.d.ts +4 -0
  412. package/dist/types/src/migration/to/v3.29.0.d.ts +4 -0
  413. package/dist/types/src/migration/to/v3.3.0.d.ts +4 -0
  414. package/dist/types/src/migration/to/v3.30.0.d.ts +4 -0
  415. package/dist/types/src/migration/to/v3.31.0.d.ts +4 -0
  416. package/dist/types/src/migration/to/v3.32.0.d.ts +4 -0
  417. package/dist/types/src/migration/to/v3.33.0.d.ts +4 -0
  418. package/dist/types/src/migration/to/v3.34.0.d.ts +6 -0
  419. package/dist/types/src/migration/to/v3.35.0.d.ts +4 -0
  420. package/dist/types/src/migration/to/v3.36.0.d.ts +4 -0
  421. package/dist/types/src/migration/to/v3.37.0.d.ts +4 -0
  422. package/dist/types/src/migration/to/v3.38.0.d.ts +4 -0
  423. package/dist/types/src/migration/to/v3.39.0.d.ts +4 -0
  424. package/dist/types/src/migration/to/v3.4.0.d.ts +4 -0
  425. package/dist/types/src/migration/to/v3.40.0.d.ts +4 -0
  426. package/dist/types/src/migration/to/v3.41.0.d.ts +4 -0
  427. package/dist/types/src/migration/to/v3.42.0.d.ts +4 -0
  428. package/dist/types/src/migration/to/v3.43.0.d.ts +4 -0
  429. package/dist/types/src/migration/to/v3.44.0.d.ts +4 -0
  430. package/dist/types/src/migration/to/v3.45.0.d.ts +4 -0
  431. package/dist/types/src/migration/to/v3.46.0.d.ts +4 -0
  432. package/dist/types/src/migration/to/v3.47.0.d.ts +4 -0
  433. package/dist/types/src/migration/to/v3.48.0.d.ts +4 -0
  434. package/dist/types/src/migration/to/v3.49.0.d.ts +4 -0
  435. package/dist/types/src/migration/to/v3.5.0.d.ts +4 -0
  436. package/dist/types/src/migration/to/v3.5.1.d.ts +4 -0
  437. package/dist/types/src/migration/to/v3.50.0.d.ts +4 -0
  438. package/dist/types/src/migration/to/v3.6.0.d.ts +4 -0
  439. package/dist/types/src/migration/to/v3.7.0.d.ts +4 -0
  440. package/dist/types/src/migration/to/v3.8.0.d.ts +4 -0
  441. package/dist/types/src/migration/to/v3.9.0.d.ts +4 -0
  442. package/dist/types/src/migration/types.d.ts +20 -0
  443. package/dist/types/src/migration/utils.d.ts +2 -0
  444. package/dist/types/src/mocks.d.ts +13 -0
  445. package/dist/types/src/models/project-schema.d.ts +35 -0
  446. package/dist/types/src/models/query.d.ts +17 -0
  447. package/dist/types/src/models/service.d.ts +12 -0
  448. package/dist/types/src/models/shape.d.ts +41 -0
  449. package/dist/types/src/patterns.d.ts +12 -0
  450. package/dist/types/src/project-schema/index.d.ts +184 -0
  451. package/dist/types/src/project-schema/latest.d.ts +2032 -0
  452. package/dist/types/src/project-schema/migrate.d.ts +4 -0
  453. package/dist/types/src/project-schema/v1.0.0.d.ts +299 -0
  454. package/dist/types/src/project-schema/v3.0.0.d.ts +478 -0
  455. package/dist/types/src/project-schema/v3.1.0.d.ts +621 -0
  456. package/dist/types/src/project-schema/v3.10.0.d.ts +1201 -0
  457. package/dist/types/src/project-schema/v3.11.0.d.ts +1210 -0
  458. package/dist/types/src/project-schema/v3.12.0.d.ts +1214 -0
  459. package/dist/types/src/project-schema/v3.12.1.d.ts +1273 -0
  460. package/dist/types/src/project-schema/v3.12.2.d.ts +1283 -0
  461. package/dist/types/src/project-schema/v3.12.3.d.ts +1306 -0
  462. package/dist/types/src/project-schema/v3.13.0.d.ts +1317 -0
  463. package/dist/types/src/project-schema/v3.13.1.d.ts +1412 -0
  464. package/dist/types/src/project-schema/v3.14.0.d.ts +1436 -0
  465. package/dist/types/src/project-schema/v3.15.0.d.ts +1458 -0
  466. package/dist/types/src/project-schema/v3.16.0.d.ts +1470 -0
  467. package/dist/types/src/project-schema/v3.17.0.d.ts +1467 -0
  468. package/dist/types/src/project-schema/v3.17.1.d.ts +1468 -0
  469. package/dist/types/src/project-schema/v3.18.0.d.ts +1333 -0
  470. package/dist/types/src/project-schema/v3.18.1.d.ts +1332 -0
  471. package/dist/types/src/project-schema/v3.18.2.d.ts +1332 -0
  472. package/dist/types/src/project-schema/v3.19.0.d.ts +1336 -0
  473. package/dist/types/src/project-schema/v3.2.0.d.ts +632 -0
  474. package/dist/types/src/project-schema/v3.20.0.d.ts +1336 -0
  475. package/dist/types/src/project-schema/v3.21.0.d.ts +1338 -0
  476. package/dist/types/src/project-schema/v3.22.0.d.ts +1344 -0
  477. package/dist/types/src/project-schema/v3.23.0.d.ts +1376 -0
  478. package/dist/types/src/project-schema/v3.24.0.d.ts +1364 -0
  479. package/dist/types/src/project-schema/v3.25.0.d.ts +1363 -0
  480. package/dist/types/src/project-schema/v3.26.0.d.ts +1388 -0
  481. package/dist/types/src/project-schema/v3.27.0.d.ts +1397 -0
  482. package/dist/types/src/project-schema/v3.28.0.d.ts +1416 -0
  483. package/dist/types/src/project-schema/v3.29.0.d.ts +1423 -0
  484. package/dist/types/src/project-schema/v3.3.0.d.ts +632 -0
  485. package/dist/types/src/project-schema/v3.30.0.d.ts +1416 -0
  486. package/dist/types/src/project-schema/v3.31.0.d.ts +1448 -0
  487. package/dist/types/src/project-schema/v3.32.0.d.ts +1439 -0
  488. package/dist/types/src/project-schema/v3.33.0.d.ts +1445 -0
  489. package/dist/types/src/project-schema/v3.34.0.d.ts +1445 -0
  490. package/dist/types/src/project-schema/v3.35.0.d.ts +1464 -0
  491. package/dist/types/src/project-schema/v3.36.0.d.ts +1470 -0
  492. package/dist/types/src/project-schema/v3.37.0.d.ts +1522 -0
  493. package/dist/types/src/project-schema/v3.38.0.d.ts +1522 -0
  494. package/dist/types/src/project-schema/v3.39.0.d.ts +1529 -0
  495. package/dist/types/src/project-schema/v3.4.0.d.ts +624 -0
  496. package/dist/types/src/project-schema/v3.40.0.d.ts +1530 -0
  497. package/dist/types/src/project-schema/v3.41.0.d.ts +1530 -0
  498. package/dist/types/src/project-schema/v3.42.0.d.ts +1534 -0
  499. package/dist/types/src/project-schema/v3.43.0.d.ts +1536 -0
  500. package/dist/types/src/project-schema/v3.44.0.d.ts +1621 -0
  501. package/dist/types/src/project-schema/v3.45.0.d.ts +1650 -0
  502. package/dist/types/src/project-schema/v3.46.0.d.ts +1703 -0
  503. package/dist/types/src/project-schema/v3.47.0.d.ts +1736 -0
  504. package/dist/types/src/project-schema/v3.48.0.d.ts +1989 -0
  505. package/dist/types/src/project-schema/v3.49.0.d.ts +1998 -0
  506. package/dist/types/src/project-schema/v3.5.0.d.ts +649 -0
  507. package/dist/types/src/project-schema/v3.5.1.d.ts +649 -0
  508. package/dist/types/src/project-schema/v3.50.0.d.ts +2032 -0
  509. package/dist/types/src/project-schema/v3.6.0.d.ts +658 -0
  510. package/dist/types/src/project-schema/v3.7.0.d.ts +961 -0
  511. package/dist/types/src/project-schema/v3.8.0.d.ts +979 -0
  512. package/dist/types/src/project-schema/v3.9.0.d.ts +1178 -0
  513. package/dist/types/src/project-schema/v4.0.0.d.ts +1328 -0
  514. package/dist/types/src/refs.d.ts +227 -0
  515. package/dist/types/src/relationships.d.ts +36 -0
  516. package/dist/types/src/scalars.d.ts +2 -0
  517. package/dist/types/src/schema-transform.d.ts +19 -0
  518. package/dist/types/src/schema-util.d.ts +211 -0
  519. package/dist/types/src/schemas/index.d.ts +6 -0
  520. package/dist/types/src/services/services.d.ts +31 -0
  521. package/dist/types/src/services/types.d.ts +11 -0
  522. package/dist/types/src/services/util.d.ts +16 -0
  523. package/dist/types/src/taxonomies.d.ts +15 -0
  524. package/dist/types/src/template-shapes/index.d.ts +7 -0
  525. package/dist/types/src/template-shapes/names.d.ts +10 -0
  526. package/dist/types/src/template-shapes/templates.d.ts +32 -0
  527. package/dist/types/src/template-shapes/types.d.ts +15 -0
  528. package/dist/types/src/template-shapes/where.d.ts +37 -0
  529. package/dist/types/src/types/index.d.ts +3 -0
  530. package/dist/types/src/types/transforms.d.ts +13 -0
  531. package/dist/types/src/types/types.d.ts +210 -0
  532. package/dist/types/src/types/utils.d.ts +117 -0
  533. package/dist/types/src/unions.d.ts +14 -0
  534. package/dist/types/src/user-schema.d.ts +38 -0
  535. package/dist/types/src/util/ai-tools.d.ts +3 -0
  536. package/dist/types/src/util/api-indexing.d.ts +9 -0
  537. package/dist/types/src/util/detect-cycles.d.ts +7 -0
  538. package/dist/types/src/util/find-shape-at-path.d.ts +21 -0
  539. package/dist/types/src/util/form-config.d.ts +11 -0
  540. package/dist/types/src/util/get-conflicting-properties.d.ts +6 -0
  541. package/dist/types/src/util/get-return-shape.d.ts +4 -0
  542. package/dist/types/src/util/has-arg.d.ts +4 -0
  543. package/dist/types/src/util/merge.d.ts +15 -0
  544. package/dist/types/src/util/patch-schema.d.ts +8 -0
  545. package/dist/types/src/util/shapes.d.ts +5 -0
  546. package/dist/types/src/validate.d.ts +70 -0
  547. package/dist/types/src/versions.d.ts +4 -0
  548. package/dist/types/src/workflows.d.ts +14 -0
  549. package/dist/types/tsconfig.types.tsbuildinfo +1 -0
  550. package/package.json +47 -23
  551. package/dist/agents.d.ts +0 -12
  552. package/dist/agents.d.ts.map +0 -1
  553. package/dist/agents.js +0 -61
  554. package/dist/api-version.d.ts +0 -6
  555. package/dist/api-version.d.ts.map +0 -1
  556. package/dist/api-version.js +0 -25
  557. package/dist/auth-schemas.d.ts +0 -105
  558. package/dist/auth-schemas.d.ts.map +0 -1
  559. package/dist/auth-schemas.js +0 -5
  560. package/dist/builtin-schema.d.ts +0 -9
  561. package/dist/builtin-schema.d.ts.map +0 -1
  562. package/dist/builtin-schema.js +0 -681
  563. package/dist/content-schema-transform.d.ts +0 -48
  564. package/dist/content-schema-transform.d.ts.map +0 -1
  565. package/dist/content-schema-transform.js +0 -207
  566. package/dist/create-input-schema.d.ts +0 -10
  567. package/dist/create-input-schema.d.ts.map +0 -1
  568. package/dist/create-input-schema.js +0 -74
  569. package/dist/enum.d.ts +0 -3
  570. package/dist/enum.d.ts.map +0 -1
  571. package/dist/enum.js +0 -15
  572. package/dist/flatten-templates.d.ts +0 -3
  573. package/dist/flatten-templates.d.ts.map +0 -1
  574. package/dist/flatten-templates.js +0 -30
  575. package/dist/get-is-leaf.d.ts +0 -4
  576. package/dist/get-is-leaf.d.ts.map +0 -1
  577. package/dist/get-is-leaf.js +0 -58
  578. package/dist/index.d.ts +0 -33
  579. package/dist/index.d.ts.map +0 -1
  580. package/dist/index.js +0 -335
  581. package/dist/interfaces.d.ts +0 -13
  582. package/dist/interfaces.d.ts.map +0 -1
  583. package/dist/interfaces.js +0 -99
  584. package/dist/layers/layers.d.ts +0 -27
  585. package/dist/layers/layers.d.ts.map +0 -1
  586. package/dist/layers/layers.js +0 -324
  587. package/dist/layers/refs.d.ts +0 -104
  588. package/dist/layers/refs.d.ts.map +0 -1
  589. package/dist/layers/refs.js +0 -279
  590. package/dist/layers/type-utils.d.ts +0 -60
  591. package/dist/layers/type-utils.d.ts.map +0 -1
  592. package/dist/layers/type-utils.js +0 -166
  593. package/dist/layers/visitor.d.ts +0 -6
  594. package/dist/layers/visitor.d.ts.map +0 -1
  595. package/dist/layers/visitor.js +0 -42
  596. package/dist/migration/index.d.ts +0 -64
  597. package/dist/migration/index.d.ts.map +0 -1
  598. package/dist/migration/index.js +0 -142
  599. package/dist/migration/to/utils/v3.34.0-utils.d.ts +0 -1
  600. package/dist/migration/to/utils/v3.34.0-utils.d.ts.map +0 -1
  601. package/dist/migration/to/utils/v3.34.0-utils.js +0 -1
  602. package/dist/migration/to/v3.0.0.d.ts +0 -5
  603. package/dist/migration/to/v3.0.0.d.ts.map +0 -1
  604. package/dist/migration/to/v3.0.0.js +0 -263
  605. package/dist/migration/to/v3.1.0.d.ts +0 -5
  606. package/dist/migration/to/v3.1.0.d.ts.map +0 -1
  607. package/dist/migration/to/v3.1.0.js +0 -206
  608. package/dist/migration/to/v3.10.0.d.ts +0 -5
  609. package/dist/migration/to/v3.10.0.d.ts.map +0 -1
  610. package/dist/migration/to/v3.10.0.js +0 -91
  611. package/dist/migration/to/v3.11.0.d.ts +0 -5
  612. package/dist/migration/to/v3.11.0.d.ts.map +0 -1
  613. package/dist/migration/to/v3.11.0.js +0 -97
  614. package/dist/migration/to/v3.12.0.d.ts +0 -5
  615. package/dist/migration/to/v3.12.0.d.ts.map +0 -1
  616. package/dist/migration/to/v3.12.0.js +0 -16
  617. package/dist/migration/to/v3.12.1.d.ts +0 -5
  618. package/dist/migration/to/v3.12.1.d.ts.map +0 -1
  619. package/dist/migration/to/v3.12.1.js +0 -16
  620. package/dist/migration/to/v3.12.2.d.ts +0 -5
  621. package/dist/migration/to/v3.12.2.d.ts.map +0 -1
  622. package/dist/migration/to/v3.12.2.js +0 -16
  623. package/dist/migration/to/v3.12.3.d.ts +0 -5
  624. package/dist/migration/to/v3.12.3.d.ts.map +0 -1
  625. package/dist/migration/to/v3.12.3.js +0 -83
  626. package/dist/migration/to/v3.13.0.d.ts +0 -5
  627. package/dist/migration/to/v3.13.0.d.ts.map +0 -1
  628. package/dist/migration/to/v3.13.0.js +0 -26
  629. package/dist/migration/to/v3.14.0.d.ts +0 -5
  630. package/dist/migration/to/v3.14.0.d.ts.map +0 -1
  631. package/dist/migration/to/v3.14.0.js +0 -16
  632. package/dist/migration/to/v3.15.0.d.ts +0 -5
  633. package/dist/migration/to/v3.15.0.d.ts.map +0 -1
  634. package/dist/migration/to/v3.15.0.js +0 -16
  635. package/dist/migration/to/v3.16.0.d.ts +0 -5
  636. package/dist/migration/to/v3.16.0.d.ts.map +0 -1
  637. package/dist/migration/to/v3.16.0.js +0 -16
  638. package/dist/migration/to/v3.17.0.d.ts +0 -5
  639. package/dist/migration/to/v3.17.0.d.ts.map +0 -1
  640. package/dist/migration/to/v3.17.0.js +0 -34
  641. package/dist/migration/to/v3.17.1.d.ts +0 -5
  642. package/dist/migration/to/v3.17.1.d.ts.map +0 -1
  643. package/dist/migration/to/v3.17.1.js +0 -16
  644. package/dist/migration/to/v3.18.0.d.ts +0 -5
  645. package/dist/migration/to/v3.18.0.d.ts.map +0 -1
  646. package/dist/migration/to/v3.18.0.js +0 -71
  647. package/dist/migration/to/v3.18.1.d.ts +0 -5
  648. package/dist/migration/to/v3.18.1.d.ts.map +0 -1
  649. package/dist/migration/to/v3.18.1.js +0 -22
  650. package/dist/migration/to/v3.18.2.d.ts +0 -5
  651. package/dist/migration/to/v3.18.2.d.ts.map +0 -1
  652. package/dist/migration/to/v3.18.2.js +0 -29
  653. package/dist/migration/to/v3.19.0.d.ts +0 -5
  654. package/dist/migration/to/v3.19.0.d.ts.map +0 -1
  655. package/dist/migration/to/v3.19.0.js +0 -16
  656. package/dist/migration/to/v3.2.0.d.ts +0 -5
  657. package/dist/migration/to/v3.2.0.d.ts.map +0 -1
  658. package/dist/migration/to/v3.2.0.js +0 -16
  659. package/dist/migration/to/v3.20.0.d.ts +0 -5
  660. package/dist/migration/to/v3.20.0.d.ts.map +0 -1
  661. package/dist/migration/to/v3.20.0.js +0 -32
  662. package/dist/migration/to/v3.21.0.d.ts +0 -5
  663. package/dist/migration/to/v3.21.0.d.ts.map +0 -1
  664. package/dist/migration/to/v3.21.0.js +0 -16
  665. package/dist/migration/to/v3.22.0.d.ts +0 -5
  666. package/dist/migration/to/v3.22.0.d.ts.map +0 -1
  667. package/dist/migration/to/v3.22.0.js +0 -38
  668. package/dist/migration/to/v3.23.0.d.ts +0 -5
  669. package/dist/migration/to/v3.23.0.d.ts.map +0 -1
  670. package/dist/migration/to/v3.23.0.js +0 -16
  671. package/dist/migration/to/v3.24.0.d.ts +0 -5
  672. package/dist/migration/to/v3.24.0.d.ts.map +0 -1
  673. package/dist/migration/to/v3.24.0.js +0 -22
  674. package/dist/migration/to/v3.25.0.d.ts +0 -5
  675. package/dist/migration/to/v3.25.0.d.ts.map +0 -1
  676. package/dist/migration/to/v3.25.0.js +0 -20
  677. package/dist/migration/to/v3.26.0.d.ts +0 -5
  678. package/dist/migration/to/v3.26.0.d.ts.map +0 -1
  679. package/dist/migration/to/v3.26.0.js +0 -16
  680. package/dist/migration/to/v3.27.0.d.ts +0 -5
  681. package/dist/migration/to/v3.27.0.d.ts.map +0 -1
  682. package/dist/migration/to/v3.27.0.js +0 -16
  683. package/dist/migration/to/v3.28.0.d.ts +0 -5
  684. package/dist/migration/to/v3.28.0.d.ts.map +0 -1
  685. package/dist/migration/to/v3.28.0.js +0 -16
  686. package/dist/migration/to/v3.29.0.d.ts +0 -5
  687. package/dist/migration/to/v3.29.0.d.ts.map +0 -1
  688. package/dist/migration/to/v3.29.0.js +0 -16
  689. package/dist/migration/to/v3.3.0.d.ts +0 -5
  690. package/dist/migration/to/v3.3.0.d.ts.map +0 -1
  691. package/dist/migration/to/v3.3.0.js +0 -22
  692. package/dist/migration/to/v3.30.0.d.ts +0 -5
  693. package/dist/migration/to/v3.30.0.d.ts.map +0 -1
  694. package/dist/migration/to/v3.30.0.js +0 -16
  695. package/dist/migration/to/v3.31.0.d.ts +0 -5
  696. package/dist/migration/to/v3.31.0.d.ts.map +0 -1
  697. package/dist/migration/to/v3.31.0.js +0 -42
  698. package/dist/migration/to/v3.32.0.d.ts +0 -5
  699. package/dist/migration/to/v3.32.0.d.ts.map +0 -1
  700. package/dist/migration/to/v3.32.0.js +0 -97
  701. package/dist/migration/to/v3.33.0.d.ts +0 -5
  702. package/dist/migration/to/v3.33.0.d.ts.map +0 -1
  703. package/dist/migration/to/v3.33.0.js +0 -16
  704. package/dist/migration/to/v3.34.0.d.ts +0 -7
  705. package/dist/migration/to/v3.34.0.d.ts.map +0 -1
  706. package/dist/migration/to/v3.34.0.js +0 -150
  707. package/dist/migration/to/v3.35.0.d.ts +0 -5
  708. package/dist/migration/to/v3.35.0.d.ts.map +0 -1
  709. package/dist/migration/to/v3.35.0.js +0 -16
  710. package/dist/migration/to/v3.36.0.d.ts +0 -5
  711. package/dist/migration/to/v3.36.0.d.ts.map +0 -1
  712. package/dist/migration/to/v3.36.0.js +0 -29
  713. package/dist/migration/to/v3.37.0.d.ts +0 -5
  714. package/dist/migration/to/v3.37.0.d.ts.map +0 -1
  715. package/dist/migration/to/v3.37.0.js +0 -16
  716. package/dist/migration/to/v3.38.0.d.ts +0 -5
  717. package/dist/migration/to/v3.38.0.d.ts.map +0 -1
  718. package/dist/migration/to/v3.38.0.js +0 -16
  719. package/dist/migration/to/v3.39.0.d.ts +0 -5
  720. package/dist/migration/to/v3.39.0.d.ts.map +0 -1
  721. package/dist/migration/to/v3.39.0.js +0 -54
  722. package/dist/migration/to/v3.4.0.d.ts +0 -5
  723. package/dist/migration/to/v3.4.0.d.ts.map +0 -1
  724. package/dist/migration/to/v3.4.0.js +0 -16
  725. package/dist/migration/to/v3.40.0.d.ts +0 -5
  726. package/dist/migration/to/v3.40.0.d.ts.map +0 -1
  727. package/dist/migration/to/v3.40.0.js +0 -33
  728. package/dist/migration/to/v3.41.0.d.ts +0 -5
  729. package/dist/migration/to/v3.41.0.d.ts.map +0 -1
  730. package/dist/migration/to/v3.41.0.js +0 -16
  731. package/dist/migration/to/v3.42.0.d.ts +0 -5
  732. package/dist/migration/to/v3.42.0.d.ts.map +0 -1
  733. package/dist/migration/to/v3.42.0.js +0 -16
  734. package/dist/migration/to/v3.43.0.d.ts +0 -5
  735. package/dist/migration/to/v3.43.0.d.ts.map +0 -1
  736. package/dist/migration/to/v3.43.0.js +0 -16
  737. package/dist/migration/to/v3.44.0.d.ts +0 -5
  738. package/dist/migration/to/v3.44.0.d.ts.map +0 -1
  739. package/dist/migration/to/v3.44.0.js +0 -16
  740. package/dist/migration/to/v3.45.0.d.ts +0 -5
  741. package/dist/migration/to/v3.45.0.d.ts.map +0 -1
  742. package/dist/migration/to/v3.45.0.js +0 -16
  743. package/dist/migration/to/v3.46.0.d.ts +0 -5
  744. package/dist/migration/to/v3.46.0.d.ts.map +0 -1
  745. package/dist/migration/to/v3.46.0.js +0 -37
  746. package/dist/migration/to/v3.47.0.d.ts +0 -5
  747. package/dist/migration/to/v3.47.0.d.ts.map +0 -1
  748. package/dist/migration/to/v3.47.0.js +0 -16
  749. package/dist/migration/to/v3.48.0.d.ts +0 -5
  750. package/dist/migration/to/v3.48.0.d.ts.map +0 -1
  751. package/dist/migration/to/v3.48.0.js +0 -16
  752. package/dist/migration/to/v3.49.0.d.ts +0 -5
  753. package/dist/migration/to/v3.49.0.d.ts.map +0 -1
  754. package/dist/migration/to/v3.49.0.js +0 -16
  755. package/dist/migration/to/v3.5.0.d.ts +0 -5
  756. package/dist/migration/to/v3.5.0.d.ts.map +0 -1
  757. package/dist/migration/to/v3.5.0.js +0 -16
  758. package/dist/migration/to/v3.5.1.d.ts +0 -5
  759. package/dist/migration/to/v3.5.1.d.ts.map +0 -1
  760. package/dist/migration/to/v3.5.1.js +0 -16
  761. package/dist/migration/to/v3.50.0.d.ts +0 -5
  762. package/dist/migration/to/v3.50.0.d.ts.map +0 -1
  763. package/dist/migration/to/v3.50.0.js +0 -16
  764. package/dist/migration/to/v3.6.0.d.ts +0 -5
  765. package/dist/migration/to/v3.6.0.d.ts.map +0 -1
  766. package/dist/migration/to/v3.6.0.js +0 -16
  767. package/dist/migration/to/v3.7.0.d.ts +0 -5
  768. package/dist/migration/to/v3.7.0.d.ts.map +0 -1
  769. package/dist/migration/to/v3.7.0.js +0 -16
  770. package/dist/migration/to/v3.8.0.d.ts +0 -5
  771. package/dist/migration/to/v3.8.0.d.ts.map +0 -1
  772. package/dist/migration/to/v3.8.0.js +0 -16
  773. package/dist/migration/to/v3.9.0.d.ts +0 -5
  774. package/dist/migration/to/v3.9.0.d.ts.map +0 -1
  775. package/dist/migration/to/v3.9.0.js +0 -84
  776. package/dist/migration/types.d.ts +0 -21
  777. package/dist/migration/types.d.ts.map +0 -1
  778. package/dist/migration/types.js +0 -5
  779. package/dist/migration/utils.d.ts +0 -3
  780. package/dist/migration/utils.d.ts.map +0 -1
  781. package/dist/migration/utils.js +0 -13
  782. package/dist/mocks.d.ts +0 -14
  783. package/dist/mocks.d.ts.map +0 -1
  784. package/dist/mocks.js +0 -71
  785. package/dist/models/project-schema.d.ts +0 -36
  786. package/dist/models/project-schema.d.ts.map +0 -1
  787. package/dist/models/project-schema.js +0 -98
  788. package/dist/models/query.d.ts +0 -18
  789. package/dist/models/query.d.ts.map +0 -1
  790. package/dist/models/query.js +0 -35
  791. package/dist/models/service.d.ts +0 -13
  792. package/dist/models/service.d.ts.map +0 -1
  793. package/dist/models/service.js +0 -25
  794. package/dist/models/shape.d.ts +0 -42
  795. package/dist/models/shape.d.ts.map +0 -1
  796. package/dist/models/shape.js +0 -86
  797. package/dist/patterns.d.ts +0 -13
  798. package/dist/patterns.d.ts.map +0 -1
  799. package/dist/patterns.js +0 -5
  800. package/dist/project-schema/index.d.ts +0 -185
  801. package/dist/project-schema/index.d.ts.map +0 -1
  802. package/dist/project-schema/index.js +0 -879
  803. package/dist/project-schema/latest.d.ts +0 -2033
  804. package/dist/project-schema/latest.d.ts.map +0 -1
  805. package/dist/project-schema/latest.js +0 -5
  806. package/dist/project-schema/migrate.d.ts +0 -5
  807. package/dist/project-schema/migrate.d.ts.map +0 -1
  808. package/dist/project-schema/migrate.js +0 -201
  809. package/dist/project-schema/v1.0.0.d.ts +0 -300
  810. package/dist/project-schema/v1.0.0.d.ts.map +0 -1
  811. package/dist/project-schema/v1.0.0.js +0 -5
  812. package/dist/project-schema/v3.0.0.d.ts +0 -479
  813. package/dist/project-schema/v3.0.0.d.ts.map +0 -1
  814. package/dist/project-schema/v3.0.0.js +0 -5
  815. package/dist/project-schema/v3.1.0.d.ts +0 -622
  816. package/dist/project-schema/v3.1.0.d.ts.map +0 -1
  817. package/dist/project-schema/v3.1.0.js +0 -5
  818. package/dist/project-schema/v3.10.0.d.ts +0 -1202
  819. package/dist/project-schema/v3.10.0.d.ts.map +0 -1
  820. package/dist/project-schema/v3.10.0.js +0 -5
  821. package/dist/project-schema/v3.11.0.d.ts +0 -1211
  822. package/dist/project-schema/v3.11.0.d.ts.map +0 -1
  823. package/dist/project-schema/v3.11.0.js +0 -5
  824. package/dist/project-schema/v3.12.0.d.ts +0 -1215
  825. package/dist/project-schema/v3.12.0.d.ts.map +0 -1
  826. package/dist/project-schema/v3.12.0.js +0 -5
  827. package/dist/project-schema/v3.12.1.d.ts +0 -1274
  828. package/dist/project-schema/v3.12.1.d.ts.map +0 -1
  829. package/dist/project-schema/v3.12.1.js +0 -5
  830. package/dist/project-schema/v3.12.2.d.ts +0 -1284
  831. package/dist/project-schema/v3.12.2.d.ts.map +0 -1
  832. package/dist/project-schema/v3.12.2.js +0 -5
  833. package/dist/project-schema/v3.12.3.d.ts +0 -1307
  834. package/dist/project-schema/v3.12.3.d.ts.map +0 -1
  835. package/dist/project-schema/v3.12.3.js +0 -5
  836. package/dist/project-schema/v3.13.0.d.ts +0 -1318
  837. package/dist/project-schema/v3.13.0.d.ts.map +0 -1
  838. package/dist/project-schema/v3.13.0.js +0 -5
  839. package/dist/project-schema/v3.13.1.d.ts +0 -1413
  840. package/dist/project-schema/v3.13.1.d.ts.map +0 -1
  841. package/dist/project-schema/v3.13.1.js +0 -5
  842. package/dist/project-schema/v3.14.0.d.ts +0 -1437
  843. package/dist/project-schema/v3.14.0.d.ts.map +0 -1
  844. package/dist/project-schema/v3.14.0.js +0 -5
  845. package/dist/project-schema/v3.15.0.d.ts +0 -1459
  846. package/dist/project-schema/v3.15.0.d.ts.map +0 -1
  847. package/dist/project-schema/v3.15.0.js +0 -5
  848. package/dist/project-schema/v3.16.0.d.ts +0 -1471
  849. package/dist/project-schema/v3.16.0.d.ts.map +0 -1
  850. package/dist/project-schema/v3.16.0.js +0 -5
  851. package/dist/project-schema/v3.17.0.d.ts +0 -1468
  852. package/dist/project-schema/v3.17.0.d.ts.map +0 -1
  853. package/dist/project-schema/v3.17.0.js +0 -5
  854. package/dist/project-schema/v3.17.1.d.ts +0 -1469
  855. package/dist/project-schema/v3.17.1.d.ts.map +0 -1
  856. package/dist/project-schema/v3.17.1.js +0 -5
  857. package/dist/project-schema/v3.18.0.d.ts +0 -1334
  858. package/dist/project-schema/v3.18.0.d.ts.map +0 -1
  859. package/dist/project-schema/v3.18.0.js +0 -5
  860. package/dist/project-schema/v3.18.1.d.ts +0 -1333
  861. package/dist/project-schema/v3.18.1.d.ts.map +0 -1
  862. package/dist/project-schema/v3.18.1.js +0 -5
  863. package/dist/project-schema/v3.18.2.d.ts +0 -1333
  864. package/dist/project-schema/v3.18.2.d.ts.map +0 -1
  865. package/dist/project-schema/v3.18.2.js +0 -5
  866. package/dist/project-schema/v3.19.0.d.ts +0 -1337
  867. package/dist/project-schema/v3.19.0.d.ts.map +0 -1
  868. package/dist/project-schema/v3.19.0.js +0 -5
  869. package/dist/project-schema/v3.2.0.d.ts +0 -633
  870. package/dist/project-schema/v3.2.0.d.ts.map +0 -1
  871. package/dist/project-schema/v3.2.0.js +0 -5
  872. package/dist/project-schema/v3.20.0.d.ts +0 -1337
  873. package/dist/project-schema/v3.20.0.d.ts.map +0 -1
  874. package/dist/project-schema/v3.20.0.js +0 -5
  875. package/dist/project-schema/v3.21.0.d.ts +0 -1339
  876. package/dist/project-schema/v3.21.0.d.ts.map +0 -1
  877. package/dist/project-schema/v3.21.0.js +0 -5
  878. package/dist/project-schema/v3.22.0.d.ts +0 -1345
  879. package/dist/project-schema/v3.22.0.d.ts.map +0 -1
  880. package/dist/project-schema/v3.22.0.js +0 -5
  881. package/dist/project-schema/v3.23.0.d.ts +0 -1377
  882. package/dist/project-schema/v3.23.0.d.ts.map +0 -1
  883. package/dist/project-schema/v3.23.0.js +0 -5
  884. package/dist/project-schema/v3.24.0.d.ts +0 -1365
  885. package/dist/project-schema/v3.24.0.d.ts.map +0 -1
  886. package/dist/project-schema/v3.24.0.js +0 -5
  887. package/dist/project-schema/v3.25.0.d.ts +0 -1364
  888. package/dist/project-schema/v3.25.0.d.ts.map +0 -1
  889. package/dist/project-schema/v3.25.0.js +0 -5
  890. package/dist/project-schema/v3.26.0.d.ts +0 -1389
  891. package/dist/project-schema/v3.26.0.d.ts.map +0 -1
  892. package/dist/project-schema/v3.26.0.js +0 -5
  893. package/dist/project-schema/v3.27.0.d.ts +0 -1398
  894. package/dist/project-schema/v3.27.0.d.ts.map +0 -1
  895. package/dist/project-schema/v3.27.0.js +0 -5
  896. package/dist/project-schema/v3.28.0.d.ts +0 -1417
  897. package/dist/project-schema/v3.28.0.d.ts.map +0 -1
  898. package/dist/project-schema/v3.28.0.js +0 -5
  899. package/dist/project-schema/v3.29.0.d.ts +0 -1424
  900. package/dist/project-schema/v3.29.0.d.ts.map +0 -1
  901. package/dist/project-schema/v3.29.0.js +0 -5
  902. package/dist/project-schema/v3.3.0.d.ts +0 -633
  903. package/dist/project-schema/v3.3.0.d.ts.map +0 -1
  904. package/dist/project-schema/v3.3.0.js +0 -5
  905. package/dist/project-schema/v3.30.0.d.ts +0 -1417
  906. package/dist/project-schema/v3.30.0.d.ts.map +0 -1
  907. package/dist/project-schema/v3.30.0.js +0 -5
  908. package/dist/project-schema/v3.31.0.d.ts +0 -1449
  909. package/dist/project-schema/v3.31.0.d.ts.map +0 -1
  910. package/dist/project-schema/v3.31.0.js +0 -5
  911. package/dist/project-schema/v3.32.0.d.ts +0 -1440
  912. package/dist/project-schema/v3.32.0.d.ts.map +0 -1
  913. package/dist/project-schema/v3.32.0.js +0 -5
  914. package/dist/project-schema/v3.33.0.d.ts +0 -1446
  915. package/dist/project-schema/v3.33.0.d.ts.map +0 -1
  916. package/dist/project-schema/v3.33.0.js +0 -5
  917. package/dist/project-schema/v3.34.0.d.ts +0 -1446
  918. package/dist/project-schema/v3.34.0.d.ts.map +0 -1
  919. package/dist/project-schema/v3.34.0.js +0 -5
  920. package/dist/project-schema/v3.35.0.d.ts +0 -1465
  921. package/dist/project-schema/v3.35.0.d.ts.map +0 -1
  922. package/dist/project-schema/v3.35.0.js +0 -5
  923. package/dist/project-schema/v3.36.0.d.ts +0 -1471
  924. package/dist/project-schema/v3.36.0.d.ts.map +0 -1
  925. package/dist/project-schema/v3.36.0.js +0 -5
  926. package/dist/project-schema/v3.37.0.d.ts +0 -1523
  927. package/dist/project-schema/v3.37.0.d.ts.map +0 -1
  928. package/dist/project-schema/v3.37.0.js +0 -5
  929. package/dist/project-schema/v3.38.0.d.ts +0 -1523
  930. package/dist/project-schema/v3.38.0.d.ts.map +0 -1
  931. package/dist/project-schema/v3.38.0.js +0 -5
  932. package/dist/project-schema/v3.39.0.d.ts +0 -1530
  933. package/dist/project-schema/v3.39.0.d.ts.map +0 -1
  934. package/dist/project-schema/v3.39.0.js +0 -5
  935. package/dist/project-schema/v3.4.0.d.ts +0 -625
  936. package/dist/project-schema/v3.4.0.d.ts.map +0 -1
  937. package/dist/project-schema/v3.4.0.js +0 -5
  938. package/dist/project-schema/v3.40.0.d.ts +0 -1531
  939. package/dist/project-schema/v3.40.0.d.ts.map +0 -1
  940. package/dist/project-schema/v3.40.0.js +0 -5
  941. package/dist/project-schema/v3.41.0.d.ts +0 -1531
  942. package/dist/project-schema/v3.41.0.d.ts.map +0 -1
  943. package/dist/project-schema/v3.41.0.js +0 -5
  944. package/dist/project-schema/v3.42.0.d.ts +0 -1535
  945. package/dist/project-schema/v3.42.0.d.ts.map +0 -1
  946. package/dist/project-schema/v3.42.0.js +0 -5
  947. package/dist/project-schema/v3.43.0.d.ts +0 -1537
  948. package/dist/project-schema/v3.43.0.d.ts.map +0 -1
  949. package/dist/project-schema/v3.43.0.js +0 -5
  950. package/dist/project-schema/v3.44.0.d.ts +0 -1622
  951. package/dist/project-schema/v3.44.0.d.ts.map +0 -1
  952. package/dist/project-schema/v3.44.0.js +0 -5
  953. package/dist/project-schema/v3.45.0.d.ts +0 -1651
  954. package/dist/project-schema/v3.45.0.d.ts.map +0 -1
  955. package/dist/project-schema/v3.45.0.js +0 -5
  956. package/dist/project-schema/v3.46.0.d.ts +0 -1704
  957. package/dist/project-schema/v3.46.0.d.ts.map +0 -1
  958. package/dist/project-schema/v3.46.0.js +0 -5
  959. package/dist/project-schema/v3.47.0.d.ts +0 -1737
  960. package/dist/project-schema/v3.47.0.d.ts.map +0 -1
  961. package/dist/project-schema/v3.47.0.js +0 -5
  962. package/dist/project-schema/v3.48.0.d.ts +0 -1990
  963. package/dist/project-schema/v3.48.0.d.ts.map +0 -1
  964. package/dist/project-schema/v3.48.0.js +0 -5
  965. package/dist/project-schema/v3.49.0.d.ts +0 -1999
  966. package/dist/project-schema/v3.49.0.d.ts.map +0 -1
  967. package/dist/project-schema/v3.49.0.js +0 -5
  968. package/dist/project-schema/v3.5.0.d.ts +0 -650
  969. package/dist/project-schema/v3.5.0.d.ts.map +0 -1
  970. package/dist/project-schema/v3.5.0.js +0 -5
  971. package/dist/project-schema/v3.5.1.d.ts +0 -650
  972. package/dist/project-schema/v3.5.1.d.ts.map +0 -1
  973. package/dist/project-schema/v3.5.1.js +0 -5
  974. package/dist/project-schema/v3.50.0.d.ts +0 -2033
  975. package/dist/project-schema/v3.50.0.d.ts.map +0 -1
  976. package/dist/project-schema/v3.50.0.js +0 -5
  977. package/dist/project-schema/v3.6.0.d.ts +0 -659
  978. package/dist/project-schema/v3.6.0.d.ts.map +0 -1
  979. package/dist/project-schema/v3.6.0.js +0 -5
  980. package/dist/project-schema/v3.7.0.d.ts +0 -962
  981. package/dist/project-schema/v3.7.0.d.ts.map +0 -1
  982. package/dist/project-schema/v3.7.0.js +0 -5
  983. package/dist/project-schema/v3.8.0.d.ts +0 -980
  984. package/dist/project-schema/v3.8.0.d.ts.map +0 -1
  985. package/dist/project-schema/v3.8.0.js +0 -5
  986. package/dist/project-schema/v3.9.0.d.ts +0 -1179
  987. package/dist/project-schema/v3.9.0.d.ts.map +0 -1
  988. package/dist/project-schema/v3.9.0.js +0 -5
  989. package/dist/project-schema/v4.0.0.d.ts +0 -1329
  990. package/dist/project-schema/v4.0.0.d.ts.map +0 -1
  991. package/dist/project-schema/v4.0.0.js +0 -5
  992. package/dist/refs.d.ts +0 -228
  993. package/dist/refs.d.ts.map +0 -1
  994. package/dist/refs.js +0 -754
  995. package/dist/relationships.d.ts +0 -37
  996. package/dist/relationships.d.ts.map +0 -1
  997. package/dist/relationships.js +0 -243
  998. package/dist/scalars.d.ts +0 -3
  999. package/dist/scalars.d.ts.map +0 -1
  1000. package/dist/scalars.js +0 -11
  1001. package/dist/schema-transform.d.ts +0 -4
  1002. package/dist/schema-transform.d.ts.map +0 -1
  1003. package/dist/schema-transform.js +0 -47
  1004. package/dist/schema-util.d.ts +0 -220
  1005. package/dist/schema-util.d.ts.map +0 -1
  1006. package/dist/schema-util.js +0 -1247
  1007. package/dist/schemas/index.d.ts +0 -5
  1008. package/dist/schemas/index.d.ts.map +0 -1
  1009. package/dist/schemas/index.js +0 -96
  1010. package/dist/schemas/index.ts +0 -152
  1011. package/dist/services.d.ts +0 -55
  1012. package/dist/services.d.ts.map +0 -1
  1013. package/dist/services.js +0 -168
  1014. package/dist/taxonomies.d.ts +0 -16
  1015. package/dist/taxonomies.d.ts.map +0 -1
  1016. package/dist/taxonomies.js +0 -41
  1017. package/dist/template-shapes/index.d.ts +0 -8
  1018. package/dist/template-shapes/index.d.ts.map +0 -1
  1019. package/dist/template-shapes/index.js +0 -43
  1020. package/dist/template-shapes/templates.d.ts +0 -42
  1021. package/dist/template-shapes/templates.d.ts.map +0 -1
  1022. package/dist/template-shapes/templates.js +0 -423
  1023. package/dist/template-shapes/types.d.ts +0 -16
  1024. package/dist/template-shapes/types.d.ts.map +0 -1
  1025. package/dist/template-shapes/types.js +0 -13
  1026. package/dist/template-shapes/where.d.ts +0 -38
  1027. package/dist/template-shapes/where.d.ts.map +0 -1
  1028. package/dist/template-shapes/where.js +0 -472
  1029. package/dist/types/index.d.ts +0 -3
  1030. package/dist/types/index.d.ts.map +0 -1
  1031. package/dist/types/index.js +0 -27
  1032. package/dist/types/types.d.ts +0 -211
  1033. package/dist/types/types.d.ts.map +0 -1
  1034. package/dist/types/types.js +0 -60
  1035. package/dist/types/utils.d.ts +0 -116
  1036. package/dist/types/utils.d.ts.map +0 -1
  1037. package/dist/types/utils.js +0 -364
  1038. package/dist/unions.d.ts +0 -28
  1039. package/dist/unions.d.ts.map +0 -1
  1040. package/dist/unions.js +0 -137
  1041. package/dist/user-schema.d.ts +0 -39
  1042. package/dist/user-schema.d.ts.map +0 -1
  1043. package/dist/user-schema.js +0 -5
  1044. package/dist/util/ai-tools.d.ts +0 -4
  1045. package/dist/util/ai-tools.d.ts.map +0 -1
  1046. package/dist/util/ai-tools.js +0 -15
  1047. package/dist/util/api-indexing.d.ts +0 -10
  1048. package/dist/util/api-indexing.d.ts.map +0 -1
  1049. package/dist/util/api-indexing.js +0 -75
  1050. package/dist/util/detect-cycles.d.ts +0 -8
  1051. package/dist/util/detect-cycles.d.ts.map +0 -1
  1052. package/dist/util/detect-cycles.js +0 -54
  1053. package/dist/util/find-shape-at-path.d.ts +0 -22
  1054. package/dist/util/find-shape-at-path.d.ts.map +0 -1
  1055. package/dist/util/find-shape-at-path.js +0 -61
  1056. package/dist/util/form-config.d.ts +0 -12
  1057. package/dist/util/form-config.d.ts.map +0 -1
  1058. package/dist/util/form-config.js +0 -79
  1059. package/dist/util/get-conflicting-properties.d.ts +0 -7
  1060. package/dist/util/get-conflicting-properties.d.ts.map +0 -1
  1061. package/dist/util/get-conflicting-properties.js +0 -59
  1062. package/dist/util/get-return-shape.d.ts +0 -5
  1063. package/dist/util/get-return-shape.d.ts.map +0 -1
  1064. package/dist/util/get-return-shape.js +0 -38
  1065. package/dist/util/has-arg.d.ts +0 -5
  1066. package/dist/util/has-arg.d.ts.map +0 -1
  1067. package/dist/util/has-arg.js +0 -20
  1068. package/dist/util/index.d.ts +0 -11
  1069. package/dist/util/index.d.ts.map +0 -1
  1070. package/dist/util/index.js +0 -115
  1071. package/dist/util/merge.d.ts +0 -16
  1072. package/dist/util/merge.d.ts.map +0 -1
  1073. package/dist/util/merge.js +0 -307
  1074. package/dist/util/patch-schema.d.ts +0 -9
  1075. package/dist/util/patch-schema.d.ts.map +0 -1
  1076. package/dist/util/patch-schema.js +0 -52
  1077. package/dist/validate.d.ts +0 -71
  1078. package/dist/validate.d.ts.map +0 -1
  1079. package/dist/validate.js +0 -1117
  1080. package/dist/versions.d.ts +0 -5
  1081. package/dist/versions.d.ts.map +0 -1
  1082. package/dist/versions.js +0 -17
  1083. package/dist/workflows.d.ts +0 -15
  1084. package/dist/workflows.d.ts.map +0 -1
  1085. package/dist/workflows.js +0 -81
  1086. package/es/agents.js +0 -51
  1087. package/es/api-version.js +0 -17
  1088. package/es/auth-schemas.js +0 -1
  1089. package/es/builtin-schema.js +0 -671
  1090. package/es/content-schema-transform.js +0 -192
  1091. package/es/create-input-schema.js +0 -67
  1092. package/es/enum.js +0 -9
  1093. package/es/flatten-templates.js +0 -23
  1094. package/es/get-is-leaf.js +0 -52
  1095. package/es/index.js +0 -33
  1096. package/es/interfaces.js +0 -85
  1097. package/es/layers/layers.js +0 -311
  1098. package/es/layers/refs.js +0 -256
  1099. package/es/layers/type-utils.js +0 -138
  1100. package/es/layers/visitor.js +0 -35
  1101. package/es/migration/index.js +0 -120
  1102. package/es/migration/to/utils/v3.34.0-utils.js +0 -0
  1103. package/es/migration/to/v3.0.0.js +0 -256
  1104. package/es/migration/to/v3.1.0.js +0 -200
  1105. package/es/migration/to/v3.10.0.js +0 -84
  1106. package/es/migration/to/v3.11.0.js +0 -90
  1107. package/es/migration/to/v3.12.0.js +0 -10
  1108. package/es/migration/to/v3.12.1.js +0 -10
  1109. package/es/migration/to/v3.12.2.js +0 -10
  1110. package/es/migration/to/v3.12.3.js +0 -76
  1111. package/es/migration/to/v3.13.0.js +0 -19
  1112. package/es/migration/to/v3.14.0.js +0 -10
  1113. package/es/migration/to/v3.15.0.js +0 -10
  1114. package/es/migration/to/v3.16.0.js +0 -10
  1115. package/es/migration/to/v3.17.0.js +0 -27
  1116. package/es/migration/to/v3.17.1.js +0 -10
  1117. package/es/migration/to/v3.18.0.js +0 -64
  1118. package/es/migration/to/v3.18.1.js +0 -15
  1119. package/es/migration/to/v3.18.2.js +0 -22
  1120. package/es/migration/to/v3.19.0.js +0 -10
  1121. package/es/migration/to/v3.2.0.js +0 -10
  1122. package/es/migration/to/v3.20.0.js +0 -25
  1123. package/es/migration/to/v3.21.0.js +0 -10
  1124. package/es/migration/to/v3.22.0.js +0 -31
  1125. package/es/migration/to/v3.23.0.js +0 -10
  1126. package/es/migration/to/v3.24.0.js +0 -16
  1127. package/es/migration/to/v3.25.0.js +0 -14
  1128. package/es/migration/to/v3.26.0.js +0 -10
  1129. package/es/migration/to/v3.27.0.js +0 -10
  1130. package/es/migration/to/v3.28.0.js +0 -10
  1131. package/es/migration/to/v3.29.0.js +0 -10
  1132. package/es/migration/to/v3.3.0.js +0 -16
  1133. package/es/migration/to/v3.30.0.js +0 -10
  1134. package/es/migration/to/v3.31.0.js +0 -35
  1135. package/es/migration/to/v3.32.0.js +0 -91
  1136. package/es/migration/to/v3.33.0.js +0 -10
  1137. package/es/migration/to/v3.34.0.js +0 -142
  1138. package/es/migration/to/v3.35.0.js +0 -10
  1139. package/es/migration/to/v3.36.0.js +0 -22
  1140. package/es/migration/to/v3.37.0.js +0 -10
  1141. package/es/migration/to/v3.38.0.js +0 -10
  1142. package/es/migration/to/v3.39.0.js +0 -48
  1143. package/es/migration/to/v3.4.0.js +0 -10
  1144. package/es/migration/to/v3.40.0.js +0 -26
  1145. package/es/migration/to/v3.41.0.js +0 -10
  1146. package/es/migration/to/v3.42.0.js +0 -10
  1147. package/es/migration/to/v3.43.0.js +0 -10
  1148. package/es/migration/to/v3.44.0.js +0 -10
  1149. package/es/migration/to/v3.45.0.js +0 -10
  1150. package/es/migration/to/v3.46.0.js +0 -31
  1151. package/es/migration/to/v3.47.0.js +0 -10
  1152. package/es/migration/to/v3.48.0.js +0 -10
  1153. package/es/migration/to/v3.49.0.js +0 -10
  1154. package/es/migration/to/v3.5.0.js +0 -10
  1155. package/es/migration/to/v3.5.1.js +0 -10
  1156. package/es/migration/to/v3.50.0.js +0 -10
  1157. package/es/migration/to/v3.6.0.js +0 -10
  1158. package/es/migration/to/v3.7.0.js +0 -10
  1159. package/es/migration/to/v3.8.0.js +0 -10
  1160. package/es/migration/to/v3.9.0.js +0 -77
  1161. package/es/migration/types.js +0 -1
  1162. package/es/migration/utils.js +0 -6
  1163. package/es/mocks.js +0 -62
  1164. package/es/models/project-schema.js +0 -90
  1165. package/es/models/query.js +0 -28
  1166. package/es/models/service.js +0 -18
  1167. package/es/models/shape.js +0 -79
  1168. package/es/patterns.js +0 -1
  1169. package/es/project-schema/index.js +0 -138
  1170. package/es/project-schema/latest.js +0 -1
  1171. package/es/project-schema/migrate.js +0 -195
  1172. package/es/project-schema/v1.0.0.js +0 -1
  1173. package/es/project-schema/v3.0.0.js +0 -1
  1174. package/es/project-schema/v3.1.0.js +0 -1
  1175. package/es/project-schema/v3.10.0.js +0 -1
  1176. package/es/project-schema/v3.11.0.js +0 -1
  1177. package/es/project-schema/v3.12.0.js +0 -1
  1178. package/es/project-schema/v3.12.1.js +0 -1
  1179. package/es/project-schema/v3.12.2.js +0 -1
  1180. package/es/project-schema/v3.12.3.js +0 -1
  1181. package/es/project-schema/v3.13.0.js +0 -1
  1182. package/es/project-schema/v3.13.1.js +0 -1
  1183. package/es/project-schema/v3.14.0.js +0 -1
  1184. package/es/project-schema/v3.15.0.js +0 -1
  1185. package/es/project-schema/v3.16.0.js +0 -1
  1186. package/es/project-schema/v3.17.0.js +0 -1
  1187. package/es/project-schema/v3.17.1.js +0 -1
  1188. package/es/project-schema/v3.18.0.js +0 -1
  1189. package/es/project-schema/v3.18.1.js +0 -1
  1190. package/es/project-schema/v3.18.2.js +0 -1
  1191. package/es/project-schema/v3.19.0.js +0 -1
  1192. package/es/project-schema/v3.2.0.js +0 -1
  1193. package/es/project-schema/v3.20.0.js +0 -1
  1194. package/es/project-schema/v3.21.0.js +0 -1
  1195. package/es/project-schema/v3.22.0.js +0 -1
  1196. package/es/project-schema/v3.23.0.js +0 -1
  1197. package/es/project-schema/v3.24.0.js +0 -1
  1198. package/es/project-schema/v3.25.0.js +0 -1
  1199. package/es/project-schema/v3.26.0.js +0 -1
  1200. package/es/project-schema/v3.27.0.js +0 -1
  1201. package/es/project-schema/v3.28.0.js +0 -1
  1202. package/es/project-schema/v3.29.0.js +0 -1
  1203. package/es/project-schema/v3.3.0.js +0 -1
  1204. package/es/project-schema/v3.30.0.js +0 -1
  1205. package/es/project-schema/v3.31.0.js +0 -1
  1206. package/es/project-schema/v3.32.0.js +0 -1
  1207. package/es/project-schema/v3.33.0.js +0 -1
  1208. package/es/project-schema/v3.34.0.js +0 -1
  1209. package/es/project-schema/v3.35.0.js +0 -1
  1210. package/es/project-schema/v3.36.0.js +0 -1
  1211. package/es/project-schema/v3.37.0.js +0 -1
  1212. package/es/project-schema/v3.38.0.js +0 -1
  1213. package/es/project-schema/v3.39.0.js +0 -1
  1214. package/es/project-schema/v3.4.0.js +0 -1
  1215. package/es/project-schema/v3.40.0.js +0 -1
  1216. package/es/project-schema/v3.41.0.js +0 -1
  1217. package/es/project-schema/v3.42.0.js +0 -1
  1218. package/es/project-schema/v3.43.0.js +0 -1
  1219. package/es/project-schema/v3.44.0.js +0 -1
  1220. package/es/project-schema/v3.45.0.js +0 -1
  1221. package/es/project-schema/v3.46.0.js +0 -1
  1222. package/es/project-schema/v3.47.0.js +0 -1
  1223. package/es/project-schema/v3.48.0.js +0 -1
  1224. package/es/project-schema/v3.49.0.js +0 -1
  1225. package/es/project-schema/v3.5.0.js +0 -1
  1226. package/es/project-schema/v3.5.1.js +0 -1
  1227. package/es/project-schema/v3.50.0.js +0 -1
  1228. package/es/project-schema/v3.6.0.js +0 -1
  1229. package/es/project-schema/v3.7.0.js +0 -1
  1230. package/es/project-schema/v3.8.0.js +0 -1
  1231. package/es/project-schema/v3.9.0.js +0 -1
  1232. package/es/project-schema/v4.0.0.js +0 -1
  1233. package/es/refs.js +0 -690
  1234. package/es/relationships.js +0 -229
  1235. package/es/scalars.js +0 -4
  1236. package/es/schema-transform.js +0 -40
  1237. package/es/schema-util.js +0 -1166
  1238. package/es/schemas/index.js +0 -78
  1239. package/es/schemas/index.ts +0 -152
  1240. package/es/services.js +0 -154
  1241. package/es/taxonomies.js +0 -34
  1242. package/es/template-shapes/index.js +0 -36
  1243. package/es/template-shapes/templates.js +0 -406
  1244. package/es/template-shapes/types.js +0 -7
  1245. package/es/template-shapes/where.js +0 -459
  1246. package/es/types/index.js +0 -2
  1247. package/es/types/types.js +0 -62
  1248. package/es/types/utils.js +0 -298
  1249. package/es/unions.js +0 -123
  1250. package/es/user-schema.js +0 -1
  1251. package/es/util/ai-tools.js +0 -8
  1252. package/es/util/api-indexing.js +0 -66
  1253. package/es/util/detect-cycles.js +0 -48
  1254. package/es/util/find-shape-at-path.js +0 -55
  1255. package/es/util/form-config.js +0 -73
  1256. package/es/util/get-conflicting-properties.js +0 -54
  1257. package/es/util/get-return-shape.js +0 -31
  1258. package/es/util/has-arg.js +0 -13
  1259. package/es/util/index.js +0 -10
  1260. package/es/util/merge.js +0 -293
  1261. package/es/util/patch-schema.js +0 -44
  1262. package/es/validate.js +0 -1102
  1263. package/es/versions.js +0 -4
  1264. package/es/workflows.js +0 -68
  1265. /package/dist/{schemas → cjs/src/schemas}/auth-schemas.json +0 -0
  1266. /package/dist/{schemas → cjs/src/schemas}/project-schema/experimental.json +0 -0
  1267. /package/dist/{schemas → cjs/src/schemas}/project-schema/latest.json +0 -0
  1268. /package/dist/{schemas → cjs/src/schemas}/project-schema/meta-schema-v1.0.0.json +0 -0
  1269. /package/dist/{schemas → cjs/src/schemas}/project-schema/meta-schema-v3.0.0.json +0 -0
  1270. /package/dist/{schemas → cjs/src/schemas}/project-schema/meta-schema-v3.1.0.json +0 -0
  1271. /package/dist/{schemas → cjs/src/schemas}/project-schema/meta-schema-v3.2.0.json +0 -0
  1272. /package/dist/{schemas → cjs/src/schemas}/project-schema/meta-schema-v3.3.0.json +0 -0
  1273. /package/dist/{schemas → cjs/src/schemas}/project-schema/meta-schema-v3.4.0.json +0 -0
  1274. /package/dist/{schemas → cjs/src/schemas}/project-schema/meta-schema-v3.5.0.json +0 -0
  1275. /package/dist/{schemas → cjs/src/schemas}/project-schema/meta-schema-v3.5.1.json +0 -0
  1276. /package/dist/{schemas → cjs/src/schemas}/project-schema/meta-schema-v3.6.0.json +0 -0
  1277. /package/dist/{schemas → cjs/src/schemas}/project-schema/meta-schema-v3.7.0.json +0 -0
  1278. /package/dist/{schemas → cjs/src/schemas}/project-schema/meta-schema-v3.8.0.json +0 -0
  1279. /package/dist/{schemas → cjs/src/schemas}/project-schema/meta-schema-v3.9.0.json +0 -0
  1280. /package/dist/{schemas → cjs/src/schemas}/project-schema/v1.0.0.json +0 -0
  1281. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.0.0.json +0 -0
  1282. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.1.0.json +0 -0
  1283. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.10.0.json +0 -0
  1284. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.11.0.json +0 -0
  1285. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.12.0.json +0 -0
  1286. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.12.1.json +0 -0
  1287. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.12.2.json +0 -0
  1288. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.12.3.json +0 -0
  1289. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.13.0.json +0 -0
  1290. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.14.0.json +0 -0
  1291. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.15.0.json +0 -0
  1292. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.16.0.json +0 -0
  1293. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.17.0.json +0 -0
  1294. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.17.1.json +0 -0
  1295. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.18.0.json +0 -0
  1296. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.18.1.json +0 -0
  1297. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.18.2.json +0 -0
  1298. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.19.0.json +0 -0
  1299. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.2.0.json +0 -0
  1300. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.20.0.json +0 -0
  1301. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.21.0.json +0 -0
  1302. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.22.0.json +0 -0
  1303. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.23.0.json +0 -0
  1304. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.24.0.json +0 -0
  1305. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.25.0.json +0 -0
  1306. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.26.0.json +0 -0
  1307. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.27.0.json +0 -0
  1308. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.28.0.json +0 -0
  1309. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.29.0.json +0 -0
  1310. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.3.0.json +0 -0
  1311. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.30.0.json +0 -0
  1312. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.31.0.json +0 -0
  1313. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.32.0.json +0 -0
  1314. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.33.0.json +0 -0
  1315. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.34.0.json +0 -0
  1316. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.35.0.json +0 -0
  1317. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.36.0.json +0 -0
  1318. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.37.0.json +0 -0
  1319. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.38.0.json +0 -0
  1320. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.39.0.json +0 -0
  1321. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.4.0.json +0 -0
  1322. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.40.0.json +0 -0
  1323. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.41.0.json +0 -0
  1324. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.42.0.json +0 -0
  1325. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.43.0.json +0 -0
  1326. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.44.0.json +0 -0
  1327. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.45.0.json +0 -0
  1328. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.46.0.json +0 -0
  1329. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.47.0.json +0 -0
  1330. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.48.0.json +0 -0
  1331. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.49.0.json +0 -0
  1332. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.5.0.json +0 -0
  1333. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.5.1.json +0 -0
  1334. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.50.0.json +0 -0
  1335. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.6.0.json +0 -0
  1336. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.7.0.json +0 -0
  1337. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.8.0.json +0 -0
  1338. /package/dist/{schemas → cjs/src/schemas}/project-schema/v3.9.0.json +0 -0
  1339. /package/dist/{schemas → cjs/src/schemas}/project-schema/v4.0.0.json +0 -0
  1340. /package/dist/{schemas → cjs/src/schemas}/project-schema.json +0 -0
  1341. /package/dist/{schemas → cjs/src/schemas}/user-schema.json +0 -0
  1342. /package/{es → dist/esm/src}/schemas/auth-schemas.json +0 -0
  1343. /package/{es → dist/esm/src}/schemas/project-schema/experimental.json +0 -0
  1344. /package/{es → dist/esm/src}/schemas/project-schema/latest.json +0 -0
  1345. /package/{es → dist/esm/src}/schemas/project-schema/meta-schema-v1.0.0.json +0 -0
  1346. /package/{es → dist/esm/src}/schemas/project-schema/meta-schema-v3.0.0.json +0 -0
  1347. /package/{es → dist/esm/src}/schemas/project-schema/meta-schema-v3.1.0.json +0 -0
  1348. /package/{es → dist/esm/src}/schemas/project-schema/meta-schema-v3.2.0.json +0 -0
  1349. /package/{es → dist/esm/src}/schemas/project-schema/meta-schema-v3.3.0.json +0 -0
  1350. /package/{es → dist/esm/src}/schemas/project-schema/meta-schema-v3.4.0.json +0 -0
  1351. /package/{es → dist/esm/src}/schemas/project-schema/meta-schema-v3.5.0.json +0 -0
  1352. /package/{es → dist/esm/src}/schemas/project-schema/meta-schema-v3.5.1.json +0 -0
  1353. /package/{es → dist/esm/src}/schemas/project-schema/meta-schema-v3.6.0.json +0 -0
  1354. /package/{es → dist/esm/src}/schemas/project-schema/meta-schema-v3.7.0.json +0 -0
  1355. /package/{es → dist/esm/src}/schemas/project-schema/meta-schema-v3.8.0.json +0 -0
  1356. /package/{es → dist/esm/src}/schemas/project-schema/meta-schema-v3.9.0.json +0 -0
  1357. /package/{es → dist/esm/src}/schemas/project-schema/v1.0.0.json +0 -0
  1358. /package/{es → dist/esm/src}/schemas/project-schema/v3.0.0.json +0 -0
  1359. /package/{es → dist/esm/src}/schemas/project-schema/v3.1.0.json +0 -0
  1360. /package/{es → dist/esm/src}/schemas/project-schema/v3.10.0.json +0 -0
  1361. /package/{es → dist/esm/src}/schemas/project-schema/v3.11.0.json +0 -0
  1362. /package/{es → dist/esm/src}/schemas/project-schema/v3.12.0.json +0 -0
  1363. /package/{es → dist/esm/src}/schemas/project-schema/v3.12.1.json +0 -0
  1364. /package/{es → dist/esm/src}/schemas/project-schema/v3.12.2.json +0 -0
  1365. /package/{es → dist/esm/src}/schemas/project-schema/v3.12.3.json +0 -0
  1366. /package/{es → dist/esm/src}/schemas/project-schema/v3.13.0.json +0 -0
  1367. /package/{es → dist/esm/src}/schemas/project-schema/v3.14.0.json +0 -0
  1368. /package/{es → dist/esm/src}/schemas/project-schema/v3.15.0.json +0 -0
  1369. /package/{es → dist/esm/src}/schemas/project-schema/v3.16.0.json +0 -0
  1370. /package/{es → dist/esm/src}/schemas/project-schema/v3.17.0.json +0 -0
  1371. /package/{es → dist/esm/src}/schemas/project-schema/v3.17.1.json +0 -0
  1372. /package/{es → dist/esm/src}/schemas/project-schema/v3.18.0.json +0 -0
  1373. /package/{es → dist/esm/src}/schemas/project-schema/v3.18.1.json +0 -0
  1374. /package/{es → dist/esm/src}/schemas/project-schema/v3.18.2.json +0 -0
  1375. /package/{es → dist/esm/src}/schemas/project-schema/v3.19.0.json +0 -0
  1376. /package/{es → dist/esm/src}/schemas/project-schema/v3.2.0.json +0 -0
  1377. /package/{es → dist/esm/src}/schemas/project-schema/v3.20.0.json +0 -0
  1378. /package/{es → dist/esm/src}/schemas/project-schema/v3.21.0.json +0 -0
  1379. /package/{es → dist/esm/src}/schemas/project-schema/v3.22.0.json +0 -0
  1380. /package/{es → dist/esm/src}/schemas/project-schema/v3.23.0.json +0 -0
  1381. /package/{es → dist/esm/src}/schemas/project-schema/v3.24.0.json +0 -0
  1382. /package/{es → dist/esm/src}/schemas/project-schema/v3.25.0.json +0 -0
  1383. /package/{es → dist/esm/src}/schemas/project-schema/v3.26.0.json +0 -0
  1384. /package/{es → dist/esm/src}/schemas/project-schema/v3.27.0.json +0 -0
  1385. /package/{es → dist/esm/src}/schemas/project-schema/v3.28.0.json +0 -0
  1386. /package/{es → dist/esm/src}/schemas/project-schema/v3.29.0.json +0 -0
  1387. /package/{es → dist/esm/src}/schemas/project-schema/v3.3.0.json +0 -0
  1388. /package/{es → dist/esm/src}/schemas/project-schema/v3.30.0.json +0 -0
  1389. /package/{es → dist/esm/src}/schemas/project-schema/v3.31.0.json +0 -0
  1390. /package/{es → dist/esm/src}/schemas/project-schema/v3.32.0.json +0 -0
  1391. /package/{es → dist/esm/src}/schemas/project-schema/v3.33.0.json +0 -0
  1392. /package/{es → dist/esm/src}/schemas/project-schema/v3.34.0.json +0 -0
  1393. /package/{es → dist/esm/src}/schemas/project-schema/v3.35.0.json +0 -0
  1394. /package/{es → dist/esm/src}/schemas/project-schema/v3.36.0.json +0 -0
  1395. /package/{es → dist/esm/src}/schemas/project-schema/v3.37.0.json +0 -0
  1396. /package/{es → dist/esm/src}/schemas/project-schema/v3.38.0.json +0 -0
  1397. /package/{es → dist/esm/src}/schemas/project-schema/v3.39.0.json +0 -0
  1398. /package/{es → dist/esm/src}/schemas/project-schema/v3.4.0.json +0 -0
  1399. /package/{es → dist/esm/src}/schemas/project-schema/v3.40.0.json +0 -0
  1400. /package/{es → dist/esm/src}/schemas/project-schema/v3.41.0.json +0 -0
  1401. /package/{es → dist/esm/src}/schemas/project-schema/v3.42.0.json +0 -0
  1402. /package/{es → dist/esm/src}/schemas/project-schema/v3.43.0.json +0 -0
  1403. /package/{es → dist/esm/src}/schemas/project-schema/v3.44.0.json +0 -0
  1404. /package/{es → dist/esm/src}/schemas/project-schema/v3.45.0.json +0 -0
  1405. /package/{es → dist/esm/src}/schemas/project-schema/v3.46.0.json +0 -0
  1406. /package/{es → dist/esm/src}/schemas/project-schema/v3.47.0.json +0 -0
  1407. /package/{es → dist/esm/src}/schemas/project-schema/v3.48.0.json +0 -0
  1408. /package/{es → dist/esm/src}/schemas/project-schema/v3.49.0.json +0 -0
  1409. /package/{es → dist/esm/src}/schemas/project-schema/v3.5.0.json +0 -0
  1410. /package/{es → dist/esm/src}/schemas/project-schema/v3.5.1.json +0 -0
  1411. /package/{es → dist/esm/src}/schemas/project-schema/v3.50.0.json +0 -0
  1412. /package/{es → dist/esm/src}/schemas/project-schema/v3.6.0.json +0 -0
  1413. /package/{es → dist/esm/src}/schemas/project-schema/v3.7.0.json +0 -0
  1414. /package/{es → dist/esm/src}/schemas/project-schema/v3.8.0.json +0 -0
  1415. /package/{es → dist/esm/src}/schemas/project-schema/v3.9.0.json +0 -0
  1416. /package/{es → dist/esm/src}/schemas/project-schema/v4.0.0.json +0 -0
  1417. /package/{es → dist/esm/src}/schemas/project-schema.json +0 -0
  1418. /package/{es → dist/esm/src}/schemas/user-schema.json +0 -0
@@ -1,1247 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.SERVICE_OBJECT_PATTERN_NAME = exports.DEFAULT_ID_FIELD = exports.BuiltInPropertiesProfile = void 0;
7
- exports.applyBuiltinPropertiesToShape = applyBuiltinPropertiesToShape;
8
- exports.applyDefaultsToSchema = applyDefaultsToSchema;
9
- exports.commonSchemaKeys = exports.arraySchemaKeys = void 0;
10
- exports.createLayerSchema = createLayerSchema;
11
- exports.createSchemaPropertyList = exports.createSchemaPropertyAccessor = void 0;
12
- exports.createShape = createShape;
13
- exports.emptySchema = emptySchema;
14
- exports.ensureQueryByShape = exports.ensureMutationByShape = void 0;
15
- exports.ensureShape = ensureShape;
16
- exports.ensureShapeById = ensureShapeById;
17
- exports.fieldMappingContainsKey = fieldMappingContainsKey;
18
- exports.filterGraphQLServiceMap = filterGraphQLServiceMap;
19
- exports.findMapping = findMapping;
20
- exports.findQueryByShape = exports.findMutationByShape = void 0;
21
- exports.getAllNamespaceShapes = getAllNamespaceShapes;
22
- exports.getAllRefs = getAllRefs;
23
- exports.getAllRefsInQueries = getAllRefsInQueries;
24
- exports.getAllRefsInQuery = getAllRefsInQuery;
25
- exports.getAllRefsInShapes = getAllRefsInShapes;
26
- exports.getAllValidRefs = getAllValidRefs;
27
- exports.getArgsReference = getArgsReference;
28
- exports.getArgsReferenceWithPath = getArgsReferenceWithPath;
29
- exports.getArgsShapeSchema = getArgsShapeSchema;
30
- exports.getBuiltInPropertyNames = getBuiltInPropertyNames;
31
- exports.getBuiltinsUsed = getBuiltinsUsed;
32
- exports.getCommonBuiltInProperties = getCommonBuiltInProperties;
33
- exports.getDefaultMutationName = void 0;
34
- exports.getFirstMapping = getFirstMapping;
35
- exports.getFullyQualifiedShapeName = getFullyQualifiedShapeName;
36
- exports.getGeneratorVersion = getGeneratorVersion;
37
- exports.getIdField = getIdField;
38
- exports.getModelBuiltInProperties = getModelBuiltInProperties;
39
- exports.getNamespacedShapeNameList = getNamespacedShapeNameList;
40
- exports.getPropertyService = getPropertyService;
41
- exports.getQueriesShape = getQueriesShape;
42
- exports.getQueryMapName = void 0;
43
- exports.getRelevantShapes = getRelevantShapes;
44
- exports.getServiceIdFieldName = getServiceIdFieldName;
45
- exports.getServiceInfo = getServiceInfo;
46
- exports.getShape = getShape;
47
- exports.getShapeById = getShapeById;
48
- exports.getShapeByRef = getShapeByRef;
49
- exports.getShapeDependencies = getShapeDependencies;
50
- exports.getShapeQueriesAndMutations = getShapeQueriesAndMutations;
51
- exports.getShapesById = getShapesById;
52
- exports.getStorageKey = getStorageKey;
53
- exports.isBuiltInPropertyName = void 0;
54
- exports.isBuiltinMutation = isBuiltinMutation;
55
- exports.isBuiltinQuery = isBuiltinQuery;
56
- exports.isBuiltinShape = isBuiltinShape;
57
- exports.isBuiltinType = isBuiltinType;
58
- exports.isCachedShape = isCachedShape;
59
- exports.isModelShape = isModelShape;
60
- exports.isValidRefItem = isValidRefItem;
61
- exports.objectSchemaKeys = exports.nonStructuralSchemaKeys = exports.multipleRelationshipSchemaKeys = void 0;
62
- exports.parseMapping = parseMapping;
63
- exports.pathBetween = pathBetween;
64
- exports.projectSchemaToJSONSchema = projectSchemaToJSONSchema;
65
- exports.queryToPropertySchema = queryToPropertySchema;
66
- exports.scalarSchemaKeys = void 0;
67
- exports.schemaMatchesShapeName = schemaMatchesShapeName;
68
- exports.shapeHasArrayPropOfShape = exports.schemaMetadataKeys = void 0;
69
- exports.shapeToPropertySchema = shapeToPropertySchema;
70
- exports.splitMapping = splitMapping;
71
- exports.visitSchemaProperties = visitSchemaProperties;
72
- exports.visitShapeProperties = visitShapeProperties;
73
- var _find = _interopRequireDefault(require("lodash/find"));
74
- var _mapValues = _interopRequireDefault(require("lodash/mapValues"));
75
- var _keyBy = _interopRequireDefault(require("lodash/keyBy"));
76
- var _curry = _interopRequireDefault(require("lodash/fp/curry"));
77
- var _orderBy2 = _interopRequireDefault(require("lodash/fp/orderBy"));
78
- var _uniq = _interopRequireDefault(require("lodash/uniq"));
79
- var _util = require("@takeshape/util");
80
- var _isEqual = _interopRequireDefault(require("lodash/isEqual"));
81
- var _isString = _interopRequireDefault(require("lodash/isString"));
82
- var _errors = require("@takeshape/errors");
83
- var _isArray = _interopRequireDefault(require("lodash/isArray"));
84
- var _some = _interopRequireDefault(require("lodash/some"));
85
- var _workflows = require("./workflows");
86
- var _versions = require("./versions");
87
- var _apiVersion = require("./api-version");
88
- var _builtinSchema = require("./builtin-schema");
89
- var _utils = require("./types/utils");
90
- var _services = require("./services");
91
- var _refs = require("./refs");
92
- var _unions = require("./unions");
93
- var _util2 = require("./util");
94
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
95
- const SERVICE_OBJECT_PATTERN_NAME = exports.SERVICE_OBJECT_PATTERN_NAME = 'pattern:service-object';
96
- function isBuiltinShape(shapeName) {
97
- return Boolean(_builtinSchema.builtInShapes[shapeName]);
98
- }
99
- const builtInQueriesAndMutations = getShapeQueriesAndMutations(Object.values(_builtinSchema.builtInShapes));
100
- function isBuiltinQuery(name) {
101
- return builtInQueriesAndMutations.queries[name] !== undefined;
102
- }
103
- function isBuiltinMutation(name) {
104
- return builtInQueriesAndMutations.mutations[name] !== undefined;
105
- }
106
- function isBuiltinType(projectSchema, refSchema) {
107
- const shapeName = (0, _refs.getRefShapeName)(projectSchema, refSchema);
108
- return shapeName !== undefined && isBuiltinShape(shapeName);
109
- }
110
- const schemaMetadataKeys = exports.schemaMetadataKeys = ['$comment', 'title', 'description', '@l10n', '@deprecationReason', '@tag', '@tags', '@syncLocaleStructure', '@sensitive'];
111
- const commonSchemaKeys = exports.commonSchemaKeys = ['type', 'default', 'readOnly', ...schemaMetadataKeys];
112
- const scalarSchemaKeys = exports.scalarSchemaKeys = [...commonSchemaKeys, 'format', 'oneOf', 'multipleOf', 'maximum', 'exclusiveMaximum', 'minimum', 'exclusiveMinimum', 'maxLength', 'minLength', 'pattern'];
113
- const objectSchemaKeys = exports.objectSchemaKeys = [...commonSchemaKeys, 'properties', 'required'];
114
- const arraySchemaKeys = exports.arraySchemaKeys = [...commonSchemaKeys, 'items', 'additionalItems', 'maxItems', 'minItems', 'uniqueItems'];
115
- const multipleRelationshipSchemaKeys = exports.multipleRelationshipSchemaKeys = [...schemaMetadataKeys, 'maxItems', 'minItems'];
116
-
117
- // All properties except properties, items, additionalItems
118
- const nonStructuralSchemaKeys = exports.nonStructuralSchemaKeys = [...scalarSchemaKeys, '@resolver', '@input', '@output', '@backreference', '@args', 'required', 'maxItems', 'minItems', 'uniqueItems'];
119
- function getServiceIdFieldName(serviceFieldName) {
120
- return `${serviceFieldName}Id`;
121
- }
122
- const generatorVersions = {
123
- [SERVICE_OBJECT_PATTERN_NAME]: '1'
124
- };
125
- function getGeneratorVersion(generator) {
126
- return generatorVersions[generator];
127
- }
128
-
129
- // Returns info for all services found in shape, keyed by provider
130
- function getServiceInfo(projectSchema, shape) {
131
- const result = {};
132
-
133
- // Get inline dependencies by not following refs with @resolver
134
- const inlineDepShapes = getShapeDependencies(projectSchema, shape, prop => !prop['@resolver']).map(name => projectSchema.shapes[name]);
135
- const shapesToCheck = [shape, ...inlineDepShapes];
136
- shapesToCheck.forEach(thisShape => {
137
- createSchemaPropertyList(projectSchema, thisShape).forEach(([key, value]) => {
138
- const resolver = value['@resolver'];
139
- if (!(0, _utils.isServiceResolver)(resolver)) {
140
- return;
141
- }
142
- const serviceConfig = (0, _services.getStoredServiceConfig)(projectSchema, resolver.service);
143
- if (!serviceConfig) {
144
- return;
145
- }
146
- const {
147
- provider
148
- } = serviceConfig;
149
- const generators = {};
150
- const tag = value['@tag'];
151
- if (tag?.startsWith(SERVICE_OBJECT_PATTERN_NAME)) {
152
- const idFieldName = getServiceIdFieldName(key);
153
- const version = tag.substr(tag.lastIndexOf(':') + 1);
154
- generators[SERVICE_OBJECT_PATTERN_NAME] = {
155
- version,
156
- currentVersion: getGeneratorVersion(SERVICE_OBJECT_PATTERN_NAME),
157
- idFieldName,
158
- serviceObjectType: resolver.fieldName
159
- };
160
- }
161
- const serviceInfo = {
162
- service: resolver.service,
163
- fieldName: key,
164
- path: pathBetween(shape, thisShape, projectSchema),
165
- generators
166
- };
167
- if (Array.isArray(result[provider])) {
168
- // Dedupe service info
169
- if (!result[provider].find(existingServiceInfo => (0, _isEqual.default)(existingServiceInfo, serviceInfo))) {
170
- result[provider].push(serviceInfo);
171
- }
172
- } else {
173
- result[provider] = [serviceInfo];
174
- }
175
- });
176
- });
177
- return result;
178
- }
179
-
180
- // Follow refs to find the path between two shapes in a schema
181
- function pathBetween(fromShape, toShape, projectSchema, depthLimit = 4) {
182
- if (fromShape.name === toShape.name) {
183
- return [];
184
- }
185
- const toShapeName = toShape.name;
186
- let shortestPath;
187
- let shortestPathLength = Number.MAX_SAFE_INTEGER;
188
- const pathBetweenHelper = (schema, pathSoFar, seen, depth) => {
189
- if (depth > depthLimit) {
190
- return;
191
- }
192
- if (schema.items) {
193
- pathBetweenHelper(schema.items, pathSoFar, seen, depth);
194
- return;
195
- }
196
- const refItem = (0, _refs.getRef)(projectSchema, schema);
197
- if (refItem) {
198
- const referenced = (0, _refs.refItemToShape)(projectSchema, refItem);
199
- if (referenced) {
200
- if (referenced.name === toShapeName && pathSoFar.length < shortestPathLength) {
201
- shortestPath = pathSoFar;
202
- shortestPathLength = pathSoFar.length;
203
- } else if (!seen.has(referenced.name)) {
204
- pathBetweenHelper(referenced.schema, pathSoFar, new Set([...seen, referenced.name]), depth);
205
- }
206
- }
207
- } else if (pathSoFar.length + 1 < shortestPathLength && (schema.oneOf ?? schema.allOf ?? schema.properties)) {
208
- if (schema.oneOf) {
209
- for (const itemSchema of schema.oneOf) {
210
- pathBetweenHelper(itemSchema, pathSoFar, seen, depth);
211
- }
212
- } else {
213
- for (const [propName, propSchema] of createSchemaPropertyList(projectSchema, schema).getNodes()) {
214
- pathBetweenHelper(propSchema, pathSoFar.concat(String(propName)), seen, depth + 1);
215
- }
216
- }
217
- }
218
- };
219
- pathBetweenHelper(fromShape.schema, [], new Set([fromShape.name]), 0);
220
- if (!shortestPath) {
221
- throw new Error(`No path between ${fromShape.name} and ${toShape.name}`);
222
- }
223
- return shortestPath;
224
- }
225
- function getShapeQueriesAndMutations(shapes) {
226
- const queries = {};
227
- const mutations = {};
228
- for (const shape of (0, _util.ensureArray)(shapes)) {
229
- const {
230
- name,
231
- model
232
- } = shape;
233
- const service = 'shapedb';
234
- if (model) {
235
- const isSingleton = model.type === 'single';
236
- queries[`get${name}`] = {
237
- shape: name,
238
- resolver: {
239
- name: 'shapedb:get',
240
- service,
241
- shapeName: name
242
- },
243
- description: `Get a ${name} by ID`,
244
- args: isSingleton ? (0, _refs.createTemplateShapeName)('TSGetSingletonArgs', name) : (0, _refs.createTemplateShapeName)('TSGetArgs', name)
245
- };
246
- mutations[`update${name}`] = {
247
- shape: (0, _refs.createTemplateShapeName)('UpdateResult', name),
248
- resolver: {
249
- name: 'shapedb:update',
250
- service,
251
- shapeName: name
252
- },
253
- description: `Update ${name}`,
254
- args: (0, _refs.createTemplateShapeName)('UpdateArgs', name)
255
- };
256
- if (!isSingleton) {
257
- queries[`get${name}List`] = {
258
- shape: (0, _refs.createTemplateShapeName)('PaginatedList', name),
259
- resolver: {
260
- name: 'shapedb:list',
261
- service,
262
- shapeName: name
263
- },
264
- description: `Returns a list ${name} in natural order.`,
265
- args: (0, _refs.createTemplateShapeName)('TSListArgs', name)
266
- };
267
- mutations[`create${name}`] = {
268
- shape: (0, _refs.createTemplateShapeName)('CreateResult', name),
269
- resolver: {
270
- name: 'shapedb:create',
271
- service,
272
- shapeName: name
273
- },
274
- description: `Create ${name}`,
275
- args: (0, _refs.createTemplateShapeName)('CreateArgs', name)
276
- };
277
- mutations[`duplicate${name}`] = {
278
- shape: (0, _refs.createTemplateShapeName)('DuplicateResult', name),
279
- resolver: {
280
- name: 'shapedb:duplicate',
281
- service,
282
- shapeName: name
283
- },
284
- description: `Duplicate ${name}`,
285
- args: (0, _refs.createTemplateShapeName)('DuplicateArgs', name)
286
- };
287
- mutations[`delete${name}`] = {
288
- shape: (0, _refs.createTemplateShapeName)('DeleteResult', name),
289
- resolver: {
290
- name: 'shapedb:delete',
291
- service,
292
- shapeName: name
293
- },
294
- description: `Delete ${name}`,
295
- args: (0, _refs.createTemplateShapeName)('DeleteArgs', name)
296
- };
297
- }
298
- }
299
- }
300
- return {
301
- queries,
302
- mutations
303
- };
304
- }
305
- function getCommonBuiltInProperties(shape) {
306
- return {
307
- _id: {
308
- title: 'Id',
309
- type: 'string'
310
- },
311
- _shapeId: {
312
- type: 'string',
313
- title: 'Shape Id',
314
- enum: [shape.id]
315
- }
316
- };
317
- }
318
- const DEFAULT_ID_FIELD = exports.DEFAULT_ID_FIELD = 'id';
319
- function getIdField(obj) {
320
- return obj?.idField ?? DEFAULT_ID_FIELD;
321
- }
322
-
323
- /**
324
- * Get properties necessary for cached / remote data to work with the TSSearchable interface.
325
- */
326
- function getCachedBuiltInProperties(projectSchema, shape, properties) {
327
- const idField = getIdField(shape.cache);
328
-
329
- // TODO Implement `searchSummary` and `_shapeId` here, and remove `getRemoteShapeTSSearchableFields`
330
- return {
331
- _id: {
332
- title: 'Id',
333
- type: 'string',
334
- ...properties._id,
335
- ...(properties[idField]?.['@mapping'] ? {
336
- '@mapping': properties[idField]['@mapping']
337
- } : {})
338
- }
339
- };
340
- }
341
- function getModelBuiltInProperties(projectSchema, shape) {
342
- const apiVersion = projectSchema.apiVersion ?? _versions.CURRENT_API_VERSION;
343
- const showDeprecationReason = apiVersion !== '1';
344
- const properties = {
345
- _version: {
346
- title: 'Version',
347
- type: 'integer'
348
- },
349
- _shapeName: {
350
- title: 'Shape Name',
351
- type: 'string'
352
- },
353
- _createdAt: {
354
- title: 'Created',
355
- type: 'string',
356
- format: 'date-time'
357
- },
358
- _createdBy: {
359
- title: 'Created By',
360
- '@ref': 'local:TSUser',
361
- '@input': {
362
- type: 'string'
363
- },
364
- '@resolver': {
365
- name: 'takeshape:getUser',
366
- service: 'takeshape'
367
- }
368
- },
369
- _updatedAt: {
370
- title: 'Updated',
371
- type: 'string',
372
- format: 'date-time'
373
- },
374
- _updatedBy: {
375
- title: 'Updated By',
376
- '@ref': 'local:TSUser',
377
- '@input': {
378
- type: 'string'
379
- },
380
- '@resolver': {
381
- name: 'takeshape:getUser',
382
- service: 'takeshape'
383
- }
384
- },
385
- _schemaVersion: {
386
- title: 'Schema Version',
387
- type: 'number'
388
- },
389
- _enabled: {
390
- title: 'Enabled',
391
- type: 'boolean',
392
- ...(showDeprecationReason ? {
393
- '@deprecationReason': 'Use _status instead'
394
- } : {})
395
- },
396
- _enabledAt: {
397
- title: 'Enabled Date',
398
- type: 'string',
399
- format: 'date-time',
400
- ...(showDeprecationReason ? {
401
- '@deprecationReason': 'Use a custom date field instead'
402
- } : {})
403
- }
404
- };
405
- if ((0, _apiVersion.workflowsEnabled)(apiVersion)) {
406
- return {
407
- ...properties,
408
- _status: {
409
- ...(projectSchema.workflows && (0, _workflows.getStatusField)(projectSchema.workflows, shape))
410
- }
411
- };
412
- }
413
- return properties;
414
- }
415
-
416
- /**
417
- * Return all the built in property names,
418
- */
419
- function getBuiltInPropertyNames(profile = BuiltInPropertiesProfile.Model) {
420
- const fakeShape = {
421
- id: 'shape-id'
422
- };
423
- let keys = [...Object.keys(getCommonBuiltInProperties(fakeShape))];
424
- if (profile === BuiltInPropertiesProfile.Model) {
425
- keys = [...keys, ...Object.keys(getModelBuiltInProperties({}, fakeShape))];
426
- }
427
- return new Set(keys);
428
- }
429
- let BuiltInPropertiesProfile = exports.BuiltInPropertiesProfile = /*#__PURE__*/function (BuiltInPropertiesProfile) {
430
- BuiltInPropertiesProfile[BuiltInPropertiesProfile["Model"] = 0] = "Model";
431
- BuiltInPropertiesProfile[BuiltInPropertiesProfile["Cached"] = 1] = "Cached";
432
- BuiltInPropertiesProfile[BuiltInPropertiesProfile["None"] = 2] = "None";
433
- return BuiltInPropertiesProfile;
434
- }({});
435
- const BUILT_IN_PROPERTY_NAMES = {
436
- [BuiltInPropertiesProfile.Model]: getBuiltInPropertyNames(BuiltInPropertiesProfile.Model),
437
- [BuiltInPropertiesProfile.Cached]: getBuiltInPropertyNames(BuiltInPropertiesProfile.Cached),
438
- [BuiltInPropertiesProfile.None]: getBuiltInPropertyNames(BuiltInPropertiesProfile.None)
439
- };
440
- const isBuiltInPropertyName = (name, profile = BuiltInPropertiesProfile.Model) => {
441
- return BUILT_IN_PROPERTY_NAMES[profile].has(name);
442
- };
443
-
444
- /**
445
- * Get the profile to use for loading built-in properties
446
- */
447
- exports.isBuiltInPropertyName = isBuiltInPropertyName;
448
- function getBuiltInPropertiesProfile(shape) {
449
- if (isModelShape(shape)) {
450
- return BuiltInPropertiesProfile.Model;
451
- }
452
- if (isCachedShape(shape)) {
453
- return BuiltInPropertiesProfile.Cached;
454
- }
455
- return BuiltInPropertiesProfile.None;
456
- }
457
- function applyBuiltinPropertiesToShape(projectSchema, shape) {
458
- const profile = getBuiltInPropertiesProfile(shape);
459
- if (profile === BuiltInPropertiesProfile.None) {
460
- return shape;
461
- }
462
- const shapeObjectSchema = (0, _refs.dereferenceObjectSchema)(projectSchema, shape.schema, ['shapes', shape.name]);
463
- const {
464
- properties
465
- } = shapeObjectSchema;
466
- const commonProperties = getCommonBuiltInProperties(shape);
467
- const modelProperties = profile === BuiltInPropertiesProfile.Model ? getModelBuiltInProperties(projectSchema, shape) : undefined;
468
- const cachedProperties = profile === BuiltInPropertiesProfile.Cached ? getCachedBuiltInProperties(projectSchema, shape, properties) : undefined;
469
- return {
470
- ...shape,
471
- schema: {
472
- ...shapeObjectSchema,
473
- properties: {
474
- ...properties,
475
- ...commonProperties,
476
- ...modelProperties,
477
- ...cachedProperties
478
- }
479
- }
480
- };
481
- }
482
-
483
- // Dependencies of these built-in shapes are automatically added by getBuiltinsUsed
484
- const requiredBuiltinShapes = ['Asset', 'TSRelationship', 'TSStaticSite', 'TSUser'];
485
-
486
- /**
487
- * Get all built-in shapes that are depended on by the given project schema.
488
- * Required built-in shapes are always included.
489
- */
490
- function getBuiltinsUsed(projectSchema) {
491
- const builtinsUsed = {};
492
- const shapeNames = (0, _uniq.default)(requiredBuiltinShapes.concat(getAllRefs(projectSchema, refItem => refItem.serviceKey === 'local' && isBuiltinShape(refItem.typeName)).map(_refs.refItemToNamespacedShapeName)));
493
- const schemaWithAllBuiltins = {
494
- ...emptySchema('project-id'),
495
- shapes: _builtinSchema.builtInShapes
496
- };
497
- shapeNames.forEach(builtinShapeName => {
498
- builtinsUsed[builtinShapeName] = _builtinSchema.builtInShapes[builtinShapeName];
499
- getShapeDependencies(schemaWithAllBuiltins, _builtinSchema.builtInShapes[builtinShapeName]).forEach(depShapeName => {
500
- builtinsUsed[depShapeName] = _builtinSchema.builtInShapes[depShapeName];
501
- });
502
- });
503
- return builtinsUsed;
504
- }
505
- function applyDefaultsToSchema(projectSchema) {
506
- const builtinsUsed = getBuiltinsUsed(projectSchema);
507
- return {
508
- ...projectSchema,
509
- workflows: {
510
- ...projectSchema.workflows,
511
- ...((0, _apiVersion.workflowsEnabled)(projectSchema.apiVersion) && {
512
- default: _workflows.defaultWorkflow
513
- })
514
- },
515
- queries: {
516
- ...builtInQueriesAndMutations.queries,
517
- ...projectSchema.queries
518
- },
519
- mutations: {
520
- ...builtInQueriesAndMutations.mutations,
521
- ...projectSchema.mutations
522
- },
523
- shapes: (0, _mapValues.default)({
524
- ...builtinsUsed,
525
- ...projectSchema.shapes
526
- }, shape => {
527
- const builtInShape = builtinsUsed[shape.name];
528
- if (builtInShape && builtInShape !== shape) {
529
- shape = {
530
- ...shape,
531
- schema: (0, _util2.mergeSchemaProperties)((0, _refs.dereferenceObjectSchema)(projectSchema, shape.schema), (0, _refs.dereferenceObjectSchema)(projectSchema, builtInShape.schema))
532
- };
533
- }
534
- return applyBuiltinPropertiesToShape(projectSchema, shape);
535
- }),
536
- forms: (0, _mapValues.default)({
537
- ..._builtinSchema.builtInForms,
538
- ...projectSchema.forms
539
- }, (formsConfig, shapeName) => {
540
- const builtInFormsConfig = _builtinSchema.builtInForms[shapeName];
541
- if (builtInFormsConfig && builtInFormsConfig !== formsConfig) {
542
- formsConfig = {
543
- ...formsConfig,
544
- default: (0, _util2.mergeFormProperties)(formsConfig.default, builtInFormsConfig.default)
545
- };
546
- }
547
- return formsConfig;
548
- })
549
- };
550
- }
551
- function getShapeById(projectSchema, shapeId) {
552
- return (0, _find.default)(projectSchema.shapes, shape => shape.id === shapeId);
553
- }
554
- function getShapeByRef(projectSchema, shapeRef) {
555
- return (0, _refs.refItemToShape)(projectSchema, (0, _refs.atRefToRefItem)(projectSchema, shapeRef));
556
- }
557
- function ensureShapeById(projectSchema, shapeId) {
558
- const shape = getShapeById(projectSchema, shapeId);
559
- if (!shape) {
560
- throw new _errors.NotFoundError(`Shape with id "${shapeId}" Not found`);
561
- }
562
- return shape;
563
- }
564
- function getShape(context, name) {
565
- return context.shapes[name];
566
- }
567
- function ensureShape(projectSchema, name) {
568
- const shape = getShape(projectSchema, name);
569
- if (!shape) {
570
- throw new _errors.NotFoundError(`Shape "${name}" Not found`);
571
- }
572
- return shape;
573
- }
574
- function isModelShape(shape) {
575
- return Boolean(shape.model);
576
- }
577
- function isCachedShape(shape) {
578
- return shape.cache?.enabled === true && shape.loaders !== undefined;
579
- }
580
- function getArgsReference(projectSchema, argsSchema) {
581
- const args = (0, _util2.getArgs)(argsSchema);
582
- if (args && typeof args === 'string') {
583
- // @args: ShapeName OR Namespace_TypeName
584
- return (0, _refs.refExpressionToRefItem)(projectSchema, args);
585
- }
586
- }
587
- function getArgsReferenceWithPath(context, argsSchema, schemaPath = []) {
588
- const refItem = getArgsReference(context, argsSchema);
589
- if (refItem) {
590
- const argsType = (0, _utils.getArgsType)(argsSchema);
591
- return {
592
- ...refItem,
593
- path: schemaPath.concat([argsType])
594
- };
595
- }
596
- }
597
- function getArgsShapeSchema(context, argsSchema) {
598
- const args = (0, _util2.getArgs)(argsSchema);
599
- if (args) {
600
- if (typeof args === 'string') {
601
- const refItem = getArgsReference(context, argsSchema);
602
- if (refItem) {
603
- return (0, _refs.refItemToShapeSchema)(context, refItem);
604
- }
605
- } else {
606
- return args;
607
- }
608
- }
609
- }
610
- const createShapeToPropertySchema = (projectSchema, definitions, definitionNames, {
611
- useShapeIdDiscriminator
612
- }) => {
613
- const rewriteRefs = shape => {
614
- const handleSchema = propSchema => {
615
- // Unwrap array schema
616
- propSchema = propSchema.items ?? propSchema;
617
- if ((0, _utils.isOneOfSchema)(propSchema)) {
618
- const isUnion = (0, _unions.isUnionSchema)(propSchema);
619
- if (useShapeIdDiscriminator && isUnion) {
620
- propSchema.discriminator = {
621
- propertyName: '_shapeId'
622
- };
623
- propSchema.required = ['_shapeId'];
624
- }
625
- propSchema.oneOf.forEach(schema => {
626
- handleSchema(schema);
627
- });
628
- return;
629
- }
630
-
631
- // Add workflow validation
632
- if (propSchema['@workflow']) {
633
- const workflowName = propSchema['@workflow'];
634
- const workflow = projectSchema.workflows[workflowName] || _workflows.defaultWorkflow;
635
- propSchema.oneOf = workflow.steps.map(step => ({
636
- enum: [step.key, step.name],
637
- title: step.title
638
- }));
639
- }
640
- const refItem = (0, _refs.getRef)(projectSchema, propSchema);
641
- if (refItem) {
642
- const shapeName = (0, _refs.refItemToNamespacedShapeName)(refItem);
643
- const shape = (0, _refs.refItemToShape)(projectSchema, refItem);
644
- if (shape) {
645
- delete propSchema['@ref'];
646
- propSchema.$ref = `#/definitions/${shapeName}`;
647
- if (!definitionNames.has(shapeName)) {
648
- definitionNames.add(shapeName);
649
- const rewritten = rewriteRefs(shape);
650
- if (useShapeIdDiscriminator && (0, _utils.isObjectSchema)(rewritten)) {
651
- rewritten.properties._shapeId = {
652
- type: 'string',
653
- enum: [shape.id]
654
- };
655
- }
656
- definitions[shapeName] = rewritten;
657
- }
658
- }
659
- }
660
- };
661
- const shapeSchema = (0, _util.deepClone)(shape.schema);
662
- if ((0, _utils.isOneOfSchema)(shapeSchema)) {
663
- handleSchema(shapeSchema);
664
- return shapeSchema;
665
- }
666
- if (shapeSchema.enum) {
667
- return shapeSchema;
668
- }
669
- const shapeSchemaCopy = (0, _refs.dereferenceObjectSchema)(projectSchema, shapeSchema);
670
- if (shape.title) {
671
- shapeSchemaCopy.title = shape.title;
672
- }
673
- Object.values(shapeSchemaCopy.properties).forEach(schema => {
674
- handleSchema(schema);
675
- });
676
- return shapeSchemaCopy;
677
- };
678
- return rewriteRefs;
679
- };
680
- function shapeToPropertySchema(projectSchema, shape) {
681
- const definitions = {};
682
- const definitionNames = new Set();
683
- const convert = createShapeToPropertySchema(projectSchema, definitions, definitionNames, {
684
- useShapeIdDiscriminator: true
685
- });
686
- return {
687
- ...convert(shape),
688
- definitions
689
- };
690
- }
691
- function projectSchemaToJSONSchema(projectSchema) {
692
- const definitions = {};
693
- const definitionNames = new Set();
694
- const convert = createShapeToPropertySchema(projectSchema, definitions, definitionNames, {
695
- useShapeIdDiscriminator: false
696
- });
697
- for (const shape of Object.values(projectSchema.shapes)) {
698
- definitions[shape.name] = convert(shape);
699
- definitionNames.add(shape.name);
700
- }
701
- return {
702
- definitions
703
- };
704
- }
705
- function getShapeDependencies(projectSchema, shape, predicate) {
706
- const shapeNames = new Set();
707
- const findDependencies = schema => {
708
- const shouldFollow = Boolean(!predicate || predicate(schema));
709
- if (shouldFollow) {
710
- schema = schema.items ?? schema;
711
- const refItem = (0, _refs.getRef)(projectSchema, schema);
712
- if (refItem) {
713
- const refShape = (0, _refs.refItemToShape)(projectSchema, refItem);
714
- if (refShape && !shapeNames.has(refShape.name)) {
715
- shapeNames.add(refShape.name);
716
- findDependencies((0, _refs.dereferenceSchema)(projectSchema, refShape.schema, ['shapes', refShape.name]));
717
- }
718
- } else if ((0, _utils.isObjectSchema)(schema) || (0, _utils.isAllOfSchema)(schema) || (0, _utils.isOneOfSchema)(schema)) {
719
- visitSchemaProperties(schema, [], findDependencies);
720
- }
721
- }
722
- return shouldFollow;
723
- };
724
- findDependencies(shape.schema);
725
- return [...shapeNames];
726
- }
727
- function getRelevantShapes(projectSchema, params) {
728
- const {
729
- shapeIds,
730
- shapeNames,
731
- byId = false,
732
- includeDependencies = true
733
- } = params;
734
- if (Boolean(shapeNames?.length) || Boolean(shapeIds?.length)) {
735
- const ids = new Set(shapeIds);
736
- const names = new Set(shapeNames);
737
- const shapes = {};
738
- for (const shape of Object.values(projectSchema.shapes)) {
739
- if (ids.has(shape.id) || names.has(shape.name)) {
740
- const shapeNames = includeDependencies ? [shape.name].concat(getShapeDependencies(projectSchema, shape)) : [shape.name];
741
- for (const shapeName of shapeNames) {
742
- const dependentShape = projectSchema.shapes[shapeName];
743
- shapes[byId ? dependentShape.id : dependentShape.name] = dependentShape;
744
- }
745
- }
746
- }
747
- return shapes;
748
- }
749
- return {};
750
- }
751
-
752
- /**
753
- * Visitor callback return false to stop iterating
754
- */
755
-
756
- function visitSchemaProperties(root, path, callback) {
757
- const visitEach = (entries, path) => {
758
- for (const [name, propSchema] of entries) {
759
- const newPath = [...path, name];
760
- visit(propSchema, newPath);
761
- }
762
- };
763
- const visit = (schema, path) => {
764
- if (schema !== root && callback(schema, path) === false) {
765
- return;
766
- }
767
- if ((0, _utils.isArraySchema)(schema)) {
768
- visit(schema.items, [...path, 'items']);
769
- } else if ((0, _utils.isObjectSchema)(schema)) {
770
- visitEach(Object.entries(schema.properties), [...path, 'properties']);
771
- } else if ((0, _utils.isExtendsSchema)(schema)) {
772
- visitEach(Object.entries(schema.extends), [...path, 'extends']);
773
- } else if ((0, _utils.isAllOfSchema)(schema)) {
774
- visitEach(Object.entries(schema.allOf), [...path, 'allOf']);
775
- } else if ((0, _utils.isOneOfSchema)(schema)) {
776
- visitEach(Object.entries(schema.oneOf), [...path, 'oneOf']);
777
- }
778
- };
779
- visit(root, path);
780
- }
781
- function visitShapeProperties(shapes, callback) {
782
- for (const [shapeName, shape] of Object.entries(shapes)) {
783
- visitSchemaProperties(shape.schema, ['shapes', shapeName, 'schema'], callback);
784
- }
785
- }
786
- function addRef(refs, ref, predicate) {
787
- if (ref && (!predicate || predicate(ref))) {
788
- refs.push(ref);
789
- }
790
- }
791
-
792
- /**
793
- * Walk through a `ProjectSchemaJSON` and collect all the `ref`s.
794
- */
795
- function getAllRefsInShapes(projectSchema, predicate) {
796
- const items = [];
797
- const refPropNames = ['$ref', '@ref', '@args', 'args', 'interfaces'];
798
- (0, _util.visit)(projectSchema.shapes, refPropNames, (interfaces, refPath) => {
799
- const propName = refPath[refPath.length - 1];
800
- const path = ['shapes', ...refPath];
801
- if (propName === 'interfaces' && (0, _isArray.default)(interfaces)) {
802
- interfaces.forEach((interfaceRefExpression, index) => {
803
- addRef(items, {
804
- ...(0, _refs.refExpressionToRefItem)(projectSchema, interfaceRefExpression),
805
- path: [...path, index]
806
- }, predicate);
807
- });
808
- }
809
-
810
- // The client sometimes generates invalid schemas, like refs that are
811
- // undefined. Treat ref as unknown and toss those out.
812
- // See the `useShapeEditor > can deal with renames test`
813
- if (!(0, _isString.default)(interfaces)) {
814
- return;
815
- }
816
- if (propName === '@ref') {
817
- const {
818
- shapeName,
819
- template
820
- } = (0, _refs.parseTemplateShape)(interfaces);
821
- addRef(items, {
822
- ...(0, _refs.atRefToRefItem)(projectSchema, shapeName, template),
823
- path
824
- }, predicate);
825
- } else if (propName === '$ref') {
826
- addRef(items, {
827
- ...(0, _refs.refToRefItem)(projectSchema, interfaces),
828
- path
829
- }, predicate);
830
- } else if (propName === '@args' || propName === 'args') {
831
- addRef(items, {
832
- ...(0, _refs.refExpressionToRefItem)(projectSchema, interfaces),
833
- path
834
- }, predicate);
835
- }
836
- });
837
- return items;
838
- }
839
-
840
- /**
841
- * Get all refs
842
- */
843
- function getAllRefsInQuery(projectSchema, queryPath, query, predicate) {
844
- const refItems = [];
845
- const propertyVisitor = (propSchema, propSchemaPath) => {
846
- addRef(refItems, (0, _refs.getRefOrItemsRef)(projectSchema, propSchema, propSchemaPath), predicate);
847
- };
848
- if (query.args && typeof query.args === 'string') {
849
- addRef(refItems, getArgsReferenceWithPath(projectSchema, query, queryPath), predicate);
850
- }
851
- if (query.args && typeof query.args === 'object') {
852
- visitSchemaProperties((0, _refs.dereferenceObjectSchema)(projectSchema, query.args), [...queryPath, 'args'], propertyVisitor);
853
- }
854
- if (query.shape) {
855
- const {
856
- isArray,
857
- ref
858
- } = (0, _refs.parseReturnShape)(projectSchema, query.shape);
859
- if (ref) {
860
- addRef(refItems, {
861
- ...ref,
862
- path: queryPath.concat(isArray ? ['shape', 'items', '@ref'] : ['shape'])
863
- }, predicate);
864
- }
865
- }
866
- return refItems;
867
- }
868
-
869
- /**
870
- * Collect refs from `queries` or `mutations`.
871
- */
872
- function getAllRefsInQueries(projectSchema, rootPropertyName, predicate) {
873
- const refItems = [];
874
- const rootPath = [rootPropertyName];
875
- for (const [queryName, query] of Object.entries(projectSchema[rootPropertyName])) {
876
- const queryPath = rootPath.concat([queryName]);
877
- const queryRefs = getAllRefsInQuery(projectSchema, queryPath, query, predicate);
878
- if (queryRefs.length) {
879
- refItems.push(...queryRefs);
880
- }
881
- }
882
- return refItems;
883
- }
884
-
885
- /**
886
- * Get all refs in a ProjectSchemaJSON
887
- * @param predicate return true to include the ref in
888
- */
889
- function getAllRefs(projectSchema, predicate) {
890
- return [...getAllRefsInShapes(projectSchema, predicate), ...getAllRefsInQueries(projectSchema, 'queries', predicate), ...getAllRefsInQueries(projectSchema, 'mutations', predicate)];
891
- }
892
- function isValidRefItem(refItem) {
893
- return refItem.isValidService;
894
- }
895
-
896
- /**
897
- * Get all valid refs in a ProjectSchemaJSON
898
- * @param predicate return true to include the ref in
899
- */
900
- function getAllValidRefs(projectSchema, predicate) {
901
- return getAllRefs(projectSchema, predicate).filter(isValidRefItem);
902
- }
903
- function parseMapping(mapping) {
904
- const [providerId, serviceId, coordinate] = mapping.split(':');
905
- const [shapeName, key] = coordinate.split('.');
906
- return {
907
- providerId,
908
- serviceId,
909
- shapeName,
910
- key
911
- };
912
- }
913
- function splitMapping(mapping) {
914
- const parts = mapping.split('.');
915
- return [parts[0], parts.slice(1).join('.')];
916
- }
917
- function findMapping(schema, predicate) {
918
- const mapping = schema['@mapping'];
919
- if (Array.isArray(mapping)) {
920
- return mapping.find(predicate);
921
- }
922
- return mapping && predicate(mapping) ? mapping : undefined;
923
- }
924
- function getFirstMapping(schema) {
925
- return Array.isArray(schema['@mapping']) ? schema['@mapping'][0] : schema['@mapping'];
926
- }
927
- function getFullyQualifiedShapeName(schema) {
928
- const first = getFirstMapping(schema);
929
- return first ? splitMapping(first)[0] : undefined;
930
- }
931
-
932
- /**
933
- * Find key for use storing data in ShapeDB or API Indexing this allows renaming of properties without db migration
934
- * Mapping must be using the shapedb service id
935
- * @param schema
936
- */
937
- function getStorageKey(schema) {
938
- const first = findMapping(schema, mapping => mapping.startsWith('shapedb:'));
939
- return first ? splitMapping(first)[1] : undefined;
940
- }
941
- function getPropertyService(schema) {
942
- const first = getFirstMapping(schema);
943
- const split = first?.split(':');
944
- return split ? `${split[0]}:${split[1]}` : undefined;
945
- }
946
- function emptySchema(projectId) {
947
- return {
948
- projectId,
949
- defaultLocale: 'en-us',
950
- locales: ['en-us'],
951
- apiVersion: '2',
952
- schemaVersion: _versions.CURRENT_SCHEMA_VERSION,
953
- queries: {},
954
- mutations: {},
955
- shapes: {},
956
- workflows: {},
957
- forms: {}
958
- };
959
- }
960
- function createLayerSchema(partialSchema) {
961
- return {
962
- schemaVersion: _versions.CURRENT_SCHEMA_VERSION,
963
- queries: {},
964
- mutations: {},
965
- shapes: {},
966
- ...partialSchema
967
- };
968
- }
969
- function getShapesById(projectSchema) {
970
- return (0, _keyBy.default)(Object.values(projectSchema.shapes), 'id');
971
- }
972
-
973
- /**
974
- * Walk through the project schema and return an array of all
975
- * referenced shape names that are in a service namespace.
976
- *
977
- * @param projectSchema A V3 project schema.
978
- *
979
- * @returns A `string` array with all the shapes that are in namespaces.
980
- */
981
- function getAllNamespaceShapes(projectSchema) {
982
- const isServiceRef = refItem => Boolean(refItem.serviceNamespace);
983
- return (0, _uniq.default)(getAllValidRefs(projectSchema, isServiceRef).map(_refs.refItemToNamespacedShapeName));
984
- }
985
-
986
- /**
987
- * Returns a list of all shape names in a service namespace, excluding any
988
- * that have been set directly in the project schema
989
- *
990
- * @todo It's unsound to discard dependencies in this way, should avoid
991
- * collisions with aliases or similar any remote shape that collides,
992
- * e.g., Shopify_Product -> Shopify_Product_2
993
- *
994
- * @param projectSchema A V3 project schema with remote service configs.
995
- *
996
- * @returns A `Set` of shape names.
997
- */
998
- function getNamespacedShapeNameList(projectSchema) {
999
- const requiredShapeNames = new Set();
1000
-
1001
- // All the shape names
1002
- const existingShapeNames = new Set(Object.keys(projectSchema.shapes));
1003
-
1004
- // All the referenced shape names with namespaces that belong to a service
1005
- const namespacedShapeNames = new Set(getAllNamespaceShapes(projectSchema));
1006
-
1007
- // Add all namespaced shapes to the schema if they are not already present,
1008
- // e.g. Shopify_Product
1009
- namespacedShapeNames.forEach(name => {
1010
- if (!existingShapeNames.has(name)) {
1011
- requiredShapeNames.add(name);
1012
- }
1013
- });
1014
- return requiredShapeNames;
1015
- }
1016
-
1017
- /**
1018
- * Filter the service map to return only services passing the GraphQL Service
1019
- * typeguard.
1020
- *
1021
- * @param serviceMap A service map.
1022
- *
1023
- * @returns A new map with the filtered list of services
1024
- */
1025
- function filterGraphQLServiceMap(serviceMap) {
1026
- const filtered = new Map();
1027
- for (const [serviceKey, serviceConfig] of serviceMap) {
1028
- if (serviceConfig.serviceType === 'graphql') {
1029
- filtered.set(serviceKey, serviceConfig);
1030
- }
1031
- }
1032
- return filtered;
1033
- }
1034
-
1035
- /**
1036
- * Creates a schema property list chainable fn, allowing you to manipulate and
1037
- * iterate the properties in a schema.
1038
- */
1039
- const createSchemaPropertyList = exports.createSchemaPropertyList = (0, _curry.default)((context, shapeOrSchema) => {
1040
- const propSchema = isShape(shapeOrSchema) ? shapeOrSchema.schema : shapeOrSchema;
1041
- const schema = (0, _refs.dereferenceSchema)(context, propSchema, isShape(shapeOrSchema) ? ['shapes', shapeOrSchema.name] : undefined);
1042
- const propertyIterator = new Map((0, _utils.isObjectSchema)(schema) ? Object.entries(schema.properties) : undefined);
1043
- const defaultOrderByIteratees = [n => n[0]];
1044
- const defaultOrderByOrders = ['asc'];
1045
- const _orderBy = (iteratees = defaultOrderByIteratees, orders = defaultOrderByOrders) => {
1046
- self._propertyIterator = new Map((0, _orderBy2.default)(iteratees, orders, Array.from(self._propertyIterator)));
1047
- return self;
1048
- };
1049
- const _sortWith = comparator => {
1050
- self._propertyIterator = new Map(Array.from(self._propertyIterator).sort(comparator));
1051
- return self;
1052
- };
1053
- const _sortByNamesWithList = comparatorArray => {
1054
- // If no array is provided, the original sort is preserved
1055
- if (comparatorArray) {
1056
- self._propertyIterator = new Map(Array.from(self._propertyIterator).filter(([name]) => comparatorArray.includes(name)).sort(([nameA], [nameB]) => {
1057
- const indexA = comparatorArray.indexOf(nameA);
1058
- const indexB = comparatorArray.indexOf(nameB);
1059
- return (indexA > -1 ? indexA : Infinity) - (indexB > -1 ? indexB : Infinity);
1060
- }));
1061
- }
1062
- return self;
1063
- };
1064
- const _filterBy = predicate => {
1065
- self._propertyIterator = new Map(Array.from(self._propertyIterator).filter(predicate));
1066
- return self;
1067
- };
1068
- const _forEach = iteratee => {
1069
- Array.from(self._propertyIterator).forEach(iteratee);
1070
- return self;
1071
- };
1072
- const _getNodes = () => {
1073
- return Array.from(self._propertyIterator);
1074
- };
1075
- const _getObject = () => {
1076
- return Array.from(self._propertyIterator).reduce((curr, node) => Object.assign(curr, {
1077
- [node[0]]: node[1]
1078
- }), {});
1079
- };
1080
- const _getNames = () => {
1081
- return Array.from(self._propertyIterator, ([name]) => name);
1082
- };
1083
- const _getValues = () => {
1084
- return Array.from(self._propertyIterator, ([, value]) => value);
1085
- };
1086
- const self = {
1087
- _propertyIterator: propertyIterator,
1088
- orderBy: _orderBy,
1089
- sortWith: _sortWith,
1090
- sortByNamesWithList: _sortByNamesWithList,
1091
- filterBy: _filterBy,
1092
- forEach: _forEach,
1093
- getNodes: _getNodes,
1094
- getObject: _getObject,
1095
- getNames: _getNames,
1096
- getValues: _getValues
1097
- };
1098
- return self;
1099
- });
1100
- function isShape(shapeOrSchema) {
1101
- return 'schema' in shapeOrSchema;
1102
- }
1103
- class SchemaPropertyAccessor {
1104
- constructor(context, shapeOrSchema) {
1105
- const propSchema = isShape(shapeOrSchema) ? shapeOrSchema.schema : shapeOrSchema;
1106
- this.schema = (0, _refs.dereferenceSchema)(context, propSchema, isShape(shapeOrSchema) ? ['shapes', shapeOrSchema.name] : undefined);
1107
- this.entries = (0, _utils.isObjectSchema)(this.schema) ? Object.entries(this.schema.properties) : [];
1108
- this.properties = new Map(this.entries);
1109
- }
1110
- getValue(propertyName) {
1111
- return this.properties.get(propertyName);
1112
- }
1113
- findValue(predicate) {
1114
- return this.entries.find(predicate)?.[1];
1115
- }
1116
- findName(predicate) {
1117
- return this.entries.find(predicate)?.[0];
1118
- }
1119
- getKey(propertyName) {
1120
- const value = this.properties.get(propertyName);
1121
- if (value) {
1122
- return getStorageKey(value);
1123
- }
1124
- }
1125
- }
1126
- /**
1127
- * Creates a schema property accessor, allowing you to safely access schema
1128
- * properties.
1129
- */
1130
- const createSchemaPropertyAccessor = exports.createSchemaPropertyAccessor = (0, _curry.default)((context, shapeOrSchema) => {
1131
- return new SchemaPropertyAccessor(context, shapeOrSchema);
1132
- });
1133
- function findQueryHelper(slice, shapeName, resolver, type) {
1134
- const schemaPath = type === 'query' ? 'queries' : 'mutations';
1135
- return Object.keys(slice[schemaPath]).find(queryName => {
1136
- const queryOrMutation = slice[schemaPath][queryName];
1137
- return queryOrMutation.resolver.name === resolver && queryOrMutation.resolver.shapeName === shapeName;
1138
- });
1139
- }
1140
- function ensureQueryHelper(slice, shapeName, resolver, type) {
1141
- const foundQuery = findQueryHelper(slice, shapeName, resolver, type);
1142
- if (!foundQuery) {
1143
- throw new Error(`Failed to find a "${resolver}" ${type} for shape "${shapeName}"`);
1144
- }
1145
- return foundQuery;
1146
- }
1147
-
1148
- /**
1149
- * Find the query in the schema that corresponds to the given shape and resolver.
1150
- */
1151
- const findQueryByShape = (projectSchema, shapeName, resolver) => findQueryHelper(projectSchema, shapeName, resolver, 'query');
1152
- /**
1153
- * Find the query in the schema that corresponds to the given shape and resolver.
1154
- */
1155
- exports.findQueryByShape = findQueryByShape;
1156
- const findMutationByShape = (projectSchema, shapeName, resolver) => findQueryHelper(projectSchema, shapeName, resolver, 'mutation');
1157
-
1158
- /**
1159
- * Find the query in the schema that corresponds to the given shape and resolver.
1160
- * Throw an error if that query does not exist
1161
- */
1162
- exports.findMutationByShape = findMutationByShape;
1163
- const ensureQueryByShape = (projectSchema, shapeName, resolver) => ensureQueryHelper(projectSchema, shapeName, resolver, 'query');
1164
- /**
1165
- * Find the mutation in the schema that corresponds to the given shape and resolver.
1166
- * Throw an error if that mutation does not exist
1167
- */
1168
- exports.ensureQueryByShape = ensureQueryByShape;
1169
- const ensureMutationByShape = (projectSchema, shapeName, resolver) => ensureQueryHelper(projectSchema, shapeName, resolver, 'mutation');
1170
- exports.ensureMutationByShape = ensureMutationByShape;
1171
- /**
1172
- * Find the query in the schema that corresponds to the given shape and resolver.
1173
- */
1174
- const getDefaultMutationName = (shapeName, resolver) => {
1175
- const action = resolver.substring(resolver.indexOf(':') + 1);
1176
- return `${action}${shapeName}`;
1177
- };
1178
- exports.getDefaultMutationName = getDefaultMutationName;
1179
- function createShape(name, schema, rest) {
1180
- return {
1181
- name,
1182
- id: name,
1183
- title: name,
1184
- schema,
1185
- ...rest
1186
- };
1187
- }
1188
- function queryToPropertySchema(projectSchema, query) {
1189
- let mapping;
1190
- if ((0, _utils.isGraphqlResolver)(query.resolver)) {
1191
- mapping = (0, _refs.serializePropertyRef)({
1192
- serviceId: query.resolver.service,
1193
- shapeName: 'Query',
1194
- propertyName: query.resolver.fieldName
1195
- });
1196
- }
1197
- return {
1198
- ...(0, _refs.returnShapeToSchema)(projectSchema, query.shape),
1199
- ...(mapping ? {
1200
- '@mapping': mapping
1201
- } : {}),
1202
- '@resolver': query.resolver,
1203
- '@args': query.args
1204
- };
1205
- }
1206
- function getQueriesShape(projectSchema, operation) {
1207
- return createShape((0, _util.pascalCase)(operation), {
1208
- type: 'object',
1209
- properties: (0, _mapValues.default)(projectSchema[operation === 'query' ? 'queries' : 'mutations'], query => queryToPropertySchema(projectSchema, query))
1210
- });
1211
- }
1212
- function fieldMappingContainsKey(fieldMapping, key) {
1213
- if ((0, _isArray.default)(fieldMapping)) {
1214
- return (0, _some.default)(fieldMapping, mapping => parseMapping(mapping).key === key);
1215
- }
1216
- return parseMapping(fieldMapping).key === key;
1217
- }
1218
-
1219
- /**
1220
- * Return true if `schemaWithRef` is a ref to a shape named `shapeName`
1221
- */
1222
- function schemaMatchesShapeName(workingCopy, propertySchema, shapeName) {
1223
- const arrayOfShapeRef = (0, _refs.getRef)(workingCopy, propertySchema);
1224
- return Boolean(arrayOfShapeRef && (0, _refs.refItemToNamespacedShapeName)(arrayOfShapeRef) === shapeName);
1225
- }
1226
-
1227
- /**
1228
- * Return true if `shape` has a property that is an array of refs to `shapeName`
1229
- */
1230
- const shapeHasArrayPropOfShape = (projectSchema, shape, shapeName) => {
1231
- if (shape && (0, _utils.isObjectSchema)(shape.schema)) {
1232
- for (const propName in shape.schema.properties) {
1233
- if (Object.hasOwn(shape.schema.properties, propName)) {
1234
- const propSchema = shape.schema.properties[propName];
1235
- if (propSchema.items && (0, _utils.isRefSchema)(propSchema.items) && schemaMatchesShapeName(projectSchema, propSchema.items, shapeName)) {
1236
- return true;
1237
- }
1238
- }
1239
- }
1240
- }
1241
- return false;
1242
- };
1243
- exports.shapeHasArrayPropOfShape = shapeHasArrayPropOfShape;
1244
- const getQueryMapName = type => {
1245
- return type === 'query' ? 'queries' : 'mutations';
1246
- };
1247
- exports.getQueryMapName = getQueryMapName;