@takeshape/schema 11.52.0 → 11.56.1
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/latest.d.ts +2222 -0
- package/dist/project-schema/migrate.d.ts +4 -0
- package/dist/project-schema/migrate.js +194 -0
- package/dist/project-schema/v3.48.0.d.ts +2161 -0
- package/dist/project-schema/v3.49.0.d.ts +2170 -0
- package/dist/project-schema/v3.50.0.d.ts +2222 -0
- package/dist/project-schema/v3.51.0.d.ts +2222 -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/schemas/project-schema/experimental.json +1104 -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 +24 -26
- 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/project-schema/experimental.json +0 -1101
- 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/latest.d.ts +0 -2221
- package/dist/types/src/project-schema/migrate.d.ts +0 -4
- package/dist/types/src/project-schema/v3.48.0.d.ts +0 -2160
- package/dist/types/src/project-schema/v3.49.0.d.ts +0 -2169
- package/dist/types/src/project-schema/v3.50.0.d.ts +0 -2221
- package/dist/types/src/project-schema/v3.51.0.d.ts +0 -2221
- 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/{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/{esm/src/project-schema → project-schema}/v3.48.0.js +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/{esm/src/project-schema → project-schema}/v3.50.0.js +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/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
package/dist/cjs/src/refs.js
DELETED
|
@@ -1,671 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.omitRefAndExtend = exports.untemplate = void 0;
|
|
7
|
-
exports.isRefItemWithPath = isRefItemWithPath;
|
|
8
|
-
exports.parseTemplateShape = parseTemplateShape;
|
|
9
|
-
exports.parseReturnShape = parseReturnShape;
|
|
10
|
-
exports.returnShapeToSchema = returnShapeToSchema;
|
|
11
|
-
exports.createTemplateShapeName = createTemplateShapeName;
|
|
12
|
-
exports.getFlattenedTemplateShapeName = getFlattenedTemplateShapeName;
|
|
13
|
-
exports.$refToAtRef = $refToAtRef;
|
|
14
|
-
exports.refSchemaToPath = refSchemaToPath;
|
|
15
|
-
exports.refExpressionToRefItem = refExpressionToRefItem;
|
|
16
|
-
exports.refExpressionListToRefItemList = refExpressionListToRefItemList;
|
|
17
|
-
exports.refExpressionToShape = refExpressionToShape;
|
|
18
|
-
exports.splitAtRef = splitAtRef;
|
|
19
|
-
exports.atRefToRefItem = atRefToRefItem;
|
|
20
|
-
exports.refToRefItem = refToRefItem;
|
|
21
|
-
exports.parseName = parseName;
|
|
22
|
-
exports.shapeToRefItem = shapeToRefItem;
|
|
23
|
-
exports.shapeToRefString = shapeToRefString;
|
|
24
|
-
exports.getRef = getRef;
|
|
25
|
-
exports.getRefWithPath = getRefWithPath;
|
|
26
|
-
exports.hasRefProperty = hasRefProperty;
|
|
27
|
-
exports.getOneOfRefs = getOneOfRefs;
|
|
28
|
-
exports.getRefOrItemsRef = getRefOrItemsRef;
|
|
29
|
-
exports.refItemToAtRef = refItemToAtRef;
|
|
30
|
-
exports.refItemToNamespacedShapeName = refItemToNamespacedShapeName;
|
|
31
|
-
exports.refItemToShapePath = refItemToShapePath;
|
|
32
|
-
exports.refItemToShape = refItemToShape;
|
|
33
|
-
exports.refItemListToShapeList = refItemListToShapeList;
|
|
34
|
-
exports.refItemToShapeWithPath = refItemToShapeWithPath;
|
|
35
|
-
exports.refItemToShapeSchema = refItemToShapeSchema;
|
|
36
|
-
exports.getRefShapeName = getRefShapeName;
|
|
37
|
-
exports.anyRefToShapeSchemaPath = anyRefToShapeSchemaPath;
|
|
38
|
-
exports.followRef = followRef;
|
|
39
|
-
exports.hasRef = hasRef;
|
|
40
|
-
exports.hasResolvableRef = hasResolvableRef;
|
|
41
|
-
exports.dereferenceSchema = dereferenceSchema;
|
|
42
|
-
exports.dereferenceObjectSchema = dereferenceObjectSchema;
|
|
43
|
-
exports.createGetNamespace = createGetNamespace;
|
|
44
|
-
exports.parsePropertyRef = parsePropertyRef;
|
|
45
|
-
exports.serializePropertyRef = serializePropertyRef;
|
|
46
|
-
exports.normalizePropertyRef = normalizePropertyRef;
|
|
47
|
-
exports.propertyRefToShapeRef = propertyRefToShapeRef;
|
|
48
|
-
exports.formatShapeRef = formatShapeRef;
|
|
49
|
-
exports.applyNamespace = applyNamespace;
|
|
50
|
-
exports.propertyRefItemToResolverPath = propertyRefItemToResolverPath;
|
|
51
|
-
exports.propertyRefItemToArgsPath = propertyRefItemToArgsPath;
|
|
52
|
-
exports.propertyRefItemToLocalName = propertyRefItemToLocalName;
|
|
53
|
-
exports.queryRefToLocalName = queryRefToLocalName;
|
|
54
|
-
exports.propertyRefItemToPath = propertyRefItemToPath;
|
|
55
|
-
exports.propertyRefToArgs = propertyRefToArgs;
|
|
56
|
-
exports.normalizeRefExpression = normalizeRefExpression;
|
|
57
|
-
exports.normalizeLocalRefString = normalizeLocalRefString;
|
|
58
|
-
exports.getAllPropertyRefs = getAllPropertyRefs;
|
|
59
|
-
exports.getQuery = getQuery;
|
|
60
|
-
exports.ensureQuery = ensureQuery;
|
|
61
|
-
exports.normalizeRefs = normalizeRefs;
|
|
62
|
-
const errors_1 = require("@takeshape/errors");
|
|
63
|
-
const util_1 = require("@takeshape/util");
|
|
64
|
-
const compact_js_1 = __importDefault(require("lodash/compact.js"));
|
|
65
|
-
const assign_js_1 = __importDefault(require("lodash/fp/assign.js"));
|
|
66
|
-
const omit_js_1 = __importDefault(require("lodash/fp/omit.js"));
|
|
67
|
-
const get_js_1 = __importDefault(require("lodash/get.js"));
|
|
68
|
-
const isString_js_1 = __importDefault(require("lodash/isString.js"));
|
|
69
|
-
const scalars_1 = require("./scalars");
|
|
70
|
-
const util_2 = require("./services/util");
|
|
71
|
-
const types_1 = require("./types");
|
|
72
|
-
const ai_tools_1 = require("./util/ai-tools");
|
|
73
|
-
const merge_1 = require("./util/merge");
|
|
74
|
-
/**
|
|
75
|
-
* Guard for RefItemWithPath. Tests for presence of all required props.
|
|
76
|
-
*/
|
|
77
|
-
function isRefItemWithPath(ref) {
|
|
78
|
-
return Boolean(ref.typeName && ref.serviceKey && ref.path && (0, util_1.isDefined)(ref.isForeign));
|
|
79
|
-
}
|
|
80
|
-
const templateShapeRegex = /^(\w+)<([\w:-]+)>$/;
|
|
81
|
-
/**
|
|
82
|
-
* Parse a template like `PaginatedList<Post>` and return both the template and the shape name.
|
|
83
|
-
*/
|
|
84
|
-
function parseTemplateShape(shapeExpression) {
|
|
85
|
-
const matches = templateShapeRegex.exec(shapeExpression);
|
|
86
|
-
if (matches) {
|
|
87
|
-
return { shapeName: matches[2], template: matches[1] };
|
|
88
|
-
}
|
|
89
|
-
return { shapeName: shapeExpression, template: undefined };
|
|
90
|
-
}
|
|
91
|
-
function parseReturnShape(projectSchema, shape) {
|
|
92
|
-
if (typeof shape === 'object') {
|
|
93
|
-
if ((0, types_1.isRefSchema)(shape.items)) {
|
|
94
|
-
const ref = getRef(projectSchema, shape.items);
|
|
95
|
-
if (!ref) {
|
|
96
|
-
throw new Error(`Could not parse ${JSON.stringify(shape.items)}: invalid ref`);
|
|
97
|
-
}
|
|
98
|
-
return {
|
|
99
|
-
isArray: true,
|
|
100
|
-
ref,
|
|
101
|
-
shapeName: refItemToNamespacedShapeName(ref)
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
if (typeof shape.items.type !== 'string') {
|
|
105
|
-
throw new Error(`Could not parse ${JSON.stringify(shape.items)}: invalid type`);
|
|
106
|
-
}
|
|
107
|
-
return { isArray: true, shapeName: shape.items.type };
|
|
108
|
-
}
|
|
109
|
-
const ref = refExpressionToRefItem(projectSchema, shape);
|
|
110
|
-
const shapeName = refItemToNamespacedShapeName(ref);
|
|
111
|
-
return { isArray: false, shapeName, ref, template: ref.template };
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* Convert Query.shape to a PropertySchema
|
|
115
|
-
*/
|
|
116
|
-
function returnShapeToSchema(projectSchema, returnShape) {
|
|
117
|
-
if (typeof returnShape === 'string') {
|
|
118
|
-
if ((0, scalars_1.isScalar)(returnShape) || returnShape === 'object') {
|
|
119
|
-
return { type: returnShape };
|
|
120
|
-
}
|
|
121
|
-
return {
|
|
122
|
-
'@ref': refItemToAtRef(refExpressionToRefItem(projectSchema, returnShape))
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
return returnShape;
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* Create a template string like `PaginatedList<Post>` from a template and shape name.
|
|
129
|
-
*/
|
|
130
|
-
function createTemplateShapeName(template, shapeName) {
|
|
131
|
-
return `${template}<${shapeName}>`;
|
|
132
|
-
}
|
|
133
|
-
/**
|
|
134
|
-
* If the string is a template like `PaginatedList<Post>`, return the shape name,
|
|
135
|
-
* in this case `Post`. Otherwise return the input.
|
|
136
|
-
*/
|
|
137
|
-
const untemplate = (input) => {
|
|
138
|
-
return parseTemplateShape(input).shapeName;
|
|
139
|
-
};
|
|
140
|
-
exports.untemplate = untemplate;
|
|
141
|
-
function getFlattenedTemplateShapeName(shapeName, template) {
|
|
142
|
-
return `${shapeName}${template ?? ''}`;
|
|
143
|
-
}
|
|
144
|
-
function $refToPath(ref) {
|
|
145
|
-
return ref.substr(2).split('/');
|
|
146
|
-
}
|
|
147
|
-
function $refToShapeName(ref) {
|
|
148
|
-
return $refToPath(ref)[1];
|
|
149
|
-
}
|
|
150
|
-
function $refToAtRef($ref, service, namespace) {
|
|
151
|
-
const shapeName = $refToShapeName($ref);
|
|
152
|
-
if (service === 'local') {
|
|
153
|
-
return `local:${shapeName}`;
|
|
154
|
-
}
|
|
155
|
-
return `${service}:${namespace === undefined ? shapeName : shapeName.replace(`${namespace}_`, '')}`;
|
|
156
|
-
}
|
|
157
|
-
function refSchemaToPath(context, refSchema) {
|
|
158
|
-
const refItem = getRef(context, refSchema);
|
|
159
|
-
if (refItem === undefined) {
|
|
160
|
-
throw new Error('Invalid ref in refSchemaToPath');
|
|
161
|
-
}
|
|
162
|
-
return refItemToShapePath(refItem);
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* Safely turn a "template" shape reference (`@args`, `args`, `shape`) into a `RefItem`
|
|
166
|
-
*
|
|
167
|
-
* @param context A partial project schema
|
|
168
|
-
* @param refExpression
|
|
169
|
-
* A ref expression might include "template" name and refer to a local or remote
|
|
170
|
-
* shape, `Foo` or `CreateArgs<Foo>` or `CreateArgs<remote:Foo>`.*
|
|
171
|
-
*/
|
|
172
|
-
function refExpressionToRefItem(context, refExpression) {
|
|
173
|
-
const { shapeName, template } = parseTemplateShape(refExpression);
|
|
174
|
-
if (shapeName.includes(':')) {
|
|
175
|
-
return atRefToRefItem(context, shapeName, template);
|
|
176
|
-
}
|
|
177
|
-
return shapeNameToRefItem(context, shapeName, template);
|
|
178
|
-
}
|
|
179
|
-
/**
|
|
180
|
-
* Converts a list of ref expressions into a list of ref items.
|
|
181
|
-
*/
|
|
182
|
-
function refExpressionListToRefItemList(context, refExpressionList) {
|
|
183
|
-
return refExpressionList.map((ref) => refExpressionToRefItem(context, ref));
|
|
184
|
-
}
|
|
185
|
-
/**
|
|
186
|
-
* Sugar for converting a `refExpression` directly into a shape, without the
|
|
187
|
-
* intermediate `refItem`.
|
|
188
|
-
*
|
|
189
|
-
* @param context A partial project schema
|
|
190
|
-
* @param refExpression
|
|
191
|
-
* A ref expression might include "template" name and refer to a local or remote
|
|
192
|
-
* shape, `Foo` or `CreateArgs<Foo>` or `CreateArgs<remote:Foo>`.
|
|
193
|
-
*/
|
|
194
|
-
function refExpressionToShape(context, refExpression) {
|
|
195
|
-
return refItemToShape(context, refExpressionToRefItem(context, refExpression));
|
|
196
|
-
}
|
|
197
|
-
/**
|
|
198
|
-
* Provided a service name and a referenced type. Supports 2 or 3 part
|
|
199
|
-
* references, e.g., `shopify:my-store:ProductInput` or `my-store:ProductInput`.
|
|
200
|
-
*
|
|
201
|
-
* @returns
|
|
202
|
-
* A 2 member array, where 0 is the service name, 1 is the referenced type.
|
|
203
|
-
*/
|
|
204
|
-
function splitAtRef(atRef) {
|
|
205
|
-
const index = atRef.lastIndexOf(':');
|
|
206
|
-
const serviceKey = index === -1 ? 'local' : atRef.substring(0, index);
|
|
207
|
-
const referencedType = index === -1 ? atRef : atRef.substring(index + 1);
|
|
208
|
-
return [serviceKey, referencedType];
|
|
209
|
-
}
|
|
210
|
-
function isValidServiceId(context, serviceId) {
|
|
211
|
-
return serviceId === 'local' || Boolean(context.services?.[serviceId]);
|
|
212
|
-
}
|
|
213
|
-
/**
|
|
214
|
-
* Parses and returns a typeName, serviceKey, and potentially a namespace for
|
|
215
|
-
* the type.
|
|
216
|
-
*/
|
|
217
|
-
function atRefToRefItem(context, atRef, template) {
|
|
218
|
-
const [serviceKey, typeName] = splitAtRef(atRef);
|
|
219
|
-
// It's possible the service doesn't have a namespace, or is local and has
|
|
220
|
-
// no service config.
|
|
221
|
-
const serviceConfig = context.services?.[serviceKey];
|
|
222
|
-
const serviceNamespace = serviceConfig?.namespace;
|
|
223
|
-
return {
|
|
224
|
-
typeName,
|
|
225
|
-
serviceKey,
|
|
226
|
-
serviceNamespace,
|
|
227
|
-
template,
|
|
228
|
-
isForeign: Boolean(serviceConfig),
|
|
229
|
-
isValidService: isValidServiceId(context, serviceKey)
|
|
230
|
-
};
|
|
231
|
-
}
|
|
232
|
-
function refToRefItem(context, $ref, template) {
|
|
233
|
-
return shapeNameToRefItem(context, $refToShapeName($ref), template);
|
|
234
|
-
}
|
|
235
|
-
/**
|
|
236
|
-
* Parse a name (query, shape, etc) that might have a namespace and find the corresponding service layer id
|
|
237
|
-
*/
|
|
238
|
-
function parseName(context, name) {
|
|
239
|
-
const shapeNameParts = name.split('_');
|
|
240
|
-
let serviceId;
|
|
241
|
-
let namespace;
|
|
242
|
-
if (shapeNameParts.length > 1) {
|
|
243
|
-
const namespaces = (0, util_2.getServiceNamespaces)(context);
|
|
244
|
-
const maybeNamespace = shapeNameParts[0];
|
|
245
|
-
serviceId = namespaces.get(maybeNamespace);
|
|
246
|
-
if (serviceId) {
|
|
247
|
-
name = shapeNameParts.slice(1).join('_');
|
|
248
|
-
namespace = maybeNamespace;
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
return {
|
|
252
|
-
name,
|
|
253
|
-
serviceId: serviceId ?? 'local',
|
|
254
|
-
namespace
|
|
255
|
-
};
|
|
256
|
-
}
|
|
257
|
-
function shapeNameToRefItem(context, shapeName, template) {
|
|
258
|
-
const parsed = parseName(context, shapeName);
|
|
259
|
-
return {
|
|
260
|
-
typeName: parsed.name,
|
|
261
|
-
serviceKey: parsed.serviceId,
|
|
262
|
-
serviceNamespace: parsed.namespace,
|
|
263
|
-
template,
|
|
264
|
-
isForeign: parsed.serviceId !== 'local',
|
|
265
|
-
isValidService: isValidServiceId(context, parsed.serviceId)
|
|
266
|
-
};
|
|
267
|
-
}
|
|
268
|
-
function shapeToRefItem(context, shape) {
|
|
269
|
-
return shapeNameToRefItem(context, shape.name);
|
|
270
|
-
}
|
|
271
|
-
function shapeToRefString(context, shape) {
|
|
272
|
-
return refItemToAtRef(shapeNameToRefItem(context, shape.name));
|
|
273
|
-
}
|
|
274
|
-
/**
|
|
275
|
-
* Given a property schema and project schema, finds a `@ref` or `$ref` and
|
|
276
|
-
* returns a `RefItem` suitable for loading a referenced schema...
|
|
277
|
-
*/
|
|
278
|
-
function getRef(context, refSchema) {
|
|
279
|
-
if (refSchema['@ref']) {
|
|
280
|
-
// @ref: my-service:ShapeName
|
|
281
|
-
const { shapeName, template } = parseTemplateShape(refSchema['@ref']);
|
|
282
|
-
return atRefToRefItem(context, shapeName, template);
|
|
283
|
-
}
|
|
284
|
-
if (refSchema.$ref) {
|
|
285
|
-
// $ref: #/shapes/[ShapeName OR Namespace_TypeName]/schema
|
|
286
|
-
return refToRefItem(context, refSchema.$ref);
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
function getRefWithPath(context, refSchema, schemaPath = [], isInterfaceRef = false) {
|
|
290
|
-
const refItem = getRef(context, refSchema);
|
|
291
|
-
if (refItem) {
|
|
292
|
-
const refType = (0, types_1.getRefType)(refSchema);
|
|
293
|
-
return {
|
|
294
|
-
...refItem,
|
|
295
|
-
path: schemaPath.concat([refType]),
|
|
296
|
-
isInterfaceRef
|
|
297
|
-
};
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
/**
|
|
301
|
-
* Tests for a `@ref` or `$ref` property directly on the passed schema.
|
|
302
|
-
*
|
|
303
|
-
* @param schema Any schema that might could have a ref property.
|
|
304
|
-
*/
|
|
305
|
-
function hasRefProperty(schema) {
|
|
306
|
-
return Boolean(schema['@ref'] ?? schema.$ref);
|
|
307
|
-
}
|
|
308
|
-
/**
|
|
309
|
-
* From a property that has oneOf or items with oneOf, get all refs
|
|
310
|
-
*/
|
|
311
|
-
function getOneOfRefs(context, propertySchema, schemaPath = []) {
|
|
312
|
-
const oneOf = propertySchema.oneOf ?? propertySchema.items?.oneOf;
|
|
313
|
-
const path = propertySchema.oneOf ? schemaPath : [...schemaPath, 'items'];
|
|
314
|
-
if (oneOf) {
|
|
315
|
-
return (0, compact_js_1.default)(oneOf.map((one) => {
|
|
316
|
-
return getRefWithPath(context, one, path);
|
|
317
|
-
}));
|
|
318
|
-
}
|
|
319
|
-
return [];
|
|
320
|
-
}
|
|
321
|
-
/**
|
|
322
|
-
* From a schema with a ref, will return the top-level ref, and potentially
|
|
323
|
-
* a ref item from a nested `items` property.
|
|
324
|
-
*/
|
|
325
|
-
function getRefOrItemsRef(context, refSchema, schemaPath = []) {
|
|
326
|
-
const refItem = getRefWithPath(context, refSchema, schemaPath);
|
|
327
|
-
if (refItem) {
|
|
328
|
-
return refItem;
|
|
329
|
-
}
|
|
330
|
-
if (refSchema.items) {
|
|
331
|
-
return getRefOrItemsRef(context, refSchema.items, schemaPath.concat(['items']));
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
/**
|
|
335
|
-
* Turns a `RefItem` into an `@ref`.
|
|
336
|
-
*/
|
|
337
|
-
function refItemToAtRef(refItem) {
|
|
338
|
-
const shapeRef = `${refItem.serviceKey}:${refItem.typeName}`;
|
|
339
|
-
return refItem.template ? createTemplateShapeName(refItem.template, shapeRef) : shapeRef;
|
|
340
|
-
}
|
|
341
|
-
/**
|
|
342
|
-
* Turns a `RefItem` into a standard shape name, namespacing if present.
|
|
343
|
-
*/
|
|
344
|
-
function refItemToNamespacedShapeName(refItem) {
|
|
345
|
-
const { serviceNamespace, typeName } = refItem;
|
|
346
|
-
return serviceNamespace ? `${serviceNamespace}_${typeName}` : typeName;
|
|
347
|
-
}
|
|
348
|
-
/**
|
|
349
|
-
* Turns a `RefItem` into a path suitable for `lodash.get`.
|
|
350
|
-
*/
|
|
351
|
-
function refItemToShapePath(refItem) {
|
|
352
|
-
return ['shapes', refItemToNamespacedShapeName(refItem)];
|
|
353
|
-
}
|
|
354
|
-
/**
|
|
355
|
-
* Get a Shape referenced by a `RefItem`.
|
|
356
|
-
*/
|
|
357
|
-
function refItemToShape(context, refItem) {
|
|
358
|
-
const shapePath = refItemToShapePath(refItem);
|
|
359
|
-
return (0, get_js_1.default)(context, shapePath);
|
|
360
|
-
}
|
|
361
|
-
/**
|
|
362
|
-
* Get all shapes referenced by a RefItem array.
|
|
363
|
-
*/
|
|
364
|
-
function refItemListToShapeList(context, refItems) {
|
|
365
|
-
return refItems.map((ref) => refItemToShape(context, ref)).filter(util_1.isDefined);
|
|
366
|
-
}
|
|
367
|
-
/**
|
|
368
|
-
* Get a shape referenced by a `RefItem`, also returning the path to the new shape.
|
|
369
|
-
*/
|
|
370
|
-
function refItemToShapeWithPath(context, refItem) {
|
|
371
|
-
const shapePath = refItemToShapePath(refItem);
|
|
372
|
-
const shape = (0, get_js_1.default)(context, shapePath);
|
|
373
|
-
return shape ? { shape, path: shapePath } : undefined;
|
|
374
|
-
}
|
|
375
|
-
/**
|
|
376
|
-
* Get a Shape schema referenced by a `RefItem`.
|
|
377
|
-
*/
|
|
378
|
-
function refItemToShapeSchema(context, refItem) {
|
|
379
|
-
const shapePath = refItemToShapePath(refItem);
|
|
380
|
-
return (0, get_js_1.default)(context, [...shapePath, 'schema']);
|
|
381
|
-
}
|
|
382
|
-
/**
|
|
383
|
-
* Sugar, for when you really just need a string...
|
|
384
|
-
*/
|
|
385
|
-
function getRefShapeName(context, refSchema) {
|
|
386
|
-
const refItem = getRef(context, refSchema);
|
|
387
|
-
return refItem ? refItemToNamespacedShapeName(refItem) : undefined;
|
|
388
|
-
}
|
|
389
|
-
/**
|
|
390
|
-
* Sugar, for when you really just need a path...
|
|
391
|
-
*/
|
|
392
|
-
function anyRefToShapeSchemaPath(context, refSchema) {
|
|
393
|
-
const refItem = getRef(context, refSchema);
|
|
394
|
-
return refItem ? [...refItemToShapePath(refItem), 'schema'] : undefined;
|
|
395
|
-
}
|
|
396
|
-
/**
|
|
397
|
-
* Helper fn to omit `ref` props from the target schema, and then extend it with the source schema.
|
|
398
|
-
*/
|
|
399
|
-
const omitRefAndExtend = (targetSchema, sourceSchema) => (0, assign_js_1.default)((0, omit_js_1.default)(['@ref', '$ref'], targetSchema), sourceSchema);
|
|
400
|
-
exports.omitRefAndExtend = omitRefAndExtend;
|
|
401
|
-
/**
|
|
402
|
-
* If there is a $ref, this will insert a property schema from the top level
|
|
403
|
-
* in place of the reference.
|
|
404
|
-
*/
|
|
405
|
-
function followRef(context, schema, ref) {
|
|
406
|
-
const refItem = ref ?? getRef(context, schema);
|
|
407
|
-
if (refItem) {
|
|
408
|
-
const referencedSchema = refItemToShapeSchema(context, refItem);
|
|
409
|
-
if (referencedSchema) {
|
|
410
|
-
return (0, exports.omitRefAndExtend)(schema, referencedSchema);
|
|
411
|
-
}
|
|
412
|
-
}
|
|
413
|
-
return schema;
|
|
414
|
-
}
|
|
415
|
-
/**
|
|
416
|
-
* Returns whether a schema has refs.
|
|
417
|
-
*/
|
|
418
|
-
function hasRef(schema) {
|
|
419
|
-
if ((0, types_1.isRefSchema)(schema) || (0, types_1.isRefSchemaLegacy)(schema)) {
|
|
420
|
-
return true;
|
|
421
|
-
}
|
|
422
|
-
if ((0, types_1.isAllOfSchema)(schema)) {
|
|
423
|
-
return Boolean(schema.allOf.find(hasRef));
|
|
424
|
-
}
|
|
425
|
-
if ((0, types_1.isOneOfSchema)(schema)) {
|
|
426
|
-
return Boolean(schema.oneOf.find(hasRef));
|
|
427
|
-
}
|
|
428
|
-
return false;
|
|
429
|
-
}
|
|
430
|
-
/**
|
|
431
|
-
* Returns whether a schema has refs which can be followed.
|
|
432
|
-
*/
|
|
433
|
-
function hasResolvableRef(context, schema) {
|
|
434
|
-
if ((0, types_1.isRefSchema)(schema) || (0, types_1.isRefSchemaLegacy)(schema)) {
|
|
435
|
-
return Boolean(refItemToShapeSchema(context, getRef(context, schema)));
|
|
436
|
-
}
|
|
437
|
-
if ((0, types_1.isAllOfSchema)(schema)) {
|
|
438
|
-
return Boolean(schema.allOf.find((s) => hasResolvableRef(context, s)));
|
|
439
|
-
}
|
|
440
|
-
if ((0, types_1.isOneOfSchema)(schema)) {
|
|
441
|
-
return Boolean(schema.oneOf.find((s) => hasResolvableRef(context, s)));
|
|
442
|
-
}
|
|
443
|
-
return false;
|
|
444
|
-
}
|
|
445
|
-
function isSelfReferential(path, shapeName) {
|
|
446
|
-
if (path[0] !== 'shapes' || path[1] !== shapeName) {
|
|
447
|
-
return false;
|
|
448
|
-
}
|
|
449
|
-
const index = path.findIndex((part) => part === 'allOf' || part === 'extends');
|
|
450
|
-
return index !== -1 && (0, util_1.isIntegerLike)(path[Number(index) + 1]);
|
|
451
|
-
}
|
|
452
|
-
/**
|
|
453
|
-
* Given a schema, will resolve any `allOf` or `ref` objects. This function has
|
|
454
|
-
* to fully resolve all refs, because attempting to extend an object schema with
|
|
455
|
-
* a ref property would create an invalid schema, potentially containing both
|
|
456
|
-
* a ref and properties.
|
|
457
|
-
*
|
|
458
|
-
* If it can't create a valid schema it returns the input.
|
|
459
|
-
*/
|
|
460
|
-
function dereferenceSchema(context, shapeOrFieldSchema, schemaPath = []) {
|
|
461
|
-
const resolveAll = (propertySchema, resolvePath) => {
|
|
462
|
-
try {
|
|
463
|
-
if ((0, types_1.isAllOfSchema)(propertySchema)) {
|
|
464
|
-
return merge(propertySchema.allOf, 'allOf', resolvePath);
|
|
465
|
-
}
|
|
466
|
-
if ((0, types_1.isExtendsSchema)(propertySchema)) {
|
|
467
|
-
return merge(propertySchema.extends, 'extends', resolvePath);
|
|
468
|
-
}
|
|
469
|
-
if ((0, types_1.isRefSchema)(propertySchema)) {
|
|
470
|
-
const refItem = getRefWithPath(context, propertySchema);
|
|
471
|
-
if (!refItem) {
|
|
472
|
-
throw new Error('ref could not be parsed');
|
|
473
|
-
}
|
|
474
|
-
const shapeWithPath = refItemToShapeWithPath(context, refItem);
|
|
475
|
-
if (shapeWithPath && !isSelfReferential(resolvePath, shapeWithPath.shape.name)) {
|
|
476
|
-
/**
|
|
477
|
-
* Pass the new shape's path rather than the parent's path, which
|
|
478
|
-
* will have been truncated to something opaque, like `@ref`.
|
|
479
|
-
*/
|
|
480
|
-
return resolveAll((0, exports.omitRefAndExtend)(propertySchema, shapeWithPath.shape.schema), shapeWithPath.path);
|
|
481
|
-
}
|
|
482
|
-
return;
|
|
483
|
-
}
|
|
484
|
-
return propertySchema;
|
|
485
|
-
}
|
|
486
|
-
catch (err) {
|
|
487
|
-
throw new Error(`error at '${resolvePath.join('.')}', ${err.message}`);
|
|
488
|
-
}
|
|
489
|
-
};
|
|
490
|
-
const merge = (schemas, propName, path) => {
|
|
491
|
-
const resolvedSchemas = schemas.map((schema, index) => {
|
|
492
|
-
const resolved = resolveAll(schema, [...path, propName, index]);
|
|
493
|
-
return resolved && (0, types_1.isObjectSchema)(resolved) ? resolved : undefined;
|
|
494
|
-
});
|
|
495
|
-
return (propName === 'allOf' ? merge_1.mergeDeepObjectSchemas : merge_1.mergeObjectSchemas)(...resolvedSchemas);
|
|
496
|
-
};
|
|
497
|
-
return resolveAll(shapeOrFieldSchema, schemaPath) ?? shapeOrFieldSchema;
|
|
498
|
-
}
|
|
499
|
-
function dereferenceObjectSchema(context, shapeOrFieldSchema, schemaPath = []) {
|
|
500
|
-
const schema = dereferenceSchema(context, shapeOrFieldSchema, schemaPath);
|
|
501
|
-
if (!(0, types_1.isObjectSchema)(schema)) {
|
|
502
|
-
throw new Error(`provided schema at '${schemaPath.join('.')}' could not be resolved to an object schema`);
|
|
503
|
-
}
|
|
504
|
-
return schema;
|
|
505
|
-
}
|
|
506
|
-
function createGetNamespace(context) {
|
|
507
|
-
return (serviceId) => context.services?.[serviceId]?.namespace;
|
|
508
|
-
}
|
|
509
|
-
function parsePropertyRef(refStr) {
|
|
510
|
-
const [serviceId, coordinate] = splitAtRef(refStr);
|
|
511
|
-
const coordinateParts = coordinate.split('.');
|
|
512
|
-
if (coordinateParts.length === 1) {
|
|
513
|
-
return { serviceId, shapeName: 'Query', propertyName: coordinateParts[0] };
|
|
514
|
-
}
|
|
515
|
-
if (coordinateParts.length === 2) {
|
|
516
|
-
return {
|
|
517
|
-
serviceId,
|
|
518
|
-
shapeName: coordinateParts[0],
|
|
519
|
-
propertyName: coordinateParts[1]
|
|
520
|
-
};
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
function serializePropertyRef({ shapeName, propertyName, serviceId }) {
|
|
524
|
-
const coordinate = `${shapeName}.${propertyName}`;
|
|
525
|
-
return serviceId === 'local' ? coordinate : `${serviceId}:${coordinate}`;
|
|
526
|
-
}
|
|
527
|
-
function normalizePropertyRef(refStr) {
|
|
528
|
-
const parsed = parsePropertyRef(refStr);
|
|
529
|
-
return parsed ? serializePropertyRef(parsed) : refStr;
|
|
530
|
-
}
|
|
531
|
-
function propertyRefToShapeRef(propertyRef) {
|
|
532
|
-
const parsed = parsePropertyRef(propertyRef);
|
|
533
|
-
if (!parsed) {
|
|
534
|
-
throw new Error(`Invalid property ref "${propertyRef}`);
|
|
535
|
-
}
|
|
536
|
-
return formatShapeRef(parsed.serviceId, parsed.shapeName);
|
|
537
|
-
}
|
|
538
|
-
function formatShapeRef(serviceId, shapeName) {
|
|
539
|
-
return `${serviceId}:${shapeName}`;
|
|
540
|
-
}
|
|
541
|
-
function applyNamespace(namespace, name) {
|
|
542
|
-
return namespace ? `${namespace}_${name}` : name;
|
|
543
|
-
}
|
|
544
|
-
function propertyRefItemToResolverPath(getNamespace, item) {
|
|
545
|
-
const path = propertyRefItemToPath(getNamespace, item);
|
|
546
|
-
return path.concat(path[0] === 'shapes' ? '@resolver' : 'resolver');
|
|
547
|
-
}
|
|
548
|
-
function propertyRefItemToArgsPath(getNamespace, item) {
|
|
549
|
-
const path = propertyRefItemToPath(getNamespace, item);
|
|
550
|
-
return path.concat(path[0] === 'shapes' ? '@args' : 'args');
|
|
551
|
-
}
|
|
552
|
-
function propertyRefItemToLocalName(getNamespace, item) {
|
|
553
|
-
const { shapeName, serviceId, propertyName } = item;
|
|
554
|
-
if (shapeName === 'Query' || shapeName === 'Mutation') {
|
|
555
|
-
const namespaced = applyNamespace(getNamespace(serviceId), propertyName);
|
|
556
|
-
return `${shapeName}.${namespaced}`;
|
|
557
|
-
}
|
|
558
|
-
return propertyName;
|
|
559
|
-
}
|
|
560
|
-
function queryRefToLocalName(context, queryRef) {
|
|
561
|
-
const parsedQueryRef = parsePropertyRef(queryRef);
|
|
562
|
-
if (parsedQueryRef) {
|
|
563
|
-
return parsedQueryRef.serviceId === 'local'
|
|
564
|
-
? parsedQueryRef.propertyName
|
|
565
|
-
: propertyRefItemToLocalName(createGetNamespace(context), parsedQueryRef);
|
|
566
|
-
}
|
|
567
|
-
}
|
|
568
|
-
function propertyRefItemToPath(getNamespace, item) {
|
|
569
|
-
const { shapeName, serviceId, propertyName } = item;
|
|
570
|
-
const namespace = getNamespace(serviceId);
|
|
571
|
-
if (shapeName === 'Query' || shapeName === 'Mutation') {
|
|
572
|
-
return [shapeName === 'Query' ? 'queries' : 'mutations', applyNamespace(namespace, propertyName)];
|
|
573
|
-
}
|
|
574
|
-
return ['shapes', applyNamespace(namespace, shapeName), 'schema', 'properties', propertyName];
|
|
575
|
-
}
|
|
576
|
-
function propertyRefToArgs(projectSchema, ref) {
|
|
577
|
-
const parsed = typeof ref === 'object' ? ref : parsePropertyRef(ref);
|
|
578
|
-
if (parsed) {
|
|
579
|
-
const path = propertyRefItemToArgsPath(createGetNamespace(projectSchema), parsed);
|
|
580
|
-
return (0, get_js_1.default)(projectSchema, path);
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
/**
|
|
584
|
-
* Get a ref to the given shape.
|
|
585
|
-
*/
|
|
586
|
-
function normalizeRefExpression(context, refExpression) {
|
|
587
|
-
return refItemToAtRef(refExpressionToRefItem(context, refExpression));
|
|
588
|
-
}
|
|
589
|
-
function normalizeLocalRefString(ref) {
|
|
590
|
-
return ref.startsWith('local:') ? ref.substring(6) : ref;
|
|
591
|
-
}
|
|
592
|
-
function getAllPropertyRefs(projectSchema) {
|
|
593
|
-
const result = [];
|
|
594
|
-
const parentIsResolver = (path, resolverName) => {
|
|
595
|
-
const parent = (0, get_js_1.default)(projectSchema, path.slice(0, -1));
|
|
596
|
-
return ((0, util_1.isRecord)(parent) &&
|
|
597
|
-
(Array.isArray(resolverName) ? resolverName.some((name) => name === parent.name) : parent.name === resolverName));
|
|
598
|
-
};
|
|
599
|
-
const parentIsGenerateState = (path) => {
|
|
600
|
-
if (path[0] !== 'ai-experimental' || path[path.length - 2] !== 'execution') {
|
|
601
|
-
return false;
|
|
602
|
-
}
|
|
603
|
-
const parent = (0, get_js_1.default)(projectSchema, path.slice(0, -1));
|
|
604
|
-
return (0, util_1.isRecord)(parent) && parent.type === 'generate';
|
|
605
|
-
};
|
|
606
|
-
const pushRef = (refStr) => {
|
|
607
|
-
const parsed = parsePropertyRef(refStr);
|
|
608
|
-
if (parsed) {
|
|
609
|
-
result.push(parsed);
|
|
610
|
-
}
|
|
611
|
-
};
|
|
612
|
-
(0, util_1.visit)(projectSchema, ['to', 'tools'], (value, path) => {
|
|
613
|
-
const propName = path[path.length - 1];
|
|
614
|
-
if (propName === 'to' && (0, isString_js_1.default)(value) && parentIsResolver(path, 'delegate')) {
|
|
615
|
-
pushRef(value);
|
|
616
|
-
}
|
|
617
|
-
else if (propName === 'tools' &&
|
|
618
|
-
Array.isArray(value) &&
|
|
619
|
-
(parentIsGenerateState(path) || parentIsResolver(path, ['ai:generateText', 'ai:chat']))) {
|
|
620
|
-
const tools = value;
|
|
621
|
-
for (const tool of tools) {
|
|
622
|
-
pushRef((0, ai_tools_1.getToolRef)(tool));
|
|
623
|
-
}
|
|
624
|
-
}
|
|
625
|
-
});
|
|
626
|
-
return result;
|
|
627
|
-
}
|
|
628
|
-
function getQuery(projectSchema, queryRef) {
|
|
629
|
-
const propertyRef = parsePropertyRef(queryRef);
|
|
630
|
-
if (!propertyRef || (propertyRef.shapeName !== 'Query' && propertyRef.shapeName !== 'Mutation')) {
|
|
631
|
-
throw new Error(`Invalid query ref "${queryRef}"`);
|
|
632
|
-
}
|
|
633
|
-
const path = propertyRefItemToPath(createGetNamespace(projectSchema), propertyRef);
|
|
634
|
-
const query = (0, get_js_1.default)(projectSchema, path);
|
|
635
|
-
return query ? { name: path[path.length - 1], query, ref: propertyRef } : undefined;
|
|
636
|
-
}
|
|
637
|
-
function ensureQuery(projectSchema, queryRef) {
|
|
638
|
-
const query = getQuery(projectSchema, queryRef);
|
|
639
|
-
if (!query) {
|
|
640
|
-
throw new errors_1.NotFoundError(`Query "${queryRef}" not found`);
|
|
641
|
-
}
|
|
642
|
-
return query;
|
|
643
|
-
}
|
|
644
|
-
function normalizeRefs(projectSchema, property) {
|
|
645
|
-
let updatedProperty = {
|
|
646
|
-
...property
|
|
647
|
-
};
|
|
648
|
-
// Array items
|
|
649
|
-
if (property.items) {
|
|
650
|
-
return {
|
|
651
|
-
...updatedProperty,
|
|
652
|
-
items: normalizeRefs(projectSchema, property.items)
|
|
653
|
-
};
|
|
654
|
-
}
|
|
655
|
-
// Unions
|
|
656
|
-
if (property.oneOf) {
|
|
657
|
-
return {
|
|
658
|
-
...updatedProperty,
|
|
659
|
-
oneOf: property.oneOf.map((item) => normalizeRefs(projectSchema, item))
|
|
660
|
-
};
|
|
661
|
-
}
|
|
662
|
-
// Convert $ref to @ref
|
|
663
|
-
const refItem = getRef(projectSchema, updatedProperty);
|
|
664
|
-
if (refItem && updatedProperty.$ref) {
|
|
665
|
-
updatedProperty = {
|
|
666
|
-
...(0, omit_js_1.default)(['$ref'], updatedProperty),
|
|
667
|
-
'@ref': refItemToAtRef(refItem)
|
|
668
|
-
};
|
|
669
|
-
}
|
|
670
|
-
return updatedProperty;
|
|
671
|
-
}
|