@takeshape/schema 11.52.0 → 11.55.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/__tests__/_examples.test.js +77 -0
- package/dist/__tests__/agents.test.js +163 -0
- package/dist/__tests__/api-version.test.js +24 -0
- package/dist/__tests__/builtin-schema.test.js +18 -0
- package/dist/__tests__/content-schema-transform.test.d.ts +1 -0
- package/dist/__tests__/content-schema-transform.test.js +522 -0
- package/dist/__tests__/create-input-schema.test.d.ts +1 -0
- package/dist/__tests__/create-input-schema.test.js +184 -0
- package/dist/__tests__/enum.test.d.ts +1 -0
- package/dist/__tests__/enum.test.js +36 -0
- package/dist/__tests__/flatten-templates.test.d.ts +1 -0
- package/dist/__tests__/flatten-templates.test.js +40 -0
- package/dist/__tests__/get-is-leaf.test.d.ts +1 -0
- package/dist/__tests__/get-is-leaf.test.js +50 -0
- package/dist/__tests__/interfaces.test.d.ts +1 -0
- package/dist/__tests__/interfaces.test.js +219 -0
- package/dist/__tests__/migration.test.d.ts +1 -0
- package/dist/__tests__/migration.test.js +34 -0
- package/dist/__tests__/mocks.test.d.ts +1 -0
- package/dist/__tests__/mocks.test.js +24 -0
- package/dist/__tests__/refs.test.d.ts +1 -0
- package/dist/__tests__/refs.test.js +752 -0
- package/dist/__tests__/relationships.test.d.ts +1 -0
- package/dist/__tests__/relationships.test.js +638 -0
- package/dist/__tests__/schema-transform.test.d.ts +1 -0
- package/dist/__tests__/schema-transform.test.js +205 -0
- package/dist/__tests__/schema-util.test.d.ts +1 -0
- package/dist/__tests__/schema-util.test.js +1731 -0
- package/dist/__tests__/service-dependencies.test.d.ts +1 -0
- package/dist/__tests__/service-dependencies.test.js +360 -0
- package/dist/__tests__/unions.test.d.ts +1 -0
- package/dist/__tests__/unions.test.js +44 -0
- package/dist/__tests__/validate.test.d.ts +1 -0
- package/dist/__tests__/validate.test.js +1926 -0
- package/dist/__tests__/workflows.test.d.ts +3 -0
- package/dist/__tests__/workflows.test.js +149 -0
- package/dist/agents.d.ts +14 -0
- package/dist/auth-schemas.d.ts +125 -0
- package/dist/builtin-schema.d.ts +8 -0
- package/dist/content-schema-transform.d.ts +35 -0
- package/dist/content-schema-transform.js +162 -0
- package/dist/create-input-schema.d.ts +9 -0
- package/dist/enum.d.ts +2 -0
- package/dist/flatten-templates.d.ts +2 -0
- package/dist/flatten-templates.js +20 -0
- package/dist/get-is-leaf.d.ts +3 -0
- package/dist/get-is-leaf.js +56 -0
- package/dist/index.d.ts +48 -0
- package/dist/index.js +46 -0
- package/dist/interfaces.d.ts +12 -0
- package/dist/interfaces.js +85 -0
- package/dist/layers/__tests__/layers.test.d.ts +1 -0
- package/dist/layers/__tests__/layers.test.js +38 -0
- package/dist/layers/layers.d.ts +26 -0
- package/dist/layers/layers.js +301 -0
- package/dist/layers/refs.d.ts +102 -0
- package/dist/layers/refs.js +220 -0
- package/dist/layers/type-utils.d.ts +59 -0
- package/dist/layers/type-utils.js +118 -0
- package/dist/layers/visitor.d.ts +5 -0
- package/dist/layers/visitor.js +38 -0
- package/dist/migration/index.d.ts +64 -0
- package/dist/migration/index.js +122 -0
- package/dist/migration/to/__tests__/v3.10.0.test.d.ts +1 -0
- package/dist/migration/to/__tests__/v3.10.0.test.js +90 -0
- package/dist/migration/to/__tests__/v3.12.3.test.d.ts +1 -0
- package/dist/migration/to/__tests__/v3.12.3.test.js +103 -0
- package/dist/migration/to/__tests__/v3.17.test.d.ts +1 -0
- package/dist/migration/to/__tests__/v3.17.test.js +71 -0
- package/dist/migration/to/__tests__/v3.34.0.test.d.ts +1 -0
- package/dist/migration/to/__tests__/v3.34.0.test.js +240 -0
- package/dist/migration/to/__tests__/v3.39.0.test.d.ts +1 -0
- package/dist/migration/to/__tests__/v3.39.0.test.js +116 -0
- package/dist/migration/to/__tests__/v3.46.0.test.d.ts +1 -0
- package/dist/migration/to/__tests__/v3.46.0.test.js +59 -0
- package/dist/migration/to/v3.0.0.d.ts +4 -0
- package/dist/migration/to/v3.0.0.js +212 -0
- package/dist/migration/to/v3.1.0.d.ts +4 -0
- package/dist/migration/to/v3.1.0.js +194 -0
- package/dist/migration/to/v3.10.0.d.ts +4 -0
- package/dist/migration/to/v3.11.0.d.ts +4 -0
- package/dist/migration/to/v3.12.0.d.ts +4 -0
- package/dist/migration/to/v3.12.1.d.ts +4 -0
- package/dist/migration/to/v3.12.2.d.ts +4 -0
- package/dist/migration/to/v3.12.3.d.ts +4 -0
- package/dist/migration/to/v3.13.0.d.ts +4 -0
- package/dist/migration/to/v3.14.0.d.ts +4 -0
- package/dist/migration/to/v3.15.0.d.ts +4 -0
- package/dist/migration/to/v3.16.0.d.ts +4 -0
- package/dist/migration/to/v3.17.0.d.ts +4 -0
- package/dist/migration/to/v3.17.1.d.ts +4 -0
- package/dist/migration/to/v3.18.0.d.ts +4 -0
- package/dist/migration/to/v3.18.1.d.ts +4 -0
- package/dist/migration/to/v3.18.2.d.ts +4 -0
- package/dist/migration/to/v3.19.0.d.ts +4 -0
- package/dist/migration/to/v3.2.0.d.ts +4 -0
- package/dist/migration/to/v3.20.0.d.ts +4 -0
- package/dist/migration/to/v3.21.0.d.ts +4 -0
- package/dist/migration/to/v3.22.0.d.ts +4 -0
- package/dist/migration/to/v3.23.0.d.ts +4 -0
- package/dist/migration/to/v3.24.0.d.ts +4 -0
- package/dist/migration/to/v3.25.0.d.ts +4 -0
- package/dist/migration/to/v3.26.0.d.ts +4 -0
- package/dist/migration/to/v3.27.0.d.ts +4 -0
- package/dist/migration/to/v3.28.0.d.ts +4 -0
- package/dist/migration/to/v3.29.0.d.ts +4 -0
- package/dist/migration/to/v3.3.0.d.ts +4 -0
- package/dist/migration/to/v3.30.0.d.ts +4 -0
- package/dist/migration/to/v3.31.0.d.ts +4 -0
- package/dist/migration/to/v3.32.0.d.ts +4 -0
- package/dist/migration/to/v3.32.0.js +59 -0
- package/dist/migration/to/v3.33.0.d.ts +4 -0
- package/dist/migration/to/v3.34.0.d.ts +6 -0
- package/dist/migration/to/v3.34.0.js +116 -0
- package/dist/migration/to/v3.35.0.d.ts +4 -0
- package/dist/migration/to/v3.36.0.d.ts +4 -0
- package/dist/migration/to/v3.37.0.d.ts +4 -0
- package/dist/migration/to/v3.38.0.d.ts +4 -0
- package/dist/migration/to/v3.39.0.d.ts +4 -0
- package/dist/migration/to/v3.39.0.js +45 -0
- package/dist/migration/to/v3.4.0.d.ts +4 -0
- package/dist/migration/to/v3.40.0.d.ts +4 -0
- package/dist/migration/to/v3.41.0.d.ts +4 -0
- package/dist/migration/to/v3.42.0.d.ts +4 -0
- package/dist/migration/to/v3.43.0.d.ts +4 -0
- package/dist/migration/to/v3.44.0.d.ts +4 -0
- package/dist/migration/to/v3.45.0.d.ts +4 -0
- package/dist/migration/to/v3.46.0.d.ts +4 -0
- package/dist/migration/to/v3.47.0.d.ts +4 -0
- package/dist/migration/to/v3.48.0.d.ts +4 -0
- package/dist/migration/to/v3.49.0.d.ts +4 -0
- package/dist/migration/to/v3.5.0.d.ts +4 -0
- package/dist/migration/to/v3.5.1.d.ts +4 -0
- package/dist/migration/to/v3.50.0.d.ts +4 -0
- package/dist/migration/to/v3.51.0.d.ts +4 -0
- package/dist/migration/to/v3.6.0.d.ts +4 -0
- package/dist/migration/to/v3.7.0.d.ts +4 -0
- package/dist/migration/to/v3.8.0.d.ts +4 -0
- package/dist/migration/to/v3.9.0.d.ts +4 -0
- package/dist/migration/types.d.ts +19 -0
- package/dist/migration/types.js +1 -0
- package/dist/mocks.d.ts +13 -0
- package/dist/mocks.js +58 -0
- package/dist/models/__tests__/project-schema.test.d.ts +1 -0
- package/dist/models/__tests__/project-schema.test.js +67 -0
- package/dist/models/__tests__/query.test.d.ts +1 -0
- package/dist/models/__tests__/query.test.js +27 -0
- package/dist/models/__tests__/service.test.d.ts +1 -0
- package/dist/models/__tests__/service.test.js +17 -0
- package/dist/models/__tests__/shape.test.d.ts +1 -0
- package/dist/models/__tests__/shape.test.js +61 -0
- package/dist/models/project-schema.d.ts +35 -0
- package/dist/models/project-schema.js +92 -0
- package/dist/models/query.d.ts +17 -0
- package/dist/models/service.d.ts +12 -0
- package/dist/models/shape.d.ts +41 -0
- package/dist/models/shape.js +85 -0
- package/dist/patterns.js +1 -0
- package/dist/project-schema/index.d.ts +187 -0
- package/dist/project-schema/index.js +75 -0
- package/dist/project-schema/migrate.d.ts +4 -0
- package/dist/project-schema/migrate.js +194 -0
- package/dist/refs.d.ts +226 -0
- package/dist/refs.js +608 -0
- package/dist/relationships.d.ts +40 -0
- package/dist/relationships.js +311 -0
- package/dist/runtime-schema.d.ts +5 -0
- package/dist/runtime-schema.js +80 -0
- package/dist/schema-transform.d.ts +19 -0
- package/dist/schema-transform.js +74 -0
- package/dist/schema-util.d.ts +210 -0
- package/dist/schema-util.js +1077 -0
- package/dist/schemas/auth-schemas.json +365 -0
- package/dist/schemas/index.js +154 -0
- package/dist/service-dependencies.d.ts +13 -0
- package/dist/service-dependencies.js +165 -0
- package/dist/services/__tests__/services.test.d.ts +1 -0
- package/dist/services/__tests__/services.test.js +113 -0
- package/dist/services/services.d.ts +31 -0
- package/dist/services/services.js +145 -0
- package/dist/services/types.js +1 -0
- package/dist/services/util.d.ts +16 -0
- package/dist/taxonomies.d.ts +15 -0
- package/dist/taxonomies.js +24 -0
- package/dist/template-shapes/__tests__/index.test.d.ts +1 -0
- package/dist/template-shapes/__tests__/index.test.js +40 -0
- package/dist/template-shapes/__tests__/names.test.d.ts +1 -0
- package/dist/template-shapes/__tests__/names.test.js +19 -0
- package/dist/template-shapes/__tests__/templates.test.d.ts +1 -0
- package/dist/template-shapes/__tests__/templates.test.js +80 -0
- package/dist/template-shapes/__tests__/where.test.d.ts +1 -0
- package/dist/template-shapes/__tests__/where.test.js +218 -0
- package/dist/template-shapes/index.d.ts +7 -0
- package/dist/template-shapes/names.d.ts +10 -0
- package/dist/template-shapes/templates.d.ts +32 -0
- package/dist/template-shapes/templates.js +319 -0
- package/dist/template-shapes/types.d.ts +15 -0
- package/dist/template-shapes/where.d.ts +37 -0
- package/dist/template-shapes/where.js +402 -0
- package/dist/types/__tests__/utils.test.d.ts +1 -0
- package/dist/types/__tests__/utils.test.js +159 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.js +2 -0
- package/dist/types/transforms.d.ts +13 -0
- package/dist/types/transforms.js +1 -0
- package/dist/types/types.d.ts +211 -0
- package/dist/types/utils.d.ts +117 -0
- package/dist/types/utils.js +279 -0
- package/dist/unions.d.ts +14 -0
- package/dist/unions.js +77 -0
- package/dist/util/__tests__/api-indexing.test.d.ts +1 -0
- package/dist/util/__tests__/api-indexing.test.js +129 -0
- package/dist/util/__tests__/detect-cycles.test.d.ts +1 -0
- package/dist/util/__tests__/detect-cycles.test.js +193 -0
- package/dist/util/__tests__/find-shape-at-path.test.d.ts +1 -0
- package/dist/util/__tests__/find-shape-at-path.test.js +41 -0
- package/dist/util/__tests__/form-config.test.d.ts +1 -0
- package/dist/util/__tests__/form-config.test.js +196 -0
- package/dist/util/__tests__/get-return-shape.test.d.ts +1 -0
- package/dist/util/__tests__/get-return-shape.test.js +27 -0
- package/dist/util/__tests__/has-args.test.d.ts +1 -0
- package/dist/util/__tests__/has-args.test.js +46 -0
- package/dist/util/__tests__/merge.test.d.ts +1 -0
- package/dist/util/__tests__/merge.test.js +1074 -0
- package/dist/util/__tests__/patch-schema.test.d.ts +1 -0
- package/dist/util/__tests__/patch-schema.test.js +82 -0
- package/dist/util/__tests__/shapes.test.d.ts +1 -0
- package/dist/util/__tests__/shapes.test.js +30 -0
- package/dist/util/ai-tools.d.ts +3 -0
- package/dist/util/api-indexing.d.ts +9 -0
- package/dist/util/api-indexing.js +57 -0
- package/dist/util/detect-cycles.d.ts +7 -0
- package/dist/util/detect-cycles.js +45 -0
- package/dist/util/find-shape-at-path.d.ts +21 -0
- package/dist/util/form-config.d.ts +11 -0
- package/dist/util/form-config.js +62 -0
- package/dist/util/get-conflicting-properties.d.ts +6 -0
- package/dist/util/get-conflicting-properties.js +55 -0
- package/dist/util/get-return-shape.d.ts +4 -0
- package/dist/util/get-return-shape.js +30 -0
- package/dist/util/has-arg.d.ts +4 -0
- package/dist/util/has-arg.js +13 -0
- package/dist/util/merge.d.ts +15 -0
- package/dist/util/merge.js +256 -0
- package/dist/util/patch-schema.d.ts +8 -0
- package/dist/util/shapes.d.ts +5 -0
- package/dist/validate/errors.d.ts +3 -0
- package/dist/validate/errors.js +20 -0
- package/dist/validate/validate.d.ts +73 -0
- package/dist/validate/validate.js +1107 -0
- package/dist/versions.d.ts +4 -0
- package/dist/versions.js +4 -0
- package/dist/workflows.d.ts +14 -0
- package/dist/workflows.js +66 -0
- package/examples/latest/agent-schema.json +12 -4
- package/examples/latest/all-fields-shapes-inline.json +52 -18
- package/examples/latest/all-fields-shapes.json +76 -26
- package/examples/latest/betzino.json +3139 -902
- package/examples/latest/blog-schema.json +28 -8
- package/examples/latest/brewery-schema.json +25 -7
- package/examples/latest/clear-cache-schema.json +7 -3
- package/examples/latest/complex-project-schema.json +359 -98
- package/examples/latest/complex-schema.json +1754 -487
- package/examples/latest/edit-schema.json +11 -4
- package/examples/latest/fabric-ecommerce.json +838 -187
- package/examples/latest/frank-and-fred-schema.json +1753 -486
- package/examples/latest/klirr-schema.json +2411 -682
- package/examples/latest/layers/rick-and-morty-layer.json +32 -11
- package/examples/latest/layers/shopify-layer-2023-01.json +8637 -2206
- package/examples/latest/layers/shopify-storefront-2023-04.json +1714 -404
- package/examples/latest/layers/wordpress-2024-01.json +2746 -691
- package/examples/latest/massive-schema.json +584 -131
- package/examples/latest/mill-components-schema.json +125 -29
- package/examples/latest/nested-shape-arrays.json +19 -7
- package/examples/latest/one-earth.json +1113 -236
- package/examples/latest/pet-oneof-array.json +22 -7
- package/examples/latest/post-schema.json +20 -6
- package/examples/latest/pruned-shopify-product-schema.json +830 -185
- package/examples/latest/rag-example.json +15 -5
- package/examples/latest/real-world-schema.json +56 -14
- package/examples/latest/recursive-repeater-schema.json +11 -4
- package/examples/latest/recursive-schema.json +11 -4
- package/examples/latest/rick-and-morty-ast.json +174 -45
- package/examples/latest/rick-and-morty-graphql.json +100 -25
- package/examples/latest/rick-and-morty-rest.json +7 -3
- package/examples/latest/rick-and-morty-with-indexing.json +13 -5
- package/examples/latest/schema-where-filter.json +40 -11
- package/examples/latest/schema-with-repeater-draftjs.json +8 -3
- package/examples/latest/schema-with-rick-and-morty.json +4 -2
- package/examples/latest/shape-books-v3_2_0.json +71 -17
- package/examples/latest/shape-books.json +71 -17
- package/examples/latest/shape-editor-schema-edited.json +69 -23
- package/examples/latest/shape-editor-schema-initial.json +28 -10
- package/examples/latest/shapedb-crud-every-prop-type.json +22 -8
- package/examples/latest/shopify-lookbook.json +19 -5
- package/examples/latest/shopify-product-2022-07.json +3217 -726
- package/examples/latest/shopify-product-2023-04.json +4496 -1012
- package/examples/latest/shopify-store-with-widget.json +942 -213
- package/examples/latest/stripe-product-runtime-schema.json +277 -81
- package/examples/latest/stripe-starter-resolved.json +1953 -476
- package/examples/latest/user-schema-no-required.json +13 -3
- package/examples/latest/user-schema-with-defaults.json +27 -5
- package/examples/latest/valvoline-ai-demo.json +69 -17
- package/examples/latest/vector-search-schema.json +24 -8
- package/package.json +23 -24
- package/dist/cjs/package.json +0 -1
- package/dist/cjs/src/agents.js +0 -147
- package/dist/cjs/src/api-version.js +0 -24
- package/dist/cjs/src/auth-schemas.js +0 -8
- package/dist/cjs/src/builtin-schema.js +0 -616
- package/dist/cjs/src/constants.js +0 -4
- package/dist/cjs/src/content-schema-transform.js +0 -175
- package/dist/cjs/src/create-input-schema.js +0 -66
- package/dist/cjs/src/enum.js +0 -12
- package/dist/cjs/src/flatten-templates.js +0 -26
- package/dist/cjs/src/get-is-leaf.js +0 -59
- package/dist/cjs/src/index.js +0 -62
- package/dist/cjs/src/interfaces.js +0 -98
- package/dist/cjs/src/layers/layers.js +0 -313
- package/dist/cjs/src/layers/refs.js +0 -243
- package/dist/cjs/src/layers/type-utils.js +0 -145
- package/dist/cjs/src/layers/visitor.js +0 -42
- package/dist/cjs/src/migration/index.js +0 -142
- package/dist/cjs/src/migration/to/v3.0.0.js +0 -217
- package/dist/cjs/src/migration/to/v3.1.0.js +0 -199
- package/dist/cjs/src/migration/to/v3.10.0.js +0 -72
- package/dist/cjs/src/migration/to/v3.11.0.js +0 -90
- package/dist/cjs/src/migration/to/v3.12.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.12.1.js +0 -12
- package/dist/cjs/src/migration/to/v3.12.2.js +0 -12
- package/dist/cjs/src/migration/to/v3.12.3.js +0 -92
- package/dist/cjs/src/migration/to/v3.13.0.js +0 -22
- package/dist/cjs/src/migration/to/v3.14.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.15.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.16.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.17.0.js +0 -27
- package/dist/cjs/src/migration/to/v3.17.1.js +0 -12
- package/dist/cjs/src/migration/to/v3.18.0.js +0 -69
- package/dist/cjs/src/migration/to/v3.18.1.js +0 -20
- package/dist/cjs/src/migration/to/v3.18.2.js +0 -24
- package/dist/cjs/src/migration/to/v3.19.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.2.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.20.0.js +0 -29
- package/dist/cjs/src/migration/to/v3.21.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.22.0.js +0 -30
- package/dist/cjs/src/migration/to/v3.23.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.24.0.js +0 -13
- package/dist/cjs/src/migration/to/v3.25.0.js +0 -13
- package/dist/cjs/src/migration/to/v3.26.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.27.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.28.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.29.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.3.0.js +0 -15
- package/dist/cjs/src/migration/to/v3.30.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.31.0.js +0 -43
- package/dist/cjs/src/migration/to/v3.32.0.js +0 -61
- package/dist/cjs/src/migration/to/v3.33.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.34.0.js +0 -123
- package/dist/cjs/src/migration/to/v3.35.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.36.0.js +0 -27
- package/dist/cjs/src/migration/to/v3.37.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.38.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.39.0.js +0 -47
- package/dist/cjs/src/migration/to/v3.4.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.40.0.js +0 -31
- package/dist/cjs/src/migration/to/v3.41.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.42.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.43.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.44.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.45.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.46.0.js +0 -37
- package/dist/cjs/src/migration/to/v3.47.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.48.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.49.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.5.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.5.1.js +0 -12
- package/dist/cjs/src/migration/to/v3.50.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.51.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.6.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.7.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.8.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.9.0.js +0 -84
- package/dist/cjs/src/migration/types.js +0 -2
- package/dist/cjs/src/migration/utils.js +0 -10
- package/dist/cjs/src/mocks.js +0 -65
- package/dist/cjs/src/models/project-schema.js +0 -99
- package/dist/cjs/src/models/query.js +0 -35
- package/dist/cjs/src/models/service.js +0 -24
- package/dist/cjs/src/models/shape.js +0 -89
- package/dist/cjs/src/patterns.js +0 -2
- package/dist/cjs/src/project-schema/index.js +0 -156
- package/dist/cjs/src/project-schema/latest.js +0 -8
- package/dist/cjs/src/project-schema/migrate.js +0 -198
- package/dist/cjs/src/project-schema/v1.0.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.0.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.1.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.10.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.11.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.12.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.12.1.js +0 -8
- package/dist/cjs/src/project-schema/v3.12.2.js +0 -8
- package/dist/cjs/src/project-schema/v3.12.3.js +0 -8
- package/dist/cjs/src/project-schema/v3.13.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.13.1.js +0 -8
- package/dist/cjs/src/project-schema/v3.14.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.15.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.16.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.17.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.17.1.js +0 -8
- package/dist/cjs/src/project-schema/v3.18.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.18.1.js +0 -8
- package/dist/cjs/src/project-schema/v3.18.2.js +0 -8
- package/dist/cjs/src/project-schema/v3.19.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.2.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.20.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.21.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.22.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.23.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.24.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.25.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.26.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.27.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.28.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.29.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.3.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.30.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.31.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.32.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.33.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.34.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.35.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.36.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.37.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.38.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.39.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.4.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.40.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.41.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.42.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.43.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.44.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.45.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.46.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.47.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.48.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.49.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.5.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.5.1.js +0 -8
- package/dist/cjs/src/project-schema/v3.50.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.51.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.6.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.7.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.8.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.9.0.js +0 -8
- package/dist/cjs/src/project-schema/v4.0.0.js +0 -8
- package/dist/cjs/src/refs.js +0 -671
- package/dist/cjs/src/relationships.js +0 -326
- package/dist/cjs/src/runtime-schema.js +0 -88
- package/dist/cjs/src/scalars.js +0 -8
- package/dist/cjs/src/schema-transform.js +0 -83
- package/dist/cjs/src/schema-util.js +0 -1140
- package/dist/cjs/src/schemas/auth-schemas.json +0 -313
- package/dist/cjs/src/schemas/index.js +0 -162
- package/dist/cjs/src/schemas/user-schema.json +0 -51
- package/dist/cjs/src/service-dependencies.js +0 -172
- package/dist/cjs/src/services/services.js +0 -156
- package/dist/cjs/src/services/types.js +0 -2
- package/dist/cjs/src/services/util.js +0 -45
- package/dist/cjs/src/taxonomies.js +0 -28
- package/dist/cjs/src/template-shapes/index.js +0 -37
- package/dist/cjs/src/template-shapes/names.js +0 -26
- package/dist/cjs/src/template-shapes/templates.js +0 -331
- package/dist/cjs/src/template-shapes/types.js +0 -10
- package/dist/cjs/src/template-shapes/where.js +0 -414
- package/dist/cjs/src/types/index.js +0 -19
- package/dist/cjs/src/types/transforms.js +0 -2
- package/dist/cjs/src/types/types.js +0 -21
- package/dist/cjs/src/types/utils.js +0 -344
- package/dist/cjs/src/unions.js +0 -88
- package/dist/cjs/src/user-schema.js +0 -8
- package/dist/cjs/src/util/ai-tools.js +0 -10
- package/dist/cjs/src/util/api-indexing.js +0 -62
- package/dist/cjs/src/util/detect-cycles.js +0 -48
- package/dist/cjs/src/util/find-shape-at-path.js +0 -57
- package/dist/cjs/src/util/form-config.js +0 -66
- package/dist/cjs/src/util/get-conflicting-properties.js +0 -58
- package/dist/cjs/src/util/get-return-shape.js +0 -34
- package/dist/cjs/src/util/has-arg.js +0 -17
- package/dist/cjs/src/util/merge.js +0 -269
- package/dist/cjs/src/util/patch-schema.js +0 -55
- package/dist/cjs/src/util/shapes.js +0 -31
- package/dist/cjs/src/validate.js +0 -1140
- package/dist/cjs/src/versions.js +0 -8
- package/dist/cjs/src/workflows.js +0 -76
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +0 -1
- package/dist/esm/package.json +0 -1
- package/dist/esm/src/content-schema-transform.js +0 -162
- package/dist/esm/src/flatten-templates.js +0 -20
- package/dist/esm/src/get-is-leaf.js +0 -56
- package/dist/esm/src/index.js +0 -46
- package/dist/esm/src/interfaces.js +0 -85
- package/dist/esm/src/layers/layers.js +0 -301
- package/dist/esm/src/layers/refs.js +0 -220
- package/dist/esm/src/layers/type-utils.js +0 -118
- package/dist/esm/src/layers/visitor.js +0 -38
- package/dist/esm/src/migration/index.js +0 -122
- package/dist/esm/src/migration/to/v3.0.0.js +0 -212
- package/dist/esm/src/migration/to/v3.1.0.js +0 -194
- package/dist/esm/src/migration/to/v3.32.0.js +0 -59
- package/dist/esm/src/migration/to/v3.34.0.js +0 -116
- package/dist/esm/src/migration/to/v3.39.0.js +0 -45
- package/dist/esm/src/mocks.js +0 -58
- package/dist/esm/src/models/project-schema.js +0 -92
- package/dist/esm/src/models/shape.js +0 -85
- package/dist/esm/src/project-schema/index.js +0 -138
- package/dist/esm/src/project-schema/migrate.js +0 -194
- package/dist/esm/src/refs.js +0 -608
- package/dist/esm/src/relationships.js +0 -311
- package/dist/esm/src/runtime-schema.js +0 -80
- package/dist/esm/src/schema-transform.js +0 -74
- package/dist/esm/src/schema-util.js +0 -1077
- package/dist/esm/src/schemas/auth-schemas.json +0 -313
- package/dist/esm/src/schemas/index.js +0 -154
- package/dist/esm/src/schemas/project-schema/experimental.json +0 -1101
- package/dist/esm/src/schemas/project-schema/latest.json +0 -3320
- package/dist/esm/src/schemas/project-schema/meta-schema-v1.0.0.json +0 -193
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.0.0.json +0 -608
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.1.0.json +0 -608
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.2.0.json +0 -612
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.3.0.json +0 -612
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.4.0.json +0 -637
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.5.0.json +0 -626
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.5.1.json +0 -626
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.6.0.json +0 -629
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.7.0.json +0 -1137
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.8.0.json +0 -1137
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.9.0.json +0 -1477
- package/dist/esm/src/schemas/project-schema/v1.0.0.json +0 -321
- package/dist/esm/src/schemas/project-schema/v3.0.0.json +0 -414
- package/dist/esm/src/schemas/project-schema/v3.1.0.json +0 -572
- package/dist/esm/src/schemas/project-schema/v3.10.0.json +0 -2097
- package/dist/esm/src/schemas/project-schema/v3.11.0.json +0 -2141
- package/dist/esm/src/schemas/project-schema/v3.12.0.json +0 -2144
- package/dist/esm/src/schemas/project-schema/v3.12.1.json +0 -2282
- package/dist/esm/src/schemas/project-schema/v3.12.2.json +0 -2304
- package/dist/esm/src/schemas/project-schema/v3.12.3.json +0 -2357
- package/dist/esm/src/schemas/project-schema/v3.13.0.json +0 -2377
- package/dist/esm/src/schemas/project-schema/v3.14.0.json +0 -2385
- package/dist/esm/src/schemas/project-schema/v3.15.0.json +0 -2365
- package/dist/esm/src/schemas/project-schema/v3.16.0.json +0 -2373
- package/dist/esm/src/schemas/project-schema/v3.17.0.json +0 -2378
- package/dist/esm/src/schemas/project-schema/v3.17.1.json +0 -2380
- package/dist/esm/src/schemas/project-schema/v3.18.0.json +0 -2356
- package/dist/esm/src/schemas/project-schema/v3.18.1.json +0 -2357
- package/dist/esm/src/schemas/project-schema/v3.18.2.json +0 -2357
- package/dist/esm/src/schemas/project-schema/v3.19.0.json +0 -2369
- package/dist/esm/src/schemas/project-schema/v3.2.0.json +0 -580
- package/dist/esm/src/schemas/project-schema/v3.20.0.json +0 -2369
- package/dist/esm/src/schemas/project-schema/v3.21.0.json +0 -2376
- package/dist/esm/src/schemas/project-schema/v3.22.0.json +0 -2381
- package/dist/esm/src/schemas/project-schema/v3.23.0.json +0 -2456
- package/dist/esm/src/schemas/project-schema/v3.24.0.json +0 -2556
- package/dist/esm/src/schemas/project-schema/v3.25.0.json +0 -2552
- package/dist/esm/src/schemas/project-schema/v3.26.0.json +0 -2599
- package/dist/esm/src/schemas/project-schema/v3.27.0.json +0 -2611
- package/dist/esm/src/schemas/project-schema/v3.28.0.json +0 -2656
- package/dist/esm/src/schemas/project-schema/v3.29.0.json +0 -2670
- package/dist/esm/src/schemas/project-schema/v3.3.0.json +0 -581
- package/dist/esm/src/schemas/project-schema/v3.30.0.json +0 -2656
- package/dist/esm/src/schemas/project-schema/v3.31.0.json +0 -2714
- package/dist/esm/src/schemas/project-schema/v3.32.0.json +0 -2708
- package/dist/esm/src/schemas/project-schema/v3.33.0.json +0 -2715
- package/dist/esm/src/schemas/project-schema/v3.34.0.json +0 -2715
- package/dist/esm/src/schemas/project-schema/v3.35.0.json +0 -2748
- package/dist/esm/src/schemas/project-schema/v3.36.0.json +0 -2756
- package/dist/esm/src/schemas/project-schema/v3.37.0.json +0 -2821
- package/dist/esm/src/schemas/project-schema/v3.38.0.json +0 -2819
- package/dist/esm/src/schemas/project-schema/v3.39.0.json +0 -2827
- package/dist/esm/src/schemas/project-schema/v3.4.0.json +0 -571
- package/dist/esm/src/schemas/project-schema/v3.40.0.json +0 -2830
- package/dist/esm/src/schemas/project-schema/v3.41.0.json +0 -2830
- package/dist/esm/src/schemas/project-schema/v3.42.0.json +0 -2835
- package/dist/esm/src/schemas/project-schema/v3.43.0.json +0 -2841
- package/dist/esm/src/schemas/project-schema/v3.44.0.json +0 -3013
- package/dist/esm/src/schemas/project-schema/v3.45.0.json +0 -3064
- package/dist/esm/src/schemas/project-schema/v3.46.0.json +0 -3136
- package/dist/esm/src/schemas/project-schema/v3.47.0.json +0 -3189
- package/dist/esm/src/schemas/project-schema/v3.48.0.json +0 -3196
- package/dist/esm/src/schemas/project-schema/v3.49.0.json +0 -3239
- package/dist/esm/src/schemas/project-schema/v3.5.0.json +0 -571
- package/dist/esm/src/schemas/project-schema/v3.5.1.json +0 -571
- package/dist/esm/src/schemas/project-schema/v3.50.0.json +0 -3320
- package/dist/esm/src/schemas/project-schema/v3.51.0.json +0 -3320
- package/dist/esm/src/schemas/project-schema/v3.6.0.json +0 -587
- package/dist/esm/src/schemas/project-schema/v3.7.0.json +0 -587
- package/dist/esm/src/schemas/project-schema/v3.8.0.json +0 -604
- package/dist/esm/src/schemas/project-schema/v3.9.0.json +0 -604
- package/dist/esm/src/schemas/project-schema/v4.0.0.json +0 -2316
- package/dist/esm/src/schemas/project-schema.json +0 -190
- package/dist/esm/src/schemas/user-schema.json +0 -51
- package/dist/esm/src/service-dependencies.js +0 -165
- package/dist/esm/src/services/services.js +0 -145
- package/dist/esm/src/taxonomies.js +0 -24
- package/dist/esm/src/template-shapes/templates.js +0 -319
- package/dist/esm/src/template-shapes/where.js +0 -402
- package/dist/esm/src/types/index.js +0 -3
- package/dist/esm/src/types/utils.js +0 -279
- package/dist/esm/src/unions.js +0 -77
- package/dist/esm/src/user-schema.js +0 -7
- package/dist/esm/src/util/api-indexing.js +0 -57
- package/dist/esm/src/util/detect-cycles.js +0 -45
- package/dist/esm/src/util/form-config.js +0 -62
- package/dist/esm/src/util/get-conflicting-properties.js +0 -55
- package/dist/esm/src/util/get-return-shape.js +0 -30
- package/dist/esm/src/util/has-arg.js +0 -13
- package/dist/esm/src/util/merge.js +0 -256
- package/dist/esm/src/validate.js +0 -1126
- package/dist/esm/src/versions.js +0 -4
- package/dist/esm/src/workflows.js +0 -66
- package/dist/esm/tsconfig.esm.tsbuildinfo +0 -1
- package/dist/types/src/agents.d.ts +0 -14
- package/dist/types/src/auth-schemas.d.ts +0 -104
- package/dist/types/src/builtin-schema.d.ts +0 -8
- package/dist/types/src/content-schema-transform.d.ts +0 -35
- package/dist/types/src/create-input-schema.d.ts +0 -9
- package/dist/types/src/enum.d.ts +0 -2
- package/dist/types/src/flatten-templates.d.ts +0 -2
- package/dist/types/src/get-is-leaf.d.ts +0 -3
- package/dist/types/src/index.d.ts +0 -48
- package/dist/types/src/interfaces.d.ts +0 -12
- package/dist/types/src/layers/layers.d.ts +0 -26
- package/dist/types/src/layers/refs.d.ts +0 -102
- package/dist/types/src/layers/type-utils.d.ts +0 -59
- package/dist/types/src/layers/visitor.d.ts +0 -5
- package/dist/types/src/migration/index.d.ts +0 -64
- package/dist/types/src/migration/to/v3.0.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.1.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.10.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.11.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.12.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.12.1.d.ts +0 -4
- package/dist/types/src/migration/to/v3.12.2.d.ts +0 -4
- package/dist/types/src/migration/to/v3.12.3.d.ts +0 -4
- package/dist/types/src/migration/to/v3.13.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.14.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.15.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.16.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.17.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.17.1.d.ts +0 -4
- package/dist/types/src/migration/to/v3.18.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.18.1.d.ts +0 -4
- package/dist/types/src/migration/to/v3.18.2.d.ts +0 -4
- package/dist/types/src/migration/to/v3.19.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.2.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.20.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.21.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.22.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.23.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.24.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.25.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.26.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.27.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.28.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.29.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.3.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.30.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.31.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.32.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.33.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.34.0.d.ts +0 -6
- package/dist/types/src/migration/to/v3.35.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.36.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.37.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.38.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.39.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.4.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.40.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.41.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.42.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.43.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.44.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.45.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.46.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.47.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.48.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.49.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.5.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.5.1.d.ts +0 -4
- package/dist/types/src/migration/to/v3.50.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.51.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.6.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.7.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.8.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.9.0.d.ts +0 -4
- package/dist/types/src/migration/types.d.ts +0 -19
- package/dist/types/src/mocks.d.ts +0 -13
- package/dist/types/src/models/project-schema.d.ts +0 -35
- package/dist/types/src/models/query.d.ts +0 -17
- package/dist/types/src/models/service.d.ts +0 -12
- package/dist/types/src/models/shape.d.ts +0 -41
- package/dist/types/src/project-schema/index.d.ts +0 -187
- package/dist/types/src/project-schema/migrate.d.ts +0 -4
- package/dist/types/src/refs.d.ts +0 -226
- package/dist/types/src/relationships.d.ts +0 -40
- package/dist/types/src/runtime-schema.d.ts +0 -5
- package/dist/types/src/schema-transform.d.ts +0 -19
- package/dist/types/src/schema-util.d.ts +0 -210
- package/dist/types/src/service-dependencies.d.ts +0 -13
- package/dist/types/src/services/services.d.ts +0 -31
- package/dist/types/src/services/util.d.ts +0 -16
- package/dist/types/src/taxonomies.d.ts +0 -15
- package/dist/types/src/template-shapes/index.d.ts +0 -7
- package/dist/types/src/template-shapes/names.d.ts +0 -10
- package/dist/types/src/template-shapes/templates.d.ts +0 -32
- package/dist/types/src/template-shapes/types.d.ts +0 -15
- package/dist/types/src/template-shapes/where.d.ts +0 -37
- package/dist/types/src/types/index.d.ts +0 -3
- package/dist/types/src/types/transforms.d.ts +0 -13
- package/dist/types/src/types/types.d.ts +0 -211
- package/dist/types/src/types/utils.d.ts +0 -117
- package/dist/types/src/unions.d.ts +0 -14
- package/dist/types/src/user-schema.d.ts +0 -38
- package/dist/types/src/util/ai-tools.d.ts +0 -3
- package/dist/types/src/util/api-indexing.d.ts +0 -9
- package/dist/types/src/util/detect-cycles.d.ts +0 -7
- package/dist/types/src/util/find-shape-at-path.d.ts +0 -21
- package/dist/types/src/util/form-config.d.ts +0 -11
- package/dist/types/src/util/get-conflicting-properties.d.ts +0 -6
- package/dist/types/src/util/get-return-shape.d.ts +0 -4
- package/dist/types/src/util/has-arg.d.ts +0 -4
- package/dist/types/src/util/merge.d.ts +0 -15
- package/dist/types/src/util/patch-schema.d.ts +0 -8
- package/dist/types/src/util/shapes.d.ts +0 -5
- package/dist/types/src/validate.d.ts +0 -75
- package/dist/types/src/versions.d.ts +0 -4
- package/dist/types/src/workflows.d.ts +0 -14
- package/dist/types/tsconfig.types.tsbuildinfo +0 -1
- /package/dist/{esm/src/migration/types.js → __tests__/_examples.test.d.ts} +0 -0
- /package/dist/{esm/src/patterns.js → __tests__/agents.test.d.ts} +0 -0
- /package/dist/{esm/src/services/types.js → __tests__/api-version.test.d.ts} +0 -0
- /package/dist/{esm/src/types/transforms.js → __tests__/builtin-schema.test.d.ts} +0 -0
- /package/dist/{esm/src/agents.js → agents.js} +0 -0
- /package/dist/{types/src/api-version.d.ts → api-version.d.ts} +0 -0
- /package/dist/{esm/src/api-version.js → api-version.js} +0 -0
- /package/dist/{esm/src/auth-schemas.js → auth-schemas.js} +0 -0
- /package/dist/{esm/src/builtin-schema.js → builtin-schema.js} +0 -0
- /package/dist/{types/src/constants.d.ts → constants.d.ts} +0 -0
- /package/dist/{esm/src/constants.js → constants.js} +0 -0
- /package/dist/{esm/src/create-input-schema.js → create-input-schema.js} +0 -0
- /package/dist/{esm/src/enum.js → enum.js} +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.10.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.11.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.12.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.12.1.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.12.2.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.12.3.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.13.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.14.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.15.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.16.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.17.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.17.1.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.18.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.18.1.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.18.2.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.19.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.2.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.20.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.21.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.22.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.23.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.24.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.25.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.26.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.27.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.28.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.29.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.3.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.30.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.31.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.33.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.35.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.36.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.37.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.38.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.4.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.40.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.41.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.42.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.43.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.44.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.45.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.46.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.47.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.48.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.49.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.5.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.5.1.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.50.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.51.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.6.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.7.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.8.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.9.0.js +0 -0
- /package/dist/{types/src/migration → migration}/utils.d.ts +0 -0
- /package/dist/{esm/src/migration → migration}/utils.js +0 -0
- /package/dist/{esm/src/models → models}/query.js +0 -0
- /package/dist/{esm/src/models → models}/service.js +0 -0
- /package/dist/{types/src/patterns.d.ts → patterns.d.ts} +0 -0
- /package/dist/{types/src/project-schema → project-schema}/latest.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/latest.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v1.0.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v1.0.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.0.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.0.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.1.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.1.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.10.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.10.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.11.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.11.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.12.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.12.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.12.1.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.12.1.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.12.2.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.12.2.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.12.3.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.12.3.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.13.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.13.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.13.1.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.13.1.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.14.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.14.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.15.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.15.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.16.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.16.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.17.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.17.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.17.1.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.17.1.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.18.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.18.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.18.1.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.18.1.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.18.2.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.18.2.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.19.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.19.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.2.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.2.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.20.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.20.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.21.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.21.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.22.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.22.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.23.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.23.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.24.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.24.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.25.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.25.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.26.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.26.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.27.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.27.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.28.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.28.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.29.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.29.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.3.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.3.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.30.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.30.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.31.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.31.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.32.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.32.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.33.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.33.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.34.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.34.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.35.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.35.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.36.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.36.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.37.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.37.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.38.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.38.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.39.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.39.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.4.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.4.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.40.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.40.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.41.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.41.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.42.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.42.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.43.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.43.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.44.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.44.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.45.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.45.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.46.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.46.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.47.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.47.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.48.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.48.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.49.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.49.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.5.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.5.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.5.1.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.5.1.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.50.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.50.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.51.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.51.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.6.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.6.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.7.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.7.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.8.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.8.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.9.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.9.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v4.0.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v4.0.0.js +0 -0
- /package/dist/{types/src/scalars.d.ts → scalars.d.ts} +0 -0
- /package/dist/{esm/src/scalars.js → scalars.js} +0 -0
- /package/dist/{types/src/schemas → schemas}/index.d.ts +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/experimental.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/latest.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v1.0.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.0.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.1.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.2.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.3.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.4.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.5.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.5.1.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.6.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.7.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.8.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.9.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v1.0.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.0.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.1.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.10.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.11.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.12.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.12.1.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.12.2.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.12.3.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.13.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.14.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.15.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.16.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.17.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.17.1.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.18.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.18.1.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.18.2.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.19.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.2.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.20.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.21.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.22.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.23.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.24.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.25.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.26.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.27.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.28.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.29.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.3.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.30.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.31.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.32.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.33.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.34.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.35.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.36.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.37.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.38.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.39.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.4.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.40.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.41.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.42.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.43.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.44.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.45.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.46.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.47.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.48.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.49.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.5.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.5.1.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.50.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.51.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.6.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.7.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.8.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.9.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v4.0.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema.json +0 -0
- /package/dist/{types/src/services → services}/types.d.ts +0 -0
- /package/dist/{esm/src/services → services}/util.js +0 -0
- /package/dist/{esm/src/template-shapes → template-shapes}/index.js +0 -0
- /package/dist/{esm/src/template-shapes → template-shapes}/names.js +0 -0
- /package/dist/{esm/src/template-shapes → template-shapes}/types.js +0 -0
- /package/dist/{esm/src/types → types}/types.js +0 -0
- /package/dist/{esm/src/util → util}/ai-tools.js +0 -0
- /package/dist/{esm/src/util → util}/find-shape-at-path.js +0 -0
- /package/dist/{esm/src/util → util}/patch-schema.js +0 -0
- /package/dist/{esm/src/util → util}/shapes.js +0 -0
|
@@ -0,0 +1,752 @@
|
|
|
1
|
+
import shapeBooksSchema from '@/examples/latest/shape-books.json';
|
|
2
|
+
import shopifyStoreJson from '@/examples/latest/shopify-store-with-widget.json';
|
|
3
|
+
import valvolineSchema from '@/examples/latest/valvoline-ai-demo.json';
|
|
4
|
+
import { describe, expect, it, test } from 'vitest';
|
|
5
|
+
import { createMockSchema, createMockSchemaWithDefaults } from "../mocks.js";
|
|
6
|
+
import { $refToAtRef, anyRefToShapeSchemaPath, createGetNamespace, createTemplateShapeName, dereferenceSchema, getAllPropertyRefs, getOneOfRefs, getRefShapeName, hasRef, hasRefProperty, hasResolvableRef, normalizeLocalRefString, normalizeRefExpression, normalizeRefs, parsePropertyRef, parseReturnShape, parseTemplateShape, propertyRefItemToArgsPath, propertyRefItemToResolverPath, propertyRefToArgs, propertyRefToShapeRef, refExpressionToRefItem, refExpressionToShape, refSchemaToPath, returnShapeToSchema, serializePropertyRef, untemplate } from "../refs.js";
|
|
7
|
+
import { createShape } from "../schema-util.js";
|
|
8
|
+
const schema = shopifyStoreJson.shapes.Product.schema;
|
|
9
|
+
test('getRefShapeName', () => {
|
|
10
|
+
const expected = 'Shopify_Product';
|
|
11
|
+
const actual = getRefShapeName(shopifyStoreJson, schema.properties.gregsTakeshapeStore);
|
|
12
|
+
expect(actual).toEqual(expected);
|
|
13
|
+
});
|
|
14
|
+
test('anyRefToShapeSchemaPath', () => {
|
|
15
|
+
const expected = ['shapes', 'Shopify_Product', 'schema'];
|
|
16
|
+
const actual = anyRefToShapeSchemaPath(shopifyStoreJson, schema.properties.gregsTakeshapeStore);
|
|
17
|
+
expect(actual).toEqual(expected);
|
|
18
|
+
});
|
|
19
|
+
test('hasRefProperty', () => {
|
|
20
|
+
const expected = true;
|
|
21
|
+
const actual = hasRefProperty(schema.properties.gregsTakeshapeStore);
|
|
22
|
+
expect(actual).toEqual(expected);
|
|
23
|
+
});
|
|
24
|
+
describe('hasRef', () => {
|
|
25
|
+
const mockFieldSchema = {
|
|
26
|
+
type: 'object',
|
|
27
|
+
properties: {
|
|
28
|
+
mock: {
|
|
29
|
+
type: 'string'
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
it('is true with @ref', () => {
|
|
34
|
+
const schema = {
|
|
35
|
+
'@ref': 'local:Fake'
|
|
36
|
+
};
|
|
37
|
+
const schemaHasRef = hasRef(schema);
|
|
38
|
+
expect(schemaHasRef).toEqual(true);
|
|
39
|
+
});
|
|
40
|
+
it('is true with $ref', () => {
|
|
41
|
+
const schema = {
|
|
42
|
+
$ref: '#/shapes/Fake/schema'
|
|
43
|
+
};
|
|
44
|
+
const schemaHasRef = hasRef(schema);
|
|
45
|
+
expect(schemaHasRef).toEqual(true);
|
|
46
|
+
});
|
|
47
|
+
it('is true with nested schemas (mixed)', () => {
|
|
48
|
+
const allOfSchema = {
|
|
49
|
+
allOf: [
|
|
50
|
+
{
|
|
51
|
+
'@ref': 'local:Fake'
|
|
52
|
+
},
|
|
53
|
+
mockFieldSchema
|
|
54
|
+
]
|
|
55
|
+
};
|
|
56
|
+
const allOfSchemaHasRef = hasRef(allOfSchema);
|
|
57
|
+
expect(allOfSchemaHasRef).toEqual(true);
|
|
58
|
+
const oneOfSchema = {
|
|
59
|
+
oneOf: [
|
|
60
|
+
{
|
|
61
|
+
'@ref': 'local:Fake'
|
|
62
|
+
},
|
|
63
|
+
mockFieldSchema
|
|
64
|
+
]
|
|
65
|
+
};
|
|
66
|
+
const oneOfSchemaHasRef = hasRef(oneOfSchema);
|
|
67
|
+
expect(oneOfSchemaHasRef).toEqual(true);
|
|
68
|
+
});
|
|
69
|
+
it('is false when there are none', () => {
|
|
70
|
+
const oneOfSchema = {
|
|
71
|
+
oneOf: [mockFieldSchema]
|
|
72
|
+
};
|
|
73
|
+
const oneOfSchemaHasRef = hasRef(oneOfSchema);
|
|
74
|
+
expect(oneOfSchemaHasRef).toEqual(false);
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
describe('hasResolvableRef', () => {
|
|
78
|
+
const mockProjectSchema = createMockSchemaWithDefaults('mock-project-id');
|
|
79
|
+
const mockFieldSchema = {
|
|
80
|
+
type: 'object',
|
|
81
|
+
properties: {
|
|
82
|
+
mock: {
|
|
83
|
+
type: 'string'
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
it('is true with @ref', () => {
|
|
88
|
+
const schema = {
|
|
89
|
+
'@ref': 'local:Asset'
|
|
90
|
+
};
|
|
91
|
+
const schemaHasRef = hasResolvableRef(mockProjectSchema, schema);
|
|
92
|
+
expect(schemaHasRef).toEqual(true);
|
|
93
|
+
});
|
|
94
|
+
it('is true with $ref', () => {
|
|
95
|
+
const schema = {
|
|
96
|
+
$ref: '#/shapes/Asset/schema'
|
|
97
|
+
};
|
|
98
|
+
const schemaHasRef = hasResolvableRef(mockProjectSchema, schema);
|
|
99
|
+
expect(schemaHasRef).toEqual(true);
|
|
100
|
+
});
|
|
101
|
+
it('is true with nested schemas (mixed) ', () => {
|
|
102
|
+
const allOfSchema = {
|
|
103
|
+
allOf: [
|
|
104
|
+
{
|
|
105
|
+
'@ref': 'local:Asset'
|
|
106
|
+
},
|
|
107
|
+
mockFieldSchema
|
|
108
|
+
]
|
|
109
|
+
};
|
|
110
|
+
const allOfSchemaHasRef = hasResolvableRef(mockProjectSchema, allOfSchema);
|
|
111
|
+
expect(allOfSchemaHasRef).toEqual(true);
|
|
112
|
+
const oneOfSchema = {
|
|
113
|
+
oneOf: [
|
|
114
|
+
{
|
|
115
|
+
'@ref': 'local:Asset'
|
|
116
|
+
},
|
|
117
|
+
mockFieldSchema
|
|
118
|
+
]
|
|
119
|
+
};
|
|
120
|
+
const oneOfSchemaHasRef = hasResolvableRef(mockProjectSchema, oneOfSchema);
|
|
121
|
+
expect(oneOfSchemaHasRef).toEqual(true);
|
|
122
|
+
});
|
|
123
|
+
it('is false when there are none', () => {
|
|
124
|
+
const schema = {
|
|
125
|
+
oneOf: [
|
|
126
|
+
{
|
|
127
|
+
'@ref': 'remote:Shape'
|
|
128
|
+
},
|
|
129
|
+
mockFieldSchema
|
|
130
|
+
]
|
|
131
|
+
};
|
|
132
|
+
const hasRef = hasResolvableRef(mockProjectSchema, schema);
|
|
133
|
+
expect(hasRef).toEqual(false);
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
describe('$refToAtRef', () => {
|
|
137
|
+
it('works', () => {
|
|
138
|
+
const atRef = $refToAtRef('#/shapes/Shopify_Product/schema', 'my-service', 'Shopify');
|
|
139
|
+
expect(atRef).toEqual('my-service:Product');
|
|
140
|
+
});
|
|
141
|
+
it('works with local ref', () => {
|
|
142
|
+
const atRef = $refToAtRef('#/shapes/Product/schema', 'local');
|
|
143
|
+
expect(atRef).toEqual('local:Product');
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
describe('refSchemaToPath', () => {
|
|
147
|
+
it('works', () => {
|
|
148
|
+
expect(refSchemaToPath(shopifyStoreJson, { '@ref': 'local:Product' })).toEqual(['shapes', 'Product']);
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
|
+
describe('refExpressionToRefItem', () => {
|
|
152
|
+
it('template and at ref', () => {
|
|
153
|
+
expect(refExpressionToRefItem(shopifyStoreJson, 'CreateArgs<gregs-takeshape-store:Product>')).toEqual({
|
|
154
|
+
isForeign: true,
|
|
155
|
+
serviceKey: 'gregs-takeshape-store',
|
|
156
|
+
serviceNamespace: 'Shopify',
|
|
157
|
+
template: 'CreateArgs',
|
|
158
|
+
typeName: 'Product',
|
|
159
|
+
isValidService: true
|
|
160
|
+
});
|
|
161
|
+
});
|
|
162
|
+
it('service namespace', () => {
|
|
163
|
+
expect(refExpressionToRefItem(shopifyStoreJson, 'Shopify_Product')).toEqual({
|
|
164
|
+
isForeign: true,
|
|
165
|
+
serviceKey: 'gregs-takeshape-store',
|
|
166
|
+
serviceNamespace: 'Shopify',
|
|
167
|
+
typeName: 'Product',
|
|
168
|
+
isValidService: true
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
it('@ref', () => {
|
|
172
|
+
expect(refExpressionToRefItem(shopifyStoreJson, 'gregs-takeshape-store:Product')).toEqual({
|
|
173
|
+
isForeign: true,
|
|
174
|
+
serviceKey: 'gregs-takeshape-store',
|
|
175
|
+
serviceNamespace: 'Shopify',
|
|
176
|
+
typeName: 'Product',
|
|
177
|
+
isValidService: true
|
|
178
|
+
});
|
|
179
|
+
});
|
|
180
|
+
});
|
|
181
|
+
test('refExpressionToShape', () => {
|
|
182
|
+
expect(refExpressionToShape(shopifyStoreJson, 'CreateArgs<Product>')).toEqual(shopifyStoreJson.shapes.Product);
|
|
183
|
+
});
|
|
184
|
+
describe('parseTemplateShape', () => {
|
|
185
|
+
test('no template', () => {
|
|
186
|
+
expect(parseTemplateShape('Post')).toEqual({
|
|
187
|
+
shapeName: 'Post',
|
|
188
|
+
template: undefined
|
|
189
|
+
});
|
|
190
|
+
});
|
|
191
|
+
test('with template', () => {
|
|
192
|
+
expect(parseTemplateShape('CreateArgs<Product>')).toEqual({
|
|
193
|
+
shapeName: 'Product',
|
|
194
|
+
template: 'CreateArgs'
|
|
195
|
+
});
|
|
196
|
+
});
|
|
197
|
+
test('service namespace', () => {
|
|
198
|
+
expect(parseTemplateShape('Shopify_Post')).toEqual({
|
|
199
|
+
shapeName: 'Shopify_Post',
|
|
200
|
+
template: undefined
|
|
201
|
+
});
|
|
202
|
+
});
|
|
203
|
+
});
|
|
204
|
+
describe('parseReturnShape', () => {
|
|
205
|
+
test('string', () => {
|
|
206
|
+
expect(parseReturnShape(shapeBooksSchema, 'Post')).toEqual({
|
|
207
|
+
shapeName: 'Post',
|
|
208
|
+
template: undefined,
|
|
209
|
+
isArray: false,
|
|
210
|
+
ref: {
|
|
211
|
+
isForeign: false,
|
|
212
|
+
serviceKey: 'local',
|
|
213
|
+
typeName: 'Post',
|
|
214
|
+
isValidService: true
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
});
|
|
218
|
+
test('ref string', () => {
|
|
219
|
+
expect(parseReturnShape(shapeBooksSchema, 'local:Post')).toEqual({
|
|
220
|
+
shapeName: 'Post',
|
|
221
|
+
template: undefined,
|
|
222
|
+
isArray: false,
|
|
223
|
+
ref: {
|
|
224
|
+
isForeign: false,
|
|
225
|
+
serviceKey: 'local',
|
|
226
|
+
typeName: 'Post',
|
|
227
|
+
isValidService: true
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
});
|
|
231
|
+
test('ref string with template', () => {
|
|
232
|
+
expect(parseReturnShape(shopifyStoreJson, 'PaginatedList<shopify:Post>')).toEqual({
|
|
233
|
+
isArray: false,
|
|
234
|
+
ref: {
|
|
235
|
+
isForeign: false,
|
|
236
|
+
serviceKey: 'shopify',
|
|
237
|
+
template: 'PaginatedList',
|
|
238
|
+
typeName: 'Post',
|
|
239
|
+
isValidService: false
|
|
240
|
+
},
|
|
241
|
+
shapeName: 'Post',
|
|
242
|
+
template: 'PaginatedList'
|
|
243
|
+
});
|
|
244
|
+
});
|
|
245
|
+
test('array schema', () => {
|
|
246
|
+
expect(parseReturnShape(shapeBooksSchema, {
|
|
247
|
+
type: 'array',
|
|
248
|
+
items: { '@ref': 'local:Post' }
|
|
249
|
+
})).toEqual({
|
|
250
|
+
shapeName: 'Post',
|
|
251
|
+
template: undefined,
|
|
252
|
+
isArray: true,
|
|
253
|
+
ref: {
|
|
254
|
+
isForeign: false,
|
|
255
|
+
serviceKey: 'local',
|
|
256
|
+
typeName: 'Post',
|
|
257
|
+
isValidService: true
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
});
|
|
261
|
+
test('array schema scalar', () => {
|
|
262
|
+
expect(parseReturnShape(shapeBooksSchema, {
|
|
263
|
+
type: 'array',
|
|
264
|
+
items: { type: 'string' }
|
|
265
|
+
})).toEqual({
|
|
266
|
+
shapeName: 'string',
|
|
267
|
+
template: undefined,
|
|
268
|
+
isArray: true
|
|
269
|
+
});
|
|
270
|
+
});
|
|
271
|
+
});
|
|
272
|
+
describe('returnShapeToSchema', () => {
|
|
273
|
+
test('string', () => {
|
|
274
|
+
const schema = returnShapeToSchema(shapeBooksSchema, 'Post');
|
|
275
|
+
expect(schema).toEqual({ '@ref': 'local:Post' });
|
|
276
|
+
});
|
|
277
|
+
test('string scalar', () => {
|
|
278
|
+
const schema = returnShapeToSchema(shapeBooksSchema, 'string');
|
|
279
|
+
expect(schema).toEqual({ type: 'string' });
|
|
280
|
+
});
|
|
281
|
+
test('string open object', () => {
|
|
282
|
+
const schema = returnShapeToSchema(shapeBooksSchema, 'object');
|
|
283
|
+
expect(schema).toEqual({ type: 'object' });
|
|
284
|
+
});
|
|
285
|
+
test('array schema scalar', () => {
|
|
286
|
+
const returnShape = {
|
|
287
|
+
type: 'array',
|
|
288
|
+
items: { type: 'string' }
|
|
289
|
+
};
|
|
290
|
+
expect(returnShapeToSchema(shapeBooksSchema, returnShape)).toEqual(returnShape);
|
|
291
|
+
});
|
|
292
|
+
test('array schema ref', () => {
|
|
293
|
+
const returnShape = {
|
|
294
|
+
type: 'array',
|
|
295
|
+
items: { '@ref': 'local:Post' }
|
|
296
|
+
};
|
|
297
|
+
expect(returnShapeToSchema(shapeBooksSchema, returnShape)).toEqual(returnShape);
|
|
298
|
+
});
|
|
299
|
+
});
|
|
300
|
+
test('parseTemplateShape - PaginatedList<Post>', () => {
|
|
301
|
+
expect(parseTemplateShape('PaginatedList<Post>')).toEqual({
|
|
302
|
+
shapeName: 'Post',
|
|
303
|
+
template: 'PaginatedList'
|
|
304
|
+
});
|
|
305
|
+
});
|
|
306
|
+
test('createTemplateShapeName', () => {
|
|
307
|
+
expect(createTemplateShapeName('PaginatedList', 'Post')).toEqual('PaginatedList<Post>');
|
|
308
|
+
});
|
|
309
|
+
test('untemplate -- shape name', () => {
|
|
310
|
+
expect(untemplate('Post')).toEqual('Post');
|
|
311
|
+
});
|
|
312
|
+
test('untemplate -- template', () => {
|
|
313
|
+
expect(untemplate('PaginatedList<Post>')).toEqual('Post');
|
|
314
|
+
});
|
|
315
|
+
test('dereferenceSchema - extends', () => {
|
|
316
|
+
const shapes = {
|
|
317
|
+
A: createShape('A', {
|
|
318
|
+
extends: [
|
|
319
|
+
{ '@ref': 'local:B' },
|
|
320
|
+
{ '@ref': 'local:C' },
|
|
321
|
+
{ '@ref': 'local:D' },
|
|
322
|
+
{
|
|
323
|
+
type: 'object',
|
|
324
|
+
properties: {
|
|
325
|
+
a: { type: 'string' }
|
|
326
|
+
},
|
|
327
|
+
required: ['a']
|
|
328
|
+
}
|
|
329
|
+
]
|
|
330
|
+
}),
|
|
331
|
+
B: createShape('B', {
|
|
332
|
+
type: 'object',
|
|
333
|
+
properties: {
|
|
334
|
+
b: { type: 'string' }
|
|
335
|
+
},
|
|
336
|
+
required: ['b']
|
|
337
|
+
}),
|
|
338
|
+
C: createShape('C', {
|
|
339
|
+
type: 'object',
|
|
340
|
+
properties: {
|
|
341
|
+
c: { type: 'string' },
|
|
342
|
+
b: { type: 'number' }
|
|
343
|
+
},
|
|
344
|
+
required: ['c']
|
|
345
|
+
}),
|
|
346
|
+
D: createShape('D', {
|
|
347
|
+
extends: [
|
|
348
|
+
{ '@ref': 'local:D' },
|
|
349
|
+
{
|
|
350
|
+
type: 'object',
|
|
351
|
+
properties: {
|
|
352
|
+
z: { type: 'string' }
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
]
|
|
356
|
+
})
|
|
357
|
+
};
|
|
358
|
+
expect(dereferenceSchema({ shapes, services: {} }, shapes.A.schema)).toEqual({
|
|
359
|
+
type: 'object',
|
|
360
|
+
properties: {
|
|
361
|
+
a: { type: 'string' },
|
|
362
|
+
b: { type: 'number' },
|
|
363
|
+
c: { type: 'string' },
|
|
364
|
+
z: { type: 'string' }
|
|
365
|
+
},
|
|
366
|
+
required: ['b', 'c', 'a']
|
|
367
|
+
});
|
|
368
|
+
});
|
|
369
|
+
test('dereferenceSchema - should ignore loops when path is specified', () => {
|
|
370
|
+
const objectSchema = {
|
|
371
|
+
properties: {
|
|
372
|
+
foo: {
|
|
373
|
+
type: 'string'
|
|
374
|
+
}
|
|
375
|
+
},
|
|
376
|
+
type: 'object'
|
|
377
|
+
};
|
|
378
|
+
const shapes = {
|
|
379
|
+
A: createShape('A', {
|
|
380
|
+
extends: [{ '@ref': 'local:A' }, objectSchema]
|
|
381
|
+
})
|
|
382
|
+
};
|
|
383
|
+
expect(dereferenceSchema({ shapes, services: {} }, shapes.A.schema, ['shapes', 'A'])).toEqual(objectSchema);
|
|
384
|
+
});
|
|
385
|
+
describe('createGetNamespace', () => {
|
|
386
|
+
const services = {
|
|
387
|
+
shopify: {
|
|
388
|
+
id: 'shopify',
|
|
389
|
+
title: 'Shopify',
|
|
390
|
+
namespace: 'Shopify',
|
|
391
|
+
provider: 'graphql',
|
|
392
|
+
serviceType: 'graphql',
|
|
393
|
+
authenticationType: 'none'
|
|
394
|
+
}
|
|
395
|
+
};
|
|
396
|
+
const getNamespace = createGetNamespace({ services });
|
|
397
|
+
test('service found', () => {
|
|
398
|
+
expect(getNamespace('shopify')).toEqual('Shopify');
|
|
399
|
+
});
|
|
400
|
+
test('service not found', () => {
|
|
401
|
+
expect(getNamespace('local')).toEqual(undefined);
|
|
402
|
+
});
|
|
403
|
+
});
|
|
404
|
+
describe('parsePropertyRef', () => {
|
|
405
|
+
test('explicit service id', () => {
|
|
406
|
+
expect(parsePropertyRef('local:Query.foo')).toEqual({
|
|
407
|
+
serviceId: 'local',
|
|
408
|
+
shapeName: 'Query',
|
|
409
|
+
propertyName: 'foo'
|
|
410
|
+
});
|
|
411
|
+
});
|
|
412
|
+
test('handles legacy service id', () => {
|
|
413
|
+
expect(parsePropertyRef('shopify:my-shop:Query.products')).toEqual({
|
|
414
|
+
serviceId: 'shopify:my-shop',
|
|
415
|
+
shapeName: 'Query',
|
|
416
|
+
propertyName: 'products'
|
|
417
|
+
});
|
|
418
|
+
});
|
|
419
|
+
test('assumes local', () => {
|
|
420
|
+
expect(parsePropertyRef('Query.foo')).toEqual({
|
|
421
|
+
serviceId: 'local',
|
|
422
|
+
shapeName: 'Query',
|
|
423
|
+
propertyName: 'foo'
|
|
424
|
+
});
|
|
425
|
+
});
|
|
426
|
+
test('assumes Query', () => {
|
|
427
|
+
expect(parsePropertyRef('foo')).toEqual({
|
|
428
|
+
serviceId: 'local',
|
|
429
|
+
shapeName: 'Query',
|
|
430
|
+
propertyName: 'foo'
|
|
431
|
+
});
|
|
432
|
+
});
|
|
433
|
+
test('assumes Query with service id', () => {
|
|
434
|
+
expect(parsePropertyRef('shopify:products')).toEqual({
|
|
435
|
+
serviceId: 'shopify',
|
|
436
|
+
shapeName: 'Query',
|
|
437
|
+
propertyName: 'products'
|
|
438
|
+
});
|
|
439
|
+
});
|
|
440
|
+
test('handles invalid', () => {
|
|
441
|
+
expect(parsePropertyRef('takeshape:Query.foo.bar')).toEqual(undefined);
|
|
442
|
+
});
|
|
443
|
+
});
|
|
444
|
+
describe('propertyRefItemToResolverPath', () => {
|
|
445
|
+
test('remote', () => {
|
|
446
|
+
expect(serializePropertyRef({
|
|
447
|
+
serviceId: 'shopify',
|
|
448
|
+
shapeName: 'Query',
|
|
449
|
+
propertyName: 'products'
|
|
450
|
+
})).toBe('shopify:Query.products');
|
|
451
|
+
});
|
|
452
|
+
test('local', () => {
|
|
453
|
+
expect(serializePropertyRef({
|
|
454
|
+
serviceId: 'local',
|
|
455
|
+
shapeName: 'Query',
|
|
456
|
+
propertyName: 'getProductList'
|
|
457
|
+
})).toBe('Query.getProductList');
|
|
458
|
+
});
|
|
459
|
+
});
|
|
460
|
+
describe('propertyRefItemToResolverPath', () => {
|
|
461
|
+
test('query', () => {
|
|
462
|
+
expect(propertyRefItemToResolverPath(() => 'Shopify', {
|
|
463
|
+
serviceId: 'shopify',
|
|
464
|
+
propertyName: 'products',
|
|
465
|
+
shapeName: 'Query'
|
|
466
|
+
})).toEqual(['queries', 'Shopify_products', 'resolver']);
|
|
467
|
+
});
|
|
468
|
+
test('local query', () => {
|
|
469
|
+
expect(propertyRefItemToResolverPath(() => undefined, {
|
|
470
|
+
serviceId: 'local',
|
|
471
|
+
propertyName: 'products',
|
|
472
|
+
shapeName: 'Query'
|
|
473
|
+
})).toEqual(['queries', 'products', 'resolver']);
|
|
474
|
+
});
|
|
475
|
+
test('mutation', () => {
|
|
476
|
+
expect(propertyRefItemToResolverPath(() => 'Shopify', {
|
|
477
|
+
serviceId: 'shopify',
|
|
478
|
+
propertyName: 'createProduct',
|
|
479
|
+
shapeName: 'Mutation'
|
|
480
|
+
})).toEqual(['mutations', 'Shopify_createProduct', 'resolver']);
|
|
481
|
+
});
|
|
482
|
+
test('local mutation', () => {
|
|
483
|
+
expect(propertyRefItemToResolverPath(() => undefined, {
|
|
484
|
+
serviceId: 'local',
|
|
485
|
+
propertyName: 'createProduct',
|
|
486
|
+
shapeName: 'Mutation'
|
|
487
|
+
})).toEqual(['mutations', 'createProduct', 'resolver']);
|
|
488
|
+
});
|
|
489
|
+
test('shape', () => {
|
|
490
|
+
expect(propertyRefItemToResolverPath(() => 'Shopify', {
|
|
491
|
+
serviceId: 'shopify',
|
|
492
|
+
propertyName: 'variants',
|
|
493
|
+
shapeName: 'Product'
|
|
494
|
+
})).toEqual(['shapes', 'Shopify_Product', 'schema', 'properties', 'variants', '@resolver']);
|
|
495
|
+
});
|
|
496
|
+
test('local shape', () => {
|
|
497
|
+
expect(propertyRefItemToResolverPath(() => undefined, {
|
|
498
|
+
serviceId: 'local',
|
|
499
|
+
propertyName: 'products',
|
|
500
|
+
shapeName: 'MyNamespace'
|
|
501
|
+
})).toEqual(['shapes', 'MyNamespace', 'schema', 'properties', 'products', '@resolver']);
|
|
502
|
+
});
|
|
503
|
+
});
|
|
504
|
+
describe('propertyRefItemToArgsPath', () => {
|
|
505
|
+
test('query', () => {
|
|
506
|
+
expect(propertyRefItemToArgsPath(() => 'Shopify', {
|
|
507
|
+
serviceId: 'shopify',
|
|
508
|
+
propertyName: 'products',
|
|
509
|
+
shapeName: 'Query'
|
|
510
|
+
})).toEqual(['queries', 'Shopify_products', 'args']);
|
|
511
|
+
});
|
|
512
|
+
test('shape', () => {
|
|
513
|
+
expect(propertyRefItemToArgsPath(() => 'Shopify', {
|
|
514
|
+
serviceId: 'shopify',
|
|
515
|
+
propertyName: 'variants',
|
|
516
|
+
shapeName: 'Product'
|
|
517
|
+
})).toEqual(['shapes', 'Shopify_Product', 'schema', 'properties', 'variants', '@args']);
|
|
518
|
+
});
|
|
519
|
+
});
|
|
520
|
+
describe('propertyRefToArgs', () => {
|
|
521
|
+
test('found', () => {
|
|
522
|
+
const args = propertyRefToArgs(shapeBooksSchema, 'Query.getBook');
|
|
523
|
+
expect(args).toBe('TSGetArgs<Book>');
|
|
524
|
+
});
|
|
525
|
+
test('not found', () => {
|
|
526
|
+
const args = propertyRefToArgs(shapeBooksSchema, 'Query.bogus');
|
|
527
|
+
expect(args).toBe(undefined);
|
|
528
|
+
});
|
|
529
|
+
});
|
|
530
|
+
describe('shapeNameToRef', () => {
|
|
531
|
+
test('service', () => {
|
|
532
|
+
expect(normalizeRefExpression(shopifyStoreJson, 'Shopify_Product')).toEqual('gregs-takeshape-store:Product');
|
|
533
|
+
});
|
|
534
|
+
test('local', () => {
|
|
535
|
+
expect(normalizeRefExpression(shapeBooksSchema, 'Book')).toEqual('local:Book');
|
|
536
|
+
});
|
|
537
|
+
test('missing namespace', () => {
|
|
538
|
+
expect(normalizeRefExpression(shapeBooksSchema, 'Shopify_Product')).toEqual('local:Shopify_Product');
|
|
539
|
+
});
|
|
540
|
+
test('multiple _', () => {
|
|
541
|
+
expect(normalizeRefExpression(shapeBooksSchema, 'Foo_Bar_Baz')).toEqual('local:Foo_Bar_Baz');
|
|
542
|
+
});
|
|
543
|
+
});
|
|
544
|
+
describe('normalizeLocalRefString', () => {
|
|
545
|
+
test('local', () => {
|
|
546
|
+
expect(normalizeLocalRefString('local:Foo')).toEqual('Foo');
|
|
547
|
+
});
|
|
548
|
+
test('non-local', () => {
|
|
549
|
+
expect(normalizeLocalRefString('shopify:Product')).toEqual('shopify:Product');
|
|
550
|
+
});
|
|
551
|
+
});
|
|
552
|
+
describe('getAllPropertyRefs', () => {
|
|
553
|
+
test('returns empty array when no refs found', () => {
|
|
554
|
+
expect(getAllPropertyRefs(shopifyStoreJson)).toEqual([]);
|
|
555
|
+
});
|
|
556
|
+
test('only looks at resolver.to', () => {
|
|
557
|
+
const projectSchema = createMockSchema('projectId', {
|
|
558
|
+
shapes: {
|
|
559
|
+
Foo: createShape('Foo', {
|
|
560
|
+
type: 'object',
|
|
561
|
+
properties: {
|
|
562
|
+
character: {
|
|
563
|
+
'@ref': 'rick:Character',
|
|
564
|
+
'@resolver': {
|
|
565
|
+
name: 'delegate',
|
|
566
|
+
to: 'rick:Query.character'
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
}),
|
|
571
|
+
Bar: createShape('Bar', {
|
|
572
|
+
type: 'object',
|
|
573
|
+
properties: {
|
|
574
|
+
to: { type: 'string' }
|
|
575
|
+
}
|
|
576
|
+
})
|
|
577
|
+
},
|
|
578
|
+
forms: {
|
|
579
|
+
Bar: {
|
|
580
|
+
default: {
|
|
581
|
+
to: 'oops'
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
});
|
|
586
|
+
expect(getAllPropertyRefs(projectSchema)).toEqual([
|
|
587
|
+
{
|
|
588
|
+
propertyName: 'character',
|
|
589
|
+
serviceId: 'rick',
|
|
590
|
+
shapeName: 'Query'
|
|
591
|
+
}
|
|
592
|
+
]);
|
|
593
|
+
});
|
|
594
|
+
test('tool query refs', () => {
|
|
595
|
+
expect(getAllPropertyRefs(valvolineSchema)).toEqual([
|
|
596
|
+
{
|
|
597
|
+
propertyName: 'getMakes',
|
|
598
|
+
serviceId: 'local',
|
|
599
|
+
shapeName: 'Query'
|
|
600
|
+
},
|
|
601
|
+
{
|
|
602
|
+
propertyName: 'getModels',
|
|
603
|
+
serviceId: 'local',
|
|
604
|
+
shapeName: 'Query'
|
|
605
|
+
},
|
|
606
|
+
{
|
|
607
|
+
propertyName: 'getEngines',
|
|
608
|
+
serviceId: 'local',
|
|
609
|
+
shapeName: 'Query'
|
|
610
|
+
},
|
|
611
|
+
{
|
|
612
|
+
propertyName: 'listProducts',
|
|
613
|
+
serviceId: 'local',
|
|
614
|
+
shapeName: 'Query'
|
|
615
|
+
},
|
|
616
|
+
{
|
|
617
|
+
propertyName: 'getPart',
|
|
618
|
+
serviceId: 'local',
|
|
619
|
+
shapeName: 'Query'
|
|
620
|
+
}
|
|
621
|
+
]);
|
|
622
|
+
});
|
|
623
|
+
});
|
|
624
|
+
describe('propertyRefToShapeRef', () => {
|
|
625
|
+
it('works', () => {
|
|
626
|
+
expect(propertyRefToShapeRef('shopify:Product.id')).toBe('shopify:Product');
|
|
627
|
+
expect(propertyRefToShapeRef('getProductList')).toBe('local:Query');
|
|
628
|
+
});
|
|
629
|
+
it('throws for invalid property refs', () => {
|
|
630
|
+
expect(() => propertyRefToShapeRef('foo.bar.baz')).toThrowErrorMatchingInlineSnapshot(`[Error: Invalid property ref "foo.bar.baz]`);
|
|
631
|
+
});
|
|
632
|
+
});
|
|
633
|
+
describe('normalizeRefs', () => {
|
|
634
|
+
test('$ref to user defined shape', () => {
|
|
635
|
+
expect(normalizeRefs(shapeBooksSchema, {
|
|
636
|
+
$ref: '#/definitions/Book'
|
|
637
|
+
})).toEqual({ '@ref': 'local:Book' });
|
|
638
|
+
});
|
|
639
|
+
test('$ref to built in color shape', () => {
|
|
640
|
+
expect(normalizeRefs(shapeBooksSchema, {
|
|
641
|
+
$ref: '#/definitions/TSColor'
|
|
642
|
+
})).toEqual({ '@ref': 'local:TSColor' });
|
|
643
|
+
});
|
|
644
|
+
test('repeater', () => {
|
|
645
|
+
expect(normalizeRefs(shapeBooksSchema, {
|
|
646
|
+
type: 'array',
|
|
647
|
+
items: {
|
|
648
|
+
'@ref': 'local:Book'
|
|
649
|
+
}
|
|
650
|
+
})).toEqual({
|
|
651
|
+
items: {
|
|
652
|
+
'@ref': 'local:Book'
|
|
653
|
+
},
|
|
654
|
+
type: 'array'
|
|
655
|
+
});
|
|
656
|
+
});
|
|
657
|
+
test('$ref in items', () => {
|
|
658
|
+
expect(normalizeRefs(shapeBooksSchema, {
|
|
659
|
+
type: 'array',
|
|
660
|
+
items: {
|
|
661
|
+
$ref: '#/shapes/Book/schema'
|
|
662
|
+
}
|
|
663
|
+
})).toEqual({
|
|
664
|
+
type: 'array',
|
|
665
|
+
items: {
|
|
666
|
+
'@ref': 'local:Book'
|
|
667
|
+
}
|
|
668
|
+
});
|
|
669
|
+
});
|
|
670
|
+
test('$ref in oneOf', () => {
|
|
671
|
+
expect(normalizeRefs(shapeBooksSchema, {
|
|
672
|
+
oneOf: [{ $ref: '#/shapes/Book/schema' }, { $ref: '#/shapes/Post/schema' }]
|
|
673
|
+
})).toEqual({
|
|
674
|
+
oneOf: [{ '@ref': 'local:Book' }, { '@ref': 'local:Post' }]
|
|
675
|
+
});
|
|
676
|
+
});
|
|
677
|
+
test('$ref in oneOf array', () => {
|
|
678
|
+
expect(normalizeRefs(shapeBooksSchema, {
|
|
679
|
+
type: 'array',
|
|
680
|
+
items: {
|
|
681
|
+
oneOf: [{ $ref: '#/shapes/Book/schema' }, { $ref: '#/shapes/Post/schema' }]
|
|
682
|
+
}
|
|
683
|
+
})).toEqual({
|
|
684
|
+
type: 'array',
|
|
685
|
+
items: {
|
|
686
|
+
oneOf: [{ '@ref': 'local:Book' }, { '@ref': 'local:Post' }]
|
|
687
|
+
}
|
|
688
|
+
});
|
|
689
|
+
});
|
|
690
|
+
});
|
|
691
|
+
describe('getOneOfRefs', () => {
|
|
692
|
+
test('oneOf', () => {
|
|
693
|
+
expect(getOneOfRefs({}, {
|
|
694
|
+
oneOf: [
|
|
695
|
+
{
|
|
696
|
+
'@ref': 'local:Dog'
|
|
697
|
+
},
|
|
698
|
+
{
|
|
699
|
+
'@ref': 'local:Cat'
|
|
700
|
+
}
|
|
701
|
+
]
|
|
702
|
+
})).toEqual([
|
|
703
|
+
{
|
|
704
|
+
isForeign: false,
|
|
705
|
+
isInterfaceRef: false,
|
|
706
|
+
isValidService: true,
|
|
707
|
+
path: ['@ref'],
|
|
708
|
+
serviceKey: 'local',
|
|
709
|
+
typeName: 'Dog'
|
|
710
|
+
},
|
|
711
|
+
{
|
|
712
|
+
isForeign: false,
|
|
713
|
+
isInterfaceRef: false,
|
|
714
|
+
isValidService: true,
|
|
715
|
+
path: ['@ref'],
|
|
716
|
+
serviceKey: 'local',
|
|
717
|
+
typeName: 'Cat'
|
|
718
|
+
}
|
|
719
|
+
]);
|
|
720
|
+
});
|
|
721
|
+
test('items with oneOf', () => {
|
|
722
|
+
expect(getOneOfRefs({}, {
|
|
723
|
+
items: {
|
|
724
|
+
oneOf: [
|
|
725
|
+
{
|
|
726
|
+
'@ref': 'local:Dog'
|
|
727
|
+
},
|
|
728
|
+
{
|
|
729
|
+
'@ref': 'local:Cat'
|
|
730
|
+
}
|
|
731
|
+
]
|
|
732
|
+
}
|
|
733
|
+
})).toEqual([
|
|
734
|
+
{
|
|
735
|
+
isForeign: false,
|
|
736
|
+
isInterfaceRef: false,
|
|
737
|
+
isValidService: true,
|
|
738
|
+
path: ['items', '@ref'],
|
|
739
|
+
serviceKey: 'local',
|
|
740
|
+
typeName: 'Dog'
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
isForeign: false,
|
|
744
|
+
isInterfaceRef: false,
|
|
745
|
+
isValidService: true,
|
|
746
|
+
path: ['items', '@ref'],
|
|
747
|
+
serviceKey: 'local',
|
|
748
|
+
typeName: 'Cat'
|
|
749
|
+
}
|
|
750
|
+
]);
|
|
751
|
+
});
|
|
752
|
+
});
|