@takeshape/schema 8.145.1 → 8.146.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.
- package/dist/builtin-schema.d.ts.map +1 -1
- package/dist/builtin-schema.js +17 -0
- package/dist/get-is-leaf.d.ts +1 -1
- package/dist/get-is-leaf.d.ts.map +1 -1
- package/dist/get-is-leaf.js +3 -1
- package/dist/migration/index.d.ts +1 -0
- package/dist/migration/index.d.ts.map +1 -1
- package/dist/migration/index.js +4 -1
- package/dist/migration/to/v3.0.0.d.ts.map +1 -1
- package/dist/migration/to/v3.18.0.d.ts +5 -0
- package/dist/migration/to/v3.18.0.d.ts.map +1 -0
- package/dist/migration/to/v3.18.0.js +85 -0
- package/dist/mocks.d.ts.map +1 -1
- package/dist/mocks.js +4 -2
- package/dist/project-schema/index.d.ts +4 -1
- package/dist/project-schema/index.d.ts.map +1 -1
- package/dist/project-schema/index.js +20 -3
- package/dist/project-schema/latest.d.ts +4 -139
- package/dist/project-schema/latest.d.ts.map +1 -1
- package/dist/project-schema/migrate.d.ts.map +1 -1
- package/dist/project-schema/migrate.js +4 -0
- package/dist/project-schema/v3.18.0.d.ts +1334 -0
- package/dist/project-schema/v3.18.0.d.ts.map +1 -0
- package/dist/project-schema/v3.18.0.js +5 -0
- package/dist/refs.d.ts +14 -2
- package/dist/refs.d.ts.map +1 -1
- package/dist/refs.js +26 -0
- package/dist/relationships.d.ts +28 -2
- package/dist/relationships.d.ts.map +1 -1
- package/dist/relationships.js +234 -19
- package/dist/rewrite.d.ts.map +1 -1
- package/dist/rewrite.js +10 -2
- package/dist/schema-util.d.ts +1 -18
- package/dist/schema-util.d.ts.map +1 -1
- package/dist/schema-util.js +36 -120
- package/dist/schemas/index.d.ts +2 -2
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +6 -4
- package/dist/schemas/index.ts +4 -2
- package/dist/schemas/project-schema/latest.json +2175 -2195
- package/dist/schemas/project-schema/v3.18.0.json +2350 -0
- package/dist/schemas/project-schema.json +3 -0
- package/dist/template-shapes/templates.d.ts +5 -0
- package/dist/template-shapes/templates.d.ts.map +1 -1
- package/dist/template-shapes/templates.js +59 -28
- package/dist/template-shapes/where.d.ts +3 -4
- package/dist/template-shapes/where.d.ts.map +1 -1
- package/dist/template-shapes/where.js +32 -26
- package/dist/types/types.d.ts +42 -2
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/utils.d.ts +2 -0
- package/dist/types/utils.d.ts.map +1 -1
- package/dist/types/utils.js +9 -1
- package/dist/unions.d.ts.map +1 -1
- package/dist/unions.js +3 -1
- package/dist/util/detect-cycles.d.ts +3 -1
- package/dist/util/detect-cycles.d.ts.map +1 -1
- package/dist/util/detect-cycles.js +37 -28
- package/dist/util/form-config.d.ts +9 -0
- package/dist/util/form-config.d.ts.map +1 -0
- package/dist/util/form-config.js +97 -0
- package/dist/util/index.d.ts +1 -0
- package/dist/util/index.d.ts.map +1 -1
- package/dist/util/index.js +13 -0
- package/dist/validate.d.ts.map +1 -1
- package/dist/validate.js +75 -45
- package/es/builtin-schema.js +17 -0
- package/es/get-is-leaf.js +2 -1
- package/es/migration/index.js +3 -1
- package/es/migration/to/v3.18.0.js +72 -0
- package/es/mocks.js +4 -2
- package/es/project-schema/index.js +3 -1
- package/es/project-schema/migrate.js +5 -1
- package/es/project-schema/v3.18.0.js +1 -0
- package/es/refs.js +22 -1
- package/es/relationships.js +215 -19
- package/es/rewrite.js +10 -2
- package/es/schema-util.js +38 -119
- package/es/schemas/index.js +4 -3
- package/es/schemas/index.ts +4 -2
- package/es/schemas/project-schema/latest.json +2175 -2195
- package/es/schemas/project-schema/v3.18.0.json +2350 -0
- package/es/schemas/project-schema.json +3 -0
- package/es/template-shapes/templates.js +55 -29
- package/es/template-shapes/where.js +29 -23
- package/es/types/utils.js +8 -2
- package/es/unions.js +2 -1
- package/es/util/detect-cycles.js +36 -28
- package/es/util/form-config.js +85 -0
- package/es/util/index.js +2 -1
- package/es/validate.js +74 -46
- package/examples/latest/betzino.json +12383 -6066
- package/examples/latest/blog-schema.json +46 -25
- package/examples/latest/brewery-schema.json +14 -9
- package/examples/latest/complex-project-schema.json +442 -244
- package/examples/latest/complex-schema.json +17205 -0
- package/examples/latest/fabric-ecommerce.json +2 -2
- package/examples/latest/frank-and-fred-schema.json +5141 -2391
- package/examples/latest/klirr-schema.json +35445 -0
- package/examples/latest/massive-schema.json +1205 -640
- package/examples/latest/mill-components-schema.json +241 -113
- package/examples/latest/one-earth.json +14429 -0
- package/examples/latest/pet-oneof-array.json +2 -2
- package/examples/latest/post-schema.json +18 -11
- package/examples/latest/pruned-shopify-product-schema.json +2 -2
- package/examples/latest/real-world-schema.json +81 -41
- package/examples/latest/recursive-repeater-schema.json +14 -9
- package/examples/latest/recursive-schema.json +14 -9
- package/examples/latest/rick-and-morty-ast.json +138 -80
- package/examples/latest/rick-and-morty-graphql.json +78 -45
- package/examples/latest/rick-and-morty-rest.json +2 -2
- package/examples/latest/schema-with-repeater-draftjs.json +38 -23
- package/examples/latest/shape-books-v3_2_0.json +138 -80
- package/examples/latest/shape-books.json +138 -80
- package/examples/latest/shopify-lookbook.json +30 -16
- package/examples/latest/shopify-namespace-schema.json +364 -0
- package/examples/latest/shopify-store-with-widget.json +2 -2
- package/examples/latest/stripe-starter-resolved.json +14 -8
- package/examples/latest/user-schema-no-required.json +2 -2
- package/examples/latest/user-schema-with-defaults.json +2 -2
- package/examples/source/complex-schema.json +12760 -0
- package/examples/source/klirr-schema.json +27716 -0
- package/examples/source/one-earth.json +11897 -0
- package/examples/source/post-schema.json +0 -1
- package/package.json +5 -4
|
@@ -223,33 +223,46 @@
|
|
|
223
223
|
"title": "Image",
|
|
224
224
|
"@l10n": true,
|
|
225
225
|
"@mapping": "takeshape:local:HomepageHero.imageId",
|
|
226
|
-
"$ref": "#/shapes/TSRelationship/schema",
|
|
227
|
-
"@relationship": {
|
|
228
|
-
"shapeIds": [
|
|
229
|
-
"ASSET"
|
|
230
|
-
],
|
|
231
|
-
"type": "single"
|
|
232
|
-
},
|
|
233
226
|
"@backreference": {
|
|
234
227
|
"enabled": true
|
|
228
|
+
},
|
|
229
|
+
"@ref": "local:Asset",
|
|
230
|
+
"@input": {
|
|
231
|
+
"@ref": "local:TSRelationship"
|
|
232
|
+
},
|
|
233
|
+
"@args": "TSRelationshipArgs",
|
|
234
|
+
"@resolver": {
|
|
235
|
+
"name": "takeshape:getRelated",
|
|
236
|
+
"service": "takeshape:local",
|
|
237
|
+
"options": {
|
|
238
|
+
"nullable": true
|
|
239
|
+
}
|
|
235
240
|
}
|
|
236
241
|
},
|
|
237
242
|
"featuredPosts": {
|
|
238
243
|
"@l10n": true,
|
|
239
244
|
"@mapping": "takeshape:local:HomepageHero.featuredPostsId",
|
|
240
|
-
"type": "array",
|
|
241
245
|
"items": {
|
|
242
|
-
"
|
|
243
|
-
},
|
|
244
|
-
"@relationship": {
|
|
245
|
-
"shapeIds": [
|
|
246
|
-
"<postContentTypeId>"
|
|
247
|
-
],
|
|
248
|
-
"type": "multiple"
|
|
246
|
+
"@ref": "local:Post"
|
|
249
247
|
},
|
|
250
248
|
"@backreference": {
|
|
251
249
|
"enabled": true,
|
|
252
250
|
"name": "heroFeaturedPosts"
|
|
251
|
+
},
|
|
252
|
+
"type": "array",
|
|
253
|
+
"@input": {
|
|
254
|
+
"type": "array",
|
|
255
|
+
"items": {
|
|
256
|
+
"@ref": "local:TSRelationship"
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
"@args": "TSRelationshipArgs",
|
|
260
|
+
"@resolver": {
|
|
261
|
+
"name": "takeshape:getRelated",
|
|
262
|
+
"service": "takeshape:local",
|
|
263
|
+
"options": {
|
|
264
|
+
"nullable": true
|
|
265
|
+
}
|
|
253
266
|
}
|
|
254
267
|
}
|
|
255
268
|
}
|
|
@@ -286,19 +299,27 @@
|
|
|
286
299
|
},
|
|
287
300
|
"tags": {
|
|
288
301
|
"@mapping": "takeshape:local:Post.tagsId",
|
|
289
|
-
"type": "array",
|
|
290
302
|
"items": {
|
|
291
|
-
"
|
|
292
|
-
},
|
|
293
|
-
"@relationship": {
|
|
294
|
-
"shapeIds": [
|
|
295
|
-
"<tagContentTypeId>"
|
|
296
|
-
],
|
|
297
|
-
"type": "multiple"
|
|
303
|
+
"@ref": "local:Tag"
|
|
298
304
|
},
|
|
299
305
|
"@backreference": {
|
|
300
306
|
"enabled": true,
|
|
301
307
|
"name": "firstTags"
|
|
308
|
+
},
|
|
309
|
+
"type": "array",
|
|
310
|
+
"@input": {
|
|
311
|
+
"type": "array",
|
|
312
|
+
"items": {
|
|
313
|
+
"@ref": "local:TSRelationship"
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
"@args": "TSRelationshipArgs",
|
|
317
|
+
"@resolver": {
|
|
318
|
+
"name": "takeshape:getRelated",
|
|
319
|
+
"service": "takeshape:local",
|
|
320
|
+
"options": {
|
|
321
|
+
"nullable": true
|
|
322
|
+
}
|
|
302
323
|
}
|
|
303
324
|
}
|
|
304
325
|
},
|
|
@@ -382,6 +403,6 @@
|
|
|
382
403
|
}
|
|
383
404
|
}
|
|
384
405
|
},
|
|
385
|
-
"schemaVersion": "3.
|
|
406
|
+
"schemaVersion": "3.18.0",
|
|
386
407
|
"services": {}
|
|
387
|
-
}
|
|
408
|
+
}
|
|
@@ -261,15 +261,20 @@
|
|
|
261
261
|
"title": "Image",
|
|
262
262
|
"description": "",
|
|
263
263
|
"@mapping": "takeshape:local:BreweryAddresses.HkIsDL6ye",
|
|
264
|
-
"$ref": "#/shapes/TSRelationship/schema",
|
|
265
|
-
"@relationship": {
|
|
266
|
-
"shapeIds": [
|
|
267
|
-
"ASSET"
|
|
268
|
-
],
|
|
269
|
-
"type": "single"
|
|
270
|
-
},
|
|
271
264
|
"@backreference": {
|
|
272
265
|
"enabled": true
|
|
266
|
+
},
|
|
267
|
+
"@ref": "local:Asset",
|
|
268
|
+
"@input": {
|
|
269
|
+
"@ref": "local:TSRelationship"
|
|
270
|
+
},
|
|
271
|
+
"@args": "TSRelationshipArgs",
|
|
272
|
+
"@resolver": {
|
|
273
|
+
"name": "takeshape:getRelated",
|
|
274
|
+
"service": "takeshape:local",
|
|
275
|
+
"options": {
|
|
276
|
+
"nullable": true
|
|
277
|
+
}
|
|
273
278
|
}
|
|
274
279
|
},
|
|
275
280
|
"zipCode": {
|
|
@@ -381,6 +386,6 @@
|
|
|
381
386
|
}
|
|
382
387
|
}
|
|
383
388
|
},
|
|
384
|
-
"schemaVersion": "3.
|
|
389
|
+
"schemaVersion": "3.18.0",
|
|
385
390
|
"services": {}
|
|
386
|
-
}
|
|
391
|
+
}
|