@takeshape/schema 11.52.0 → 11.55.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__tests__/_examples.test.js +77 -0
- package/dist/__tests__/agents.test.js +163 -0
- package/dist/__tests__/api-version.test.js +24 -0
- package/dist/__tests__/builtin-schema.test.js +18 -0
- package/dist/__tests__/content-schema-transform.test.d.ts +1 -0
- package/dist/__tests__/content-schema-transform.test.js +522 -0
- package/dist/__tests__/create-input-schema.test.d.ts +1 -0
- package/dist/__tests__/create-input-schema.test.js +184 -0
- package/dist/__tests__/enum.test.d.ts +1 -0
- package/dist/__tests__/enum.test.js +36 -0
- package/dist/__tests__/flatten-templates.test.d.ts +1 -0
- package/dist/__tests__/flatten-templates.test.js +40 -0
- package/dist/__tests__/get-is-leaf.test.d.ts +1 -0
- package/dist/__tests__/get-is-leaf.test.js +50 -0
- package/dist/__tests__/interfaces.test.d.ts +1 -0
- package/dist/__tests__/interfaces.test.js +219 -0
- package/dist/__tests__/migration.test.d.ts +1 -0
- package/dist/__tests__/migration.test.js +34 -0
- package/dist/__tests__/mocks.test.d.ts +1 -0
- package/dist/__tests__/mocks.test.js +24 -0
- package/dist/__tests__/refs.test.d.ts +1 -0
- package/dist/__tests__/refs.test.js +752 -0
- package/dist/__tests__/relationships.test.d.ts +1 -0
- package/dist/__tests__/relationships.test.js +638 -0
- package/dist/__tests__/schema-transform.test.d.ts +1 -0
- package/dist/__tests__/schema-transform.test.js +205 -0
- package/dist/__tests__/schema-util.test.d.ts +1 -0
- package/dist/__tests__/schema-util.test.js +1731 -0
- package/dist/__tests__/service-dependencies.test.d.ts +1 -0
- package/dist/__tests__/service-dependencies.test.js +360 -0
- package/dist/__tests__/unions.test.d.ts +1 -0
- package/dist/__tests__/unions.test.js +44 -0
- package/dist/__tests__/validate.test.d.ts +1 -0
- package/dist/__tests__/validate.test.js +1926 -0
- package/dist/__tests__/workflows.test.d.ts +3 -0
- package/dist/__tests__/workflows.test.js +149 -0
- package/dist/agents.d.ts +14 -0
- package/dist/auth-schemas.d.ts +125 -0
- package/dist/builtin-schema.d.ts +8 -0
- package/dist/content-schema-transform.d.ts +35 -0
- package/dist/content-schema-transform.js +162 -0
- package/dist/create-input-schema.d.ts +9 -0
- package/dist/enum.d.ts +2 -0
- package/dist/flatten-templates.d.ts +2 -0
- package/dist/flatten-templates.js +20 -0
- package/dist/get-is-leaf.d.ts +3 -0
- package/dist/get-is-leaf.js +56 -0
- package/dist/index.d.ts +48 -0
- package/dist/index.js +46 -0
- package/dist/interfaces.d.ts +12 -0
- package/dist/interfaces.js +85 -0
- package/dist/layers/__tests__/layers.test.d.ts +1 -0
- package/dist/layers/__tests__/layers.test.js +38 -0
- package/dist/layers/layers.d.ts +26 -0
- package/dist/layers/layers.js +301 -0
- package/dist/layers/refs.d.ts +102 -0
- package/dist/layers/refs.js +220 -0
- package/dist/layers/type-utils.d.ts +59 -0
- package/dist/layers/type-utils.js +118 -0
- package/dist/layers/visitor.d.ts +5 -0
- package/dist/layers/visitor.js +38 -0
- package/dist/migration/index.d.ts +64 -0
- package/dist/migration/index.js +122 -0
- package/dist/migration/to/__tests__/v3.10.0.test.d.ts +1 -0
- package/dist/migration/to/__tests__/v3.10.0.test.js +90 -0
- package/dist/migration/to/__tests__/v3.12.3.test.d.ts +1 -0
- package/dist/migration/to/__tests__/v3.12.3.test.js +103 -0
- package/dist/migration/to/__tests__/v3.17.test.d.ts +1 -0
- package/dist/migration/to/__tests__/v3.17.test.js +71 -0
- package/dist/migration/to/__tests__/v3.34.0.test.d.ts +1 -0
- package/dist/migration/to/__tests__/v3.34.0.test.js +240 -0
- package/dist/migration/to/__tests__/v3.39.0.test.d.ts +1 -0
- package/dist/migration/to/__tests__/v3.39.0.test.js +116 -0
- package/dist/migration/to/__tests__/v3.46.0.test.d.ts +1 -0
- package/dist/migration/to/__tests__/v3.46.0.test.js +59 -0
- package/dist/migration/to/v3.0.0.d.ts +4 -0
- package/dist/migration/to/v3.0.0.js +212 -0
- package/dist/migration/to/v3.1.0.d.ts +4 -0
- package/dist/migration/to/v3.1.0.js +194 -0
- package/dist/migration/to/v3.10.0.d.ts +4 -0
- package/dist/migration/to/v3.11.0.d.ts +4 -0
- package/dist/migration/to/v3.12.0.d.ts +4 -0
- package/dist/migration/to/v3.12.1.d.ts +4 -0
- package/dist/migration/to/v3.12.2.d.ts +4 -0
- package/dist/migration/to/v3.12.3.d.ts +4 -0
- package/dist/migration/to/v3.13.0.d.ts +4 -0
- package/dist/migration/to/v3.14.0.d.ts +4 -0
- package/dist/migration/to/v3.15.0.d.ts +4 -0
- package/dist/migration/to/v3.16.0.d.ts +4 -0
- package/dist/migration/to/v3.17.0.d.ts +4 -0
- package/dist/migration/to/v3.17.1.d.ts +4 -0
- package/dist/migration/to/v3.18.0.d.ts +4 -0
- package/dist/migration/to/v3.18.1.d.ts +4 -0
- package/dist/migration/to/v3.18.2.d.ts +4 -0
- package/dist/migration/to/v3.19.0.d.ts +4 -0
- package/dist/migration/to/v3.2.0.d.ts +4 -0
- package/dist/migration/to/v3.20.0.d.ts +4 -0
- package/dist/migration/to/v3.21.0.d.ts +4 -0
- package/dist/migration/to/v3.22.0.d.ts +4 -0
- package/dist/migration/to/v3.23.0.d.ts +4 -0
- package/dist/migration/to/v3.24.0.d.ts +4 -0
- package/dist/migration/to/v3.25.0.d.ts +4 -0
- package/dist/migration/to/v3.26.0.d.ts +4 -0
- package/dist/migration/to/v3.27.0.d.ts +4 -0
- package/dist/migration/to/v3.28.0.d.ts +4 -0
- package/dist/migration/to/v3.29.0.d.ts +4 -0
- package/dist/migration/to/v3.3.0.d.ts +4 -0
- package/dist/migration/to/v3.30.0.d.ts +4 -0
- package/dist/migration/to/v3.31.0.d.ts +4 -0
- package/dist/migration/to/v3.32.0.d.ts +4 -0
- package/dist/migration/to/v3.32.0.js +59 -0
- package/dist/migration/to/v3.33.0.d.ts +4 -0
- package/dist/migration/to/v3.34.0.d.ts +6 -0
- package/dist/migration/to/v3.34.0.js +116 -0
- package/dist/migration/to/v3.35.0.d.ts +4 -0
- package/dist/migration/to/v3.36.0.d.ts +4 -0
- package/dist/migration/to/v3.37.0.d.ts +4 -0
- package/dist/migration/to/v3.38.0.d.ts +4 -0
- package/dist/migration/to/v3.39.0.d.ts +4 -0
- package/dist/migration/to/v3.39.0.js +45 -0
- package/dist/migration/to/v3.4.0.d.ts +4 -0
- package/dist/migration/to/v3.40.0.d.ts +4 -0
- package/dist/migration/to/v3.41.0.d.ts +4 -0
- package/dist/migration/to/v3.42.0.d.ts +4 -0
- package/dist/migration/to/v3.43.0.d.ts +4 -0
- package/dist/migration/to/v3.44.0.d.ts +4 -0
- package/dist/migration/to/v3.45.0.d.ts +4 -0
- package/dist/migration/to/v3.46.0.d.ts +4 -0
- package/dist/migration/to/v3.47.0.d.ts +4 -0
- package/dist/migration/to/v3.48.0.d.ts +4 -0
- package/dist/migration/to/v3.49.0.d.ts +4 -0
- package/dist/migration/to/v3.5.0.d.ts +4 -0
- package/dist/migration/to/v3.5.1.d.ts +4 -0
- package/dist/migration/to/v3.50.0.d.ts +4 -0
- package/dist/migration/to/v3.51.0.d.ts +4 -0
- package/dist/migration/to/v3.6.0.d.ts +4 -0
- package/dist/migration/to/v3.7.0.d.ts +4 -0
- package/dist/migration/to/v3.8.0.d.ts +4 -0
- package/dist/migration/to/v3.9.0.d.ts +4 -0
- package/dist/migration/types.d.ts +19 -0
- package/dist/migration/types.js +1 -0
- package/dist/mocks.d.ts +13 -0
- package/dist/mocks.js +58 -0
- package/dist/models/__tests__/project-schema.test.d.ts +1 -0
- package/dist/models/__tests__/project-schema.test.js +67 -0
- package/dist/models/__tests__/query.test.d.ts +1 -0
- package/dist/models/__tests__/query.test.js +27 -0
- package/dist/models/__tests__/service.test.d.ts +1 -0
- package/dist/models/__tests__/service.test.js +17 -0
- package/dist/models/__tests__/shape.test.d.ts +1 -0
- package/dist/models/__tests__/shape.test.js +61 -0
- package/dist/models/project-schema.d.ts +35 -0
- package/dist/models/project-schema.js +92 -0
- package/dist/models/query.d.ts +17 -0
- package/dist/models/service.d.ts +12 -0
- package/dist/models/shape.d.ts +41 -0
- package/dist/models/shape.js +85 -0
- package/dist/patterns.js +1 -0
- package/dist/project-schema/index.d.ts +187 -0
- package/dist/project-schema/index.js +75 -0
- package/dist/project-schema/migrate.d.ts +4 -0
- package/dist/project-schema/migrate.js +194 -0
- package/dist/refs.d.ts +226 -0
- package/dist/refs.js +608 -0
- package/dist/relationships.d.ts +40 -0
- package/dist/relationships.js +311 -0
- package/dist/runtime-schema.d.ts +5 -0
- package/dist/runtime-schema.js +80 -0
- package/dist/schema-transform.d.ts +19 -0
- package/dist/schema-transform.js +74 -0
- package/dist/schema-util.d.ts +210 -0
- package/dist/schema-util.js +1077 -0
- package/dist/schemas/auth-schemas.json +365 -0
- package/dist/schemas/index.js +154 -0
- package/dist/service-dependencies.d.ts +13 -0
- package/dist/service-dependencies.js +165 -0
- package/dist/services/__tests__/services.test.d.ts +1 -0
- package/dist/services/__tests__/services.test.js +113 -0
- package/dist/services/services.d.ts +31 -0
- package/dist/services/services.js +145 -0
- package/dist/services/types.js +1 -0
- package/dist/services/util.d.ts +16 -0
- package/dist/taxonomies.d.ts +15 -0
- package/dist/taxonomies.js +24 -0
- package/dist/template-shapes/__tests__/index.test.d.ts +1 -0
- package/dist/template-shapes/__tests__/index.test.js +40 -0
- package/dist/template-shapes/__tests__/names.test.d.ts +1 -0
- package/dist/template-shapes/__tests__/names.test.js +19 -0
- package/dist/template-shapes/__tests__/templates.test.d.ts +1 -0
- package/dist/template-shapes/__tests__/templates.test.js +80 -0
- package/dist/template-shapes/__tests__/where.test.d.ts +1 -0
- package/dist/template-shapes/__tests__/where.test.js +218 -0
- package/dist/template-shapes/index.d.ts +7 -0
- package/dist/template-shapes/names.d.ts +10 -0
- package/dist/template-shapes/templates.d.ts +32 -0
- package/dist/template-shapes/templates.js +319 -0
- package/dist/template-shapes/types.d.ts +15 -0
- package/dist/template-shapes/where.d.ts +37 -0
- package/dist/template-shapes/where.js +402 -0
- package/dist/types/__tests__/utils.test.d.ts +1 -0
- package/dist/types/__tests__/utils.test.js +159 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.js +2 -0
- package/dist/types/transforms.d.ts +13 -0
- package/dist/types/transforms.js +1 -0
- package/dist/types/types.d.ts +211 -0
- package/dist/types/utils.d.ts +117 -0
- package/dist/types/utils.js +279 -0
- package/dist/unions.d.ts +14 -0
- package/dist/unions.js +77 -0
- package/dist/util/__tests__/api-indexing.test.d.ts +1 -0
- package/dist/util/__tests__/api-indexing.test.js +129 -0
- package/dist/util/__tests__/detect-cycles.test.d.ts +1 -0
- package/dist/util/__tests__/detect-cycles.test.js +193 -0
- package/dist/util/__tests__/find-shape-at-path.test.d.ts +1 -0
- package/dist/util/__tests__/find-shape-at-path.test.js +41 -0
- package/dist/util/__tests__/form-config.test.d.ts +1 -0
- package/dist/util/__tests__/form-config.test.js +196 -0
- package/dist/util/__tests__/get-return-shape.test.d.ts +1 -0
- package/dist/util/__tests__/get-return-shape.test.js +27 -0
- package/dist/util/__tests__/has-args.test.d.ts +1 -0
- package/dist/util/__tests__/has-args.test.js +46 -0
- package/dist/util/__tests__/merge.test.d.ts +1 -0
- package/dist/util/__tests__/merge.test.js +1074 -0
- package/dist/util/__tests__/patch-schema.test.d.ts +1 -0
- package/dist/util/__tests__/patch-schema.test.js +82 -0
- package/dist/util/__tests__/shapes.test.d.ts +1 -0
- package/dist/util/__tests__/shapes.test.js +30 -0
- package/dist/util/ai-tools.d.ts +3 -0
- package/dist/util/api-indexing.d.ts +9 -0
- package/dist/util/api-indexing.js +57 -0
- package/dist/util/detect-cycles.d.ts +7 -0
- package/dist/util/detect-cycles.js +45 -0
- package/dist/util/find-shape-at-path.d.ts +21 -0
- package/dist/util/form-config.d.ts +11 -0
- package/dist/util/form-config.js +62 -0
- package/dist/util/get-conflicting-properties.d.ts +6 -0
- package/dist/util/get-conflicting-properties.js +55 -0
- package/dist/util/get-return-shape.d.ts +4 -0
- package/dist/util/get-return-shape.js +30 -0
- package/dist/util/has-arg.d.ts +4 -0
- package/dist/util/has-arg.js +13 -0
- package/dist/util/merge.d.ts +15 -0
- package/dist/util/merge.js +256 -0
- package/dist/util/patch-schema.d.ts +8 -0
- package/dist/util/shapes.d.ts +5 -0
- package/dist/validate/errors.d.ts +3 -0
- package/dist/validate/errors.js +20 -0
- package/dist/validate/validate.d.ts +73 -0
- package/dist/validate/validate.js +1107 -0
- package/dist/versions.d.ts +4 -0
- package/dist/versions.js +4 -0
- package/dist/workflows.d.ts +14 -0
- package/dist/workflows.js +66 -0
- package/examples/latest/agent-schema.json +12 -4
- package/examples/latest/all-fields-shapes-inline.json +52 -18
- package/examples/latest/all-fields-shapes.json +76 -26
- package/examples/latest/betzino.json +3139 -902
- package/examples/latest/blog-schema.json +28 -8
- package/examples/latest/brewery-schema.json +25 -7
- package/examples/latest/clear-cache-schema.json +7 -3
- package/examples/latest/complex-project-schema.json +359 -98
- package/examples/latest/complex-schema.json +1754 -487
- package/examples/latest/edit-schema.json +11 -4
- package/examples/latest/fabric-ecommerce.json +838 -187
- package/examples/latest/frank-and-fred-schema.json +1753 -486
- package/examples/latest/klirr-schema.json +2411 -682
- package/examples/latest/layers/rick-and-morty-layer.json +32 -11
- package/examples/latest/layers/shopify-layer-2023-01.json +8637 -2206
- package/examples/latest/layers/shopify-storefront-2023-04.json +1714 -404
- package/examples/latest/layers/wordpress-2024-01.json +2746 -691
- package/examples/latest/massive-schema.json +584 -131
- package/examples/latest/mill-components-schema.json +125 -29
- package/examples/latest/nested-shape-arrays.json +19 -7
- package/examples/latest/one-earth.json +1113 -236
- package/examples/latest/pet-oneof-array.json +22 -7
- package/examples/latest/post-schema.json +20 -6
- package/examples/latest/pruned-shopify-product-schema.json +830 -185
- package/examples/latest/rag-example.json +15 -5
- package/examples/latest/real-world-schema.json +56 -14
- package/examples/latest/recursive-repeater-schema.json +11 -4
- package/examples/latest/recursive-schema.json +11 -4
- package/examples/latest/rick-and-morty-ast.json +174 -45
- package/examples/latest/rick-and-morty-graphql.json +100 -25
- package/examples/latest/rick-and-morty-rest.json +7 -3
- package/examples/latest/rick-and-morty-with-indexing.json +13 -5
- package/examples/latest/schema-where-filter.json +40 -11
- package/examples/latest/schema-with-repeater-draftjs.json +8 -3
- package/examples/latest/schema-with-rick-and-morty.json +4 -2
- package/examples/latest/shape-books-v3_2_0.json +71 -17
- package/examples/latest/shape-books.json +71 -17
- package/examples/latest/shape-editor-schema-edited.json +69 -23
- package/examples/latest/shape-editor-schema-initial.json +28 -10
- package/examples/latest/shapedb-crud-every-prop-type.json +22 -8
- package/examples/latest/shopify-lookbook.json +19 -5
- package/examples/latest/shopify-product-2022-07.json +3217 -726
- package/examples/latest/shopify-product-2023-04.json +4496 -1012
- package/examples/latest/shopify-store-with-widget.json +942 -213
- package/examples/latest/stripe-product-runtime-schema.json +277 -81
- package/examples/latest/stripe-starter-resolved.json +1953 -476
- package/examples/latest/user-schema-no-required.json +13 -3
- package/examples/latest/user-schema-with-defaults.json +27 -5
- package/examples/latest/valvoline-ai-demo.json +69 -17
- package/examples/latest/vector-search-schema.json +24 -8
- package/package.json +23 -24
- package/dist/cjs/package.json +0 -1
- package/dist/cjs/src/agents.js +0 -147
- package/dist/cjs/src/api-version.js +0 -24
- package/dist/cjs/src/auth-schemas.js +0 -8
- package/dist/cjs/src/builtin-schema.js +0 -616
- package/dist/cjs/src/constants.js +0 -4
- package/dist/cjs/src/content-schema-transform.js +0 -175
- package/dist/cjs/src/create-input-schema.js +0 -66
- package/dist/cjs/src/enum.js +0 -12
- package/dist/cjs/src/flatten-templates.js +0 -26
- package/dist/cjs/src/get-is-leaf.js +0 -59
- package/dist/cjs/src/index.js +0 -62
- package/dist/cjs/src/interfaces.js +0 -98
- package/dist/cjs/src/layers/layers.js +0 -313
- package/dist/cjs/src/layers/refs.js +0 -243
- package/dist/cjs/src/layers/type-utils.js +0 -145
- package/dist/cjs/src/layers/visitor.js +0 -42
- package/dist/cjs/src/migration/index.js +0 -142
- package/dist/cjs/src/migration/to/v3.0.0.js +0 -217
- package/dist/cjs/src/migration/to/v3.1.0.js +0 -199
- package/dist/cjs/src/migration/to/v3.10.0.js +0 -72
- package/dist/cjs/src/migration/to/v3.11.0.js +0 -90
- package/dist/cjs/src/migration/to/v3.12.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.12.1.js +0 -12
- package/dist/cjs/src/migration/to/v3.12.2.js +0 -12
- package/dist/cjs/src/migration/to/v3.12.3.js +0 -92
- package/dist/cjs/src/migration/to/v3.13.0.js +0 -22
- package/dist/cjs/src/migration/to/v3.14.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.15.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.16.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.17.0.js +0 -27
- package/dist/cjs/src/migration/to/v3.17.1.js +0 -12
- package/dist/cjs/src/migration/to/v3.18.0.js +0 -69
- package/dist/cjs/src/migration/to/v3.18.1.js +0 -20
- package/dist/cjs/src/migration/to/v3.18.2.js +0 -24
- package/dist/cjs/src/migration/to/v3.19.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.2.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.20.0.js +0 -29
- package/dist/cjs/src/migration/to/v3.21.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.22.0.js +0 -30
- package/dist/cjs/src/migration/to/v3.23.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.24.0.js +0 -13
- package/dist/cjs/src/migration/to/v3.25.0.js +0 -13
- package/dist/cjs/src/migration/to/v3.26.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.27.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.28.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.29.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.3.0.js +0 -15
- package/dist/cjs/src/migration/to/v3.30.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.31.0.js +0 -43
- package/dist/cjs/src/migration/to/v3.32.0.js +0 -61
- package/dist/cjs/src/migration/to/v3.33.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.34.0.js +0 -123
- package/dist/cjs/src/migration/to/v3.35.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.36.0.js +0 -27
- package/dist/cjs/src/migration/to/v3.37.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.38.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.39.0.js +0 -47
- package/dist/cjs/src/migration/to/v3.4.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.40.0.js +0 -31
- package/dist/cjs/src/migration/to/v3.41.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.42.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.43.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.44.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.45.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.46.0.js +0 -37
- package/dist/cjs/src/migration/to/v3.47.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.48.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.49.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.5.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.5.1.js +0 -12
- package/dist/cjs/src/migration/to/v3.50.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.51.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.6.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.7.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.8.0.js +0 -12
- package/dist/cjs/src/migration/to/v3.9.0.js +0 -84
- package/dist/cjs/src/migration/types.js +0 -2
- package/dist/cjs/src/migration/utils.js +0 -10
- package/dist/cjs/src/mocks.js +0 -65
- package/dist/cjs/src/models/project-schema.js +0 -99
- package/dist/cjs/src/models/query.js +0 -35
- package/dist/cjs/src/models/service.js +0 -24
- package/dist/cjs/src/models/shape.js +0 -89
- package/dist/cjs/src/patterns.js +0 -2
- package/dist/cjs/src/project-schema/index.js +0 -156
- package/dist/cjs/src/project-schema/latest.js +0 -8
- package/dist/cjs/src/project-schema/migrate.js +0 -198
- package/dist/cjs/src/project-schema/v1.0.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.0.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.1.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.10.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.11.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.12.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.12.1.js +0 -8
- package/dist/cjs/src/project-schema/v3.12.2.js +0 -8
- package/dist/cjs/src/project-schema/v3.12.3.js +0 -8
- package/dist/cjs/src/project-schema/v3.13.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.13.1.js +0 -8
- package/dist/cjs/src/project-schema/v3.14.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.15.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.16.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.17.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.17.1.js +0 -8
- package/dist/cjs/src/project-schema/v3.18.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.18.1.js +0 -8
- package/dist/cjs/src/project-schema/v3.18.2.js +0 -8
- package/dist/cjs/src/project-schema/v3.19.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.2.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.20.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.21.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.22.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.23.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.24.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.25.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.26.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.27.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.28.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.29.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.3.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.30.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.31.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.32.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.33.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.34.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.35.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.36.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.37.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.38.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.39.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.4.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.40.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.41.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.42.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.43.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.44.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.45.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.46.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.47.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.48.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.49.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.5.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.5.1.js +0 -8
- package/dist/cjs/src/project-schema/v3.50.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.51.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.6.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.7.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.8.0.js +0 -8
- package/dist/cjs/src/project-schema/v3.9.0.js +0 -8
- package/dist/cjs/src/project-schema/v4.0.0.js +0 -8
- package/dist/cjs/src/refs.js +0 -671
- package/dist/cjs/src/relationships.js +0 -326
- package/dist/cjs/src/runtime-schema.js +0 -88
- package/dist/cjs/src/scalars.js +0 -8
- package/dist/cjs/src/schema-transform.js +0 -83
- package/dist/cjs/src/schema-util.js +0 -1140
- package/dist/cjs/src/schemas/auth-schemas.json +0 -313
- package/dist/cjs/src/schemas/index.js +0 -162
- package/dist/cjs/src/schemas/user-schema.json +0 -51
- package/dist/cjs/src/service-dependencies.js +0 -172
- package/dist/cjs/src/services/services.js +0 -156
- package/dist/cjs/src/services/types.js +0 -2
- package/dist/cjs/src/services/util.js +0 -45
- package/dist/cjs/src/taxonomies.js +0 -28
- package/dist/cjs/src/template-shapes/index.js +0 -37
- package/dist/cjs/src/template-shapes/names.js +0 -26
- package/dist/cjs/src/template-shapes/templates.js +0 -331
- package/dist/cjs/src/template-shapes/types.js +0 -10
- package/dist/cjs/src/template-shapes/where.js +0 -414
- package/dist/cjs/src/types/index.js +0 -19
- package/dist/cjs/src/types/transforms.js +0 -2
- package/dist/cjs/src/types/types.js +0 -21
- package/dist/cjs/src/types/utils.js +0 -344
- package/dist/cjs/src/unions.js +0 -88
- package/dist/cjs/src/user-schema.js +0 -8
- package/dist/cjs/src/util/ai-tools.js +0 -10
- package/dist/cjs/src/util/api-indexing.js +0 -62
- package/dist/cjs/src/util/detect-cycles.js +0 -48
- package/dist/cjs/src/util/find-shape-at-path.js +0 -57
- package/dist/cjs/src/util/form-config.js +0 -66
- package/dist/cjs/src/util/get-conflicting-properties.js +0 -58
- package/dist/cjs/src/util/get-return-shape.js +0 -34
- package/dist/cjs/src/util/has-arg.js +0 -17
- package/dist/cjs/src/util/merge.js +0 -269
- package/dist/cjs/src/util/patch-schema.js +0 -55
- package/dist/cjs/src/util/shapes.js +0 -31
- package/dist/cjs/src/validate.js +0 -1140
- package/dist/cjs/src/versions.js +0 -8
- package/dist/cjs/src/workflows.js +0 -76
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +0 -1
- package/dist/esm/package.json +0 -1
- package/dist/esm/src/content-schema-transform.js +0 -162
- package/dist/esm/src/flatten-templates.js +0 -20
- package/dist/esm/src/get-is-leaf.js +0 -56
- package/dist/esm/src/index.js +0 -46
- package/dist/esm/src/interfaces.js +0 -85
- package/dist/esm/src/layers/layers.js +0 -301
- package/dist/esm/src/layers/refs.js +0 -220
- package/dist/esm/src/layers/type-utils.js +0 -118
- package/dist/esm/src/layers/visitor.js +0 -38
- package/dist/esm/src/migration/index.js +0 -122
- package/dist/esm/src/migration/to/v3.0.0.js +0 -212
- package/dist/esm/src/migration/to/v3.1.0.js +0 -194
- package/dist/esm/src/migration/to/v3.32.0.js +0 -59
- package/dist/esm/src/migration/to/v3.34.0.js +0 -116
- package/dist/esm/src/migration/to/v3.39.0.js +0 -45
- package/dist/esm/src/mocks.js +0 -58
- package/dist/esm/src/models/project-schema.js +0 -92
- package/dist/esm/src/models/shape.js +0 -85
- package/dist/esm/src/project-schema/index.js +0 -138
- package/dist/esm/src/project-schema/migrate.js +0 -194
- package/dist/esm/src/refs.js +0 -608
- package/dist/esm/src/relationships.js +0 -311
- package/dist/esm/src/runtime-schema.js +0 -80
- package/dist/esm/src/schema-transform.js +0 -74
- package/dist/esm/src/schema-util.js +0 -1077
- package/dist/esm/src/schemas/auth-schemas.json +0 -313
- package/dist/esm/src/schemas/index.js +0 -154
- package/dist/esm/src/schemas/project-schema/experimental.json +0 -1101
- package/dist/esm/src/schemas/project-schema/latest.json +0 -3320
- package/dist/esm/src/schemas/project-schema/meta-schema-v1.0.0.json +0 -193
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.0.0.json +0 -608
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.1.0.json +0 -608
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.2.0.json +0 -612
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.3.0.json +0 -612
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.4.0.json +0 -637
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.5.0.json +0 -626
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.5.1.json +0 -626
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.6.0.json +0 -629
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.7.0.json +0 -1137
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.8.0.json +0 -1137
- package/dist/esm/src/schemas/project-schema/meta-schema-v3.9.0.json +0 -1477
- package/dist/esm/src/schemas/project-schema/v1.0.0.json +0 -321
- package/dist/esm/src/schemas/project-schema/v3.0.0.json +0 -414
- package/dist/esm/src/schemas/project-schema/v3.1.0.json +0 -572
- package/dist/esm/src/schemas/project-schema/v3.10.0.json +0 -2097
- package/dist/esm/src/schemas/project-schema/v3.11.0.json +0 -2141
- package/dist/esm/src/schemas/project-schema/v3.12.0.json +0 -2144
- package/dist/esm/src/schemas/project-schema/v3.12.1.json +0 -2282
- package/dist/esm/src/schemas/project-schema/v3.12.2.json +0 -2304
- package/dist/esm/src/schemas/project-schema/v3.12.3.json +0 -2357
- package/dist/esm/src/schemas/project-schema/v3.13.0.json +0 -2377
- package/dist/esm/src/schemas/project-schema/v3.14.0.json +0 -2385
- package/dist/esm/src/schemas/project-schema/v3.15.0.json +0 -2365
- package/dist/esm/src/schemas/project-schema/v3.16.0.json +0 -2373
- package/dist/esm/src/schemas/project-schema/v3.17.0.json +0 -2378
- package/dist/esm/src/schemas/project-schema/v3.17.1.json +0 -2380
- package/dist/esm/src/schemas/project-schema/v3.18.0.json +0 -2356
- package/dist/esm/src/schemas/project-schema/v3.18.1.json +0 -2357
- package/dist/esm/src/schemas/project-schema/v3.18.2.json +0 -2357
- package/dist/esm/src/schemas/project-schema/v3.19.0.json +0 -2369
- package/dist/esm/src/schemas/project-schema/v3.2.0.json +0 -580
- package/dist/esm/src/schemas/project-schema/v3.20.0.json +0 -2369
- package/dist/esm/src/schemas/project-schema/v3.21.0.json +0 -2376
- package/dist/esm/src/schemas/project-schema/v3.22.0.json +0 -2381
- package/dist/esm/src/schemas/project-schema/v3.23.0.json +0 -2456
- package/dist/esm/src/schemas/project-schema/v3.24.0.json +0 -2556
- package/dist/esm/src/schemas/project-schema/v3.25.0.json +0 -2552
- package/dist/esm/src/schemas/project-schema/v3.26.0.json +0 -2599
- package/dist/esm/src/schemas/project-schema/v3.27.0.json +0 -2611
- package/dist/esm/src/schemas/project-schema/v3.28.0.json +0 -2656
- package/dist/esm/src/schemas/project-schema/v3.29.0.json +0 -2670
- package/dist/esm/src/schemas/project-schema/v3.3.0.json +0 -581
- package/dist/esm/src/schemas/project-schema/v3.30.0.json +0 -2656
- package/dist/esm/src/schemas/project-schema/v3.31.0.json +0 -2714
- package/dist/esm/src/schemas/project-schema/v3.32.0.json +0 -2708
- package/dist/esm/src/schemas/project-schema/v3.33.0.json +0 -2715
- package/dist/esm/src/schemas/project-schema/v3.34.0.json +0 -2715
- package/dist/esm/src/schemas/project-schema/v3.35.0.json +0 -2748
- package/dist/esm/src/schemas/project-schema/v3.36.0.json +0 -2756
- package/dist/esm/src/schemas/project-schema/v3.37.0.json +0 -2821
- package/dist/esm/src/schemas/project-schema/v3.38.0.json +0 -2819
- package/dist/esm/src/schemas/project-schema/v3.39.0.json +0 -2827
- package/dist/esm/src/schemas/project-schema/v3.4.0.json +0 -571
- package/dist/esm/src/schemas/project-schema/v3.40.0.json +0 -2830
- package/dist/esm/src/schemas/project-schema/v3.41.0.json +0 -2830
- package/dist/esm/src/schemas/project-schema/v3.42.0.json +0 -2835
- package/dist/esm/src/schemas/project-schema/v3.43.0.json +0 -2841
- package/dist/esm/src/schemas/project-schema/v3.44.0.json +0 -3013
- package/dist/esm/src/schemas/project-schema/v3.45.0.json +0 -3064
- package/dist/esm/src/schemas/project-schema/v3.46.0.json +0 -3136
- package/dist/esm/src/schemas/project-schema/v3.47.0.json +0 -3189
- package/dist/esm/src/schemas/project-schema/v3.48.0.json +0 -3196
- package/dist/esm/src/schemas/project-schema/v3.49.0.json +0 -3239
- package/dist/esm/src/schemas/project-schema/v3.5.0.json +0 -571
- package/dist/esm/src/schemas/project-schema/v3.5.1.json +0 -571
- package/dist/esm/src/schemas/project-schema/v3.50.0.json +0 -3320
- package/dist/esm/src/schemas/project-schema/v3.51.0.json +0 -3320
- package/dist/esm/src/schemas/project-schema/v3.6.0.json +0 -587
- package/dist/esm/src/schemas/project-schema/v3.7.0.json +0 -587
- package/dist/esm/src/schemas/project-schema/v3.8.0.json +0 -604
- package/dist/esm/src/schemas/project-schema/v3.9.0.json +0 -604
- package/dist/esm/src/schemas/project-schema/v4.0.0.json +0 -2316
- package/dist/esm/src/schemas/project-schema.json +0 -190
- package/dist/esm/src/schemas/user-schema.json +0 -51
- package/dist/esm/src/service-dependencies.js +0 -165
- package/dist/esm/src/services/services.js +0 -145
- package/dist/esm/src/taxonomies.js +0 -24
- package/dist/esm/src/template-shapes/templates.js +0 -319
- package/dist/esm/src/template-shapes/where.js +0 -402
- package/dist/esm/src/types/index.js +0 -3
- package/dist/esm/src/types/utils.js +0 -279
- package/dist/esm/src/unions.js +0 -77
- package/dist/esm/src/user-schema.js +0 -7
- package/dist/esm/src/util/api-indexing.js +0 -57
- package/dist/esm/src/util/detect-cycles.js +0 -45
- package/dist/esm/src/util/form-config.js +0 -62
- package/dist/esm/src/util/get-conflicting-properties.js +0 -55
- package/dist/esm/src/util/get-return-shape.js +0 -30
- package/dist/esm/src/util/has-arg.js +0 -13
- package/dist/esm/src/util/merge.js +0 -256
- package/dist/esm/src/validate.js +0 -1126
- package/dist/esm/src/versions.js +0 -4
- package/dist/esm/src/workflows.js +0 -66
- package/dist/esm/tsconfig.esm.tsbuildinfo +0 -1
- package/dist/types/src/agents.d.ts +0 -14
- package/dist/types/src/auth-schemas.d.ts +0 -104
- package/dist/types/src/builtin-schema.d.ts +0 -8
- package/dist/types/src/content-schema-transform.d.ts +0 -35
- package/dist/types/src/create-input-schema.d.ts +0 -9
- package/dist/types/src/enum.d.ts +0 -2
- package/dist/types/src/flatten-templates.d.ts +0 -2
- package/dist/types/src/get-is-leaf.d.ts +0 -3
- package/dist/types/src/index.d.ts +0 -48
- package/dist/types/src/interfaces.d.ts +0 -12
- package/dist/types/src/layers/layers.d.ts +0 -26
- package/dist/types/src/layers/refs.d.ts +0 -102
- package/dist/types/src/layers/type-utils.d.ts +0 -59
- package/dist/types/src/layers/visitor.d.ts +0 -5
- package/dist/types/src/migration/index.d.ts +0 -64
- package/dist/types/src/migration/to/v3.0.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.1.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.10.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.11.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.12.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.12.1.d.ts +0 -4
- package/dist/types/src/migration/to/v3.12.2.d.ts +0 -4
- package/dist/types/src/migration/to/v3.12.3.d.ts +0 -4
- package/dist/types/src/migration/to/v3.13.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.14.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.15.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.16.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.17.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.17.1.d.ts +0 -4
- package/dist/types/src/migration/to/v3.18.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.18.1.d.ts +0 -4
- package/dist/types/src/migration/to/v3.18.2.d.ts +0 -4
- package/dist/types/src/migration/to/v3.19.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.2.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.20.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.21.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.22.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.23.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.24.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.25.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.26.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.27.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.28.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.29.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.3.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.30.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.31.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.32.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.33.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.34.0.d.ts +0 -6
- package/dist/types/src/migration/to/v3.35.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.36.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.37.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.38.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.39.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.4.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.40.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.41.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.42.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.43.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.44.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.45.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.46.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.47.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.48.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.49.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.5.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.5.1.d.ts +0 -4
- package/dist/types/src/migration/to/v3.50.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.51.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.6.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.7.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.8.0.d.ts +0 -4
- package/dist/types/src/migration/to/v3.9.0.d.ts +0 -4
- package/dist/types/src/migration/types.d.ts +0 -19
- package/dist/types/src/mocks.d.ts +0 -13
- package/dist/types/src/models/project-schema.d.ts +0 -35
- package/dist/types/src/models/query.d.ts +0 -17
- package/dist/types/src/models/service.d.ts +0 -12
- package/dist/types/src/models/shape.d.ts +0 -41
- package/dist/types/src/project-schema/index.d.ts +0 -187
- package/dist/types/src/project-schema/migrate.d.ts +0 -4
- package/dist/types/src/refs.d.ts +0 -226
- package/dist/types/src/relationships.d.ts +0 -40
- package/dist/types/src/runtime-schema.d.ts +0 -5
- package/dist/types/src/schema-transform.d.ts +0 -19
- package/dist/types/src/schema-util.d.ts +0 -210
- package/dist/types/src/service-dependencies.d.ts +0 -13
- package/dist/types/src/services/services.d.ts +0 -31
- package/dist/types/src/services/util.d.ts +0 -16
- package/dist/types/src/taxonomies.d.ts +0 -15
- package/dist/types/src/template-shapes/index.d.ts +0 -7
- package/dist/types/src/template-shapes/names.d.ts +0 -10
- package/dist/types/src/template-shapes/templates.d.ts +0 -32
- package/dist/types/src/template-shapes/types.d.ts +0 -15
- package/dist/types/src/template-shapes/where.d.ts +0 -37
- package/dist/types/src/types/index.d.ts +0 -3
- package/dist/types/src/types/transforms.d.ts +0 -13
- package/dist/types/src/types/types.d.ts +0 -211
- package/dist/types/src/types/utils.d.ts +0 -117
- package/dist/types/src/unions.d.ts +0 -14
- package/dist/types/src/user-schema.d.ts +0 -38
- package/dist/types/src/util/ai-tools.d.ts +0 -3
- package/dist/types/src/util/api-indexing.d.ts +0 -9
- package/dist/types/src/util/detect-cycles.d.ts +0 -7
- package/dist/types/src/util/find-shape-at-path.d.ts +0 -21
- package/dist/types/src/util/form-config.d.ts +0 -11
- package/dist/types/src/util/get-conflicting-properties.d.ts +0 -6
- package/dist/types/src/util/get-return-shape.d.ts +0 -4
- package/dist/types/src/util/has-arg.d.ts +0 -4
- package/dist/types/src/util/merge.d.ts +0 -15
- package/dist/types/src/util/patch-schema.d.ts +0 -8
- package/dist/types/src/util/shapes.d.ts +0 -5
- package/dist/types/src/validate.d.ts +0 -75
- package/dist/types/src/versions.d.ts +0 -4
- package/dist/types/src/workflows.d.ts +0 -14
- package/dist/types/tsconfig.types.tsbuildinfo +0 -1
- /package/dist/{esm/src/migration/types.js → __tests__/_examples.test.d.ts} +0 -0
- /package/dist/{esm/src/patterns.js → __tests__/agents.test.d.ts} +0 -0
- /package/dist/{esm/src/services/types.js → __tests__/api-version.test.d.ts} +0 -0
- /package/dist/{esm/src/types/transforms.js → __tests__/builtin-schema.test.d.ts} +0 -0
- /package/dist/{esm/src/agents.js → agents.js} +0 -0
- /package/dist/{types/src/api-version.d.ts → api-version.d.ts} +0 -0
- /package/dist/{esm/src/api-version.js → api-version.js} +0 -0
- /package/dist/{esm/src/auth-schemas.js → auth-schemas.js} +0 -0
- /package/dist/{esm/src/builtin-schema.js → builtin-schema.js} +0 -0
- /package/dist/{types/src/constants.d.ts → constants.d.ts} +0 -0
- /package/dist/{esm/src/constants.js → constants.js} +0 -0
- /package/dist/{esm/src/create-input-schema.js → create-input-schema.js} +0 -0
- /package/dist/{esm/src/enum.js → enum.js} +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.10.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.11.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.12.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.12.1.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.12.2.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.12.3.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.13.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.14.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.15.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.16.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.17.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.17.1.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.18.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.18.1.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.18.2.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.19.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.2.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.20.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.21.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.22.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.23.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.24.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.25.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.26.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.27.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.28.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.29.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.3.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.30.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.31.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.33.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.35.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.36.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.37.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.38.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.4.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.40.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.41.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.42.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.43.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.44.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.45.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.46.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.47.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.48.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.49.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.5.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.5.1.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.50.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.51.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.6.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.7.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.8.0.js +0 -0
- /package/dist/{esm/src/migration → migration}/to/v3.9.0.js +0 -0
- /package/dist/{types/src/migration → migration}/utils.d.ts +0 -0
- /package/dist/{esm/src/migration → migration}/utils.js +0 -0
- /package/dist/{esm/src/models → models}/query.js +0 -0
- /package/dist/{esm/src/models → models}/service.js +0 -0
- /package/dist/{types/src/patterns.d.ts → patterns.d.ts} +0 -0
- /package/dist/{types/src/project-schema → project-schema}/latest.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/latest.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v1.0.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v1.0.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.0.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.0.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.1.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.1.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.10.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.10.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.11.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.11.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.12.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.12.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.12.1.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.12.1.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.12.2.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.12.2.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.12.3.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.12.3.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.13.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.13.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.13.1.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.13.1.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.14.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.14.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.15.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.15.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.16.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.16.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.17.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.17.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.17.1.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.17.1.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.18.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.18.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.18.1.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.18.1.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.18.2.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.18.2.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.19.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.19.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.2.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.2.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.20.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.20.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.21.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.21.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.22.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.22.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.23.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.23.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.24.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.24.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.25.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.25.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.26.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.26.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.27.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.27.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.28.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.28.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.29.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.29.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.3.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.3.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.30.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.30.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.31.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.31.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.32.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.32.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.33.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.33.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.34.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.34.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.35.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.35.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.36.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.36.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.37.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.37.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.38.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.38.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.39.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.39.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.4.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.4.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.40.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.40.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.41.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.41.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.42.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.42.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.43.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.43.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.44.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.44.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.45.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.45.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.46.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.46.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.47.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.47.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.48.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.48.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.49.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.49.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.5.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.5.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.5.1.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.5.1.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.50.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.50.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.51.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.51.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.6.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.6.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.7.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.7.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.8.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.8.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v3.9.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v3.9.0.js +0 -0
- /package/dist/{types/src/project-schema → project-schema}/v4.0.0.d.ts +0 -0
- /package/dist/{esm/src/project-schema → project-schema}/v4.0.0.js +0 -0
- /package/dist/{types/src/scalars.d.ts → scalars.d.ts} +0 -0
- /package/dist/{esm/src/scalars.js → scalars.js} +0 -0
- /package/dist/{types/src/schemas → schemas}/index.d.ts +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/experimental.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/latest.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v1.0.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.0.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.1.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.2.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.3.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.4.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.5.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.5.1.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.6.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.7.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.8.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/meta-schema-v3.9.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v1.0.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.0.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.1.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.10.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.11.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.12.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.12.1.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.12.2.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.12.3.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.13.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.14.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.15.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.16.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.17.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.17.1.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.18.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.18.1.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.18.2.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.19.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.2.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.20.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.21.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.22.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.23.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.24.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.25.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.26.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.27.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.28.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.29.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.3.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.30.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.31.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.32.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.33.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.34.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.35.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.36.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.37.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.38.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.39.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.4.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.40.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.41.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.42.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.43.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.44.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.45.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.46.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.47.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.48.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.49.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.5.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.5.1.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.50.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.51.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.6.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.7.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.8.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v3.9.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema/v4.0.0.json +0 -0
- /package/dist/{cjs/src/schemas → schemas}/project-schema.json +0 -0
- /package/dist/{types/src/services → services}/types.d.ts +0 -0
- /package/dist/{esm/src/services → services}/util.js +0 -0
- /package/dist/{esm/src/template-shapes → template-shapes}/index.js +0 -0
- /package/dist/{esm/src/template-shapes → template-shapes}/names.js +0 -0
- /package/dist/{esm/src/template-shapes → template-shapes}/types.js +0 -0
- /package/dist/{esm/src/types → types}/types.js +0 -0
- /package/dist/{esm/src/util → util}/ai-tools.js +0 -0
- /package/dist/{esm/src/util → util}/find-shape-at-path.js +0 -0
- /package/dist/{esm/src/util → util}/patch-schema.js +0 -0
- /package/dist/{esm/src/util → util}/shapes.js +0 -0
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { addAll, deepClone, mapSet } from '@takeshape/util';
|
|
2
|
+
import get from 'lodash/get.js';
|
|
3
|
+
import isObject from 'lodash/isObject.js';
|
|
4
|
+
import pick from 'lodash/pick.js';
|
|
5
|
+
import set from 'lodash/set.js';
|
|
6
|
+
import { getImplementationShapeNameMap, isInterfaceShape, pruneUnusedInterfaces } from "./interfaces.js";
|
|
7
|
+
import { createGetNamespace, dereferenceObjectSchema, getAllPropertyRefs, getRef, getRefShapeName, propertyRefItemToPath, refExpressionToRefItem, refItemToNamespacedShapeName } from "./refs.js";
|
|
8
|
+
import { getAllNamespaceShapes, getAllRefsInQuery, getArgsReference, isValidRefItem, visitSchemaProperties } from "./schema-util.js";
|
|
9
|
+
import { isExtendsSchema, isObjectSchema, isProjectSchemaWithServices } from "./types/index.js";
|
|
10
|
+
function getGraphQLServiceShapeMap(layers) {
|
|
11
|
+
return Object.assign({}, ...Object.values(layers).map((layer) => layer.schema?.shapes ?? {}));
|
|
12
|
+
}
|
|
13
|
+
function schemaExtendsShape(context, shapeName, schema) {
|
|
14
|
+
return (isExtendsSchema(schema) &&
|
|
15
|
+
schema.extends.some((item) => getRefShapeName(context, item) === shapeName));
|
|
16
|
+
}
|
|
17
|
+
function getMissingPropertyRefs(projectSchema, getNamespace) {
|
|
18
|
+
const propertyRefs = getAllPropertyRefs(projectSchema);
|
|
19
|
+
return propertyRefs.filter((ref) => {
|
|
20
|
+
const path = propertyRefItemToPath(getNamespace, ref);
|
|
21
|
+
return !get(projectSchema, path);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function refToQuery(serviceSchemas, ref) {
|
|
25
|
+
const serviceSchema = serviceSchemas[ref.serviceId]?.schema;
|
|
26
|
+
if (serviceSchema) {
|
|
27
|
+
if (ref.shapeName === 'Query' || ref.shapeName === 'Mutation') {
|
|
28
|
+
const operation = ref.shapeName === 'Query' ? 'queries' : 'mutations';
|
|
29
|
+
return serviceSchema[operation][ref.propertyName];
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
function getShapeRefs(services, serviceSchemas, propertyRefs) {
|
|
34
|
+
const results = [];
|
|
35
|
+
for (const ref of propertyRefs) {
|
|
36
|
+
const query = refToQuery(serviceSchemas, ref);
|
|
37
|
+
const layerSchema = serviceSchemas[ref.serviceId]?.schema;
|
|
38
|
+
if (query && layerSchema) {
|
|
39
|
+
const layerWithService = {
|
|
40
|
+
...layerSchema,
|
|
41
|
+
services: pick(services, [ref.serviceId]) // include own service so refs have isValidService: true
|
|
42
|
+
};
|
|
43
|
+
results.push(...getAllRefsInQuery(layerWithService, [], query));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return results;
|
|
47
|
+
}
|
|
48
|
+
function interfacesToShapeNames(projectSchema, shapeRefArray) {
|
|
49
|
+
return shapeRefArray.map((shapeRef) => refItemToNamespacedShapeName(refExpressionToRefItem(projectSchema, shapeRef)));
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Add all referenced shape names to the refSet meant to be used as a callback to visitSchemaProperties
|
|
53
|
+
*/
|
|
54
|
+
export function collectReferencedShapeNames(context, shapeNames) {
|
|
55
|
+
const addRef = (refItem) => {
|
|
56
|
+
shapeNames.add(refItemToNamespacedShapeName(refItem));
|
|
57
|
+
};
|
|
58
|
+
const collect = (schema) => {
|
|
59
|
+
const args = schema['@args'];
|
|
60
|
+
if (args && isObject(args) && isObjectSchema(args)) {
|
|
61
|
+
Object.values(args.properties).forEach(collect);
|
|
62
|
+
}
|
|
63
|
+
const argsRefItem = getArgsReference(context, schema);
|
|
64
|
+
if (argsRefItem) {
|
|
65
|
+
addRef(argsRefItem);
|
|
66
|
+
}
|
|
67
|
+
const refItem = getRef(context, schema);
|
|
68
|
+
if (refItem) {
|
|
69
|
+
addRef(refItem);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
return collect;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Returns a schema with all of its dependencies resolved.
|
|
76
|
+
* SHOULD only return the minimum set of remote dependencies required to enable
|
|
77
|
+
* the local shape definitions.
|
|
78
|
+
*/
|
|
79
|
+
export function resolveSchemaShapeDependencies(projectSchema, serviceLayers) {
|
|
80
|
+
const newSchema = deepClone(projectSchema);
|
|
81
|
+
if (isProjectSchemaWithServices(projectSchema)) {
|
|
82
|
+
const newShapeMap = {};
|
|
83
|
+
const requiredShapeNames = new Set(getAllNamespaceShapes(projectSchema));
|
|
84
|
+
const getNamespace = createGetNamespace(projectSchema);
|
|
85
|
+
const missingPropertyRefs = getMissingPropertyRefs(projectSchema, getNamespace);
|
|
86
|
+
if (requiredShapeNames.size || missingPropertyRefs.length) {
|
|
87
|
+
const remoteShapeMap = getGraphQLServiceShapeMap(serviceLayers);
|
|
88
|
+
// Add shape references from queries
|
|
89
|
+
addAll(requiredShapeNames, getShapeRefs(projectSchema.services, serviceLayers, missingPropertyRefs)
|
|
90
|
+
.filter(isValidRefItem)
|
|
91
|
+
.map(refItemToNamespacedShapeName));
|
|
92
|
+
// Add referenced queries and mutations
|
|
93
|
+
for (const ref of missingPropertyRefs) {
|
|
94
|
+
const query = refToQuery(serviceLayers, ref);
|
|
95
|
+
if (query) {
|
|
96
|
+
set(newSchema, propertyRefItemToPath(getNamespace, ref), query);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
// Gather all the remote dependencies that our local schema requires.
|
|
100
|
+
// If the required shape exists in the remote shape map, visit the
|
|
101
|
+
// properties on the remote shape's schema and ensure they are required
|
|
102
|
+
// as well.
|
|
103
|
+
const collectDependencies = (shapeNames) => {
|
|
104
|
+
for (const name of shapeNames) {
|
|
105
|
+
const localShape = newSchema.shapes[name];
|
|
106
|
+
const remoteShape = remoteShapeMap[name];
|
|
107
|
+
// Don't check for dependencies if the shape is already in our schema unless it extends a remote shape
|
|
108
|
+
// getNamespacedShapeNameList already collected those dependencies
|
|
109
|
+
if ((!localShape || (localShape && schemaExtendsShape(projectSchema, name, localShape.schema))) &&
|
|
110
|
+
remoteShape) {
|
|
111
|
+
visitSchemaProperties(remoteShape.schema, [remoteShape.name, 'schema'], collectReferencedShapeNames({ services: newSchema.services }, shapeNames));
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
collectDependencies(requiredShapeNames);
|
|
116
|
+
// Collect interfaces that requiredShapeNames implement
|
|
117
|
+
const interfaceNames = new Set();
|
|
118
|
+
const requiredShapes = mapSet(requiredShapeNames, (shapeName) => newSchema.shapes[shapeName] ?? remoteShapeMap[shapeName]);
|
|
119
|
+
for (const shape of requiredShapes) {
|
|
120
|
+
if (shape?.interfaces) {
|
|
121
|
+
addAll(interfaceNames, interfacesToShapeNames(projectSchema, shape.interfaces));
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
// Collect implementations for interfaces in requiredShapeNames
|
|
125
|
+
const implementationNames = new Set();
|
|
126
|
+
const implementations = getImplementationShapeNameMap({
|
|
127
|
+
...newSchema.shapes,
|
|
128
|
+
...remoteShapeMap
|
|
129
|
+
});
|
|
130
|
+
for (const shape of requiredShapes) {
|
|
131
|
+
if (isInterfaceShape(shape) && implementations[shape.name]) {
|
|
132
|
+
addAll(implementationNames, implementations[shape.name]);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
// Collect the dependencies for the interfaces and implementations
|
|
136
|
+
collectDependencies(interfaceNames);
|
|
137
|
+
collectDependencies(implementationNames);
|
|
138
|
+
addAll(requiredShapeNames, interfaceNames);
|
|
139
|
+
addAll(requiredShapeNames, implementationNames);
|
|
140
|
+
// Populate a ShapeMap with the remote shapes we've gathered
|
|
141
|
+
// A combined context which prefers remote shapes for use when merging/inlining
|
|
142
|
+
const mergingContext = {
|
|
143
|
+
services: newSchema.services,
|
|
144
|
+
shapes: { ...newSchema.shapes, ...remoteShapeMap }
|
|
145
|
+
};
|
|
146
|
+
for (const name of requiredShapeNames) {
|
|
147
|
+
const localShape = newSchema.shapes[name];
|
|
148
|
+
const remoteShape = remoteShapeMap[name];
|
|
149
|
+
if (localShape && remoteShape && schemaExtendsShape(mergingContext, name, localShape.schema)) {
|
|
150
|
+
// Merge and inline combined shape when a local shape extends a remote shape
|
|
151
|
+
newShapeMap[name] = {
|
|
152
|
+
...localShape,
|
|
153
|
+
schema: dereferenceObjectSchema(mergingContext, newSchema.shapes[name].schema)
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
else if (localShape ?? remoteShape) {
|
|
157
|
+
newShapeMap[name] = localShape ?? remoteShape;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
// Assign remote shapes to the new schema, mutating the new schema
|
|
162
|
+
Object.assign(newSchema.shapes, pruneUnusedInterfaces(newSchema, newShapeMap));
|
|
163
|
+
}
|
|
164
|
+
return newSchema;
|
|
165
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { beforeEach, describe, expect, it, test, vi } from 'vitest';
|
|
2
|
+
import { createMockSchema, createMockServiceConfig } from "../../mocks.js";
|
|
3
|
+
import { prepareServiceUpdate } from "../services.js";
|
|
4
|
+
import { getResolverServices, isMissingAuth } from "../util.js";
|
|
5
|
+
beforeEach(vi.clearAllMocks);
|
|
6
|
+
describe('prepareServiceUpdate', () => {
|
|
7
|
+
const serviceKey = 'mock-service';
|
|
8
|
+
const encryptedAuthentication = 'encrypted-token';
|
|
9
|
+
const serviceConfig = createMockServiceConfig(serviceKey);
|
|
10
|
+
const storedServiceConfig = {
|
|
11
|
+
...serviceConfig,
|
|
12
|
+
authentication: encryptedAuthentication
|
|
13
|
+
};
|
|
14
|
+
const { authentication } = serviceConfig;
|
|
15
|
+
const projectSchema = createMockSchema('mock-schema', {
|
|
16
|
+
services: {
|
|
17
|
+
[serviceKey]: storedServiceConfig
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
const encryptFn = vi.fn(() => encryptedAuthentication);
|
|
21
|
+
const decryptFn = vi.fn(() => authentication);
|
|
22
|
+
it('prepares an update', async () => {
|
|
23
|
+
const serviceUpdate = {
|
|
24
|
+
title: 'foo',
|
|
25
|
+
authenticationType: 'bearer',
|
|
26
|
+
authentication: {
|
|
27
|
+
token: 'updated'
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
const result = prepareServiceUpdate(encryptFn, decryptFn, projectSchema, serviceUpdate, serviceKey);
|
|
31
|
+
expect(encryptFn).toHaveBeenCalledWith({
|
|
32
|
+
...authentication,
|
|
33
|
+
token: 'updated'
|
|
34
|
+
});
|
|
35
|
+
expect(result).toEqual({ ...storedServiceConfig, title: 'foo' });
|
|
36
|
+
});
|
|
37
|
+
it('can proceed with a full object, and nothing stored', async () => {
|
|
38
|
+
const result = prepareServiceUpdate(encryptFn, decryptFn, projectSchema, serviceConfig, 'random');
|
|
39
|
+
expect(encryptFn).toHaveBeenCalledWith(authentication);
|
|
40
|
+
expect(result).toEqual(storedServiceConfig);
|
|
41
|
+
});
|
|
42
|
+
it('clears the authentication property when a null sentinel is sent', async () => {
|
|
43
|
+
const serviceUpdate = {
|
|
44
|
+
authenticationType: 'bearer',
|
|
45
|
+
authentication: null
|
|
46
|
+
};
|
|
47
|
+
const result = prepareServiceUpdate(encryptFn, decryptFn, projectSchema, serviceUpdate, serviceKey);
|
|
48
|
+
expect(encryptFn).toHaveBeenCalledTimes(0);
|
|
49
|
+
expect(result).toEqual({
|
|
50
|
+
...storedServiceConfig,
|
|
51
|
+
authentication: undefined
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
it('throws a validation error on invalid authentication properties', async () => {
|
|
55
|
+
const serviceUpdate = {
|
|
56
|
+
title: 'foo',
|
|
57
|
+
authenticationType: 'bearer',
|
|
58
|
+
authentication: {
|
|
59
|
+
bogus: 'bogus-property'
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
expect(() => prepareServiceUpdate(encryptFn, decryptFn, projectSchema, serviceUpdate, serviceKey)).toThrowErrorMatchingInlineSnapshot('[SchemaValidationError: ServiceConfig was invalid]');
|
|
63
|
+
});
|
|
64
|
+
it('throws a validation error when the envelopes authenticationType changes', async () => {
|
|
65
|
+
const serviceUpdate = {
|
|
66
|
+
title: 'foo',
|
|
67
|
+
authenticationType: 'basic'
|
|
68
|
+
};
|
|
69
|
+
expect(() => prepareServiceUpdate(encryptFn, decryptFn, projectSchema, serviceUpdate, serviceKey)).toThrowErrorMatchingInlineSnapshot('[SchemaValidationError: ServiceConfig was invalid]');
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
describe('getResolverServices', () => {
|
|
73
|
+
test('works for basic resolvers', () => {
|
|
74
|
+
expect(getResolverServices({
|
|
75
|
+
name: 'graphql:query',
|
|
76
|
+
service: 'foo',
|
|
77
|
+
fieldName: 'foo'
|
|
78
|
+
})).toEqual(['foo']);
|
|
79
|
+
});
|
|
80
|
+
test('works for compose resolvers', () => {
|
|
81
|
+
expect(getResolverServices({
|
|
82
|
+
compose: [
|
|
83
|
+
{
|
|
84
|
+
name: 'graphql:query',
|
|
85
|
+
service: 'a',
|
|
86
|
+
fieldName: 'a'
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: 'graphql:query',
|
|
90
|
+
service: 'b',
|
|
91
|
+
fieldName: 'b'
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
name: 'graphql:query',
|
|
95
|
+
service: 'c',
|
|
96
|
+
fieldName: 'c'
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
name: 'graphql:query',
|
|
100
|
+
service: 'a',
|
|
101
|
+
fieldName: 'a'
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
})).toEqual(['a', 'b', 'c']);
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
test('isMissingAuth', () => {
|
|
108
|
+
expect(isMissingAuth({ authenticationType: 'none' })).toBe(false);
|
|
109
|
+
expect(isMissingAuth({ authenticationType: 'basic' })).toBe(true);
|
|
110
|
+
expect(
|
|
111
|
+
// @ts-expect-error for the sake of testing js runtime usage
|
|
112
|
+
isMissingAuth({ authenticationType: 'oauth2Bearer', authentication: {} })).toBe(true);
|
|
113
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Overwrite } from '@takeshape/util';
|
|
2
|
+
import { SERVICE_OBJECT_PATTERN_NAME } from '../constants.ts';
|
|
3
|
+
import type { ProjectSchemaJSON, ServiceConfig, ServiceConfigJSON, ServiceMapJSON, ShapeJSON } from '../project-schema/index.ts';
|
|
4
|
+
import type { PatternGenerator, ServiceConfigUpdate, ServiceInfo, ServiceMap } from '../types/types.ts';
|
|
5
|
+
import type { DecryptFn, EncryptFn } from './types.ts';
|
|
6
|
+
/**
|
|
7
|
+
* Given a `StoredServiceConfig` returns a usable `ServiceConfig` with the
|
|
8
|
+
* authentication object decrypted.
|
|
9
|
+
*/
|
|
10
|
+
export declare function decryptServiceConfig(decryptFn: DecryptFn, storedServiceConfig: ServiceConfigJSON): ServiceConfig;
|
|
11
|
+
/**
|
|
12
|
+
* Given a `ServiceMapJSON` returns a usable `ServiceMap` with all the
|
|
13
|
+
* authentication objects decrypted.
|
|
14
|
+
*/
|
|
15
|
+
export declare function decryptServiceMap(decryptFn: DecryptFn, ServiceMapJSON: ServiceMapJSON): Promise<ServiceMap>;
|
|
16
|
+
/**
|
|
17
|
+
* Validates a `ServiceConfig` validator based on the JSON-schema.
|
|
18
|
+
*/
|
|
19
|
+
export declare function validateServiceConfig(maybeServiceConfig: unknown): ServiceConfigJSON;
|
|
20
|
+
/**
|
|
21
|
+
* Prepare a `ServiceConfig` object update, validating the overall structure
|
|
22
|
+
* and encrypting the `ServiceAuthentication` object.
|
|
23
|
+
*/
|
|
24
|
+
export declare function prepareServiceUpdate(encryptFn: EncryptFn, decryptFn: DecryptFn, projectSchema: ProjectSchemaJSON, serviceConfigUpdate: ServiceConfigUpdate, serviceKey: string): ServiceConfigJSON;
|
|
25
|
+
export type ServiceInfoWithServiceObject = Overwrite<ServiceInfo, {
|
|
26
|
+
generators: {
|
|
27
|
+
[SERVICE_OBJECT_PATTERN_NAME]: PatternGenerator;
|
|
28
|
+
};
|
|
29
|
+
}>;
|
|
30
|
+
export declare function getServiceObjectFields(projectSchema: ProjectSchemaJSON, shape: ShapeJSON, provider: string): ServiceInfoWithServiceObject[];
|
|
31
|
+
export declare function getServiceInfo(projectSchema: ProjectSchemaJSON, shape: ShapeJSON): Record<string, ServiceInfo[]>;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { SchemaValidationError } from '@takeshape/errors';
|
|
2
|
+
import { createAjv } from '@takeshape/json-schema';
|
|
3
|
+
import { mergeWithArrayMerge } from '@takeshape/util';
|
|
4
|
+
import isEqual from 'lodash/isEqual.js';
|
|
5
|
+
import isNull from 'lodash/isNull.js';
|
|
6
|
+
import { SERVICE_OBJECT_PATTERN_NAME } from "../constants.js";
|
|
7
|
+
import { createSchemaPropertyList, getGeneratorVersion, getServiceIdFieldName, getShapeDependencies, pathBetween } from "../schema-util.js";
|
|
8
|
+
import { latestSchemaJson } from "../schemas/index.js";
|
|
9
|
+
import { isEncryptedServiceConfig, isServiceAuthentication, isServiceResolver } from "../types/utils.js";
|
|
10
|
+
import { formatError } from "../validate/errors.js";
|
|
11
|
+
import { getStoredServiceConfig } from "./util.js";
|
|
12
|
+
/**
|
|
13
|
+
* Given a `StoredServiceConfig` returns a usable `ServiceConfig` with the
|
|
14
|
+
* authentication object decrypted.
|
|
15
|
+
*/
|
|
16
|
+
export function decryptServiceConfig(decryptFn, storedServiceConfig) {
|
|
17
|
+
let authentication;
|
|
18
|
+
if (isEncryptedServiceConfig(storedServiceConfig)) {
|
|
19
|
+
const decrypted = decryptFn(storedServiceConfig.authentication);
|
|
20
|
+
if (isServiceAuthentication(decrypted)) {
|
|
21
|
+
authentication = decrypted;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return {
|
|
25
|
+
...storedServiceConfig,
|
|
26
|
+
authentication
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Given a `ServiceMapJSON` returns a usable `ServiceMap` with all the
|
|
31
|
+
* authentication objects decrypted.
|
|
32
|
+
*/
|
|
33
|
+
export async function decryptServiceMap(decryptFn, ServiceMapJSON) {
|
|
34
|
+
return Object.entries(ServiceMapJSON).reduce((result, [serviceKey, serviceConfig]) => {
|
|
35
|
+
return result.set(serviceKey, decryptServiceConfig(decryptFn, serviceConfig));
|
|
36
|
+
}, new Map());
|
|
37
|
+
}
|
|
38
|
+
function createServiceConfigValidator() {
|
|
39
|
+
const validator = createAjv();
|
|
40
|
+
const { serviceConfig, ...definitions } = latestSchemaJson.definitions;
|
|
41
|
+
return validator.compile({
|
|
42
|
+
$id: 'ServiceConfig',
|
|
43
|
+
definitions,
|
|
44
|
+
...serviceConfig
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
const serviceConfigValidator = createServiceConfigValidator();
|
|
48
|
+
/**
|
|
49
|
+
* Validates a `ServiceConfig` validator based on the JSON-schema.
|
|
50
|
+
*/
|
|
51
|
+
export function validateServiceConfig(maybeServiceConfig) {
|
|
52
|
+
if (serviceConfigValidator(maybeServiceConfig)) {
|
|
53
|
+
return maybeServiceConfig;
|
|
54
|
+
}
|
|
55
|
+
throw new SchemaValidationError('ServiceConfig was invalid', serviceConfigValidator.errors?.map(formatError));
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Prepare a `ServiceConfig` object update, validating the overall structure
|
|
59
|
+
* and encrypting the `ServiceAuthentication` object.
|
|
60
|
+
*/
|
|
61
|
+
export function prepareServiceUpdate(encryptFn, decryptFn, projectSchema, serviceConfigUpdate, serviceKey) {
|
|
62
|
+
const storedServiceConfig = getStoredServiceConfig(projectSchema, serviceKey);
|
|
63
|
+
let newServiceConfig = serviceConfigUpdate;
|
|
64
|
+
if (storedServiceConfig) {
|
|
65
|
+
const existingServiceConfig = decryptServiceConfig(decryptFn, storedServiceConfig);
|
|
66
|
+
newServiceConfig = mergeWithArrayMerge(existingServiceConfig, serviceConfigUpdate);
|
|
67
|
+
}
|
|
68
|
+
const { authentication, authenticationType } = newServiceConfig;
|
|
69
|
+
if (authenticationType === 'none' || isNull(authentication)) {
|
|
70
|
+
// biome-ignore lint/performance/noDelete: Property presence may matter here
|
|
71
|
+
delete newServiceConfig.authentication;
|
|
72
|
+
}
|
|
73
|
+
else if (authentication !== undefined) {
|
|
74
|
+
// Add the discriminator to the authentication object, set authenticationType
|
|
75
|
+
// to ensure the update is correct for the auth type.
|
|
76
|
+
newServiceConfig.authentication = {
|
|
77
|
+
...authentication,
|
|
78
|
+
type: authenticationType
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
validateServiceConfig(newServiceConfig);
|
|
82
|
+
let serviceConfig;
|
|
83
|
+
if (newServiceConfig.authentication) {
|
|
84
|
+
serviceConfig = {
|
|
85
|
+
...newServiceConfig,
|
|
86
|
+
authentication: encryptFn(newServiceConfig.authentication)
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
serviceConfig = newServiceConfig;
|
|
91
|
+
}
|
|
92
|
+
return serviceConfig;
|
|
93
|
+
}
|
|
94
|
+
export function getServiceObjectFields(projectSchema, shape, provider) {
|
|
95
|
+
return (getServiceInfo(projectSchema, shape)[provider] ?? []).filter((serviceInfo) => serviceInfo.generators[SERVICE_OBJECT_PATTERN_NAME]);
|
|
96
|
+
}
|
|
97
|
+
// Returns info for all services found in shape, keyed by provider
|
|
98
|
+
export function getServiceInfo(projectSchema, shape) {
|
|
99
|
+
const result = {};
|
|
100
|
+
// Get inline dependencies by not following refs with @resolver
|
|
101
|
+
const inlineDepShapes = getShapeDependencies(projectSchema, shape, (prop) => !prop['@resolver']).map((name) => projectSchema.shapes[name]);
|
|
102
|
+
const shapesToCheck = [shape, ...inlineDepShapes];
|
|
103
|
+
for (const thisShape of shapesToCheck) {
|
|
104
|
+
// biome-ignore lint/complexity/noForEach: Types for createSchemaPropertyList do not include the iterator
|
|
105
|
+
createSchemaPropertyList(projectSchema, thisShape).forEach(([key, value]) => {
|
|
106
|
+
const resolver = value['@resolver'];
|
|
107
|
+
if (!isServiceResolver(resolver)) {
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
const serviceConfig = getStoredServiceConfig(projectSchema, resolver.service);
|
|
111
|
+
if (!serviceConfig) {
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
const { provider } = serviceConfig;
|
|
115
|
+
const generators = {};
|
|
116
|
+
const tag = value['@tag'];
|
|
117
|
+
if (tag?.startsWith(SERVICE_OBJECT_PATTERN_NAME)) {
|
|
118
|
+
const idFieldName = getServiceIdFieldName(key);
|
|
119
|
+
const version = tag.substr(Number(tag.lastIndexOf(':')) + 1);
|
|
120
|
+
generators[SERVICE_OBJECT_PATTERN_NAME] = {
|
|
121
|
+
version,
|
|
122
|
+
currentVersion: getGeneratorVersion(SERVICE_OBJECT_PATTERN_NAME),
|
|
123
|
+
idFieldName,
|
|
124
|
+
serviceObjectType: resolver.fieldName
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
const serviceInfo = {
|
|
128
|
+
service: resolver.service,
|
|
129
|
+
fieldName: key,
|
|
130
|
+
path: pathBetween(shape, thisShape, projectSchema),
|
|
131
|
+
generators
|
|
132
|
+
};
|
|
133
|
+
if (Array.isArray(result[provider])) {
|
|
134
|
+
// Dedupe service info
|
|
135
|
+
if (!result[provider].find((existingServiceInfo) => isEqual(existingServiceInfo, serviceInfo))) {
|
|
136
|
+
result[provider].push(serviceInfo);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
result[provider] = [serviceInfo];
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
return result;
|
|
145
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ProjectSchemaJSON, Resolver, ServiceConfig, ServiceConfigJSON } from '../project-schema/index.ts';
|
|
2
|
+
import type { ServiceKey } from '../types/types.ts';
|
|
3
|
+
/**
|
|
4
|
+
* Get a service config from a project schema.
|
|
5
|
+
*/
|
|
6
|
+
export declare function getStoredServiceConfig(projectSchema: ProjectSchemaJSON, serviceKey: ServiceKey): ServiceConfigJSON | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* Get a `Map` keyed with all the service namespaces.
|
|
9
|
+
*
|
|
10
|
+
* @param context A partial project schema
|
|
11
|
+
*
|
|
12
|
+
* @returns A `Map` with namespaces as keys, and service keys as values.
|
|
13
|
+
*/
|
|
14
|
+
export declare function getServiceNamespaces(context: Pick<ProjectSchemaJSON, 'services'>): Map<string, string>;
|
|
15
|
+
export declare function isMissingAuth(service: Pick<ServiceConfig | ServiceConfigJSON, 'authenticationType' | 'authentication'>): boolean;
|
|
16
|
+
export declare function getResolverServices(resolver: Resolver): string[];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ProjectSchemaJSON, ShapeJSON } from './project-schema/index.ts';
|
|
2
|
+
export type TaxonomyField = {
|
|
3
|
+
name: string;
|
|
4
|
+
key?: string;
|
|
5
|
+
};
|
|
6
|
+
export type Taxonomy = {
|
|
7
|
+
shapeId: string;
|
|
8
|
+
field: TaxonomyField;
|
|
9
|
+
};
|
|
10
|
+
export declare function getFirstStringFieldV3(shape: ShapeJSON, projectSchema: ProjectSchemaJSON): {
|
|
11
|
+
name: string;
|
|
12
|
+
key?: string;
|
|
13
|
+
} | null;
|
|
14
|
+
export declare const getTaxonomyField: (shape: ShapeJSON, projectSchema: ProjectSchemaJSON) => TaxonomyField | null;
|
|
15
|
+
export declare const getTaxonomies: (projectSchema: ProjectSchemaJSON) => Taxonomy[];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { weakMemoize } from '@takeshape/util';
|
|
2
|
+
import { createSchemaPropertyAccessor } from "./schema-util.js";
|
|
3
|
+
export function getFirstStringFieldV3(shape, projectSchema) {
|
|
4
|
+
const forms = projectSchema.forms?.[shape.name];
|
|
5
|
+
if (!forms?.default) {
|
|
6
|
+
return null;
|
|
7
|
+
}
|
|
8
|
+
const schemaProperties = createSchemaPropertyAccessor(projectSchema, shape);
|
|
9
|
+
const { order } = forms.default;
|
|
10
|
+
const name = order.find((name) => schemaProperties.getValue(name)?.type === 'string');
|
|
11
|
+
return name ? { name, key: schemaProperties.getKey(name) } : null;
|
|
12
|
+
}
|
|
13
|
+
export const getTaxonomyField = weakMemoize((shape, projectSchema) => shape.model?.type === 'taxonomy' ? getFirstStringFieldV3(shape, projectSchema) : null);
|
|
14
|
+
export const getTaxonomies = weakMemoize((projectSchema) => {
|
|
15
|
+
const { shapes } = projectSchema;
|
|
16
|
+
return Object.keys(shapes).reduce((result, shapeName) => {
|
|
17
|
+
const shape = shapes[shapeName];
|
|
18
|
+
const field = getTaxonomyField(shape, projectSchema);
|
|
19
|
+
if (field) {
|
|
20
|
+
result.push({ shapeId: shape.id, field });
|
|
21
|
+
}
|
|
22
|
+
return result;
|
|
23
|
+
}, []);
|
|
24
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import blogSchema from '@/examples/latest/blog-schema.json';
|
|
2
|
+
import { describe, expect, test } from 'vitest';
|
|
3
|
+
import { isValidTemplate, resolveTemplate } from "../index.js";
|
|
4
|
+
describe('resolveTemplate', () => {
|
|
5
|
+
test('success', () => {
|
|
6
|
+
expect(resolveTemplate(blogSchema, 'TSGetArgs', 'Post')).toEqual({
|
|
7
|
+
dependencies: {
|
|
8
|
+
PostTSGetArgs: {
|
|
9
|
+
id: 'PostTSGetArgs',
|
|
10
|
+
name: 'PostTSGetArgs',
|
|
11
|
+
schema: {
|
|
12
|
+
properties: {
|
|
13
|
+
_id: { type: 'string' },
|
|
14
|
+
enableLocaleFallback: { default: true, type: 'boolean' },
|
|
15
|
+
locale: { type: 'string' }
|
|
16
|
+
},
|
|
17
|
+
required: ['_id'],
|
|
18
|
+
type: 'object'
|
|
19
|
+
},
|
|
20
|
+
title: 'PostTSGetArgs'
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
shapeName: 'PostTSGetArgs'
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
test('invalid template', () => {
|
|
27
|
+
expect(() => resolveTemplate(blogSchema, 'TSGetRekt', 'Post')).toThrowError('Invalid shape template TSGetRekt');
|
|
28
|
+
});
|
|
29
|
+
test('invalid shape', () => {
|
|
30
|
+
expect(() => resolveTemplate(blogSchema, 'TSGetArgs', 'Nerd')).toThrowError('Unknown shape "Nerd" in template "TSGetArgs"');
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
describe('isValidTemplate', () => {
|
|
34
|
+
test('yes', () => {
|
|
35
|
+
expect(isValidTemplate('TSGetArgs')).toEqual(true);
|
|
36
|
+
});
|
|
37
|
+
test('no', () => {
|
|
38
|
+
expect(isValidTemplate('TSGetBreakfast')).toEqual(false);
|
|
39
|
+
});
|
|
40
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import { getOutputShapeName } from "../names.js";
|
|
3
|
+
describe('getOutputShapeName', () => {
|
|
4
|
+
it('should remove "Input" suffix from the name', () => {
|
|
5
|
+
expect(getOutputShapeName('UserInput')).toBe('User');
|
|
6
|
+
});
|
|
7
|
+
it('should remove "PartialInput" suffix from the name', () => {
|
|
8
|
+
expect(getOutputShapeName('UserPartialInput')).toBe('User');
|
|
9
|
+
});
|
|
10
|
+
it('should not change the name if it does not have "Input" or "PartialInput" suffix', () => {
|
|
11
|
+
expect(getOutputShapeName('User')).toBe('User');
|
|
12
|
+
});
|
|
13
|
+
it('should not change the name if it has "Input" or "PartialInput" in the middle', () => {
|
|
14
|
+
expect(getOutputShapeName('InputUserPartial')).toBe('InputUserPartial');
|
|
15
|
+
});
|
|
16
|
+
it('should handle empty string', () => {
|
|
17
|
+
expect(getOutputShapeName('')).toBe('');
|
|
18
|
+
});
|
|
19
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import { createMockSchema } from "../../mocks.js";
|
|
3
|
+
import { CreateArgs, DeleteArgs, DuplicateArgs, UpdateArgs } from "../templates.js";
|
|
4
|
+
describe('getMutationArgs', () => {
|
|
5
|
+
const Mock = {
|
|
6
|
+
title: 'Mock',
|
|
7
|
+
name: 'Mock',
|
|
8
|
+
id: 'Mock',
|
|
9
|
+
schema: {
|
|
10
|
+
type: 'object',
|
|
11
|
+
properties: {
|
|
12
|
+
title: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
'@input': {
|
|
15
|
+
type: 'number'
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
const projectSchema = createMockSchema('<project-id>', {
|
|
22
|
+
shapes: { Mock }
|
|
23
|
+
});
|
|
24
|
+
it('should substitute @input for the original field schema', () => {
|
|
25
|
+
const createResult = CreateArgs({ projectSchema }, Mock);
|
|
26
|
+
expect(createResult.dependencies.CreateMockInput.schema).toEqual({
|
|
27
|
+
type: 'object',
|
|
28
|
+
properties: {
|
|
29
|
+
title: {
|
|
30
|
+
'@output': {
|
|
31
|
+
type: 'string'
|
|
32
|
+
},
|
|
33
|
+
type: 'number'
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
const updateResult = UpdateArgs({ projectSchema }, Mock);
|
|
38
|
+
expect(updateResult.dependencies.UpdateMockInput.schema).toEqual({
|
|
39
|
+
type: 'object',
|
|
40
|
+
properties: {
|
|
41
|
+
_id: {
|
|
42
|
+
type: 'string'
|
|
43
|
+
},
|
|
44
|
+
title: {
|
|
45
|
+
'@output': {
|
|
46
|
+
type: 'string'
|
|
47
|
+
},
|
|
48
|
+
type: 'number'
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
required: ['_id']
|
|
52
|
+
});
|
|
53
|
+
const duplicateResult = DuplicateArgs({ projectSchema }, Mock);
|
|
54
|
+
expect(duplicateResult.dependencies.DuplicateMockInput.schema).toEqual({
|
|
55
|
+
type: 'object',
|
|
56
|
+
properties: {
|
|
57
|
+
_id: {
|
|
58
|
+
type: 'string'
|
|
59
|
+
},
|
|
60
|
+
title: {
|
|
61
|
+
'@output': {
|
|
62
|
+
type: 'string'
|
|
63
|
+
},
|
|
64
|
+
type: 'number'
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
required: ['_id']
|
|
68
|
+
});
|
|
69
|
+
const deleteResult = DeleteArgs({ projectSchema }, Mock);
|
|
70
|
+
expect(deleteResult.dependencies.DeleteMockInput.schema).toEqual({
|
|
71
|
+
type: 'object',
|
|
72
|
+
properties: {
|
|
73
|
+
_id: {
|
|
74
|
+
type: 'string'
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
required: ['_id']
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
});
|