@takeshape/schema 7.194.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 (312) hide show
  1. package/README.md +5 -0
  2. package/es/api-version.js +21 -0
  3. package/es/auth-schemas.js +0 -0
  4. package/es/builtin-schema.js +590 -0
  5. package/es/content-schema-transform.js +192 -0
  6. package/es/entitlements.js +0 -0
  7. package/es/enum.js +11 -0
  8. package/es/get-is-leaf.js +58 -0
  9. package/es/index.js +25 -0
  10. package/es/migration.js +413 -0
  11. package/es/mocks.js +47 -0
  12. package/es/patterns.js +0 -0
  13. package/es/project-schema/index.js +10 -0
  14. package/es/project-schema/v1.0.0.js +0 -0
  15. package/es/project-schema/v3.0.0.js +0 -0
  16. package/es/project-schema/v3.1.0.js +0 -0
  17. package/es/project-schema/v3.2.0.js +0 -0
  18. package/es/project-schema/v3.3.0.js +0 -0
  19. package/es/project-schema/v3.4.0.js +0 -0
  20. package/es/project-schema/v3.5.0.js +0 -0
  21. package/es/project-schema/v3.5.1.js +0 -0
  22. package/es/project-schema/v3.6.0.js +0 -0
  23. package/es/refs.js +301 -0
  24. package/es/resolvers.js +2 -0
  25. package/es/scalars.js +4 -0
  26. package/es/schema-util.js +1197 -0
  27. package/es/schemas/auth-schemas.json +313 -0
  28. package/es/schemas/project-schema/meta-schema-v1.0.0.json +209 -0
  29. package/es/schemas/project-schema/meta-schema-v3.0.0.json +609 -0
  30. package/es/schemas/project-schema/meta-schema-v3.1.0.json +609 -0
  31. package/es/schemas/project-schema/meta-schema-v3.2.0.json +613 -0
  32. package/es/schemas/project-schema/meta-schema-v3.3.0.json +613 -0
  33. package/es/schemas/project-schema/meta-schema-v3.4.0.json +613 -0
  34. package/es/schemas/project-schema/meta-schema-v3.5.0.json +627 -0
  35. package/es/schemas/project-schema/meta-schema-v3.5.1.json +630 -0
  36. package/es/schemas/project-schema/meta-schema-v3.6.0.json +633 -0
  37. package/es/schemas/project-schema/v1.0.0.json +321 -0
  38. package/es/schemas/project-schema/v3.0.0.json +411 -0
  39. package/es/schemas/project-schema/v3.1.0.json +569 -0
  40. package/es/schemas/project-schema/v3.2.0.json +577 -0
  41. package/es/schemas/project-schema/v3.3.0.json +578 -0
  42. package/es/schemas/project-schema/v3.4.0.json +568 -0
  43. package/es/schemas/project-schema/v3.5.0.json +568 -0
  44. package/es/schemas/project-schema/v3.5.1.json +568 -0
  45. package/es/schemas/project-schema/v3.6.0.json +584 -0
  46. package/es/schemas/project-schema.json +16 -0
  47. package/es/schemas/user-schema.json +58 -0
  48. package/es/services.js +379 -0
  49. package/es/taxonomies.js +55 -0
  50. package/es/template-shapes.js +79 -0
  51. package/es/types.js +202 -0
  52. package/es/unions.js +137 -0
  53. package/es/user-schema.js +0 -0
  54. package/es/util/detect-cycles.js +54 -0
  55. package/es/util/index.js +1 -0
  56. package/es/validate.js +764 -0
  57. package/es/versions.js +4 -0
  58. package/es/workflows.js +69 -0
  59. package/examples/.pnpm-debug.log +20 -0
  60. package/examples/v1_0_0/beer-schema.json +125 -0
  61. package/examples/v1_0_0/blog-schema.json +192 -0
  62. package/examples/v1_0_0/brewery-schema.json +232 -0
  63. package/examples/v1_0_0/complex-project-schema.json +3197 -0
  64. package/examples/v1_0_0/error-schema.json +275 -0
  65. package/examples/v1_0_0/frank-and-fred-schema.json +21387 -0
  66. package/examples/v1_0_0/massive-schema.json +6930 -0
  67. package/examples/v1_0_0/post-schema.json +83 -0
  68. package/examples/v1_0_0/real-world-schema.json +797 -0
  69. package/examples/v1_0_0/recursive-repeater-schema.json +69 -0
  70. package/examples/v1_0_0/recursive-schema.json +79 -0
  71. package/examples/v1_0_0/schema-with-repeater-draftjs.json +292 -0
  72. package/examples/v1_0_0/shape-books.json +797 -0
  73. package/examples/v1_0_0/user-schema-no-required.json +84 -0
  74. package/examples/v1_0_0/user-schema-with-defaults.json +105 -0
  75. package/examples/v1_0_0/user-schema-with-obj-prop.json +92 -0
  76. package/examples/v1_0_0/user-schema.json +87 -0
  77. package/examples/v3_0_0/rick-and-morty-rest.json +62 -0
  78. package/examples/v3_0_0/shopify-lookbook.json +1172 -0
  79. package/examples/v3_0_0/shopify-store-with-widget.json +11323 -0
  80. package/examples/v3_2_0/blog-schema.json +378 -0
  81. package/examples/v3_2_0/brewery-schema.json +385 -0
  82. package/examples/v3_2_0/complex-project-schema.json +3748 -0
  83. package/examples/v3_2_0/frank-and-fred-schema.json +19217 -0
  84. package/examples/v3_2_0/massive-schema.json +6676 -0
  85. package/examples/v3_2_0/pet-oneof-array.json +323 -0
  86. package/examples/v3_2_0/post-schema.json +265 -0
  87. package/examples/v3_2_0/real-world-schema.json +970 -0
  88. package/examples/v3_2_0/recursive-repeater-schema.json +144 -0
  89. package/examples/v3_2_0/recursive-schema.json +151 -0
  90. package/examples/v3_2_0/rick-and-morty-rest.json +65 -0
  91. package/examples/v3_2_0/schema-with-repeater-draftjs.json +381 -0
  92. package/examples/v3_2_0/shape-books.json +1044 -0
  93. package/examples/v3_2_0/shopify-store-with-widget.json +11016 -0
  94. package/examples/v3_2_0/user-schema-no-required.json +174 -0
  95. package/examples/v3_2_0/user-schema-with-defaults.json +187 -0
  96. package/examples/v3_3_0/blog-schema.json +405 -0
  97. package/examples/v3_3_0/brewery-schema.json +406 -0
  98. package/examples/v3_3_0/complex-project-schema.json +4076 -0
  99. package/examples/v3_3_0/frank-and-fred-schema.json +20913 -0
  100. package/examples/v3_3_0/massive-schema.json +7309 -0
  101. package/examples/v3_3_0/pet-oneof-array.json +380 -0
  102. package/examples/v3_3_0/post-schema.json +248 -0
  103. package/examples/v3_3_0/real-world-schema.json +1046 -0
  104. package/examples/v3_3_0/recursive-repeater-schema.json +154 -0
  105. package/examples/v3_3_0/recursive-schema.json +161 -0
  106. package/examples/v3_3_0/rick-and-morty-rest.json +101 -0
  107. package/examples/v3_3_0/schema-with-repeater-draftjs.json +393 -0
  108. package/examples/v3_3_0/shape-books.json +1121 -0
  109. package/examples/v3_3_0/shopify-lookbook.json +1196 -0
  110. package/examples/v3_3_0/shopify-store-with-widget.json +11320 -0
  111. package/examples/v3_3_0/user-schema-no-required.json +185 -0
  112. package/examples/v3_3_0/user-schema-with-defaults.json +210 -0
  113. package/examples/v3_4_0/blog-schema.json +405 -0
  114. package/examples/v3_4_0/brewery-schema.json +406 -0
  115. package/examples/v3_4_0/complex-project-schema.json +4076 -0
  116. package/examples/v3_4_0/frank-and-fred-schema.json +20913 -0
  117. package/examples/v3_4_0/massive-schema.json +7309 -0
  118. package/examples/v3_4_0/pet-oneof-array.json +420 -0
  119. package/examples/v3_4_0/post-schema.json +248 -0
  120. package/examples/v3_4_0/real-world-schema.json +1046 -0
  121. package/examples/v3_4_0/recursive-repeater-schema.json +154 -0
  122. package/examples/v3_4_0/recursive-schema.json +161 -0
  123. package/examples/v3_4_0/rick-and-morty-rest.json +101 -0
  124. package/examples/v3_4_0/schema-with-repeater-draftjs.json +393 -0
  125. package/examples/v3_4_0/shape-books.json +1121 -0
  126. package/examples/v3_4_0/shopify-lookbook.json +1196 -0
  127. package/examples/v3_4_0/shopify-store-with-widget.json +11323 -0
  128. package/examples/v3_4_0/user-schema-no-required.json +185 -0
  129. package/examples/v3_4_0/user-schema-with-defaults.json +210 -0
  130. package/examples/v3_5_0/blog-schema.json +405 -0
  131. package/examples/v3_5_0/brewery-schema.json +406 -0
  132. package/examples/v3_5_0/complex-project-schema.json +4076 -0
  133. package/examples/v3_5_0/frank-and-fred-schema.json +20913 -0
  134. package/examples/v3_5_0/massive-schema.json +7309 -0
  135. package/examples/v3_5_0/pet-oneof-array.json +420 -0
  136. package/examples/v3_5_0/post-schema.json +248 -0
  137. package/examples/v3_5_0/real-world-schema.json +1046 -0
  138. package/examples/v3_5_0/recursive-repeater-schema.json +154 -0
  139. package/examples/v3_5_0/recursive-schema.json +161 -0
  140. package/examples/v3_5_0/rick-and-morty-rest.json +101 -0
  141. package/examples/v3_5_0/schema-with-repeater-draftjs.json +393 -0
  142. package/examples/v3_5_0/shape-books.json +1121 -0
  143. package/examples/v3_5_0/shopify-lookbook.json +1196 -0
  144. package/examples/v3_5_0/shopify-store-with-widget.json +12271 -0
  145. package/examples/v3_5_0/user-schema-no-required.json +185 -0
  146. package/examples/v3_5_0/user-schema-with-defaults.json +210 -0
  147. package/examples/v3_5_1/blog-schema.json +405 -0
  148. package/examples/v3_5_1/brewery-schema.json +406 -0
  149. package/examples/v3_5_1/complex-project-schema.json +4076 -0
  150. package/examples/v3_5_1/frank-and-fred-schema.json +20913 -0
  151. package/examples/v3_5_1/massive-schema.json +7309 -0
  152. package/examples/v3_5_1/pet-oneof-array.json +420 -0
  153. package/examples/v3_5_1/post-schema.json +248 -0
  154. package/examples/v3_5_1/real-world-schema.json +1046 -0
  155. package/examples/v3_5_1/recursive-repeater-schema.json +154 -0
  156. package/examples/v3_5_1/recursive-schema.json +161 -0
  157. package/examples/v3_5_1/rick-and-morty-rest.json +101 -0
  158. package/examples/v3_5_1/schema-with-repeater-draftjs.json +393 -0
  159. package/examples/v3_5_1/shape-books.json +1121 -0
  160. package/examples/v3_5_1/shopify-lookbook.json +1196 -0
  161. package/examples/v3_5_1/shopify-store-with-widget.json +12271 -0
  162. package/examples/v3_5_1/stripe-starter-resolved.json +21419 -0
  163. package/examples/v3_5_1/user-schema-no-required.json +185 -0
  164. package/examples/v3_5_1/user-schema-with-defaults.json +210 -0
  165. package/examples/v3_6_0/blog-schema.json +405 -0
  166. package/examples/v3_6_0/brewery-schema.json +406 -0
  167. package/examples/v3_6_0/complex-project-schema.json +4076 -0
  168. package/examples/v3_6_0/frank-and-fred-schema.json +20913 -0
  169. package/examples/v3_6_0/massive-schema.json +7309 -0
  170. package/examples/v3_6_0/pet-oneof-array.json +420 -0
  171. package/examples/v3_6_0/post-schema.json +248 -0
  172. package/examples/v3_6_0/real-world-schema.json +1046 -0
  173. package/examples/v3_6_0/recursive-repeater-schema.json +154 -0
  174. package/examples/v3_6_0/recursive-schema.json +161 -0
  175. package/examples/v3_6_0/rick-and-morty-rest.json +101 -0
  176. package/examples/v3_6_0/schema-with-repeater-draftjs.json +393 -0
  177. package/examples/v3_6_0/shape-books.json +1121 -0
  178. package/examples/v3_6_0/shopify-lookbook.json +1196 -0
  179. package/examples/v3_6_0/shopify-store-with-widget.json +12271 -0
  180. package/examples/v3_6_0/stripe-starter-resolved.json +21419 -0
  181. package/examples/v3_6_0/user-schema-no-required.json +185 -0
  182. package/examples/v3_6_0/user-schema-with-defaults.json +210 -0
  183. package/lib/api-version.d.ts +6 -0
  184. package/lib/api-version.d.ts.map +1 -0
  185. package/lib/api-version.js +36 -0
  186. package/lib/auth-schemas.d.ts +105 -0
  187. package/lib/auth-schemas.d.ts.map +1 -0
  188. package/lib/auth-schemas.js +1 -0
  189. package/lib/builtin-schema.d.ts +8 -0
  190. package/lib/builtin-schema.d.ts.map +1 -0
  191. package/lib/builtin-schema.js +606 -0
  192. package/lib/content-schema-transform.d.ts +41 -0
  193. package/lib/content-schema-transform.d.ts.map +1 -0
  194. package/lib/content-schema-transform.js +217 -0
  195. package/lib/entitlements.d.ts +1 -0
  196. package/lib/entitlements.d.ts.map +1 -0
  197. package/lib/entitlements.js +1 -0
  198. package/lib/enum.d.ts +3 -0
  199. package/lib/enum.d.ts.map +1 -0
  200. package/lib/enum.js +18 -0
  201. package/lib/get-is-leaf.d.ts +4 -0
  202. package/lib/get-is-leaf.d.ts.map +1 -0
  203. package/lib/get-is-leaf.js +68 -0
  204. package/lib/index.d.ts +27 -0
  205. package/lib/index.d.ts.map +1 -0
  206. package/lib/index.js +359 -0
  207. package/lib/migration.d.ts +55 -0
  208. package/lib/migration.d.ts.map +1 -0
  209. package/lib/migration.js +463 -0
  210. package/lib/mocks.d.ts +13 -0
  211. package/lib/mocks.d.ts.map +1 -0
  212. package/lib/mocks.js +61 -0
  213. package/lib/patterns.d.ts +13 -0
  214. package/lib/patterns.d.ts.map +1 -0
  215. package/lib/patterns.js +1 -0
  216. package/lib/project-schema/index.d.ts +21 -0
  217. package/lib/project-schema/index.d.ts.map +1 -0
  218. package/lib/project-schema/index.js +122 -0
  219. package/lib/project-schema/v1.0.0.d.ts +293 -0
  220. package/lib/project-schema/v1.0.0.d.ts.map +1 -0
  221. package/lib/project-schema/v1.0.0.js +1 -0
  222. package/lib/project-schema/v3.0.0.d.ts +480 -0
  223. package/lib/project-schema/v3.0.0.d.ts.map +1 -0
  224. package/lib/project-schema/v3.0.0.js +1 -0
  225. package/lib/project-schema/v3.1.0.d.ts +623 -0
  226. package/lib/project-schema/v3.1.0.d.ts.map +1 -0
  227. package/lib/project-schema/v3.1.0.js +1 -0
  228. package/lib/project-schema/v3.2.0.d.ts +634 -0
  229. package/lib/project-schema/v3.2.0.d.ts.map +1 -0
  230. package/lib/project-schema/v3.2.0.js +1 -0
  231. package/lib/project-schema/v3.3.0.d.ts +634 -0
  232. package/lib/project-schema/v3.3.0.d.ts.map +1 -0
  233. package/lib/project-schema/v3.3.0.js +1 -0
  234. package/lib/project-schema/v3.4.0.d.ts +626 -0
  235. package/lib/project-schema/v3.4.0.d.ts.map +1 -0
  236. package/lib/project-schema/v3.4.0.js +1 -0
  237. package/lib/project-schema/v3.5.0.d.ts +651 -0
  238. package/lib/project-schema/v3.5.0.d.ts.map +1 -0
  239. package/lib/project-schema/v3.5.0.js +1 -0
  240. package/lib/project-schema/v3.5.1.d.ts +651 -0
  241. package/lib/project-schema/v3.5.1.d.ts.map +1 -0
  242. package/lib/project-schema/v3.5.1.js +1 -0
  243. package/lib/project-schema/v3.6.0.d.ts +660 -0
  244. package/lib/project-schema/v3.6.0.d.ts.map +1 -0
  245. package/lib/project-schema/v3.6.0.js +1 -0
  246. package/lib/refs.d.ts +122 -0
  247. package/lib/refs.d.ts.map +1 -0
  248. package/lib/refs.js +359 -0
  249. package/lib/resolvers.d.ts +4 -0
  250. package/lib/resolvers.d.ts.map +1 -0
  251. package/lib/resolvers.js +10 -0
  252. package/lib/scalars.d.ts +3 -0
  253. package/lib/scalars.d.ts.map +1 -0
  254. package/lib/scalars.js +13 -0
  255. package/lib/schema-util.d.ts +201 -0
  256. package/lib/schema-util.d.ts.map +1 -0
  257. package/lib/schema-util.js +1353 -0
  258. package/lib/schemas/auth-schemas.json +313 -0
  259. package/lib/schemas/project-schema/meta-schema-v1.0.0.json +209 -0
  260. package/lib/schemas/project-schema/meta-schema-v3.0.0.json +609 -0
  261. package/lib/schemas/project-schema/meta-schema-v3.1.0.json +609 -0
  262. package/lib/schemas/project-schema/meta-schema-v3.2.0.json +613 -0
  263. package/lib/schemas/project-schema/meta-schema-v3.3.0.json +613 -0
  264. package/lib/schemas/project-schema/meta-schema-v3.4.0.json +613 -0
  265. package/lib/schemas/project-schema/meta-schema-v3.5.0.json +627 -0
  266. package/lib/schemas/project-schema/meta-schema-v3.5.1.json +630 -0
  267. package/lib/schemas/project-schema/meta-schema-v3.6.0.json +633 -0
  268. package/lib/schemas/project-schema/v1.0.0.json +321 -0
  269. package/lib/schemas/project-schema/v3.0.0.json +411 -0
  270. package/lib/schemas/project-schema/v3.1.0.json +569 -0
  271. package/lib/schemas/project-schema/v3.2.0.json +577 -0
  272. package/lib/schemas/project-schema/v3.3.0.json +578 -0
  273. package/lib/schemas/project-schema/v3.4.0.json +568 -0
  274. package/lib/schemas/project-schema/v3.5.0.json +568 -0
  275. package/lib/schemas/project-schema/v3.5.1.json +568 -0
  276. package/lib/schemas/project-schema/v3.6.0.json +584 -0
  277. package/lib/schemas/project-schema.json +16 -0
  278. package/lib/schemas/user-schema.json +58 -0
  279. package/lib/services.d.ts +71 -0
  280. package/lib/services.d.ts.map +1 -0
  281. package/lib/services.js +413 -0
  282. package/lib/taxonomies.d.ts +16 -0
  283. package/lib/taxonomies.d.ts.map +1 -0
  284. package/lib/taxonomies.js +69 -0
  285. package/lib/template-shapes.d.ts +32 -0
  286. package/lib/template-shapes.d.ts.map +1 -0
  287. package/lib/template-shapes.js +100 -0
  288. package/lib/types.d.ts +187 -0
  289. package/lib/types.d.ts.map +1 -0
  290. package/lib/types.js +289 -0
  291. package/lib/unions.d.ts +29 -0
  292. package/lib/unions.d.ts.map +1 -0
  293. package/lib/unions.js +167 -0
  294. package/lib/user-schema.d.ts +39 -0
  295. package/lib/user-schema.d.ts.map +1 -0
  296. package/lib/user-schema.js +1 -0
  297. package/lib/util/detect-cycles.d.ts +6 -0
  298. package/lib/util/detect-cycles.d.ts.map +1 -0
  299. package/lib/util/detect-cycles.js +61 -0
  300. package/lib/util/index.d.ts +2 -0
  301. package/lib/util/index.d.ts.map +1 -0
  302. package/lib/util/index.js +18 -0
  303. package/lib/validate.d.ts +49 -0
  304. package/lib/validate.d.ts.map +1 -0
  305. package/lib/validate.js +823 -0
  306. package/lib/versions.d.ts +5 -0
  307. package/lib/versions.d.ts.map +1 -0
  308. package/lib/versions.js +14 -0
  309. package/lib/workflows.d.ts +15 -0
  310. package/lib/workflows.d.ts.map +1 -0
  311. package/lib/workflows.js +92 -0
  312. package/package.json +65 -0
@@ -0,0 +1,613 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://schema.takeshape.io/project-schema/meta-schema-v3.4.0#",
4
+ "title": "Content Schema",
5
+ "definitions": {
6
+ "schemaArray": {
7
+ "type": "array",
8
+ "minItems": 1,
9
+ "items": {
10
+ "$ref": "#"
11
+ }
12
+ },
13
+ "nonNegativeInteger": {
14
+ "type": "integer",
15
+ "minimum": 0
16
+ },
17
+ "nonNegativeIntegerDefault0": {
18
+ "allOf": [
19
+ {
20
+ "$ref": "#/definitions/nonNegativeInteger"
21
+ },
22
+ {
23
+ "default": 0
24
+ }
25
+ ]
26
+ },
27
+ "simpleTypes": {
28
+ "enum": ["array", "boolean", "integer", "null", "number", "object", "string"]
29
+ },
30
+ "stringArray": {
31
+ "type": "array",
32
+ "items": {
33
+ "type": "string"
34
+ },
35
+ "uniqueItems": true,
36
+ "default": []
37
+ },
38
+ "relationship": {
39
+ "title": "Relationship",
40
+ "type": "object",
41
+ "properties": {
42
+ "shapeIds": {
43
+ "type": "array",
44
+ "items": {
45
+ "type": "string"
46
+ },
47
+ "minItems": 1
48
+ },
49
+ "type": {
50
+ "type": "string"
51
+ },
52
+ "relatedName": {
53
+ "type": "string",
54
+ "pattern": "^[_a-zA-Z][_a-zA-Z0-9]*$"
55
+ }
56
+ },
57
+ "required": ["shapeIds"],
58
+ "additionalProperties": false
59
+ },
60
+ "mappingString": {
61
+ "type": "string",
62
+ "pattern": "^[\\w-]+(?::[\\w-]+)+(?:\\.[\\w-]+)+$"
63
+ },
64
+ "fieldMapping": {
65
+ "title": "Field Mapping",
66
+ "oneOf": [
67
+ {
68
+ "$ref": "#/definitions/mappingString"
69
+ },
70
+ {
71
+ "type": "array",
72
+ "items": {
73
+ "$ref": "#/definitions/mappingString"
74
+ }
75
+ }
76
+ ]
77
+ },
78
+ "refSchema": {
79
+ "title": "Ref Schema",
80
+ "type": "object",
81
+ "properties": {
82
+ "@ref": {
83
+ "$ref": "#/definitions/ref"
84
+ }
85
+ },
86
+ "required": ["@ref"]
87
+ },
88
+ "refSchemaLegacy": {
89
+ "title": "Ref Schema Legacy",
90
+ "type": "object",
91
+ "properties": {
92
+ "$ref": {
93
+ "$ref": "#/definitions/ref"
94
+ }
95
+ },
96
+ "required": ["$ref"]
97
+ },
98
+ "objectSchema": {
99
+ "title": "Object Schema",
100
+ "type": "object",
101
+ "allOf": [
102
+ {
103
+ "$ref": "#"
104
+ },
105
+ {
106
+ "properties": {
107
+ "type": {
108
+ "type": "string",
109
+ "const": "object"
110
+ },
111
+ "properties": {
112
+ "type": "object",
113
+ "additionalProperties": {
114
+ "$ref": "#"
115
+ }
116
+ }
117
+ },
118
+ "required": ["type", "properties"]
119
+ }
120
+ ]
121
+ },
122
+ "arraySchema": {
123
+ "title": "Array Schema",
124
+ "type": "object",
125
+ "allOf": [
126
+ {
127
+ "$ref": "#"
128
+ },
129
+ {
130
+ "properties": {
131
+ "type": {
132
+ "type": "string",
133
+ "const": "array"
134
+ },
135
+ "items": {
136
+ "$ref": "#/definitions/contentObjectSchema"
137
+ }
138
+ },
139
+ "required": ["type", "items"]
140
+ }
141
+ ]
142
+ },
143
+ "allOfSchema": {
144
+ "title": "All Of Schema",
145
+ "type": "object",
146
+ "properties": {
147
+ "allOf": {
148
+ "type": "array",
149
+ "items": {
150
+ "oneOf": [
151
+ {
152
+ "$ref": "#/definitions/refSchema"
153
+ },
154
+ {
155
+ "$ref": "#/definitions/refSchemaLegacy"
156
+ },
157
+ {
158
+ "$ref": "#/definitions/objectSchema"
159
+ }
160
+ ],
161
+ "unevaluatedProperties": true
162
+ }
163
+ }
164
+ },
165
+ "required": ["allOf"],
166
+ "additionalProperties": false
167
+ },
168
+ "oneOfSchema": {
169
+ "title": "One Of Schema",
170
+ "type": "object",
171
+ "properties": {
172
+ "oneOf": {
173
+ "type": "array",
174
+ "items": {
175
+ "oneOf": [
176
+ {
177
+ "$ref": "#/definitions/refSchema"
178
+ },
179
+ {
180
+ "$ref": "#/definitions/refSchemaLegacy"
181
+ },
182
+ {
183
+ "$ref": "#/definitions/objectSchema"
184
+ }
185
+ ],
186
+ "unevaluatedProperties": true
187
+ }
188
+ }
189
+ },
190
+ "required": ["oneOf"],
191
+ "additionalProperties": false
192
+ },
193
+ "contentObjectSchema": {
194
+ "title": "Content Object Schema",
195
+ "type": "object",
196
+ "oneOf": [
197
+ {
198
+ "$ref": "#/definitions/allOfSchema"
199
+ },
200
+ {
201
+ "$ref": "#/definitions/oneOfSchema"
202
+ },
203
+ {
204
+ "$ref": "#/definitions/refSchema"
205
+ },
206
+ {
207
+ "$ref": "#/definitions/refSchemaLegacy"
208
+ },
209
+ {
210
+ "$ref": "#/definitions/objectSchema"
211
+ },
212
+ {
213
+ "$ref": "#/definitions/arraySchema"
214
+ }
215
+ ]
216
+ },
217
+ "queryMap": {
218
+ "title": "Query Map",
219
+ "type": "object",
220
+ "patternProperties": {
221
+ "[0-9A-Za-z_-]+": {
222
+ "$ref": "#/definitions/query"
223
+ }
224
+ }
225
+ },
226
+ "args": {
227
+ "title": "Args",
228
+ "oneOf": [{"type": "string"}, {"$ref": "#/definitions/contentObjectSchema"}]
229
+ },
230
+ "returnShape": {
231
+ "title": "Return Shape",
232
+ "oneOf": [{"type": "string"}, {"$ref": "#/definitions/arraySchema"}]
233
+ },
234
+ "directiveConfig": {
235
+ "title": "Directive Config",
236
+ "type": "array",
237
+ "items": [
238
+ {
239
+ "title": "Directive Name",
240
+ "type": "string"
241
+ },
242
+ {
243
+ "title": "Directive Options",
244
+ "type": "object",
245
+ "propertyNames": {
246
+ "pattern": "[0-9A-Za-z_-]+"
247
+ }
248
+ }
249
+ ]
250
+ },
251
+ "directiveMap": {
252
+ "title": "Directive Map",
253
+ "type": "object",
254
+ "patternProperties": {
255
+ "[0-9A-Za-z_-]+": {
256
+ "type": "array",
257
+ "items": {
258
+ "$ref": "#/definitions/directiveConfig"
259
+ }
260
+ }
261
+ }
262
+ },
263
+ "basicResolver": {
264
+ "title": "BasicResolver",
265
+ "type": "object",
266
+ "properties": {
267
+ "if": {"type": "string"},
268
+ "id": {
269
+ "type": "string",
270
+ "pattern": "^(?=[a-zA-Z])[-_a-zA-Z0-9]+$"
271
+ },
272
+ "name": {
273
+ "type": "string",
274
+ "description": "The name of the built-in resolver your query or mutation should use."
275
+ },
276
+ "service": {
277
+ "type": "string",
278
+ "description": "Specifies the service configuration the resolver should use, identified by a connected service's slug. This configuration contains the endpoint and authentication necessary to make API calls."
279
+ },
280
+ "argsMapping": {
281
+ "description": "Maps a query's input args to the input expected by the service's endpoint.",
282
+ "oneOf": [
283
+ {
284
+ "$ref": "#/definitions/directiveMap"
285
+ },
286
+ {
287
+ "type": "array",
288
+ "items": {
289
+ "$ref": "#/definitions/directiveConfig"
290
+ }
291
+ }
292
+ ]
293
+ },
294
+ "resultsMapping": {
295
+ "description": "Maps a service endpoint's response results to the expected shape of the query's response.",
296
+ "oneOf": [
297
+ {
298
+ "$ref": "#/definitions/directiveMap"
299
+ },
300
+ {
301
+ "type": "array",
302
+ "items": {
303
+ "$ref": "#/definitions/directiveConfig"
304
+ }
305
+ }
306
+ ]
307
+ },
308
+ "options": {
309
+ "type": "object",
310
+ "properties": {
311
+ "model": {"type": "string"}
312
+ },
313
+ "additionalProperties": true
314
+ }
315
+ },
316
+ "required": ["name", "service"],
317
+ "additionalProperties": false
318
+ },
319
+ "composeResolver": {
320
+ "title": "ComposeResolver",
321
+ "type": "object",
322
+ "properties": {
323
+ "compose": {
324
+ "type": "array",
325
+ "items": {
326
+ "$ref": "#/definitions/basicResolver"
327
+ }
328
+ },
329
+ "resultsMapping": {
330
+ "oneOf": [
331
+ {
332
+ "$ref": "#/definitions/directiveMap"
333
+ },
334
+ {
335
+ "type": "array",
336
+ "items": {
337
+ "$ref": "#/definitions/directiveConfig"
338
+ }
339
+ }
340
+ ]
341
+ }
342
+ },
343
+ "required": ["compose"],
344
+ "additionalProperties": false
345
+ },
346
+ "resolver": {
347
+ "title": "Resolver",
348
+ "oneOf": [{"$ref": "#/definitions/basicResolver"}, {"$ref": "#/definitions/composeResolver"}]
349
+ },
350
+ "ref": {
351
+ "title": "Ref",
352
+ "type": "string"
353
+ },
354
+ "query": {
355
+ "title": "Query",
356
+ "type": "object",
357
+ "properties": {
358
+ "args": {
359
+ "description": "The args field specifies the name of a Shape for the input arguments required by your resolver.",
360
+ "$ref": "#/definitions/args"
361
+ },
362
+ "resolver": {
363
+ "description": "Configures the resolver for your query or mutation.",
364
+ "$ref": "#/definitions/resolver"
365
+ },
366
+ "shape": {
367
+ "$ref": "#/definitions/returnShape",
368
+ "description": "Specifies which shape is returned by the query or mutation. The shape can refer to a shape in the schema's \"shapes\" object or a shape that's available on a service schema."
369
+ },
370
+ "description": {
371
+ "type": "string",
372
+ "description": "Provides more detail about what the query or mutation is for. This will be displayed in the automatically-generated GraphQL API docs."
373
+ }
374
+ },
375
+ "required": ["resolver", "shape"]
376
+ }
377
+ },
378
+ "type": "object",
379
+ "properties": {
380
+ "$id": {
381
+ "type": "string",
382
+ "format": "uri-reference"
383
+ },
384
+ "$schema": {
385
+ "type": "string",
386
+ "format": "uri"
387
+ },
388
+ "$ref": {
389
+ "type": "string",
390
+ "format": "uri-reference"
391
+ },
392
+ "$comment": {
393
+ "type": "string"
394
+ },
395
+ "title": {
396
+ "type": "string"
397
+ },
398
+ "description": {
399
+ "type": "string"
400
+ },
401
+ "default": true,
402
+ "readOnly": {
403
+ "type": "boolean",
404
+ "default": false
405
+ },
406
+ "examples": {
407
+ "type": "array",
408
+ "items": true
409
+ },
410
+ "multipleOf": {
411
+ "type": "number",
412
+ "exclusiveMinimum": 0
413
+ },
414
+ "maximum": {
415
+ "type": "number"
416
+ },
417
+ "exclusiveMaximum": {
418
+ "type": "number"
419
+ },
420
+ "minimum": {
421
+ "type": "number"
422
+ },
423
+ "exclusiveMinimum": {
424
+ "type": "number"
425
+ },
426
+ "maxLength": {
427
+ "$ref": "#/definitions/nonNegativeInteger"
428
+ },
429
+ "minLength": {
430
+ "$ref": "#/definitions/nonNegativeIntegerDefault0"
431
+ },
432
+ "pattern": {
433
+ "type": "string",
434
+ "format": "regex"
435
+ },
436
+ "additionalItems": {
437
+ "$ref": "#"
438
+ },
439
+ "items": {
440
+ "$ref": "#"
441
+ },
442
+ "maxItems": {
443
+ "$ref": "#/definitions/nonNegativeInteger"
444
+ },
445
+ "minItems": {
446
+ "$ref": "#/definitions/nonNegativeIntegerDefault0"
447
+ },
448
+ "uniqueItems": {
449
+ "type": "boolean",
450
+ "default": false
451
+ },
452
+ "contains": {
453
+ "$ref": "#"
454
+ },
455
+ "maxProperties": {
456
+ "$ref": "#/definitions/nonNegativeInteger"
457
+ },
458
+ "minProperties": {
459
+ "$ref": "#/definitions/nonNegativeIntegerDefault0"
460
+ },
461
+ "required": {
462
+ "$ref": "#/definitions/stringArray"
463
+ },
464
+ "additionalProperties": {
465
+ "$ref": "#"
466
+ },
467
+ "definitions": {
468
+ "type": "object",
469
+ "additionalProperties": {
470
+ "$ref": "#"
471
+ },
472
+ "default": {}
473
+ },
474
+ "properties": {
475
+ "type": "object",
476
+ "additionalProperties": {
477
+ "$ref": "#"
478
+ },
479
+ "default": {}
480
+ },
481
+ "patternProperties": {
482
+ "type": "object",
483
+ "additionalProperties": {
484
+ "$ref": "#"
485
+ },
486
+ "propertyNames": {
487
+ "format": "regex"
488
+ },
489
+ "default": {}
490
+ },
491
+ "dependencies": {
492
+ "type": "object",
493
+ "additionalProperties": {
494
+ "anyOf": [
495
+ {
496
+ "$ref": "#"
497
+ },
498
+ {
499
+ "$ref": "#/definitions/stringArray"
500
+ }
501
+ ]
502
+ }
503
+ },
504
+ "propertyNames": {
505
+ "$ref": "#"
506
+ },
507
+ "const": true,
508
+ "enum": {
509
+ "type": "array",
510
+ "items": true,
511
+ "minItems": 1,
512
+ "uniqueItems": true
513
+ },
514
+ "type": {
515
+ "anyOf": [
516
+ {
517
+ "$ref": "#/definitions/simpleTypes"
518
+ },
519
+ {
520
+ "type": "array",
521
+ "items": {
522
+ "$ref": "#/definitions/simpleTypes"
523
+ },
524
+ "minItems": 1,
525
+ "uniqueItems": true
526
+ }
527
+ ]
528
+ },
529
+ "format": {
530
+ "type": "string"
531
+ },
532
+ "contentMediaType": {
533
+ "type": "string"
534
+ },
535
+ "contentEncoding": {
536
+ "type": "string"
537
+ },
538
+ "if": {
539
+ "$ref": "#"
540
+ },
541
+ "then": {
542
+ "$ref": "#"
543
+ },
544
+ "else": {
545
+ "$ref": "#"
546
+ },
547
+ "allOf": {
548
+ "$ref": "#/definitions/schemaArray"
549
+ },
550
+ "anyOf": {
551
+ "$ref": "#/definitions/schemaArray"
552
+ },
553
+ "oneOf": {
554
+ "$ref": "#/definitions/schemaArray"
555
+ },
556
+ "not": {
557
+ "$ref": "#"
558
+ },
559
+ "@relationship": {
560
+ "$ref": "#/definitions/relationship"
561
+ },
562
+ "@syncLocaleStructure": {
563
+ "type": "boolean"
564
+ },
565
+ "@sensitive": {
566
+ "type": "boolean"
567
+ },
568
+ "@draftjs": {
569
+ "type": "boolean"
570
+ },
571
+ "@l10n": {
572
+ "type": "boolean"
573
+ },
574
+ "@key": {
575
+ "type": "string",
576
+ "pattern": "^[-_a-zA-Z0-9]+$"
577
+ },
578
+ "@workflow": {
579
+ "type": "string"
580
+ },
581
+ "@mapping": {
582
+ "$ref": "#/definitions/fieldMapping"
583
+ },
584
+ "@tag": {
585
+ "type": "string"
586
+ },
587
+ "@tags": {
588
+ "type": "array",
589
+ "items": {
590
+ "type": "string"
591
+ }
592
+ },
593
+ "@deprecationReason": {
594
+ "type": "string"
595
+ },
596
+ "@user": {
597
+ "type": "boolean"
598
+ },
599
+ "@args": {
600
+ "$ref": "#/definitions/args"
601
+ },
602
+ "@resolver": {
603
+ "$ref": "#/definitions/resolver"
604
+ },
605
+ "@ref": {
606
+ "$ref": "#/definitions/ref"
607
+ },
608
+ "value": {
609
+ "type": "string"
610
+ }
611
+ },
612
+ "additionalProperties": false
613
+ }