@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 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import massiveSchemaJson from '@/examples/latest/massive-schema.json';
|
|
2
|
+
import millSchemaJson from '@/examples/latest/mill-components-schema.json';
|
|
3
|
+
import { DEFAULT_ENTITLEMENTS } from '@takeshape/util';
|
|
4
|
+
import { expect, test } from 'vitest';
|
|
5
|
+
import { createMockSchema } from "../../mocks.js";
|
|
6
|
+
import { isEqualRelationship } from "../../relationships.js";
|
|
7
|
+
import { applyDefaultsToSchema } from "../../schema-util.js";
|
|
8
|
+
import { isModelShape } from "../../types/index.js";
|
|
9
|
+
import { validateSchema } from "../../validate/validate.js";
|
|
10
|
+
import { getWhereShape } from "../where.js";
|
|
11
|
+
const massiveSchema = applyDefaultsToSchema(massiveSchemaJson);
|
|
12
|
+
const millSchema = applyDefaultsToSchema(millSchemaJson);
|
|
13
|
+
async function validateShapes(shapes) {
|
|
14
|
+
return (await validateSchema({
|
|
15
|
+
entitlements: DEFAULT_ENTITLEMENTS
|
|
16
|
+
}, createMockSchema('project-id', { shapes }))).errors;
|
|
17
|
+
}
|
|
18
|
+
test('getWhereShape - massive', async () => {
|
|
19
|
+
const { shapeName, dependencies } = getWhereShape(massiveSchema, Object.values(massiveSchema.shapes).filter(isModelShape));
|
|
20
|
+
expect(await validateShapes(dependencies)).toEqual(undefined);
|
|
21
|
+
expect(shapeName).toBe('TSWhereInput');
|
|
22
|
+
expect(dependencies).toMatchSnapshot();
|
|
23
|
+
});
|
|
24
|
+
test('getWhereShape - mill', async () => {
|
|
25
|
+
const { shapeName, dependencies } = getWhereShape(millSchema, Object.values(millSchema.shapes).filter(isModelShape));
|
|
26
|
+
expect(await validateShapes(dependencies)).toEqual(undefined);
|
|
27
|
+
expect(shapeName).toBe('TSWhereInput');
|
|
28
|
+
expect(dependencies).toMatchSnapshot();
|
|
29
|
+
});
|
|
30
|
+
test('getWhereShape - recursive', async () => {
|
|
31
|
+
const schema = createMockSchema('project-id', {
|
|
32
|
+
shapes: {
|
|
33
|
+
Node: {
|
|
34
|
+
name: 'Node',
|
|
35
|
+
title: 'Node',
|
|
36
|
+
id: 'node-id',
|
|
37
|
+
schema: {
|
|
38
|
+
type: 'object',
|
|
39
|
+
properties: {
|
|
40
|
+
foreign: { '@ref': 'stripe:Customer' },
|
|
41
|
+
left: { '@ref': 'local:Node' },
|
|
42
|
+
right: { '@ref': 'local:Node' },
|
|
43
|
+
value: { type: 'number' }
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
Stripe_Customer: {
|
|
48
|
+
name: 'Stripe_Customer',
|
|
49
|
+
title: 'Stripe_Customer',
|
|
50
|
+
id: 'Stripe_Customer',
|
|
51
|
+
schema: {
|
|
52
|
+
type: 'object',
|
|
53
|
+
properties: {}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
services: {
|
|
58
|
+
stripe: {
|
|
59
|
+
id: 'stripe',
|
|
60
|
+
title: 'Stripe',
|
|
61
|
+
namespace: 'Stripe',
|
|
62
|
+
provider: 'openapi',
|
|
63
|
+
serviceType: 'openapi',
|
|
64
|
+
authenticationType: 'none'
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
const { shapeName, dependencies } = getWhereShape(schema, [schema.shapes.Node]);
|
|
69
|
+
expect(await validateShapes(dependencies)).toEqual(undefined);
|
|
70
|
+
expect(shapeName).toBe('TSWhereNodeInput');
|
|
71
|
+
expect(dependencies).toMatchInlineSnapshot(`
|
|
72
|
+
{
|
|
73
|
+
"TSWhereNode": {
|
|
74
|
+
"id": "TSWhereNode",
|
|
75
|
+
"name": "TSWhereNode",
|
|
76
|
+
"schema": {
|
|
77
|
+
"properties": {
|
|
78
|
+
"left": {
|
|
79
|
+
"@ref": "local:TSWhereNode",
|
|
80
|
+
},
|
|
81
|
+
"right": {
|
|
82
|
+
"@ref": "local:TSWhereNode",
|
|
83
|
+
},
|
|
84
|
+
"value": {
|
|
85
|
+
"@ref": "local:TSWhereNumber",
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
"type": "object",
|
|
89
|
+
},
|
|
90
|
+
"title": "TSWhereNode",
|
|
91
|
+
},
|
|
92
|
+
"TSWhereNodeInput": {
|
|
93
|
+
"id": "TSWhereNodeInput",
|
|
94
|
+
"name": "TSWhereNodeInput",
|
|
95
|
+
"schema": {
|
|
96
|
+
"properties": {
|
|
97
|
+
"AND": {
|
|
98
|
+
"items": {
|
|
99
|
+
"@ref": "local:TSWhereNodeInput",
|
|
100
|
+
},
|
|
101
|
+
"type": "array",
|
|
102
|
+
},
|
|
103
|
+
"NOT": {
|
|
104
|
+
"@ref": "local:TSWhereNodeInput",
|
|
105
|
+
},
|
|
106
|
+
"OR": {
|
|
107
|
+
"items": {
|
|
108
|
+
"@ref": "local:TSWhereNodeInput",
|
|
109
|
+
},
|
|
110
|
+
"type": "array",
|
|
111
|
+
},
|
|
112
|
+
"left": {
|
|
113
|
+
"@ref": "local:TSWhereNode",
|
|
114
|
+
},
|
|
115
|
+
"right": {
|
|
116
|
+
"@ref": "local:TSWhereNode",
|
|
117
|
+
},
|
|
118
|
+
"value": {
|
|
119
|
+
"@ref": "local:TSWhereNumber",
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
"type": "object",
|
|
123
|
+
},
|
|
124
|
+
"title": "TSWhereNodeInput",
|
|
125
|
+
},
|
|
126
|
+
"TSWhereNumber": {
|
|
127
|
+
"id": "TSWhereNumber",
|
|
128
|
+
"name": "TSWhereNumber",
|
|
129
|
+
"schema": {
|
|
130
|
+
"properties": {
|
|
131
|
+
"eq": {
|
|
132
|
+
"description": "Exact match",
|
|
133
|
+
"type": "number",
|
|
134
|
+
},
|
|
135
|
+
"gt": {
|
|
136
|
+
"description": "Greater than",
|
|
137
|
+
"type": "number",
|
|
138
|
+
},
|
|
139
|
+
"gte": {
|
|
140
|
+
"description": "Greater than or equal",
|
|
141
|
+
"type": "number",
|
|
142
|
+
},
|
|
143
|
+
"in": {
|
|
144
|
+
"description": "Array of possible exact match values.",
|
|
145
|
+
"items": {
|
|
146
|
+
"type": "number",
|
|
147
|
+
},
|
|
148
|
+
"type": "array",
|
|
149
|
+
},
|
|
150
|
+
"lt": {
|
|
151
|
+
"description": "Less than",
|
|
152
|
+
"type": "number",
|
|
153
|
+
},
|
|
154
|
+
"lte": {
|
|
155
|
+
"description": "Less than or equal",
|
|
156
|
+
"type": "number",
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
"type": "object",
|
|
160
|
+
},
|
|
161
|
+
"title": "TSWhereNumber",
|
|
162
|
+
},
|
|
163
|
+
}
|
|
164
|
+
`);
|
|
165
|
+
});
|
|
166
|
+
test('isEqualRelationship - non-relationship', () => {
|
|
167
|
+
expect(isEqualRelationship({ type: 'string' }, { type: 'number' })).toBe(true);
|
|
168
|
+
});
|
|
169
|
+
test('isEqualRelationship - relationship to non-relationship', () => {
|
|
170
|
+
const a = {
|
|
171
|
+
'@resolver': {
|
|
172
|
+
name: 'shapedb:getRelated',
|
|
173
|
+
service: 'shapedb'
|
|
174
|
+
},
|
|
175
|
+
oneOf: [{ '@ref': 'local:A' }, { '@ref': 'local:B' }, { '@ref': 'local:C' }]
|
|
176
|
+
};
|
|
177
|
+
const b = {
|
|
178
|
+
type: 'string'
|
|
179
|
+
};
|
|
180
|
+
expect(isEqualRelationship(a, b)).toBe(false);
|
|
181
|
+
expect(isEqualRelationship(b, a)).toBe(false);
|
|
182
|
+
});
|
|
183
|
+
test('isEqualRelationship - relationships', () => {
|
|
184
|
+
const a = {
|
|
185
|
+
'@resolver': {
|
|
186
|
+
name: 'shapedb:getRelated',
|
|
187
|
+
service: 'shapedb'
|
|
188
|
+
},
|
|
189
|
+
oneOf: [{ '@ref': 'local:A' }, { '@ref': 'local:B' }, { '@ref': 'local:C' }]
|
|
190
|
+
};
|
|
191
|
+
const b = {
|
|
192
|
+
'@resolver': {
|
|
193
|
+
name: 'shapedb:getRelated',
|
|
194
|
+
service: 'shapedb'
|
|
195
|
+
},
|
|
196
|
+
oneOf: [{ '@ref': 'local:C' }, { '@ref': 'local:A' }, { '@ref': 'local:B' }]
|
|
197
|
+
};
|
|
198
|
+
expect(isEqualRelationship(a, b)).toBe(true);
|
|
199
|
+
expect(isEqualRelationship(b, a)).toBe(true);
|
|
200
|
+
});
|
|
201
|
+
test('isEqualRelationship - relationships', () => {
|
|
202
|
+
const a = {
|
|
203
|
+
'@resolver': {
|
|
204
|
+
name: 'shapedb:getRelated',
|
|
205
|
+
service: 'shapedb'
|
|
206
|
+
},
|
|
207
|
+
oneOf: [{ '@ref': 'local:A' }, { '@ref': 'local:B' }, { '@ref': 'local:C' }]
|
|
208
|
+
};
|
|
209
|
+
const b = {
|
|
210
|
+
'@resolver': {
|
|
211
|
+
name: 'shapedb:getRelated',
|
|
212
|
+
service: 'shapedb'
|
|
213
|
+
},
|
|
214
|
+
oneOf: [{ '@ref': 'local:C' }]
|
|
215
|
+
};
|
|
216
|
+
expect(isEqualRelationship(a, b)).toBe(false);
|
|
217
|
+
expect(isEqualRelationship(b, a)).toBe(false);
|
|
218
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ProjectSchemaJSON } from '../project-schema/index.ts';
|
|
2
|
+
import type { ResolvedTemplate } from './types.ts';
|
|
3
|
+
export declare function resolveTemplate(projectSchema: ProjectSchemaJSON, templateName: string, shapeName: string): ResolvedTemplate;
|
|
4
|
+
/**
|
|
5
|
+
* Check if a string is a known template such as `PaginatedList`
|
|
6
|
+
*/
|
|
7
|
+
export declare function isValidTemplate(template: string): boolean;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { TemplateVerbs } from './types.ts';
|
|
2
|
+
/**
|
|
3
|
+
* Construct a shape name used for a mutation input shape.
|
|
4
|
+
*/
|
|
5
|
+
export declare function getMutationInputShapeName(verb: TemplateVerbs): (shapeName: string) => string;
|
|
6
|
+
/**
|
|
7
|
+
* Create a shape name variant for an input.
|
|
8
|
+
*/
|
|
9
|
+
export declare function getInputShapeName(shapeName: string): string;
|
|
10
|
+
export declare function getOutputShapeName(name: string): string;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ObjectSchema, PropertySchema, ShapeJSON } from '../project-schema/index.ts';
|
|
2
|
+
import { TemplateVerbs } from './types.ts';
|
|
3
|
+
import type { ResolvedTemplate, TemplateContext } from './types.ts';
|
|
4
|
+
export declare const TSGetArgs: (context: unknown, shape: ShapeJSON) => ResolvedTemplate;
|
|
5
|
+
export declare const TSGetSingletonArgs: (context: unknown, shape: ShapeJSON) => ResolvedTemplate;
|
|
6
|
+
export declare const TSListArgs: (context: TemplateContext, shape: ShapeJSON) => ResolvedTemplate;
|
|
7
|
+
export declare const TSSearchArgs: (context: TemplateContext, shape: ShapeJSON) => ResolvedTemplate;
|
|
8
|
+
export declare const CreateArgs: ({ projectSchema }: TemplateContext, shape: ShapeJSON) => ResolvedTemplate;
|
|
9
|
+
export declare const UpdateArgs: ({ projectSchema }: TemplateContext, shape: ShapeJSON) => ResolvedTemplate;
|
|
10
|
+
export declare const DuplicateArgs: ({ projectSchema }: TemplateContext, shape: ShapeJSON) => ResolvedTemplate;
|
|
11
|
+
export declare const DeleteArgs: ({ projectSchema }: TemplateContext, shape: ShapeJSON) => ResolvedTemplate;
|
|
12
|
+
export declare const PaginatedList: typeof getPaginatedListShape;
|
|
13
|
+
export declare const SearchResults: typeof getSearchResultsShape;
|
|
14
|
+
export declare const CreateResult: (context: unknown, shape: ShapeJSON) => ResolvedTemplate;
|
|
15
|
+
export declare const UpdateResult: (context: unknown, shape: ShapeJSON) => ResolvedTemplate;
|
|
16
|
+
export declare const DuplicateResult: (context: unknown, shape: ShapeJSON) => ResolvedTemplate;
|
|
17
|
+
export declare const DeleteResult: (context: unknown, shape: ShapeJSON) => ResolvedTemplate;
|
|
18
|
+
export declare const TSSearchSortInput: ShapeJSON;
|
|
19
|
+
export declare const commonSearchProps: Record<string, PropertySchema>;
|
|
20
|
+
export declare const localeProps: ObjectSchema;
|
|
21
|
+
export declare const termsProps: ObjectSchema;
|
|
22
|
+
export declare const TSContentStructureInput: ShapeJSON;
|
|
23
|
+
export declare function getPaginatedListShape(context: unknown, shape: ShapeJSON): ResolvedTemplate;
|
|
24
|
+
export declare function getSearchResultsShape(context: unknown, shape: ShapeJSON): ResolvedTemplate;
|
|
25
|
+
export declare function getIDQueryArgs(templateName: string): (context: unknown, shape: ShapeJSON) => ResolvedTemplate;
|
|
26
|
+
/**
|
|
27
|
+
* Construct shapes for a mutation inputs, given source shape info.
|
|
28
|
+
*/
|
|
29
|
+
export declare function getMutationArgs(templateName: string, verb: TemplateVerbs): ({ projectSchema }: TemplateContext, shape: ShapeJSON) => ResolvedTemplate;
|
|
30
|
+
export declare function getMutationResultType(verb: TemplateVerbs): (context: unknown, shape: ShapeJSON) => ResolvedTemplate;
|
|
31
|
+
export declare const commonSearchArgs: ObjectSchema;
|
|
32
|
+
export declare function getShapeListQueryArgs(templateName: string, legacyArgs: boolean): (context: TemplateContext, shape: ShapeJSON) => ResolvedTemplate;
|
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
import { deepClone, formatShapeName, isDefined, visit } from '@takeshape/util';
|
|
2
|
+
import get from 'lodash/get.js';
|
|
3
|
+
import keyBy from 'lodash/keyBy.js';
|
|
4
|
+
import { createInputSchema } from "../create-input-schema.js";
|
|
5
|
+
import { listTypePrefix } from "../migration/index.js";
|
|
6
|
+
import { getFlattenedTemplateShapeName, getRef, getRefShapeName, refItemToAtRef, refItemToNamespacedShapeName } from "../refs.js";
|
|
7
|
+
import { createShape, getShapeDependencies } from "../schema-util.js";
|
|
8
|
+
import { isCachedShape } from "../types/index.js";
|
|
9
|
+
import { mergeObjectSchemas, mergeSchemaProperties } from "../util/merge.js";
|
|
10
|
+
import { getInputShapeName, getMutationInputShapeName } from "./names.js";
|
|
11
|
+
import { TemplateVerbs } from "./types.js";
|
|
12
|
+
import { getWhereSearchArg } from "./where.js";
|
|
13
|
+
export const TSGetArgs = getIDQueryArgs('TSGetArgs');
|
|
14
|
+
export const TSGetSingletonArgs = getIDQueryArgs('TSGetSingletonArgs');
|
|
15
|
+
export const TSListArgs = getShapeListQueryArgs('TSListArgs', true);
|
|
16
|
+
export const TSSearchArgs = getShapeListQueryArgs('TSSearchArgs', false);
|
|
17
|
+
export const CreateArgs = getMutationArgs('CreateArgs', TemplateVerbs.Create);
|
|
18
|
+
export const UpdateArgs = getMutationArgs('UpdateArgs', TemplateVerbs.Update);
|
|
19
|
+
export const DuplicateArgs = getMutationArgs('DuplicateArgs', TemplateVerbs.Duplicate);
|
|
20
|
+
export const DeleteArgs = getMutationArgs('DeleteArgs', TemplateVerbs.Delete);
|
|
21
|
+
export const PaginatedList = getPaginatedListShape;
|
|
22
|
+
export const SearchResults = getSearchResultsShape;
|
|
23
|
+
export const CreateResult = getMutationResultType(TemplateVerbs.Create);
|
|
24
|
+
export const UpdateResult = getMutationResultType(TemplateVerbs.Update);
|
|
25
|
+
export const DuplicateResult = getMutationResultType(TemplateVerbs.Duplicate);
|
|
26
|
+
export const DeleteResult = getMutationResultType(TemplateVerbs.Delete);
|
|
27
|
+
export const TSSearchSortInput = createShape('TSSearchSortInput', {
|
|
28
|
+
type: 'object',
|
|
29
|
+
properties: {
|
|
30
|
+
field: { type: 'string' },
|
|
31
|
+
order: {
|
|
32
|
+
type: 'string',
|
|
33
|
+
description: '"asc" for ascending or "desc" for descending'
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
required: ['field', 'order']
|
|
37
|
+
});
|
|
38
|
+
export const commonSearchProps = {
|
|
39
|
+
terms: { type: 'string' },
|
|
40
|
+
from: {
|
|
41
|
+
type: 'integer',
|
|
42
|
+
description: 'The offset from the first result you want to fetch.'
|
|
43
|
+
},
|
|
44
|
+
size: {
|
|
45
|
+
type: 'integer',
|
|
46
|
+
description: 'The maximum number of items to return.'
|
|
47
|
+
},
|
|
48
|
+
filter: {
|
|
49
|
+
type: 'object',
|
|
50
|
+
description: 'An elasticsearch style filter. Overrides onlyEnabled.'
|
|
51
|
+
},
|
|
52
|
+
sort: {
|
|
53
|
+
type: 'array',
|
|
54
|
+
description: 'An list of fields to sort by.',
|
|
55
|
+
items: {
|
|
56
|
+
'@ref': `local:${TSSearchSortInput.name}`
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
export const localeProps = {
|
|
61
|
+
type: 'object',
|
|
62
|
+
properties: {
|
|
63
|
+
locale: { type: 'string' },
|
|
64
|
+
enableLocaleFallback: { type: 'boolean', default: true }
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
export const termsProps = {
|
|
68
|
+
type: 'object',
|
|
69
|
+
properties: {
|
|
70
|
+
terms: { type: 'string' }
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
export const TSContentStructureInput = createShape('TSContentStructureInput', {
|
|
74
|
+
type: 'object',
|
|
75
|
+
properties: {
|
|
76
|
+
path: {
|
|
77
|
+
type: 'string',
|
|
78
|
+
description: 'A deep path to the array being updated (e.g. a.b[1].c).'
|
|
79
|
+
},
|
|
80
|
+
structure: {
|
|
81
|
+
type: 'array',
|
|
82
|
+
description: 'An array where the indices represent the to index, and the values represent the from index.' +
|
|
83
|
+
'For example to transform ["a","b","c","d"] into ["c","a"], this value would be [2,0].',
|
|
84
|
+
items: {
|
|
85
|
+
type: 'integer'
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
required: ['path']
|
|
90
|
+
}, { description: 'Describes a structural update to an array of data.' });
|
|
91
|
+
export function getPaginatedListShape(context, shape) {
|
|
92
|
+
const shapeName = `${shape.name}${listTypePrefix}`;
|
|
93
|
+
return {
|
|
94
|
+
shapeName,
|
|
95
|
+
dependencies: {
|
|
96
|
+
[shapeName]: createShape(shapeName, {
|
|
97
|
+
type: 'object',
|
|
98
|
+
properties: {
|
|
99
|
+
items: { type: 'array', items: { '@ref': `local:${shape.name}` } },
|
|
100
|
+
total: { type: 'integer' }
|
|
101
|
+
},
|
|
102
|
+
required: ['items', 'total']
|
|
103
|
+
})
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
export function getSearchResultsShape(context, shape) {
|
|
108
|
+
const shapeName = `${shape.name}SearchResults`;
|
|
109
|
+
return {
|
|
110
|
+
shapeName,
|
|
111
|
+
dependencies: {
|
|
112
|
+
[shapeName]: createShape(shapeName, {
|
|
113
|
+
type: 'object',
|
|
114
|
+
properties: {
|
|
115
|
+
results: {
|
|
116
|
+
type: 'array',
|
|
117
|
+
items: { '@ref': `local:${shape.name}` }
|
|
118
|
+
},
|
|
119
|
+
total: { type: 'integer' }
|
|
120
|
+
},
|
|
121
|
+
required: ['results', 'total']
|
|
122
|
+
}, { description: `${shape.name} search results` })
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
const contentStructureFields = {
|
|
127
|
+
type: 'object',
|
|
128
|
+
properties: {
|
|
129
|
+
structure: {
|
|
130
|
+
type: 'array',
|
|
131
|
+
items: {
|
|
132
|
+
'@ref': 'local:TSContentStructureInput'
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
const idSchema = {
|
|
138
|
+
type: 'object',
|
|
139
|
+
properties: {
|
|
140
|
+
_id: { type: 'string' }
|
|
141
|
+
},
|
|
142
|
+
required: ['_id']
|
|
143
|
+
};
|
|
144
|
+
export function getIDQueryArgs(templateName) {
|
|
145
|
+
return (context, shape) => {
|
|
146
|
+
const schema = shape.model?.type !== 'single' ? mergeSchemaProperties(idSchema, localeProps) : localeProps;
|
|
147
|
+
const shapeName = getFlattenedTemplateShapeName(shape.name, templateName);
|
|
148
|
+
return {
|
|
149
|
+
shapeName,
|
|
150
|
+
dependencies: {
|
|
151
|
+
[shapeName]: createShape(shapeName, schema)
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
function rewriteRefs(context, shapeSchema, rewriteShapeName) {
|
|
157
|
+
const newSchema = deepClone(shapeSchema);
|
|
158
|
+
visit(newSchema, ['$ref', '@ref'], (_, path) => {
|
|
159
|
+
const parentPath = path.slice(0, -1);
|
|
160
|
+
const value = get(newSchema, parentPath);
|
|
161
|
+
if ((value['@ref'] || value.$ref) && !parentPath.includes('@input') && !parentPath.includes('@output')) {
|
|
162
|
+
const refItem = getRef(context, value);
|
|
163
|
+
if (refItem) {
|
|
164
|
+
value['@ref'] = refItem.isForeign
|
|
165
|
+
? refItemToAtRef(refItem)
|
|
166
|
+
: `local:${rewriteShapeName(refItemToNamespacedShapeName(refItem))}`;
|
|
167
|
+
if (value.$ref) {
|
|
168
|
+
// biome-ignore lint/performance/noDelete: Property presence may matter here
|
|
169
|
+
delete value.$ref;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
return newSchema;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Construct shapes for a mutation inputs, given source shape info.
|
|
178
|
+
*/
|
|
179
|
+
export function getMutationArgs(templateName, verb) {
|
|
180
|
+
const getShapeName = getMutationInputShapeName(verb);
|
|
181
|
+
const addLocale = verb === TemplateVerbs.Update || verb === TemplateVerbs.Duplicate;
|
|
182
|
+
const addStructure = verb === TemplateVerbs.Update;
|
|
183
|
+
const isUpdate = verb === TemplateVerbs.Update || verb === TemplateVerbs.Duplicate;
|
|
184
|
+
return ({ projectSchema }, shape) => {
|
|
185
|
+
const inputName = getShapeName(shape.name);
|
|
186
|
+
const isSingleton = shape.model && shape.model.type === 'single';
|
|
187
|
+
const shouldRequireId = !isSingleton &&
|
|
188
|
+
(verb === TemplateVerbs.Update || verb === TemplateVerbs.Delete || verb === TemplateVerbs.Duplicate);
|
|
189
|
+
let rewrittenSchema;
|
|
190
|
+
let inputShapeSchema;
|
|
191
|
+
if (verb !== TemplateVerbs.Delete) {
|
|
192
|
+
rewrittenSchema = createInputSchema(shape.schema, { isUpdate });
|
|
193
|
+
inputShapeSchema = rewriteRefs(projectSchema, rewrittenSchema, getInputShapeName);
|
|
194
|
+
}
|
|
195
|
+
const inputShape = createShape(inputName, mergeObjectSchemas(shouldRequireId ? idSchema : undefined, inputShapeSchema), { description: `${verb} ${shape.name} input` });
|
|
196
|
+
const argsShapeName = getFlattenedTemplateShapeName(shape.name, templateName);
|
|
197
|
+
const argsShape = createShape(argsShapeName, mergeObjectSchemas({
|
|
198
|
+
type: 'object',
|
|
199
|
+
properties: {
|
|
200
|
+
input: { '@ref': `local:${inputShape.name}` },
|
|
201
|
+
clientMutationId: { type: 'string' }
|
|
202
|
+
},
|
|
203
|
+
required: ['input']
|
|
204
|
+
}, addStructure ? contentStructureFields : undefined, addLocale ? localeProps : undefined));
|
|
205
|
+
return {
|
|
206
|
+
shapeName: argsShapeName,
|
|
207
|
+
dependencies: {
|
|
208
|
+
[inputName]: inputShape,
|
|
209
|
+
[argsShapeName]: argsShape,
|
|
210
|
+
...(verb !== TemplateVerbs.Delete &&
|
|
211
|
+
keyBy(getShapeDependencies(projectSchema,
|
|
212
|
+
// get the shape dependencies of the shape with the @input swapped
|
|
213
|
+
createShape(inputShape.name, rewrittenSchema), (propSchema) => {
|
|
214
|
+
if (propSchema['@resolver']) {
|
|
215
|
+
return false;
|
|
216
|
+
}
|
|
217
|
+
const shapeName = getRefShapeName(projectSchema, propSchema);
|
|
218
|
+
if (shapeName) {
|
|
219
|
+
return shapeName !== 'TSRelationship' && !projectSchema.shapes[getInputShapeName(shapeName)];
|
|
220
|
+
}
|
|
221
|
+
return true;
|
|
222
|
+
})
|
|
223
|
+
.map((shapeName) => {
|
|
224
|
+
const shape = projectSchema.shapes[shapeName];
|
|
225
|
+
if (!shape) {
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
// We only allow partial input at the top-level
|
|
229
|
+
return createShape(getInputShapeName(shapeName), rewriteRefs(projectSchema, createInputSchema(shape.schema), getInputShapeName));
|
|
230
|
+
})
|
|
231
|
+
.filter(isDefined), 'name')),
|
|
232
|
+
...(addStructure ? { TSContentStructureInput } : {})
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
export function getMutationResultType(verb) {
|
|
238
|
+
return (context, shape) => {
|
|
239
|
+
const shapeName = formatShapeName([verb, shape.name, 'result'], {
|
|
240
|
+
shapeNameIndex: 1
|
|
241
|
+
});
|
|
242
|
+
const result = verb === TemplateVerbs.Delete ? { type: 'boolean' } : { '@ref': `local:${shape.name}` };
|
|
243
|
+
return {
|
|
244
|
+
shapeName,
|
|
245
|
+
dependencies: {
|
|
246
|
+
[shapeName]: createShape(shapeName, {
|
|
247
|
+
type: 'object',
|
|
248
|
+
properties: {
|
|
249
|
+
clientMutationId: { type: 'string' },
|
|
250
|
+
result
|
|
251
|
+
}
|
|
252
|
+
})
|
|
253
|
+
}
|
|
254
|
+
};
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
export const commonSearchArgs = {
|
|
258
|
+
type: 'object',
|
|
259
|
+
properties: {
|
|
260
|
+
terms: { type: 'string' },
|
|
261
|
+
from: {
|
|
262
|
+
type: 'integer',
|
|
263
|
+
description: 'The offset from the first result you want to fetch.'
|
|
264
|
+
},
|
|
265
|
+
size: {
|
|
266
|
+
type: 'integer',
|
|
267
|
+
description: 'The maximum number of items to return.'
|
|
268
|
+
},
|
|
269
|
+
filter: {
|
|
270
|
+
type: 'object',
|
|
271
|
+
description: 'An elasticsearch style filter. Overrides onlyEnabled.'
|
|
272
|
+
},
|
|
273
|
+
sort: {
|
|
274
|
+
type: 'array',
|
|
275
|
+
description: 'An list of fields to sort by.',
|
|
276
|
+
items: {
|
|
277
|
+
'@ref': `local:${TSSearchSortInput.name}`
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
};
|
|
282
|
+
const legacyListArgs = {
|
|
283
|
+
type: 'object',
|
|
284
|
+
properties: {
|
|
285
|
+
onlyEnabled: {
|
|
286
|
+
type: 'boolean',
|
|
287
|
+
default: true,
|
|
288
|
+
description: 'Filter out content that is not enabled. Defaults to true.'
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
};
|
|
292
|
+
const shapeFilterProps = {
|
|
293
|
+
type: 'object',
|
|
294
|
+
properties: {
|
|
295
|
+
shapeNames: { type: 'array', items: { type: 'string' } },
|
|
296
|
+
shapeIds: { type: 'array', items: { type: 'string' } },
|
|
297
|
+
contentTypeNames: { type: 'array', items: { type: 'string' } },
|
|
298
|
+
contentTypeIds: { type: 'array', items: { type: 'string' } }
|
|
299
|
+
}
|
|
300
|
+
};
|
|
301
|
+
export function getShapeListQueryArgs(templateName, legacyArgs) {
|
|
302
|
+
return (context, shape) => {
|
|
303
|
+
const { projectSchema } = context;
|
|
304
|
+
const isAllShapes = shape.name === 'TSSearchable';
|
|
305
|
+
const shapeName = isAllShapes ? templateName : getFlattenedTemplateShapeName(shape.name, templateName);
|
|
306
|
+
const shapes = isAllShapes
|
|
307
|
+
? Object.values(projectSchema.shapes).filter((s) => s.model !== undefined || isCachedShape(s))
|
|
308
|
+
: [shape];
|
|
309
|
+
const { schema, dependencies } = getWhereSearchArg(projectSchema, shapes);
|
|
310
|
+
return {
|
|
311
|
+
shapeName,
|
|
312
|
+
dependencies: {
|
|
313
|
+
...dependencies,
|
|
314
|
+
TSSearchSortInput,
|
|
315
|
+
[shapeName]: createShape(shapeName, mergeObjectSchemas(commonSearchArgs, localeProps, legacyArgs ? legacyListArgs : undefined, isAllShapes ? shapeFilterProps : undefined, schema))
|
|
316
|
+
}
|
|
317
|
+
};
|
|
318
|
+
};
|
|
319
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ProjectSchemaJSON, ShapeJSON, ShapeMap } from '../project-schema/index.ts';
|
|
2
|
+
export type ResolvedTemplate = {
|
|
3
|
+
shapeName: string;
|
|
4
|
+
dependencies: ShapeMap;
|
|
5
|
+
};
|
|
6
|
+
export type TemplateContext = {
|
|
7
|
+
projectSchema: ProjectSchemaJSON;
|
|
8
|
+
};
|
|
9
|
+
export type TemplateShapeFactory = (context: TemplateContext, shape: ShapeJSON) => ResolvedTemplate;
|
|
10
|
+
export declare enum TemplateVerbs {
|
|
11
|
+
Create = "create",
|
|
12
|
+
Update = "update",
|
|
13
|
+
Duplicate = "duplicate",
|
|
14
|
+
Delete = "delete"
|
|
15
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { Maybe } from '@takeshape/util';
|
|
2
|
+
import type { ObjectSchema, ProjectSchemaJSON, PropertySchema, ShapeJSON, ShapeMap } from '../project-schema/index.ts';
|
|
3
|
+
import type { ResolvedTemplate } from './types.ts';
|
|
4
|
+
export declare const MAX_RELATIONSHIP_DEPTH = 1;
|
|
5
|
+
export declare const exceededRelationshipDepth: (depth?: number) => boolean;
|
|
6
|
+
type ComparisonOperatorKey = 'eq' | 'lt' | 'lte' | 'gt' | 'gte' | 'in' | 'match' | 'regexp';
|
|
7
|
+
type ShapeThunk = ShapeJSON | (() => ShapeJSON);
|
|
8
|
+
declare class ShapeCache {
|
|
9
|
+
thunks: Map<string, ShapeThunk>;
|
|
10
|
+
unresolved: Set<string>;
|
|
11
|
+
has(shapeName: string): boolean;
|
|
12
|
+
set(shapeName: string, thunk: ShapeThunk): void;
|
|
13
|
+
resolveAll(): ShapeMap;
|
|
14
|
+
}
|
|
15
|
+
export declare const fieldTypeComparison: Record<string, {
|
|
16
|
+
comparators: ComparisonOperatorKey[];
|
|
17
|
+
type: 'string' | 'number' | 'integer' | 'boolean';
|
|
18
|
+
}>;
|
|
19
|
+
export declare const comparatorDescriptions: Record<string, string>;
|
|
20
|
+
export declare const booleanOperators: string[];
|
|
21
|
+
export declare const boolOpDescriptionMap: Record<string, string>;
|
|
22
|
+
export declare function getFieldTypeComparison(fieldType: string): Maybe<Record<string, PropertySchema>>;
|
|
23
|
+
export type PropertyContext = {
|
|
24
|
+
shapeCache: ShapeCache;
|
|
25
|
+
conflictingProperties?: Set<string>;
|
|
26
|
+
projectSchema: ProjectSchemaJSON;
|
|
27
|
+
relationshipDepth: number;
|
|
28
|
+
booleanOperators?: boolean;
|
|
29
|
+
};
|
|
30
|
+
export declare function getFields(typeName: string, shapes: ShapeJSON[], context: PropertyContext): Record<string, PropertySchema>;
|
|
31
|
+
export declare function getPropertyComparisonType(name: string, prop: PropertySchema, shapeName: string, context: PropertyContext): Maybe<Record<string, PropertySchema>>;
|
|
32
|
+
export declare function getWhereShape(projectSchema: ProjectSchemaJSON, selectedShapes: ShapeJSON[]): ResolvedTemplate;
|
|
33
|
+
export declare function getWhereSearchArg(projectSchema: ProjectSchemaJSON, selectedShapes: ShapeJSON[]): {
|
|
34
|
+
schema: ObjectSchema;
|
|
35
|
+
dependencies: ShapeMap;
|
|
36
|
+
};
|
|
37
|
+
export {};
|