@takeshape/schema 11.52.0 → 11.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__tests__/_examples.test.js +77 -0
- package/dist/__tests__/agents.test.js +163 -0
- package/dist/__tests__/api-version.test.js +24 -0
- package/dist/__tests__/builtin-schema.test.js +18 -0
- package/dist/__tests__/content-schema-transform.test.d.ts +1 -0
- package/dist/__tests__/content-schema-transform.test.js +522 -0
- package/dist/__tests__/create-input-schema.test.d.ts +1 -0
- package/dist/__tests__/create-input-schema.test.js +184 -0
- package/dist/__tests__/enum.test.d.ts +1 -0
- package/dist/__tests__/enum.test.js +36 -0
- package/dist/__tests__/flatten-templates.test.d.ts +1 -0
- package/dist/__tests__/flatten-templates.test.js +40 -0
- package/dist/__tests__/get-is-leaf.test.d.ts +1 -0
- package/dist/__tests__/get-is-leaf.test.js +50 -0
- package/dist/__tests__/interfaces.test.d.ts +1 -0
- package/dist/__tests__/interfaces.test.js +219 -0
- package/dist/__tests__/migration.test.d.ts +1 -0
- package/dist/__tests__/migration.test.js +34 -0
- package/dist/__tests__/mocks.test.d.ts +1 -0
- package/dist/__tests__/mocks.test.js +24 -0
- package/dist/__tests__/refs.test.d.ts +1 -0
- package/dist/__tests__/refs.test.js +752 -0
- package/dist/__tests__/relationships.test.d.ts +1 -0
- package/dist/__tests__/relationships.test.js +638 -0
- package/dist/__tests__/schema-transform.test.d.ts +1 -0
- package/dist/__tests__/schema-transform.test.js +205 -0
- package/dist/__tests__/schema-util.test.d.ts +1 -0
- package/dist/__tests__/schema-util.test.js +1731 -0
- package/dist/__tests__/service-dependencies.test.d.ts +1 -0
- package/dist/__tests__/service-dependencies.test.js +360 -0
- package/dist/__tests__/unions.test.d.ts +1 -0
- package/dist/__tests__/unions.test.js +44 -0
- package/dist/__tests__/validate.test.d.ts +1 -0
- package/dist/__tests__/validate.test.js +1926 -0
- package/dist/__tests__/workflows.test.d.ts +3 -0
- package/dist/__tests__/workflows.test.js +149 -0
- package/dist/agents.d.ts +14 -0
- package/dist/auth-schemas.d.ts +125 -0
- package/dist/builtin-schema.d.ts +8 -0
- package/dist/content-schema-transform.d.ts +35 -0
- package/dist/content-schema-transform.js +162 -0
- package/dist/create-input-schema.d.ts +9 -0
- package/dist/enum.d.ts +2 -0
- package/dist/flatten-templates.d.ts +2 -0
- package/dist/flatten-templates.js +20 -0
- package/dist/get-is-leaf.d.ts +3 -0
- package/dist/get-is-leaf.js +56 -0
- package/dist/index.d.ts +48 -0
- package/dist/index.js +46 -0
- package/dist/interfaces.d.ts +12 -0
- package/dist/interfaces.js +85 -0
- package/dist/layers/__tests__/layers.test.d.ts +1 -0
- package/dist/layers/__tests__/layers.test.js +38 -0
- package/dist/layers/layers.d.ts +26 -0
- package/dist/layers/layers.js +301 -0
- package/dist/layers/refs.d.ts +102 -0
- package/dist/layers/refs.js +220 -0
- package/dist/layers/type-utils.d.ts +59 -0
- package/dist/layers/type-utils.js +118 -0
- package/dist/layers/visitor.d.ts +5 -0
- package/dist/layers/visitor.js +38 -0
- package/dist/migration/index.d.ts +64 -0
- package/dist/migration/index.js +122 -0
- package/dist/migration/to/__tests__/v3.10.0.test.d.ts +1 -0
- package/dist/migration/to/__tests__/v3.10.0.test.js +90 -0
- package/dist/migration/to/__tests__/v3.12.3.test.d.ts +1 -0
- package/dist/migration/to/__tests__/v3.12.3.test.js +103 -0
- package/dist/migration/to/__tests__/v3.17.test.d.ts +1 -0
- package/dist/migration/to/__tests__/v3.17.test.js +71 -0
- package/dist/migration/to/__tests__/v3.34.0.test.d.ts +1 -0
- package/dist/migration/to/__tests__/v3.34.0.test.js +240 -0
- package/dist/migration/to/__tests__/v3.39.0.test.d.ts +1 -0
- package/dist/migration/to/__tests__/v3.39.0.test.js +116 -0
- package/dist/migration/to/__tests__/v3.46.0.test.d.ts +1 -0
- package/dist/migration/to/__tests__/v3.46.0.test.js +59 -0
- package/dist/migration/to/v3.0.0.d.ts +4 -0
- package/dist/migration/to/v3.0.0.js +212 -0
- package/dist/migration/to/v3.1.0.d.ts +4 -0
- package/dist/migration/to/v3.1.0.js +194 -0
- package/dist/migration/to/v3.10.0.d.ts +4 -0
- package/dist/migration/to/v3.11.0.d.ts +4 -0
- package/dist/migration/to/v3.12.0.d.ts +4 -0
- package/dist/migration/to/v3.12.1.d.ts +4 -0
- package/dist/migration/to/v3.12.2.d.ts +4 -0
- package/dist/migration/to/v3.12.3.d.ts +4 -0
- package/dist/migration/to/v3.13.0.d.ts +4 -0
- package/dist/migration/to/v3.14.0.d.ts +4 -0
- package/dist/migration/to/v3.15.0.d.ts +4 -0
- package/dist/migration/to/v3.16.0.d.ts +4 -0
- package/dist/migration/to/v3.17.0.d.ts +4 -0
- package/dist/migration/to/v3.17.1.d.ts +4 -0
- package/dist/migration/to/v3.18.0.d.ts +4 -0
- package/dist/migration/to/v3.18.1.d.ts +4 -0
- package/dist/migration/to/v3.18.2.d.ts +4 -0
- package/dist/migration/to/v3.19.0.d.ts +4 -0
- package/dist/migration/to/v3.2.0.d.ts +4 -0
- package/dist/migration/to/v3.20.0.d.ts +4 -0
- package/dist/migration/to/v3.21.0.d.ts +4 -0
- package/dist/migration/to/v3.22.0.d.ts +4 -0
- package/dist/migration/to/v3.23.0.d.ts +4 -0
- package/dist/migration/to/v3.24.0.d.ts +4 -0
- package/dist/migration/to/v3.25.0.d.ts +4 -0
- package/dist/migration/to/v3.26.0.d.ts +4 -0
- package/dist/migration/to/v3.27.0.d.ts +4 -0
- package/dist/migration/to/v3.28.0.d.ts +4 -0
- package/dist/migration/to/v3.29.0.d.ts +4 -0
- package/dist/migration/to/v3.3.0.d.ts +4 -0
- package/dist/migration/to/v3.30.0.d.ts +4 -0
- package/dist/migration/to/v3.31.0.d.ts +4 -0
- package/dist/migration/to/v3.32.0.d.ts +4 -0
- package/dist/migration/to/v3.32.0.js +59 -0
- package/dist/migration/to/v3.33.0.d.ts +4 -0
- package/dist/migration/to/v3.34.0.d.ts +6 -0
- package/dist/migration/to/v3.34.0.js +116 -0
- package/dist/migration/to/v3.35.0.d.ts +4 -0
- package/dist/migration/to/v3.36.0.d.ts +4 -0
- package/dist/migration/to/v3.37.0.d.ts +4 -0
- package/dist/migration/to/v3.38.0.d.ts +4 -0
- package/dist/migration/to/v3.39.0.d.ts +4 -0
- package/dist/migration/to/v3.39.0.js +45 -0
- package/dist/migration/to/v3.4.0.d.ts +4 -0
- package/dist/migration/to/v3.40.0.d.ts +4 -0
- package/dist/migration/to/v3.41.0.d.ts +4 -0
- package/dist/migration/to/v3.42.0.d.ts +4 -0
- package/dist/migration/to/v3.43.0.d.ts +4 -0
- package/dist/migration/to/v3.44.0.d.ts +4 -0
- package/dist/migration/to/v3.45.0.d.ts +4 -0
- package/dist/migration/to/v3.46.0.d.ts +4 -0
- package/dist/migration/to/v3.47.0.d.ts +4 -0
- package/dist/migration/to/v3.48.0.d.ts +4 -0
- package/dist/migration/to/v3.49.0.d.ts +4 -0
- package/dist/migration/to/v3.5.0.d.ts +4 -0
- package/dist/migration/to/v3.5.1.d.ts +4 -0
- package/dist/migration/to/v3.50.0.d.ts +4 -0
- package/dist/migration/to/v3.51.0.d.ts +4 -0
- package/dist/migration/to/v3.6.0.d.ts +4 -0
- package/dist/migration/to/v3.7.0.d.ts +4 -0
- package/dist/migration/to/v3.8.0.d.ts +4 -0
- package/dist/migration/to/v3.9.0.d.ts +4 -0
- package/dist/migration/types.d.ts +19 -0
- package/dist/migration/types.js +1 -0
- package/dist/mocks.d.ts +13 -0
- package/dist/mocks.js +58 -0
- package/dist/models/__tests__/project-schema.test.d.ts +1 -0
- package/dist/models/__tests__/project-schema.test.js +67 -0
- package/dist/models/__tests__/query.test.d.ts +1 -0
- package/dist/models/__tests__/query.test.js +27 -0
- package/dist/models/__tests__/service.test.d.ts +1 -0
- package/dist/models/__tests__/service.test.js +17 -0
- package/dist/models/__tests__/shape.test.d.ts +1 -0
- package/dist/models/__tests__/shape.test.js +61 -0
- package/dist/models/project-schema.d.ts +35 -0
- package/dist/models/project-schema.js +92 -0
- package/dist/models/query.d.ts +17 -0
- package/dist/models/service.d.ts +12 -0
- package/dist/models/shape.d.ts +41 -0
- package/dist/models/shape.js +85 -0
- package/dist/patterns.js +1 -0
- package/dist/project-schema/index.d.ts +187 -0
- package/dist/project-schema/index.js +75 -0
- package/dist/project-schema/migrate.d.ts +4 -0
- package/dist/project-schema/migrate.js +194 -0
- package/dist/refs.d.ts +226 -0
- package/dist/refs.js +608 -0
- package/dist/relationships.d.ts +40 -0
- package/dist/relationships.js +311 -0
- package/dist/runtime-schema.d.ts +5 -0
- package/dist/runtime-schema.js +80 -0
- package/dist/schema-transform.d.ts +19 -0
- package/dist/schema-transform.js +74 -0
- package/dist/schema-util.d.ts +210 -0
- package/dist/schema-util.js +1077 -0
- package/dist/schemas/auth-schemas.json +365 -0
- package/dist/schemas/index.js +154 -0
- package/dist/service-dependencies.d.ts +13 -0
- package/dist/service-dependencies.js +165 -0
- package/dist/services/__tests__/services.test.d.ts +1 -0
- package/dist/services/__tests__/services.test.js +113 -0
- package/dist/services/services.d.ts +31 -0
- package/dist/services/services.js +145 -0
- package/dist/services/types.js +1 -0
- package/dist/services/util.d.ts +16 -0
- package/dist/taxonomies.d.ts +15 -0
- package/dist/taxonomies.js +24 -0
- package/dist/template-shapes/__tests__/index.test.d.ts +1 -0
- package/dist/template-shapes/__tests__/index.test.js +40 -0
- package/dist/template-shapes/__tests__/names.test.d.ts +1 -0
- package/dist/template-shapes/__tests__/names.test.js +19 -0
- package/dist/template-shapes/__tests__/templates.test.d.ts +1 -0
- package/dist/template-shapes/__tests__/templates.test.js +80 -0
- package/dist/template-shapes/__tests__/where.test.d.ts +1 -0
- package/dist/template-shapes/__tests__/where.test.js +218 -0
- package/dist/template-shapes/index.d.ts +7 -0
- package/dist/template-shapes/names.d.ts +10 -0
- package/dist/template-shapes/templates.d.ts +32 -0
- package/dist/template-shapes/templates.js +319 -0
- package/dist/template-shapes/types.d.ts +15 -0
- package/dist/template-shapes/where.d.ts +37 -0
- package/dist/template-shapes/where.js +402 -0
- package/dist/types/__tests__/utils.test.d.ts +1 -0
- package/dist/types/__tests__/utils.test.js +159 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.js +2 -0
- package/dist/types/transforms.d.ts +13 -0
- package/dist/types/transforms.js +1 -0
- package/dist/types/types.d.ts +211 -0
- package/dist/types/utils.d.ts +117 -0
- package/dist/types/utils.js +279 -0
- package/dist/unions.d.ts +14 -0
- package/dist/unions.js +77 -0
- package/dist/util/__tests__/api-indexing.test.d.ts +1 -0
- package/dist/util/__tests__/api-indexing.test.js +129 -0
- package/dist/util/__tests__/detect-cycles.test.d.ts +1 -0
- package/dist/util/__tests__/detect-cycles.test.js +193 -0
- package/dist/util/__tests__/find-shape-at-path.test.d.ts +1 -0
- package/dist/util/__tests__/find-shape-at-path.test.js +41 -0
- package/dist/util/__tests__/form-config.test.d.ts +1 -0
- package/dist/util/__tests__/form-config.test.js +196 -0
- package/dist/util/__tests__/get-return-shape.test.d.ts +1 -0
- package/dist/util/__tests__/get-return-shape.test.js +27 -0
- package/dist/util/__tests__/has-args.test.d.ts +1 -0
- package/dist/util/__tests__/has-args.test.js +46 -0
- package/dist/util/__tests__/merge.test.d.ts +1 -0
- package/dist/util/__tests__/merge.test.js +1074 -0
- package/dist/util/__tests__/patch-schema.test.d.ts +1 -0
- package/dist/util/__tests__/patch-schema.test.js +82 -0
- package/dist/util/__tests__/shapes.test.d.ts +1 -0
- package/dist/util/__tests__/shapes.test.js +30 -0
- package/dist/util/ai-tools.d.ts +3 -0
- package/dist/util/api-indexing.d.ts +9 -0
- package/dist/util/api-indexing.js +57 -0
- package/dist/util/detect-cycles.d.ts +7 -0
- package/dist/util/detect-cycles.js +45 -0
- package/dist/util/find-shape-at-path.d.ts +21 -0
- package/dist/util/form-config.d.ts +11 -0
- package/dist/util/form-config.js +62 -0
- package/dist/util/get-conflicting-properties.d.ts +6 -0
- package/dist/util/get-conflicting-properties.js +55 -0
- package/dist/util/get-return-shape.d.ts +4 -0
- package/dist/util/get-return-shape.js +30 -0
- package/dist/util/has-arg.d.ts +4 -0
- package/dist/util/has-arg.js +13 -0
- package/dist/util/merge.d.ts +15 -0
- package/dist/util/merge.js +256 -0
- package/dist/util/patch-schema.d.ts +8 -0
- package/dist/util/shapes.d.ts +5 -0
- package/dist/validate/errors.d.ts +3 -0
- package/dist/validate/errors.js +20 -0
- package/dist/validate/validate.d.ts +73 -0
- package/dist/validate/validate.js +1107 -0
- package/dist/versions.d.ts +4 -0
- package/dist/versions.js +4 -0
- package/dist/workflows.d.ts +14 -0
- package/dist/workflows.js +66 -0
- package/examples/latest/agent-schema.json +12 -4
- package/examples/latest/all-fields-shapes-inline.json +52 -18
- package/examples/latest/all-fields-shapes.json +76 -26
- package/examples/latest/betzino.json +3139 -902
- package/examples/latest/blog-schema.json +28 -8
- package/examples/latest/brewery-schema.json +25 -7
- package/examples/latest/clear-cache-schema.json +7 -3
- package/examples/latest/complex-project-schema.json +359 -98
- package/examples/latest/complex-schema.json +1754 -487
- package/examples/latest/edit-schema.json +11 -4
- package/examples/latest/fabric-ecommerce.json +838 -187
- package/examples/latest/frank-and-fred-schema.json +1753 -486
- package/examples/latest/klirr-schema.json +2411 -682
- package/examples/latest/layers/rick-and-morty-layer.json +32 -11
- package/examples/latest/layers/shopify-layer-2023-01.json +8637 -2206
- package/examples/latest/layers/shopify-storefront-2023-04.json +1714 -404
- package/examples/latest/layers/wordpress-2024-01.json +2746 -691
- package/examples/latest/massive-schema.json +584 -131
- package/examples/latest/mill-components-schema.json +125 -29
- package/examples/latest/nested-shape-arrays.json +19 -7
- package/examples/latest/one-earth.json +1113 -236
- package/examples/latest/pet-oneof-array.json +22 -7
- package/examples/latest/post-schema.json +20 -6
- package/examples/latest/pruned-shopify-product-schema.json +830 -185
- package/examples/latest/rag-example.json +15 -5
- package/examples/latest/real-world-schema.json +56 -14
- package/examples/latest/recursive-repeater-schema.json +11 -4
- package/examples/latest/recursive-schema.json +11 -4
- package/examples/latest/rick-and-morty-ast.json +174 -45
- package/examples/latest/rick-and-morty-graphql.json +100 -25
- package/examples/latest/rick-and-morty-rest.json +7 -3
- package/examples/latest/rick-and-morty-with-indexing.json +13 -5
- package/examples/latest/schema-where-filter.json +40 -11
- package/examples/latest/schema-with-repeater-draftjs.json +8 -3
- package/examples/latest/schema-with-rick-and-morty.json +4 -2
- package/examples/latest/shape-books-v3_2_0.json +71 -17
- package/examples/latest/shape-books.json +71 -17
- package/examples/latest/shape-editor-schema-edited.json +69 -23
- package/examples/latest/shape-editor-schema-initial.json +28 -10
- package/examples/latest/shapedb-crud-every-prop-type.json +22 -8
- package/examples/latest/shopify-lookbook.json +19 -5
- package/examples/latest/shopify-product-2022-07.json +3217 -726
- package/examples/latest/shopify-product-2023-04.json +4496 -1012
- package/examples/latest/shopify-store-with-widget.json +942 -213
- package/examples/latest/stripe-product-runtime-schema.json +277 -81
- package/examples/latest/stripe-starter-resolved.json +1953 -476
- package/examples/latest/user-schema-no-required.json +13 -3
- package/examples/latest/user-schema-with-defaults.json +27 -5
- package/examples/latest/valvoline-ai-demo.json +69 -17
- package/examples/latest/vector-search-schema.json +24 -8
- package/package.json +23 -24
- package/dist/cjs/package.json +0 -1
- package/dist/cjs/src/agents.js +0 -147
- package/dist/cjs/src/api-version.js +0 -24
- package/dist/cjs/src/auth-schemas.js +0 -8
- package/dist/cjs/src/builtin-schema.js +0 -616
- package/dist/cjs/src/constants.js +0 -4
- package/dist/cjs/src/content-schema-transform.js +0 -175
- package/dist/cjs/src/create-input-schema.js +0 -66
- package/dist/cjs/src/enum.js +0 -12
- package/dist/cjs/src/flatten-templates.js +0 -26
- package/dist/cjs/src/get-is-leaf.js +0 -59
- package/dist/cjs/src/index.js +0 -62
- package/dist/cjs/src/interfaces.js +0 -98
- package/dist/cjs/src/layers/layers.js +0 -313
- package/dist/cjs/src/layers/refs.js +0 -243
- package/dist/cjs/src/layers/type-utils.js +0 -145
- package/dist/cjs/src/layers/visitor.js +0 -42
- package/dist/cjs/src/migration/index.js +0 -142
- package/dist/cjs/src/migration/to/v3.0.0.js +0 -217
- package/dist/cjs/src/migration/to/v3.1.0.js +0 -199
- package/dist/cjs/src/migration/to/v3.10.0.js +0 -72
- package/dist/cjs/src/migration/to/v3.11.0.js +0 -90
- package/dist/cjs/src/migration/to/v3.12.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.12.1.js +0 -12
- package/dist/cjs/src/migration/to/v3.12.2.js +0 -12
- package/dist/cjs/src/migration/to/v3.12.3.js +0 -92
- package/dist/cjs/src/migration/to/v3.13.0.js +0 -22
- package/dist/cjs/src/migration/to/v3.14.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.15.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.16.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.17.0.js +0 -27
- package/dist/cjs/src/migration/to/v3.17.1.js +0 -12
- package/dist/cjs/src/migration/to/v3.18.0.js +0 -69
- package/dist/cjs/src/migration/to/v3.18.1.js +0 -20
- package/dist/cjs/src/migration/to/v3.18.2.js +0 -24
- package/dist/cjs/src/migration/to/v3.19.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.2.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.20.0.js +0 -29
- package/dist/cjs/src/migration/to/v3.21.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.22.0.js +0 -30
- package/dist/cjs/src/migration/to/v3.23.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.24.0.js +0 -13
- package/dist/cjs/src/migration/to/v3.25.0.js +0 -13
- package/dist/cjs/src/migration/to/v3.26.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.27.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.28.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.29.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.3.0.js +0 -15
- package/dist/cjs/src/migration/to/v3.30.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.31.0.js +0 -43
- package/dist/cjs/src/migration/to/v3.32.0.js +0 -61
- package/dist/cjs/src/migration/to/v3.33.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.34.0.js +0 -123
- package/dist/cjs/src/migration/to/v3.35.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.36.0.js +0 -27
- package/dist/cjs/src/migration/to/v3.37.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.38.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.39.0.js +0 -47
- package/dist/cjs/src/migration/to/v3.4.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.40.0.js +0 -31
- package/dist/cjs/src/migration/to/v3.41.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.42.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.43.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.44.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.45.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.46.0.js +0 -37
- package/dist/cjs/src/migration/to/v3.47.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.48.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.49.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.5.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.5.1.js +0 -12
- package/dist/cjs/src/migration/to/v3.50.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.51.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.6.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.7.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.8.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.9.0.js +0 -84
- package/dist/cjs/src/migration/types.js +0 -2
- package/dist/cjs/src/migration/utils.js +0 -10
- package/dist/cjs/src/mocks.js +0 -65
- package/dist/cjs/src/models/project-schema.js +0 -99
- package/dist/cjs/src/models/query.js +0 -35
- package/dist/cjs/src/models/service.js +0 -24
- package/dist/cjs/src/models/shape.js +0 -89
- package/dist/cjs/src/patterns.js +0 -2
- package/dist/cjs/src/project-schema/index.js +0 -156
- package/dist/cjs/src/project-schema/latest.js +0 -8
- package/dist/cjs/src/project-schema/migrate.js +0 -198
- package/dist/cjs/src/project-schema/v1.0.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.0.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.1.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.10.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.11.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.12.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.12.1.js +0 -8
- package/dist/cjs/src/project-schema/v3.12.2.js +0 -8
- package/dist/cjs/src/project-schema/v3.12.3.js +0 -8
- package/dist/cjs/src/project-schema/v3.13.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.13.1.js +0 -8
- package/dist/cjs/src/project-schema/v3.14.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.15.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.16.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.17.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.17.1.js +0 -8
- package/dist/cjs/src/project-schema/v3.18.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.18.1.js +0 -8
- package/dist/cjs/src/project-schema/v3.18.2.js +0 -8
- package/dist/cjs/src/project-schema/v3.19.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.2.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.20.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.21.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.22.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.23.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.24.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.25.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.26.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.27.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.28.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.29.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.3.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.30.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.31.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.32.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.33.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.34.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.35.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.36.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.37.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.38.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.39.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.4.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.40.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.41.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.42.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.43.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.44.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.45.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.46.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.47.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.48.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.49.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.5.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.5.1.js +0 -8
- package/dist/cjs/src/project-schema/v3.50.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.51.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.6.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.7.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.8.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.9.0.js +0 -8
- package/dist/cjs/src/project-schema/v4.0.0.js +0 -8
- package/dist/cjs/src/refs.js +0 -671
- package/dist/cjs/src/relationships.js +0 -326
- package/dist/cjs/src/runtime-schema.js +0 -88
- package/dist/cjs/src/scalars.js +0 -8
- package/dist/cjs/src/schema-transform.js +0 -83
- package/dist/cjs/src/schema-util.js +0 -1140
- package/dist/cjs/src/schemas/auth-schemas.json +0 -313
- package/dist/cjs/src/schemas/index.js +0 -162
- package/dist/cjs/src/schemas/user-schema.json +0 -51
- package/dist/cjs/src/service-dependencies.js +0 -172
- package/dist/cjs/src/services/services.js +0 -156
- package/dist/cjs/src/services/types.js +0 -2
- package/dist/cjs/src/services/util.js +0 -45
- package/dist/cjs/src/taxonomies.js +0 -28
- package/dist/cjs/src/template-shapes/index.js +0 -37
- package/dist/cjs/src/template-shapes/names.js +0 -26
- package/dist/cjs/src/template-shapes/templates.js +0 -331
- package/dist/cjs/src/template-shapes/types.js +0 -10
- package/dist/cjs/src/template-shapes/where.js +0 -414
- package/dist/cjs/src/types/index.js +0 -19
- package/dist/cjs/src/types/transforms.js +0 -2
- package/dist/cjs/src/types/types.js +0 -21
- package/dist/cjs/src/types/utils.js +0 -344
- package/dist/cjs/src/unions.js +0 -88
- package/dist/cjs/src/user-schema.js +0 -8
- package/dist/cjs/src/util/ai-tools.js +0 -10
- package/dist/cjs/src/util/api-indexing.js +0 -62
- package/dist/cjs/src/util/detect-cycles.js +0 -48
- package/dist/cjs/src/util/find-shape-at-path.js +0 -57
- package/dist/cjs/src/util/form-config.js +0 -66
- package/dist/cjs/src/util/get-conflicting-properties.js +0 -58
- package/dist/cjs/src/util/get-return-shape.js +0 -34
- package/dist/cjs/src/util/has-arg.js +0 -17
- package/dist/cjs/src/util/merge.js +0 -269
- package/dist/cjs/src/util/patch-schema.js +0 -55
- package/dist/cjs/src/util/shapes.js +0 -31
- package/dist/cjs/src/validate.js +0 -1140
- package/dist/cjs/src/versions.js +0 -8
- package/dist/cjs/src/workflows.js +0 -76
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +0 -1
- package/dist/esm/package.json +0 -1
- package/dist/esm/src/content-schema-transform.js +0 -162
- package/dist/esm/src/flatten-templates.js +0 -20
- package/dist/esm/src/get-is-leaf.js +0 -56
- package/dist/esm/src/index.js +0 -46
- package/dist/esm/src/interfaces.js +0 -85
- package/dist/esm/src/layers/layers.js +0 -301
- package/dist/esm/src/layers/refs.js +0 -220
- package/dist/esm/src/layers/type-utils.js +0 -118
- package/dist/esm/src/layers/visitor.js +0 -38
- package/dist/esm/src/migration/index.js +0 -122
- package/dist/esm/src/migration/to/v3.0.0.js +0 -212
- package/dist/esm/src/migration/to/v3.1.0.js +0 -194
- package/dist/esm/src/migration/to/v3.32.0.js +0 -59
- package/dist/esm/src/migration/to/v3.34.0.js +0 -116
- package/dist/esm/src/migration/to/v3.39.0.js +0 -45
- package/dist/esm/src/mocks.js +0 -58
- package/dist/esm/src/models/project-schema.js +0 -92
- package/dist/esm/src/models/shape.js +0 -85
- package/dist/esm/src/project-schema/index.js +0 -138
- package/dist/esm/src/project-schema/migrate.js +0 -194
- package/dist/esm/src/refs.js +0 -608
- package/dist/esm/src/relationships.js +0 -311
- package/dist/esm/src/runtime-schema.js +0 -80
- package/dist/esm/src/schema-transform.js +0 -74
- package/dist/esm/src/schema-util.js +0 -1077
- package/dist/esm/src/schemas/auth-schemas.json +0 -313
- package/dist/esm/src/schemas/index.js +0 -154
- package/dist/esm/src/schemas/project-schema/experimental.json +0 -1101
- package/dist/esm/src/schemas/project-schema/latest.json +0 -3320
- package/dist/esm/src/schemas/project-schema/meta-schema-v1.0.0.json +0 -193
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.0.0.json +0 -608
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.1.0.json +0 -608
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.2.0.json +0 -612
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.3.0.json +0 -612
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.4.0.json +0 -637
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.5.0.json +0 -626
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.5.1.json +0 -626
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.6.0.json +0 -629
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.7.0.json +0 -1137
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.8.0.json +0 -1137
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.9.0.json +0 -1477
- package/dist/esm/src/schemas/project-schema/v1.0.0.json +0 -321
- package/dist/esm/src/schemas/project-schema/v3.0.0.json +0 -414
- package/dist/esm/src/schemas/project-schema/v3.1.0.json +0 -572
- package/dist/esm/src/schemas/project-schema/v3.10.0.json +0 -2097
- package/dist/esm/src/schemas/project-schema/v3.11.0.json +0 -2141
- package/dist/esm/src/schemas/project-schema/v3.12.0.json +0 -2144
- package/dist/esm/src/schemas/project-schema/v3.12.1.json +0 -2282
- package/dist/esm/src/schemas/project-schema/v3.12.2.json +0 -2304
- package/dist/esm/src/schemas/project-schema/v3.12.3.json +0 -2357
- package/dist/esm/src/schemas/project-schema/v3.13.0.json +0 -2377
- package/dist/esm/src/schemas/project-schema/v3.14.0.json +0 -2385
- package/dist/esm/src/schemas/project-schema/v3.15.0.json +0 -2365
- package/dist/esm/src/schemas/project-schema/v3.16.0.json +0 -2373
- package/dist/esm/src/schemas/project-schema/v3.17.0.json +0 -2378
- package/dist/esm/src/schemas/project-schema/v3.17.1.json +0 -2380
- package/dist/esm/src/schemas/project-schema/v3.18.0.json +0 -2356
- package/dist/esm/src/schemas/project-schema/v3.18.1.json +0 -2357
- package/dist/esm/src/schemas/project-schema/v3.18.2.json +0 -2357
- package/dist/esm/src/schemas/project-schema/v3.19.0.json +0 -2369
- package/dist/esm/src/schemas/project-schema/v3.2.0.json +0 -580
- package/dist/esm/src/schemas/project-schema/v3.20.0.json +0 -2369
- package/dist/esm/src/schemas/project-schema/v3.21.0.json +0 -2376
- package/dist/esm/src/schemas/project-schema/v3.22.0.json +0 -2381
- package/dist/esm/src/schemas/project-schema/v3.23.0.json +0 -2456
- package/dist/esm/src/schemas/project-schema/v3.24.0.json +0 -2556
- package/dist/esm/src/schemas/project-schema/v3.25.0.json +0 -2552
- package/dist/esm/src/schemas/project-schema/v3.26.0.json +0 -2599
- package/dist/esm/src/schemas/project-schema/v3.27.0.json +0 -2611
- package/dist/esm/src/schemas/project-schema/v3.28.0.json +0 -2656
- package/dist/esm/src/schemas/project-schema/v3.29.0.json +0 -2670
- package/dist/esm/src/schemas/project-schema/v3.3.0.json +0 -581
- package/dist/esm/src/schemas/project-schema/v3.30.0.json +0 -2656
- package/dist/esm/src/schemas/project-schema/v3.31.0.json +0 -2714
- package/dist/esm/src/schemas/project-schema/v3.32.0.json +0 -2708
- package/dist/esm/src/schemas/project-schema/v3.33.0.json +0 -2715
- package/dist/esm/src/schemas/project-schema/v3.34.0.json +0 -2715
- package/dist/esm/src/schemas/project-schema/v3.35.0.json +0 -2748
- package/dist/esm/src/schemas/project-schema/v3.36.0.json +0 -2756
- package/dist/esm/src/schemas/project-schema/v3.37.0.json +0 -2821
- package/dist/esm/src/schemas/project-schema/v3.38.0.json +0 -2819
- package/dist/esm/src/schemas/project-schema/v3.39.0.json +0 -2827
- package/dist/esm/src/schemas/project-schema/v3.4.0.json +0 -571
- package/dist/esm/src/schemas/project-schema/v3.40.0.json +0 -2830
- package/dist/esm/src/schemas/project-schema/v3.41.0.json +0 -2830
- package/dist/esm/src/schemas/project-schema/v3.42.0.json +0 -2835
- package/dist/esm/src/schemas/project-schema/v3.43.0.json +0 -2841
- package/dist/esm/src/schemas/project-schema/v3.44.0.json +0 -3013
- package/dist/esm/src/schemas/project-schema/v3.45.0.json +0 -3064
- package/dist/esm/src/schemas/project-schema/v3.46.0.json +0 -3136
- package/dist/esm/src/schemas/project-schema/v3.47.0.json +0 -3189
- package/dist/esm/src/schemas/project-schema/v3.48.0.json +0 -3196
- package/dist/esm/src/schemas/project-schema/v3.49.0.json +0 -3239
- package/dist/esm/src/schemas/project-schema/v3.5.0.json +0 -571
- package/dist/esm/src/schemas/project-schema/v3.5.1.json +0 -571
- package/dist/esm/src/schemas/project-schema/v3.50.0.json +0 -3320
- package/dist/esm/src/schemas/project-schema/v3.51.0.json +0 -3320
- package/dist/esm/src/schemas/project-schema/v3.6.0.json +0 -587
- package/dist/esm/src/schemas/project-schema/v3.7.0.json +0 -587
- package/dist/esm/src/schemas/project-schema/v3.8.0.json +0 -604
- package/dist/esm/src/schemas/project-schema/v3.9.0.json +0 -604
- package/dist/esm/src/schemas/project-schema/v4.0.0.json +0 -2316
- package/dist/esm/src/schemas/project-schema.json +0 -190
- package/dist/esm/src/schemas/user-schema.json +0 -51
- package/dist/esm/src/service-dependencies.js +0 -165
- package/dist/esm/src/services/services.js +0 -145
- package/dist/esm/src/taxonomies.js +0 -24
- package/dist/esm/src/template-shapes/templates.js +0 -319
- package/dist/esm/src/template-shapes/where.js +0 -402
- package/dist/esm/src/types/index.js +0 -3
- package/dist/esm/src/types/utils.js +0 -279
- package/dist/esm/src/unions.js +0 -77
- package/dist/esm/src/user-schema.js +0 -7
- package/dist/esm/src/util/api-indexing.js +0 -57
- package/dist/esm/src/util/detect-cycles.js +0 -45
- package/dist/esm/src/util/form-config.js +0 -62
- package/dist/esm/src/util/get-conflicting-properties.js +0 -55
- package/dist/esm/src/util/get-return-shape.js +0 -30
- package/dist/esm/src/util/has-arg.js +0 -13
- package/dist/esm/src/util/merge.js +0 -256
- package/dist/esm/src/validate.js +0 -1126
- package/dist/esm/src/versions.js +0 -4
- package/dist/esm/src/workflows.js +0 -66
- package/dist/esm/tsconfig.esm.tsbuildinfo +0 -1
- package/dist/types/src/agents.d.ts +0 -14
- package/dist/types/src/auth-schemas.d.ts +0 -104
- package/dist/types/src/builtin-schema.d.ts +0 -8
- package/dist/types/src/content-schema-transform.d.ts +0 -35
- package/dist/types/src/create-input-schema.d.ts +0 -9
- package/dist/types/src/enum.d.ts +0 -2
- package/dist/types/src/flatten-templates.d.ts +0 -2
- package/dist/types/src/get-is-leaf.d.ts +0 -3
- package/dist/types/src/index.d.ts +0 -48
- package/dist/types/src/interfaces.d.ts +0 -12
- package/dist/types/src/layers/layers.d.ts +0 -26
- package/dist/types/src/layers/refs.d.ts +0 -102
- package/dist/types/src/layers/type-utils.d.ts +0 -59
- package/dist/types/src/layers/visitor.d.ts +0 -5
- package/dist/types/src/migration/index.d.ts +0 -64
- package/dist/types/src/migration/to/v3.0.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.1.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.10.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.11.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.12.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.12.1.d.ts +0 -4
- package/dist/types/src/migration/to/v3.12.2.d.ts +0 -4
- package/dist/types/src/migration/to/v3.12.3.d.ts +0 -4
- package/dist/types/src/migration/to/v3.13.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.14.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.15.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.16.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.17.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.17.1.d.ts +0 -4
- package/dist/types/src/migration/to/v3.18.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.18.1.d.ts +0 -4
- package/dist/types/src/migration/to/v3.18.2.d.ts +0 -4
- package/dist/types/src/migration/to/v3.19.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.2.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.20.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.21.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.22.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.23.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.24.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.25.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.26.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.27.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.28.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.29.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.3.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.30.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.31.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.32.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.33.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.34.0.d.ts +0 -6
- package/dist/types/src/migration/to/v3.35.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.36.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.37.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.38.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.39.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.4.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.40.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.41.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.42.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.43.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.44.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.45.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.46.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.47.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.48.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.49.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.5.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.5.1.d.ts +0 -4
- package/dist/types/src/migration/to/v3.50.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.51.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.6.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.7.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.8.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.9.0.d.ts +0 -4
- package/dist/types/src/migration/types.d.ts +0 -19
- package/dist/types/src/mocks.d.ts +0 -13
- package/dist/types/src/models/project-schema.d.ts +0 -35
- package/dist/types/src/models/query.d.ts +0 -17
- package/dist/types/src/models/service.d.ts +0 -12
- package/dist/types/src/models/shape.d.ts +0 -41
- package/dist/types/src/project-schema/index.d.ts +0 -187
- package/dist/types/src/project-schema/migrate.d.ts +0 -4
- package/dist/types/src/refs.d.ts +0 -226
- package/dist/types/src/relationships.d.ts +0 -40
- package/dist/types/src/runtime-schema.d.ts +0 -5
- package/dist/types/src/schema-transform.d.ts +0 -19
- package/dist/types/src/schema-util.d.ts +0 -210
- package/dist/types/src/service-dependencies.d.ts +0 -13
- package/dist/types/src/services/services.d.ts +0 -31
- package/dist/types/src/services/util.d.ts +0 -16
- package/dist/types/src/taxonomies.d.ts +0 -15
- package/dist/types/src/template-shapes/index.d.ts +0 -7
- package/dist/types/src/template-shapes/names.d.ts +0 -10
- package/dist/types/src/template-shapes/templates.d.ts +0 -32
- package/dist/types/src/template-shapes/types.d.ts +0 -15
- package/dist/types/src/template-shapes/where.d.ts +0 -37
- package/dist/types/src/types/index.d.ts +0 -3
- package/dist/types/src/types/transforms.d.ts +0 -13
- package/dist/types/src/types/types.d.ts +0 -211
- package/dist/types/src/types/utils.d.ts +0 -117
- package/dist/types/src/unions.d.ts +0 -14
- package/dist/types/src/user-schema.d.ts +0 -38
- package/dist/types/src/util/ai-tools.d.ts +0 -3
- package/dist/types/src/util/api-indexing.d.ts +0 -9
- package/dist/types/src/util/detect-cycles.d.ts +0 -7
- package/dist/types/src/util/find-shape-at-path.d.ts +0 -21
- package/dist/types/src/util/form-config.d.ts +0 -11
- package/dist/types/src/util/get-conflicting-properties.d.ts +0 -6
- package/dist/types/src/util/get-return-shape.d.ts +0 -4
- package/dist/types/src/util/has-arg.d.ts +0 -4
- package/dist/types/src/util/merge.d.ts +0 -15
- package/dist/types/src/util/patch-schema.d.ts +0 -8
- package/dist/types/src/util/shapes.d.ts +0 -5
- package/dist/types/src/validate.d.ts +0 -75
- package/dist/types/src/versions.d.ts +0 -4
- package/dist/types/src/workflows.d.ts +0 -14
- package/dist/types/tsconfig.types.tsbuildinfo +0 -1
- /package/dist/{esm/src/migration/types.js → __tests__/_examples.test.d.ts} +0 -0
- /package/dist/{esm/src/patterns.js → __tests__/agents.test.d.ts} +0 -0
- /package/dist/{esm/src/services/types.js → __tests__/api-version.test.d.ts} +0 -0
- /package/dist/{esm/src/types/transforms.js → __tests__/builtin-schema.test.d.ts} +0 -0
- /package/dist/{esm/src/agents.js → agents.js} +0 -0
- /package/dist/{types/src/api-version.d.ts → api-version.d.ts} +0 -0
- /package/dist/{esm/src/api-version.js → api-version.js} +0 -0
- /package/dist/{esm/src/auth-schemas.js → auth-schemas.js} +0 -0
- /package/dist/{esm/src/builtin-schema.js → builtin-schema.js} +0 -0
- /package/dist/{types/src/constants.d.ts → constants.d.ts} +0 -0
- /package/dist/{esm/src/constants.js → constants.js} +0 -0
- /package/dist/{esm/src/create-input-schema.js → create-input-schema.js} +0 -0
- /package/dist/{esm/src/enum.js → enum.js} +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.10.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.11.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.12.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.12.1.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.12.2.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.12.3.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.13.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.14.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.15.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.16.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.17.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.17.1.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.18.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.18.1.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.18.2.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.19.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.2.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.20.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.21.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.22.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.23.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.24.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.25.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.26.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.27.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.28.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.29.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.3.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.30.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.31.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.33.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.35.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.36.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.37.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.38.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.4.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.40.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.41.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.42.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.43.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.44.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.45.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.46.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.47.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.48.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.49.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.5.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.5.1.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.50.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.51.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.6.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.7.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.8.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.9.0.js +0 -0
- /package/dist/{types/src/migration → migration}/utils.d.ts +0 -0
- /package/dist/{esm/src/migration → migration}/utils.js +0 -0
- /package/dist/{esm/src/models → models}/query.js +0 -0
- /package/dist/{esm/src/models → models}/service.js +0 -0
- /package/dist/{types/src/patterns.d.ts → patterns.d.ts} +0 -0
- /package/dist/{types/src/project-schema → project-schema}/latest.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/latest.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v1.0.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v1.0.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.0.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.0.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.1.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.1.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.10.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.10.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.11.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.11.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.12.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.12.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.12.1.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.12.1.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.12.2.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.12.2.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.12.3.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.12.3.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.13.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.13.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.13.1.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.13.1.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.14.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.14.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.15.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.15.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.16.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.16.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.17.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.17.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.17.1.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.17.1.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.18.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.18.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.18.1.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.18.1.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.18.2.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.18.2.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.19.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.19.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.2.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.2.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.20.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.20.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.21.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.21.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.22.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.22.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.23.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.23.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.24.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.24.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.25.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.25.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.26.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.26.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.27.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.27.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.28.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.28.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.29.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.29.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.3.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.3.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.30.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.30.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.31.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.31.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.32.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.32.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.33.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.33.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.34.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.34.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.35.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.35.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.36.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.36.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.37.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.37.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.38.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.38.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.39.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.39.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.4.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.4.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.40.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.40.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.41.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.41.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.42.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.42.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.43.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.43.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.44.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.44.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.45.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.45.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.46.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.46.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.47.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.47.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.48.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.48.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.49.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.49.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.5.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.5.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.5.1.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.5.1.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.50.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.50.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.51.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.51.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.6.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.6.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.7.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.7.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.8.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.8.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.9.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.9.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v4.0.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v4.0.0.js +0 -0
- /package/dist/{types/src/scalars.d.ts → scalars.d.ts} +0 -0
- /package/dist/{esm/src/scalars.js → scalars.js} +0 -0
- /package/dist/{types/src/schemas → schemas}/index.d.ts +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/experimental.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/latest.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v1.0.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.0.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.1.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.2.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.3.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.4.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.5.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.5.1.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.6.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.7.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.8.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.9.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v1.0.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.0.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.1.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.10.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.11.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.12.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.12.1.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.12.2.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.12.3.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.13.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.14.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.15.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.16.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.17.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.17.1.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.18.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.18.1.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.18.2.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.19.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.2.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.20.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.21.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.22.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.23.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.24.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.25.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.26.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.27.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.28.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.29.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.3.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.30.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.31.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.32.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.33.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.34.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.35.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.36.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.37.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.38.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.39.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.4.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.40.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.41.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.42.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.43.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.44.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.45.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.46.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.47.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.48.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.49.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.5.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.5.1.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.50.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.51.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.6.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.7.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.8.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.9.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v4.0.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema.json +0 -0
- /package/dist/{types/src/services → services}/types.d.ts +0 -0
- /package/dist/{esm/src/services → services}/util.js +0 -0
- /package/dist/{esm/src/template-shapes → template-shapes}/index.js +0 -0
- /package/dist/{esm/src/template-shapes → template-shapes}/names.js +0 -0
- /package/dist/{esm/src/template-shapes → template-shapes}/types.js +0 -0
- /package/dist/{esm/src/types → types}/types.js +0 -0
- /package/dist/{esm/src/util → util}/ai-tools.js +0 -0
- /package/dist/{esm/src/util → util}/find-shape-at-path.js +0 -0
- /package/dist/{esm/src/util → util}/patch-schema.js +0 -0
- /package/dist/{esm/src/util → util}/shapes.js +0 -0
|
@@ -1,313 +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.isObjectSchemaV4_0_0 = isObjectSchemaV4_0_0;
|
|
7
|
-
exports.getAllRefsInShapes = getAllRefsInShapes;
|
|
8
|
-
exports.getAllRefsInQuery = getAllRefsInQuery;
|
|
9
|
-
exports.getAllRefsInQueries = getAllRefsInQueries;
|
|
10
|
-
exports.getAllRefs = getAllRefs;
|
|
11
|
-
exports.collectReferencedShapeNames = collectReferencedShapeNames;
|
|
12
|
-
exports.flattenSchema = flattenSchema;
|
|
13
|
-
const util_1 = require("@takeshape/util");
|
|
14
|
-
const set_js_1 = __importDefault(require("lodash/set.js"));
|
|
15
|
-
const uniq_js_1 = __importDefault(require("lodash/uniq.js"));
|
|
16
|
-
const minimatch_1 = __importDefault(require("minimatch"));
|
|
17
|
-
const refs_1 = require("../refs");
|
|
18
|
-
const refs_2 = require("./refs");
|
|
19
|
-
const type_utils_1 = require("./type-utils");
|
|
20
|
-
const visitor_1 = require("./visitor");
|
|
21
|
-
const layerDefaults = {
|
|
22
|
-
namespace: '',
|
|
23
|
-
visibility: []
|
|
24
|
-
};
|
|
25
|
-
function filterMap(prefix, fields, filters) {
|
|
26
|
-
const result = {};
|
|
27
|
-
for (const [name, value] of Object.entries(fields)) {
|
|
28
|
-
for (const filter of filters) {
|
|
29
|
-
if ((0, minimatch_1.default)(`${prefix}.${name}`, filter)) {
|
|
30
|
-
result[name] = value;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
return result;
|
|
35
|
-
}
|
|
36
|
-
function filterLayer(layerSchema, filters) {
|
|
37
|
-
return {
|
|
38
|
-
...layerSchema,
|
|
39
|
-
queries: filterMap('queries', layerSchema.queries ?? {}, filters),
|
|
40
|
-
mutations: filterMap('mutations', layerSchema.mutations ?? {}, filters),
|
|
41
|
-
shapes: filterMap('shapes', layerSchema.shapes ?? {}, filters),
|
|
42
|
-
workflows: filterMap('workflows', layerSchema.workflows ?? {}, filters)
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
// TODO use non-versioned util eventually
|
|
46
|
-
function isObjectSchemaV4_0_0(maybeObjectSchema) {
|
|
47
|
-
return maybeObjectSchema.type === 'object' && (0, util_1.isRecord)(maybeObjectSchema.properties);
|
|
48
|
-
}
|
|
49
|
-
function mergeShape(a, b) {
|
|
50
|
-
if (b.override === 'extend') {
|
|
51
|
-
if (isObjectSchemaV4_0_0(a.schema) && isObjectSchemaV4_0_0(b.schema)) {
|
|
52
|
-
const combinedRequired = (0, uniq_js_1.default)((a.schema.required ?? []).concat(b.schema.required ?? []));
|
|
53
|
-
const combinedSchema = {
|
|
54
|
-
type: 'object',
|
|
55
|
-
properties: {
|
|
56
|
-
...a.schema.properties,
|
|
57
|
-
...b.schema.properties
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
if (combinedRequired.length) {
|
|
61
|
-
combinedSchema.required = combinedRequired;
|
|
62
|
-
}
|
|
63
|
-
return { ...a, ...b, schema: combinedSchema };
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
return b;
|
|
67
|
-
}
|
|
68
|
-
function assignShapes(flattenedShapes, layerShapes) {
|
|
69
|
-
for (const [shapeName, shape] of Object.entries(layerShapes)) {
|
|
70
|
-
flattenedShapes[shapeName] = flattenedShapes[shapeName] ? mergeShape(flattenedShapes[shapeName], shape) : shape;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
function addRef(refs, ref, predicate) {
|
|
74
|
-
if (ref && (!predicate || predicate(ref))) {
|
|
75
|
-
refs.push(ref);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Walk through a `ProjectSchema` and collect all the `ref`s.
|
|
80
|
-
*/
|
|
81
|
-
function getAllRefsInShapes(shapes, predicate) {
|
|
82
|
-
const items = [];
|
|
83
|
-
const shapeVisitor = (schema, schemaPath) => {
|
|
84
|
-
if (schema['@args'] && typeof schema['@args'] === 'object') {
|
|
85
|
-
(0, visitor_1.visitSchemaProperties)(schema['@args'], schemaPath.concat(['@args']), (argSchema, argPath) => {
|
|
86
|
-
addRef(items, (0, refs_2.getRefOrItemsRef)(argSchema, argPath), predicate);
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
addRef(items, (0, refs_2.getArgsReferenceWithPath)(schema, schemaPath), predicate);
|
|
90
|
-
const newPath = schema.items ? schemaPath.concat('items') : schemaPath;
|
|
91
|
-
const newSchema = schema.items ?? schema;
|
|
92
|
-
if ((0, type_utils_1.isRefSchema)(newSchema)) {
|
|
93
|
-
addRef(items, (0, refs_2.getRefOrItemsRef)(newSchema, newPath), predicate);
|
|
94
|
-
}
|
|
95
|
-
else if ((0, type_utils_1.isObjectSchema)(newSchema) || (0, type_utils_1.isAllOfSchema)(newSchema) || (0, type_utils_1.isOneOfSchema)(newSchema)) {
|
|
96
|
-
(0, visitor_1.visitSchemaProperties)(newSchema, newPath, shapeVisitor);
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
for (const [shapeName, shape] of Object.entries(shapes)) {
|
|
100
|
-
(0, visitor_1.visitSchemaProperties)(shape.schema, ['shapes', shapeName, 'schema'], shapeVisitor);
|
|
101
|
-
}
|
|
102
|
-
return items;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Get all refs
|
|
106
|
-
*/
|
|
107
|
-
function getAllRefsInQuery(shapes, queryPath, query, predicate) {
|
|
108
|
-
const refItems = [];
|
|
109
|
-
const propertyVisitor = (propSchema, propSchemaPath) => {
|
|
110
|
-
addRef(refItems, (0, refs_2.getRefOrItemsRef)(propSchema, propSchemaPath), predicate);
|
|
111
|
-
};
|
|
112
|
-
if (query.args && typeof query.args === 'string') {
|
|
113
|
-
addRef(refItems, (0, refs_2.getArgsReferenceWithPath)(query, queryPath), predicate);
|
|
114
|
-
}
|
|
115
|
-
if (query.args && typeof query.args === 'object') {
|
|
116
|
-
(0, visitor_1.visitSchemaProperties)((0, refs_2.dereferenceSchema)(shapes, query.args), queryPath, propertyVisitor);
|
|
117
|
-
}
|
|
118
|
-
if (query.shape) {
|
|
119
|
-
const refItem = (0, refs_2.parseReturnShape)(query.shape).ref;
|
|
120
|
-
if (refItem) {
|
|
121
|
-
addRef(refItems, {
|
|
122
|
-
...refItem,
|
|
123
|
-
path: queryPath.concat(['shape'])
|
|
124
|
-
}, predicate);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
return refItems;
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* Collect refs from `queries` or `mutations`.
|
|
131
|
-
*/
|
|
132
|
-
function getAllRefsInQueries(context, rootPropertyName, predicate) {
|
|
133
|
-
const refItems = [];
|
|
134
|
-
const rootPath = [rootPropertyName];
|
|
135
|
-
for (const [queryName, query] of Object.entries(context[rootPropertyName])) {
|
|
136
|
-
const queryPath = rootPath.concat([queryName]);
|
|
137
|
-
const queryRefs = getAllRefsInQuery(context.shapes, queryPath, query, predicate);
|
|
138
|
-
if (queryRefs.length) {
|
|
139
|
-
refItems.push(...queryRefs);
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
return refItems;
|
|
143
|
-
}
|
|
144
|
-
/**
|
|
145
|
-
* Get all refs in a ProjectSchema
|
|
146
|
-
* @param predicate return true to include the ref in
|
|
147
|
-
*/
|
|
148
|
-
function getAllRefs(projectSchema, predicate) {
|
|
149
|
-
return [
|
|
150
|
-
...getAllRefsInShapes(projectSchema.shapes, predicate),
|
|
151
|
-
...getAllRefsInQueries(projectSchema, 'queries', predicate),
|
|
152
|
-
...getAllRefsInQueries(projectSchema, 'mutations', predicate)
|
|
153
|
-
];
|
|
154
|
-
}
|
|
155
|
-
function collectReferencedShapeNames(layerId, refSet) {
|
|
156
|
-
const addLayerId = (ref) => ({ ...ref, layerId });
|
|
157
|
-
const collect = (schema) => {
|
|
158
|
-
const args = schema['@args'];
|
|
159
|
-
if (args && typeof args === 'object') {
|
|
160
|
-
Object.values(args.properties).forEach(collect);
|
|
161
|
-
}
|
|
162
|
-
const argsRefItem = (0, refs_2.getArgsReferenceWithPath)(schema);
|
|
163
|
-
if (argsRefItem) {
|
|
164
|
-
refSet.add((0, refs_2.refItemToString)(addLayerId(argsRefItem)));
|
|
165
|
-
}
|
|
166
|
-
const refItem = (0, refs_2.getRefOrItemsRef)(schema);
|
|
167
|
-
if (refItem) {
|
|
168
|
-
refSet.add((0, refs_2.refItemToString)(addLayerId(refItem)));
|
|
169
|
-
}
|
|
170
|
-
};
|
|
171
|
-
return collect;
|
|
172
|
-
}
|
|
173
|
-
function collectServiceRefs(flattenedSchema, getLayer) {
|
|
174
|
-
const refs = new Set(getAllRefs(flattenedSchema, (refItem) => refItem.layerId !== 'local').map(refs_2.refItemToString));
|
|
175
|
-
if (refs.size) {
|
|
176
|
-
for (const ref of refs) {
|
|
177
|
-
const [layerId, shapeName] = (0, refs_2.splitAtRef)(ref);
|
|
178
|
-
if (layerId !== 'local') {
|
|
179
|
-
const layer = getLayer(layerId);
|
|
180
|
-
const shape = layer?.shapes?.[shapeName];
|
|
181
|
-
if (shape) {
|
|
182
|
-
(0, visitor_1.visitSchemaProperties)(shape.schema, ['schema'], collectReferencedShapeNames(layerId, refs));
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
return refs;
|
|
188
|
-
}
|
|
189
|
-
function ensureServiceLayer(flattenedSchema, layerId) {
|
|
190
|
-
flattenedSchema.serviceLayers ||= {};
|
|
191
|
-
let serviceLayer = flattenedSchema.serviceLayers[layerId];
|
|
192
|
-
if (!serviceLayer) {
|
|
193
|
-
serviceLayer = {
|
|
194
|
-
layerId,
|
|
195
|
-
schemaVersion: '4.0.0',
|
|
196
|
-
shapes: {},
|
|
197
|
-
queries: {},
|
|
198
|
-
mutations: {}
|
|
199
|
-
};
|
|
200
|
-
flattenedSchema.serviceLayers[layerId] = serviceLayer;
|
|
201
|
-
}
|
|
202
|
-
return serviceLayer;
|
|
203
|
-
}
|
|
204
|
-
function rewriteLayerId(localShapes, layerId, query) {
|
|
205
|
-
const newQuery = (0, util_1.deepClone)(query);
|
|
206
|
-
const propertyVisitor = (propSchema, propSchemaPath) => {
|
|
207
|
-
const ref = (propSchema.items ?? propSchema)['@ref'];
|
|
208
|
-
if (ref) {
|
|
209
|
-
const [argsLayerId, shapeName] = (0, refs_2.splitAtRef)(ref);
|
|
210
|
-
if (argsLayerId === 'local' && !localShapes[shapeName]) {
|
|
211
|
-
const path = propSchemaPath.concat(propSchema.items ? ['items', '@ref'] : ['@ref']);
|
|
212
|
-
(0, set_js_1.default)(newQuery, path, `${layerId}:${shapeName}`);
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
};
|
|
216
|
-
if (query.args) {
|
|
217
|
-
if (typeof query.args === 'string') {
|
|
218
|
-
const [argsLayerId, shapeName] = (0, refs_2.splitAtRef)((0, refs_1.parseTemplateShape)(query.args).shapeName);
|
|
219
|
-
if (argsLayerId === 'local' && !localShapes[shapeName]) {
|
|
220
|
-
newQuery.args = `${layerId}:${shapeName}`;
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
else {
|
|
224
|
-
(0, visitor_1.visitSchemaProperties)(query.args, ['args'], propertyVisitor);
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
if (typeof query.shape === 'string') {
|
|
228
|
-
const [argsLayerId, shapeName] = (0, refs_2.splitAtRef)((0, refs_1.parseTemplateShape)(query.shape).shapeName);
|
|
229
|
-
if (argsLayerId === 'local' && !localShapes[shapeName]) {
|
|
230
|
-
newQuery.shape = `${layerId}:${shapeName}`;
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
else {
|
|
234
|
-
const ref = query.shape.items['@ref'];
|
|
235
|
-
if (ref) {
|
|
236
|
-
const [argsLayerId, shapeName] = (0, refs_2.splitAtRef)(ref);
|
|
237
|
-
if (argsLayerId === 'local' && !localShapes[shapeName]) {
|
|
238
|
-
(0, set_js_1.default)(newQuery, ['shape', 'items', '@ref'], `${layerId}:${shapeName}`);
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
return newQuery;
|
|
243
|
-
}
|
|
244
|
-
function assignQueries(localShapes, queries, layerId, layerQueries) {
|
|
245
|
-
for (const [queryName, query] of Object.entries(layerQueries)) {
|
|
246
|
-
queries[queryName] = rewriteLayerId(localShapes, layerId, query);
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
function flattenSchema(projectSchema, getLayer) {
|
|
250
|
-
const { layers, ...rest } = projectSchema;
|
|
251
|
-
const flattenedSchema = {
|
|
252
|
-
...rest,
|
|
253
|
-
shapes: {},
|
|
254
|
-
queries: {},
|
|
255
|
-
mutations: {},
|
|
256
|
-
workflows: {},
|
|
257
|
-
forms: {}
|
|
258
|
-
};
|
|
259
|
-
const filteredLayers = layers
|
|
260
|
-
.reverse()
|
|
261
|
-
.map((layer) => {
|
|
262
|
-
const config = typeof layer === 'string' ? { ...layerDefaults, id: layer } : layer;
|
|
263
|
-
const layerSchema = getLayer(config.id);
|
|
264
|
-
if (!layerSchema) {
|
|
265
|
-
throw new Error(`Unable to flatten schema for project ${projectSchema.projectId}. Cannot get layer ${config.id}`);
|
|
266
|
-
}
|
|
267
|
-
return config.visibility?.length ? filterLayer(layerSchema, config.visibility) : undefined;
|
|
268
|
-
})
|
|
269
|
-
.filter(util_1.isDefined);
|
|
270
|
-
for (const filteredLayer of filteredLayers) {
|
|
271
|
-
const { layerId } = filteredLayer;
|
|
272
|
-
// Preserve original queries
|
|
273
|
-
if (projectSchema.services?.[layerId]) {
|
|
274
|
-
const serviceLayer = ensureServiceLayer(flattenedSchema, layerId);
|
|
275
|
-
if (serviceLayer.queries && filteredLayer.queries) {
|
|
276
|
-
Object.assign(serviceLayer.queries, filteredLayer.queries);
|
|
277
|
-
}
|
|
278
|
-
if (serviceLayer.mutations && filteredLayer.mutations) {
|
|
279
|
-
Object.assign(serviceLayer.mutations, filteredLayer.mutations);
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
if (filteredLayer.workflows) {
|
|
283
|
-
Object.assign(flattenedSchema.workflows, filteredLayer.workflows);
|
|
284
|
-
}
|
|
285
|
-
if (flattenedSchema.forms && filteredLayer.forms) {
|
|
286
|
-
Object.assign(flattenedSchema.forms, filteredLayer.forms);
|
|
287
|
-
}
|
|
288
|
-
if (filteredLayer.shapes) {
|
|
289
|
-
assignShapes(flattenedSchema.shapes, filteredLayer.shapes);
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
for (const filteredLayer of filteredLayers) {
|
|
293
|
-
if (filteredLayer.queries) {
|
|
294
|
-
assignQueries(flattenedSchema.shapes, flattenedSchema.queries, filteredLayer.layerId, filteredLayer.queries);
|
|
295
|
-
}
|
|
296
|
-
if (filteredLayer.mutations) {
|
|
297
|
-
assignQueries(flattenedSchema.shapes, flattenedSchema.mutations, filteredLayer.layerId, filteredLayer.mutations);
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
// Preserve original service schema shapes
|
|
301
|
-
for (const refStr of collectServiceRefs(flattenedSchema, getLayer)) {
|
|
302
|
-
const [layerId, shapeName] = (0, refs_2.splitAtRef)(refStr);
|
|
303
|
-
if (layerId !== 'local') {
|
|
304
|
-
const shape = getLayer(layerId)?.shapes?.[shapeName];
|
|
305
|
-
if (shape) {
|
|
306
|
-
const serviceLayer = ensureServiceLayer(flattenedSchema, layerId);
|
|
307
|
-
serviceLayer.shapes ||= {};
|
|
308
|
-
serviceLayer.shapes[shapeName] = shape;
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
return flattenedSchema;
|
|
313
|
-
}
|
|
@@ -1,243 +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 = void 0;
|
|
7
|
-
exports.refExpressionToRefItem = refExpressionToRefItem;
|
|
8
|
-
exports.refExpressionToShape = refExpressionToShape;
|
|
9
|
-
exports.splitAtRef = splitAtRef;
|
|
10
|
-
exports.atRefToRefItem = atRefToRefItem;
|
|
11
|
-
exports.getRef = getRef;
|
|
12
|
-
exports.getRefWithPath = getRefWithPath;
|
|
13
|
-
exports.hasRefProperty = hasRefProperty;
|
|
14
|
-
exports.getRefOrItemsRef = getRefOrItemsRef;
|
|
15
|
-
exports.refItemToString = refItemToString;
|
|
16
|
-
exports.refItemToShape = refItemToShape;
|
|
17
|
-
exports.followRef = followRef;
|
|
18
|
-
exports.hasRef = hasRef;
|
|
19
|
-
exports.hasResolvableRef = hasResolvableRef;
|
|
20
|
-
exports.getArgsReferenceWithPath = getArgsReferenceWithPath;
|
|
21
|
-
exports.dereferenceSchema = dereferenceSchema;
|
|
22
|
-
exports.parseReturnShape = parseReturnShape;
|
|
23
|
-
const util_1 = require("@takeshape/util");
|
|
24
|
-
const assign_js_1 = __importDefault(require("lodash/fp/assign.js"));
|
|
25
|
-
const omit_js_1 = __importDefault(require("lodash/fp/omit.js"));
|
|
26
|
-
const isEmpty_js_1 = __importDefault(require("lodash/isEmpty.js"));
|
|
27
|
-
const refs_1 = require("../refs");
|
|
28
|
-
const type_utils_1 = require("./type-utils");
|
|
29
|
-
/**
|
|
30
|
-
* Safely turn a "template" shape reference (`@args`, `args`, `shape`) into a `RefItem`
|
|
31
|
-
*
|
|
32
|
-
* @param context A partial project schema
|
|
33
|
-
* @param refExpression
|
|
34
|
-
* A ref expression might include "template" name and refer to a local or remote
|
|
35
|
-
* shape, `Foo` or `CreateArgs<Foo>` or `CreateArgs<remote:Foo>`.*
|
|
36
|
-
*/
|
|
37
|
-
function refExpressionToRefItem(refExpression) {
|
|
38
|
-
const { shapeName, template } = (0, refs_1.parseTemplateShape)(refExpression);
|
|
39
|
-
return atRefToRefItem(shapeName, template);
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Sugar for converting a `refExpression` directly into a shape, without the
|
|
43
|
-
* intermediate `refItem`.
|
|
44
|
-
*
|
|
45
|
-
* @param context A partial project schema
|
|
46
|
-
* @param refExpression
|
|
47
|
-
* A ref expression might include "template" name and refer to a local or remote
|
|
48
|
-
* shape, `Foo` or `CreateArgs<Foo>` or `CreateArgs<remote:Foo>`.
|
|
49
|
-
*/
|
|
50
|
-
function refExpressionToShape(shapes, refExpression) {
|
|
51
|
-
return refItemToShape(shapes, refExpressionToRefItem(refExpression));
|
|
52
|
-
}
|
|
53
|
-
/**
|
|
54
|
-
* Provided a service name and a referenced type. Supports 2 or 3 part
|
|
55
|
-
* references, e.g., `shopify:my-store:ProductInput` or `my-store:ProductInput`.
|
|
56
|
-
*
|
|
57
|
-
* @returns
|
|
58
|
-
* A 2 member array, where 0 is the service name, 1 is the referenced type.
|
|
59
|
-
*/
|
|
60
|
-
function splitAtRef(atRef) {
|
|
61
|
-
const refParts = atRef.split(':');
|
|
62
|
-
if (refParts.length === 1) {
|
|
63
|
-
return ['local', atRef];
|
|
64
|
-
}
|
|
65
|
-
if (refParts.length === 2) {
|
|
66
|
-
return [refParts[0], refParts[1]];
|
|
67
|
-
}
|
|
68
|
-
throw new Error(`Invalid ref string ${atRef}`);
|
|
69
|
-
}
|
|
70
|
-
/**
|
|
71
|
-
* Parses and returns a typeName, serviceKey, and potentially a namespace for
|
|
72
|
-
* the type.
|
|
73
|
-
*/
|
|
74
|
-
function atRefToRefItem(atRef, template) {
|
|
75
|
-
const [serviceKey, typeName] = splitAtRef(atRef);
|
|
76
|
-
return {
|
|
77
|
-
typeName,
|
|
78
|
-
layerId: serviceKey,
|
|
79
|
-
template
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Given a content schema and project schema, finds a `@ref` or `$ref` and
|
|
84
|
-
* returns a `RefItem` suitable for loading a referenced schema...
|
|
85
|
-
*/
|
|
86
|
-
function getRef(refSchema) {
|
|
87
|
-
if (refSchema['@ref']) {
|
|
88
|
-
// @ref: my-service:ShapeName
|
|
89
|
-
return atRefToRefItem(refSchema['@ref']);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
function getRefWithPath(refSchema, schemaPath = []) {
|
|
93
|
-
const refItem = getRef(refSchema);
|
|
94
|
-
if (refItem) {
|
|
95
|
-
return {
|
|
96
|
-
...refItem,
|
|
97
|
-
path: schemaPath.concat(['@ref'])
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Tests for a `@ref` or `$ref` property directly on the passed schema.
|
|
103
|
-
*
|
|
104
|
-
* @param schema Any schema that might could have a ref property.
|
|
105
|
-
*/
|
|
106
|
-
function hasRefProperty(schema) {
|
|
107
|
-
return Boolean(schema['@ref'] ?? schema.$ref);
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* From a schema with a ref, will return the top-level ref, and potentially
|
|
111
|
-
* a ref item from a nested `items` property.
|
|
112
|
-
*/
|
|
113
|
-
function getRefOrItemsRef(refSchema, schemaPath = []) {
|
|
114
|
-
const refItem = getRefWithPath(refSchema, schemaPath);
|
|
115
|
-
if (refItem) {
|
|
116
|
-
return refItem;
|
|
117
|
-
}
|
|
118
|
-
if (refSchema.items) {
|
|
119
|
-
return getRefOrItemsRef(refSchema.items, schemaPath.concat(['items']));
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Turns a `RefItem` into an `@ref`.
|
|
124
|
-
*/
|
|
125
|
-
function refItemToString(refItem) {
|
|
126
|
-
return `${refItem.layerId}:${refItem.typeName}`;
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Get a Shape referenced by a `RefItem`.
|
|
130
|
-
*/
|
|
131
|
-
function refItemToShape(shapes, refItem) {
|
|
132
|
-
return shapes[refItemToString(refItem)];
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
* Helper fn to omit `ref` props from the target schema, and then extend it with the source schema.
|
|
136
|
-
*/
|
|
137
|
-
const omitRefAndExtend = (targetSchema, sourceSchema) => (0, assign_js_1.default)((0, omit_js_1.default)(['@ref', '$ref'], targetSchema), sourceSchema);
|
|
138
|
-
exports.omitRefAndExtend = omitRefAndExtend;
|
|
139
|
-
/**
|
|
140
|
-
* If there is a $ref, this will insert a content schema from the top level
|
|
141
|
-
* in place of the reference.
|
|
142
|
-
*/
|
|
143
|
-
function followRef(shapes, contentSchema) {
|
|
144
|
-
const refItem = getRef(contentSchema);
|
|
145
|
-
if (refItem) {
|
|
146
|
-
const referencedSchema = refItemToShape(shapes, refItem)?.schema;
|
|
147
|
-
if (referencedSchema) {
|
|
148
|
-
return (0, exports.omitRefAndExtend)(contentSchema, referencedSchema);
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
return contentSchema;
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* Returns whether a schema has refs.
|
|
155
|
-
*/
|
|
156
|
-
function hasRef(contentSchema) {
|
|
157
|
-
if ((0, type_utils_1.isRefSchema)(contentSchema)) {
|
|
158
|
-
return true;
|
|
159
|
-
}
|
|
160
|
-
if ((0, type_utils_1.isAllOfSchema)(contentSchema)) {
|
|
161
|
-
return Boolean(contentSchema.allOf.find(hasRef));
|
|
162
|
-
}
|
|
163
|
-
if ((0, type_utils_1.isOneOfSchema)(contentSchema)) {
|
|
164
|
-
return Boolean(contentSchema.oneOf.find(hasRef));
|
|
165
|
-
}
|
|
166
|
-
return false;
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* Returns whether a schema has refs which can be followed.
|
|
170
|
-
*/
|
|
171
|
-
function hasResolvableRef(shapes, contentSchema) {
|
|
172
|
-
if ((0, type_utils_1.isRefSchema)(contentSchema)) {
|
|
173
|
-
return Boolean(refItemToShape(shapes, getRef(contentSchema)));
|
|
174
|
-
}
|
|
175
|
-
if ((0, type_utils_1.isAllOfSchema)(contentSchema)) {
|
|
176
|
-
return Boolean(contentSchema.allOf.find((s) => hasResolvableRef(shapes, s)));
|
|
177
|
-
}
|
|
178
|
-
if ((0, type_utils_1.isOneOfSchema)(contentSchema)) {
|
|
179
|
-
return Boolean(contentSchema.oneOf.find((s) => hasResolvableRef(shapes, s)));
|
|
180
|
-
}
|
|
181
|
-
return false;
|
|
182
|
-
}
|
|
183
|
-
function getArgsReferenceWithPath(argsSchema, schemaPath = []) {
|
|
184
|
-
const isQuery = 'args' in argsSchema;
|
|
185
|
-
const args = isQuery ? argsSchema.args : argsSchema['@args'];
|
|
186
|
-
const refItem = typeof args === 'string' ? refExpressionToRefItem(args) : undefined;
|
|
187
|
-
if (refItem) {
|
|
188
|
-
return {
|
|
189
|
-
...refItem,
|
|
190
|
-
path: schemaPath.concat([isQuery ? 'args' : '@args'])
|
|
191
|
-
};
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
/*
|
|
195
|
-
* Helper fn to omit `allOf` props from the target schema, and then extend it with the source schema.
|
|
196
|
-
*/
|
|
197
|
-
const omitAllOfAndExtend = (targetSchema, sourceSchema) => (0, assign_js_1.default)((0, omit_js_1.default)(['allOf'], targetSchema), sourceSchema);
|
|
198
|
-
function dereferenceSchema(shapes, shapeOrFieldSchema, schemaPath = []) {
|
|
199
|
-
const resolveAll = (resolveSchema, resolvePath) => {
|
|
200
|
-
try {
|
|
201
|
-
if ((0, type_utils_1.isAllOfSchema)(resolveSchema)) {
|
|
202
|
-
const allOfSchema = resolveSchema.allOf
|
|
203
|
-
.map((stub, index) => resolveAll(stub, [...resolvePath, 'allOf', index]))
|
|
204
|
-
.reduce((prev, curr) => (0, util_1.mergeWithArrayConcat)(prev, curr), {});
|
|
205
|
-
return (0, isEmpty_js_1.default)(allOfSchema) ? undefined : omitAllOfAndExtend(resolveSchema, allOfSchema);
|
|
206
|
-
}
|
|
207
|
-
if ((0, type_utils_1.isRefSchema)(resolveSchema)) {
|
|
208
|
-
const refItem = getRefWithPath(resolveSchema);
|
|
209
|
-
if (!refItem) {
|
|
210
|
-
throw new Error('ref could not be parsed');
|
|
211
|
-
}
|
|
212
|
-
const refSchema = refItemToShape(shapes, refItem);
|
|
213
|
-
if (refSchema) {
|
|
214
|
-
return resolveAll((0, exports.omitRefAndExtend)(resolveSchema, refSchema), refItem.path);
|
|
215
|
-
}
|
|
216
|
-
return;
|
|
217
|
-
}
|
|
218
|
-
return resolveSchema;
|
|
219
|
-
}
|
|
220
|
-
catch (err) {
|
|
221
|
-
throw new Error(`error at '${resolvePath.join('.')}', ${err.message}`);
|
|
222
|
-
}
|
|
223
|
-
};
|
|
224
|
-
return resolveAll(shapeOrFieldSchema, schemaPath) ?? shapeOrFieldSchema;
|
|
225
|
-
}
|
|
226
|
-
function parseReturnShape(shape) {
|
|
227
|
-
if (typeof shape === 'object') {
|
|
228
|
-
if ((0, type_utils_1.isRefSchema)(shape.items)) {
|
|
229
|
-
const ref = getRef(shape.items);
|
|
230
|
-
if (!ref) {
|
|
231
|
-
throw new Error(`Could not parse ${JSON.stringify(shape.items)}: invalid ref`);
|
|
232
|
-
}
|
|
233
|
-
return { isArray: true, ref, shapeName: refItemToString(ref) };
|
|
234
|
-
}
|
|
235
|
-
if (typeof shape.items.type !== 'string') {
|
|
236
|
-
throw new Error(`Could not parse ${JSON.stringify(shape.items)}: invalid type`);
|
|
237
|
-
}
|
|
238
|
-
return { isArray: true, shapeName: shape.items.type };
|
|
239
|
-
}
|
|
240
|
-
const ref = refExpressionToRefItem(shape);
|
|
241
|
-
const shapeName = refItemToString(ref);
|
|
242
|
-
return { isArray: false, shapeName, ref, template: ref.template };
|
|
243
|
-
}
|
|
@@ -1,145 +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.isBasicResolver = isBasicResolver;
|
|
7
|
-
exports.isComposeResolver = isComposeResolver;
|
|
8
|
-
exports.isTakeshapeResolver = isTakeshapeResolver;
|
|
9
|
-
exports.isGraphqlResolver = isGraphqlResolver;
|
|
10
|
-
exports.isRestResolver = isRestResolver;
|
|
11
|
-
exports.isAwsLambdaResolver = isAwsLambdaResolver;
|
|
12
|
-
exports.isUtilResolver = isUtilResolver;
|
|
13
|
-
exports.isDirectiveMappingMap = isDirectiveMappingMap;
|
|
14
|
-
exports.isDirectiveMappingArray = isDirectiveMappingArray;
|
|
15
|
-
exports.isDirectiveConfig = isDirectiveConfig;
|
|
16
|
-
exports.isParameterSerializeContentOptions = isParameterSerializeContentOptions;
|
|
17
|
-
exports.isParameterOp = isParameterOp;
|
|
18
|
-
exports.isParameterOpNested = isParameterOpNested;
|
|
19
|
-
exports.isParameterOpMapping = isParameterOpMapping;
|
|
20
|
-
exports.isParameterOpValue = isParameterOpValue;
|
|
21
|
-
exports.isParameterOpOp = isParameterOpOp;
|
|
22
|
-
exports.isParameterSerializeStyleOptions = isParameterSerializeStyleOptions;
|
|
23
|
-
exports.isRefSchema = isRefSchema;
|
|
24
|
-
exports.isAllOfSchema = isAllOfSchema;
|
|
25
|
-
exports.isOneOfSchema = isOneOfSchema;
|
|
26
|
-
exports.isArraySchema = isArraySchema;
|
|
27
|
-
exports.isObjectSchema = isObjectSchema;
|
|
28
|
-
const util_1 = require("@takeshape/util");
|
|
29
|
-
const isArray_js_1 = __importDefault(require("lodash/isArray.js"));
|
|
30
|
-
const isPlainObject_js_1 = __importDefault(require("lodash/isPlainObject.js"));
|
|
31
|
-
const isString_js_1 = __importDefault(require("lodash/isString.js"));
|
|
32
|
-
const schemas_1 = require("../schemas");
|
|
33
|
-
/** Resolver Type Utils **/
|
|
34
|
-
/**
|
|
35
|
-
* Only tests that the shape is right, not that the name is correct. That's a job for the validator.
|
|
36
|
-
*/
|
|
37
|
-
function isBasicResolver(resolver) {
|
|
38
|
-
return (0, isString_js_1.default)(resolver?.name) && (0, isString_js_1.default)(resolver.service);
|
|
39
|
-
}
|
|
40
|
-
function isComposeResolver(resolver) {
|
|
41
|
-
return Boolean((0, isArray_js_1.default)(resolver?.compose) &&
|
|
42
|
-
resolver.compose.length &&
|
|
43
|
-
resolver.compose.every(isBasicResolver));
|
|
44
|
-
}
|
|
45
|
-
const { definitions: { takeshapeResolver, utilResolver, graphqlResolver, restResolver, awsLambdaResolver } } = schemas_1.latestSchemaJson;
|
|
46
|
-
function isTakeshapeResolver(resolver) {
|
|
47
|
-
return takeshapeResolver.properties.name.enum.includes(resolver.name);
|
|
48
|
-
}
|
|
49
|
-
function isGraphqlResolver(resolver) {
|
|
50
|
-
return graphqlResolver.properties.name.enum.includes(resolver.name);
|
|
51
|
-
}
|
|
52
|
-
function isRestResolver(resolver) {
|
|
53
|
-
return restResolver.properties.name.enum.includes(resolver.name);
|
|
54
|
-
}
|
|
55
|
-
function isAwsLambdaResolver(resolver) {
|
|
56
|
-
return awsLambdaResolver.properties.name.enum.includes(resolver.name);
|
|
57
|
-
}
|
|
58
|
-
function isUtilResolver(resolver) {
|
|
59
|
-
return utilResolver.properties.name.enum.includes(resolver.name);
|
|
60
|
-
}
|
|
61
|
-
/** Directive Mapping Utils **/
|
|
62
|
-
/**
|
|
63
|
-
* Determine whether the ambiguous Directive structure is a DirectiveMappingMap
|
|
64
|
-
*/
|
|
65
|
-
function isDirectiveMappingMap(maybeMap) {
|
|
66
|
-
return (0, isPlainObject_js_1.default)(maybeMap) && Object.keys(maybeMap).length > 0;
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Determine whether the ambiguous Directive structure is a DirectiveMappingArray
|
|
70
|
-
*/
|
|
71
|
-
function isDirectiveMappingArray(maybeArray) {
|
|
72
|
-
return (0, isArray_js_1.default)(maybeArray) && (0, isArray_js_1.default)(maybeArray[0]) && (0, isString_js_1.default)(maybeArray[0][0]) && (0, isArray_js_1.default)(maybeArray[0][1]);
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Determine whether the ambiguous Directive structure is a DirectiveConfig array
|
|
76
|
-
*/
|
|
77
|
-
function isDirectiveConfig(maybeConfig) {
|
|
78
|
-
return (0, isArray_js_1.default)(maybeConfig) && (0, isArray_js_1.default)(maybeConfig[0]) && (0, isString_js_1.default)(maybeConfig[0][0]) && (0, util_1.isRecord)(maybeConfig[0][1]);
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Determine whether a ParameterSerializeOption is a content type serializer
|
|
82
|
-
*/
|
|
83
|
-
function isParameterSerializeContentOptions(maybeContent) {
|
|
84
|
-
return Boolean('contentType' in maybeContent && maybeContent.contentType);
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Determine whether an unknown variable is a `ParameterOp`
|
|
88
|
-
*/
|
|
89
|
-
function isParameterOp(maybeOp) {
|
|
90
|
-
const op = maybeOp;
|
|
91
|
-
if (!op.path) {
|
|
92
|
-
return false;
|
|
93
|
-
}
|
|
94
|
-
return isParameterOpNested(op) || isParameterOpMapping(op) || isParameterOpValue(op) || isParameterOpOp(op);
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Determine whether a `ParameterOp` is a `ParameterOpNested`
|
|
98
|
-
*/
|
|
99
|
-
function isParameterOpNested(maybeOp) {
|
|
100
|
-
return Boolean('ops' in maybeOp && maybeOp.ops);
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Determine whether a `ParameterOp` is a `ParameterOpMapping`
|
|
104
|
-
*/
|
|
105
|
-
function isParameterOpMapping(maybeOp) {
|
|
106
|
-
return Boolean('mapping' in maybeOp && maybeOp.mapping);
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Determine whether a `ParameterOp` is a `ParameterOpMapping`
|
|
110
|
-
*/
|
|
111
|
-
function isParameterOpValue(maybeOp) {
|
|
112
|
-
return Boolean('value' in maybeOp && maybeOp.value);
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Determine whether a `ParameterOp` is a `ParameterOpOp`
|
|
116
|
-
*/
|
|
117
|
-
function isParameterOpOp(maybeOp) {
|
|
118
|
-
const op = maybeOp;
|
|
119
|
-
if (!op.op) {
|
|
120
|
-
return false;
|
|
121
|
-
}
|
|
122
|
-
return !(isParameterOpNested(op) || isParameterOpMapping(op) || isParameterOpValue(op));
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Determine whether a ParameterSerializeOption is a style serializer
|
|
126
|
-
*/
|
|
127
|
-
function isParameterSerializeStyleOptions(maybeStyle) {
|
|
128
|
-
return Boolean('style' in maybeStyle && maybeStyle.style);
|
|
129
|
-
}
|
|
130
|
-
/** Typeguards for different types of shape schemas **/
|
|
131
|
-
function isRefSchema(maybeRefSchema) {
|
|
132
|
-
return (0, isString_js_1.default)(maybeRefSchema['@ref']) || (0, isString_js_1.default)(maybeRefSchema.$ref);
|
|
133
|
-
}
|
|
134
|
-
function isAllOfSchema(schema) {
|
|
135
|
-
return (0, isArray_js_1.default)(schema.allOf);
|
|
136
|
-
}
|
|
137
|
-
function isOneOfSchema(schema) {
|
|
138
|
-
return (0, isArray_js_1.default)(schema.oneOf);
|
|
139
|
-
}
|
|
140
|
-
function isArraySchema(schema) {
|
|
141
|
-
return schema.type === 'array' && (0, util_1.isRecord)(schema.items);
|
|
142
|
-
}
|
|
143
|
-
function isObjectSchema(schema) {
|
|
144
|
-
return schema.type === 'object' && (0, util_1.isRecord)(schema.properties);
|
|
145
|
-
}
|